diff --git a/.editorconfig b/.editorconfig index 2795b754d..016543a0a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,9 +3,9 @@ root = true # Matches multiple files with brace expansion notation # Set default charset -[*.{js,json}] +[*.{js,json, styl, jade}] charset = utf-8 indent_style = space indent_size = 4 trim_trailing_whitespace = true -insert_final_newline = true \ No newline at end of file +insert_final_newline = true diff --git a/.gitignore b/.gitignore index ec76856fd..f3eb67c8a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,9 @@ www/*.html -www/*/*.html +www/**/*.html www/css/*.css www/js/index.js +www/assets/challenges/descriptors +www/components/**/** .tmp node_modules npm-debug.log @@ -9,4 +11,5 @@ npm-debug.log **.sublime-workspace *.pyc *.swp -dist \ No newline at end of file +dist +bower_components diff --git a/.jshintrc b/.jshintrc index 4d5a2652d..67ad46989 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,8 +1,19 @@ { "browser": true, "esnext": true, - "globals": { "angular": true }, - "globalstrict": false, + "globals": { "angular": true, + "describe": true, + "xdescribe": true, + "ddescribe": true, + "it": true, + "xit": true, + "iit": true, + "beforeEach": true, + "afterEach": true, + "expect": true, + "pending": true + }, + "globalstrict": true, "quotmark": false, "undef": true, "unused": true, diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..8b966d68e --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,55 @@ +#!groovy +node { + stage('check environment') { + if (env.BRANCH_NAME=="master" || env.BRANCH_NAME=="jenkins") { + env.NODE_ENV = "staging" + } else if (env.BRANCH_NAME=="prod") { + env.NODE_ENV = "production" + } + + if (env.NODE_ENV == "staging") { + load "/var/lib/jenkins/userContent/make-art-config/staging.env" + } else if (env.NODE_ENV == "production") { + load "/var/lib/jenkins/userContent/make-art-config/prod.env" + } + } + + stage('checkout') { + checkout scm + } + + stage('clean') { + sh "rm -rf node_modules" + } + + stage('install dependencies') { + sh "npm install --ignore-scripts" + sh "bower i" + } + + stage('build') { + sh "gulp default" + } + + stage('compress') { + sh "gulp compress" + } + + stage('deploy') { + if (env.BRANCH_NAME == "jenkins") { + echo 'deploy skipped' + } else if (env.NODE_ENV=="staging") { + deploy_staging() + } else if (env.NODE_ENV=="production") { + deploy_prod() + } + } +} + +def deploy_staging() { + sh 'aws s3 sync ./www s3://art-staging.kano.me --region eu-west-1 --cache-control "max-age=600"' +} + +def deploy_prod() { + sh 'aws s3 sync ./www s3://make-art-site-prod --region us-west-1 --cache-control "max-age=600"' +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..22fbe5dba --- /dev/null +++ b/LICENSE @@ -0,0 +1,339 @@ +GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {description} + Copyright (C) {year} {fullname} + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + {signature of Ty Coon}, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. \ No newline at end of file diff --git a/README.md b/README.md index 6d5fbf95a..f67c84bd1 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ You can try the app [here »](http://art.kano.me/) git clone git@github.com:KanoComputing/make-art.git cd make-art npm install + bower install ## Build @@ -29,3 +30,24 @@ Open your browser at [http://localhost:3000](http://localhost:3000) Run the watch script when developing npm run watch + +## Offline + +To build in the offline mode for Kano OS add these ENV vars: + + OFFLINE=true NODE_ENV=production gulp + +Since Node JS isn't included by default on the kit and the offline backend is +[implemented in Python](/kano_draw/server.py), the easiest way to +debug on the kit is to build the static assets on your machine and rsync them +over to the kit as follows: + + rsync -av make-art "user@ip:~/make-art" + +On Kano OS, go to the `bin/` directory and launch the `kano-draw` script +which will start the server and open a +[python-webkit](https://wiki.python.org/moin/PythonWebKit) browser with Make +Art. + + user@kano-os ~ $ cd ~/make-art/bin + user@kano-os ~ $ cd ./kano-draw diff --git a/TRANSLATION.md b/TRANSLATION.md new file mode 100644 index 000000000..9824ad12b --- /dev/null +++ b/TRANSLATION.md @@ -0,0 +1,52 @@ +# Translation + +Translation files are found in the following directories: +- `lib/challenges/locales`: translation of the challenges +- `locales`: translation of the views +- `content/docs.json`: translation of the documentation + +## i18n not released yet + +Kano OS is not fully i18n-aware and locales are not installed for end users, yet. You can translate this application, but as of now, users will still see the default English message strings. + +## Build + +Translations are part of the normal build process: when you type `npm run build`, the translated challenges and docs will be copied in the `www` directory; and the view templates will be localized by mapping the resources _for each language_. So it means that all resources (views, challenges and docs translations) are prepared in advance. + +## Runtime + +At runtime, the proper translation will be picked based on the browser language. + +## How to add a new translation + +You need to add the new language in 4 places: + +1. Create `lib/challenges/locales/` and copy the whole `worlds` directory and `index.json` + These are the translations of the challenges, the main content of Make-Art. + +2. Create new .po files for each locale - one from the `messages.pot` and one + from the `messages-doc.pot`. These are the translations of the views and + documentation. + +3. After translation run the `po/lang-po-to-json` and `po/lang-docs-po-to-json` + to create the necessary json files from the po files. + +4. Add your language to `SUPPORTED_LOCALES` array in `lib/i18n.js` + +## How to make sure your code is i18n-aware + +For the challenges, if you create a new challenge in English, there is nothing special to do, it can be translated to other languages by copying the .json file to the other locales directories. + +For the views (jade templates), you need to enclose all your strings in `${{` and `}}$` as this is the convention used by gulp-html-i18n plugin to find and replace the messages in the view templates. Then, you need to add the new string to the corresponding .json file in the (top-level) `locales` directory. Let's say you want to add a string "Happy Birthday" to the challenge.jade template; you would write it as follows in the challenge.jade: `${{ challenge.hapy_birthday }}$`. Then, you would add an entry to the challenge.json map, like: +``` +{ + ... + "happy_birthday": "Happy Birthday" +} +``` + +Finally, for the documentation, if you add / modify text in `content/docs.json` the translations will need to be added for other languages, in the same file. + +## To-Do + +Tool to make it easier to add new languages. diff --git a/bin/kano-draw b/bin/kano-draw index 9523b1ed7..6828bdd6c 100755 --- a/bin/kano-draw +++ b/bin/kano-draw @@ -1,21 +1,23 @@ -#!/usr/bin/kano-splash /usr/share/kano-draw/media/splash.png /usr/bin/env python +#!/usr/bin/kano-splash loader-animation /usr/bin/env python # kano-draw # -# Copyright (C) 2014 Kano Computing Ltd. -# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2 +# Copyright (C) 2014-2018 Kano Computing Ltd. +# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPL v2 # # The Draw App implementation # # Before loading anything else, declare a profiling timepoint -from kano.profiling import declare_timepoint -declare_timepoint("load",True) +# from kano.profiling import declare_timepoint +# declare_timepoint("load", True) import os import sys import multiprocessing import signal +import time +import atexit if __name__ == '__main__' and __package__ is None: DIR_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) @@ -26,14 +28,56 @@ if __name__ == '__main__' and __package__ is None: from kano_profile.tracker import Tracker kanotracker = Tracker() +from kano.utils import run_cmd +from kano.logging import logger from kano_draw.video import play_intro -from kano_draw.draw import Draw +from kano_draw.draw import start_draw import kano_draw.server +SERVER_PROC = None +UI_PROC = None + +def _kill_subprocess(proc_handle): + if proc_handle is not None and proc_handle.is_alive(): + proc_handle.terminate() + os.kill(proc_handle.pid, signal.SIGKILL) + + +def _kill_lingering_processes(): + """ Look for processes still attached to port 8000 whose name starts with + 'dbus-' and kill them + """ + pid_no, dummy, dummy2 = run_cmd( + "lsof -i :8000 | grep 'dbus-' | awk '{ print $2 }'" + ) + if pid_no: + pids = pid_no.splitlines() + for pid in pids: + try: + os.kill(int(pid), signal.SIGTERM) + except ValueError: + pass + + +def _at_exit_hook(): + """ Ensure that the two subprocesses are killed before this process exits + """ + _kill_subprocess(UI_PROC) + # Give the server subprocess 10 secs to die + SERVER_PROC.join(5) + # Now kill it anyway + _kill_subprocess(SERVER_PROC) + # Cleanup the lingering processes (usually produced by omxplayer) + _kill_lingering_processes() + + +# At this point cleaning up just exits. This is triggered once the server +# (which is a child process) notifies us to exit def cleanup(signum, frame): sys.exit(0) +atexit.register(_at_exit_hook) signal.signal(signal.SIGINT, cleanup) play_intro() @@ -44,12 +88,33 @@ SERVER_PROC = multiprocessing.Process(target=kano_draw.server.start, kwargs={ 'parent_pid': APP_PID }) -SERVER_PROC.daemon = True SERVER_PROC.start() # Init the web app +kwargs = {} if len(sys.argv) > 1: - DRAW = Draw(load_path=sys.argv[1]) -else: - DRAW = Draw() -DRAW.run() + arg = sys.argv[1] + + if arg == 'make': + kwargs['make'] = True + elif arg == 'play': + kwargs['play'] = True + else: + kwargs['load_path'] = arg + +UI_PROC = multiprocessing.Process(target=start_draw, kwargs=kwargs) + +UI_PROC.daemon = True +UI_PROC.start() + +# This process is really a factory/watchdog process. It launches the UI and +# server processes as children and makes sure to terminate both once they have +# one of them has been terminated +try: + while UI_PROC.is_alive() and SERVER_PROC.is_alive(): + time.sleep(3) + sys.exit(0) +except Exception as exc: + # the SIGINT handler has executed here + logger.error('Error while in the main waiting loop: [{}]'.format(exc)) + sys.exit(0) diff --git a/bower.json b/bower.json new file mode 100644 index 000000000..5d9f7feec --- /dev/null +++ b/bower.json @@ -0,0 +1,28 @@ +{ + "name": "make-art", + "description": "App to learn programming using a basic CoffeeScript drawing API", + "main": "lib/index.js", + "authors": [ + "Kano Computing" + ], + "license": "MIT2", + "homepage": "http://art.kano.me/challenges", + "private": true, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "web-components": "git@github.com:KanoComputing/web-components", + "iron-image": "PolymerElements/iron-image#^1.2.5" + }, + "resolutions": { + "iron-image": "^2.1.2", + "iron-flex-layout": "^2.0.0", + "polymer": "1.9 - 2", + "webcomponentsjs": "^v1.0.19" + } +} diff --git a/content/docs.json b/content/docs.json index 9493c2cb0..571d201a1 100644 --- a/content/docs.json +++ b/content/docs.json @@ -1,268 +1,1643 @@ -[ - { - "label" : "Shapes", - "icon" : "shapes", - "commands" : [ - { - "call" : "circle", - "unlockedAt" : 1, - "description" : "Draw a circle", - "args" : [ - [ "radius", "number", "The circle size", true ] - ], - "defaults": [ 100 ] - }, - { - "call" : "ellipse", - "unlockedAt" : 999, - "description" : "Draw an ellipse", - "args" : [ - [ "radius-x", "number", "The ellipse width", true ], - [ "radius-y", "number", "The ellipse height", true ] - ], - "defaults": [ 50, 100 ] - }, - { - "call" : "square", - "unlockedAt" : 2, - "description" : "Draw a square", - "args" : [ - [ "size", "number", "The square size", true ] - ], - "defaults": [ 200 ] - }, - { - "call" : "rectangle", - "unlockedAt" : 999, - "description" : "Draw a rectangle", - "args" : [ - [ "width", "number", "The rectangle width", true ], - [ "height", "number", "The rectangle height", true ] - ], - "defaults": [ 100, 200 ] - }, - { - "call" : "arc", - "unlockedAt" : 999, - "description" : "Draw part of a circle", - "args" : [ - [ "radius", "number", "The size", true ], - [ "start", "number", "The start point (between 0 to 2)", true ], - [ "end", "number", "The end point (between 0 to 2)", true ], - [ "close", "bool", "Close the shape", false ] - ], - "defaults": [ 100, 1, 2, true ] - }, - { - "call" : "polygon", - "unlockedAt" : 999, - "description" : "Draw a many sided shape", - "args" : [ - [ "x1", "number", "Point X position", true ], - [ "y1", "number", "Point Y position", true ], - [ "...", "", "More polygon points positions", true ], - [ "close", "bool", "Close the path in the middle", false ] - ], - "defaults": [ 0, 0, 100, 0, 100, 100 ] - } - ] - }, - { - "label" : "Lines", - "icon" : "lines", - "commands" : [ - { - "call" : "line", - "unlockedAt" : 3, - "description" : "Draw a line of a certain size", - "args" : [ - [ "x", "number", "Horizontal distance", true ], - [ "y", "number", "Vertical distance", false ] - ], - "defaults": [ 100, 50 ] - }, - { - "call" : "lineTo", - "unlockedAt" : 999, - "description" : "Draw a line to a certain point", - "args" : [ - [ "x", "number", "The horizontal destination", true ], - [ "y", "number", "The vertical destination", true ] - ], - "defaults": [ 0, 0 ] - } - ] - }, - { - "label" : "Position", - "icon" : "position", - "commands" : [ - { - "call" : "move", - "unlockedAt" : 6, - "description" : "Move the cursor a certain distance away", - "args" : [ - [ "x", "number", "Horizontal distance", true ], - [ "y", "number", "Vertical distance", false ] - ], - "defaults": [ 100, 50 ] - }, - { - "call" : "moveTo", - "unlockedAt" : 999, - "description" : "Move the cursor to a particular position", - "args" : [ - [ "x", "number", "The horizontal destination", true ], - [ "y", "number", "The vertical destination", true ] - ], - "defaults": [ "center", "center" ] - } - ] - }, - { - "label" : "Text", - "icon" : "text", - "commands" : [ - { - "call" : "text", - "unlockedAt" : 999, - "description" : "Write text", - "args" : [ - [ "message", "string", "The message to write", true ] - ], - "defaults": [ "Say something!" ] - }, - { - "call" : "font", - "unlockedAt" : 999, - "description" : "Set size and/or font", - "args" : [ - [ "font", "string", "The font family name", false ], - [ "size", "number", "The text size in pixels", false ] - ], - "defaults": [ "Bariol", 30 ] - }, - { - "call" : "bold", - "unlockedAt" : 999, - "description" : "Sets bold text on (true) or off (false)", - "args" : [ - [ "state", "bool", "Bold state (True by default)", false ] - ], - "defaults": [ true ] - }, - { - "call" : "italic", - "unlockedAt" : 999, - "description" : "Sets italic text on (true) or off (false)", - "args" : [ - [ "state", "bool", "Italic state (True by default)", false ] - ], - "defaults": [ true ] - } - ] - }, - { - "label" : "General", - "icon" : "general", - "commands" : [ - { - "call" : "for", - "unlockedAt" : 9, - "description" : "Repeat code", - "args" : [ - [ "i in [x..y]", "number", "The start and end point for the variable i", true ] - ], - "example" : "for i in [1..5]\n circle i", - "defaults": null - }, - { - "call" : "random", - "unlockedAt" : 9, - "description" : "Get a random number in a range.", - "args" : [ - [ "min", "number", "The minimum value", true ], - [ "max", "number", "The maximum value", true ], - [ "float", "bool", "Set to true to return decimal values", false ] - ], - "example" : "random 5, 10", - "defaults": [ 5, 10 ] - } - ] - }, - { - "label" : "Colors", - "icon" : "colors", - "commands" : [ - { - "call" : "background", - "unlockedAt" : 999, - "description" : "Set the background color", - "args" : [ - [ "color", "string", "The background color to set", true ] - ], - "defaults": [ "blue" ] - }, - { - "call" : "color", - "unlockedAt" : 4, - "description" : "Change the color in use", - "args" : [ - [ "color", "string", "The object color to set", true ] - ], - "defaults": [ "red" ] - }, - { - "call" : "stroke", - "unlockedAt" : 5, - "description" : "Change the width and color of the stroke (border)", - "args" : [ - [ "color", "string", "A string with the color to use - E.g. 'red', 'blue'..", false ], - [ "size", "number", "(number) The width to use", false ] - ], - "defaults": [ 10, "purple" ] - }, - { - "call" : "setBrightness", - "unlockedAt" : 999, - "description" : "Set a colour's brightness", - "args" : [ - [ "color", "string", "Color", true ], - [ "amount", "number", "amount of brightness to set (-100 to 100)", false ] - ], - "defaults": [ "yellow", 30 ] - }, - { - "call" : "setSaturation", - "unlockedAt" : 999, - "description" : "Set a colour's saturation", - "args" : [ - [ "color", "string", "Color", true ], - [ "amount", "number", "amount of saturation to set (-100 to 100)", false ] - ], - "defaults": [ "grey", 30 ] - }, - { - "call" : "rotate", - "unlockedAt" : 999, - "description" : "Rotate a color's hue angle by given amount", - "args" : [ - [ "color", "string", "Color to rotate", true ], - [ "amount", "number", "angle to rotate (-360 - 360)", true ] - ], - "defaults": [ "red", 100 ] - }, - { - "call" : "setTransparency", - "unlockedAt" : 999, - "description" : "Set how see through a color is", - "args" : [ - [ "color", "string", "Color to saturate", true ], - [ "amount", "number", "amount of opacity to subtract (-100 to 100)", true ] - ], - "defaults": [ "black", 50 ] - } - - ] - } -] +{ + "es-AR": [ + { + "commands": [ + { + "unlockedAt": 1, + "args": [ + [ + "radius", + "number", + "Tamaño del círculo", + true + ] + ], + "call": "circle", + "description": "Dibuja un círculo", + "defaults": [ + 100 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "radius-x", + "number", + "Ancho de la elipse", + true + ], + [ + "radius-y", + "number", + "Altura de la elipse", + true + ] + ], + "call": "ellipse", + "description": "Dibuja una elipse", + "defaults": [ + 50, + 100 + ] + }, + { + "unlockedAt": 2, + "args": [ + [ + "size", + "number", + "Tamaño del cuadrado", + true + ] + ], + "call": "square", + "description": "Dibuja un cuadrado", + "defaults": [ + 200 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "width", + "number", + "Ancho del rectángulo", + true + ], + [ + "height", + "number", + "Altura del rectángulo", + true + ] + ], + "call": "rectangle", + "description": "Dibuja un rectángulo", + "defaults": [ + 100, + 200 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "radius", + "number", + "Tamaño", + true + ], + [ + "start", + "number", + "El punto de inicio (entre 0 y 2)", + true + ], + [ + "end", + "number", + "El punto de fin (entre 0 y 2)", + true + ], + [ + "close", + "bool", + "Cierra la figura", + false + ] + ], + "call": "arc", + "description": "Dibuja parte de un círculo", + "defaults": [ + 100, + 1, + 2, + true + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "x1", + "number", + "Indica la posición X", + true + ], + [ + "y1", + "number", + "Indica la posición Y", + true + ], + [ + "...", + "", + "Más puntos de posición del polígono", + true + ], + [ + "close", + "bool", + "Cierra la figura en el medio", + false + ] + ], + "call": "polygon", + "description": "Dibuja una figura de muchos lados", + "defaults": [ + 0, + 0, + 100, + 0, + 100, + 100 + ] + } + ], + "icon": "shapes", + "label": "Figuras" + }, + { + "commands": [ + { + "unlockedAt": 3, + "args": [ + [ + "x", + "number", + "Distancia horizontal", + true + ], + [ + "y", + "number", + "Distancia vertical", + false + ] + ], + "call": "line", + "description": "Dibuja una línea de un determinado tamaño", + "defaults": [ + 100, + 50 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "x", + "number", + "El punto de destino horizontal", + true + ], + [ + "y", + "number", + "El punto de destino vertical", + true + ] + ], + "call": "lineTo", + "description": "Dibuja una línea hasta un determinado punto", + "defaults": [ + 0, + 0 + ] + } + ], + "icon": "lines", + "label": "Líneas" + }, + { + "commands": [ + { + "unlockedAt": 6, + "args": [ + [ + "x", + "number", + "Distancia horizontal", + true + ], + [ + "y", + "number", + "Distancia vertical", + false + ] + ], + "call": "move", + "description": "Mueve el cursor una determinada distancia", + "defaults": [ + 100, + 50 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "x", + "number", + "El punto de destino horizontal", + true + ], + [ + "y", + "number", + "El punto de destino vertical", + true + ] + ], + "call": "moveTo", + "description": "Mueve el cursor a una determinada posición", + "defaults": [ + "center", + "center" + ] + } + ], + "icon": "position", + "label": "Posición" + }, + { + "commands": [ + { + "unlockedAt": 999, + "args": [ + [ + "message", + "string", + "El mensaje a escribir", + true + ] + ], + "call": "text", + "description": "Escribe texto", + "defaults": [ + "Say something!" + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "font", + "string", + "El nombre de la fuente", + false + ], + [ + "size", + "number", + "El tamaño del texto en píxeles", + false + ] + ], + "call": "font", + "description": "Configura el tamaño y/o la fuente", + "defaults": [ + "Bariol", + 30 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "state", + "bool", + "Estado de la negrita (Verdadero es el predeterminado)", + false + ] + ], + "call": "bold", + "description": "Activa la negrita (verdadero) o desactívala (falso)", + "defaults": [ + true + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "state", + "bool", + "Estado de la cursiva (Verdadero es el predeterminado)", + false + ] + ], + "call": "italic", + "description": "Activa la cursiva (verdadero) o desactívala (falso)", + "defaults": [ + true + ] + } + ], + "icon": "text", + "label": "Texto" + }, + { + "commands": [ + { + "description": "Repetir código", + "args": [ + [ + "i in [x..y]", + "number", + "Punto de inicio y fin de la variable i", + true + ] + ], + "call": "for", + "defaults": null, + "unlockedAt": 9, + "example": "for i in [1..5]\n circle i" + }, + { + "description": "Obtén un número aleatorio dentro de un rango.", + "args": [ + [ + "min", + "number", + "El valor mínimo", + true + ], + [ + "max", + "number", + "El valor máximo", + true + ], + [ + "float", + "bool", + "Configura a verdadero para recibir valores decimales", + false + ] + ], + "call": "random", + "defaults": [ + 5, + 10 + ], + "unlockedAt": 9, + "example": "random 5, 10" + } + ], + "icon": "general", + "label": "General" + }, + { + "commands": [ + { + "unlockedAt": 999, + "args": [ + [ + "color", + "string", + "El color del fondo a configurar", + true + ] + ], + "call": "background", + "description": "Configura el color del fondo", + "defaults": [ + "blue" + ] + }, + { + "unlockedAt": 4, + "args": [ + [ + "color", + "string", + "El color del objeto a configurar", + true + ] + ], + "call": "color", + "description": "Cambia el color en uso", + "defaults": [ + "red" + ] + }, + { + "unlockedAt": 5, + "args": [ + [ + "color", + "string", + "El color a usar - Ej. 'red', 'blue'..", + false + ], + [ + "size", + "number", + "(número) El ancho a usar", + false + ] + ], + "call": "stroke", + "description": "Cambia el color y el ancho del trazo (borde)", + "defaults": [ + 10, + "purple" + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "color", + "string", + "Color", + true + ], + [ + "amount", + "number", + "monto del brillo a configurar (-100 a 100)", + false + ] + ], + "call": "setBrightness", + "description": "Configura el brillo del color", + "defaults": [ + "yellow", + 30 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "color", + "string", + "Color", + true + ], + [ + "amount", + "number", + "monto de saturación a configurar (-100 a 100)", + false + ] + ], + "call": "setSaturation", + "description": "Configura la saturación del color", + "defaults": [ + "grey", + 30 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "color", + "string", + "Color a cambiar", + true + ], + [ + "amount", + "number", + "tono a configurar (-360 - 360)", + true + ] + ], + "call": "rotate", + "description": "Cambia el tono de un color en base a un determinado valor", + "defaults": [ + "red", + 100 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "color", + "string", + "Color a saturar", + true + ], + [ + "amount", + "number", + "monto de opacidad (-100 a 100)", + true + ] + ], + "call": "setTransparency", + "description": "Configura cómo se ve a través de un color", + "defaults": [ + "black", + 50 + ] + } + ], + "icon": "colors", + "label": "Colores" + } + ], + "en": [ + { + "commands": [ + { + "unlockedAt": 1, + "args": [ + [ + "radius", + "number", + "The circle size", + true + ] + ], + "call": "circle", + "description": "Draw a circle", + "defaults": [ + 100 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "radius-x", + "number", + "The ellipse width", + true + ], + [ + "radius-y", + "number", + "The ellipse height", + true + ] + ], + "call": "ellipse", + "description": "Draw an ellipse", + "defaults": [ + 50, + 100 + ] + }, + { + "unlockedAt": 2, + "args": [ + [ + "size", + "number", + "The square size", + true + ] + ], + "call": "square", + "description": "Draw a square", + "defaults": [ + 200 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "width", + "number", + "The rectangle width", + true + ], + [ + "height", + "number", + "The rectangle height", + true + ] + ], + "call": "rectangle", + "description": "Draw a rectangle", + "defaults": [ + 100, + 200 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "radius", + "number", + "The size", + true + ], + [ + "start", + "number", + "The start point (between 0 to 2)", + true + ], + [ + "end", + "number", + "The end point (between 0 to 2)", + true + ], + [ + "close", + "bool", + "Close the shape", + false + ] + ], + "call": "arc", + "description": "Draw part of a circle", + "defaults": [ + 100, + 1, + 2, + true + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "x1", + "number", + "Point X position", + true + ], + [ + "y1", + "number", + "Point Y position", + true + ], + [ + "...", + "", + "More polygon points positions", + true + ], + [ + "close", + "bool", + "Close the path in the middle", + false + ] + ], + "call": "polygon", + "description": "Draw a many sided shape", + "defaults": [ + 0, + 0, + 100, + 0, + 100, + 100 + ] + } + ], + "label": "Shapes", + "icon": "shapes" + }, + { + "commands": [ + { + "unlockedAt": 3, + "args": [ + [ + "x", + "number", + "Horizontal distance", + true + ], + [ + "y", + "number", + "Vertical distance", + false + ] + ], + "call": "line", + "description": "Draw a line of a certain size", + "defaults": [ + 100, + 50 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "x", + "number", + "The horizontal destination", + true + ], + [ + "y", + "number", + "The vertical destination", + true + ] + ], + "call": "lineTo", + "description": "Draw a line to a certain point", + "defaults": [ + 0, + 0 + ] + } + ], + "label": "Lines", + "icon": "lines" + }, + { + "commands": [ + { + "unlockedAt": 6, + "args": [ + [ + "x", + "number", + "Horizontal distance", + true + ], + [ + "y", + "number", + "Vertical distance", + false + ] + ], + "call": "move", + "description": "Move the cursor a certain distance away", + "defaults": [ + 100, + 50 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "x", + "number", + "The horizontal destination", + true + ], + [ + "y", + "number", + "The vertical destination", + true + ] + ], + "call": "moveTo", + "description": "Move the cursor to a particular position", + "defaults": [ + "center", + "center" + ] + } + ], + "label": "Position", + "icon": "position" + }, + { + "commands": [ + { + "unlockedAt": 999, + "args": [ + [ + "message", + "string", + "The message to write", + true + ] + ], + "call": "text", + "description": "Write text", + "defaults": [ + "Say something!" + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "font", + "string", + "The font family name", + false + ], + [ + "size", + "number", + "The text size in pixels", + false + ] + ], + "call": "font", + "description": "Set size and/or font", + "defaults": [ + "Bariol", + 30 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "state", + "bool", + "Bold state (True by default)", + false + ] + ], + "call": "bold", + "description": "Sets bold text on (true) or off (false)", + "defaults": [ + true + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "state", + "bool", + "Italic state (True by default)", + false + ] + ], + "call": "italic", + "description": "Sets italic text on (true) or off (false)", + "defaults": [ + true + ] + } + ], + "label": "Text", + "icon": "text" + }, + { + "commands": [ + { + "description": "Repeat code", + "args": [ + [ + "i in [x..y]", + "number", + "The start and end point for the variable i", + true + ] + ], + "call": "for", + "defaults": null, + "unlockedAt": 9, + "example": "for i in [1..5]\n circle i" + }, + { + "description": "Get a random number in a range.", + "args": [ + [ + "min", + "number", + "The minimum value", + true + ], + [ + "max", + "number", + "The maximum value", + true + ], + [ + "float", + "bool", + "Set to true to return decimal values", + false + ] + ], + "call": "random", + "defaults": [ + 5, + 10 + ], + "unlockedAt": 9, + "example": "random 5, 10" + } + ], + "label": "General", + "icon": "general" + }, + { + "commands": [ + { + "unlockedAt": 999, + "args": [ + [ + "color", + "string", + "The background color to set", + true + ] + ], + "call": "background", + "description": "Set the background color", + "defaults": [ + "blue" + ] + }, + { + "unlockedAt": 4, + "args": [ + [ + "color", + "string", + "The object color to set", + true + ] + ], + "call": "color", + "description": "Change the color in use", + "defaults": [ + "red" + ] + }, + { + "unlockedAt": 5, + "args": [ + [ + "color", + "string", + "A string with the color to use - E.g. 'red', 'blue'..", + false + ], + [ + "size", + "number", + "(number) The width to use", + false + ] + ], + "call": "stroke", + "description": "Change the width and color of the stroke (border)", + "defaults": [ + 10, + "purple" + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "color", + "string", + "Color", + true + ], + [ + "amount", + "number", + "amount of brightness to set (-100 to 100)", + false + ] + ], + "call": "setBrightness", + "description": "Set a colour's brightness", + "defaults": [ + "yellow", + 30 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "color", + "string", + "Color", + true + ], + [ + "amount", + "number", + "amount of saturation to set (-100 to 100)", + false + ] + ], + "call": "setSaturation", + "description": "Set a colour's saturation", + "defaults": [ + "grey", + 30 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "color", + "string", + "Color to rotate", + true + ], + [ + "amount", + "number", + "angle to rotate (-360 - 360)", + true + ] + ], + "call": "rotate", + "description": "Rotate a color's hue angle by given amount", + "defaults": [ + "red", + 100 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "color", + "string", + "Color to saturate", + true + ], + [ + "amount", + "number", + "amount of opacity to subtract (-100 to 100)", + true + ] + ], + "call": "setTransparency", + "description": "Set how see through a color is", + "defaults": [ + "black", + 50 + ] + } + ], + "label": "Colors", + "icon": "colors" + } + ], + "ja": [ + { + "commands": [ + { + "unlockedAt": 1, + "args": [ + [ + "radius", + "number", + "円形の大きさ(半径)", + true + ] + ], + "call": "circle", + "description": "円形を描く", + "defaults": [ + 100 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "radius-x", + "number", + "楕円の横幅", + true + ], + [ + "radius-y", + "number", + "楕円の高さ", + true + ] + ], + "call": "ellipse", + "description": "楕円を描く", + "defaults": [ + 50, + 100 + ] + }, + { + "unlockedAt": 2, + "args": [ + [ + "size", + "number", + "四角の大きさ", + true + ] + ], + "call": "square", + "description": "四角を描く", + "defaults": [ + 200 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "width", + "number", + "長方形の幅", + true + ], + [ + "height", + "number", + "長方形の高さ", + true + ] + ], + "call": "rectangle", + "description": "長方形を描く", + "defaults": [ + 100, + 200 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "radius", + "number", + "大きさ(半径)", + true + ], + [ + "start", + "number", + "開始点(0〜2)", + true + ], + [ + "end", + "number", + "最後の点(0〜2)", + true + ], + [ + "close", + "bool", + "形を閉じるかどうか", + false + ] + ], + "call": "arc", + "description": "円形の一部を描く", + "defaults": [ + 100, + 1, + 2, + true + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "x1", + "number", + "ー点目のX値", + true + ], + [ + "y1", + "number", + "ー点目のY値", + true + ], + [ + "...", + "", + "他の点の位置", + true + ], + [ + "close", + "bool", + "パスを真ん中に閉じるかどうか", + false + ] + ], + "call": "polygon", + "description": "多辺形を描く", + "defaults": [ + 0, + 0, + 100, + 0, + 100, + 100 + ] + } + ], + "label": "形", + "icon": "shapes" + }, + { + "commands": [ + { + "unlockedAt": 3, + "args": [ + [ + "x", + "number", + "水平距離", + true + ], + [ + "y", + "number", + "垂直距離", + false + ] + ], + "call": "line", + "description": "ある大きさの線を描く", + "defaults": [ + 100, + 50 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "x", + "number", + "水平の目的点", + true + ], + [ + "y", + "number", + "垂直の目的点", + true + ] + ], + "call": "lineTo", + "description": "ある点までに線を描く", + "defaults": [ + 0, + 0 + ] + } + ], + "label": "線", + "icon": "lines" + }, + { + "commands": [ + { + "unlockedAt": 6, + "args": [ + [ + "x", + "number", + "水平距離", + true + ], + [ + "y", + "number", + "垂直距離", + false + ] + ], + "call": "move", + "description": "カーソルをある距離に動かす", + "defaults": [ + 100, + 50 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "x", + "number", + "水平目的点", + true + ], + [ + "y", + "number", + "垂直目的点", + true + ] + ], + "call": "moveTo", + "description": "カーソルをある位置までに動かす", + "defaults": [ + "center", + "center" + ] + } + ], + "label": "位置", + "icon": "position" + }, + { + "commands": [ + { + "unlockedAt": 999, + "args": [ + [ + "message", + "string", + "メッセージ", + true + ] + ], + "call": "text", + "description": "文字を書く", + "defaults": [ + "何か言って!" + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "font", + "string", + "フォントファミリー名", + false + ], + [ + "size", + "number", + "ピクセルでのフォントの大きさ", + false + ] + ], + "call": "font", + "description": "フォントや大きさを設定", + "defaults": [ + "Bariol", + 30 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "state", + "bool", + "太字の状態(デフォルトはtrue)", + false + ] + ], + "call": "bold", + "description": "太字を有効(true)または無効(false)", + "defaults": [ + true + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "state", + "bool", + "車体の状態(デフォルトはtrue)", + false + ] + ], + "call": "italic", + "description": "車体を有効(true)または無効(false)", + "defaults": [ + true + ] + } + ], + "label": "テキスト", + "icon": "text" + }, + { + "commands": [ + { + "description": "コードを繰り返す", + "args": [ + [ + "i in [x..y]", + "number", + "i変数の最初と最後の値", + true + ] + ], + "call": "for", + "defaults": null, + "unlockedAt": 9, + "example": "for i in [1..5]\n circle i" + }, + { + "description": "ある範囲内でランダムな数字を生成する", + "args": [ + [ + "min", + "number", + "最低値", + true + ], + [ + "max", + "number", + "最高地", + true + ], + [ + "float", + "bool", + "trueにすると少数が得られる", + false + ] + ], + "call": "random", + "defaults": [ + 5, + 10 + ], + "unlockedAt": 9, + "example": "random 5, 10" + } + ], + "label": "一般", + "icon": "general" + }, + { + "commands": [ + { + "unlockedAt": 999, + "args": [ + [ + "color", + "string", + "設定したい背景の色", + true + ] + ], + "call": "background", + "description": "背景の色を設定する", + "defaults": [ + "blue" + ] + }, + { + "unlockedAt": 4, + "args": [ + [ + "color", + "string", + "設定したい鉛筆の色", + true + ] + ], + "call": "color", + "description": "鉛筆の色を変える", + "defaults": [ + "red" + ] + }, + { + "unlockedAt": 5, + "args": [ + [ + "color", + "string", + "設定したい色。例えば'red', 'blue'..", + false + ], + [ + "size", + "number", + "鉛筆の太さ", + false + ] + ], + "call": "stroke", + "description": "筆の太さと色を変える", + "defaults": [ + 10, + "purple" + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "color", + "string", + "色", + true + ], + [ + "amount", + "number", + "設定したい明るさ(-100〜100)", + false + ] + ], + "call": "setBrightness", + "description": "色の明るさを設定する", + "defaults": [ + "yellow", + 30 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "color", + "string", + "色", + true + ], + [ + "amount", + "number", + "設定したい飽和(-100〜100)", + false + ] + ], + "call": "setSaturation", + "description": "色の飽和を設定する", + "defaults": [ + "grey", + 30 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "color", + "string", + "変えたい色", + true + ], + [ + "amount", + "number", + "回転の角度(-360〜360)", + true + ] + ], + "call": "rotate", + "description": "色相を回転させる(変更する)", + "defaults": [ + "red", + 100 + ] + }, + { + "unlockedAt": 999, + "args": [ + [ + "color", + "string", + "色", + true + ], + [ + "amount", + "number", + "引き算する不透明度(-100〜100)", + true + ] + ], + "call": "setTransparency", + "description": "色の透明度を設定する", + "defaults": [ + "black", + 50 + ] + } + ], + "label": "色", + "icon": "colors" + } + ] +} diff --git a/debian/changelog b/debian/changelog index b820c62be..46a34ed19 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,46 @@ +kano-draw (3.15.0-0) unstable; urgency=low + + * Small challenge copy fixes + * Disabled kano.profiling calls + + -- Team Kano Wed, 31 Jan 2018 15:37:00 +0100 + +kano-draw (3.14.0-0) unstable; urgency=low + + * Applied changes from v3.9.2 es_AR backports to latest + * Added Loading animation splash window + * Fixed returning from shares when launched through challenge pack pages + + -- Team Kano Mon, 4 Dec 2017 10:50:00 +0100 + +kano-draw (3.11.0-1) unstable; urgency=low + + * Bump version for OS 3.11.0 release + + -- Team Kano Tue, 25 Jul 2017 15:35:00 +0100 + +kano-draw (3.9.2-0) unstable; urgency=low + + * Initial es_AR customer release + * Updated es_AR translations of nearly all challenges (backport) + + -- Team Kano Mon, 16 Oct 2017 11:08:00 +0100 + +kano-draw (2.3.0-1) unstable; urgency=low + + * Introduce Pixel Hack challenge group + * Use latest version of kano-toolset + + -- Team Kano Fri, 29 Jan 2016 11:00:00 +0100 + +kano-draw (2.2.0-1) unstable; urgency=low + + * Introduce Art Worlds for grouping challenges + + -- Team Kano Wed, 14 Oct 2015 00:23:58 +0100 + kano-draw (1.0-1) UNRELEASED; urgency=low - * Initial release. (Closes: #XXXXXX) + * Initial release. - -- Alex Wed, 16 Apr 2014 17:40:58 +0100 + -- Alex Wed, 16 Apr 2014 17:40:58 +0100 diff --git a/debian/control b/debian/control index 3a77da6b4..6fcbfb8a3 100755 --- a/debian/control +++ b/debian/control @@ -3,11 +3,17 @@ Maintainer: Team Kano Section: misc Priority: optional Standards-Version: 3.9.4 -Build-Depends: debhelper (>= 9) +Build-Depends: debhelper (>= 9), python, python-polib, python-docopt, nodejs Package: kano-draw Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, kano-toolset (>= 1.3-8), +Depends: ${shlibs:Depends}, ${misc:Depends}, kano-toolset (>= 2.3.0-5), kano-profile (>= 1.3-2), python-flask Suggests: kano-video-files (>= 1.2-1) Description: Draw with code + An app for learning programming using a basic CoffeeScript drawing API + +Package: kano-draw-i18n-orig +Architecture: all +Description: Data for working on translations of kano-draw +Multi-Arch: foreign diff --git a/debian/copyright b/debian/copyright index 54d8baa5d..f37e92d73 100755 --- a/debian/copyright +++ b/debian/copyright @@ -4,4 +4,4 @@ Source: https://github.com/KanoComputing/kano-draw Files: * Copyright: 2014,2015 Kano Computing Ltd. -License: GPL-2+ +License: GPL-2+ On Debian systems the complete text of the GPL is in /usr/share/common-licenses/GPL-2 diff --git a/debian/kano-draw-i18n-orig.install b/debian/kano-draw-i18n-orig.install new file mode 100644 index 000000000..dce2cf02b --- /dev/null +++ b/debian/kano-draw-i18n-orig.install @@ -0,0 +1,2 @@ +locales/messages.pot /mnt/translations/translations/kano-draw/ +locales/messages-docs.pot /mnt/translations/translations/kano-draw/ diff --git a/debian/kano-draw.install b/debian/kano-draw.install index 3fca6ac3b..9261a9a22 100644 --- a/debian/kano-draw.install +++ b/debian/kano-draw.install @@ -5,7 +5,10 @@ www/* /usr/share/kano-draw kdesktop/Draw.lnk usr/share/kano-desktop/kdesk/kdesktop/ kdesktop/kano-draw.xml /usr/share/mime/packages/ icon/kano-draw.png usr/share/icons/Kano/88x88/apps +icon/locale/es_AR/*.app /usr/share/applications/locale/es_AR/ icon/application-x-kano-draw.png usr/share/icons/Kano/88x88/mimetypes icon/kano-draw-hover.png usr/share/icons/Kano/88x88/apps icon/kano-draw.app usr/share/applications media /usr/share/kano-draw/ + +kano-content-blacklist/kano-draw.json /usr/share/kano-content/blacklists diff --git a/debian/kano-draw.lintian-overrides b/debian/kano-draw.lintian-overrides new file mode 100644 index 000000000..6804a5cdc --- /dev/null +++ b/debian/kano-draw.lintian-overrides @@ -0,0 +1,2 @@ +kano-draw binary: privacy-breach-facebook +kano-draw binary: privacy-breach-twitter diff --git a/debian/rules b/debian/rules index ba1fdb3a2..93d8ad88b 100755 --- a/debian/rules +++ b/debian/rules @@ -5,17 +5,15 @@ override_dh_auto_build: # NodeJS and npm - mkdir -p nodejs - cd ./nodejs - NODE_DIR=`pwd` - curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 - ./configure --prefix=. - make - ln -sf ./deps/npm/bin/npm-cli.js ./npm - cd .. - # See about actually doing the install - ls ./nodejs - PATH=$(NODE_DIR):$(PATH) npm install - PATH=$(NODE_DIR):$(PATH) NODE_ENV=production OFFLINE=true npm run build + cd po && ./lang-extract-doc-strings + cd po && ./lang-extract-strings + # Add NPM repository and install Node + curl --silent --location https://deb.nodesource.com/setup_6.x | bash - + apt-get install --yes nodejs + # Actually build + npm install + ./node_modules/bower/bin/bower --allow-root install + NODE_ENV=production OFFLINE=true npm run build + dh_lintian override_dh_auto_install override_dh_auto_test: diff --git a/dump.rdb b/dump.rdb new file mode 100644 index 000000000..56af04ea1 --- /dev/null +++ b/dump.rdb @@ -0,0 +1 @@ +REDIS0006�ܳC�Z��V \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index f525795f7..1ab9ecba7 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,3 +1,4 @@ +"use strict"; var gulp = require('gulp'), jade = require('gulp-jade'), browserify = require('gulp-browserify'), @@ -8,97 +9,277 @@ var gulp = require('gulp'), jadeHelpers = require('./utils/jadeHelpers'), _ = require('lodash'), color = require('cli-color'), + uglify = require('gulp-uglify'), + ngAnnotate = require('gulp-ng-annotate'), partialify = require('partialify/custom'), griddy = require('griddy'), - nib = require('nib'); - -var server = lr(), + nib = require('nib'), + fs = require('fs'), + i18n = require('gulp-html-i18n'), + del = require('del'), + server = lr(), env = process.env.NODE_ENV || 'development', production = env === 'production', segmentioId = process.env.SEGMENTIO_ID || null, facebookAppId = process.env.FACEBOOK_APP_ID || null, - mailServer = process.env.MAILSERVER || null, + unknown_user = process.env.UNKNOWN_USER || null, api_url = process.env.API_URL || null, world_url = process.env.WORLD_URL || null, offline = process.env.OFFLINE === 'true', - testmode = process.env.TEST_MODE === 'true'; - -var paths = { - views : { watch: [ 'views/**/*.jade', 'content/**/*' ], src: 'views/**/*.jade', out: 'www' }, - browserify : { watch: [ 'lib/**/*', 'content/**/*', 'lib/**/**/*' ] , src: 'lib/index.js', out: 'www/js' }, - styles : { watch: 'styles/**/*.styl', src: 'styles/main.styl', out: 'www/css' } -}; + testmode = process.env.TEST_MODE === 'true', + chDescriptorsPath = 'www/assets/challenges/descriptors/', + libPath = 'lib/challenges/', + locales = ["", "ja", "es"], -function beep() { - console.log('\007'); -} + paths = { + views : { watch: ['views/**/*.jade', 'content/**/*'], src: 'views/**/*.jade', out: 'www' }, + viewsi18n : { watch: 'www/**/*.html', src: 'www/**/*.html', out: 'www/locales' }, + browserify : { watch: ['lib/**/*', 'content/**/*', 'lib/**/**/*'], src: 'lib/index.js', out: 'www/js' }, + styles : { watch: 'styles/**/*.styl', src: 'styles/main.styl', out: 'www/css' }, + content : { watch: 'lib/challenges/**/*' } + }; function handleError(error) { - beep(error); console.log(color.bold('[ error caught ]:\n') + color.red(error)); } gulp.task('browserify', function () { - gulp.src(paths.browserify.src, { read: false }) - .pipe(browserify({ - transform : [ - partialify.alsoAllow('md'), - partialify.alsoAllow('coffee') - ], - })) - .on('error', handleError) - .pipe(rename('index.js')) - .pipe(gulp.dest(paths.browserify.out)) - .pipe(livereload(server)); + return gulp.src(paths.browserify.src, { read: false }) + .pipe(browserify({ + transform : [ + partialify.alsoAllow('md'), + partialify.alsoAllow('coffee') + ] + })) + .on('error', handleError) + .pipe(rename('index.js')) + .pipe(gulp.dest(paths.browserify.out)) + .pipe(livereload(server)); }); gulp.task('styles', function () { - gulp.src(paths.styles.src) - .pipe(stylus({ - pretty : !production, - use : [ griddy(), nib() ] - })) - .on('error', handleError) - .pipe(gulp.dest(paths.styles.out)) - .pipe(livereload(server)); + return gulp.src(paths.styles.src) + .pipe(stylus({ + pretty : !production, + use : [griddy(), nib()] + })) + .on('error', handleError) + .pipe(gulp.dest(paths.styles.out)) + .pipe(livereload(server)); }); gulp.task('views', function () { - gulp.src(paths.views.src) - .pipe(jade({ - pretty : !production, - locals : _.extend({ - env : env, - production : production, - offline : offline, - segmentioId : segmentioId, - facebookAppId : facebookAppId, - mailServer : mailServer, - api_url : api_url, - world_url : world_url, - testmode : testmode - }, jadeHelpers) - })) - .on('error', handleError) - .pipe(gulp.dest(paths.views.out)) - .pipe(livereload(server)); + return gulp.src(paths.views.src) + .pipe(jade({ + pretty : !production, + locals : _.extend({ + env : env, + production : production, + offline : offline, + segmentioId : segmentioId, + facebookAppId : facebookAppId, + api_url : api_url, + world_url : world_url, + testmode : testmode, + challenges_url : "/assets/challenges/descriptors", + unknown_user : unknown_user + }, jadeHelpers) + })) + .on('error', handleError) + .pipe(gulp.dest(paths.views.out)) + .pipe(livereload(server)); +}); + +gulp.task('clean-i18n', function (next) { + del([paths.viewsi18n.out], next); +}); + +gulp.task('views-i18n', ['clean-i18n', 'views'], function () { + return gulp.src(paths.viewsi18n.src) + .pipe(i18n({ langDir: './locales', + createLangDirs: true })) + .on('error', handleError) + .pipe(gulp.dest(paths.viewsi18n.out)) + .pipe(livereload(server)); +}); + +/** + * This function returns a function that modifies the challenge + * index to contain basic information about the single challenges, + * so that we can show a calendar without loading all the single + * challenges. + * The returned function will be called for each locale. + */ +function apifyChallengeFn(next) { + return function (locale) { + + var index, + worldsNum, + //fields that are copied from ./index.json to /world//index.json + copyWorldFields = [ + 'id', + 'name', + 'description', + 'world_path', + 'cover', + 'css_class', + 'visibility', + 'dependency', + 'type', + 'share_strategy', + 'sales_popup_after', + 'certificate_after', + 'display_menu', + 'hero_header', + 'updateForm', + 'socialText' + ], + countNext = 0, + formattedIndex, + localePath = locale ? 'locales/' + locale + '/' : ''; + function localNext() { + if (++countNext === worldsNum + 1) { + next(); + } + } + //work with them + index = require('./' + chDescriptorsPath + localePath + 'index.json'); + worldsNum = index.worlds.length; + + index.worlds.forEach(function (world) { + var worldPath = './' + chDescriptorsPath + localePath + world.world_path, + libWorldPath = './' + libPath + localePath + world.world_path, + worldObj = {}, + challenges = [], + formattedJSON; + + worldObj = JSON.parse(JSON.stringify(require(libWorldPath + '/index.json'))); + + copyWorldFields.forEach(function (field) { + if (world[field]) { + worldObj[field] = world[field]; + } + }); + + //load all the challenges in an array + worldObj.challenges.forEach(function (ch, idx, arr) { + var chFileName = worldPath + ch.substr(1, ch.length - 1), + challenge = require(chFileName), + index = idx + 1, + hasNext = index !== (arr.length), + ch_obj = { + id: challenge.id, + title: challenge.title, + short_title: challenge.short_title, + cover: challenge.cover, + index: index, + hasNext: hasNext, + start_date: challenge.start_date + }; + challenge.index = index ; + challenge.hasNext = hasNext; + + fs.writeFile(chFileName + ".json", JSON.stringify(challenge, null, 4), function (err) { + if (err) { + throw err; + } + }); + challenges.push(ch_obj); + }); + + + worldObj.challenges = challenges; + + world.challenges_num = challenges.length; + + formattedJSON = JSON.stringify(worldObj, null, 4); + //write the challenges with headers + fs.writeFile(worldPath + '/index.json', formattedJSON, function (err) { + if (err) { + throw err; + } else { + localNext(); + } + }); + }); + //copy back the index + formattedIndex = JSON.stringify(index, null, 4); + fs.writeFile(chDescriptorsPath + localePath + 'index.json', formattedIndex, function (err) { + if (err) { + throw err; + } else { + localNext(); + } + }); + } +} + +gulp.task('apify-challenges', ['copy-challenges'], function (next) { + var countNext = 0; + + function localNext() { + if (++countNext === locales.length) { + next(); + } + } + + locales.forEach(apifyChallengeFn(localNext)); +}); + +gulp.task('copy-challenges', function (next) { + var counter = 0, + stream1, + stream2, + stream3; + function localNext() { + if (++counter === 3) { + next(); + } + } + //copy the files + stream1 = gulp.src('lib/challenges/worlds/**/*.json') + .pipe(gulp.dest(chDescriptorsPath + "/worlds")); + stream2 = gulp.src('lib/challenges/index.json') + .pipe(gulp.dest(chDescriptorsPath)); + stream3 = gulp.src('lib/challenges/locales/**/*.json') + .pipe(gulp.dest(chDescriptorsPath + "/locales")); + stream1.on('end', localNext); + stream2.on('end', localNext); + stream3.on('end', localNext); + +}); + +gulp.task('copy-vendor', function () { + return gulp.src('bower_components/**') + .pipe(gulp.dest('www/components')); +}); + +gulp.task('compress', function () { + return gulp.src('www/js/index.js', { base: 'www' }) + .pipe(ngAnnotate()) + .pipe(uglify()) + .pipe(gulp.dest('www')); }); gulp.task('livereload', function (next) { - if (server) { livereload(server); } + if (server) { + livereload(server); + } next(); }); gulp.task('listen', function (next) { server.listen(35729, next); }); +gulp.task('prepare-challenges', ['copy-challenges', 'apify-challenges']); -gulp.task('build', [ 'browserify', 'styles', 'views' ]); +gulp.task('build', ['browserify', 'copy-vendor', 'styles', 'views-i18n', 'prepare-challenges']); -gulp.task('watch', [ 'build', 'listen' ], function () { - gulp.watch(paths.browserify.watch, [ 'browserify' ]); - gulp.watch(paths.styles.watch, [ 'styles' ]); - gulp.watch(paths.views.watch, [ 'views' ]); +gulp.task('watch', ['build', 'listen'], function () { + gulp.watch(paths.browserify.watch, ['browserify']); + gulp.watch(paths.styles.watch, ['styles']); + gulp.watch(paths.content.watch, ['prepare-challenges']); + gulp.watch(paths.views.watch, ['views']); }); -gulp.task('default', [ 'build' ]); +gulp.task('default', ['build']); diff --git a/icon/kano-draw.app b/icon/kano-draw.app index 98d98620a..128a8f5f1 100644 --- a/icon/kano-draw.app +++ b/icon/kano-draw.app @@ -5,7 +5,7 @@ "slug": "kano-draw", "icon": "kano-draw", - "colour": "#7BAA64", + "colour": "#51555C", "categories": ["code"], "mime_type": "application/x-kano-draw", @@ -14,5 +14,6 @@ "dependencies": ["kano-draw"], "launch_command": "kano-draw", "overrides": [], - "desktop": false + "desktop": false, + "priority": 950 } diff --git a/icon/kano-draw.png b/icon/kano-draw.png index 7764b27e9..a667679f7 100644 Binary files a/icon/kano-draw.png and b/icon/kano-draw.png differ diff --git a/icon/locale/es/kano-draw.app b/icon/locale/es/kano-draw.app new file mode 100644 index 000000000..e128b6dff --- /dev/null +++ b/icon/locale/es/kano-draw.app @@ -0,0 +1,20 @@ +{ + "launch_command": "kano-draw", + "description": "Observa c\u00f3mo aparecen formas a medida que escribes c\u00f3digo. \u00c9ste es un primer prototipo de una aplicaci\u00f3n de dibujo bastante inusual. Te permite dibujar sobre lienzo con JavaScript. Puedes combinar l\u00edneas b\u00e1sicas, cuadros y c\u00edrculos de varios colores y tama\u00f1os para crear tus propias obras maestras digitales.", + "title": "Make Art", + "tagline": "Dibujar con c\u00f3digo", + "colour": "#51555C", + "desktop": false, + "priority": 950, + "dependencies": [ + "kano-draw" + ], + "mime_type": "application/x-kano-draw", + "overrides": [], + "packages": [], + "slug": "kano-draw", + "categories": [ + "code" + ], + "icon": "kano-draw" +} diff --git a/kano-content-blacklist/kano-draw.json b/kano-content-blacklist/kano-draw.json new file mode 100644 index 000000000..d1f400a6d --- /dev/null +++ b/kano-content-blacklist/kano-draw.json @@ -0,0 +1,5 @@ +{ + "do_not_download": [ + "56619f9dac92811100b98e4b" + ] +} diff --git a/kano_draw/draw.py b/kano_draw/draw.py index eeeb84bb9..14e53b48e 100644 --- a/kano_draw/draw.py +++ b/kano_draw/draw.py @@ -1,13 +1,23 @@ from kano.webapp import WebApp + class Draw(WebApp): - def __init__(self, load_path=''): + def __init__(self, load_path='', make=False, play=False): super(Draw, self).__init__() - self._index = "http://localhost:8000" - if load_path: - self._index = '{}/localLoad/{}'.format(self._index, - load_path.strip('/')) + base_url = 'http://localhost:8000/{path}' + + if make: + url = base_url.format(path='challenges') + elif play: + url = base_url.format(path='playground') + elif load_path: + path = 'localLoad/{}'.format(load_path.strip('/')) + url = base_url.format(path=path) + else: + url = base_url.format(path='') + + self._index = url self._title = "Art" self._app_icon = '/usr/share/icons/Kano/88x88/apps/kano-draw.png' @@ -17,3 +27,9 @@ def __init__(self, load_path=''): # Enable developer extras to allow error reporting to work self._inspector = True + + +# We require this function for starting the UI as a subprocess +def start_draw(load_path='', make=False, play=False): + draw_instance = Draw(load_path=load_path, make=make, play=play) + draw_instance.run() diff --git a/kano_draw/server.py b/kano_draw/server.py index f2caef4ef..25d3c2a15 100644 --- a/kano_draw/server.py +++ b/kano_draw/server.py @@ -1,18 +1,24 @@ -from flask import Flask, Response, request, send_from_directory +# server.py +# +# Copyright (C) 2014-2015, 2017 Kano Computing Ltd. +# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPL v2 +# + import json import os import time import logging -from kano.utils import ensure_dir -from kano_profile.badges import save_app_state_variable_with_dialog, \ - calculate_xp +from flask import Flask, Response, request, send_from_directory + from kano_profile.apps import load_app_state_variable -from kano_profile.badges import increment_app_state_variable_with_dialog -from kano_world.functions import login_using_token -from kano_world.share import upload_share +from kano_profile.badges import increment_app_state_variable_with_dialog, \ + save_app_state_variable_with_dialog, calculate_xp +from kano_world.share_helpers import login_and_share from kano.network import is_internet -from kano.utils import play_sound +from kano.utils.audio import play_sound +from kano.utils.file_operations import ensure_dir +from kano.logging import logger APP_NAME = 'kano-draw' @@ -20,20 +26,25 @@ CHALLENGE_DIR = os.path.expanduser('~/Draw-content') WALLPAPER_DIR = os.path.join(CHALLENGE_DIR, 'wallpapers') +STATIC_ASSET_DIR = os.path.join(os.path.expanduser('~'), + '.make-art-assets') +# Create the directories if necessary ensure_dir(CHALLENGE_DIR) ensure_dir(WALLPAPER_DIR) - +ensure_dir(STATIC_ASSET_DIR) def _get_static_dir(): - bin_path = os.path.abspath(os.path.dirname(__file__)) + ''' + Returns directory where http server content is located + ''' + return '/usr/share/kano-draw' - if bin_path.startswith('/usr'): - return '/usr/share/kano-draw' - else: - return os.path.abspath(os.path.join(bin_path, '../www')) def _get_image_from_str(img_str): + ''' + Returns a base64 encoded data of the img_str image file. + ''' import base64 image_b64 = img_str.split(',')[-1] @@ -41,7 +52,11 @@ def _get_image_from_str(img_str): return image_data + def _save(data): + ''' + Save the current creation in the user home directory + ''' filename = data['filename'] try: desc = data['description'] @@ -71,14 +86,21 @@ def _save(data): return (filename, filepath) +# Start the http server now + server = Flask(__name__, static_folder=_get_static_dir(), static_url_path='/') server_logger = logging.getLogger('werkzeug') server_logger.setLevel(logging.ERROR) +# Server backend methods + @server.route('/') -# Redirect a localLoad back to index for routing in Angular +# Return the homepage for pages routed through Angular @server.route('/localLoad/') +@server.route('/challenges') +@server.route('/challenges/') +@server.route('/playground') def root(path=None): return server.send_static_file('index.html') @@ -97,11 +119,15 @@ def save_challenge(filename): return '' + @server.route("/challenge/local/", methods=['GET']) def load_challenge(path): directory, filename = os.path.split(path) - return send_from_directory('/{}'.format(directory), filename, as_attachment=True) + return send_from_directory('/{}'.format(directory), + filename, + as_attachment=True) + @server.route("/challenge/local/wallpaper/", methods=['POST']) def save_wallpaper(filename): @@ -113,8 +139,10 @@ def save_wallpaper(filename): '16-9': _get_image_from_str(data['image_16_9']) } - img_path = os.path.join(WALLPAPER_DIR, - '{filename}-{{ratio}}.png'.format(filename=filename)) + img_path = os.path.join( + WALLPAPER_DIR, + '{filename}-{{ratio}}.png'.format(filename=filename) + ) for ratio, img_data in imgs.iteritems(): with open(img_path.format(ratio=ratio), 'wb') as f: @@ -122,6 +150,7 @@ def save_wallpaper(filename): return '' + @server.route("/challenge/web/", methods=['POST']) def share(filename): # TODO: Move this connection handling into a function in Kano Utils @@ -133,16 +162,9 @@ def share(filename): if not is_internet(): return 'You have no internet' - success, _ = login_using_token() - if not success: - os.system('kano-login 3') - success, _ = login_using_token() - if not success: - return 'Cannot login' - data = json.loads(request.data) filename, filepath = _save(data) - success, msg = upload_share(filepath, filename, APP_NAME) + success, msg = login_and_share(filepath, filename, APP_NAME) if not success: return msg @@ -151,6 +173,7 @@ def share(filename): return '' + @server.route('/challenge/web', methods=['GET']) def load_share(): # TODO: Import kano-share python module and use return code instead @@ -171,40 +194,95 @@ def load_share(): return send_from_directory(directory, filename, as_attachment=True) -@server.route('/progress/', methods=['POST']) -def _save_level(level): +@server.route('/progress//', methods=['POST']) +def _save_level(world, challengeNo): + old_xp = calculate_xp() + needsToSave = False - value = int(level) - 1 + groups = load_app_state_variable(APP_NAME, 'groups') - save_app_state_variable_with_dialog(APP_NAME, 'level', value) - new_xp = calculate_xp() + # We might need to load the worlds file here so that we're sure that + # no one is abusing the API from the OS + if groups is None: + groups = {} + if world in groups: + if groups[world]['challengeNo'] < challengeNo: + groups[world]['challengeNo'] = challengeNo + needsToSave = True + + else: + groups[world] = {'challengeNo': challengeNo} + needsToSave = True + + if needsToSave: + save_app_state_variable_with_dialog(APP_NAME, 'groups', groups) + + new_xp = calculate_xp() return str(new_xp - old_xp) + @server.route('/progress', methods=['GET']) def _load_level(): - value = load_app_state_variable(APP_NAME, 'level') - # If every challenge is unlocked, value is 999 + value = { + 'groups': load_app_state_variable(APP_NAME, 'groups'), + 'challenge': load_app_state_variable(APP_NAME, 'challenge') + } + # Previously we used to save the progress as "level" + level = load_app_state_variable(APP_NAME, 'level') + if value['groups'] is None: + value['groups'] = {} + + # Replace the Challege var here. + if level > value['challenge']: + value['challenge'] = level + + value = json.dumps(value) + + return Response(value, content_type='application/json') + + +@server.route('/lines-of-code', methods=['POST']) +def _increment_lines_of_code(): + data = json.loads(request.data) + new_lines = data['newLines'] + + increment_app_state_variable_with_dialog( + APP_NAME, 'lines_of_code', new_lines + ) + + return '' - if value is not None: - return str(value + 1) - else: - _save_level(1) - return Response('1') @server.route('/shutdown', methods=['POST']) def _shutdown(): + ''' + Obtain the entry point to stop the http server. + We do not kill the parent launcher proces (kano-draw) + because he is keeping an eye on both the http and ui processes. + ''' import signal - # Send signal to parent to initiate shutdown - os.kill(PARENT_PID, signal.SIGINT) + try: + server_shutdown = request.environ.get('werkzeug.server.shutdown') + if server_shutdown is not None: + logger.info('Will attempt to shutdown the server') + server_shutdown() + except Exception as exc: + logger.error( + 'Error while trying to shut down the server: [{}]'.format(exc) + ) + + return '' + @server.route('/browsemore', methods=['POST']) def _browsemore(): - import subprocess + from kano import run_bg + + run_bg("chromium http://world.kano.me/shares/kano-draw") - p = subprocess.Popen(["chromium", "http://world.kano.me/shares/kano-draw"]) @server.errorhandler(404) def page_not_found(err): @@ -212,14 +290,15 @@ def page_not_found(err): return err_msg, 404 + @server.route('/play_sound/', methods=['POST']) def play_sounds(filename): - print os.path.realpath(os.path.join(_get_static_dir(), filename)) sound_file = os.path.realpath(os.path.join(_get_static_dir(), filename)) play_sound(sound_file) return '' + def start(parent_pid=None): """ The server process will receive any requests to shutdown but @@ -230,5 +309,10 @@ def start(parent_pid=None): PARENT_PID = parent_pid # Run the server - server.run(port=8000) + try: + server.run(port=8000) + except EnvironmentError as exc: + if exc.errno == 98: + logger.error('Another server is running bound at our port') + _shutdown() time.sleep(2) diff --git a/kano_draw/video.py b/kano_draw/video.py index 2fe03fd4a..8a5ee0a6c 100644 --- a/kano_draw/video.py +++ b/kano_draw/video.py @@ -13,15 +13,25 @@ def play_intro(): - level = load_app_state_variable(APP_NAME, 'level') - # Skip the intro in case the user progressed past level 1 - if level > 0: - return + # Skip the intro in case the user progressed level 1 + has_progressed = False - try: - from kano_video.logic.player import play_video - # stop the splash screen before the video starts - os.system('/usr/bin/kano-stop-splash') - play_video(localfile=VIDEO_PATH) - except ImportError: - pass + groups = load_app_state_variable(APP_NAME, 'groups') + if groups is not None and isinstance(groups, dict): + for group in groups.itervalues(): + if 'challengeNo' in group and group['challengeNo'] > 0: + has_progressed = True + break + else: + level = load_app_state_variable(APP_NAME, 'level') + if level > 0: + has_progressed = True + + if not has_progressed: + try: + from kano_video.logic.player import play_video + # stop the splash screen before the video starts + os.system('/usr/bin/kano-stop-splash') + play_video(localfile=VIDEO_PATH) + except ImportError: + pass diff --git a/lib/api.js b/lib/api.js index bd6e79759..077d735c2 100644 --- a/lib/api.js +++ b/lib/api.js @@ -1,14 +1,16 @@ +"use strict"; /* * API module * * Exports appropriate core functionality API depending on OFFLINE env variable */ -var offline = require('./api/offline/index'); module.exports = function (config) { - var online = require('./api/online/index')(config); - var api = config.OFFLINE ? offline : online; - api.online = require('./api/online/world-api')(config); - return api; -}; \ No newline at end of file + var online = require('./api/online/index')(config), + offline = require('./api/offline/index')(config), + api = config.OFFLINE ? offline : online; + + api.online = require('./api/online/world-api')(config); + return api; +}; diff --git a/lib/api/offline/challenge-io.js b/lib/api/offline/challenge-io.js index 0c0d5d9b7..3cb314db0 100644 --- a/lib/api/offline/challenge-io.js +++ b/lib/api/offline/challenge-io.js @@ -1,8 +1,9 @@ +"use strict"; var api = require('./local-api'), notify = require('../notify'); module.exports = { - save: function(filename, code, desc, image) { + save: function (filename, code, desc, image) { api.challenge.save({ filename : filename, code : code, @@ -11,22 +12,34 @@ module.exports = { }) .then(notify.success, notify.failure); }, - share: function(filename, code, desc, image) { + share: function (filename, code, desc, image, world, challengeId, cb) { api.challenge.share({ filename : filename, code : code, description : desc, - image : image + image : image, + campaignRef : { + code : world, + challengeId: challengeId + } }) - .then(notify.success, notify.failure); + .then(function (res) { + if (res.body === '') { + cb(res); + notify.success(); + } else if (res.body && !res.body.item) { + cb(res); + notify.failure(res); + } + }, notify.failure); }, - load: function(cb) { + load: function (cb) { api.challenge.load() .then(function (res) { cb(res.body); }, notify.failure); }, - localLoad: function(path, cb) { + localLoad: function (path, cb) { api.challenge.localLoad({ path : path }) @@ -34,16 +47,16 @@ module.exports = { cb(res.body); }, notify.failure); }, - saveWallpaper: function(filename, image_1024, image_4_3, image_16_9) { + saveWallpaper: function (filename, image_1024, image_4_3, image_16_9) { api.challenge.saveWallpaper({ filename : filename, image_1024 : image_1024, image_4_3 : image_4_3, - image_16_9 : image_16_9, + image_16_9 : image_16_9 }) .then(notify.success, notify.failure); }, - browseMore: function() { + browseMore: function () { api.challenge.browseMore(); } }; diff --git a/lib/api/offline/index.js b/lib/api/offline/index.js index 799f7e563..4182c274f 100644 --- a/lib/api/offline/index.js +++ b/lib/api/offline/index.js @@ -1,7 +1,12 @@ -module.exports = { - auth : require('./auth'), - progress : require('./progress'), - server : require('./server'), - challengeIO : require('./challenge-io'), - sound : require('./sound') -}; \ No newline at end of file +"use strict"; +module.exports = function (cfg) { + + return { + auth : require('./auth'), + progress : require('./progress')(cfg), + server : require('./server'), + challengeIO : require('./challenge-io'), + sound : require('./sound'), + profile : require('./userprofile') + }; +}; diff --git a/lib/api/offline/local-api.js b/lib/api/offline/local-api.js index 21e3613f7..e96887659 100644 --- a/lib/api/offline/local-api.js +++ b/lib/api/offline/local-api.js @@ -1,17 +1,17 @@ -var Service = require('api-service'); - -var apiService = new Service('http://localhost:8000'); +"use strict"; +var Service = require('api-service'), + apiService = new Service('http://localhost:8000'); apiService.add('challenge.save', { method : 'post', route : '/challenge/local/:filename', - params : [ 'filename', 'description', 'code', 'image' ] + params : ['filename', 'description', 'code', 'image'] }); apiService.add('challenge.saveWallpaper', { method : 'post', route : '/challenge/local/wallpaper/:filename', - params : [ 'filename', 'image_1024', 'image_4_3', 'image_16_9' ] + params : ['filename', 'image_1024', 'image_4_3', 'image_16_9'] }); apiService.add('challenge.load', { @@ -22,7 +22,7 @@ apiService.add('challenge.load', { apiService.add('challenge.share', { method : 'post', route : '/challenge/web/:filename', - params : [ 'filename', 'description', 'code', 'image' ] + params : ['filename', 'description', 'code', 'image'] }); apiService.add('challenge.localLoad', { @@ -38,7 +38,13 @@ apiService.add('progress.load', { apiService.add('progress.save', { method : 'post', - route : '/progress/:progress' + route : '/progress/:world/:challenge' +}); + +apiService.add('linesOfCode.increment', { + method : 'post', + route : '/lines-of-code', + params : ['newLines'] }); apiService.add('server.shutdown', { @@ -49,7 +55,7 @@ apiService.add('server.shutdown', { apiService.add('sound.play', { method : 'post', route : '/play_sound/:filename', - params : [ 'filename'] + params : ['filename'] }); apiService.add('challenge.browseMore', { diff --git a/lib/api/offline/progress.js b/lib/api/offline/progress.js index c8a7a59f9..5d5c0a0ef 100644 --- a/lib/api/offline/progress.js +++ b/lib/api/offline/progress.js @@ -1,25 +1,74 @@ +"use strict"; var api = require('./local-api'), - notify = require('../notify'), - onlineProgress = require('../online/progress'); - -function save(progress, callback) { - api.progress.save({ progress: progress }) - .then(function(res) { - var xpGain = res.body; - - callback(xpGain); - }, notify.failure); -} - -function load(callback) { - api.progress.load() - .then(function (res) { - callback(res.body); - }, notify.failure); -} - -module.exports = { - save : save, - load : load, - trackLinesOfCode : onlineProgress.trackLinesOfCode + notify = require('../notify'); + + +module.exports = function (cfg) { + + function save(challengeNo, groupName, callback) { + var data = { groups: {} }, + lsGroups = (localStorage.groups) ? JSON.parse(localStorage.groups) : {}, + opts; + + data.groups[groupName] = {}; + data.groups[groupName].challengeNo = challengeNo; + lsGroups[groupName] = data.groups[groupName]; + localStorage.groups = JSON.stringify(lsGroups); + opts = { + world: groupName, + challenge: challengeNo + }; + api.progress.save(opts).then(function (res) { + var xpGain = res.body; + callback(xpGain); + }, notify.failure); + } + + function load(callback) { + var challenge = 0, + groupsData = localStorage.groups ? JSON.parse(localStorage.groups) : {}; + + if (localStorage.challenge) { + //this is for backwards compatibility + challenge = parseInt(localStorage.challenge, 10) || 0; + groupsData.basic = groupsData.basic || {}; + groupsData.basic.challengeNo = challenge; + } + + api.progress.load().then(function (res) { + var data = res.body; + + if (data && data.challenge && data.challenge > challenge) { + + //the old version of "progress" refers to the "basic challenges" + challenge = data.challenge; + data.groups.basic = data.groups.basic || {challengeNo: 1}; + if (challenge > data.groups.basic.challengeNo) { + data.groups.basic.challengeNo = challenge; + } + + } + if (!data.groups) { + //if we still have no joy + data.groups = groupsData; + } + callback(data.groups); + }, function (err) { + if (groupsData.basic) { + callback(groupsData); + } else { + notify.failure(err); + } + }); + } + + function trackLinesOfCode(increment) { + api.linesOfCode.increment({newLines: increment}); + } + + return { + save : save, + load : load, + trackLinesOfCode : trackLinesOfCode + }; }; diff --git a/lib/api/offline/server.js b/lib/api/offline/server.js index 93a0332ca..2dfbd5613 100644 --- a/lib/api/offline/server.js +++ b/lib/api/offline/server.js @@ -3,7 +3,7 @@ var api = require('./local-api'), var shutdown = function() { api.server.shutdown({}) - .then(notify.success, notify.failure); + .then(function(){}, notify.failure); }; module.exports = { diff --git a/lib/api/offline/userprofile.js b/lib/api/offline/userprofile.js new file mode 100644 index 000000000..8172ac87a --- /dev/null +++ b/lib/api/offline/userprofile.js @@ -0,0 +1,9 @@ +"use strict"; + +function getProfile() { + return null; +} + +module.exports = { + getProfile: getProfile +}; diff --git a/lib/api/online/auth.js b/lib/api/online/auth.js index 5d89d3bba..267458bc4 100644 --- a/lib/api/online/auth.js +++ b/lib/api/online/auth.js @@ -1,5 +1,4 @@ -var sdk, - analytics = require('../../core/analytics'); +var sdk; /* * Initialise Kano World SDK with auth @@ -8,22 +7,28 @@ var sdk, * @return void */ -function auth (config) { +function auth(config) { sdk = require('kano-world-sdk')(config); return { init : function (callback) { - sdk.init(function(err, user) { - if (!err) { - analytics.identify(user); - } - - callback(err, user); - }); + sdk.registerForms(); + sdk.auth.initSession(callback); + }, + login : function (token, callback) { + sdk.auth.setToken(token); + sdk.auth.initSession(callback); + }, + saveLogin : function (token, callback) { + sdk.auth.setToken(token); + if (callback) { + callback(); + } }, - login : sdk.auth.login, - logout: sdk.auth.logout + logout: function (reload) { + sdk.auth.logout(reload); + } }; } -module.exports = auth; \ No newline at end of file +module.exports = auth; diff --git a/lib/api/online/challenge-io.js b/lib/api/online/challenge-io.js index 154fe4ffc..0d3e47e93 100644 --- a/lib/api/online/challenge-io.js +++ b/lib/api/online/challenge-io.js @@ -6,7 +6,7 @@ module.exports = function (config) { api = require('./world-api')(config); return { - share: function(title, code, description, image, challengeNo) { + share: function(title, code, description, image, world, challengeId, callback) { var cover = fileUtil.dataURItoBlob(image), attachment = new Blob([ code ], { type: 'text/plain' }); @@ -20,18 +20,18 @@ module.exports = function (config) { files : { cover : cover, attachment : attachment + }, + campaignRef : { + code : world, + challengeId : challengeId } }; - if (challengeNo) { - - data.campaignRef = {}; - data.campaignRef.code = 'summerCamp'; - data.campaignRef.challengeNo = parseInt(challengeNo, 10); - } - api.share.post(data) - .then(function () { + .then(function (res) { + if (typeof callback === 'function') { + callback(res); + } notify.success(); return true; }, function (res) { diff --git a/lib/api/online/index.js b/lib/api/online/index.js index 015dba060..41f5a8dff 100644 --- a/lib/api/online/index.js +++ b/lib/api/online/index.js @@ -1,10 +1,13 @@ +"use strict"; module.exports = function (config) { - return { - auth : require('./auth')(config), - progress : require('./progress')(config), - server : {}, - challengeIO : require('./challenge-io')(config), - summercamp : require('./summer-camp.js')(config), - profile : require('./userprofile.js')(config) - }; -}; \ No newline at end of file + return { + auth : require('./auth')(config), + progress : require('./progress')(config), + server : {}, + challengeIO : require('./challenge-io')(config), + summercamp : require('./summer-camp')(config), + profile : require('./userprofile')(config), + questions : require('./questions')(config), + mailer : require('./mailer')(config) + }; +}; diff --git a/lib/api/online/mailer.js b/lib/api/online/mailer.js new file mode 100644 index 000000000..ef33462dc --- /dev/null +++ b/lib/api/online/mailer.js @@ -0,0 +1,14 @@ +"use strict"; + +function mailer(config) { + var api = require('kano-world-sdk')(config).api; + + api.add('mailer', { + method : 'post', + route : '/mail' + }); + + return api.mailer; +} + +module.exports = mailer; diff --git a/lib/api/online/progress.js b/lib/api/online/progress.js index 27523319d..0916501ca 100644 --- a/lib/api/online/progress.js +++ b/lib/api/online/progress.js @@ -1,24 +1,25 @@ +"use strict"; var sdk; -function progress (config) { +function progress(config) { sdk = require('kano-world-sdk')(config); return { save: function (challengeNo, groupName, callback) { - var data = { groups: {} }; + var data = { groups: {} }, + lsGroups = (localStorage.groups) ? JSON.parse(localStorage.groups) : {}; - if (groupName) { - data.groups[groupName] = {}; - data.groups[groupName].challengeNo = challengeNo; - localStorage.groups = JSON.stringify(data.groups); - } - else { - data.challenge = challengeNo; - localStorage.challenge = challengeNo; + if (!groupName) { + throw "Hey, we're aren't still in 2014"; } + data.groups[groupName] = {}; + data.groups[groupName].challengeNo = challengeNo; + lsGroups[groupName] = data.groups[groupName]; + localStorage.groups = JSON.stringify(lsGroups); if (sdk.auth.getUser()) { sdk.appStorage.set('kano-draw', data, function () { + localStorage.challenge = undefined; callback(0); }); } else { @@ -27,29 +28,41 @@ function progress (config) { }, load: function (callback) { - var challenge = 0; + var challenge = 0, + groupsData = localStorage.groups ? JSON.parse(localStorage.groups) : {}; if (localStorage.challenge) { - challenge = parseInt(localStorage.challenge, 10); + //this is for backwards compatibility + challenge = parseInt(localStorage.challenge, 10) || 0; + groupsData.basic = groupsData.basic || {}; + groupsData.basic.challengeNo = challenge; } if (sdk.auth.getUser()) { sdk.appStorage.get('kano-draw', function (err, data) { if (data && data.challenge && data.challenge > challenge) { + //the old version of "progress" refers to the "basic challenges" challenge = data.challenge; + data.groups.basic = data.groups.basic || {challengeNo: 1}; + if (challenge > data.groups.basic.challengeNo) { + data.groups.basic.challengeNo = challenge; + } } - callback(challenge, data.groups); + callback(data.groups); }); } else { - callback(challenge, localStorage.groups ? JSON.parse(localStorage.groups) : {}); + callback(groupsData); } }, trackLinesOfCode: function (increment) { sdk.appStorage.get('kano-draw', function (err, res) { - if (err) { return; } + var current; + if (err) { + return; + } - var current = typeof res.lines_of_code === 'number' ? res.lines_of_code : 0; + current = typeof res.lines_of_code === 'number' ? res.lines_of_code : 0; sdk.appStorage.set('kano-draw', { lines_of_code: current + increment }); }); @@ -57,4 +70,4 @@ function progress (config) { }; } -module.exports = progress; \ No newline at end of file +module.exports = progress; diff --git a/lib/api/online/questions.js b/lib/api/online/questions.js new file mode 100644 index 000000000..fd17cc191 --- /dev/null +++ b/lib/api/online/questions.js @@ -0,0 +1,25 @@ +"use strict"; + +function questions(config) { + var api = require('kano-world-sdk')(config).api; + + api.add('questions.create', { + method : 'post', + route : '/questions' + }); + + api.add('questions.list', { + method : 'get', + route : '/questions' + }); + + api.add('questions.respond', { + method : 'post', + route : '/questions/responses', + params : ['username', 'email', 'answers'] + }); + + return api.questions; +} + +module.exports = questions; diff --git a/lib/api/online/userprofile.js b/lib/api/online/userprofile.js index 104403f72..6a8361fbf 100644 --- a/lib/api/online/userprofile.js +++ b/lib/api/online/userprofile.js @@ -1,16 +1,17 @@ +"use strict"; var api, sdk; -function userProfile (config) { - sdk = require('kano-world-sdk')(config); - api = sdk.api; +function userProfile(config) { + sdk = require('kano-world-sdk')(config); + api = sdk.api; - api.add('getProfile', { - method : 'get', - route : '/users/detail/:userId', - params : ['userId'] - }); + api.add('getProfile', { + method : 'get', + route : '/users/detail/:userId', + params : ['userId'] + }); - return api; + return api; } -module.exports = userProfile; \ No newline at end of file +module.exports = userProfile; diff --git a/lib/app.js b/lib/app.js index 0aaeca292..8ef9802b2 100644 --- a/lib/app.js +++ b/lib/app.js @@ -1,3 +1,4 @@ +"use strict"; /* * Angular app module * @@ -5,11 +6,10 @@ */ var api, auth, cfg, envCfg, - challenges = require('./challenges/index'), - summer = require('./challenges/summer_camp/index'), config = require('./core/config'), - analytics = require('./core/analytics'), - app = angular.module('draw', ['ngRoute']); + tracking = require('./core/tracking'), + app = angular.module('draw', ['ngRoute']), + domainCfg; cfg = angular.extend(config.default, config[window.ENV]); @@ -23,6 +23,10 @@ auth = require('./core/auth')(envCfg); api = require('./api')(envCfg); window.CONFIG = cfg; +domainCfg = cfg.DOMAIN_CFG; + +app.constant('API', api); +app.constant('AUTH', auth); // Configure app app.config(function ($locationProvider) { @@ -30,119 +34,213 @@ app.config(function ($locationProvider) { }); - // Run app app.run(function ($rootScope, $window) { - var win = angular.element($window); + var win = angular.element($window), + progressGroups; - // Define global app initial values - $rootScope.challenges = challenges; - $rootScope.summerChallenges = summer; - $rootScope.progress = {}; - $rootScope.progress.groups = {}; - $rootScope.cfg = cfg; - $rootScope.api = api; - $rootScope.offline = cfg.OFFLINE; - $rootScope.loggedIn = false; - $rootScope.user = null; - $rootScope.login = auth.login; - $rootScope.logout = auth.logout; - $rootScope.shutdown = api.server.shutdown; - - // Prefill progress from localStorage - $rootScope.progress.challengeNo = parseInt(localStorage.challenge || 0, 10); - $rootScope.progress.groups = localStorage.groups ? JSON.parse(localStorage.groups) : {}; - - function summerCampStarted() { - var diff = new Date() - new Date('2015-08-10T06:00:00'); - return diff > 0; + /* + * Get last visited challenge index + * + * @return {Number} + */ + function getLastChallenge(groupName) { + return parseInt(localStorage[groupName + 'lastChallengeVisited'] || 1, 10); } - /** - * Loads the user profile inside the $rootScope - * @param {string} userId the UserId + /* + * Set last visited challenge index + * + * @param {Number} index + * @return void */ - function loadUserProfile(userId) { - api.profile.getProfile({userId: userId}).then(function (res) { - var user = (res && res.body) ? res.body.user : undefined; - if (user) { - $rootScope.user.profile = user.profile; - } - $rootScope.$broadcast('user-profile-loaded'); - - }); + function setLastChallenge(groupName, index) { + if (groupName) { + localStorage[groupName + 'lastChallengeVisited'] = index; + } } - $rootScope.summerCampStarted = summerCampStarted(); - + /** + * + * Redirects to a certain world if + * it matches the domain + * e.g. hourofcode.kano.me redirects to challenges/hourofcode + */ + function redirectIfNeeded() { + var host = window.location.hostname, + path = window.location.pathname, + hashed = (window.location.href.indexOf('#') > -1); - // Initialised auth state - auth.init(function () { - var userObj, userId; - $rootScope.loggedIn = auth.getState(); - userObj = auth.getUser(); - $rootScope.user = userObj; + if (domainCfg[host] && !hashed && path === '/' && domainCfg[host].mapToWorld && path !== domainCfg[host].mapToWorld) { + window.location.href = '/challenges/' + domainCfg[host].mapToWorld; + } + } - if (userObj) { - loadUserProfile(userObj.id); + /** + * Initialises the progress variables + */ + function initProgress() { + var lsChallenge = parseInt(localStorage.challenge, 10); + $rootScope.progress = { groups: {}}; + // Prefill progress from localStorage + $rootScope.progress.groups = localStorage.groups ? JSON.parse(localStorage.groups) : {}; + progressGroups = $rootScope.progress.groups; + progressGroups.basic = progressGroups.basic || {challengeNo: 1}; + + //backwards compatibility + if (lsChallenge && progressGroups.basic.challengeNo < lsChallenge) { + progressGroups.basic.challengeNo = lsChallenge; } + } - $rootScope.$watch('user', function (user) { - if (user) { - userId = user.id; - if (!localStorage.uuid) { - localStorage.uuid = userId; - loadUserProfile(userId); - } else { - if (localStorage.uuid !== userId) { - localStorage.uuid = userId; - } + /** + * Loads the user profile inside the $rootScope + * @param {string} userId the UserId + */ + $rootScope.loadUserProfile = function (userId) { + if (!cfg.OFFLINE) { + api.profile.getProfile({userId: userId}).then(function (res) { + var user = (res && res.body) ? res.body.user : undefined; + if (user) { + $rootScope.user.profile = user.profile; } - } - }); + $rootScope.$broadcast('user-profile-loaded'); + $rootScope.$apply(); + }); + } + } + /** + * Updates the user and loggedIn state in the $rootScope + */ + $rootScope.updateUser = function (user) { + $rootScope.user = user; + if (user) { + $rootScope.loggedIn = true; + if (user.admin_level > 0) { + $rootScope.loadUserProfile(user.id); + } + $rootScope.loadProgress(); + $rootScope.$apply(); + } else { + $rootScope.loggedIn = false; + } + }; + /** + * Loads the user progress into the $rootScope + */ + $rootScope.loadProgress = function () { // Load progress - api.progress.load(function (challengeNo, groups) { - $rootScope.progress.challengeNo = challengeNo || 1; - if (groups) { - $rootScope.progress.groups = groups; + api.progress.load(function (groups) { + if (groups && Object.keys(groups).length) { + //incremental merge of the groups + Object.keys(groups).forEach(function (group) { + var grp_obj = groups[group], + rsGroup; + + $rootScope.progress.groups[group] = $rootScope.progress.groups[group] || {challengeNo: 1}; + rsGroup = $rootScope.progress.groups[group]; + Object.keys(grp_obj).forEach(function (key) { + //only merge the challengeNo if there's more progress in the API + if (key === "challengeNo") { + if (!rsGroup.challengeNo || (rsGroup.challengeNo && rsGroup.challengeNo < grp_obj.challengeNo)) { + rsGroup.challengeNo = grp_obj.challengeNo; + } + } else { + rsGroup[key] = grp_obj[key]; + } + }); + }); + $rootScope.$apply(); } - $rootScope.$apply(); + redirectIfNeeded(); }); + } - }); - - // Initialise analytics - analytics.init(); - - /* - * Get last visited challenge index - * - * @return {Number} + /** + * Loads the user progress into the $rootScope */ - function getLastChallenge(groupName) { - if (groupName) { - return parseInt(localStorage[groupName + 'lastChallengeVisited'] || 1, 10); - } - return parseInt(localStorage.lastChallengeVisited || 1, 10); + function resetProgress () { + Object.keys($rootScope.progress.groups).forEach(function(key) { + $rootScope.progress.groups[key].challengeNo = 1; + }) } - /* - * Set last visited challenge index - * - * @param {Number} index - * @return void - */ - function setLastChallenge(index, groupName) { - if (groupName) { - localStorage[groupName + 'lastChallengeVisited'] = index; + initProgress(); + + // Define global app initial values + $rootScope.cfg = cfg; + $rootScope.api = api; + $rootScope.offline = cfg.OFFLINE; + $rootScope.loggedIn = false; + $rootScope.user = null; + $rootScope.splash = { + display: false, + hasDisplayed: false, + close: function () { + this.display = false; + this.hasDisplayed = true; + }, + open: function () { + this.display = true; } - else { - localStorage.lastChallengeVisited = index; + }; + $rootScope.auth = { + mode: 'login', + showModal: false, + openModal: function (type) { + this.mode = type; + this.showModal = true; + }, + closeModal: function () { + this.showModal = false; } - } + }; + $rootScope.logout = function() { + auth.logout(function () { + $rootScope.updateUser(); + resetProgress(); + }); + }; + $rootScope.shutdown = api.server.shutdown; + $rootScope.banner = { + showModal: false, + openModal: function () { this.showModal = true; }, + closeModal: function () { this.showModal = false; } + }; + $rootScope.feedback = { + showModal: false, + openModal: function () { this.showModal = true; }, + closeModal: function () { this.showModal = false; } + }; + $rootScope.$watch('user', function (user) { + if (user) { + if (!localStorage.uuid) { + localStorage.uuid = user.id; + if (user.admin_level > 0) { + $rootScope.loadUserProfile(user.id); + } + } else { + if (localStorage.uuid !== user.id) { + localStorage.uuid = user.id; + } + } + } + }); + $rootScope.feedbackLoaded = function () { + var el = document.querySelector('.kano-feedback-container'); + el.addEventListener('animationend', function () { + document.querySelector('.kano-feedback-container').classList.remove('fadeInUp'); + }); + }; + + // Initialised auth state + auth.init($rootScope.updateUser); + + // Initialise tracking + tracking.init(); /* * Attach lastChallengeVisited get / set object to $rootScope @@ -154,28 +252,19 @@ app.run(function ($rootScope, $window) { /* * Update progress - * - * @param {Number} challengeNo + * @param {string} worldId the id of the world + * @param {Number} challengeNo the new challenge * @return void */ - $rootScope.updateProgress = function (challengeNo, groupName) { - if (groupName) { - api.progress.save(challengeNo, groupName, function(xpGain) { - $rootScope.xpGain = xpGain; - $rootScope.$apply(); - }); - $rootScope.progress.groups = {}; - $rootScope.progress.groups[groupName] = {}; - $rootScope.progress.groups[groupName].challengeNo = challengeNo; - } - else if (challengeNo > $rootScope.progress.challengeNo) { - api.progress.save(challengeNo, null, function(xpGain) { + $rootScope.updateProgress = function (worldId, challengeNo) { + if (worldId) { + api.progress.save(challengeNo, worldId, function (xpGain) { $rootScope.xpGain = xpGain; $rootScope.$apply(); }); - $rootScope.progress.challengeNo = challengeNo; - $rootScope.$apply(); - + $rootScope.progress.groups = $rootScope.progress.groups || {}; + $rootScope.progress.groups[worldId] = $rootScope.progress.groups[worldId] || {}; + $rootScope.progress.groups[worldId].challengeNo = challengeNo; } else { $rootScope.xpGain = 0; $rootScope.$apply(); @@ -189,12 +278,14 @@ app.run(function ($rootScope, $window) { } }); - // Update basePath on route change $rootScope.$on('$routeChangeSuccess', function (e, route) { var path = route.$$route ? route.$$route.originalPath : null; + var redirection = route.$$route ? route.$$route.redirectTo : null; $rootScope.basePath = path ? path.split('/')[1] : ''; - analytics.page(path); + if (path && !redirection) { + tracking.dispatchVirtualPageView(); + } }); }); diff --git a/lib/challenges/baloon.js b/lib/challenges/baloon.js deleted file mode 100644 index 2a6955c68..000000000 --- a/lib/challenges/baloon.js +++ /dev/null @@ -1,72 +0,0 @@ -var palette = require('../language/modules/palette.json'), - generate = require('./util/generate'); - -module.exports = { - id : 'blue-baloon', - title : 'Blue Balloon', - description : 'Draw a balloon floating in the air using polygons!', - startAt : 2, - steps : generate.fromSequence([ - [ - 'Set the color to blue - **type** `color blue`', - 'color blue', - [ - [ 'color', { color: palette.blue } ] - ] - ], - [ - 'Set the stroke to 0, to avoid drawing lines', - 'stroke 0', - [ - [ 'stroke-width', { width: 0 } ] - ] - ], - [ - 'Draw a circle with a size of 100', - 'circle 100', - [ - [ 'ellipse', { rx: 100, isCircle: true } ] - ] - ], - [ - 'Move down by 100 - **type** `move 0, 100`', - 'move 0, 100', - [ - [ 'move-to', { dx: 0, dy: 100 } ] - ] - ], - [ - 'Draw the knot - **type** `polygon 15, 15, -15, 15`', - 'polygon 15, 15, -15, 15', - [ - [ 'polygon', { points: [ - { x: 0, y: 0 }, - { x: 15, y: 15 }, - { x: -15, y: 15 } - ] } ] - ] - ], - [ - 'Move down a little more - **type** `move 0, 15`', - 'move 0, 15', - [ - [ 'move-to', { dx: 0, dy: 15 } ] - ] - ], - [ - 'Choose a thick black stroke - **type** `stroke black, 5`', - 'stroke black, 5', - [ - [ 'stroke-color', { color: palette.black } ], - [ 'stroke-width', { width: 5 } ] - ] - ], - [ - 'Draw the line of the balloon thread - **type** `line 0, 200`', - 'line 0, 200', - [ - [ 'line', { dx: 0, dy: 200 } ] - ] - ] - ]) -}; diff --git a/lib/challenges/breakfast.js b/lib/challenges/breakfast.js deleted file mode 100644 index 792464998..000000000 --- a/lib/challenges/breakfast.js +++ /dev/null @@ -1,327 +0,0 @@ -var palette = require('../language/modules/palette.json'), - generate = require('./util/generate'); - -module.exports = { - id : 'breakfast', - title : 'Breakfast', - description : 'Draw a bacon and eggs breakfast!', - startAt : 2, - fatherDay : true, - steps : generate.fromSequence([ - [ - 'Set the background to blue - **type** `background blue`', - 'background blue', - [ - [ 'background', { color: palette.blue } ] - ] - ], - [ - 'Set the stroke to 0, to avoid drawing lines', - 'stroke 0', - [ - [ 'stroke-width', { 'width': 0 } ] - ] - ], - [ - 'Set the color to white', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - 'Draw a circle with a size of 240', - '\n#Plate\ncircle 240', - [ - [ 'ellipse', { rx: 240, isCircle: true } ] - ] - ], - [ - 'Set the color to `\'#eee\'` - **type** `color \'#eee\'`', - 'color \'#eee\'', - [ - [ 'color', { color: '#eee' } ] - ] - ], - [ - 'Draw a circle with a size of 200', - 'circle 200', - [ - [ 'ellipse', { rx: 200, isCircle: true } ] - ] - ], - [ - 'Move up and left - **type** `move -70, -70`', - '\n#Egg\nmove -70, -70', - [ - [ 'move-to', { dx: -70, dy: -70 } ] - ] - ], - [ - 'Set the color to white', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - 'Draw a circle with a size of 80', - 'circle 80', - [ - [ 'ellipse', { rx: 80, isCircle: true } ] - ] - ], - [ - 'Set the color to yellow', - 'color yellow', - [ - [ 'color', { color: palette.yellow } ] - ] - ], - [ - 'Draw a circle with a size of 30', - 'circle 30', - [ - [ 'ellipse', { rx: 30, isCircle: true } ] - ] - ], - [ - 'Move up and right - **type** `move 90, -60`', - '\n#Bacon 1\nmove 90, -60', - [ - [ 'move-to', { dx: 90, dy: -60 } ] - ] - ], - [ - 'Set the color to red', - 'color red', - [ - [ 'color', { color: palette.red } ] - ] - ], - [ - 'Draw a rectangle with a size of 60 and 200 - **type** `rectangle 60, 200`', - 'rectangle 60, 200', - [ - [ 'rectangle', { width: 60, height: 200 } ] - ] - ], - [ - 'Move 30 to the right - **type** `move 30`', - 'move 30', - [ - [ 'move-to', { dx: 30, dy: 0 } ] - ] - ], - [ - 'Set the color to `\'#aa0000\'` - **type** `color \'#aa0000\'`', - 'color #aa0000', - [ - [ 'color', { color: '#aa0000' } ] - ] - ], - [ - 'Draw a rectangle with a size of 30 and 200 - **type** `rectangle 30, 200`', - 'rectangle 30, 200', - [ - [ 'rectangle', { width: 30, height: 200 } ] - ] - ], - [ - 'Move down and left - **type** `move -3, 10`', - 'move -3, 10', - [ - [ 'move-to', { dx: -3, dy: 10 } ] - ] - ], - [ - 'Set the color to white', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - 'Draw a rectangle with a size of 6 and 180 - **type** `rectangle 6, 180`', - 'rectangle 6, 180', - [ - [ 'rectangle', { width: 6, height: 180 } ] - ] - ], - [ - 'Move down and right - **type** `move 40, 50`', - '\n#Bacon 2\nmove 40, 50', - [ - [ 'move-to', { dx: 40, dy: 50 } ] - ] - ], - [ - 'Set the color to red', - 'color red', - [ - [ 'color', { color: palette.red } ] - ] - ], - [ - 'Draw a rectangle with a size of 60 and 200 - **type** `rectangle 60, 200`', - 'rectangle 60, 200', - [ - [ 'rectangle', { width: 60, height: 200 } ] - ] - ], - [ - 'Move 30 to the right - **type** `move 30`', - 'move 30', - [ - [ 'move-to', { dx: 30, dy: 0 } ] - ] - ], - [ - 'Set the color to `\'#aa0000\'` - **type** `color \'#aa0000\'`', - 'color #aa0000', - [ - [ 'color', { color: '#aa0000' } ] - ] - ], - [ - 'Draw a rectangle with a size of 30 and 200 - **type** `rectangle 30, 200`', - 'rectangle 30, 200', - [ - [ 'rectangle', { width: 30, height: 200 } ] - ] - ], - [ - 'Move down and left - **type** `move -3, 10`', - 'move -3, 10', - [ - [ 'move-to', { dx: -3, dy: 10 } ] - ] - ], - [ - 'Set the color to white', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - 'Draw a rectangle with a size of 6 and 180 - **type** `rectangle 6, 180`', - 'rectangle 6, 180', - [ - [ 'rectangle', { width: 6, height: 180 } ] - ] - ], - [ - 'Move down and left - **type** `move -200, 150`', - '\n#Tomato 1\nmove -200, 150', - [ - [ 'move-to', { dx: -200, dy: 150 } ] - ] - ], - [ - 'Set the color to red', - 'color red', - [ - [ 'color', { color: palette.red } ] - ] - ], - [ - 'Draw a circle with a size of 40', - 'circle 40', - [ - [ 'ellipse', { rx: 40, isCircle: true } ] - ] - ], - [ - 'Set the color to `\'#cc4444\'` - **type** `color \'#cc4444\'`', - 'color \'#cc4444\'', - [ - [ 'color', { color: '#cc4444' } ] - ] - ], - [ - 'Draw a circle with a size of 35', - 'circle 35', - [ - [ 'ellipse', { rx: 35, isCircle: true } ] - ] - ], - [ - 'Set the color to `\'#aa4444\'` - **type** `color \'#aa4444\'`', - 'color \'#aa4444\'', - [ - [ 'color', { color: '#aa4444' } ] - ] - ], - [ - 'Draw an ellipse with a size of 30 and 10', - 'ellipse 30, 10', - [ - [ 'ellipse', { rx: 30, ry: 10 } ] - ] - ], - [ - 'Draw an ellipse with a size of 10 and 30', - 'ellipse 10, 30', - [ - [ 'ellipse', { rx: 10, ry: 30 } ] - ] - ], - [ - 'Move down and right - **type** `move 70, 50`', - '\n#Tomato 2\nmove 70, 50', - [ - [ 'move-to', { dx: 70, dy: 50 } ] - ] - ], - [ - 'Set the color to red', - 'color red', - [ - [ 'color', { color: palette.red } ] - ] - ], - [ - 'Draw a circle with a size of 40', - 'circle 40', - [ - [ 'ellipse', { rx: 40, isCircle: true } ] - ] - ], - [ - 'Set the color to `\'#cc4444\'` - **type** `color \'#cc4444\'`', - 'color \'#cc4444\'', - [ - [ 'color', { color: '#cc4444' } ] - ] - ], - [ - 'Draw a circle with a size of 35', - 'circle 35', - [ - [ 'ellipse', { rx: 35, isCircle: true } ] - ] - ], - [ - 'Set the color to `\'#aa4444\'` - **type** `color \'#aa4444\'`', - 'color \'#aa4444\'', - [ - [ 'color', { color: '#aa4444' } ] - ] - ], - [ - 'Draw an ellipse with a size of 30 and 10', - 'ellipse 30, 10', - [ - [ 'ellipse', { rx: 30, ry: 10 } ] - ] - ], - [ - 'Draw an ellipse with a size of 10 and 30', - 'ellipse 10, 30', - [ - [ 'ellipse', { rx: 10, ry: 30 } ] - ] - ] - ]) -}; diff --git a/lib/challenges/dots.js b/lib/challenges/dots.js deleted file mode 100644 index aee3bdd15..000000000 --- a/lib/challenges/dots.js +++ /dev/null @@ -1,93 +0,0 @@ -var palette = require('../language/modules/palette.json'), - generate = require('./util/generate'); - -module.exports = { - id : 'dots', - title : 'Dots Pattern', - description : 'Create a fancy dots pattern using loops and circles!', - code : '', - startAt : 1, - steps : generate.fromSequence([ - [ - 'Set the background to red', - 'background red', - [ - [ 'background', { color: palette.red } ] - ] - ], - [ - 'Set the stroke to 0', - 'stroke 0', - [ - [ 'stroke-width', { width: 0 } ] - ] - ], - [ - 'Set the color to yellow', - 'color yellow', - [ - [ 'color', { color: palette.yellow } ] - ] - ], - [ - 'Now open a loop - **type** `for x in [ 0 .. 25 ]`', - '\nfor x in [ 0 .. 25 ]', - [ - [ 'for-loop', { iterator: 'x', range: '0..25' } ] - ] - ], - [ - 'Inside this loop, open a second loop - **type** `for y in [ 0 .. 25 ]`', - ' for y in [ 0 .. 25 ]', - function () { - var out = [], - x; - - for (x = 0; x < 26; x += 1) { - out.push([ 'for-loop', { iterator: 'y', range: '0..25' } ]); - } - - return out; - } - ], - [ - 'Move around, **type** `moveTo x * 20, y * 20`', - ' moveTo x * 20, y * 20', - function () { - var out = [], - x, y; - - for (x = 0; x < 26; x += 1) { - out.push([ 'for-loop', { iterator: 'y', range: '0..25' } ]); - - for (y = 0; y < 26; y += 1) { - out.push([ 'move-to', { x: x * 20, y: y * 20 } ]); - } - } - - return out; - }, - { override: true } - ], - [ - 'Now for the dots - **type** `circle 6`', - ' circle 6', - function () { - var out = [], - x, y; - - for (x = 0; x < 26; x += 1) { - out.push([ 'for-loop', { iterator: 'y', range: '0..25' } ]); - - for (y = 0; y < 26; y += 1) { - out.push([ 'move-to', { x: x * 20, y: y * 20 } ]); - out.push([ 'ellipse', { rx: 6, isCircle: true } ]); - } - } - - return out; - }, - { override: true } - ] - ]) -}; \ No newline at end of file diff --git a/lib/challenges/gradient.js b/lib/challenges/gradient.js deleted file mode 100644 index 62a4ab8cb..000000000 --- a/lib/challenges/gradient.js +++ /dev/null @@ -1,112 +0,0 @@ -var palette = require('../language/modules/palette.json'), - generate = require('./util/generate'), - colors = require('../language/modules/colors'); - -module.exports = { - id : 'gradient', - title : 'Rainbow gradient', - description : 'Combine for loops and colors to make something magical!', - code : '', - startAt : 1, - steps : generate.fromSequence([ - [ - 'Start by opening a for loop - **type** `for x in [ 0 .. 25 ]`', - 'for x in [ 0 .. 25 ]', - [ - [ 'for-loop', { iterator: 'x', range: '0..25' } ] - ] - ], - [ - 'Now lets open a second for loop inside - **type** `for y in [ 0 .. 25 ]`', - ' for y in [ 0 .. 25 ]', - function () { - var out = [], - x; - - for (x = 0; x < 26; x += 1) { - out.push([ 'for-loop', { iterator: 'y', range: '0..25' } ]); - } - - return out; - } - ], - [ - 'Let\'s rotate through the color spectrum - **type** `color rotate red, 10 * x + 10 * y`', - ' color rotate red, 10 * x + 10 * y', - function () { - var out = [], - x, y; - - for (x = 0; x < 26; x += 1) { - out.push([ 'for-loop', { iterator: 'y', range: '0..25' } ]); - - for (y = 0; y < 26; y += 1) { - out.push([ 'color', { - color : colors.rotate(palette.red, 10 * x + 10 * y) - } ]); - } - } - - return out; - }, - { override: true } - ], - [ - 'Now we need to move every time we draw - **type** `moveTo 20 * x , 20 * y`', - ' moveTo 20 * x , 20 * y', - function () { - var out = [], - x, y; - - for (x = 0; x < 26; x += 1) { - out.push([ 'for-loop', { iterator: 'y', range: '0..25' } ]); - - for (y = 0; y < 26; y += 1) { - out.push([ 'color', { - color : colors.rotate(palette.red, 10 * x + 10 * y) - } ]); - - out.push([ 'move-to', { - x : x * 20, - y : y * 20 - } ]); - } - } - - return out; - }, - { override: true } - ], - [ - 'Now for the shapes draw a square of size 20', - ' square 20', - function () { - var out = [], - x, y; - - for (x = 0; x < 26; x += 1) { - out.push([ 'for-loop', { iterator: 'y', range: '0..25' } ]); - - for (y = 0; y < 26; y += 1) { - out.push([ 'color', { - color : colors.rotate(palette.red, 10 * x + 10 * y) - } ]); - - out.push([ 'move-to', { - x : x * 20, - y : y * 20 - } ]); - - out.push([ 'rectangle', { - width : 20, - isSquare : true - } ]); - } - } - - return out; - }, - { override: true } - ] - ]) -}; diff --git a/lib/challenges/house.js b/lib/challenges/house.js deleted file mode 100644 index aa7e4b316..000000000 --- a/lib/challenges/house.js +++ /dev/null @@ -1,149 +0,0 @@ -var palette = require('../language/modules/palette.json'), - generate = require('./util/generate'); - -module.exports = { - id : 'house', - title : 'House', - description : 'Draw a cosy house!', - code : '', - startAt : 1, - steps : generate.fromSequence([ - [ - 'Let\'s start with the sky! Set the `background` to `blue`', - 'background blue', - [ - [ 'background', { color: palette.blue } ] - ] - ], - [ - 'Now set the stroke to 0', - 'stroke 0', - [ - [ 'stroke-width', { width: 0 } ] - ] - ], - [ - 'Move to the left and up, **type** `move -150, -50`', - 'move -150, -50', - [ - [ 'move-to', { dx: -150, dy: -50 } ] - ] - ], - [ - 'Now set the color to beige', - 'color beige', - [ - [ 'color', { color: palette.beige } ] - ] - ], - [ - 'Now draw rectangle, **type** `rectangle 300, 200`', - 'rectangle 300, 200', - [ - [ 'rectangle', { width: 300, height: 200 } ] - ] - ], - [ - 'Move to the right and up, **type** `move 150, -100`', - 'move 150, -100', - [ - [ 'move-to', { dx: 150, dy: -100 } ] - ] - ], - [ - 'Set the color to darkred for the roof', - 'color darkred', - [ - [ 'color', { color: palette.darkred } ] - ] - ], - [ - 'Now let\'s draw the roof, **type** `polygon 170, 100, -170, 100`', - 'polygon 170, 100, -170, 100', - [ - [ 'polygon', { points: [ - { x: 0, y: -0 }, - { x: 170, y: 100 }, - { x: -170, y: 100 } - ] } ] - ] - ], - [ - 'Move to the left and down, **type** `move -250, 300`', - 'move -250, 300', - [ - [ 'move-to', { dx: -250, dy: 300 } ] - ] - ], - [ - 'Now set the color to green for the grass', - 'color green', - [ - [ 'color', { color: palette.green } ] - ] - ], - [ - 'Draw rectangle for the grass, width a size of 500, 100', - 'rectangle 500, 100', - [ - [ 'rectangle', { width: 500, height: 100 } ] - ] - ], - [ - 'Move to the right and up, **type** `move 220, -80`', - 'move 220, -80', - [ - [ 'move-to', { dx: 220, dy: -80 } ] - ] - ], - [ - 'Now set the color to brown for the wooden door', - 'color brown', - [ - [ 'color', { color: palette.brown } ] - ] - ], - [ - 'Draw rectangle for the door, with a size of 60, 80', - 'rectangle 60, 80', - [ - [ 'rectangle', { width: 60, height: 80 } ] - ] - ], - [ - 'Set the color to aqua for the windows', - 'color aqua', - [ - [ 'color', { color: palette.aqua } ] - ] - ], - [ - 'Move to the left and up, **type** `move -80, -80`', - 'move -80, -80', - [ - [ 'move-to', { dx: -80, dy: -80 } ] - ] - ], - [ - 'Draw square with a size of 50', - 'square 50', - [ - [ 'rectangle', { width: 50, isSquare: true } ] - ] - ], - [ - 'Move to the right, **type** `move 170`', - 'move 170', - [ - [ 'move-to', { dx: 170 } ] - ] - ], - [ - 'Draw square with a size of 50', - 'square 50', - [ - [ 'rectangle', { width: 50, isSquare: true } ] - ] - ] - ]) -}; \ No newline at end of file diff --git a/lib/challenges/index.js b/lib/challenges/index.js deleted file mode 100644 index fbd6211d5..000000000 --- a/lib/challenges/index.js +++ /dev/null @@ -1,18 +0,0 @@ -module.exports = [ - require('./japan'), - require('./sweden'), - require('./stare'), - require('./smiley'), - require('./baloon'), - require('./stickman'), - require('./shrinking'), - require('./random'), - require('./starry'), - require('./house'), -// require('./medal'), - require('./dots'), - require('./gradient'), - require('./planet'), - require('./pizza'), - require('./breakfast') - ]; \ No newline at end of file diff --git a/lib/challenges/index.json b/lib/challenges/index.json new file mode 100644 index 000000000..15cb6a949 --- /dev/null +++ b/lib/challenges/index.json @@ -0,0 +1,88 @@ +{ + "worlds": [ + { + "id": "basic", + "name": "Basic", + "description": "This is a first set of challenges which will make you started with Make-Art", + "cover": "world_covers/basic", + "world_path": "worlds/basic", + "css_class": "basic-challenges", + "share_strategy": "optional", + "type": "normal" + + }, + { + "id": "medium", + "name": "Medium", + "description": "Medium challenges", + "cover": "world_covers/medium", + "world_path": "worlds/medium", + "css_class": "medium", + "dependency": ["basic"], + "share_strategy": "optional", + "type": "normal" + }, + { + "id": "pixelhack", + "name": "Pixel Hack", + "display_menu": true, + "hero_header": { + "links": [{ + "image": "pixelhack/teacher-pack.svg", + "location": "/assets/guides/PixelHackEducatorGuide.zip", + "text": "Download the teacher resource guide" + }, { + "image": "pixelhack/about-kano.svg", + "location": "https://world.kano.me/start", + "text": "Learn more about Kano" + }] + }, + "description": "This is a group of challenges for the hour of code", + "cover": "world_covers/pixelhack", + "world_path": "worlds/pixelhack", + "css_class": "pixelhack", + "type": "campaign", + "certificate_after": 2, + "share_strategy": "optional", + "socialText": { + "email": "Hack your way through video game history with Pixel Hack from Kano!", + "facebook": "Hack your way through video game history with #PixelHack from Kano", + "twitter": "Hack your way through video game history with #PixelHack from @TeamKano!\nhttp://art.kano.me/challenges/pixelhack/" + } + }, + { + "id": "summercamp", + "name": "Summercamp", + "description": "This is a first set of challenges which will make you started with Make-Art", + "cover": "world_covers/summercamp", + "world_path": "worlds/summercamp", + "css_class": "_summercamp", + "share_strategy": "optional", + "type": "campaign" + + }, + { + "id": "mischiefweek2015", + "name": "Mischief Week", + "description": "This is a Halloween dedicated world", + "cover": "world_covers/mischiefweek", + "world_path": "worlds/mischiefweek2015", + "start_date": "2015-10-26T06:00:00", + "css_class": "mischiefweek2015", + "type": "campaign", + "share_strategy": "optional", + "sales_popup_after": 2 + }, + { + "id": "ozwaldboateng", + "name": "Ozwald Boateng × Kano", + "description": "Today, Kano and Ozwald Boateng are teaming up to teach creativity and a coding language thousands of years old.", + "cover": "world_covers/ozwaldboateng", + "world_path": "worlds/ozwaldboateng", + "css_class": "ozwaldboateng", + "type": "campaign", + "share_strategy": "optional", + "sales_popup_after": 2 + } + ] +} diff --git a/lib/challenges/japan.js b/lib/challenges/japan.js deleted file mode 100644 index a20b10e8c..000000000 --- a/lib/challenges/japan.js +++ /dev/null @@ -1,40 +0,0 @@ -var palette = require('../language/modules/palette.json'), - generate = require('./util/generate'); - -module.exports = { - id : 'flag-japan', - title : 'Japanese flag', - description : 'Code a flag with a few simple commands', - code : '', - startAt : 2, - steps : generate.fromSequence([ - [ - 'Set the background to white - **type** `background white`', - 'background white', - [ - [ 'background', { color: palette.white } ] - ] - ], - [ - 'Set the drawing color to red - in a new line **type** `color red`', - 'color red', - [ - [ 'color', { color: palette.red } ] - ] - ], - [ - 'Set the stroke to 0, the stroke is the outline of a shape - in a new line **type** `stroke 0`', - 'stroke 0', - [ - [ 'stroke-width', { width: 0 } ] - ] - ], - [ - 'Draw a circle with a size of 100 - in a new line **type** `circle 100`', - 'circle 100', - [ - [ 'ellipse', { rx: 100, isCircle: true } ] - ] - ], - ]) -}; \ No newline at end of file diff --git a/lib/challenges/locales/es/index.json b/lib/challenges/locales/es/index.json new file mode 100755 index 000000000..76d92aa75 --- /dev/null +++ b/lib/challenges/locales/es/index.json @@ -0,0 +1,66 @@ +{ + "worlds": [ + { + "id": "basic", + "name": "Básico", + "description": "Este es un primer conjunto de desafíos que te introducirá a Hacer-Arte", + "cover": "world_covers/basic", + "world_path": "worlds/basic", + "css_class": "basic-challenges", + "share_strategy": "optional", + "type": "normal" + }, + { + "id": "medium", + "name": "Medio", + "description": "Desafíos de nivel medio", + "cover": "world_covers/medium", + "world_path": "worlds/medium", + "css_class": "medium", + "dependency": ["basic"], + "share_strategy": "optional", + "type": "normal" + }, + { + "id": "pixelhack", + "name": "Pixel Hack", + "description": "Este es un grupo de desafíos para la hora de programación", + "cover": "world_covers/pixelhack", + "world_path": "worlds/pixelhack", + "css_class": "pixelhack", + "type": "campaign", + "certificate_after": 2, + "teachers_guide": "/guides/PixelHackEducatorGuide.zip", + "share_strategy": "optional", + "socialText": { + "email": "¡Hackea tu propio camino a lo largo de la historia de los videojuegos con Pixel Hack desde Kano!", + "facebook": "¡Hackea tu propio camino a lo largo de la historia de los videojuegos con #PixelHack desde Kano!", + "twitter": "¡Hackea tu propio camino a lo largo de la historia de los videojuegos con #PixelHack desde @TeamKano! \nhttp://art.kano.me/challenges/pixelhack/" + } + }, + { + "id": "summercamp", + "name": "Campamento de verano", + "description": "Este es un primer conjunto de desafíos que te introducirá a Hacer-Arte", + "cover": "world_covers/summercamp", + "world_path": "worlds/summercamp", + "css_class": "_summercamp", + "dependency": ["medium"], + "share_strategy": "optional", + "type": "campaign" + + }, + { + "id": "mischiefweek2015", + "name": "Semana de travesuras", + "description": "Este es un mundo dedicado a Halloween", + "cover": "world_covers/mischiefweek", + "world_path": "worlds/mischiefweek2015", + "start_date": "2015-10-26T06:00:00", + "css_class": "mischiefweek2015", + "type": "campaign", + "share_strategy": "optional", + "sales_popup_after": 2 + } + ] +} diff --git a/lib/challenges/locales/es/worlds/basic/baloon.json b/lib/challenges/locales/es/worlds/basic/baloon.json new file mode 100755 index 000000000..cb3914be1 --- /dev/null +++ b/lib/challenges/locales/es/worlds/basic/baloon.json @@ -0,0 +1,42 @@ +{ + "id": "baloon", + "title": "Globo Azul", + "cover": "blue-baloon.png", + "description": "¡Dibuja un globo flotando en el aire usando polígonos!", + "startAt": 2, + "steps": [ + { + "hint": "Configura el color a azul - **escribe** `color blue`", + "solution": "color blue" + }, + { + "hint": "Configura el trazo a 0, para evitar dibujar líneas. Recuerda, trazo en inglés es **stroke**", + "solution": "stroke 0" + }, + { + "hint": "Dibuja un círculo de 100 de tamaño", + "solution": "circle 100" + }, + { + "hint": "Muévete 100 hacia abajo - **escribe** `move 0, 100`", + "solution": "move 0, 100" + }, + { + "hint": "Dibuja el nudo del globo usando un polígono, o **polygon** en inglés - **escribe** `polygon 15, 15, -15, 15`", + "solution": "polygon 15, 15, -15, 15" + }, + { + "hint": "Muévete un poco más hacia abajo - **escribe** `move 0, 15`", + "solution": "move 0, 15" + }, + { + "hint": "Elige un trazo negro y grueso - **escribe** `stroke black, 5`", + "solution": "stroke black, 5" + }, + { + "hint": "Dibuja la línea del lazo del globo - **escribe** `line 0, 200`", + "solution": "line 0, 200" + } + ], + "completion_text": "¡Increíble globo! ¿Por qué no intentas cambiarle el color antes de continuar?" +} diff --git a/lib/challenges/locales/es/worlds/basic/breakfast.json b/lib/challenges/locales/es/worlds/basic/breakfast.json new file mode 100755 index 000000000..94166db7b --- /dev/null +++ b/lib/challenges/locales/es/worlds/basic/breakfast.json @@ -0,0 +1,197 @@ +{ + "id": "breakfast", + "title": "Desayuno", + "description": "¡Dibuja un desayuno inglés de tocino y huevos!", + "startAt": 2, + "fatherDay": true, + "steps": [ + { + "hint": "Configura el color del fondo a azul - **escribe** `background blue`", + "solution": "background blue" + }, + { + "hint": "Configura el trazo a 0, para evitar dibujar líneas", + "solution": "stroke 0" + }, + { + "hint": "Configura el color a blanco", + "solution": "color white" + }, + { + "hint": "Dibuja un círculo de 240 de tamaño", + "solution": "\n#Plate\ncircle 240", + "validate": "circle 240" + }, + { + "hint": "Configura el color a `'#eee'` - **escribe** `color '#eee'`", + "solution": "color '#eee'" + }, + { + "hint": "Dibuja un círculo de 200 de tamaño", + "solution": "circle 200" + }, + { + "hint": "Muévete arriba y hacia la izquierda - **escribe** `move -70, -70`", + "solution": "\n#Egg\nmove -70, -70", + "validate": "move -70,-70" + }, + { + "hint": "Configura el color a blanco", + "solution": "color white" + }, + { + "hint": "Dibuja un círculo de 80 de tamaño", + "solution": "circle 80" + }, + { + "hint": "Configura el color a amarillo", + "solution": "color yellow" + }, + { + "hint": "Dibuja un círculo de 30 de tamaño", + "solution": "circle 30" + }, + { + "hint": "Muévete arriba y hacia la derecha - **escribe** `move 90, -60`", + "solution": "\n#Bacon 1\nmove 90, -60", + "validate": "move 90,-60" + }, + { + "hint": "Configura el color a rojo", + "solution": "color red" + }, + { + "hint": "Dibuja un rectángulo de un tamaño de 60 por 200 - **escribe** `rectangle 60, 200`", + "solution": "rectangle 60, 200" + }, + { + "hint": "Muévete 30 hacia la derecha - **escribe** `move 30`", + "solution": "move 30" + }, + { + "hint": "Configura el color a `'#aa0000'` - **escribe** `color '#aa0000'`", + "solution": "color '#aa0000'" + }, + { + "hint": "Dibuja un rectángulo de un tamaño de 30 por 200 - **escribe** `rectangle 30, 200`", + "solution": "rectangle 30, 200" + }, + { + "hint": "Muévete hacia abajo y a la izquierda - **escribe** `move -3, 10`", + "solution": "move -3, 10" + }, + { + "hint": "Configura el color a blanco", + "solution": "color white" + }, + { + "hint": "Dibuja un rectángulo de un tamaño de 6 por 180 - **escribe** `rectangle 6, 180`", + "solution": "rectangle 6, 180" + }, + { + "hint": "Muévete hacia abajo y a la derecha - **escribe** `move 40, 50`", + "solution": "\n#Bacon 2\nmove 40, 50", + "validate": "move 40, 50" + }, + { + "hint": "Configura el color a rojo", + "solution": "color red" + }, + { + "hint": "Dibuja un rectángulo de un tamaño de 60 por 200 - **escribe** `rectangle 60, 200`", + "solution": "rectangle 60, 200" + }, + { + "hint": "Muévete hacia la derecha 30 - **escribe** `move 30`", + "solution": "move 30" + }, + { + "hint": "Configura el color a`'#aa0000'` - **escribe** `color '#aa0000'`", + "solution": "color '#aa0000'" + }, + { + "hint": "Dibuja un rectángulo de un tamaño de 30 por 200 - **escribe** `rectangle 30, 200`", + "solution": "rectangle 30, 200" + }, + { + "hint": "Muévete hacia abajo y a la izquierda - **escribe** `move -3, 10`", + "solution": "move -3, 10" + }, + { + "hint": "Configura el color a blanco", + "solution": "color white" + }, + { + "hint": "Dibuja un rectángulo de un tamaño de 6 por 180 - **escribe** `rectangle 6, 180`", + "solution": "rectangle 6, 180" + }, + { + "hint": "Muévete hacia abajo y a la izquierda - **escribe** `move -200, 150`", + "solution": "\n#Tomato 1\nmove -200, 150", + "validate": "move -200, 150" + }, + { + "hint": "Configura el color a rojo", + "solution": "color red" + }, + { + "hint": "Dibuja un círculo de 40 de tamaño", + "solution": "circle 40" + }, + { + "hint": "Configura el color a `'#cc4444'` - **escribe** `color '#cc4444'`", + "solution": "color '#cc4444'" + }, + { + "hint": "Dibuja un círculo de 35 de tamaño", + "solution": "circle 35" + }, + { + "hint": "Configura el color a `'#aa4444'` - **escribe** `color '#aa4444'`", + "solution": "color '#aa4444'" + }, + { + "hint": "Dibuja una elipse de un tamaño de 30 por 10", + "solution": "ellipse 30, 10" + }, + { + "hint": "Dibuja una elipse de un tamaño de 10 por 30", + "solution": "ellipse 10, 30" + }, + { + "hint": "Muévete hacia abajo y a la derecha - **escribe** `move 70, 50`", + "solution": "\n#Tomato 2\nmove 70, 50", + "validate": "move 70, 50" + }, + { + "hint": "Configura el color a rojo", + "solution": "color red" + }, + { + "hint": "Dibuja un círculo de un tamaño de 40", + "solution": "circle 40" + }, + { + "hint": "Configura el color a `'#cc4444'` - **escribe** `color '#cc4444'`", + "solution": "color '#cc4444'" + }, + { + "hint": "Dibuja un círculo de un tamaño de 35", + "solution": "circle 35" + }, + { + "hint": "Configura el color a `'#aa4444'` - **escribe** `color '#aa4444'`", + "solution": "color '#aa4444'" + }, + { + "hint": "Dibuja una elipse de un tamaño de 30 por 10", + "solution": "ellipse 30, 10" + }, + { + "hint": "Dibuja una elipse de un tamaño de 10 por 30", + "solution": "ellipse 10, 30" + } + ], + "completion_text": "¡Bien hecho!" + "cover": "breakfast.png" +} \ No newline at end of file diff --git a/lib/challenges/locales/es/worlds/basic/index.json b/lib/challenges/locales/es/worlds/basic/index.json new file mode 100644 index 000000000..f8e39b164 --- /dev/null +++ b/lib/challenges/locales/es/worlds/basic/index.json @@ -0,0 +1,10 @@ +{ + "challenges": [ + "./sunnyday", + "./swissflag", + "./stare", + "./smiley", + "./baloon", + "./stickman" + ] +} diff --git a/lib/challenges/locales/es/worlds/basic/smiley.json b/lib/challenges/locales/es/worlds/basic/smiley.json new file mode 100755 index 000000000..6b2f4d730 --- /dev/null +++ b/lib/challenges/locales/es/worlds/basic/smiley.json @@ -0,0 +1,50 @@ +{ + "id": "smiley", + "title": "Tu primera cara", + "description": "Dibuja una cara", + "startAt": 2, + "steps": [ + { + "hint": "Configura el color de dibujo a amarillo - **escribe** `color yellow`", + "solution": "color yellow" + }, + { + "hint": "Elige un trazo grueso y negro - **escribe** `stroke black, 20`", + "solution": "stroke black, 20" + }, + { + "hint": "Dibuja un círculo de un tamaño de 200. Recuerda, círculo en inglés es **circle**", + "solution": "circle 200" + }, + { + "hint": "Muévete 80 a la izquierda y 80 hacia arriba - **escribe** `move -80, -80`", + "solution": "move -80, -80" + }, + { + "hint": "Configura el color de dibujo a negro", + "solution": "color black" + }, + { + "hint": "Dibuja un círculo de un radio de 20", + "solution": "circle 20" + }, + { + "hint": "Muévete 160 a la derecha - **escribe** `move 160`", + "solution": "move 160" + }, + { + "hint": "Dibuja otro círculo de un tamaño de 20", + "solution": "circle 20" + }, + { + "hint": "Muévete al centro y hacia abajo - En una nueva línea, **escribe** `moveTo 250, 270`", + "solution": "moveTo 250, 270" + }, + { + "hint": "Un arco es la mitad de un círculo, y en inglés se dice casi igual - **arc**. Podemos dibujarlo como si fuera la boca - **escribe** `arc 100, 1, 2`", + "solution": "arc 100, 1, 2" + } + ], + "completion_text": "¡Bien! ¡Sigue trabajando de esta manera, genio dibujante de caras!", + "cover": "smiley.png" +} diff --git a/lib/challenges/locales/es/worlds/basic/stare.json b/lib/challenges/locales/es/worlds/basic/stare.json new file mode 100755 index 000000000..4eb3fa24a --- /dev/null +++ b/lib/challenges/locales/es/worlds/basic/stare.json @@ -0,0 +1,55 @@ +{ + "id": "stare", + "title": "Mirada en la oscuridad", + "description": "Dibuja ojos fantasmales en la oscuridad", + "startAt": 2, + "steps": [ + { + "hint": "Configura el color del fondo a negro. Negro en inglés se dice **black**; fondo es **background**.", + "solution": "background black" + }, + { + "hint": "Muévete 80 a la izquierda **escribe** `move -80`", + "solution": "move -80", + "validate": "move -80" + }, + { + "hint": "Configura el color de dibujo a blanco. ¿Te acuerdas cómo se dice en inglés?", + "solution": "color white" + }, + { + "hint": "Dibuja una elipse: es como un círculo estirado. Elipse en inglés se dice casi igual **ellipse** - **escribe** `ellipse 60, 40`", + "solution": "ellipse 60, 40" + }, + { + "hint": "Configura el color de dibujo a negro - **escribe** `color black`", + "solution": "color black" + }, + { + "hint": "Dibuja un círculo de 10 de tamaño - **escribe** `circle 10`", + "solution": "circle 10" + }, + { + "hint": "Muévete 160 a la derecha - **escribe** `move 160`", + "solution": "move 160" + }, + { + "hint": "Configura el color de dibujo a blanco otra vez", + "solution": "color white" + }, + { + "hint": "Ahora dibuja otra elipse de 60 de ancho por 40 de alto - **escribe** `ellipse 60, 40`", + "solution": "ellipse 60, 40" + }, + { + "hint": "Configura el color de dibujo a negro", + "solution": "color black" + }, + { + "hint": "Termínalo dibujando un círculo de un tamaño de 10 ¡No olvides usar el comando en inglés!", + "solution": "circle 10" + } + ], + "completion_text": "¡Eres un mago! ¡La próxima vez que necesite ojos fantasmales ya sé a quién llamar!", + "cover": "stare.png" +} diff --git a/lib/challenges/locales/es/worlds/basic/stickman.json b/lib/challenges/locales/es/worlds/basic/stickman.json new file mode 100755 index 000000000..78eb5f0f5 --- /dev/null +++ b/lib/challenges/locales/es/worlds/basic/stickman.json @@ -0,0 +1,54 @@ +{ + "id": "stickman", + "title": "Hombre de palo", + "description": "Dibuja un hombre de palo usando círculos y líneas", + "startAt": 2, + "steps": [ + { + "hint": "Configura el `trazo` a `negro` y de un tamaño de `10` ¡usando las palabras en inglés!", + "solution": "stroke black, 10" + }, + { + "hint": "Muévete hacia arriba, **escribe** `move 0, -50`", + "solution": "move 0, -50" + }, + { + "hint": "Dibuja el cuerpo del hombre de palo usando `line` - `line 0, 150`", + "solution": "line 0, 150" + }, + { + "hint": "Dibuja el brazo izquierdo del hombre de palo - `line -80, 120`", + "solution": "line -80, 120" + }, + { + "hint": "Bien, ahora el brazo derecho - `line 80, 120`", + "solution": "line 80, 120" + }, + { + "hint": "Muévete hacia abajo, **escribe** `move 0, 150`", + "solution": "move 0, 150" + }, + { + "hint": "Dibuja la pierna izquierda del hombre de palo: `line -80, 120`", + "solution": "line -80, 120" + }, + { + "hint": "Bien, ahora la pierna derecha - `line 80, 120`", + "solution": "line 80, 120" + }, + { + "hint": "Muévete a la parte de arriba del dibujo, **escribe** `moveTo 250, 100`", + "solution": "moveTo 250, 100" + }, + { + "hint": "Configura el trazo nuevamente a 0 usando `stroke`", + "solution": "stroke 0" + }, + { + "hint": "Ahora para dibujar una figura con muchos lados - **escribe** `polygon -60, 50, 0, 100, 60, 50`", + "solution": "polygon -60, 50, 0, 100, 60, 50" + } + ], + "completion_text": "¡Felicitaciones! El fondo tiene 500 de ancho por 500 de alto - hay que ser muy hábil para moverse dentro de él", + "cover": "stickman.png" +} diff --git a/lib/challenges/locales/es/worlds/basic/sunnyday.json b/lib/challenges/locales/es/worlds/basic/sunnyday.json new file mode 100755 index 000000000..faf1227a9 --- /dev/null +++ b/lib/challenges/locales/es/worlds/basic/sunnyday.json @@ -0,0 +1,23 @@ +{ + "id": "sunnyday", + "title": "Día soleado", + "description": "Aprende lo básico de programación haciendo un despejado y soleado día.", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Siempre que ingresemos un comando debemos escribirlo en inglés. Primero vamos a llenar el fondo con un lindo cielo azul usando la palabra en inglés: **background** - **escribe** `background blue`", + "solution": "background blue" + }, + { + "hint": "Ahora necesitamos cambiar el color de dibujo a un amarillo brillante. Vamos a utilizar la palabra en inglés **yellow** - en una nueva línea **escribe** `color yellow`", + "solution": "color yellow" + }, + { + "hint": "Finalmente vamos a dibujar el sol. Usamos el comando de círculo seguido del tamaño que queremos que tenga. La palabra en inglés para círculo es **circle**. En una nueva línea **escribe** `circle 150`", + "solution": "circle 150" + } + ], + "completion_text": "¡Muy bien! Es un día soleado y brillante, ahora cambia el número que está al lado del círculo y mira lo que pasa", + "cover": "sunny-day.png" +} diff --git a/lib/challenges/locales/es/worlds/basic/swissflag.json b/lib/challenges/locales/es/worlds/basic/swissflag.json new file mode 100755 index 000000000..415d6d1e6 --- /dev/null +++ b/lib/challenges/locales/es/worlds/basic/swissflag.json @@ -0,0 +1,39 @@ +{ + "id": "swissflag", + "title": "Bandera de Suiza", + "description": "Haz la bandera de Suiza programando", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Bueno, es hora de probar algo un poco más desafiante. Podemos hacer del fondo un color sólido. Recuerda que fondo en inglés se dice **background**. **Escribe** `background red`.", + "solution": "background red" + }, + { + "hint": "Vamos a dibujar líneas. Necesitamos configurar un lindo trazo grueso. Cada vez que lo hagamos vamos a usar la palabra en inglés **stroke**. **Escribe** `stroke 66`", + "solution": "stroke 66" + }, + { + "hint": "Ahora configuremos el color del trazo a blanco. Vamos a necesitar la palabra ingelsa para blanco que es **white**. En la tercera línea **escribe** `stroke white`", + "solution": "stroke white" + }, + { + "hint": "Dibujemos nuestra primera línea. Ya decidimos que será blanca y que tendrá 66 píxeles de ancho. Vamos a dibujar una línea de 100 de largo con la ayuda de otra palabra en inglés **line**: **escribiendo** `line 100`.", + "solution": "line 100" + }, + { + "hint": "¡Qué línea corta y gruesa! Necesita una amiga. También vamos a hacerla de 100 píxeles de largo pero ahora en la dirección opuesta. **Escribe** `line -100`.", + "solution": "line -100" + }, + { + "hint": "Mucho mejor, ahora necesitamos líneas que vayan hacia arriba y hacia abajo. Pero ¿cómo lo vamos a hacer? La función de la línea puede contener dos números. El primero controla la posición horizontal, el segundo la posición vertical. **Escribe** `line 0, 100`", + "solution": "line 0, 100" + }, + { + "hint": "¡La línea va hacia abajo! Para que vaya hacia arriba tenemos que escribir **escribe** `line 0, -100`.", + "solution": "line 0, -100" + } + ], + "completion_text": "¡Qué linda bandera! Los suizos se caracterizan por sus excelentes diseños minimalistas.", + "cover": "swissflag.png" +} diff --git a/lib/challenges/locales/es/worlds/medium/dots.json b/lib/challenges/locales/es/worlds/medium/dots.json new file mode 100755 index 000000000..681c9ad06 --- /dev/null +++ b/lib/challenges/locales/es/worlds/medium/dots.json @@ -0,0 +1,39 @@ +{ + "id": "dots", + "title": "Patrón de puntos", + "description": "¡Crea un patrón de puntos usando ciclos y círculos!", + "code": "", + "startAt": 1, + "steps": [ + { + "hint": "Configura el color del fondo a rojo", + "solution": "background red" + }, + { + "hint": "Configura el trazo a 0", + "solution": "stroke 0" + }, + { + "hint": "Configura el color a amarillo", + "solution": "color yellow" + }, + { + "hint": "Ahora abre un ciclo - **escribe** `for x in [ 0 .. 25 ]`", + "solution": "for x in [ 0..25 ]" + }, + { + "hint": "Dentro del ciclo, abre un segundo ciclo - **escribe** `for y in [ 0 .. 25 ]`", + "solution": " for y in [ 0..25 ]" + }, + { + "hint": "Muévete, **escribe** `moveTo x * 20, y * 20`", + "solution": " moveTo x * 20, y * 20" + }, + { + "hint": "Ahora para hacer los puntos - **escribe** `circle 6`", + "solution": " circle 6" + } + ], + "completion_text": "¡Es matemático! Cambia los números y fíjate lo que sucede.", + "cover": "dots.png" +} diff --git a/lib/challenges/locales/es/worlds/medium/gradient.json b/lib/challenges/locales/es/worlds/medium/gradient.json new file mode 100755 index 000000000..c78e0042e --- /dev/null +++ b/lib/challenges/locales/es/worlds/medium/gradient.json @@ -0,0 +1,31 @@ +{ + "id": "gradient", + "title": "Arcoíris en degradé", + "description": "¡Combina ciclos y colores para hacer algo mágico!", + "code": "", + "startAt": 1, + "steps": [ + { + "hint": "Empecemos por abrir un ciclo - **escribe** `for x in [ 0 .. 25 ]`", + "solution": "for x in [ 0..25 ]" + }, + { + "hint": "Ahora abramos un segundo ciclo dentro del anterior - **escribe** `for y in [ 0 .. 25 ]`", + "solution": " for y in [ 0..25 ]" + }, + { + "hint": "Vamos a desplegar el espectro de colores - **escribe** `color rotate red, 10 * x + 10 * y`", + "solution": " color rotate red, 10 * x + 10 * y" + }, + { + "hint": "Ahora necesitamos repetir la distancia que nos vamos a mover cada vez que dibujemos - **escribe** `moveTo 20 * x, 20 * y`", + "solution": " moveTo 20 * x, 20 * y" + }, + { + "hint": "Ahora dibujemos los cuadrados de un tamaño de 20", + "solution": " square 20" + } + ], + "completion_text": "Intenta cambiar los números en el espectro de colores y fíjate lo que sucede.", + "cover": "gradient.png" +} diff --git a/lib/challenges/locales/es/worlds/medium/house.json b/lib/challenges/locales/es/worlds/medium/house.json new file mode 100755 index 000000000..5bc306dc2 --- /dev/null +++ b/lib/challenges/locales/es/worlds/medium/house.json @@ -0,0 +1,87 @@ +{ + "id": "house", + "title": "Casa", + "description": "¡Dibuja una casa acogedora!", + "code": "", + "startAt": 1, + "steps": [ + { + "hint": "¡Empecemos por el cielo! Configura el color del fondo a azul, usando los comandos en inglés", + "solution": "background blue" + }, + { + "hint": "Ahora configura el trazo a 0 usando stroke", + "solution": "stroke 0" + }, + { + "hint": "Muévete hacia la izquierda y arriba, **escribe** `move -150, -50`", + "solution": "move -150, -50" + }, + { + "hint": "Ahora configura el color a beige ¡se dice igual en inglés!", + "solution": "color beige" + }, + { + "hint": "Ahora dibuja un rectángulo, **escribe** `rectangle 300, 200`", + "solution": "rectangle 300, 200" + }, + { + "hint": "Muévete hacia la derecha y arriba, **escribe** `move 150, -100`", + "solution": "move 150, -100" + }, + { + "hint": "Configura el color a rojo oscuro, o darkred en inglés, para el techo", + "solution": "color darkred" + }, + { + "hint": "Ahora dibujemos el techo, **escribe** `polygon 170, 100, -170, 100`", + "solution": "polygon 170, 100, -170, 100" + }, + { + "hint": "Muévete hacia la izquierda y abajo, **escribe** `move -250, 300`", + "solution": "move -250, 300" + }, + { + "hint": "Ahora configura el color a verde para hacer el césped", + "solution": "color green" + }, + { + "hint": "Dibuja un rectángulo para el césped con las siguientes medidas 500, 100 usando `rectangle`", + "solution": "rectangle 500, 100" + }, + { + "hint": "Muévete hacia la derecha y arriba, **escribe** `move 220, -80`", + "solution": "move 220, -80" + }, + { + "hint": "Ahora configura el color a marrón (o brown en inglés) para hacer la puerta de madera", + "solution": "color brown" + }, + { + "hint": "Dibuja un rectángulo para la puerta con las siguientes medidas 60, 80", + "solution": "rectangle 60, 80" + }, + { + "hint": "Configura el color a 'aqua' para las ventanas", + "solution": "color aqua" + }, + { + "hint": "Muévete hacia la izquierda y arriba, **escribe** `move -80, -80`", + "solution": "move -80, -80" + }, + { + "hint": "Dibuja un cuadrado de 50 de tamaño, **escribe** `square 50`", + "solution": "square 50" + }, + { + "hint": "Muévete hacia la derecha, **escribe** `move 170`", + "solution": "move 170" + }, + { + "hint": "Dibuja otro cuadrado de 50 de tamaño", + "solution": "square 50" + } + ], + "completion_text": "¡Construiste una increíble casa usando código!", + "cover": "house.png" +} diff --git a/lib/challenges/locales/es/worlds/medium/index.json b/lib/challenges/locales/es/worlds/medium/index.json new file mode 100644 index 000000000..6d4e6623b --- /dev/null +++ b/lib/challenges/locales/es/worlds/medium/index.json @@ -0,0 +1,13 @@ +{ + "challenges": [ + "./shrinking", + "./random", + "./starry", + "./house", + "./dots", + "./gradient", + "./planet", + "./pizza" + ] +} + diff --git a/lib/challenges/locales/es/worlds/medium/pizza.json b/lib/challenges/locales/es/worlds/medium/pizza.json new file mode 100755 index 000000000..ed5fa2e29 --- /dev/null +++ b/lib/challenges/locales/es/worlds/medium/pizza.json @@ -0,0 +1,50 @@ +{ + "id": "pizza", + "title": "Pizza", + "description": "¡Programa una rica pizza!", + "startAt": 2, + "steps": [ + { + "hint": "Configura el color del trazo a beige", + "solution": "stroke beige" + }, + { + "hint": "Configura el tamaño del trazo a 50", + "solution": "stroke 50" + }, + { + "hint": "Configura el color a rojo", + "solution": "color red" + }, + { + "hint": "Dibuja un círculo de 200 de tamaño", + "solution": "circle 200" + }, + { + "hint": "¡Se ve sabrosa! Configura el trazo otra vez a 0", + "solution": "stroke 0" + }, + { + "hint": "Cúbrela con un rico queso amarillo en forma de círculo, de un tamaño de 195", + "solution": "color yellow\ncircle 195", + "validate": [ + "color yellow", + "circle 195" + ] + }, + { + "hint": "No es una pizza si no lleva ingredientes salpicadas por encima - configura el color de dibujo a rojo oscuro", + "solution": "color darkred" + }, + { + "hint": "Ahora muévete `moveTo 164, 290`", + "solution": "moveTo 164, 290" + }, + { + "hint": "Bien, ahora dibuja un círculo de 20 de tamaño", + "solution": "circle 20" + } + ], + "completion_text": "¡Qué rico! Termínala agregando más ingedientes, ¡deja fluir tu imaginación antes de compartirla al mundo!", + "cover": "pizza.png" +} diff --git a/lib/challenges/locales/es/worlds/medium/planet.json b/lib/challenges/locales/es/worlds/medium/planet.json new file mode 100755 index 000000000..f09fc4302 --- /dev/null +++ b/lib/challenges/locales/es/worlds/medium/planet.json @@ -0,0 +1,60 @@ +{ + "id": "planet", + "title": "Pintor de planetas", + "description": "¡Programa tu propio planeta!", + "startAt": 2, + "steps": [ + { + "hint": "Configura el fondo con un código hexadecimal- **escribe** `background '#444444'`", + "solution": "background '#444444'", + "validate": "background '\\#444444'" + }, + { + "hint": "Configura el trazo a 0, para evitar dibujar líneas", + "solution": "stroke 0" + }, + { + "hint": "Configura el color a amarillo", + "solution": "color yellow" + }, + { + "hint": "Ahora abramos un ciclo - **escribe** `for i in [ 0 .. 32 ]`", + "solution": "for i in [ 0..32 ]" + }, + { + "hint": "Ahora para configurar dónde irá cada estrella - **escribe** `moveTo (random 1, 500), (random 1, 500)`", + "solution": " moveTo (random 1, 500), (random 1, 500)", + "validate": "__ moveTo ?\\( *random +1, +500 *\\), +\\( *random +1, +500 *\\)" + }, + { + "hint": "Dibuja un círculo de un tamaño de 5 para las estrellas, se repetirán", + "solution": " circle 5" + }, + { + "hint": "Ahora para dibujar el planeta asegúrate de estar fuera del ciclo (es decir, sin sangría de línea) y **escribe** `color purple`", + "solution": "color purple" + }, + { + "hint": "Ahora muévete `moveTo 250, 250`", + "solution": "moveTo 250, 250" + }, + { + "hint": "Ahora dibuja un círculo de 170 de tamaño", + "solution": "circle 170" + }, + { + "hint": "Configura el color a blanco", + "solution": "color white" + }, + { + "hint": "Elige un trazo grueso y blanco - en una nueva línea, **escribe** `stroke white, 5`", + "solution": "stroke white, 5" + }, + { + "hint": "Ahora dibuja una elipse - **escribe** `ellipse 220, 4`", + "solution": "ellipse 220, 4" + } + ], + "completion_text": "¡Estupendo! ¡Cambia los colores y fíjate qué puedes agregar para hacerlo más atractivo antes de compartirlo!", + "cover": "planet.png" +} diff --git a/lib/challenges/locales/es/worlds/medium/random.json b/lib/challenges/locales/es/worlds/medium/random.json new file mode 100755 index 000000000..a64f9f776 --- /dev/null +++ b/lib/challenges/locales/es/worlds/medium/random.json @@ -0,0 +1,47 @@ +{ + "id": "random", + "title": "¡Aleatorio!", + "description": "¿No estás seguro de dónde ubicar algo? - ¡hay una función para eso!", + "startAt": 2, + "steps": [ + { + "hint": "Mueve el cursor a cualquier sitio - **escribe** `moveTo (random 1, 500), (random 1, 500)`", + "solution": "moveTo (random 1, 500), (random 1, 500)", + "validate": "__moveTo ?\\( *random +1, +500 *\\), +\\( *random +1, +500 *\\)" + }, + { + "hint": "Configura el color a rojo, en inglés es red - **escribe** `color red`", + "solution": "color red" + }, + { + "hint": "Ahora dibujemos un círculo en algún sitio aleatorio - **escribe** `circle 200`", + "solution": "circle 200" + }, + { + "hint": "Configura el color de dibujo a verde", + "solution": "color green" + }, + { + "hint": "Ahora dibuja un círculo de 150 de tamaño usando circle", + "solution": "circle 150" + }, + { + "hint": "Configura el color de dibujo a amarillo", + "solution": "color yellow" + }, + { + "hint": "Ahora dibuja un círculo de 100 de tamaño", + "solution": "circle 100" + }, + { + "hint": "Configura el color de dibujo a azul", + "solution": "color blue" + }, + { + "hint": "Termínalo dibujando un círculo de 50 de tamaño", + "solution": "circle 50" + } + ], + "completion_text": "La función aleatoria nos asigna un número para ubicar objetos en un punto aleatorio del lienzo.", + "cover": "random.png" +} diff --git a/lib/challenges/locales/es/worlds/medium/shrinking.json b/lib/challenges/locales/es/worlds/medium/shrinking.json new file mode 100755 index 000000000..4740b1f85 --- /dev/null +++ b/lib/challenges/locales/es/worlds/medium/shrinking.json @@ -0,0 +1,27 @@ +{ + "id": "shrinking", + "title": "Círculos que se encogen", + "description": "¡Círculos que se van encogiendo!", + "code": "", + "startAt": 1, + "steps": [ + { + "hint": "Configura el trazo a gris- **escribe** `stroke gray, 3`", + "solution": "stroke gray, 3" + }, + { + "hint": "Configura el color a transparente usando null (nulo) para poder ver a través - **escribe** `color null`", + "solution": "color null" + }, + { + "hint": "Vamos a dibujar 32 círculos todos de una vez, necesitaremos abrir un ciclo con un nuevo comando - **escribe** `for i in [ 0 .. 32 ]`", + "solution": "for i in [ 0..32 ]" + }, + { + "hint": "Genial, ahora para hacer los círculos - dentro del ciclo, **escribe** `circle 10 * i`", + "solution": " circle 10 * i" + } + ], + "completion_text": "¡Genial! Los ciclos nos permiten repetir secciones de código (¡nos ahorramos escribir!)", + "cover": "shrinking.png" +} diff --git a/lib/challenges/locales/es/worlds/medium/starry.json b/lib/challenges/locales/es/worlds/medium/starry.json new file mode 100644 index 000000000..14f3d801e --- /dev/null +++ b/lib/challenges/locales/es/worlds/medium/starry.json @@ -0,0 +1,37 @@ +{ + "id": "starry", + "title": "Cielo estrellado", + "description": "¡Programa tu propio cielo estrellado usando la función aleatoria!", + "startAt": 2, + "steps": [ + { + "hint": "Configura el color del fondo a azul oscuro, darkblue en inglés. Recuerda usar el comando también en inglés", + "solution": "background darkblue", + "validate": "^background darkblue$" + }, + { + "hint": "Ahora configura el trazo a 0", + "solution": "stroke 0" + }, + { + "hint": "Y configura el color de dibujo a amarillo", + "solution": "color yellow" + }, + { + "hint": "Ahora abramos un nuevo ciclo - **escribe** `for i in [ 0 .. 32 ]`", + "solution": "for i in [ 0..32 ]" + }, + { + "hint": "Ahora para determinar dónde irán las estrellas - **escribe** `moveTo (random 1, 500), (random 1, 500)`", + "solution": " moveTo (random 1, 500), (random 1, 500)", + "validate": "__ moveTo ?\\( *random +1, +500 *\\), +\\( *random +1, +500 *\\)" + + }, + { + "hint": "Finalmente dibuja las estrellas dibujando círculos de 5 de tamaño", + "solution": " circle 5" + } + ], + "completion_text": "¡Genial! Presiona la barra espaciadora y fíjate qué sucede con las estrellas...", + "cover": "starry-sky.png" +} diff --git a/lib/challenges/locales/es/worlds/mischiefweek2015/cat.json b/lib/challenges/locales/es/worlds/mischiefweek2015/cat.json new file mode 100755 index 000000000..772fa4f9a --- /dev/null +++ b/lib/challenges/locales/es/worlds/mischiefweek2015/cat.json @@ -0,0 +1,139 @@ +{ + "id": "cat", + "title": "Gato Misterioso", + "cover": "mischiefweek2015/mw-002-cat.png", + "description": "Crea un gato misterioso programando", + "start_date": "2015-10-27T06:00:00", + "startAt": 2, + "completion_text": "Buen trabajo ¡Hiciste un gato negro súper misterioso! Intenta cambiarle el color o quizás su cola. No olvides compartir tu gato cuando acabes.", + "steps": [ + { + "hint": "Podemos hacer del fondo algo negro y escalofriante **escribiendo** `background black`.", + "solution": "background black" + }, + { + "hint": "Configura el trazo a 0 así evitamos dibujar líneas. **Escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Ahora configuremos el color de la luna. **Escribe** `color lightgray`", + "solution": "color lightgray" + }, + { + "hint": "Dibuja un círculo grande para la luna. **Escribe** `circle 230`.", + "solution": "circle 230" + }, + { + "hint": "Ahora muévete hacia abajo para poder dibujar el césped. **Escribe** `moveTo 250, 500`.", + "solution": "moveTo 250, 500" + }, + { + "hint": "Es de noche, por eso usaremos un verde oscuro para el césped. **Escribe** `color darkgreen`.", + "solution": "color darkgreen" + }, + { + "hint": "Dibujemos una loma cubierta de césped usando una elipse. **Escribe** `ellipse 300, 100`", + "solution": "ellipse 300, 100" + }, + { + "hint": "Ahora configura el color de tu gato. Para hacerlo negro, **escribe** `color black`.", + "solution": "color black" + }, + { + "hint": "Mueve el cursor para dibujarlo en el medio **Escribe** `moveTo 250, 250`.", + "solution": "moveTo 250, 250" + }, + { + "hint": "Dibujemos la cabeza con una elipse. **Escribe** `ellipse 60, 40`.", + "solution": "ellipse 60, 40" + }, + { + "hint": "Vamos a movernos hacia la derecha y hacia arriba para dibujar una oreja. **Escribe** `moveTo 280, 220`.", + "solution": "moveTo 280, 220" + }, + { + "hint": "¡Vamos a usar la función polygon para dibujarle una linda y punteaguda oreja! **Escribe** `polygon 0, -40, 28, 20, close`.", + "solution": "polygon 0, -40, 28, 20, close" + }, + { + "hint": "Muévete hacia la izquierda para poder dibujar la otra oreja. **Escribe** `move -60`.", + "solution": "move -60" + }, + { + "hint": "¡Esta oreja es un reflejo de la anterior! **Escribe** `polygon 0, -40, -28, 20, close`.", + "solution": "polygon 0, -40, -28, 20, close" + }, + { + "hint": "Dibujemos el cuello. **Escribe** `moveTo 250, 310`.", + "solution": "moveTo 250, 310" + }, + { + "hint": "¡Dibújalo usando una elipse! **Escribe** `ellipse 30, 50`.", + "solution": "ellipse 30, 50" + }, + { + "hint": "Ahora haremos el cuerpo. **Escribe** `moveTo 250, 360`.", + "solution": "moveTo 250, 360" + }, + { + "hint": "¡Utilizaremos una elipse más grande esta vez! **Escribe** `ellipse 50, 60`.", + "solution": "ellipse 50, 60" + }, + { + "hint": "¡Ahora necesitamos movernos hacia abajo y a la derecha para hacerle la cola! **escribe** `moveTo 320, 380`.", + "solution": "moveTo 320, 380" + }, + { + "hint": "Vamos a utilizar un truco con la función text para hacerle una cola curva. **Escribe** `font 150`.", + "solution": "font 150" + }, + { + "hint": "Utilizaremos el texto en negrita. Para activarla **escribe** `bold true`.", + "solution": "bold true" + }, + { + "hint": "¡Bien! Ahora dibuja la cola **escribiendo** `text 'S'`.", + "solution": "text 'S'" + }, + { + "hint": "Finalmente, haremos los ojos. **Escribe** `moveTo 225, 250`.", + "solution": "moveTo 225, 250" + }, + { + "hint": "Configura el color a amarillo, yellow en inglés. **Escribe** `color yellow`.", + "solution": "color yellow" + }, + { + "hint": "Dibujaremos el primer ojo usando una elipse. **Escribe** `ellipse 14, 6`.", + "solution": "ellipse 14, 6" + }, + { + "hint": "Ahora para la pupila, configura el color a negro. **Escribe** `color black`.", + "solution": "color black" + }, + { + "hint": "Dibuja un círculo de un radio de 6. **Escribe** `circle 6`.", + "solution": "circle 6" + }, + { + "hint": "¡Genial! Ahora muévete hacia la derecha para dibujar el otro ojo. **Escribe** `moveTo 275, 250`.", + "solution": "moveTo 275, 250" + }, + { + "hint": "Configura el color de dibujo a amarillo. **Escribe** `color yellow`.", + "solution": "color yellow" + }, + { + "hint": "Dibuja la misma elipse que dibujaste antes. **Escribe** `ellipse 14,6`.", + "solution": "ellipse 14, 6" + }, + { + "hint": "Configura el color otra vez a negro. **Escribe** `color black`.", + "solution": "color black" + }, + { + "hint": "Por último, dibuja la segunda pupila. **Escribe** `circle 6`.", + "solution": "circle 6" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/mischiefweek2015/ghost.json b/lib/challenges/locales/es/worlds/mischiefweek2015/ghost.json new file mode 100755 index 000000000..8332feefa --- /dev/null +++ b/lib/challenges/locales/es/worlds/mischiefweek2015/ghost.json @@ -0,0 +1,136 @@ +{ + "id": "ghost", + "title": "Fantasma", + "description": "Dibuja tu propio fantasma ¡Cámbiale los colores!", + "start_date": "2015-10-30T06:00:00", + "code": "ghostColor = '#809B79'\nfaceColor = '#634E42'\ntongueColor = '#7A5750'\n", + "startAt": 0, + "steps": [ + { + "hint": "Necesitamos configurar algunas variables para el color del fantasma, ghost en inglés - **Escribe** `ghostColor = '#809B79'`", + "solution": "ghostColor = '#809B79'" + }, + { + "hint": "Otra variable para la cara, face en inglés - **Escribe** `faceColor = '#634E42'`", + "solution": "faceColor = '#634E42'" + }, + { + "hint": "Finalmente una variable para la lengua, tongue en inglés - **Escribe** `tongueColor = '#7A5750'`", + "solution": "tongueColor = '#7A5750'" + }, + { + "hint": "Usaremos figuras sólidas, sin trazo `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Nuestro fantasma dejará una estela por detrás que necesitamos dibujar primero. Configuremos el color a un tono más oscuro con `color darken(ghostColor, 10)`", + "solution": "color darken(ghostColor, 10)" + }, + { + "hint": "Muévete a la posición donde estará la estela con `move 0, 60`", + "solution": "move 0, 60" + }, + { + "hint": "Dibuja la estela con `circle 70`", + "solution": "circle 70" + }, + { + "hint": "Ahora dibujaremos el cuerpo del fantasma. Configura el color del fantasma a nuestra variable con `color ghostColor`", + "solution": "color ghostColor" + }, + { + "hint": "Ahora muévete otra vez hacia arriba y al centro para hacer el cuerpo con `move 0, -60`", + "solution": "move 0, -60" + }, + { + "hint": "Dibuja el cuerpo con `circle 100`", + "solution": "circle 100" + }, + { + "hint": "Ahora dibujaremos la boca con el color definido en la variable faceColor. **Escribe** `color faceColor`.", + "solution": "color faceColor" + }, + { + "hint": "Ahora muévete hacia la posición de la boca con `move -40, 10`", + "solution": "move -40, 10" + }, + { + "hint": "Dibuja un rectángulo para la boca con `rectangle 80, 35`", + "solution": "rectangle 80, 35" + }, + { + "hint": "Los dientes son polígonos. **Pista:** puedes copiar y pegar esto: `polygon 10, -10, 20, 0, 30, -10, 40, 0, 50, -10, 60, 0, 70, -10, 80, 0`", + "solution": "polygon 10, -10, 20, 0, 30, -10, 40, 0, 50, -10, 60, 0, 70, -10, 80, 0" + }, + { + "hint": "Ahora para la lengua, muévete a la parte baja de la boca con `move 40, 35`", + "solution": "move 40, 35" + }, + { + "hint": "Configura el color de dibujo al de nuestra variable con `color tongueColor`", + "solution": "color tongueColor" + }, + { + "hint": "La lengua es la mitad de un círculo de un radio de 25, el cual podemos dibujar con `arc 25, 0, 1`", + "solution": "arc 25, 0, 1" + }, + { + "hint": "Para los ojos, configura el color de dibujo con `color faceColor`", + "solution": "color faceColor" + }, + { + "hint": "Muévete a la posición de los ojos `move -40, -80`", + "solution": "move -40, -80" + }, + { + "hint": "El ojo lo dibujaremos con `circle 10`", + "solution": "circle 10" + }, + { + "hint": "Muévete para el segundo ojo con `move 80, 0`", + "solution": "move 80, 0" + }, + { + "hint": "Dibuja el segundo ojo con `circle 10`", + "solution": "circle 10" + }, + { + "hint": "Para las manos, hands en inglés, vamos a hacer algo nuevo: crear una función. **Escribe** `hand = ->`", + "solution": "hand = ->" + }, + { + "hint": "Esta sección sangrada es donde escribirás tu función. Cada vez que ingreses esta función, ejecutará todos los comandos que escribiremos a continuación. Configuremos el trazo para dibujar la mano con `stroke 10, darken(ghostColor, 10)`", + "solution": " stroke 10, darken(ghostColor, 10)" + }, + { + "hint": "Luego dibuja el primero de los tres dedos que haremos con `line 20, 30`", + "solution": " line 20, 30" + }, + { + "hint": "Luego el segundo con `line 0, 35`", + "solution": " line 0, 35" + }, + { + "hint": "El tercero con `line -20, 30`", + "solution": " line -20, 30" + }, + { + "hint": "Ahora para dibujar las manos asegúrate de estar fuera de la función presionando la tecla **BORRAR**. Luego **Escribe** `move 60, 100` para la primera mano.", + "solution": "move 60, 100" + }, + { + "hint": "Dibuja la mano en la posición actual con `hand()`", + "solution": "hand()" + }, + { + "hint": "Muévete hacia la izquierda para dibujar la otra mano con `move -200, 0`", + "solution": "move -200, 0" + }, + { + "hint": "Dibuja la última mano con `hand()`", + "solution": "hand()" + } + ], + "completion_text": "¡Bien hecho! Puedes cambiar el color de tu fantasma configurando otros colores que quieras para las variables ghostColor, faceColor, y tongueColor.", + "cover": "mischiefweek2015/mw-005-ghost.png" +} diff --git a/lib/challenges/locales/es/worlds/mischiefweek2015/hauntedhouse.json b/lib/challenges/locales/es/worlds/mischiefweek2015/hauntedhouse.json new file mode 100755 index 000000000..9af452867 --- /dev/null +++ b/lib/challenges/locales/es/worlds/mischiefweek2015/hauntedhouse.json @@ -0,0 +1,11 @@ +{ + "id": "hauntedhouse", + "title": "Casa Embrujada", + "description": "Acondiciona esta casa para Halloween y expresa tu creatividad.", + "start_date": "2015-11-01T06:00:00", + "completion_text": "¡Es noche de Halloween! Cambia los colores para hacer de esto un escenario nocturno y luego expresa tu creatividad combinando los desafíos anteriores o haciendo algunas travesuras. En los comentarios encontrarás algunas ideas para empezar.", + "startAt": 0, + "code": "#Colores que necesitan ser más escalofriantes\nsky = aqua\nground = green\nsun = yellow\nbricks = brown\nroof = red\nframes = gray\nwindows = blue\ndoor = setBrightness(brown,-40)\n\n#Cielo\nbackground sky\nstroke 0\nmoveTo 100, 100\ncolor sun\ncircle 60\n#Por qué no agregar nubes o murciélagos\n\n#Suelo\nmoveTo 250,530\ncolor ground\nellipse 500,150\n\n#Casa\nmoveTo 100,180\ncolor bricks\nrectangle 300,270\n\n#Ventanas\n#Haz alguna travesura, puedes ingeniártela para tirar huevos en solo tres líneas de comandos\ndrawWindow = (x,y) ->\n color setBrightness(frames,30)\n moveTo x,y\n rectangle 60,80\n color windows\n moveTo x+5,y+5\n rectangle 50,70\n color setBrightness(frames,30)\n moveTo x, y+37.5\n rectangle 60,5\n moveTo x+27.5, y\n rectangle 5,80\ndrawWindow(120,200)\ndrawWindow(220,200)\ndrawWindow(120,310)\ndrawWindow(320,200)\ndrawWindow(320,310)\n\n#Techo\ncolor roof\nmoveTo 100, 180\npolygon 150, -100, 300, 0\n#Puedes usar la función arc para cubrir el techo de papel higiénico \n\n\n#Puerta\ncolor setBrightness(frames,-10)\nmoveTo 215, 330\nrectangle 70,110\nmove 5,5\ncolor door\nrectangle 60,105\ncolor setBrightness(frames,-40) \nmove -15,105\nrectangle 90,20\nmove 65,-50\ncolor setBrightness(door,80)\ncircle 3\n#¿Qué tal si dibujas una calabaza al lado de la puerta?", + "steps": [], + "cover": "mischiefweek2015/mw-007-hauntedhouse.png" +} diff --git a/lib/challenges/locales/es/worlds/mischiefweek2015/index.json b/lib/challenges/locales/es/worlds/mischiefweek2015/index.json new file mode 100644 index 000000000..2bbe6689e --- /dev/null +++ b/lib/challenges/locales/es/worlds/mischiefweek2015/index.json @@ -0,0 +1,11 @@ +{ + "challenges": [ + "./skull", + "./cat", + "./pumpkin", + "./potion", + "./ghost", + "./spiderweb", + "./hauntedhouse" + ] +} diff --git a/lib/challenges/locales/es/worlds/mischiefweek2015/potion.json b/lib/challenges/locales/es/worlds/mischiefweek2015/potion.json new file mode 100755 index 000000000..80ab0cf95 --- /dev/null +++ b/lib/challenges/locales/es/worlds/mischiefweek2015/potion.json @@ -0,0 +1,96 @@ +{ + "id": "potion", + "title": "Frasco de Poción", + "description": "Elabora tu propia poción programando.", + "start_date": "2015-10-29T06:00:00", + "code": "", + "startAt": 2, + "completion_text": "¡Bien hecho! Puedes cambiar el color de tu poción al que tú quieras configurando potionColor. El vidrio lo haces opacando el blanco. Usando la función en inglés opacity(white, .4) le dará un buen efecto con cualquier color que elijas.", + "cover": "mischiefweek2015/mw-004-potion.png", + "steps": [ + { + "hint": "Queremos utilizar figuras sólidas para este desafío, entonces **escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Para que parezca oscuro configura el fondo con `background charcoal`", + "solution": "background charcoal" + }, + { + "hint": "Vamos a configurar una variable para el color de nuestra poción. Para hacerlo **escribe** `potionColor = purple`", + "solution": "potionColor = purple" + }, + { + "hint": "Muévete a la pocición con `move 0, 50`", + "solution": "move 0, 50" + }, + { + "hint": "Configura el color de dibujo con `color potionColor`", + "solution": "color potionColor" + }, + { + "hint": "Finalmente podemos dibujar la poción con `circle 90`", + "solution": "circle 90" + }, + { + "hint": "Queremos que el frasco esté completamente lleno, vamos a usar una línea para hacerlo. Configura el estilo de la línea con `stroke potionColor, 40`", + "solution": "stroke potionColor, 40" + }, + { + "hint": "Dibuja la línea desde el medio con `line 0, -120`.", + "solution": "line 0, -120" + }, + { + "hint": "Configura el trazo a cero para hacer el vidrio del frasco. **Escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Agreguemos otro círculo al interior del frasco para darle un toque natural a nuestra poción. Muévete hacia arriba y a la derecha con `move 30, -30`.", + "solution": "move 30, -30" + }, + { + "hint": "Configura el color de dibujo a un tono más oscuro del elegido para la poción con `color darken(potionColor, 10)`", + "solution": "color darken(potionColor, 10)" + }, + { + "hint": "Finalmente dibuja el círculo con `circle 20`", + "solution": "circle 20" + }, + { + "hint": "Muévete otra vez al centro con `move -30, 30`", + "solution": "move -30, 30" + }, + { + "hint": "Configura el color del vidrio del frasco haciéndolo opaco el blanco, usa `color opacity(white, .4)`", + "solution": "color opacity(white, .4)" + }, + { + "hint": "Luego dibuja el frasco haciendo un arco. **Escribe** `arc 100, 1.4, 1.6`", + "solution": "arc 100, 1.4, 1.6" + }, + { + "hint": "Observa cómo el arco casi llega a completar un círculo entero pero deja un espacio para encontrarse con el cuello de la botella. Dibujemos un corcho. **Escribe** `move 0, -130`", + "solution": "move 0, -130" + }, + { + "hint": "Configura el color de dibujo para el corcho con `color tan`", + "solution": "color tan" + }, + { + "hint": "Dibuja el corcho con `polygon 20, 0, 30, -40, -30, -40, -20, 0`", + "solution": "polygon 20, 0, 30, -40, -30, -40, -20, 0" + }, + { + "hint": "Ahora para el cuello del frasco, configuremos el trazo otra vez a color blanco transparente . **Escribe** `stroke 60, opacity(white, .4)`", + "solution": "stroke 60, opacity(white, .4)" + }, + { + "hint": "Muévete un poco hacia arriba para el cuello con `move 0, -25`", + "solution": "move 0, -25" + }, + { + "hint": "Finalmente dibuja el cuello de la botella con `line 0, 60`", + "solution": "line 0, 60" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/mischiefweek2015/pumpkin.json b/lib/challenges/locales/es/worlds/mischiefweek2015/pumpkin.json new file mode 100755 index 000000000..a04dbddbc --- /dev/null +++ b/lib/challenges/locales/es/worlds/mischiefweek2015/pumpkin.json @@ -0,0 +1,87 @@ +{ + "id": "pumpkin", + "title": "Calabaza", + "cover": "mischiefweek2015/mw-003-pumpkin.png", + "description": "No sería Halloween sin calabazas escalofriantes. Aprende a crear una calabaza y sé creativo cambiándole la cara.", + "start_date": "2015-10-28T06:00:00", + "completion_text": "¡Es una excelente linterna de calabaza! Pero necesita estar iluminada para ser verdaderamente escalofriante. ¿Puedes ingeniártelas para encender la calabaza cambiando algunos colores? También podrías alterar la cara para que se vea más escalofriante. Demuéstranos tu creatividad y luego comparte tu creación.", + "startAt": 0, + "steps": [ + { + "hint": "Vamos a configurar un escenario escalofriante, hazlo de noche - **escribe** `background charcoal`", + "solution": "background charcoal" + }, + { + "hint": "Lo más distintivo de las calabazas es su fuerte color naranja, para configurar el color de relleno - **escribe** `color orange`", + "solution": "color orange" + }, + { + "hint": "Vamos a usar trazos para aparentar la forma ondulada de la calabaza, usa la función darken (oscurecer) para crear contrastes en la cáscara de la calabaza - **escribe** `stroke darken(orange, 20), 30`", + "solution": "stroke darken(orange, 20), 30" + }, + { + "hint": "Crea tu calabaza parte por parte usando elipses - **escribe** `ellipse 180, 140`", + "solution": "ellipse 180, 140" + }, + { + "hint": "Dibuja otra parte - **escribe** `ellipse 130, 140`", + "solution": "ellipse 130, 140" + }, + { + "hint": "Ya comienza a tomar forma, dibuja otra parte - **escribe** `ellipse 50, 140`", + "solution": "ellipse 50, 140" + }, + { + "hint": "Las calabazas son frutos y por eso tenemos que dibujarle un tallo verde - **escribe** `color green`", + "solution": "color green" + }, + { + "hint": "Configura el trazo a 0, por ahora no lo utilizaremos - **escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Mueve el cursor a la parte de arriba de la calabaza - **escribe** `move -20, -180`", + "solution": "move -20, -180" + }, + { + "hint": "Dibuja el tallo grueso de la calabaza - **escribe** `square 40`", + "solution": "square 40" + }, + { + "hint": "Ahora que ya tenemos una calabaza fresca podemos avanzar a la parte divertida dándole diseño - **escribe** `color black`", + "solution": "color black" + }, + { + "hint": "Vamos a dibujarle la cara, mueve el cursor al lugar de los ojos - **escribe** `moveTo 190, 275`", + "solution": "moveTo 190, 275" + }, + { + "hint": "Dibuja un agujero para el primer ojo - **escribe** `circle 15`", + "solution": "circle 15" + }, + { + "hint": "Mueve el cursor a donde estará el segundo ojo - **escribe** `moveTo 310, 275`", + "solution": "moveTo 310, 275" + }, + { + "hint": "Dibuja un segundo agujero del mismo tamaño que el primero - **escribe** `circle 15`", + "solution": "circle 15" + }, + { + "hint": "Ahora necesitamos darle una boca - **escribe** `moveTo 250, 320`", + "solution": "moveTo 250, 320" + }, + { + "hint": "Necesitamos eliminar el color de relleno configurándolo a transparente - **escribe** `color null`", + "solution": "color null" + }, + { + "hint": "Utilizaremos un trazo grueso y negro para la boca - **escribe** `stroke 15, black`", + "solution": "stroke 15, black" + }, + { + "hint": "Finalmente, vamos a utilizar el comando arc (dibujará un arco) para darle una sonrisa. - **escribe** `arc 40, 1, 2, true`", + "solution": "arc 40, 1, 2, true" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/mischiefweek2015/skull.json b/lib/challenges/locales/es/worlds/mischiefweek2015/skull.json new file mode 100755 index 000000000..cc5cec4f8 --- /dev/null +++ b/lib/challenges/locales/es/worlds/mischiefweek2015/skull.json @@ -0,0 +1,75 @@ +{ + "id": "skull", + "title": "Calavera", + "cover": "mischiefweek2015/mw-001-skull.png", + "start_date": "2015-10-26T06:00:00", + "description": "", + "completion_text": "¡Increíble calavera! Puedes agregarle un fondo con algún patrón o algunos accesorios faciales. Cuando hayas finalizado, ¡no olvides compartir tu creación!", + "startAt": 0, + "steps": [ + { + "hint": "Primero debemos ambientar el escenario escalofriante, hazlo de noche - **escribe** `background charcoal`", + "solution": "background charcoal" + }, + { + "hint": "Vamos a dibujar figuras sólidas sin utilizar el trazo, entonces **escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Podemos movernos hacia la posición de la calavera utilizando `moveTo 250, 200`", + "solution": "moveTo 250, 200" + }, + { + "hint": "Nuestra calavera debería ser blanca, entonces configura el color de dibujo a blanco usando `color white`", + "solution": "color white" + }, + { + "hint": "La calavera la haremos con una elipse, una especie de círculo estirado. Dibújala escribiendo `ellipse 140, 120`", + "solution": "ellipse 140, 120" + }, + { + "hint": "Ya comienza a tomar forma, para terminar el cráneo mueve el cursor - **escribe** `move -60, 90`", + "solution": "move -60, 90" + }, + { + "hint": "La mandíbula de la calavera es un cuadrado, dibújalo usando `square 120`", + "solution": "square 120" + }, + { + "hint": "Muévete hacia arriba para dibujar los ojos - **escribe** `move 10, -50`", + "solution": "move 10, -50" + }, + { + "hint": "Los ojos de nuestra calavera están tan vacíos que te penetran el alma, llevarán el mismo color del fondo. Configúralo usando `color charcoal`", + "solution": "color charcoal" + }, + { + "hint": "El ojo es un círculo. Dibújalo con `circle 40`", + "solution": "circle 40" + }, + { + "hint": "Muévete para dibujar el otro ojo. **Escribe** `move 100`", + "solution": "move 100" + }, + { + "hint": "Ahora dibuja el otro ojo con `circle 40`", + "solution": "circle 40" + }, + { + "hint": "Muévete para hacer la nariz con `move -50, 60`", + "solution": "move -50, 60" + }, + { + "hint": "Luego dibuja la nariz con `circle 10`", + "solution": "circle 10" + }, + { + "hint": "Finalmente, para la boca muévete hacia abajo **escribiendo** `move -40, 60`", + "solution": "move -40, 60" + }, + { + "hint": "Finalmente, dibuja la boca con un rectángulo, usa `rectangle 80, 20`", + "solution": "rectangle 80, 20" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/mischiefweek2015/spiderweb.json b/lib/challenges/locales/es/worlds/mischiefweek2015/spiderweb.json new file mode 100644 index 000000000..c18530fe5 --- /dev/null +++ b/lib/challenges/locales/es/worlds/mischiefweek2015/spiderweb.json @@ -0,0 +1,12 @@ +{ + "id": "spiderweb", + "title": "Telaraña", + "description": "¡Juega con la telaraña!", + "completion_text": "¡Feliz Halloween! El desafío de hoy es que juegues con los comandos que ya están ingresados. ¿Puedes cambiar el color de la telaraña? ¿O el tamaño? ¡Gracias al miembro de la comunidad @NOPx90 que programó esta telaraña!", + "cover": "mischiefweek2015/mw-006-spiderweb.png", + "start_date": "2015-10-31T06:00:00", + "startAt": 0, + "code": "# JUEGA CON ESTO\nradius = 370\nframes = 30\nbridges = 10\ndegrees = 360\nrotation = 0\n\nbodySize = 80\nlegSpread = 90\nlegLength = 100\neyeSize = 4\neyeSpacing = 12\n\n\n# Esto define la telaraña\nclass SpiderWeb\n constructor: (@x, @y, @radius, @frames, @bridges, @degrees, @rotation) ->\n @x = @x ? 250\n @y = @y ? 250\n @radius = @radius ? 250\n @frames = @frames ? 16\n @bridges = @bridges ? 20\n @degrees = @degrees ? 360\n @rotation = @rotation ? 0\n @frameAngle = @degrees / @frames\n @draw()\n drawFrame: () ->\n moveTo @x , @y\n for i in [ 0 .. @frames ]\n if i * @frameAngle != 360\n radians = (i * @frameAngle + @rotation)*(Math.PI / 180)\n x = Math.cos(radians)\n y = -Math.sin(radians)\n line (x*@radius) , (y*@radius)\n drawBridge: () ->\n r = @radius\n for web in [ 1 .. @bridges ]\n r /= 1.2\n for i in [ 0 ... @frames ]\n # Posición inicial\n r1 = (i * @frameAngle + @rotation)*(Math.PI / 180)\n x1 = Math.cos(r1)\n y1 = -Math.sin(r1)\n \n # Posición final\n r2 = (i * @frameAngle + @frameAngle + @rotation)*(Math.PI / 180)\n x2 = Math.cos(r2)\n y2 = -Math.sin(r2)\n moveTo x1 * r + @x , y1 * r + @y\n lineTo x2 * r + @x , y2 * r + @y\n draw: ( ) ->\n this.drawFrame()\n this.drawBridge()\n\n# Aquí se ubica el dibujo\nbackground setSaturation(darkpurple,-25)\nstroke white\nweb = new SpiderWeb(250,250, radius, frames, bridges, degrees, rotation)\nCuerpo de la Araña\nstroke white, 10\nmoveTo 250, 0\nline 0, 200\nmove 0, 200\ncolor black\nstroke 0\nellipse bodySize * 0.8, bodySize\n# Patas de la Arañas\nstroke black, 5\ncolor null\npairOfLegs = (flipHori,flipVert) ->\n spread = legSpread * flipHori\n length = legLength * flipVert\n polygon spread, length, spread * 0.7, length * 2\n polygon spread * 1.3, length * 0.4, spread * 1.7, length * 1.5\npairOfLegs(1,1)\npairOfLegs(-1,1)\npairOfLegs(1,-1)\npairOfLegs(-1,-1)\n\n#Cabeza de la Araña\nstroke 0\ncolor black\nmove 0, bodySize\nellipse bodySize * 0.5, bodySize * 0.4\ncolor orangered\nmove eyeSpacing * -1.5, eyeSpacing / -2\nfor [1 .. 4]\n circle eyeSize\n move 0, eyeSpacing\n circle eyeSize\n move eyeSpacing, eyeSpacing * -1\n", + "steps": [ + ] +} diff --git a/lib/challenges/locales/es/worlds/pixelhack/chest.json b/lib/challenges/locales/es/worlds/pixelhack/chest.json new file mode 100755 index 000000000..71161b6c4 --- /dev/null +++ b/lib/challenges/locales/es/worlds/pixelhack/chest.json @@ -0,0 +1,104 @@ +{ + "id": "chest", + "title": "Cofre", + "description": "Descubre un misterioso cofre programando", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Los Juegos de rol se convirtieron en uno de los géneros de videojuegos más populares de los años 80. Uno de los objetos más comunes de estos juegos es el cofre. Empecemos por ambientar el escenario configurando el color del fondo **escribe** `background darkslategray`", + "solution": "background darkslategray" + }, + { + "hint": "Luego vamos a desactivar el trazo **escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Posiciona el cursor en la esquina izquierda de arriba donde estará ubicado el cofre - **escribe** `move -150,-100`", + "solution": "move -150,-100" + }, + { + "hint": "Configura el color a dorado para dar la impresión de riquezas dentro del cofre **escribe** `color gold`", + "solution": "color gold" + }, + { + "hint": "Vamos a usar capas para limitar el número de formas que tenemos que dibujar. Primero dibuja el borde dorado con un rectángulo de 300 por 200 de tamaño", + "solution": "rectangle 300,200" + }, + { + "hint": "Ahora vamos a realzar el color dorado **escribe** `color lightyellow`", + "solution": "color lightyellow" + }, + { + "hint": "En el arte en 8-bits, los detalles simples significan mucho para el objeto, agrega un rectángulo de 25 por 100 para darle brillo al dorado", + "solution": "rectangle 25,100" + }, + { + "hint": "Mueve el cursor y prepárate para dibujar la parte de madera del cofre **escribe** `move 25,0`", + "solution": "move 25,0" + }, + { + "hint": "Cambia el color de relleno a marrón **escribe** `color brown`", + "solution": "color brown" + }, + { + "hint": "Usaremos marrón sobre el dorado así parece que un borde dorado mantiene unidas las tablas de madera del cofre **escribe** `rectangle 250,175`", + "solution": "rectangle 250,175" + }, + { + "hint": "Mueve el cursor para dividir el cofre dibujando la tapa **escribe** `move 0,60`", + "solution": "move 0,60" + }, + { + "hint": "Cambia el `color` a dorado otra vez", + "solution": "color gold" + }, + { + "hint": "Dibuja la juntura con un rectángulo de 250 por 25", + "solution": "rectangle 250,25" + }, + { + "hint": "Ahora continuaremos con los efectos para realzar los colores **escribe** `color lightyellow`", + "solution": "color lightyellow" + }, + { + "hint": "Continua con los efectos dibujando un cuadrado de 25 de tamaño", + "solution": "square 25" + }, + { + "hint": "Finalmente, lo terminaremos dibujando una cerradura. Mueve el cursor al medio del cofre **escribe** `move 75,-25`", + "solution": "move 75,-25" + }, + { + "hint": "Configura el `color` a dorado para que combine con el borde", + "solution": "color gold" + }, + { + "hint": "Dibuja un rectángulo de 100 por 75", + "solution": "rectangle 100,75" + }, + { + "hint": "Muévete para terminar la cerradura **escribe** `move 25,25`", + "solution": "move 25,25" + }, + { + "hint": "Configura el color a marrón oscuro", + "solution": "color darkbrown" + }, + { + "hint": "Por último, dibuja un rectángulo de 50 por 75", + "solution": "rectangle 50,75" + } + ], + "completion_text": "Ese cofre se ve genial, ¡me pregunto qué esconderá dentro!", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "chest-nether.png", + "chest-sunken.png", + "chest-open.png" + ] + }, + "cover": "pixel-chest.png", + "guide": "#### Nuevas palabras\n**square** size | square 25\n\nEsta es una versión más corta del rectángulo \n\n#### Lo que crearás\n1. Los Juegos de rol se convirtieron en uno de los géneros de videojuegos más populares de los años 80. Uno de los objetos más comunes de estos juegos es el cofre, empecemos por ambientar el escenario configurando el color del fondo **escribe** `background darkslategray`\n2. Luego vamos a desactivar el trazo **escribe** `stroke 0`\n3. Posiciona el cursor en la esquina izquierda de arriba donde estará ubicado el cofre - **escribe** `move -150,-100`\n4. Configura el color a dorado para dar la impresión de riquezas dentro del cofre **escribe** `color gold`\n5. Vamos a usar capas para limitar el número de formas que tenemos que dibujar, primero dibuja el borde dorado con un rectángulo de 300 por 200 de tamaño\n6. Ahora vamos a realzar el color dorado **escribe** `color lightyellow`\n7. En el arte en 8-bits, los detalles simples significan mucho para el objeto, agrega un rectángulo de 25 por 100 para darle brillo al dorado\n8. Mueve el cursor y prepárate para dibujar la parte de madera del cofre **escribe** `move 25,0`\n9. Cambia el color de dibujo a marrón **escribe** `color brown`\n10. Usaremos marrón sobre el dorado así parece que un borde dorado mantiene unidas las tablas de madera del cofre **escribe** `rectangle 250,175`\n11. Mueve el cursor para dividir el cofre dibujando la tapa **escribe** `move 0,60`\n12. Cambia el `color` a dorado\n13. Dibuja la juntura con un rectángulo de 250 por 25\n14. Ahora continuaremos con los efectos para realzar los colores **escribe** `color lightyellow`\n15. Continua con los efectos dibujando un cuadrado de 25 de tamaño\n16. Finalmente, lo terminaremos dibujando una cerradura. Mueve el cursor al medio del cofre **escribe** `move 75,-25`\n17. Configura el `color` a dorado para que combine con el borde\n18. Dibuja un rectángulo de 100 por 75\n19. Muévete para terminar la cerradura **escribe** `move 25,25`\n20. Configura el color a marrón oscuro\n21. Por último, dibuja un rectángulo de 50 por 75\n\n#### Lo que hackearás\nAl cambiar los colores y agregar formas puedes generar un clima particular alrededor de tu cofre. Para algo más complejo, cambia los comandos para que tu cofre esté abierto y se vea algún premio dentro.\n\n#### Informe\nEl cofre ha aparecido en muchos videojuegos. Predominantemente en los juegos de The Legend of Zelda, donde escondían desde pequeños premios de dinero hasta poderosas armas y herramientas. Lo que contenga este cofre, depende de ti. Cuando termines de crearlo, ábrelo y colócale dentro el premio que se te ocurra.\n" +} diff --git a/lib/challenges/locales/es/worlds/pixelhack/colorfrenzy.json b/lib/challenges/locales/es/worlds/pixelhack/colorfrenzy.json new file mode 100755 index 000000000..22239bd35 --- /dev/null +++ b/lib/challenges/locales/es/worlds/pixelhack/colorfrenzy.json @@ -0,0 +1,43 @@ +{ + "id": "colorfrenzy", + "title": "Frenesí de colores", + "description": "Utiliza un ciclo para dibujar un patrón en 8-bits.", + "startAt": 2, + "steps": [ + { + "hint": "Únicamente utilizaremos figuras sólidas sin trazo. Entonces **escribe** `stroke 0`.", + "solution": "stroke 0" + }, + { + "hint": "Para este dibujo usaremos dos ciclos. Uno para que se repita verticalmente y otro horizontalmente **Escribe** `for x in [ 0 .. 20 ]`", + "solution": "for x in [ 0 .. 20 ]" + }, + { + "hint": "Para el segundo ciclo **escribe** `for y in [ 0 .. 20 ]`", + "solution": " for y in [ 0 .. 20 ]" + }, + { + "hint": "Configura el color utilizando `color rotate red, x + y * 10`", + "solution": " color rotate red, x + y * 10" + }, + { + "hint": "Posiciónate utilizando `moveTo x * 25, y * 25`", + "solution": " moveTo x * 25, y * 25" + }, + { + "hint": "Finalmente, agreguemos cuadrados. **Escribe** `square 25`", + "solution": " square 25" + } + ], + "completion_text": "¡Bien hecho! La función rotate, rota todos los colores creando el efecto de un arcoíris.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "color-quint.png", + "color-multi.png", + "color-random.png" + ] + }, + "cover": "pixel-colorfrenzy.png", + "guide": "#### Lo que crearás\n1. Únicamente utilizaremos figuras sólidas sin trazo. Entonces **escribe** `stroke 0`.\n2. Para este dibujo usaremos dos ciclos. Uno para que se repita verticalmente y otro horizontalmente **Escribe** `for x in [ 0 .. 20 ]`\n3. Para el segundo ciclo **escribe** `for y in [ 0 .. 20 ]`\n4. Configura el color utilizando `color rotate red, x * 10`\n5. Posiciónate utilizando `moveTo x * 25, y * 25`\n6. Finalmente, agreguemos cuadrados. **Escribe** `square 25`\n\n#### Lo que hackearás\nComo estás viajando a través de los ejes X e Y, puedes obtener lindas combinaciones de colores. Usando la matemática, puedes hacer que el arcoíris se repita de manera interesante, y cambiar tu forma de dibujar usando la función aleatoria. Hay muchas variaciones posibles, ¡fíjate lo que puedes descubrir!\n\n#### Informe\nUtilizamos un sólo ciclo en los desafíos anteriores para reptir una única acción, esta vez estaremos utilizando dos. El primero recorrerá la cooredenada X y el segundo la coordenada Y. Al tener dos ciclos, podemos controlar el color en ambas direcciones (horizontal y vertical) y también dibujar cuadrados en esas direcciones ¡Nos permitirán llenar el fondo de puro color!\n" +} diff --git a/lib/challenges/locales/es/worlds/pixelhack/diamondblock.json b/lib/challenges/locales/es/worlds/pixelhack/diamondblock.json new file mode 100755 index 000000000..c25430255 --- /dev/null +++ b/lib/challenges/locales/es/worlds/pixelhack/diamondblock.json @@ -0,0 +1,72 @@ +{ + "id": "diamondblock", + "title": "Bloque de diamantes en 8-bits", + "description": "Crea un bloque de diamantes con ciclos.", + "startAt": 2, + "steps": [ + { + "hint": "Configura el trazo a 0 usando stroke.", + "solution": "stroke 0" + }, + { + "hint": "Utilizaremos dos ciclos para la piedra. **Escribe** `for x in [0 ... 16]`", + "solution": "for x in [0 ... 16]" + }, + { + "hint": "Para Y utiliza `for y in [0 ... 16]`", + "solution": " for y in [0 ... 16]" + }, + { + "hint": "Utilizaremos distintos tonos de gris elegidos aleatoriamente para la piedra. **Escribe** `color darken gray, random -6, 9`", + "solution": " color darken gray, random -6, 9", + "validate": " color darken gray, random -6, 9" + }, + { + "hint": "Muévete en la posición para cada cuadrado utilizando `moveTo x * 31.25, y * 31.25`", + "solution": " moveTo x * 31.25, y * 31.25" + }, + { + "hint": "Finalmente dibuja los cuadrados utilizando `square 32`", + "solution": " square 32", + "validate": " square 32" + }, + { + "hint": "Sal de este ciclo posicionando el cursor al comienzo del renglón usando la tecla para borrar. Abriremos un nuevo par de ciclos para dibujar el diamante. **Escribe** `for x in [2 ... 14]`", + "solution": "for x in [2 ... 14]" + }, + { + "hint": "Esta vez empezaremos en 2 y terminaremos en 14 porque queremos que el diamante aparezca en la mitad del bloque.**Escribe** `for y in [2 ... 14]`", + "solution": " for y in [2 ... 14]" + }, + { + "hint": "El diamante debería aparecer aleatoriamente, una sentencia condicional (if statement) nos permitirá hacerlo. **Escribe** `if 1 == random 0, 4`", + "solution": " if 1 == random 0, 4", + "validate": " if 1 == random 0, 4" + }, + { + "hint": "Configura el color del diamante utilizando `color lighten lightblue, random 0, 40`", + "solution": " color lighten lightblue, random 0, 40", + "validate": " color lighten lightblue, random 0, 40" + }, + { + "hint": "Muévete en la posición para cada cuadrado utilizando `moveTo x * 31.25, y * 31.25`", + "solution": " moveTo x * 31.25, y * 31.25" + }, + { + "hint": "Finalmente dibuja los cuadrados de diamante utilizando `square 32`", + "solution": " square 32", + "validate": " square 32" + } + ], + "completion_text": "¡Has hackeado los píxeles! ¡Felicitaciones y bien hecho!", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "diamond-obsidian.png", + "diamond-rainbow.png", + "diamond-lotsof.png" + ] + }, + "cover": "pixel-diamondblock.png", + "guide": "#### Lo que crearás\n1. Configura el trazo a 0 usando stroke.\n2. Utilizaremos dos ciclos para la piedra. **Escribe** `for x in [0 ... 16]`\n3. Para Y utiliza `for y in [0 ... 16]`\n4. Utilizaremos distintos tonos de gris elegidos aleatoriamente para la piedra. **Escribe** `color darken gray, random -6, 9`\n5. Muévete en la posición para cada cuadrado utilizando `moveTo x * 31.25, y * 31.25`\n6. Finalmente dibuja los cuadrados utilizando `square 32`\n7. Sal de este ciclo posicionando el cursor al comienzo del renglón usando la tecla para borrar. Abriremos un nuevo par de ciclos para dibujar el diamante. **Escribe** `for x in [2 ... 14]`\n8. Esta vez empezaremos en 2 y terminaremos en 14 porque queremos que el diamante aparezca en la mitad del bloque.**Escribe** `for y in [2 ... 14]`\n9. El diamante debería aparecer aleatoriamente, la función if nos permitirá hacerlo. **Escribe** `if 1 == random 0, 4`\n10. Configura el color del diamante utilizando `color lighten lightblue, random 0, 40`\n11. Muévete en la posición para cada cuadrado utilizando `moveTo x * 31.25, y * 31.25`\n12. Finalmente dibuja los cuadrados de diamante utilizando `square 32`\n\n#### Lo que hackearás\nPara personalizar este bloque de diamantes de Minecraft todo lo que debes hacer es cambiar dos variables: el color de arriba y el color de abajo. Crea una fresa, un bloque de agua o de cualquier otra cosa únicamente cambiando esas dos líneas de comandos. Para añadir complejidad, crea un bloque de micelio usando un ciclo y la función aleatoria. Si de verdad buscas un desafío, intenta incorporar lo que aprendimos antes y utiliza los valores de X e Y para rotar los tonos de los colores.\n\n#### Informe\nLa gran final: diamantes. Este es el bloque más preciado y buscado en Minecraft. Utilizarás un ciclo anidado para dibujar la piedra, otro para dibujar los diamantes. Pero como los diamantes deberían estar salpicados a lo largo de la piedra, utilizaremos una sentencia condicional (if statement) y un número aleatorio para determinar dónde aparecerán los cuadrados. Además, queremos dibujar el diamante únicamente en el sector del medio del bloque, por eso el ciclo irá de 2 a 14 y no de 0 a 16.\n" +} diff --git a/lib/challenges/locales/es/worlds/pixelhack/forloop.json b/lib/challenges/locales/es/worlds/pixelhack/forloop.json new file mode 100755 index 000000000..c6f7d601d --- /dev/null +++ b/lib/challenges/locales/es/worlds/pixelhack/forloop.json @@ -0,0 +1,95 @@ +{ + "id": "forloop", + "title": "For Loop", + "description": "Usa un Ciclo for para crear fácilmente una viborita.", + "startAt": 2, + "steps": [ + { + "hint": "Vamos a recrear el clásico juego de la serpiente usando el poder de los ciclos for. For significa por en inglés y esta función útil nos permite evitar dibujar círculo por círculo. Primero configura un fondo sucio - **escribe** `background tan`", + "solution": "background tan" + }, + { + "hint": "Configura el trazo a 0 **escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Primero posicionemos la cabeza de la viborita **escribe** `moveTo 80,250`", + "solution": "moveTo 80,250" + }, + { + "hint": "Configura un color de víbora **escribe** `color olivedrab`", + "solution": "color olivedrab" + }, + { + "hint": "Dibuja un círculo de 30 píxeles de tamaño para la cabeza", + "solution": "circle 30" + }, + { + "hint": "Este es el momento en el que configuraremos el ciclo, usando la función for. El primer número indica dónde comenzar a contar y el segundo hasta qué número contar. Entonces 1 .. 7 hace que la computadora cuente hasta 7 - **escribe** `for [1 .. 7]`", + "solution": "for [1 .. 7]" + }, + { + "hint": "Cualquier cosa dentro de este ciclo se repetirá 7 veces, necesitamos utilizar la función move para posicionar cada parte del cuerpo - **escribe** `move 50,0`", + "solution": " move 50,0" + }, + { + "hint": "Configura el color del cuerpo - **escribe** `color olivedrab`", + "solution": " color olivedrab" + }, + { + "hint": "Una vez que dibujemos un círculo, verás como se repite el código una cierta cantidad de veces - **escribe** `circle 30`", + "solution": " circle 30" + }, + { + "hint": "Agreguemos cuadrados para que el cuerpo parezca más segmentado, fíjate que aparecen 7 figuras por cada línea del código - **escribe** `square 30`", + "solution": " square 30" + }, + { + "hint": "Le agregaremos otro detalle a la cola, configura el color a verde oscuro, darkgreen en inglés", + "solution": " color darkgreen" + }, + { + "hint": "Dibuja otro círculo, el código todavía está programado para que se repita 7 veces - **escribe** `circle 20`", + "solution": " circle 20" + }, + { + "hint": "Finalmente, dibuja un cuadrado de un tamaño de 20 píxeles", + "solution": " square 20" + }, + { + "hint": "Para lo siguiente asegúrate de estar fuera del ciclo for presionando la tecla borrar. Vamos a dibujar el ojo - **escribe** `moveTo 70,240`", + "solution": "moveTo 70,240" + }, + { + "hint": "Cambia el `color` de dibujo a negro", + "solution": "color black" + }, + { + "hint": "Dibuja una `ellipse` de 10 píxeles de ancho y 5 de alto.", + "solution": "ellipse 10,5" + }, + { + "hint": "Finalmente le dibujaremos una lengua, para que pueda silbar como toda víbora - **escribe** `color salmon`", + "solution": "color salmon" + }, + { + "hint": "Posiciónala en la cara - **escribe** `move -15, 20`", + "solution": "move -15, 20" + }, + { + "hint": "Dibujaremos un rectángulo con el ancho en negativo para hacer que la lengua salga directo de la boca - **escribe** `rectangle -20,4`", + "solution": "rectangle -20,4" + } + ], + "completion_text": "Ya has experimentado cómo hacer arte con menos líneas de códigos usando ciclos de manera inteligente. ¿Por qué no intentar cambiar el número 7 y ver qué sucede?", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "snake-tiny.png", + "snake-apple.png", + "snake-corner.png" + ] + }, + "cover": "pixel-forloop.png", + "guide": "#### Nueva palabra\n**for i in [rangoMinimo ... rangoMax]**| for in [0 .. 10]\n\nEl ciclo for ejecuta el comando tantas veces como lo indique el rango. 10 veces para un rango de [0 … 10] y 20 veces para un rango de [0 … 20].\n\n#### Lo que crearás\n1. Vamos a recrear el clásico juego de la Viborita usando el poder de los ciclos para evitar dibujar círculo por círculo. Primero configura un fondo sucio - **escribe** `background tan`\n2. Configura el trazo a 0 **escribe** `stroke 0`\n3. Primero posicionemos la cabeza de la viborita **escribe** `moveTo 80,250`\n4. Configura un color de víbora **escribe** `color olivedrab`\n5. Dibuja un círculo de 30 píxeles de tamaño para la cabeza\n6. Este es el momento en el que configuraremos el ciclo, usando la función for. El primer número indica dónde comenzar a contar y el segundo hasta qué número contar. Entonces 1 .. 7 hace que la computadora cuente hasta 7 - **escribe** `for [1 .. 7]`\n7. Cualquier cosa dentro de este ciclo se repetirá 7 veces, necesitamos utilizar la función move para posicionar cada parte del cuerpo - **escribe** `move 50,0`\n8. Configura el color del cuerpo - **escribe** `color olivedrab`\n9.Una vez que dibujemos un círculo, verás como se repite el código una cierta cantidad de veces - **escribe** `circle 30`\n10. Agreguemos cuadrados para que el cuerpo parezca más segmentado, fíjate que aparecen 7 figuras por cada línea del código - **escribe** `square 30`\n11. Le agregaremos otro detalle a la cola, configura el color a verde oscuro, darkgreen en inglés\n12. Dibuja otro círculo, el código todavía está programado para que se repita 7 veces - **escribe** `circle 20`\n13. Finalmente, dibuja un cuadrado de un tamaño de 20 píxeles\n14. Para lo siguiente asegúrate de estar fuera del ciclo for presionando la tecla borrar. Vamos a dibujar el ojo - **escribe** `moveTo 70,240`\n15. Cambia el `color` de dibujo a negro\n16. Dibuja una `ellipse` de 10 píxeles de ancho y 5 de alto.\n17. Finalmente le dibujaremos una lengua, para que pueda silbar como toda víbora - **escribe** `color salmon`\n18. Posiciónala en la cara - **escribe** `move -15, 20`\n19. Dibujaremos un rectángulo con el ancho en negativo para hacer que la lengua salga directo de la boca - **escribe** `rectangle -20,4`\n\n#### Lo que hackearás\nEl encanto del ciclo es que puedes cambiar el código una vez y todas las figuras que has dibujado se actualizarán. Esta es otro motivo por el cual utilizar los ciclos, puedes realizar grandes cambios sin necesidad de ingresar muchos códigos.\n\n#### Informe\n¿Cuántas veces has escrito el mismo comando una y otra vez en los últimos desafíos? En el desafío de la viborita, su cuerpo está compuesto por muchos círculos. En lugar de escribir un comando por cada círculo, ¡la computadora puede hacerlo por ti!\n" +} diff --git a/lib/challenges/locales/es/worlds/pixelhack/gradient.json b/lib/challenges/locales/es/worlds/pixelhack/gradient.json new file mode 100755 index 000000000..7d87fdb6a --- /dev/null +++ b/lib/challenges/locales/es/worlds/pixelhack/gradient.json @@ -0,0 +1,53 @@ +{ + "id": "gradient", + "title": "Atardecer en 8-bits", + "description": "Usa un ciclo para dibujar un atardecer en 8-bits.", + "startAt": 2, + "steps": [ + { + "hint": "Únicamente utilizaremos figuras sólidas sin trazo, entonces **escribe** `stroke 0`.", + "solution": "stroke 0" + }, + { + "hint": "Para ver mejor los resultados en esta prueba activa la negrita del texto utilizando el comando `bold true`. Bold significa negrita y true verdadero, eso quiere decir que está activado", + "solution": "bold true" + }, + { + "hint": "Utilizaremos un ciclo para dibujar el atardecer. Esta vez irá de 0 a 10. **Escribe ** `for y in [ 0 .. 10 ]`", + "solution": "for y in [ 0 .. 10 ]" + }, + { + "hint": "Para entender mejor cómo funciona nuestro ciclo, vamos a dibujar cada uno de los valores. Muévete a la posición usando `moveTo 250, y * 50`", + "solution": " moveTo 250, y * 50" + }, + { + "hint": "Vamos a inspeccionar qué hace nuestro ciclo. La función de texto (text en inglés) nos permitirá verlo. **Escribe ** `text y` para ver los valores de Y a través de la pantalla.", + "solution": " text y", + "validate": " text y" + }, + { + "hint": "La variable Y crece a medida que avanza el ciclo. Va de 0 (que se encuentra fuera de la pantalla) a 10. Para dibujar el atardecer necesitamos movernos al borde izquierdo **Escribe ** `moveTo 0, y * 50`", + "solution": " moveTo 0, y * 50" + }, + { + "hint": "Utilizaremos una función especial para ir oscureciendo el color en cada valor del ciclo. **Escribe ** `color darken blue, y * 3`.", + "solution": " color darken blue, y * 3" + }, + { + "hint": "Ahora para el cielo haremos rectángulos que ocupan toda la pantalla, cubrirán los números. **Escribe ** `rectangle 500, 50`.", + "solution": " rectangle 500, 50", + "validate": " rectangle 500, 50" + } + ], + "completion_text": "¡Qué bonito! Observa cómo se va oscureciendo el azul en tu pantalla. La variable Y se transfería a la función de oscurecer. A medida que aumentaba el valor de Y, el color azul se fue oscureciendo.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "grad-yello.png", + "grad-sword.png", + "grad-mage.png" + ] + }, + "cover": "pixel-gradient.png", + "guide": "#### Nuevas palabras\n**bold** state | bold true\n\nPuede configurar si el texto será escrito en formato negrita o no. True significa verdadero y activa la negrita. False significa falso, lo cual desactiva la negrita en el texto.\n\n**text** string | text “hola mundo”\n\nDibuja texto centrado en donde se ubique el cursor de dibujo. Las propiedades del texto se controlan con funciones de color, fuente, negrita y cursiva.\n\n\n#### Lo que crearás\n1. Únicamente utilizaremos figuras sólidas sin trazo, entonces **escribe ** `stroke 0`.\n2. Para ver mejor los resultados en esta prueba activa la negrita del texto utilizando el comando `bold true` bold significa negrita y true verdadero, eso quiere decir que está activado\n3. Utilizaremos un ciclo para dibujar el atardecer. Esta vez irá de 0 a 10. **escribe ** `for y in [ 0 .. 10 ]`\n4. Para entender mejor cómo funciona un ciclo, vamos a dibujar cada uno de los valores del ciclo. Muévete a la posición usando `moveTo 250, y * 50`\n5. Vamos a inspeccionar qué hace nuestro ciclo. La función de texto (text en inglés) nos permitirá verlo. **Escribe ** `text y` para ver los valores de Y a través de la pantalla.\n6. La variable Y crece a medida que avanza el ciclo. Va de 0 (que se encuentra fuera de la pantalla) a 10. Para dibujar el atardecer necesitamos movernos al borde izquierdo. **Escribe ** `moveTo 0, y * 50`\n7. Utilizaremos una función especial para ir oscureciendo el color en cada valor del ciclo. **Escribe ** `color darken blue, y * 3`.\n8. Ahora para el cielo haremos rectángulos que ocupan toda la pantalla, cubrirán los números. **Escribe ** `rectangle 500, 50`.\n\n\n#### Lo que hackearás\nAhora que ya tienes amplia experiencia en arte en píxeles ¿por qué no traes aquí tus creaciones y les damos el tratamiento de fondo que se merecen?\n\n#### Informe\nCon un ciclo puedes pedirle a la computadora que repita algo una y otra vez. Con el ciclo `for`, puedes perdirle que lo haga una determinada cantidad de veces y, dependiendo de tipo de ciclo que sea, cambiar qué hace.\n\nPara el atardecer, queremos dibujar bloques rectangulares del mismo tamaño y queremos movernos hacia abajo una determinada distancia cada vez que se dibuje uno. Pero esta vez, necesitamos comunicarle a la computadora que queremos que tengan un color diferente, ¿cómo lo hacemos? Con variables. El modo en el que puedes preguntar cuántas veces el ciclo se ejecutó es con una palabra con la que comience. Cuando escribimos `for y in [ 0 .. 10]`, estamos convirtiendo a la palabra `Y` igual a la cantidad de veces que se ha ejecutado el contenido del ciclo. En cualquier momento que se utilice la variable `Y`, le dirá al programa cuántas veces se ha repetido.\n\nComo aumenta de a un número por vez, podemos utilizarla para viajar a través de la sombra de los colores oscureciendo de a un tono el color a medida que crece la variable Y. Entonces al comienzo del ciclo tendremos un valor pequeño para Y y un color regular, hacia el final tendremos un valor más grande para Y y un color más oscuro.\n\n" +} diff --git a/lib/challenges/locales/es/worlds/pixelhack/grassblock.json b/lib/challenges/locales/es/worlds/pixelhack/grassblock.json new file mode 100755 index 000000000..64dc8abd7 --- /dev/null +++ b/lib/challenges/locales/es/worlds/pixelhack/grassblock.json @@ -0,0 +1,60 @@ +{ + "id": "grassblock", + "title": "Bloque de hierba en 8-bits", + "description": "Crea un bloque que podrías trasladar a Minecraft.", + "startAt": 1, + "steps": [ + { + "hint": "Únicamente utilizaremos figuras sólidas sin trazo. Entonces **escribe** `stroke 0`.", + "solution": "stroke 0" + }, + { + "hint": "Precisamos dos ciclos para este dibujo. **Escribe** `for x in [0 ... 16]`", + "solution": "for x in [0 ... 16]" + }, + { + "hint": "Para Y utiliza `for y in [0 ... 16]`", + "solution": " for y in [0 ... 16]", + "validate": " for y in \\[0 ... 16\\]" + }, + { + "hint": "Utilizaremos un tono de marrón elegido aleatoriamente para representar la tierra. **Escribe** `color darken brown, random 0, 25`", + "solution": " color darken brown, random 0, 25", + "validate": " color darken brown, random 0, 25" + }, + { + "hint": "Necesitaremos movernos para cada cuadrado utilizando `moveTo x * 31.25, y * 31.25`", + "solution": " moveTo x * 31.25, y * 31.25" + }, + { + "hint": "Finalmente dibujemos los cuadrados de tierra utilizando `square 32`", + "solution": " square 32", + "validate": " square 32" + }, + { + "hint": "El césped debería aparecer en la parte de arriba del bloque por eso determinemos una condición que posicione los bits verdes utilizando `if 4 > y + random 0, 3`", + "solution": " if 4 > y + random 0, 3" + }, + { + "hint": "Configura el color verde con la función para oscurecer. **Escribe** `color darken green, random 0, 25`", + "solution": " color darken green, random 0, 25", + "validate": " color darken green, random 0, 25" + }, + { + "hint": "Finalmente dibuja los cuadrados utilizando `square 32`", + "solution": " square 32", + "validate": " square 32" + } + ], + "completion_text": "¡Muy bonito! Ahora puedes cambiar el color marrón y el verde para obtener efectos interesantes. ¿Puedes hacer un bloque que se parezca a una fresa?", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "grass-overgrown.png", + "grass-strawb.png", + "grass-myce.png" + ] + }, + "cover": "pixel-grassblock.png", + "guide": "#### Lo que crearás\n1. Únicamente utilizaremos figuras sólidas sin trazo. Entonces **escribe** `stroke 0`.\n2. Precisamos dos ciclos para este dibujo. **Escribe** `for x in [0 ... 16]`\n3. Para y utiliza `for y in [0 ... 16]`\n4. Utilizaremos un tono de marrón elegido aleatoriamente para representar la tierra. **Escribe** `color darken brown, random 0, 25`\n5. Necesitaremos movernos para cada cuadrado utilizando `moveTo x * 31.25, y * 31.25`\n6. Finalmente dibujemos los cuadrados de tierra utilizando `square 32`\n7. El césped debería aparecer en la parte de arriba del bloque por eso determinemos una condición que posicione los bits verdes utilizando `if 4 > y + random 0, 3`\n8. Configura el color verde con la función para oscurecer. **Escribe** `color darken green, random 0, 25`\n9. Finalmente dibuja los cuadrados utilizando `square 32`\n\n#### Lo que hackearás\nPara personalizar este bloque de hierba de Minecraft todo lo que debes hacer es cambiar dos variables: el color de arriba y el color de abajo. Crea una fresa, un bloque de agua o cualquier otra cosa únicamente cambiando esas dos líneas de comandos. Para añadir complejidad, crea un bloque de micelio usando un ciclo y la función aleatoria. Si de verdad buscas un desafío, intenta incorporar lo que aprendimos en el dibujo anterior y utiliza los valores de X e Y para rotar los tonos de los colores.\n\n#### Resumiendo \nUno de los bloques más comunes y básicos en Minecraft es el de hierba. Únicamente 16 cuadrados hacia arriba y hacia abajo, es una imagen muy simple, pero utilizaremos la función aleatoria para darle textura. Dibujaremos dos capas distintas, la del césped y la de la tierra.\n\nEn cada capa utilizaremos un ciclo para dibujar horizontal y verticalmente a través de la pantalla y únicamente cambiaremos una cosa de cada una: el color.\n" +} diff --git a/lib/challenges/locales/es/worlds/pixelhack/index.json b/lib/challenges/locales/es/worlds/pixelhack/index.json new file mode 100755 index 000000000..2552d1e17 --- /dev/null +++ b/lib/challenges/locales/es/worlds/pixelhack/index.json @@ -0,0 +1,17 @@ +{ + "challenges": [ + "./pong", + "./ship", + "./tetris", + "./chest", + "./variables", + "./sword", + "./steve", + "./mage", + "./forloop", + "./gradient", + "./colorfrenzy", + "./grassblock", + "./diamondblock" + ] +} diff --git a/lib/challenges/locales/es/worlds/pixelhack/mage.json b/lib/challenges/locales/es/worlds/pixelhack/mage.json new file mode 100755 index 000000000..47911302e --- /dev/null +++ b/lib/challenges/locales/es/worlds/pixelhack/mage.json @@ -0,0 +1,208 @@ +{ + "id": "mage", + "title": "Maga", + "description": "Dibuja una Maga Aqua en 8-bits", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Crearemos el personaje de una Maga en un Juego de Rol. Primero necesitamos montar el escenario, utilizaremos la función de oscurecer para cambiar el color verde azulado a un tono más similar al azul oscuro - **escribe** `background darken teal,15 `", + "solution": "background darken teal,15" + }, + { + "hint": "Estamos haciendo arte en píxeles, no necesitamos el trazo - **escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Configuremos el color a un tono de marrón para su cabello - **escribe** `color saddlebrown`", + "solution": "color saddlebrown" + }, + { + "hint": "Utilizaremos la función moveTo para mover el cursor a una coordenada específica - **escribe** `moveTo 120,80`", + "solution": "moveTo 120,80" + }, + { + "hint": "Primero dibujaremos su cabello y el resto de los rasgos de la cara por encima para crearle profundidad - **escribe** `rectangle 320,400`", + "solution": "rectangle 320,400" + }, + { + "hint": "Dibujaremos con bloques de 20 por 20 píxeles de tamaño- **escribe** `move 20,-20`", + "solution": "move 20,-20" + }, + { + "hint": "Dibuja otra capa de cabello - **escribe** `rectangle 280,20`", + "solution": "rectangle 280,20" + }, + { + "hint": "Muévete hacia arriba otra vez para crear un efecto redondeado - **escribe** `move 20,-20`", + "solution": "move 20,-20" + }, + { + "hint": "Dibuja una fila más de cabello - **escribe** `rectangle 240,20`", + "solution": "rectangle 240,20" + }, + { + "hint": "Ahora dibujaremos la cara, - **escribe** `color sandybrown`", + "solution": "color sandybrown" + }, + { + "hint": "Mueve el cursor a la esquina de arriba en donde dibujaremos la cara - **escribe** `move 0,120`", + "solution": "move 0,120" + }, + { + "hint": "Dibuja la cara utilizando un rectángulo de 240 por 140 de tamaño", + "solution": "rectangle 240,140" + }, + { + "hint": "La cara se ve un poco cuadrada, por eso mueve el cursor hacia la frente - **escribe** `move 80,-40`", + "solution": "move 80,-40" + }, + { + "hint": "Dibuja otro rectángulo para darle un flequillo - **escribe** `rectangle 80,40`", + "solution": "rectangle 80,40" + }, + { + "hint": "Mueve el cursor hacia abajo en la cara - **escribe** `move -40,180`", + "solution": "move -40,180" + }, + { + "hint": "Termina la cara dibujando el mentón - **escribe** `rectangle 160,20`", + "solution": "rectangle 160,20" + }, + { + "hint": "Ahora le dibujaremos una túnica, nuestra maga se maneja en la Magia de Agua entonces la haremos azul- **escribe** `color paleturquoise`", + "solution": "color paleturquoise" + }, + { + "hint": "Posiciona el cursor para dibujarle las mangas - **escribe** `move -100,20`", + "solution": "move -100,20" + }, + { + "hint": "Dibuja un rectángulo de 360 de largo y 80 de alto para las mangas", + "solution": "rectangle 360,80" + }, + { + "hint": "Posiciona el cursor para dibujar el cuerpo de la túnica - **escribe** `move 60,80`", + "solution": "move 60,80" + }, + { + "hint": "Dibuja un rectángulo de 240 de ancho y 100 de alto para el cuerpo de la túnica", + "solution": "rectangle 240,100" + }, + { + "hint": "Ahora dibujaremos una costura en la túnica, cambia el color a verde azulado", + "solution": "color teal" + }, + { + "hint": "Mueve el cursor a la mitad de la túnica - **escribe** `move 120,-80`", + "solution": "move 120,-80" + }, + { + "hint": "Dibuja un rectángulo angosto para la costura - **escribe** `rectangle 40,180`", + "solution": "rectangle 40,180" + }, + { + "hint": "Ahora dibujaremos los brazos - **escribe** `move 140,40`", + "solution": "move 140,40" + }, + { + "hint": "Cambia el color a un tono de marrón, sandybrown en inglés", + "solution": "color sandybrown" + }, + { + "hint": "Dibuja un brazo utilizando un rectángulo de 40 por 140", + "solution": "rectangle 40,140" + }, + { + "hint": "Muévete hacia el otro lado del cuerpo - **escribe** `move -380,40`", + "solution": "move -380,40" + }, + { + "hint": "Este brazo no estará unido al cuerpo pero no te preocupes, no lo hemos terminado aún - **escribe** `rectangle 40,100`", + "solution": "rectangle 40,100" + }, + { + "hint": "Toda maga necesita un bastón para lanzar su magia, dibujaremos eso - **escribe** `color darkmagenta`", + "solution": "color darkmagenta" + }, + { + "hint": "Muévete hacia arriba del bastón - **escribe** `move 60,-120`", + "solution": "move 60,-120" + }, + { + "hint": "Dibuja el bastón por encima del brazo para que parezca que la sostiene en su mano - **escribe** `rectangle -40,220`", + "solution": "rectangle -40,220" + }, + { + "hint": "Como dijimos al comienzo, nuestro personaje usa magia acuática, entonces configura el color a aguamarina - **escribe** `color aquamarine`", + "solution": "color aquamarine" + }, + { + "hint": "Dibuja el extremo del bastón, si utilizas números negativos las figuras se darán vuelta - **escribe** `square -80`", + "solution": "square -80" + }, + { + "hint": "También dibujaremos una diadema mágica, muévete hacia la frente - **escribe** `move 60,-200`", + "solution": "move 60,-200" + }, + { + "hint": "Dibuja un rectángulo de 240 por 20", + "solution": "rectangle 240,20" + }, + { + "hint": "Muévete un espacio hacia abajo en la grilla - **escribe** `move -20,20`", + "solution": "move -20,20" + }, + { + "hint": "Termina la diadema - **escribe** `rectangle 280,20`", + "solution": "rectangle 280,20" + }, + { + "hint": "Aún debemos terminar la cara, posiciona el cursor en el sector de los ojos - **escribe** `move 60,60`", + "solution": "move 60,60" + }, + { + "hint": "Configura el color a negro", + "solution": "color black" + }, + { + "hint": "Dibuja los ojos largos y finos - **escribe** `rectangle 40,80`", + "solution": "rectangle 40,80" + }, + { + "hint": "Muévete al sector del otro ojo - **escribe** `move 120,0`", + "solution": "move 120,0" + }, + { + "hint": "Dibuja el otro ojo - **escribe** `rectangle 40,80`", + "solution": "rectangle 40,80" + }, + { + "hint": "Un último detalle. Haremos los ojos un poco más brillantes - **escribe** `color white`", + "solution": "color white" + }, + { + "hint": "Dibuja un rectángulo más pequeño - **escribe** `rectangle 20,40`", + "solution": "rectangle 20,40" + }, + { + "hint": "Muévete al otro ojo - **escribe** `move -120,0`", + "solution": "move -120,0" + }, + { + "hint": "Termínalo con un último rectángulo - **escribe** `rectangle 20,40`", + "solution": "rectangle 20,40" + } + ], + "completion_text": "¡Bien hecho! Tu maga está lista para ingresar a alguna cueva y lanzar algunos hechizos. ¿Por qué no cambias los colores de su vestimenta a rojo para que sea una Maga de Fuego?", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "mage-fire.png", + "mage-light.png", + "mage-warrior.png" + ] + }, + "cover": "pixel-mage.png", + "guide": "#### Lo que crearás\n1. Crearemos el personaje de una Maga en un Juego de Rol. Primero necesitamos montar el escenario, utilizaremos la función de oscurecer para cambiar el color aguamarina a un tono más similar al azul oscuro - **escribe** `background darken teal,15 `\n2. Estamos haciendo arte en píxeles, no necesitamos el trazo - **escribe** `stroke 0`\n3. Configuremos el color a un tono de marrón para su cabello - **escribe** `color saddlebrown`\n4. Utilizaremos la función moveTo para mover el cursor a una coordenada específica - **escribe** `moveTo 120,80`\n5. Primero dibujaremos su cabello y el resto de los rasgos de la cara por encima para crearle profundidad - **escribe** `rectangle 320,400`\n6. Dibujaremos con bloques de 20 por 20 píxeles de tamaño- **escribe** `move 20,-20`\n7. Dibuja otra capa de cabello - **escribe** `rectangle 280,20`\n8. Muévete hacia arriba otra vez para crear un efecto redondeado - **escribe** `move 20,-20`\n9. Dibuja una fila más de cabello - **escribe** `rectangle 240,20`\n10. Ahora dibujaremos la cara, - **escribe** `color sandybrown`\n11. Mueve el cursor a la esquina de arriba en donde dibujaremos la cara- **escribe** `move 0,120`\n12. Dibuja la cara utilizando un rectángulo de 240 por 140 de tamaño\n13. La cara se ve un poco cuadrada, por eso mueve el cursor hacia la frente - **escribe** `move 80,-40`\n14. Dibuja otro rectángulo para darle un flequillo - **escribe** `rectangle 80,40`\n15. Mueve el cursor hacia abajo en la cara - **escribe** `move -40,180`\n16. Termina la cara dibujando la mentón - **escribe** `rectangle 160,20`\n17. Ahora le dibujaremos una túnica, nuestra maga se maneja en la Magia de Agua entonces la haremos azul- **escribe** `color paleturquoise`\n18. Posiciona el cursor para dibujarle las mangas - **escribe** `move -100,20`\n19. Dibuja un rectángulo de 360 de largo y 80 de alto para las mangas \n20. Posiciona el cursor para dibujar el cuerpo de la túnica - **escribe** `move 60,80`\n21. Dibuja un rectángulo de 240 de ancho y 100 de alto para el cuerpo de la túnica\n22. Ahora dibujaremos una costura en la túnica, cambia el color a aguamarina\n23. Mueve el cursor a la mitad de la túnica - **escribe** `move 120,-80`\n24. Dibuja un rectángulo angosto para la costura - **escribe** `rectangle 40,180`\n25. Ahora dibujaremos los brazos - **escribe** `move 140,40`\n26. Cambia el color a un tono de marrón, sandybrown en inglés\n27. Dibuja un brazo utilizando un rectángulo de 40 por 140\n28. Muévete hacia el otro lado del cuerpo - **escribe** `move -380,40`\n29. Este brazo no estará unido al cuerpo pero no te preocupes, no lo hemos terminado aún - **escribe** `rectangle 40,100`\n30. Toda maga necesita un bastón para lanzar su magia, dibujaremos eso - **escribe** `color darkmagenta`\n31. Muévete hacia arriba del bastón - **escribe** `move 60,-120`\n32. Dibuja el bastón por encima del brazo para que parezca que la sostiene en su mano - **escribe** `rectangle -40,220`\n33. Como dijimos al comienzo, nuestro personaje usa magia acuática, entonces configura el color a aguamarina - **escribe** `color aquamarine`\n34. Dibuja el extremo del bastón, si utilizas números negativos las figuras se darán vuelta - **escribe** `square -80`\n35. También dibujaremos una diadema mágica, muévete hacia la frente - **escribe** `move 60,-200`\n36. Dibuja un rectángulo de 240 por 20\n37. Muévete un espacio hacia abajo en la grilla - **escribe** `move -20,20`\n38. Termina la diadema - **escribe** `rectangle 280,20`\n39. Aún debemos terminar la cara, posiciona el cursor en el sector de los ojos - **escribe** `move 60,60`\n40. Configura el color a negro\n41. Dibuja los ojos largos y finos - **escribe** `rectangle 40,80`\n42. Muévete al sector del otro ojo - **escribe** `move 120,0`\n43. Dibuja el otro ojo - **escribe** `rectangle 40,80`\n44. Un último detalle. Haremos los ojos un poco más brillantes - **escribe** `color white`\n45.Dibuja un rectángulo más pequeño - **escribe** `rectangle 20,40`\n46. Muévete al otro ojo - **escribe** `move -120,0`\n47. Termínalo con un último rectángulo - **escribe** `rectangle 20,40`\n\n#### Lo que hackearás\nEste es un dibujo mucho más intrincado, hay muchas cosas para cambiar. Puedes ir a través del dibujo y cambiar los colores creando una nueva paleta de colores y agregar nuevos objetos. Echa un vistazo a la guerrera y a otras magas elementales como ejemplos para mejorarla con nuevos poderes, armaduras y armas.\n\n#### Informe\nLas figuras simples que has estado juntando en estos diseños pueden ser redefinidas y transformadas en creaciones más complejas. La Maga de los Juegos de Rol sigue un diseño un poco más sofisticado, pero se utilizan las mismas funciones para crearla.\n" +} diff --git a/lib/challenges/locales/es/worlds/pixelhack/pong.json b/lib/challenges/locales/es/worlds/pixelhack/pong.json new file mode 100755 index 000000000..78b9cebbb --- /dev/null +++ b/lib/challenges/locales/es/worlds/pixelhack/pong.json @@ -0,0 +1,40 @@ +{ + "id": "pong", + "title": "Pong", + "description": "Programa una partida de Pong", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Pong (1972) fue una de las primeras consolas de videojuegos domésticas. Es un increíblemente básico juego de tenis de mesa. Y ¿qué necesitamos para jugar tenis de mesa? Primero, una pelota. Usaremos los comandos en inglés. Círculo se dice circle **escribe** `circle 15`", + "solution": "circle 15" + }, + { + "hint": "Luego necesitamos dibujar las raquetas. Usaremos la función moveTo, que significa mover a, para ubicar objetos. El primer número después de moveTo dice la posición horizontal del objeto (izquierda y derecha). El segundo número, dice la posición vertical (arriba y abajo). **escribe** `moveTo 30,100`", + "solution": "moveTo 30,100" + }, + { + "hint": "Dibujaremos la primera raqueta usando la función del rectángulo. Rectángulo se dice rectangle **escribe** `rectangle 20, 100`", + "solution": "rectangle 20, 100" + }, + { + "hint": "No es divertido jugar Pong sin un oponente... **escribe** `moveTo 450,300`", + "solution": "moveTo 450,300" + }, + { + "hint": "Finalmente, dibujemos la raqueta del oponente. El primer número es el ancho, y el segundo la altura. **escribe** `rectangle 20, 100`", + "solution": "rectangle 20, 100" + } + ], + "completion_text": "¡Bien hecho! Has recreado uno de los primeros videojuegos de la historia, bastante aburrido de mirar, ¿no? ¿Por qué no intentas hacer click en el número 100 de la primera función moveTo? y utilizar el control deslizante para reposicionar la raqueta?", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "pong-white.png", + "pong-movecolor.png", + "pong-movepaddles.png" + ] + }, + "cover": "pixel-pong.png", + "guide": "#### Nuevas palabras\n**circle** radius | circle 15\n\nDibuja un círculo en la posición actual del cursor. Cuánto más grande el número de radio que ingreses, más grande será el círculo: el radio es la distancia desde el centro del círculo al borde.\n\n**moveTo** x, y | moveTo 30, 100\n\nMueve la posición de dibujo al nuevo lugar que asignes en X, Y. El primer valor es el valor de la coordenada X, la cual controla la ubicación en el eje horizontal. El segundo valor es la coordenada Y, la cual controla la ubicación en el eje vertical.\n\n**rectangle** width, height | rectangle 20, 100\n\nDibuja un rectángulo en la posición actual del cursor. La anchura y la altura controlan independientemente cuán ancho y cuán alto será el rectángulo.\n\n**color** name | color red\n\nCambia el color de dibujo. Las siguientes figuras y texto serán dibujados con el color que configures hasta cambiarlo nuevamente. Para configurarlo a transparente escribe `color null`\n\n**background** colorName | background white\n\nCambia el color del fondo.\n\n#### Lo que crearás\n1. Pong (1972) fue una de las primeras consolas de videojuegos. Es un increíblemente básico juego de tenis de mesa. Y ¿qué necesitamos para jugar tenis de mesa? Primero, una pelota. Usaremos los comandos en inglés. Círculo se dice circle **Escribe** `circle 15`\n2. Luego necesitamos dibujar las raqueta. Usamos la función moveTo para ubicar objetos. El primer número después de moveTo dice la posición horizontal del objeto (izquierda y derecha). El segundo número, dice la posición vertical (arriba y abajo). **escribe** `moveTo 30,100`\n3. Dibujaremos la primera raqueta usando la función del rectángulo. Rectángulo se dice rectangle **escribe** `rectangle 20, 100`\n4. No es divertido jugar Pong sin un oponente **escribe** `moveTo 450,300`\n5. Finalmente, dibujemos la raqueta del oponente, el primer número es el ancho, y el segundo la altura. **escribe** `rectangle 20, 100`\n\n#### Lo que hackearás\nExiste una función especial que todo artista de programación debería conocer: el color. El color predeterminado siempre será el negro y cada vez que una figura sea dibujada en Hacer Arte, la función de dibujo comprueba qué color se debe utilizar. Entonces, como no has especificado un color, todo será dibujado de color negro.\n\nPuedes cambiar el color a rojo, por ejemplo, escribiendo color red luego del primer comando `moveTo` y antes del comando `rectangle 20, 100`para cambiar el color de ambas raquetas. Nota: esto solamente afectará a las figuras dibujadas luego de este comando, por eso escribirlo al principio del desafío no hará nada. \n\nEl color del fondo puede ser modificado con background charcoal. Puedes poner esto en cualquier parte del código, y para la mayoría de creaciones sólo lo ingresarás una vez. Es mejor ponerlo al comienzo, antes de cualquier código.\n\nFinalmente, puedes cambiar la posición de las raquetas hacia arriba y hacia abajo cambiando el segundo número al lado de la función moveTo. Puedes hacer click en el número y jugar con la posición usando el control deslizante para cambiar el número.\n\n#### Informe\nEn 1972, Al Alcorn recibió un ejercicio de calentamiento en su nuevo empleo en la compañía Atari, y nació Pong: dos raquetas, una pelota, y poco después, cola de gente a la vuelta de la esquina para comenzar a jugarlo. Pong se convirtió en una sensación a nivel internacional, vendiendo millones de copias. Fue tan famoso, que docenas de imitaciones fueron creadas por competidores que intentaban aprovecharse del éxito de la compañía Atari. Lo que lo hizo tan simple y universal terminó por convertirlo en fácil de copiar. \n\nTu primera tarea como hacker es crear tu propia versión de Pong. Uno de los secretos de un gran hacker es mezclar ideas de otros lugares para crear algo nuevo. ¡Puedes tomar la idea original de Pong y hackearla para crear tu propio juego! Crearás un escenario básico de dos raquetas y una pelota. Luego, ¡depende de ti hackearlo para crear algo nuevo! \n" +} diff --git a/lib/challenges/locales/es/worlds/pixelhack/ship.json b/lib/challenges/locales/es/worlds/pixelhack/ship.json new file mode 100755 index 000000000..04a4e92a7 --- /dev/null +++ b/lib/challenges/locales/es/worlds/pixelhack/ship.json @@ -0,0 +1,68 @@ +{ + "id": "ship", + "title": "Asteroides", + "description": "Programa una nave espacial de vectores usando líneas", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Asteroides (1979) fue uno de los primeros videojuegos de arcade importantes. Está situado en el espacio, así que programemos un fondo adecuado **escribe** `background black`", + "solution": "background black" + }, + { + "hint": "Los gráficos en Asteroides eran líneas simples denominadas vectores. Hoy en día, aún se utiliza una versión más compleja de este concepto en los gráficos de las computadoras. Primero necesitamos configurar el tamaño del trazo y su color **escribe** `stroke white,5`", + "solution": "stroke white,5" + }, + { + "hint": "Luego usamos la función move para configurar el punto de partida de nuestra primera línea de la nave. **escribe** `move 0, -70`", + "solution": "move 0, -70" + }, + { + "hint": "'Función' es la palabra que utilizamos para definir lo que estamos dibujando. Dibujemos una línea que empiece justo donde movimos el cursor y termine abajo a la izquierda. Primero escribimos la función (line) y luego dónde queremos que empiece y termine la línea **escribe** `line -50,150` Intenta cambiar el valor de Y, de 150 a -150 y fíjate lo que sucede. ¡La línea va hacia arriba! ¡Mejor, muévela nuevamente a 150!", + "solution": "line -50,150" + }, + { + "hint": "Para mover el cursor al punto donde queremos que nazca la próxima línea **escribe** `move -50,150`", + "solution": "move -50,150" + }, + { + "hint": "Dibujamos una línea hacia adentro y hacia afuera para crear el propulsor de nuestra nave - **escribe** `line 50,-25`", + "solution": "line 50,-25" + }, + { + "hint": "Muévete a las mismas coordenadas para continuar la línea en otra dirección **escribe** `move 50,-25`", + "solution": "move 50,-25" + }, + { + "hint": "Replicamos la forma para dibujar el lado derecho de la nave dando vuelta la segunda coordenada de la línea anterior para dibujar hacia abajo en vez de hacia arriba **escribe** `line 50,25`", + "solution": "line 50,25" + }, + { + "hint": "Muévete al extremo de esa línea **escribe** `move 50,25`", + "solution": "move 50,25" + }, + { + "hint": "Nuestra nave comienza a tener forma. Para hacer una línea que conecte el extremo de abajo con el de arriba **escribe** `line -50,-150`", + "solution": "line -50,-150" + }, + { + "hint": "Finalmente volvemos al punto de partida para darle un toque final **escribe** `move -50,-150`", + "solution": "move -50,-150" + }, + { + "hint": "Dibujamos una línea que atraviese el centro para que esta simple figura se parezca más a una nave. Los primeros videojuegos contaban sólo con una parte del gran poder informático con el que contamos hoy, por eso los gráficos tenían que ser muy básicos. **Escribe** `line 0,125`", + "solution": "line 0,125" + } + ], + "completion_text": "Tal vez no es gran cosa pero los gráficos simples de los primeros videojuegos, sentaron las bases para los gráficos 3D que se usan hoy en día.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "ship-golden.png", + "ship-thrust.png", + "ship-sleek.png" + ] + }, + "cover": "pixel-ship.png", + "guide": "#### Nuevas palabras\n**move** x, y | move 50, 25\n\nMueve el cursor de dibujo desde la posición actual hacia la cual indiques en los números X e Y. La diferencia con moveTo es que la última es relativa, no absoluta. `move 50, 25` moverá el cursor 50 hacia la derecha y 25 hacia abajo desde la posición actual. El primer valor es el valor de la coordenada X, la cual controla la ubicación en el eje horizontal. El segundo valor es la coordenada Y, la cual controla la ubicación en el eje vertical. Los valores negativos los ubicarán en las direcciones opuestas (izquierda y arriba).\n\n**line** x, y | line 50, 25\n\nDibuja una línea desde la posición actual hasta la que se indique. Las coordenadas X, Y controlan el punto relativo hasta el cual se dibujará la línea.\n\n**stroke** color, width | stroke white, 5\n\nConfigura el trazo del dibujo. Las siguientes figuras y el texto serán dibujados con el color y el ancho del trazo que configures hasta cambiarlo nuevamente. Esta función es inteligente y puede aceptar el color o el tamaño en cualquier orden, o uno por vez.\n\n#### Lo que crearás\n1.Asteroides (1979) fue uno de los primeros videojuegos de arcade importantes. Está situado en el espacio, por eso vamos a tener que establecer el escenario **escribe** `background black`\n2. Los gráficos en Asteroides eran líneas simples denominadas vectores. Hoy en día, aún se utiliza una versión más compleja de este concepto en los gráficos de las computadoras. Primero necesitamos configurar el tamaño del trazo y su color **escribe** `stroke white,5`\n3. Luego usamos la función move para configurar el punto de partida de nuestra primera línea de la nave. **escribe** `move 0, -70`\n4. Utilizamos la función line para dibujar una línea relativa al punto de partida, utilizamos un número negativo para que vaya hacia la izquierda y luego un número positivo para que vaya hacia abajo **escribe** `line -50,150`\n5. Para mover el cursor al punto donde queremos que nazca la próxima línea **escribe** `move -50,150`\n6. Dibujamos una línea hacia adentro y hacia afuera para crear el propulsor de nuestra nave - **escribe** `line 50,-25`\n7. Muévete a las siguientes coordenadas para continuar la línea en otra dirección **escribe** `move 50,-25`\n8. Replicamos la forma para dibujar el lado derecho de la nave dando vuelta la segunda coordenada de la línea anterior para dibujar hacia abajo en vez de hacia arriba **escribe** `line 50,25`\n9. Muévete al extremo de esa línea **escribe** `move 50,25`\n10. Nuestra nave comienza a tener forma. Para hacer una línea que conecte el extremo de abajo con el de arriba **escribe** `line -50,-150`\n11. Finalmente volvemos al punto de partida para darle un toque final **escribe** `move -50,-150`\n12. Dibujamos una línea que atraviese el centro para que esta simple figura se parezca más a una nave, los primeros videojuegos contaban sólo con una parte del gran poder informático con el que contamos hoy, por eso los gráficos tenían que ser muy básicos. **Escribe** `line 0,125`\n\n#### Lo que hackearás\nTal vez no sean gran cosa pero los gráficos simples de los primeros videojuegos, sentaron las bases para los gráficos 3D que se utilizan hoy en día. Puedes transformar tu nave configurando el color y el ancho del trazo. \n\nPara algo más avanzado, intenta dibujar más líneas.\n\n#### Informe\nAsteroides (1979) fue uno de los primeros videojuegos de arcade importantes. Limitados por hardware primitivo, los diseñadores del juego únicamente podían utilizar líneas simples basadas en gráficos llamadas vectores. Hoy en día se utiliza una versión más compleja de este concepto en los gráficos de computadora.\n" +} diff --git a/lib/challenges/locales/es/worlds/pixelhack/steve.json b/lib/challenges/locales/es/worlds/pixelhack/steve.json new file mode 100755 index 000000000..7178c1225 --- /dev/null +++ b/lib/challenges/locales/es/worlds/pixelhack/steve.json @@ -0,0 +1,127 @@ +{ + "id": "steve", + "title": "Steve", + "description": "Crea la cara de Steve utilizando figuras simples.", + "startAt": 2, + "steps": [ + { + "hint": "Únicamente utilizaremos cuadrados y rectángulos sólidos, por eso configuremos el trazo a 0 usando `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Configura el color de fondo a marrón claro", + "solution": "background lightbrown" + }, + { + "hint": "Configura el color de dibujo a marrón utilizando `color brown`.", + "solution": "color brown" + }, + { + "hint": "Su cabello comenzará en la esquina de arriba a la izquierda, entonces **escribe** `moveTo 0, 0`.", + "solution": "moveTo 0, 0" + }, + { + "hint": "Dibujaremos un rectángulo con parámetros de anchura y altura. **Escribe** `rectangle 500, 150`", + "solution": "rectangle 500, 150" + }, + { + "hint": "Configura el color de dibujo a marrón claro**escribe** `color lightbrown`", + "solution": "color lightbrown" + }, + { + "hint": "Muévete para dibujar la frente, **escribe** `moveTo 100, 100`", + "solution": "moveTo 100, 100" + }, + { + "hint": "Ahora para dibujar la frente, **escribe** `rectangle 300, 50`", + "solution": "rectangle 300, 50" + }, + { + "hint": "Para los ojos, configura el color a blanco", + "solution": "color white" + }, + { + "hint": "Ahora muévete usando `moveTo 100, 200`", + "solution": "moveTo 100, 200" + }, + { + "hint": "Dibuja un ojo usando `square 50`", + "solution": "square 50" + }, + { + "hint": "Para el otro ojo, **escribe** `moveTo 350, 200`", + "solution": "moveTo 350, 200" + }, + { + "hint": "Y dibuja otro cuadrado de un tamaño de 50", + "solution": "square 50" + }, + { + "hint": "Para el iris utilizaremos color violeta: recuerda que en inglés se dice purple.", + "solution": "color purple" + }, + { + "hint": "Muévete a las coordenadas `150, 200` utilizando moveTo.", + "solution": "moveTo 150, 200" + }, + { + "hint": "Dibuja un cuadrado de un tamaño de 50.", + "solution": "square 50" + }, + { + "hint": "Muévete a las coordenadas `300, 200`.", + "solution": "moveTo 300, 200" + }, + { + "hint": "Y dibuja el iris final con un cuadrado de un tamaño de 50.", + "solution": "square 50" + }, + { + "hint": "Ahora dibujaremos la nariz. **Escribe** `color brown`", + "solution": "color brown" + }, + { + "hint": "Muévete utilizando `moveTo 200, 250`.", + "solution": "moveTo 200, 250" + }, + { + "hint": "Dibuja un rectángulo de `100` de anchura y `50` de altura.", + "solution": "rectangle 100, 50" + }, + { + "hint": "Para hacer la boca configura el color a otro tono de marrón utilizando `color saddlebrown`.", + "solution": "color saddlebrown" + }, + { + "hint": "Muévete a las coordenadas `150, 300`", + "solution": "moveTo 150, 300" + }, + { + "hint": "La boca debería ser un gran rectángulo. **Escribe** `rectangle 200, 100`.", + "solution": "rectangle 200, 100" + }, + { + "hint": "Para mejorar la boca deberíamos cortarla un poco. Configura el color de dibujo al mismo color de la piel. **Escribe** `color lightbrown`", + "solution": "color lightbrown" + }, + { + "hint": "Muévete a las coordenadas `200, 300`.", + "solution": "moveTo 200, 300" + }, + { + "hint": "Termínalo con un rectángulo utilizando `rectangle 100, 50` ", + "solution": "rectangle 100, 50" + } + ], + "completion_text": "¡Bien hecho! Nuestro personaje se ve muy bien. ¿Qué partes podrías cambiar para que se parezca más a ti?", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "Steve-blue.png", + "Steve-beard.png", + "Steve-Alex.png" + ] + }, + "cover": "pixel-steve.png", + "guide": "#### Lo que crearás\n1. Únicamente utilizaremos cuadrados y rectángulos, por eso configuremos el trazo a 0 usando `stroke 0`\n2. Configura el color de fondo a marrón claro\n3. Configura el color de dibujo a marrón utilizando `color brown`.\n4. Su cabello comenzará en la esquina de arriba a la izquierda, entonces **escribe** `moveTo 0, 0`.\n5. Dibujaremos un rectángulo con parámetros de anchura y altura. **Escribe** `rectangle 500, 150`\n6. Configura el color de dibujo a marrón claro **escribe** `color lightbrown`\n7. Muévete para dibujar la frente, **escribe** `moveTo 100, 100`\n8. Ahora para dibujar la frente, **escribe** `rectangle 300, 50`\n9. Para los ojos, configura el color de dibujo a blanco\n10. Ahora muévete usando `moveTo 100, 200`\n11. Dibuja un ojo usando `square 50`\n12. Para el otro ojo, **escribe** `moveTo 350, 200`\n13. Y dibuja otro cuadrado de un tamaño de 50\n14. Para el iris utilizaremos color violeta: recuerda que en inglés se dice purple.\n15.Muévete a las coordenadas `150, 200` utilizando moveTo.\n16. Dibuja un cuadrado de un tamaño de 50.\n17. Muévete a las coordenadas `300, 200`.\n18. Y dibuja el iris final con un cuadrado de un tamaño de 50.\n19. Dibujaremos la nariz. **Escribe** `color brown`\n20. Muévete utilizando `moveTo 200, 250`.\n21. Dibuja un rectángulo de `100` de anchura y `50` de altura.\n22. Para hacer la boca configura el color a otro tono de marrón utilizando `color saddlebrown`.\n23. Muévete a las coordenadas `150, 300`\n24. La boca debería ser un gran rectángulo. **Escribe** `200, 100`.\n25. Para mejorar la boca deberíamos cortarla un poco. Configura el color de dibujo al mismo color de la piel. **Escribe** `color lightbrown`\n26. Muévete a las coordenadas `200, 300`.\n27. Termínalo con un rectángulo utilizando `rectangle 100, 50` \n\n#### Lo que hackearás\nLas figuras aquí son muy simples, ¡eso mismo lo hace muy fácil de cambiar y hackear! Cambia el color de la piel, del cabello, los ojos o agrega tus propios rasgos.\n\n#### Informe\nSteve es el héroe de Minecraft. No se conoce demasiado acerca de Steve: quién es, de dónde es o incluso si es humano. Sin embargo, es la cara visible del juego más sensacional de la década. Esta simple creación con cuadrados y rectángulos cobra vida gracias a hermosos colores.\n" +} diff --git a/lib/challenges/locales/es/worlds/pixelhack/sword.json b/lib/challenges/locales/es/worlds/pixelhack/sword.json new file mode 100755 index 000000000..02fba6a73 --- /dev/null +++ b/lib/challenges/locales/es/worlds/pixelhack/sword.json @@ -0,0 +1,96 @@ +{ + "id": "sword", + "title": "Espada de diamantes", + "description": "Programa una espada forjada en puros diamantes", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Vamos a dibujar una espada de diamantes, por eso primero configuremos algunas variables para representar los colores. Espada en inglés se dice sword **escribe** `sword = aquamarine`", + "solution": "sword = aquamarine" + }, + { + "hint": "Configuremos las variables necesarias para el área oscura de nuestra espada, podemos utilizar la función darken (que significa oscurecer) para alterar el color ya existente de la espada. **escribe** `darksword = darken sword,40`", + "solution": "darksword = darken sword,40" + }, + { + "hint": "Empecemos por configurar el fondo de color gris pizarra, slategray en inglés", + "solution": "background slategray" + }, + { + "hint": "Ahora establecemos el color de relleno utilizando la variable que configuramos antes **escribe** `color sword`", + "solution": "color sword" + }, + { + "hint": "y configura el color del trazo para que sea una versión más oscura que la preestablecida **escribe** `stroke darksword,20`", + "solution": "stroke darksword,20" + }, + { + "hint": "Mueve el cursor hacia donde estará el extremo de la cuchilla **escribe** `move -20,-180`", + "solution": "move -20,-180" + }, + { + "hint": "Dibuja la cuchilla de la espada **escribe** `rectangle 40,230`", + "solution": "rectangle 40,230" + }, + { + "hint": "Ya empieza a tomar forma, hagamos el mango de la espada **escribe** `move 10,250`", + "solution": "move 10,250" + }, + { + "hint": "El mango no estará hecho de diamantes, configura el color del trazo a marrón oscuro", + "solution": "stroke darkbrown" + }, + { + "hint": "y el `color` a marrón", + "solution": "color brown" + }, + { + "hint": "Dibuja un rectángulo de 20 por 100", + "solution": "rectangle 20,100" + }, + { + "hint": "Ninguna espada estaría completa sin un guardamano **escribe** `move -70,-10`", + "solution": "move -70,-10" + }, + { + "hint": "Vuelve a configurar el color del trazo a nuestra segunda variable más oscura", + "solution": "stroke darksword" + }, + { + "hint": "Vamos a utilizar otra función de color: lighten (que significa aclarar) para cambiar un poco el color del diamante **escribe** `color lighten darksword,10`", + "solution": "color lighten darksword,10" + }, + { + "hint": "Luego dibuja un rectángulo de 160 por 20", + "solution": "rectangle 160,20" + }, + { + "hint": "Fíjate cómo la función para aclarar cambió el color del diamante. **escribe** `move 80, -240`", + "solution": "move 80, -240" + }, + { + "hint": "Finalmente vamos a agregar detalles de brillo para terminar la espada **escribe** `color white`", + "solution": "color white" + }, + { + "hint": "Configura el trazo a 0 **escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Dibuja un rectángulo de 10 por 230", + "solution": "rectangle 10, 230" + } + ], + "completion_text": "Esa espada se ve estupenda, perfecta para luchar al escapar de alguna cueva. Intenta cambiar el color de la primera línea y fíjate cómo cambian los demás colores de la espada por haber utilizado variables.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "sword-golden.png", + "sword-shovel.png", + "sword-pickaxe.png" + ] + }, + "cover": "pixel-sword.png", + "guide": "#### Nuevas palabras\n**darken**(color, amount) | darken(blue, 40)\n\nDevuelve un color más oscuro dependiendo del número que ingreses. El número puede ser entre 0 y 100.\n\n**lighten**(color, amount) | lighten(blue, 40)\n\nDevuelve un color más claro dependiendo del número que ingreses. El número puede ser entre 0 y 100.\n\n\n#### Lo que crearás\n1. Vamos a crear una espada pero primero configuraremos ciertas variables para representar los colores **escribe** `sword = aquamarine`\n2. Configuremos las variables necesarias para el área oscura de nuestra espada, podemos utilizar la función darken (que significa oscurecer) para alterar el color ya existente de la espada. **escribe** `darksword = darken sword,40`\n3. Empecemos por configurar el fondo de color gris pizarra\n4.Ahora establecemos el color de dibujo utilizando la variable que configuramos antes **escribe** `color sword`\n5. y configura el color del trazo para que sea una versión más oscura que la preestablecida **escribe** `stroke darksword,20`\n6. Mueve el cursor hacia donde estará el extremo de la cuchilla **escribe** `move -20,-180`\n7. Dibuja la cuchilla de la espada **escribe** `rectangle 40,230`\n8. Ya empieza a tomar forma, hagamos el mango de la espada **escribe** `move 10,250`\n9. El mango no estará hecho de diamantes, configura el color del trazo a marrón oscuro\n10. y el `color` de dibujo a marrón\n11. Dibuja un rectángulo de 20 por 100\n12. Ninguna espada estaría completa sin un guardamano **escribe** `move -70,-10`\n13. Vuelve a configurar el color del trazo a nuestra segunda variable más oscura\n14. Vamos a utilizar otra función de color: lighten (que significa aclarar) para cambiar un poco el color del diamante **escribe** `color lighten darksword,10`\n15. Luego dibuja un rectángulo de 160 por 20\n16. Fíjate cómo la función para aclarar cambió el color del diamante. **escribe** `move 80, -240`\n17. Finalmente vamos a agregar detalles de brillo para terminar la espada **escribe** `color white`\n18. Configura el trazo a 0 **escribe** `stroke 0`\n19. Dibuja un rectángulo de 10 por 230\n\n#### Lo que hackearás\nYa que todos los colores que utilizaremos serán sombras del mismo color de la espada, al modificar una variable todos las sombras más oscuras y más claras cambiarán también. Podemos transformar una espada de diamantes en oro cambiando el color de la variable.\n\nUsando el mismo código y estilo, ¿qué otras creaciones inspiradas en Minecraft te animas a hacer?\n\n#### Informe\nLa espada de diamantes es el arma más poderosa en Minecraft. También es la más difícil de crear dada la rareza de sus diamantes. Todos los diferentes tipos de espadas en Minecraft (diamante, oro, acero, piedra…) siguen un patrón de diseño simple. Lo único que las diferencia visualmente es el color. Para la espada de diamantes, crearemos una palabra llamada \"sword\" la cual estará configurada al color \"aquamarine\". Para seleccionar diferentes sombras en el mango y la cuchilla, utilizaremos el color establecido junto con funciones especiales de color." +} diff --git a/lib/challenges/locales/es/worlds/pixelhack/tetris.json b/lib/challenges/locales/es/worlds/pixelhack/tetris.json new file mode 100755 index 000000000..0fd2902a8 --- /dev/null +++ b/lib/challenges/locales/es/worlds/pixelhack/tetris.json @@ -0,0 +1,96 @@ +{ + "id": "tetris", + "title": "Tetris", + "description": "Programa un amontonamiento de piezas de Tetris", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Tetris (1984) fue el primer videojuego en ser exportado de la URSS a EEUU, vendiendo 170 millones de copias. Haremos algunas piezas de Tetris, pero primero desactivemos el trazo - **escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Luego mueve el cursor al punto de partida de la primera pieza que dibujaremos **escribe** `moveTo 150,200`", + "solution": "moveTo 150,200" + }, + { + "hint": "Usaremos colores para diferenciar las piezas. Cambia el color de relleno de las piezas usando la función 'color' **escribe** `color crimson`", + "solution": "color crimson" + }, + { + "hint": "Primero dibujaremos una pieza con forma de L usando dos rectángulos, en inglés es rectangle **escribe** `rectangle 50,150`", + "solution": "rectangle 50,150" + }, + { + "hint": "Nuestras piezas se encuentran en una grilla conformada por celdas de 50x50, por eso notarás que todos nuestros comandos move (es decir de movimiento) serán múltiplos de 50. **escribe** `move 0,100`", + "solution": "move 0,100" + }, + { + "hint": "Termina la pieza con un rectángulo de 100 por 50", + "solution": "rectangle 100,50" + }, + { + "hint": "Muévete para empezar la siguiente pieza **escribe** `move 50,-100`", + "solution": "move 50,-100" + }, + { + "hint": "Vamos a cambiar el color para diferenciarla de la anterior. La función 'color' afecta a todas las figuras que dibujemos después de escribirla. ¿Qué tal un bello color verdemar? **escribe** `color seagreen`", + "solution": "color seagreen" + }, + { + "hint": "Luego dibujaremos una pieza con forma de S **escribe** `rectangle 50,100`", + "solution": "rectangle 50,100" + }, + { + "hint": "Muévete un espacio en diagonal hacia abajo en la grilla **escribe** `move 50,50`", + "solution": "move 50,50" + }, + { + "hint": "Para terminar la forma de S crearemos otro rectángulo de 50 por 100, utiliza rectangle para el comando", + "solution": "rectangle 50,100" + }, + { + "hint": "Avancemos a la siguiente pieza **escribe** `move 50,-100`", + "solution": "move 50,-100" + }, + { + "hint": "Cambiemos el color de dibujo a índigo ¡se dice igual en inglés! **escribe** `color indigo`", + "solution": "color indigo" + }, + { + "hint": "Luego dibujaremos aquella pieza larga y delgada, dibuja un rectángulo de 50 por 200", + "solution": "rectangle 50,200" + }, + { + "hint": "Nos queda una pieza para completar el cuadrado **escribe** `move -150,0`", + "solution": "move -150,0" + }, + { + "hint": "Cambiemos el color a dorado para destacarla. Si no recuerdas cómo se dice en inglés, haz click en pista.", + "solution": "color gold" + }, + { + "hint": "Otra pieza con forma de L encajaría perfectamente **escribe** `rectangle 150,50`", + "solution": "rectangle 150,50" + }, + { + "hint": "Muévete al pie de la L **escribe** `move 100,0`", + "solution": "move 100,0" + }, + { + "hint": "Completa el pie **escribe** `rectangle 50,100`", + "solution": "rectangle 50,100" + } + ], + "completion_text": "Bien hecho, ¡creaste un buen amontonamiento de piezas de Tetris! ¿Por qué no intentas cambiarles el color o dibujar algunas más para cubrir la pantalla?", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "tetris-gameboy.png", + "tetris-3D.png", + "tetris-row.png" + ] + }, + "cover": "pixel-tetris.png", + "guide": "#### Nuevas palabras\n**color** nombre | color red\n\nCambia el color de dibujo. Todas las próximas figuras serán dibujadas con el color que configures hasta que lo cambies nuevamente. Para configurar el color de dibujo a transparente, escribe, `color null`\n\n#### Lo que crearás\n1. Tetris (1984) fue el primer videojuego en ser exportado de la URSS a EEUU, vendiendo 170 millones de copias. Haremos algunas piezas de Tetris, pero primero desactivaremos el trazo **escribe** `stroke 0`\n2. Luego mueve el cursor al punto de partida de la primera pieza que dibujaremos **escribe** `moveTo 150,200`\n3. Necesitamos usar colores para diferenciar las piezas, cambia el color de relleno de las piezas usando la función 'color' **escribe** `color crimson`\n4. Primero dibujaremos una pieza con forma de L usando dos rectángulos, en inglés es rectangle **escribe** `rectangle 50,150`\n5. Nuestras piezas se encuentran en una grilla conformada por celdas de 50x50, por eso notarás que todos nuestros comandos de movimiento serán múltiplos de 50 **escribe** `move 0,100`\n6. Termina la pieza con un rectángulo de 100 por 50\n7. Muévete para empezar la siguiente pieza **escribe** `move 50,-100`\n8. Vamos a cambiar el color para diferenciarla de la anterior. La función 'color' afecta a todas las figuras que dibujemos después de escribirla. Usemos un bello verdemar **escribe** `color seagreen`\n9. Luego dibujaremos una pieza con forma de S **escribe** `rectangle 50,100`\n10. Muévete un espacio en diagonal hacia abajo en la grilla **escribe** `move 50,50`\n11. Para terminar la forma de S crearemos otro rectángulo de 50 por 100, utiliza rectangle para el comando\n12. Avancemos a la siguiente pieza **escribe** `move 50,-100`\n13. Cambiemos el color de dibujo a índigo ¡se dice igual en inglés! **escribe** `color indigo`\n14. Luego dibujaremos aquella pieza larga y delgada, dibuja un rectángulo de 50 por 200\n15. Nos queda una pieza para completar el cuadrado **escribe** `move -150,0`\n16. Cambiemos el color a dorado para destacarla\n17. Otra pieza con forma de L encajaría perfecto **escribe** `rectangle 150,50`\n18. Muévete al pie de la L **escribe** `move 100,0`\n19. Completa el pie **escribe** `rectangle 50,100`\n\n#### Lo que hackearás\nAhora que has creado un cubo, puedes darles a las piezas el color que tú quieras y agrega más piezas.\n\n#### Informe \nTetris (1984) fue el primer videojuego en ser exportado de la URSS a EEUU, vendiendo 170 millones de copias. Haremos algunas piezas de Tetris, las cuales se llaman tetrimonios. Cada tetrimonio está formado por cuatro cuadrados que se conectan para crear diferentes formas. En el juego, los tetrimonios caen sin parar y el objetivo es hacerlos encajar evitando dejar espacios vacíos entre ellos.\n" +} diff --git a/lib/challenges/locales/es/worlds/pixelhack/variables.json b/lib/challenges/locales/es/worlds/pixelhack/variables.json new file mode 100755 index 000000000..27de7a293 --- /dev/null +++ b/lib/challenges/locales/es/worlds/pixelhack/variables.json @@ -0,0 +1,92 @@ +{ + "id": "variables", + "title": "Variables", + "description": "Usa variables para crear un fantasma que mora en los laberintos", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Este clásico personaje del fantasma apareció por primera vez en Pac-Man (1980). Como que es un fantasma, necesitaremos un fondo escalofriante. Un azul marino debería servir - **escribe** `background navy`", + "solution": "background navy" + }, + { + "hint": "Configura el trazo a 0 **escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Configura el `color` a rojo", + "solution": "color red" + }, + { + "hint": "Ahora haremos algo nuevo, vamos a configurar el tamaño del fantasma usando una variable. Le daremos un nombre en inglés que se refiere al tamaño del fantasma, ghostsize. Luego la utilizaremos para repetir ese mismo valor que le asignemos **escribe** `ghostsize = 100`", + "solution": "ghostsize = 100" + }, + { + "hint": "Mueve el cursor hacia arriba, donde empezará la cabeza del fantasma **escribe** `move 0,-50`", + "solution": "move 0,-50" + }, + { + "hint": "Vamos a utilizar la variable que configuramos para dibujar la cabeza. Como la configuramos a 100, este comando dibujará un círculo de 100 píxeles **escribe** `circle ghostsize`", + "solution": "circle ghostsize" + }, + { + "hint": "Vamos a utilizar la variable una vez más, esta vez con el comando move. Usando el símbolo menos por delante, este comando sería lo mismo que moverse -100,0 **escribe** `move -ghostsize,0`", + "solution": "move -ghostsize,0" + }, + { + "hint": "Es hora de dibujar el resto del cuerpo del fantasma. Como que el cuerpo se encuentra en relación con el tamaño de la cabeza, vamos a utilizar la variable otra vez **escribe** `square ghostsize * 2`", + "solution": "square ghostsize * 2" + }, + { + "hint": "Vamos a dibujarle ojos. Para asegurarnos de que están ubicados correctamente dentro de la cabeza, vamos a utilizar la variable otra vez. **type** `move ghostsize / 2`", + "solution": "move ghostsize / 2" + }, + { + "hint": "Configura el `color` de dibujo a blanco", + "solution": "color white" + }, + { + "hint": "Dibuja un ojo haciendo un círculo de 20 píxeles de tamaño", + "solution": "circle 20" + }, + { + "hint": "Ahora configura el color del iris **escribe** `color blue`", + "solution": "color blue" + }, + { + "hint": "Finalmente dibujemos el iris **escribe** `circle 10`", + "solution": "circle 10" + }, + { + "hint": "Vamos a utilizar la variable por última vez para ubicar correctamente el segundo ojo **escribe** `move ghostsize,0`", + "solution": "move ghostsize,0" + }, + { + "hint": "Repite el proceso para el segundo ojo - configura el `color` de dibujo a blanco", + "solution": "color white" + }, + { + "hint": "Dibuja otro círculo de 20 píxeles de tamaño", + "solution": "circle 20" + }, + { + "hint": "Configura el `color` a azul", + "solution": "color blue" + }, + { + "hint": "Finalmente dibuja el círculo de 10 píxeles de tamaño", + "solution": "circle 10" + } + ], + "completion_text": "¡Qué bonito! Como has utilizado una variable, puedes pulsar en el número que le otorgaste a la variable ghostsize y utilizar el control deslizante para cambiar el tamaño del fantasma. Verás cómo los ojos se mantienen del mismo tamaño y todo lo demás cambia.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "ghost-big.png", + "ghost-tired.png", + "ghost-scared.png" + ] + }, + "cover": "pixel-variables.png", + "guide": "#### Nueva palabra\n**variable** = valor | ghostsize = 100\nCrea una palabra a la cual se le asignará un valor y puede ser usado en otras ocasiones.\n\n#### Lo que crearás\n1. Este clásico personaje del fantasma apareció por primera vez en Pac-Man (1980). Como es un fantasma, necesitaremos un fondo escalofriante. Un azul marino debería servir - **escribe** `background navy`\n2. Configura el trazo a 0 **escribe** `stroke 0`\n3. Configura el `color` a rojo\n4. Ahora haremos algo nuevo, vamos a configurar el tamaño del fantasma usando una variable. Le daremos un nombre en inglés que se refiere al tamaño del fantasma, ghostsize. Luego la utilizaremos para repetir ese mismo valor que le asignemos **escribe** `ghostsize = 100`\n5. Mueve el cursor hacia arriba, donde empezará la cabeza del fantasma **escribe** `move 0,-50`\n6. Vamos a utilizar la variable que configuramos para dibujar la cabeza. Como la configuramos a 100, este comando dibujará un círculo de 100 píxeles **escribe** `circle ghostsize`\n7. Vamos a utilizar la variable una vez más, esta vez con el comando move. Usando el símbolo menos por delante, este comando sería lo mismo que moverse -100,0 **escribe** `move -ghostsize,0`\n8. Es hora de dibujar el resto del cuerpo del fantasma, como el cuerpo se encuentra en relación con el tamaño de la cabeza, vamos a utilizar la variable otra vez **escribe** `square ghostsize * 2`\n9. Vamos a dibujarle ojos. Para asegurarnos de que están ubicados correctamente dentro de la cabeza, vamos a utilizar la variable otra vez. **type** `move ghostsize / 2`\n10. Configura el`color` de dibujo a blanco\n11. Dibuja un ojo haciendo un círculo de 20 píxeles de tamaño\n12. Ahora configura el color del iris **escribe** `color blue`\n13. Finalmente dibujemos el iris **escribe** `circle 10`\n14. Vamos a utilizar la variable por última vez para ubicar correctamente el segundo ojo **escribe** `move ghostsize,0`\n15. Repite el proceso para el segundo ojo - configura el `color` de dibujo a blanco\n16. Dibuja otro círculo de 20 píxeles de tamaño\n17. Configura el `color` a azul\n18. Finalmente dibuja el círculo de 10 píxeles de tamaño\n\n#### Lo que hackearás\nYa que utilizaste una variable para las diferentes partes del cuerpo del fantasma, puedes cambiar el valor para ver cómo cambia el tamaño del cuerpo. Sin embargo, los ojos no cambian. ¿Podrías configurar otra variable que controle el tamaño de los ojos?\n\n#### Informe\nCuando programas le otorgas una serie de tareas a tu computadora. Y cuando ejecutas los comandos, la computadora lee todas esas tareas y las realiza. Hasta ahora, programamos de manera tal que se ejecuten los comandos siempre igual, pero si quisiéramos que los comandos se ejecuten de manera distinta deberíamos utilizar variables.\n\nUna variable es una palabra que adquiere el significado de otra cosa. En este desafío determinarás el tamaño de muchas partes del cuerpo del fantasma con una variable. Cambiando el valor de la variable verás cómo afecta el tamaño de las diferentes formas, otorgándote el poder de agrandar o achicar el fantasma.\n" +} diff --git a/lib/challenges/locales/es/worlds/summercamp/backpack.json b/lib/challenges/locales/es/worlds/summercamp/backpack.json new file mode 100755 index 000000000..d10490a84 --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/backpack.json @@ -0,0 +1,143 @@ +{ + "id": "backpack", + "title": "Empaca tus cosas", + "short_title": "Mochila", + "icon_class": "challenge_backpack", + "description": "Dick Kelty fue quien inventó las mochilas con marco de aluminio. Kelty tuvo la idea en 1951 cuando se fue de excursión con una amigo a Sierra Nevada. Trabajando en su garage y con un préstamo de $500, Kelty y su mujer decidieron empezar el negocio; él cortaba y soldaba el aluminio mientras ella cosía el nylon. Vendían las mochilas terminadas a $24 cada una.", + "cover": "summercamp/day_8.png", + "completion_text": "Tengo un gran desafío para ti: intenta dibujar tu personaje detrás de la mochila ¡Cabeza, brazos y piernas!", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "Es un hermoso día para ir a caminar por el bosque - **escribe** `background blue`", + "solution": "background blue" + }, + { + "hint": "Primero, configura el trazo a 0 para evitar dibujar líneas usando `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Mueve el cursor para dibujar el piso - en una nueva línea **escribe** `moveTo 0, 250`", + "solution": "moveTo 0, 250" + }, + { + "hint": "Configura el `color` del césped a verde o `green`", + "solution": "color green" + }, + { + "hint": "Dibuja el piso con un rectángulo - **escribe** `rectangle 500, 250`", + "solution": "rectangle 500, 250" + }, + { + "hint": "Parece un lindo sitio para un árbol - **escribe** `moveTo 220`", + "solution": "moveTo 220" + }, + { + "hint": "Configura el `color` del tronco a marrón claro o `lightbrown`", + "solution": "color lightbrown" + }, + { + "hint": "Dibuja el tronco usando la función `rectangle`, y con un tamaño de `50` por `400`", + "solution": "rectangle 50, 400" + }, + { + "hint": "¡Hermoso! Ahora solamente necesita algunas hojas - **escribe** `move 30, -120` para ubicarlas", + "solution": "move 30, -120" + }, + { + "hint": "Configura el `color` de las hojas a verde oscuro o `darkgreen`", + "solution": "color darkgreen" + }, + { + "hint": "Dibuja un círculo usando `circle` de un tamaño de `200` para representar las hojas", + "solution": "circle 200" + }, + { + "hint": "¡Se ve genial! Vamos a mover el cursor para dibujar la mochila - **escribe** `moveTo 150, 200`", + "solution": "moveTo 150, 200" + }, + { + "hint": "Vamos a elegir el `color` marrón o `brown` para nuestra mochila", + "solution": "color brown" + }, + { + "hint": "Dibuja la parte principal de la mochila usando un cuadrado - **escribe** `square 200`", + "solution": "square 200" + }, + { + "hint": "Ahora mueve el cursor a la parte de abajo de la mochila - **escribe** `moveTo 250, 400`", + "solution": "moveTo 250, 400" + }, + { + "hint": "Dibuja la parte de abajo usando una elipse - **escribe** `ellipse 100, 30`", + "solution": "ellipse 100, 30" + }, + { + "hint": "Necesitamos guardar la bolsa de dormir en la parte de arriba de la mochila - **escribe** `moveTo 250, 200`", + "solution": "moveTo 250, 200" + }, + { + "hint": "Configura el `color` de la bolsa de dormir a rojo oscuro o `darkred`", + "solution": "color darkred" + }, + { + "hint": "¿Listo para dibujar la bolsa de dormir? Usa una elipse - **escribe** `ellipse 115, 40`", + "solution": "ellipse 115, 40" + }, + { + "hint": "Necesitamos algo para asegurar la bolsa de dormir y que no se caiga - **escribe** `moveTo 200, 160`", + "solution": "moveTo 200, 160" + }, + { + "hint": "El anaranjado o `orangered` en inglés, parece un lindo `color` para las tiras que la sostendrán", + "solution": "color orangered" + }, + { + "hint": "Dibuja la tira izquierda - **escribe** `rectangle 15, 90`", + "solution": "rectangle 15, 90" + }, + { + "hint": "Posiciona el cursor hacia la derecha para dibujar la segunda - **escribe** `moveTo 290, 160`", + "solution": "moveTo 290, 160" + }, + { + "hint": "Usa la función `rectangle` otra vez para la tira de la derecha, igual que la anterior", + "solution": "rectangle 15, 90" + }, + { + "hint": "¡Excelente! Necesitamos espacio para guardar cosas. Mueve el cursor al medio - **escribe** `moveTo 205, 320`", + "solution": "moveTo 205, 320" + }, + { + "hint": "Usa la función `rectangle` para hacer un bolsillo, de `90` por `60` será suficiente", + "solution": "rectangle 90, 60" + }, + { + "hint": "Necesitamos cerrar el bolsillo para que no se metan insectos - **escribe** `moveTo 250, 320`", + "solution": "moveTo 250, 320" + }, + { + "hint": "Configura el `color` a marrón claro o `lightbrown`", + "solution": "color lightbrown" + }, + { + "hint": "Usa la función `ellipse` de un tamaño de `48` por `7`", + "solution": "ellipse 48, 7" + }, + { + "hint": "¡Se ve genial! Vamos a ponerle un botón a ese bolsillo - **escribe** `moveTo 250, 330`", + "solution": "moveTo 250, 330" + }, + { + "hint": "Configura el `color` a marrón o `brown`", + "solution": "color brown" + }, + { + "hint": "Dibuja un círculo usando `circle` de un tamaño de `10`", + "solution": "circle 10" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/bear.json b/lib/challenges/locales/es/worlds/summercamp/bear.json new file mode 100755 index 000000000..dda525b53 --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/bear.json @@ -0,0 +1,91 @@ +{ + "id": "bear", + "title": "Oso atrevido", + "short_title": "Oso", + "description": "Los osos son muy inteligentes y incluso activan trampas para osos con rocas para poder comer el cebo de manera segura. Estos animales pueden correr a 64km/h, lo suficientemente rápido como para atrapar a un caballo que corre. Ten en cuenta que la persona más rápida del mundo es Usain Bolt ¡puede correr a 43km/h! Ya que los osos pueden caminar distancias cortas con sus patas traseras, los nativos de Estados Unidos los llaman “las bestias que caminan como humanos.”", + "icon_class": "challenge_bear", + "cover": "summercamp/day_11.png", + "completion_text": "Ese oso tan tierno necesita un cuerpo y un hábitat. Usa tus habilidades de programación para impresionar a tus compañeros. Recuerda que los íconos de la izquierda pueden ayudarte a alcanzar lo que estás pensando.", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "El oso vive en el bosque. Configura el color del fondo a verde - **escribe** `background green`", + "solution": "background green" + }, + { + "hint": "El pelaje de nuestro oso será marrón, empecemos por configurar el color - **escribe** `color brown`", + "solution": "color brown" + }, + { + "hint": "Configura el trazo a 0 para evitar dibujar líneas - **escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Dibuja la cara con un círculo - **escribe** `circle 100`", + "solution": "circle 100" + }, + { + "hint": "Vamos a mover el cursor para dibujar la oreja izquierda - **escribe** `move -80, -80`", + "solution": "move -80, -80" + }, + { + "hint": "Dibuja la oreja en forma de círculo usando `circle` hazla de un tamaño de `30`", + "solution": "circle 30" + }, + { + "hint": "Mueve el cursor a la derecha para dibujar la otra oreja - **escribe** `move 160`", + "solution": "move 160" + }, + { + "hint": "Dibuja la oreja, igual a la otra", + "solution": "circle 30" + }, + { + "hint": "Ahora muévete hacia donde estará el ojo izquierdo - **escribe** `move -110, 50`", + "solution": "move -110, 50" + }, + { + "hint": "El resto de las partes de la cara serán negras por eso configura el `color` a negro o `black` en inglés.", + "solution": "color black" + }, + { + "hint": "Dibuja el primer ojo - **escribe** `circle 5`", + "solution": "circle 5" + }, + { + "hint": "Ahora muévete hacia donde estará el otro ojo - **escribe** `move 60`", + "solution": "move 60" + }, + { + "hint": "Dibuja el ojo, idéntico al anterior", + "solution": "circle 5" + }, + { + "hint": "Muévete hacia el centro para dibujar lo más característico de los osos- **escribe** `move -30, 50`", + "solution": "move -30, 50" + }, + { + "hint": "Dibuja la nariz con un triángulo usando la función polygon - **escribe** `polygon 12, -16, -12, -16`", + "solution": "polygon 12, -16, -12, -16" + }, + { + "hint": "Vamos a ubicarnos para dibujarle la boca - **escribe** `move 0, 20`", + "solution": "move 0, 20" + }, + { + "hint": "Configura el trazo `stroke` a negro o `black` y de un tamaño de `3`", + "solution": "stroke black, 3" + }, + { + "hint": "No queremos que tenga un color de relleno, por eso configura el color a transparente - **escribe** `color null`", + "solution": "color null" + }, + { + "hint": "Un arco es la mitad de un círculo, nos sirve para representar una leve sonrisa - **escribe** `arc 15, 0.5, 2`", + "solution": "arc 15, 0.5, 2" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/bow_and_arrow.json b/lib/challenges/locales/es/worlds/summercamp/bow_and_arrow.json new file mode 100755 index 000000000..0a2162760 --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/bow_and_arrow.json @@ -0,0 +1,108 @@ +{ + "id": "bow_and_arrow", + "title": "Arco y flecha", + "short_title": "Arco y flecha", + "icon_class": "challenge_bow", + "description": "Lanzar una flecha con el arco a un determinado punto es un arte que requiere mucha concentración. Este desafío consiste en dibujar el arco e intentar dejarlo quieto mientras tiembla tu mano... tal como lo han hecho muchas civilizaciones más de mil años atrás para cazar y alimentarse ¡El arco más antiguo fue encontrado en Dinamarca y es del año 9000 A.C!", + "cover": "summercamp/day_15.png", + "completion_text": "¡Haz click en Refrescar y verás el blanco moverse mientras buscas sostener el arco! Intenta deshacerte del fondo movedizo para que sea más fácil dar en el blanco. También puedes intentar convertir tu arco en una ballesta.", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "El clima de hoy es agradable...no hay viento que nos desvíe las flechas. Configura el fondo a azul - **escribe** `background blue`.", + "solution": "background blue" + }, + { + "hint": "Queremos que el fondo se agite, así que comenzaremos por dibujarlo en un punto aleatorio. **escribe** `moveTo (random -20, 0), (random 240, 260)`.", + "solution": "moveTo (random -20, 0), (random 240, 260)", + "validate": "__moveTo ?\\( *random +-20, +0 *\\), +\\( *random +240, +260 *\\)" + }, + { + "hint": "Nuestro blanco está en un campo de césped, configuremos el color a verde usando `color green`", + "solution": "color green" + }, + { + "hint": "Dibuja el césped usando `rectangle`, y hazlo de un tamaño de `550` píxeles de alto por `300` píxeles de ancho", + "solution": "rectangle 550, 300" + }, + { + "hint": "Vamos a mover el cursor para dibujar la diana que contiene el blanco y los anillos - **escribe** `move 275, 10`", + "solution": "move 275, 10" + }, + { + "hint": "Primero dibujaremos las patas de madera que la sostienen - **escribe** `stroke brown, 15`", + "solution": "stroke brown, 15" + }, + { + "hint": "Dibuja la pata izquierda - **escribe** `line -80, 120`", + "solution": "line -80, 120" + }, + { + "hint": "... y ahora la pata derecha - **escribe** `line 80, 120`", + "solution": "line 80, 120" + }, + { + "hint": "Vamos a dibujar una diana con anillos blancos y rojos - **escribe** `stroke white, 50`", + "solution": "stroke white, 50" + }, + { + "hint": "Ahora configura el interior del círculo a rojo - **escribe** `color red`", + "solution": "color red" + }, + { + "hint": "Primero, dibuja un círculo con un radio de 80 píxeles - **escribe** `circle 80`", + "solution": "circle 80" + }, + { + "hint": "Ahora dibuja otro círculo usando `circle` de un radio de `30` píxeles", + "solution": "circle 30" + }, + { + "hint": "Mueve el cursor para dibujar la punta de la flecha - **escribe** `moveTo 250, 220`", + "solution": "moveTo 250, 220" + }, + { + "hint": "Nuestra punta de la flecha tendrá un fino borde gris - **escribe** `stroke gray, 1`", + "solution": "stroke gray, 1" + }, + { + "hint": "Tendrá un `color dimgray`, es un tono de gris", + "solution": "color dimgray" + }, + { + "hint": "Dibuja la punta de la flecha como si fuera un diamante - **escribe** `polygon -10, 40, 0, 80, 10, 40`", + "solution": "polygon -10, 40, 0, 80, 10, 40" + }, + { + "hint": "Ahora vamos a mover el cursor para dibujar el palo de la flecha - **escribe** `move 0, 40`", + "solution": "move 0, 40" + }, + { + "hint": "La flecha estará hecha de una liviana madera color marrón - **escribe** `stroke lightbrown, 20`", + "solution": "stroke lightbrown, 20" + }, + { + "hint": "Dibuja una línea - **escribe** `line 200, 360`", + "solution": "line 200, 360" + }, + { + "hint": "Lo último que dibujaremos será el arco. Mueve el cursor fuera de la pantalla - **escribe** `moveTo 800, 375`", + "solution": "moveTo 800, 375" + }, + { + "hint": "Claro que vamos a dibujarlo con forma de arco, dibújalo con un trazo grueso de color madera oscura - **escribe** `stroke darkbrown, 40`", + "solution": "stroke darkbrown, 40" + }, + { + "hint": "No queremos que el arco tenga relleno, únicamente necesitamos el borde - **escribe** `color null`", + "solution": "color null" + }, + { + "hint": "Dibuja el arco - **escribe** `arc 500, 0, 2`", + "solution": "arc 500, 0, 2" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/camera.json b/lib/challenges/locales/es/worlds/summercamp/camera.json new file mode 100755 index 000000000..ec10ddeb7 --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/camera.json @@ -0,0 +1,109 @@ +{ + "id": "camera", + "title": "¡Saca una fotografía!", + "short_title": "Cámara", + "icon_class": "challenge_camera", + "description": "Hacia 1820, las primeras cámaras tardaban algunas horas en capturar un simple momento. Con largas y molestas horas de exposición, fotografiar gente con una sonrisa en la cara resultaba imposible. ¿Por qué? Bueno, intenta sostener una linda sonrisa durante horas sin moverte y obtendrás la respuesta. Hoy en día, la cantidad de fotografías tomadas cada dos minutos es la misma cantidad de fotografías tomadas por la humanidad entera en el 1800", + "cover": "summercamp/day_10.png", + "completion_text": "Intenta dibujarte a ti mismo tomando una fotografía detrás de esa bonita cámara. ¿Tal vez también puedas agregar la luz del flash?", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": { + "outfit": 1 + }, + "steps": [ + { + "hint": "Configura el fondo a azul usando `background blue`", + "solution": "background blue" + }, + { + "hint": "Por ahora, configuraremos el trazo a 0 para evitar resaltar el borde de las figuras usando `stroke`", + "solution": "stroke 0" + }, + { + "hint": "Mueve el cursor para posicionar la cámara en el centro - **escribe** `moveTo 100, 150`", + "solution": "moveTo 100, 150" + }, + { + "hint": "Configura el `color` de la cámara a un tono de gris, `dimgray` en inglés", + "solution": "color dimgray" + }, + { + "hint": "Ahora dibuja el cuerpo de la cámara usando un rectángulo - **escribe** `rectangle 300, 200`", + "solution": "rectangle 300, 200" + }, + { + "hint": "Mueve el cursor para dibujar la lente - **escribe** `move 150, 100`", + "solution": "move 150, 100" + }, + { + "hint": "Configura el `color` de la lente a celeste o `lightblue`", + "solution": "color lightblue" + }, + { + "hint": "Configura el borde de la lente usando `stroke` a negro o `black` en inglés y de un tamaño de `10`", + "solution": "stroke black, 10" + }, + { + "hint": "La lente es un círculo, dibújala con `circle` y un tamaño de `50`", + "solution": "circle 50" + }, + { + "hint": "Configura el `color` de la segunda mitad de la lente a gris claro o `lightgray` en inglés", + "solution": "color lightgray" + }, + { + "hint": "Dibuja un arco - **escribe** `arc 50, 2, 1`", + "solution": "arc 50, 2, 1" + }, + { + "hint": "¡Esta cámara necesita un flash! Mueve el cursor para ubicarlo - **escribe** `move -30, -125`", + "solution": "move -30, -125" + }, + { + "hint": "Dibuja el flash con un rectángulo, recuerda que en inglés se dice `rectangle` - hazlo de un tamaño de `60` por `20`", + "solution": "rectangle 60, 20" + }, + { + "hint": "Configura el trazo a `0` usando `stroke`.", + "solution": "stroke 0" + }, + { + "hint": "Configura el `color` del flash a celeste o `lightblue`", + "solution": "color lightblue" + }, + { + "hint": "Dibuja un polígono para el reflejo del flash - **escribe** `polygon 40, 0, 0, 20`", + "solution": "polygon 40, 0, 0, 20" + }, + { + "hint": "Solamente nos queda hacer el botón para tomar la fotografía - **escribe** `move 100, 10`", + "solution": "move 100, 10" + }, + { + "hint": "Configura el `color` del botón a rojo o `red` en inglés.", + "solution": "color red" + }, + { + "hint": "Dibuja el botón con un rectángulo, usa `rectangle` y hazlo de un tamaño de `50` por `15`", + "solution": "rectangle 50, 15" + }, + { + "hint": "¡Un último detalle! Mueve el cursor - **escribe** `move 25, -20`", + "solution": "move 25, -20" + }, + { + "hint": "Configura el `color` a amarillo o `yellow`", + "solution": "color yellow" + }, + { + "hint": "Configura la fuente del texto usando `font 'ComicSansMS', `30`", + "solution": "font 'ComicSansMS', 30" + }, + { + "hint": "Escribe texto - **escribe** `text 'Click!'`", + "solution": "text 'Click!'" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/camp_badge.json b/lib/challenges/locales/es/worlds/summercamp/camp_badge.json new file mode 100755 index 000000000..68e946209 --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/camp_badge.json @@ -0,0 +1,56 @@ +{ + "id": "camp_badge", + "title": "Insignia de Campamento", + "short_title": "Insignia de Campamento", + "icon_class": "challenge_badge", + "description": "La insignia de primeros auxilios es la más popular en los campamentos de verano. De hecho, 6.9 millones de Scouts la han obtenido desde 1911. Las otras más populares son las de Ciencias Ambientales, Búsqueda y Rescate y nuestra favorita, ¡la de Programación y Diseño de Juegos! También existen otras más extrañas. Por ejemplo, la de Transporte en Camiones: imagina que tienes que cargar en un camión 300 kilos de mercadería de un pueblo que está a 500 millas del tuyo. Tu pedido debe llegar en el transcurso de tres días. Explica por escrito...” También la de Ciencias Nucleares: “Prepara dos platos de comida, uno con alimentos irradiados y otro no, luego compara el gusto y las texturas.”", + "completion_text": "Esta insignia distinguirá tu campamento de otros. Sorprende al mundo con una creación asombrosa.", + "cover": "summercamp/day_5.png", + "difficulty": 1, + "startAt": 4, + "start_date": "2015-10-07 06:00:00", + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "Configura el fondo a negro **escribe** `background black`", + "solution": "background black" + }, + { + "hint": "Configura el `color` de tu insignia a celeste o `lightblue` en inglés", + "solution": "color lightblue" + }, + { + "hint": "Configura el trazo para el primer círculo - **escribe** `stroke red, 20`", + "solution": "stroke red, 20" + }, + { + "hint": "Dibuja un círculo, o `circle` en inglés, de un tamaño de `200`", + "solution": "circle 200" + }, + { + "hint": "Configura el trazo para el segundo círculo - **escribe** `stroke yellow, 20`", + "solution": "stroke yellow, 20" + }, + { + "hint": "Dibújalo usando `circle` de un tamaño de `190`", + "solution": "circle 190" + }, + { + "hint": "Configura el trazo, `stroke`, para el tercer círculo a violeta o `purple` en inglés y de un tamaño de `20`", + "solution": "stroke purple, 20" + }, + { + "hint": "Dibújalo usando `circle` de un tamaño de `180`", + "solution": "circle 180" + }, + { + "hint": "Agreguemos algo de decoración. Configura el `color` a verde o `green`", + "solution": "color green" + }, + { + "hint": "Un arco es la mitad de un círculo, dibuja uno que encaje en el círculo interior - **escribe** `arc 180, 1, 2`", + "solution": "arc 180, 1, 2" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/camp_sign.json b/lib/challenges/locales/es/worlds/summercamp/camp_sign.json new file mode 100755 index 000000000..3a8e70d11 --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/camp_sign.json @@ -0,0 +1,87 @@ +{ + "id": "camp_sign", + "title": "Tu letrero de Campamento de Verano", + "short_title": "Letrero de Campamento", + "description": "¡Bienvenido a tu primer día de campamento! Antes de salir, tu letrero de campamento necesita un poco de diseño ¡Vuélvete creativo! Usa una divertida combinación de colores o demuestra lo que te gustaría hacer estando de campamento. \nEn la región del Noroeste Pacífico de Estados Unidos, los pueblos indígenas tallaban Tótems para contar las historias de sus ancestros y culturas. Estas hermosas esculturas están talladas en árboles y a menudo representan personajes y hechos de leyendas. Puedes buscar en internet imágenes de los Tótems para inspirarte.", + "icon_class": "challenge_campsign", + "cover": "summercamp/day_1.png", + "completion_text": "¡Bien hecho! Ahora otórgale a tu letrero tu propio texto y estilo. Cambia el nombre de tu campamento en el renglón 18, o el color en el 3 ¿Por qué no agregar un lindo fondo y alguna decoración? Los íconos de utilidades a la izquierda pueden ayudarte a empezar.", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "¡Es un día soleado! Configura el fondo a azul - **escribe** `background blue`", + "solution": "background blue" + }, + { + "hint": "Mueve el cursor al punto en el que queremos comenzar a dibujar nuestro letrero.\n\nRecuerda presionar ENTER para agregar la próxima instrucción y - **escribe** `moveTo 100, 150`", + "solution": "moveTo 100, 150" + }, + { + "hint": "Imagina que en Make Art dibujamos figuras con bolígrafos digitales. Antes de dibujar la próxima figura, necesitaremos elegir el color de la tinta para el relleno de la figura. Seleccionemos un bolígrafo marrón configurando el color a marrón claro, o lightbrown en inglés.\n\n En una nueva línea **escribe** `color lightbrown`", + "solution": "color lightbrown" + }, + { + "hint": "Cuando dibujamos una figura, podemos seleccionar el grosor del trazo que nuestro bolígrafo deja en el borde. Esta línea del trazo en inglés se llama **stroke**.\n\n Presiona enter y configura el trazo a 0 para evitar dibujar líneas - **escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Ahora que ya configuramos el bolígrafo de dibujo ¡podemos empezar a hacer nuestro letrero de campamento!\n\nDibuja el cartel con un rectángulo. Recuerda rectángulo en inglés es rectangle - **escribe** `rectangle 300, 200`", + "solution": "rectangle 300, 200" + }, + { + "hint": "Dibujemos una sombra. Primero, configura el color a marrón - **escribe** `color brown`", + "solution": "color brown" + }, + { + "hint": "Dibuja una fina sombra utilizando un rectángulo alargado - **escribe** `rectangle 300, 5`", + "solution": "rectangle 300, 5" + }, + { + "hint": "Ese letrero se ve demasiado limpio. Tenemos que dibujarle algunas imperfecciones.\n\nMueve el cursor al lado izquierdo del letrero - **escribe** `moveTo 100, 220`", + "solution": "moveTo 100, 220" + }, + { + "hint": "Nuestra imperfección será un triángulo en el borde del letrero. Primero necesitamos configurar el `color` a azul, `blue` en inglés, para que sea el mismo que el del fondo.", + "solution": "color blue" + }, + { + "hint": "Configura el trazo a un tamaño de 5 y de color marrón (para que combine con el letrero). Puedes concretar estas dos acciones de tamaño y color en un solo comando - **escribe** `stroke brown, 5`", + "solution": "stroke brown, 5" + }, + { + "hint": "Ahora vamos a usar el comando `polygon` (significa polígono) para dibujar nuestra imperfección en forma de triángulo. Para hacerlo, necesitaremos enumerar la posición de las demás esquinas del triángulo - **escribe** `polygon 16, 10, 0, 11`", + "solution": "polygon 16, 10, 0, 11" + }, + { + "hint": "Este letrero necesita un palo que lo sostenga - **escribe** `moveTo 230, 350`", + "solution": "moveTo 230, 350" + }, + { + "hint": "Configura el color del palo a marrón - **escribe** `color brown` ", + "solution": "color brown" + }, + { + "hint": "Configura el trazo a 0 - **escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Ahora que ya configuramos el color, dibuja el palo con un rectángulo - **escribe** `rectangle 40, 150`", + "solution": "rectangle 40, 150" + }, + { + "hint": "Necesitamos que nuestro letrero diga algo. Vamos a agregarle texto. Mueve el cursor a la posición del texto - **escribe** `moveTo 250, 270`", + "solution": "moveTo 250, 270" + }, + { + "hint": "Ahora necesitamos elegir la fuente. Hay muchas para elegir, puede ser `Bariol`, `Georgia`, `Comic Sans MS`, `cursive`, y `Courier`.\n\nElige tu favorita y escribe el nombre de la fuente entre comillas, así - `font 'Bariol', 70`.", + "solution": "font 'Bariol', 70" + }, + { + "hint": "Ahora podemos escribir algo usando el comando de texto. En inglés se dice text - **escribe** `text 'My Camp'`", + "solution": "text 'My Camp'" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/campfire.json b/lib/challenges/locales/es/worlds/summercamp/campfire.json new file mode 100755 index 000000000..aa2adba51 --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/campfire.json @@ -0,0 +1,90 @@ +{ + "id": "campfire", + "title": "Fogata", + "short_title": "Fogata", + "description": "Es tiempo de iniciar una fogata. En el descampado, ésta podría ser tu única fuente de luz y calor. Ardiendo por encima de los 600 grados centígrados, ¡esto será seguro para mantener el calor y alimentarte también! Sobre la llama y con la ayuda de algún pinche puedes cocinar carne, vegetales y malvaviscos. \nLas fogatas se arman con leños pero tú la harás programando y utilizando un ciclo. A medida que tu fuego crece y se mezcla con el oxígeno, cambia de color entre los distintos tonos de naranja. Tus códigos de programación darán lugar a cientos de colores utilizando únicamente algunas líneas de comandos.", + "icon_class": "challenge_fire", + "completion_text": "¡Intenta agregar un cielo estrellado, más llamas de fuego o un aro de rocas alrededor de tu fogata para que sea más seguro cocinar algo!", + "difficulty": 2, + "cover": "summercamp/day_6.png", + "startAt": 5, + "summerCamp": true, + "rewards": { + "wallpaper": 1 + }, + "steps": [ + { + "hint": "Es una noche oscura. Configura el fondo usando `background` a azul oscuro o `darkblue` en inglés", + "solution": "background darkblue" + }, + { + "hint": "Configura el trazo a 0 para evitar dibujar líneas - **escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Mueve el cursor para dibujar el piso - **escribe** `moveTo 0, 300`", + "solution": "moveTo 0, 300" + }, + { + "hint": "Configura el `color` a verde oscuro o `darkgreen`", + "solution": "color darkgreen" + }, + { + "hint": "Dibuja el césped usando un rectángulo - **escribe** `rectangle 500, 200`", + "solution": "rectangle 500, 200" + }, + { + "hint": "Mueve el cursor para dibujar el efecto de luz que genera el fuego en el piso - **escribe** `moveTo 250, 400`", + "solution": "moveTo 250, 400" + }, + { + "hint": "Configura el `color` a verde o `green`", + "solution": "color green" + }, + { + "hint": "Dibuja la luz usando una elipse - **escribe** `ellipse 200, 30`", + "solution": "ellipse 200, 30" + }, + { + "hint": "Necesitamos leños de madera para crear el fuego - **escribe** `moveTo 110, 390`", + "solution": "moveTo 110, 390" + }, + { + "hint": "Configura el trazo para los leños - **escribe** `stroke brown, 25`", + "solution": "stroke brown, 25" + }, + { + "hint": "Bien, ahora dibuja el primero - **escribe** `line 270, 30`", + "solution": "line 270, 30" + }, + { + "hint": "Mueve el cursor para dibujar el segundo - **escribe** `moveTo 420, 390`", + "solution": "moveTo 420, 390" + }, + { + "hint": "Dibuja el segundo leño - **escribe** `line -290, 30`", + "solution": "line -290, 30" + }, + { + "hint": "¡Excelente! Ahora estamos listos para encender el fuego - **escribe** `moveTo 180, 400`", + "solution": "moveTo 180, 400" + }, + { + "hint": "Nuestro fuego estará formado por 150 líneas de color naranja - **escribe** `for i in [ 1 .. 150 ]`", + "solution": "for i in [ 1 .. 150 ]" + }, + { + "hint": "Configura el tamaño y el color de cada línea - **escribe** `stroke 'rgba(255, ' + (i + 50) + ', 0, 0.3)', 10`", + "solution": " stroke 'rgba(255, ' + (i + 50) + ', 0, 0.3)', 10", + "validate": "__^ stroke 'rgba*\\(255, ' \\+ \\(i *\\+ *50\\) *\\+ *', *0, *0.3\\)', 10" + }, + { + "hint": "Ahora dibuja la línea - **escribe** `line 150 - i`", + "solution": " line 150 - i" + }, + { + "hint": "Mueve el cursor para la siguiente línea - **escribe** `move 0.5, -2`", + "solution": " move 0.5, -2" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/campsite.json b/lib/challenges/locales/es/worlds/summercamp/campsite.json new file mode 100755 index 000000000..a52d655db --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/campsite.json @@ -0,0 +1,97 @@ +{ + "id": "campsite", + "title": "Dibuja tu Camping", + "short_title": "Camping", + "description": "Es hora de buscar un lugar agradable para tu campamento. Lo más importante a la hora de buscar sitio para construir un campamento es que sea un terreno llano. Si es posible, que haya alguna fuente de agua cerca, esto facilitará el momento de la cocina y la limpieza. Finalmente, asegúrate de que esté rodeado de algunos árboles, ya que brindan leña y una buena protección del sol. \nTus amigos querrán ver cómo se ve tu camping, cuando tengas uno en mente ¡dibújalo!", + "icon_class": "challenge_location", + "completion_text": "¡El camping se ve genial! Intenta agregar más árboles, flores, piedras... ¿tal vez una cerca?", + "cover": "summercamp/day_2.png", + "difficulty": 1, + "startAt": 1, + "summerCamp": true, + "rewards": { + "outfit": 1 + }, + "steps": [ + { + "hint": "Hoy es un hermoso día - **escribe** `background blue`", + "solution": "background blue" + }, + { + "hint": "Configura el trazo a 0 para evitar dibujar líneas - **escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Mueve el cursor a donde se ubicará el sol - **escribe** `moveTo 400, 50`", + "solution": "moveTo 400, 50" + }, + { + "hint": "Configura el `color` del sol a amarillo usando el equivalente en inglés `yellow`", + "solution": "color yellow" + }, + { + "hint": "Dibuja el sol con un círculo - **escribe** `circle 40`", + "solution": "circle 40" + }, + { + "hint": "Hay una nube en el horizonte - **escribe** `moveTo 440, 80`", + "solution": "moveTo 440, 80" + }, + { + "hint": "Configura el `color` de la nube a blanco o `white`", + "solution": "color white" + }, + { + "hint": "Dibuja la nube usando una elipse - **escribe** `ellipse 60, 20`", + "solution": "ellipse 60, 20" + }, + { + "hint": "El lago tiene un hermoso `color` aguamarina o `aquamarine`", + "solution": "color aquamarine" + }, + { + "hint": "Mueve el cursor a donde se ubicará el lago - **escribe** `moveTo 0, 190`", + "solution": "moveTo 0, 190" + }, + { + "hint": "Dibuja el lago usando un simple rectángulo - **escribe** `rectangle 500, 310`", + "solution": "rectangle 500, 310" + }, + { + "hint": "Configura el `color` a verde, o `green` en inglés, para el césped", + "solution": "color green" + }, + { + "hint": "Mueve el cursor antes de dibujar el césped - **escribe** `moveTo 250, 700`", + "solution": "moveTo 250, 700" + }, + { + "hint": "Dibuja el césped con un círculo - **escribe** `circle 500`", + "solution": "circle 500" + }, + { + "hint": "Se ve un poco vacío, vamos a dibujar un árbol - **escribe** `moveTo 120, 300`", + "solution": "moveTo 120, 300" + }, + { + "hint": "Configura el `color` del tronco a marrón o `brown`", + "solution": "color brown" + }, + { + "hint": "Dibuja el tronco del árbol usando un rectángulo - **escribe** `rectangle 15, 100`", + "solution": "rectangle 15, 100" + }, + { + "hint": "Ahora posiciónate para dibujar la copa del árbol - **escribe** `move 8, -120`", + "solution": "move 8, -120" + }, + { + "hint": "Configura el `color` a verde oscuro o `darkgreen`", + "solution": "color darkgreen" + }, + { + "hint": "Dibuja la copa del árbol con un tríangulo usando el comando `polygon` - **escribe** `polygon -40, 160, 40, 160`", + "solution": "polygon -40, 160, 40, 160" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/cinema.json b/lib/challenges/locales/es/worlds/summercamp/cinema.json new file mode 100755 index 000000000..34e41cf68 --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/cinema.json @@ -0,0 +1,117 @@ +{ + "id": "cinema", + "title": "Relájate viendo una película", + "short_title": "Cine", + "icon_class": "challenge_cinema", + "description": "En 1895 y luego de transmitir una presentación de los hermanos Skladanowsky que consistía en una seguidilla de películas cortas de 6 segundos de duración acompañadas de una pieza musical, el teatro Berlín Wintergarten se convirtió en el primer teatro-cine. Desafortunadamente, el teatro fue destruido en 1944 durante la Segunda Guerra Mundial a causa de bombardeos.", + "cover": "summercamp/day_14.png", + "completion_text": "¿Qué tan divertido es un cine si no transmite una película? Intenta dibujar una escena de tu película favorita en la pantalla grande y tal vez algunos amigos mirando la película contigo. ¡No olvides las palomitas de maíz!", + "difficulty": 2, + "startAt": 0, + "summerCamp": true, + "rewards": { + "wallpaper": 1 + }, + "steps": [ + { + "hint": "Está oscuro en el cine. Configura el fondo,`background` a negro o `black`, en inglés", + "solution": "background black" + }, + { + "hint": "En una nueva línea configura el trazo a `0` usando `stroke`", + "solution": "stroke 0" + }, + { + "hint": "Primero, mueve el cursor para dibujar el piso - **escribe** `moveTo 0, 300`", + "solution": "moveTo 0, 300" + }, + { + "hint": "Configura el `color` del piso a gris o `gray`", + "solution": "color gray" + }, + { + "hint": "Dibuja el piso usando un rectángulo - **escribe** `rectangle 500, 200`", + "solution": "rectangle 500, 200" + }, + { + "hint": "Ahora, mueve el cursor para ubicar la pantalla - **escribe** `moveTo 50, 20`", + "solution": "moveTo 50, 20" + }, + { + "hint": "Configura el `color` de la pantalla a blanco, `white` en inglés", + "solution": "color white" + }, + { + "hint": "La pantalla es un rectángulo perfecto de `400` por `250`, recuerda usar la función `rectangle`", + "solution": "rectangle 400, 250" + }, + { + "hint": "¡Increíble! Este teatro necesita cortinas - **escribe** `moveTo 0`", + "solution": "moveTo 0" + }, + { + "hint": "Configura el `color` de las cortinas a rojo o `red`", + "solution": "color red" + }, + { + "hint": "Dibuja un rectángulo vertical usando `rectangle` Hazlo de un tamaño de `30` por `330`", + "solution": "rectangle 30, 330" + }, + { + "hint": "Ahora dibuja una cortina horizontal de un tamaño de `500` por `10`", + "solution": "rectangle 500, 10" + }, + { + "hint": "¡Se ve genial! Ubica la cortina de la derecha - **escribe** `move 470`", + "solution": "move 470" + }, + { + "hint": "Dibuja una cortina vertical, igual a la de la izquierda", + "solution": "rectangle 30, 330" + }, + { + "hint": "Este cine necesita asientos - **escribe** `moveTo 0, 360`", + "solution": "moveTo 0, 360" + }, + { + "hint": "Configura el borde de los asientos usando `stroke` Hazlo anaranjado o `orangered` y de un tamaño de `10`.", + "solution": "stroke orangered, 10" + }, + { + "hint": "Vamos a dibujar 3 filas de 6 asientos usando un ciclo - **escribe** `for x in [ 1 .. 3 ]`", + "solution": "for x in [ 1 .. 3 ]" + }, + { + "hint": "Configura el `color` de los asientos a rojo o en inglés: `red`", + "solution": " color red" + }, + { + "hint": "Usa la función `rectangle` para los asientos, hazlos de un tamaño de `500` por `40`", + "solution": " rectangle 500, 40" + }, + { + "hint": "Mueve el cursor para dibujar la parte de atrás de los asientos - **escribe** `move 0, 50`", + "solution": " move 0, 50" + }, + { + "hint": "Dentro del ciclo, abre un segundo ciclo para la parte de atrás de los asientos - **escribe** `for y in [ 1 .. 6 ]`", + "solution": " for y in [ 1 .. 6 ]" + }, + { + "hint": "Configura el `color` de la parte trasera de los asientos a rojo oscuro o `darkred`", + "solution": " color darkred" + }, + { + "hint": "¡Brillante! Ya casi está listo. Ahora dibuja la parte trasera de los asientos usando un arco - **escribe** `arc 60, 0, 1`", + "solution": " arc 60, 0, 1" + }, + { + "hint": "Ahora separa los asientos entre sí una distancia de `130` píxeles a la derecha", + "solution": " move 130" + }, + { + "hint": "Por último, asegúrate de que los asientos estén ubicados correctamente - presiona **Enter**, luego la tecla **Borrar** una sola vez y **escribe** `move -800` dentro del **primer** ciclo", + "solution": " move -800" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/compass.json b/lib/challenges/locales/es/worlds/summercamp/compass.json new file mode 100755 index 000000000..b8b86414d --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/compass.json @@ -0,0 +1,93 @@ +{ + "id": "compass", + "title": "Una brújula es una herramienta esencial", + "short_title": "Brújula", + "icon_class": "challenge_compass", + "description": "Una brújula es simplemente un imán, generalmente una aguja magnetizada. Dado que los opuestos se atraen, el polo sur de la aguja se encuentra atraído al polo norte magnético y natural de la Tierra. ¿Sabías que puedes construir la tuya propia con un clip, un corcho y un imán?", + "cover": "summercamp/day_9.png", + "completion_text": "Ahora intenta agregar los otros componentes de la brújula: los demás puntos cardinales (E, S, O y también podría ser NE, NO, SE y SO) ¿Por qué no una mano que la sostenga?", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": { + "wallpaper": 1 + }, + "steps": [ + { + "hint": "Elige gris claro o `lightgray` para la función `background`", + "solution": "background lightgray" + }, + { + "hint": "En una nueva línea, configura el trazo de color dorado usando `stroke`. Dorado en inglés es `gold` y hazlo de un tamaño de `20`", + "solution": "stroke gold, 20" + }, + { + "hint": "Configura el `color` de la brújula a gris o `gray`", + "solution": "color gray" + }, + { + "hint": "Tu brújula será un círculo o `circle` de un tamaño de `110`", + "solution": "circle 110" + }, + { + "hint": "Configura el `color` a gris oscuro o `darkgray` para la segunda mitad de la brújula", + "solution": "color darkgray" + }, + { + "hint": "Configura el trazo o `stroke` otra vez a `0`", + "solution": "stroke 0" + }, + { + "hint": "Dibuja un arco que encaje con la mitad de arriba de la brújula - **escribe** `arc 105, 2, 1`", + "solution": "arc 105, 2, 1" + }, + { + "hint": "Tenemos que marcar el norte - en una nueva línea **escribe** `moveTo 250, 175`", + "solution": "moveTo 250, 175" + }, + { + "hint": "Configura el `color` a dorado o `gold`", + "solution": "color gold" + }, + { + "hint": "Configura la fuente del texto o `font` a `'cursive'` de un tamaño de `25`", + "solution": "font 'cursive', 25" + }, + { + "hint": "Escribe una N que represente el norte - **escribe** `text 'N'`", + "solution": "text 'N'" + }, + { + "hint": "Ahora necesitamos una aguja con dos puntas. Configura el `color` a `red` - que es rojo - para la primera punta", + "solution": "color red" + }, + { + "hint": "Mueve el cursor a la posición de la aguja **escribe** `moveTo 230, 250`", + "solution": "moveTo 230, 250" + }, + { + "hint": "Dibuja un triángulo usando un polígono - **escribe** `polygon 20, -90, 40, 0`", + "solution": "polygon 20, -90, 40, 0" + }, + { + "hint": "¡Excelente! Configura el `color` a blanco o `white` para la segunda punta de la aguja", + "solution": "color white" + }, + { + "hint": "Dibuja la segunda punta - **escribe** `polygon 20, 90, 40, 0`", + "solution": "polygon 20, 90, 40, 0" + }, + { + "hint": "Termínala con un último detalle. Configura el `color` a dorado o `gold`", + "solution": "color gold" + }, + { + "hint": "Mueve el cursor al centro de la brújula **escribe** `move 20`", + "solution": "move 20" + }, + { + "hint": "Dibuja un círculo usando `circle` de un tamaño de `20`", + "solution": "circle 20" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/fireworks.json b/lib/challenges/locales/es/worlds/summercamp/fireworks.json new file mode 100755 index 000000000..3307a370b --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/fireworks.json @@ -0,0 +1,50 @@ +{ + "id": "fireworks", + "title": "Fuegos Artificiales", + "short_title": "Fuegos Artificiales", + "icon_class": "challenge_fireworks", + "description": "¡El campamento está llegando a su fin y tenemos fuegos artificiales para celebrar! Los fuegos artificiales fueron utilizados durante muchos siglos: se cree que los inventaron los chinos. Estamos listos para empezar el show pero necesitamos un poco de ayuda diseñando los fuegos artificiales ¿podrías hacerlo?", + "cover": "summercamp/day_21.png", + "completion_text": "¡Buen trabajo! ¡Hiciste una función para dibujar fuegos artificiales! ¿Puedes mejorarla? ¡Dibújalos a lo largo de toda la pantalla, agrega otras creaciones y comparte tu dibujo!", + "difficulty": 3, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "El sol ya bajó y hay luna nueva, vamos a dibujar un cielo oscuro con `background black`", + "solution": "background black" + }, + { + "hint": "Configura el trazo usando `stroke` a rojo o `red` para nuestro fuego artificial", + "solution": "stroke red" + }, + { + "hint": "Queremos dibujar 60 líneas que salen de un mismo punto, vamos a usar un ciclo `for i in [0 ... 60]`", + "solution": "for i in [0 ... 60]" + }, + { + "hint": "Todas las líneas deberían diferenciarse en su longitud. Configuremos una longitud aleatoria para cada una usando `length = random 1, 200`.", + "solution": " length = random 1, 200" + }, + { + "hint": "En cada vuelta de nuestro ciclo, dibujaremos una nueva línea que sale del centro. Cada vez que se ejecute el comando, el ángulo de la línea debería cambiar. Para esto necesitamos un poco de matemática avanzada pero no temas, sólo **escribe** `angle = (360 / 60 * i) * (Math.PI / 180)`.", + "solution": " angle = (360 / 60 * i) * (Math.PI / 180)", + "validate": "__^ angle *= *\\(360 */ *60 \\* i\\) *\\* *\\(Math[.]PI */ *180\\) *$" + }, + { + "hint": "Ya hemos configurado aleatoriamente los ángulos y la longitud de las líneas, ahora configuremos aleatoriamente el punto de la coordenada X donde terminarán las líneas. **Escribe** `dx = 250 + Math.sin(angle) * length`.", + "solution": " dx = 250 + Math.sin(angle) * length", + "validate": "__^ dx *= *250 *\\+ *Math.sin\\(angle\\) *\\* *length" + }, + { + "hint": "Ahora calculemos el punto de la coordenada Y para el final de las líneas. **Escribe** `dy = 250 + Math.cos(angle) * length`.", + "solution": " dy = 250 + Math.cos(angle) * length", + "validate": "__^ dy *= *250 *\\+ *Math.cos\\(angle\\) *\\* *length" + }, + { + "hint": "Finalmente, con todas las coordenadas ya configuradas estamos listos para dibujar las líneas. **Escribe** `lineTo dx, dy` ", + "solution": " lineTo dx, dy" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/fishing.json b/lib/challenges/locales/es/worlds/summercamp/fishing.json new file mode 100755 index 000000000..6b9d86451 --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/fishing.json @@ -0,0 +1,110 @@ +{ + "id": "fishing", + "title": "Pesca", + "short_title": "Pesca", + "icon_class": "challenge_fishing", + "description": "¡Es hora de ir a pescar! Dentro del lago del campamento hay trucha, bagre y perca nadando por un bocado. Toma tu caña de pescar, alguna carnada y encamínate hacia el lago para la aventura de hoy.", + "cover": "summercamp/day_17.png", + "completion_text": "¡Buen trabajo! Cada vez que presionas una tecla, la imagen se re-dibuja. Intenta mantener apretada la barra espaciadora y fíjate cómo se mueven las olas. Además intenta agregar algún pez o hacer que desaparezca el corcho. ", + "difficulty": 2, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "¡Es un día soleado! Configura el fondo a celeste - **escribe** `background lightblue`", + "solution": "background lightblue" + }, + { + "hint": "Vamos a empezar por dibujar las olas en el lago. Queremos dibujarlas sin color de relleno - configura el `color` a `null`.", + "solution": "color null" + }, + { + "hint": "Nuestras olas serán de un azul oscuro - **escribe** `stroke darkblue, 8`", + "solution": "stroke darkblue, 8" + }, + { + "hint": "Mueve el cursor al punto izquierdo en el cual empezarán - **escribe** `moveTo 10, 250`", + "solution": "moveTo 10, 250" + }, + { + "hint": "Vamos a crear 25 olas dentro de un ciclo - **escribe** `for i in [1 .. 25]`", + "solution": "for i in [1 .. 25]" + }, + { + "hint": "Crea una ola usando un arco de un radio de 20 píxeles - **escribe** `arc 20, 0.8, 0.2`", + "solution": " arc 20, 0.8, 0.2" + }, + { + "hint": "Mueve cada ola de manera aleatoria hacia la izquierda - **escribe** `move (random 24, 32)`", + "solution": " move (random 24, 32)", + "validate": "__ move \\(random 24, +32\\)" + }, + { + "hint": "Presiona ENTER y la tecla borrar para eliminar la sangría y salir del ciclo.\n\nLuego muévete al sitio donde dibujaremos el resto del agua - **escribe** `moveTo 0, 270`.", + "solution": "moveTo 0, 270" + }, + { + "hint": "Configura el `color` del agua para que sea igual al de las olas", + "solution": "color darkblue" + }, + { + "hint": "Dibuja un rectángulo con `rectangle` y hazlo de un tamaño de `500` píxeles de alto y `250` píxeles de ancho", + "solution": "rectangle 500, 250" + }, + { + "hint": "Vamos a prepararnos y agregar algunas olas pequeñas - **escribe** `stroke blue, 2`", + "solution": "stroke blue, 2" + }, + { + "hint": "Vamos a dibujar olas 100 veces - **escribe** `for i in [1 .. 100]`", + "solution": "for i in [1 .. 100]" + }, + { + "hint": "Mueve cada ola a una posición aleatoria en la superficie del agua - **escribe** `moveTo (random 0, 500), (random 260, 500)`", + "solution": " moveTo (random 0, 500), (random 260, 500)", + "validate": "__ moveTo ?\\( *random +0, +500 *\\), +\\( *random +260, +500 *\\)" + }, + { + "hint": "Ahora dibuja cada ola pequeña como si fuera un arco - **escribe** `arc 10, 0.8, 0.2`", + "solution": " arc 10, 0.8, 0.2" + }, + { + "hint": "¡Brillante! ¡Cada vez que presiones la barra espaciadora, nuevas olas aparecerán en lugares aleatorios, le da un efecto de movimiento al agua!\n\nPara poder pescar algo necesitaremos una caña de pescar marrón - Sal del ciclo y **escribe** `stroke brown, 10`.", + "solution": "stroke brown, 10" + }, + { + "hint": "Ahora muévete al punto donde dibujaremos el final de la caña - **escribe** `moveTo 300, 100`", + "solution": "moveTo 300, 100" + }, + { + "hint": "Dibuja una línea usando `line` de `150` por`400`", + "solution": "line 150, 400" + }, + { + "hint": "Ahora tenemos que dibujar el hilo - **escribe** `stroke lightgray, 1`", + "solution": "stroke lightgray, 1" + }, + { + "hint": "Dibújalo para que vaya hacia abajo y a la izquierda - **escribe** `line -100, 200`", + "solution": "line -100, 200" + }, + { + "hint": "Para enterarnos cuando un pez muerde la carnada tenemos que hacer un corcho flotando. Muévete hacia el final del hilo - **escribe** `move -100, (random 197, 202)`", + "solution": "move -100, (random 197, 202)", + "valudate": "__move -100, \\(random 197, 202\\)" + }, + { + "hint": "El corcho no tendrá líneas de borde - **escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Configura el `color` del corcho a rojo o `red`", + "solution": "color red" + }, + { + "hint": "Ahora dibuja el corcho flotando en el agua - `arc 8, 0, 1`", + "solution": "arc 8, 0, 1" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/flag.json b/lib/challenges/locales/es/worlds/summercamp/flag.json new file mode 100755 index 000000000..bad95be29 --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/flag.json @@ -0,0 +1,77 @@ +{ + "id": "flag", + "title": "Crea tu Bandera", + "short_title": "Bandera", + "description": "Es tiempo de mostrar tus verdaderos colores. El camping va tomando forma, y como todo líder de campamento necesitas hacer tu propia bandera. Te llevamos a lo básico con una simple bandera y su mástil, pero depende de ti personalizarla. \nPuedes buscar inspiración en otras banderas. Países como Francia, Nigeria, Suecia o Suiza tienen banderas con colores y diseños simples, mientras que España, Brasil, Kenia y Arabia Saudita tienen diseños más complejos. ¡Cuando hayas terminado comparte tu bandera para poder marcar tu territorio!", + "icon_class": "challenge_flag", + "completion_text": "Tienes un lienzo blanco esperando ser pintado, úsalo sabiamente. ¡Crea la bandera más increíble de todos los tiempos!", + "cover": "summercamp/day_4.png", + "difficulty": 1, + "startAt": 3, + "summerCamp": true, + "rewards": { + "outfit": 1 + }, + "steps": [ + { + "hint": "Dibuja el cielo en el que flameará tu bandera - **escribe** `background blue`", + "solution": "background blue" + }, + { + "hint": "Configura el trazo a 0 para evitar dibujar líneas - **escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Vamos a mover el cursor hacia donde estará el mástil de nuestra bandera - **escribe** `moveTo 100, 100`", + "solution": "moveTo 100, 100" + }, + { + "hint": "Configura el `color` del mástil a gris oscuro o `darkgray` en inglés", + "solution": "color darkgray" + }, + { + "hint": "Dibuja un fino y largo mástil con un rectángulo - **escribe** `rectangle 10, 400`", + "solution": "rectangle 10, 400" + }, + { + "hint": "Mueve el cursor a lo alto del mástil para dibujarle un adorno - **escribe** `move 5`", + "solution": "move 5" + }, + { + "hint": "Configura el `color` del adorno a dorado o `gold`", + "solution": "color gold" + }, + { + "hint": "Dibuja un círculo de un tamaño de 8 - en una nueva línea **escribe** `circle 8`", + "solution": "circle 8" + }, + { + "hint": "Ahora mueve el cursor para empezar a dibujar la bandera - **escribe** `moveTo 115, 123`", + "solution": "moveTo 115, 123" + }, + { + "hint": "Configura el `color` de la bandera a blanco o `white`", + "solution": "color white" + }, + { + "hint": "Dibuja la bandera usando la función `rectangle` de un tamaño de `261` por `171`", + "solution": "rectangle 261, 171" + }, + { + "hint": "La bandera necesita una soga que la sostenga al mástil - **escribe** `moveTo 100, 140`", + "solution": "moveTo 100, 140" + }, + { + "hint": "Configura el `color` de la soga a marrón o `brown`", + "solution": "color brown" + }, + { + "hint": "Dibuja la soga usando `rectangle` de un tamaño de `20` por `5` ", + "solution": "rectangle 20, 5" + }, + { + "hint": "¡Ahora es tu turno! Dale a tu bandera el toque final con tu propio diseño - **escribe** `moveTo 120, 125`", + "solution": "moveTo 120, 125" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/flashlight.json b/lib/challenges/locales/es/worlds/summercamp/flashlight.json new file mode 100755 index 000000000..5cec61265 --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/flashlight.json @@ -0,0 +1,93 @@ +{ + "id": "flashlight", + "title": "¡Luces!", + "short_title": "Linterna", + "icon_class": "challenge_flashlight", + "description": "Antes de las linternas se usaban antorchas encendidas con fuego; la llama permitía alumbrar el camino de muchos exploradores. Con la llegada de la electricidad y la invención de las pilas en 1887, los caminos eran alumbrados con bombillas de luz incandescente. Si bien la tecnología de las linternas ha evolucionado, siguen siendo tan útiles como siempre. Mientras tanto, las antorchas que se usaban antes hoy se pueden encontrar en actos de circo donde son arrojadas al aire para hacer malabares.", + "cover": "summercamp/day_12.png", + "completion_text": "Eres un aventurero con una linterna en la oscuridad. ¿Qué has descubierto gracias a la luz de tu linterna? Intenta dibujar un zorro o una lechuza ululando en un árbol.", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": { + "outfit": 1 + }, + "steps": [ + { + "hint": "¡Afuera está oscureciendo! Configura el fondo usando `background` de azul oscuro o `darkblue` en inglés", + "solution": "background darkblue" + }, + { + "hint": "Configura el trazo usando `stroke` a `0`, en este desafío no lo necesitaremos", + "solution": "stroke 0" + }, + { + "hint": "Mueve el cursor a donde estará la linterna - **escribe** `moveTo 200, 200`", + "solution": "moveTo 200, 200" + }, + { + "hint": "Configura el `color` de la linterna a un tono de gris o `dimgray` en inglés", + "solution": "color dimgray" + }, + { + "hint": "Dibuja la cabeza de tu linterna usando un rectángulo - **escribe** `rectangle 100, 50`", + "solution": "rectangle 100, 50" + }, + { + "hint": "Ahora mueve el cursor hacia abajo para dibujar el cuello de la linterna - **escribe** `move 0, 50`", + "solution": "move 0, 50" + }, + { + "hint": "Configura el `color` de esta parte de la linterna a gris o `gray`", + "solution": "color gray" + }, + { + "hint": "Dibuja un polígono - **escribe** `polygon 20, 40, 80, 40, 100, 0`", + "solution": "polygon 20, 40, 80, 40, 100, 0" + }, + { + "hint": "¡Emocionante! Ahora mueve el cursor hacia abajo para dibujar el cuerpo - **escribe** `move 20, 40`", + "solution": "move 20, 40" + }, + { + "hint": "Configura el `color` a gris oscuro o `darkgray`", + "solution": "color darkgray" + }, + { + "hint": "Dibuja el cuerpo de la linterna usando la función `rectangle` `60` por `200`", + "solution": "rectangle 60, 200" + }, + { + "hint": "Lo único que falta ahora es el botón de encendido. Configura el `color` a `dimgray`", + "solution": "color dimgray" + }, + { + "hint": "Ahora mueve el cursor hacia abajo para dibujar el botón - **escribe** `move 30, 50`", + "solution": "move 30, 50" + }, + { + "hint": "Dibuja una elipse - **escribe** `ellipse 10, 30`", + "solution": "ellipse 10, 30" + }, + { + "hint": "Configura el `color` del botón a rojo o `red`", + "solution": "color red" + }, + { + "hint": "Dibuja el botón con una elipse - **escribe** `ellipse 10, 20`", + "solution": "ellipse 10, 20" + }, + { + "hint": "¡Encendiste la linterna! Configura el color del rayo de luz - **escribe** `color \"rgba(255, 255, 0, 0.8)\"`", + "solution": "color \"rgba(255, 255, 0, 0.8)\"" + }, + { + "hint": "Coloca el rayo de luz enfrente de la linterna - **escribe** `move -50, -140`", + "solution": "move -50, -140" + }, + { + "hint": "Dibuja el rayo de luz usando la función polygon - **escribe** `polygon 100, 0, 180, -300, -80, -300`", + "solution": "polygon 100, 0, 180, -300, -80, -300" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/foraging.json b/lib/challenges/locales/es/worlds/summercamp/foraging.json new file mode 100755 index 000000000..9939283f4 --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/foraging.json @@ -0,0 +1,57 @@ +{ + "id": "foraging", + "title": "Recolectar", + "short_title": "Recolectar", + "icon_class": "challenge_foraging", + "description": "Los lugares silvestres están repletos de plantas y fauna para comer. Desde hongos hasta fresas y una gran diversidad de bayas, cualquier comida puede ser improvisada con los alimentos que nos da la naturaleza. Las bayas son muy comunes en muchas partes del mundo y en Camp Kano crecen silvestremente aunque son difíciles de encontrar. Tendrás que usar tus habilidades de programación para encontrarlas.", + "cover": "summercamp/day_19.png", + "completion_text": "¡Espera! ¿Dónde están esas bayas que deberías estar recolectando? ¡Usa `color red`, `moveTo`, y `square 25` para agregar algunas al dibujo!", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": { + "wallpaper": 1 + }, + "steps": [ + { + "hint": "Configura el trazo a `0` usando `stroke`", + "solution": "stroke 0" + }, + { + "hint": "¡Es un día soleado! Configura el fondo a azul usando `background` - recuerda que azul en inglés es `blue`.", + "solution": "background blue" + }, + { + "hint": "Nuestra escena de recolección de bayas necesita un campo de césped para empezar. Configura el color de dibujo a verde que es `green` en inglés.", + "solution": "color green" + }, + { + "hint": "Queremos el césped en la mitad de abajo de la pantalla. Muévete a la posición con `moveTo 0, 300`", + "solution": "moveTo 0, 300" + }, + { + "hint": "Dibuja el césped usando un rectángulo grande, usa `rectangle` y hazlo de un tamaño de `500, 200`", + "solution": "rectangle 500, 200" + }, + { + "hint": "Ahora agreguemos un lindo árbol a nuestra escena de recolección. Comienza por moverte exactamente a las coordenadas `50, 100`.", + "solution": "moveTo 50, 100" + }, + { + "hint": "Las hojas las representaremos con un cuadrado, usa `square 150`.", + "solution": "square 150" + }, + { + "hint": "Ahora debemos dibujar el tronco. Mueve el cursor usando `moveTo 100, 250`.", + "solution": "moveTo 100, 250" + }, + { + "hint": "La madera es de un bonito color marrón oscuro o `darkbrown` en inglés. Configura el color de dibujo.", + "solution": "color darkbrown" + }, + { + "hint": "Para el tronco usa `rectangle` con un ancho de `40` y alto de `150`", + "solution": "rectangle 40, 150" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/ghost.json b/lib/challenges/locales/es/worlds/summercamp/ghost.json new file mode 100755 index 000000000..63c954219 --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/ghost.json @@ -0,0 +1,91 @@ +{ + "id": "ghost", + "title": "Encuentro con Fantasma", + "short_title": "Fantasma", + "description": "¡Bu! A medida que cae la noche, los espíritus salen a jugar. Estudios recientes reportaron que un 87% de trabajadores de oficina chinos creen en los fantasmas y según otro estudio un 25% de británicos dicen haber visto alguno. Está oscureciendo, se hace difícil ver con claridad pero creo que... ¡encontramos un fantasma! Usando tus poderes creativos de programación puedes decidir si es amigable o no...", + "icon_class": "challenge_ghost", + "completion_text": "¡Escalofriante! ¿Puedes convertirlo en un fantasma más aterrador? Tal vez si pudiera decir \"Boo!\"...", + "difficulty": 2, + "cover": "summercamp/day_7.png", + "startAt": 6, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "Necesitamos un color escalofriante para el fondo tal como violeta oscuro - **escribe** `background darkpurple`", + "solution": "background darkpurple" + }, + { + "hint": "Configura el trazo a `0` para evitar dibujar líneas usando `stroke`", + "solution": "stroke 0" + }, + { + "hint": "Configura el `color` del fantasma a blanco o `white`", + "solution": "color white" + }, + { + "hint": "Ahora dibuja el cuerpo del fantasma usando una elipse - **escribe** `ellipse 120, 140`", + "solution": "ellipse 120, 140" + }, + { + "hint": "Configura el `color` a negro o `black` para los ojos", + "solution": "color black" + }, + { + "hint": "Mueve el cursor para dibujar el primer ojo - **escribe** `move -40, -50`", + "solution": "move -40, -50" + }, + { + "hint": "Dibuja el ojo con una elipse - **escribe** `ellipse 20, 30`", + "solution": "ellipse 20, 30" + }, + { + "hint": "Configura el `color` a gris claro usando `lightgray`", + "solution": "color lightgray" + }, + { + "hint": "Ahora dibuja un círculo usando la función `circle` de un tamaño de `5`", + "solution": "circle 5" + }, + { + "hint": "¡Se ve bien! Ahora mueve el cursor para dibujar el segundo ojo - **escribe** `move 30`", + "solution": "move 30" + }, + { + "hint": "Configura el `color` del ojo a negro o `black` de nuevo", + "solution": "color black" + }, + { + "hint": "Dibuja el segundo ojo usando una elipse - **escribe** `ellipse 20, 30`", + "solution": "ellipse 20, 30" + }, + { + "hint": "Configura el `color` a gris claro o `lightgray`", + "solution": "color lightgray" + }, + { + "hint": "Dibuja un círculo con la función `circle` de un tamaño de `5`", + "solution": "circle 5" + }, + { + "hint": "¡Ya casi lo terminas! Configura el `color` a blanco o `white`", + "solution": "color white" + }, + { + "hint": "Ahora mueve el cursor hacia arriba - **escribe** `move -80, 150`", + "solution": "move -80, 150" + }, + { + "hint": "Abramos un ciclo - **escribe** `for i in [ 1 .. 5 ]`", + "solution": "for i in [ 1 .. 5 ]" + }, + { + "hint": "Dibuja un círculo usando `circle` de un tamaño de `45`", + "solution": " circle 45" + }, + { + "hint": "Y mueve el cursor levemente hacia la derecha - **escribe** `move 45`", + "solution": " move 45" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/guitar.json b/lib/challenges/locales/es/worlds/summercamp/guitar.json new file mode 100755 index 000000000..25170a796 --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/guitar.json @@ -0,0 +1,128 @@ +{ + "id": "guitar", + "title": "Toca una linda y dulce canción", + "short_title": "Guitarra", + "icon_class": "challenge_guitar", + "description": "¿Sabías que la guitarra más antigua del mundo es de 3500 años atrás? Era un instrumento de 3 cuerdas. Su dueño era un cantante egipcio llamado Har-Mose, y cuando falleció la guitarra fue enterrada a su lado. El instrumento fue desenterrado y, hoy en día, se exhibe en el Museo Arqueológico del Cairo en Egipto.", + "cover": "summercamp/day_13.png", + "completion_text": "¿De qué sirve una guitarra si no hay una fogata y gente cantando alrededor? Intenta dibujar una linda fogata con algunos malvaviscos para ser tostados. Tal vez puedes hacer una luna en el horizonte. ¡Se creativo!", + "difficulty": 2, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "¡Es una hermosa noche! Configura el color del fondo a azul oscuro - **escribe** `background darkblue`", + "solution": "background darkblue" + }, + { + "hint": "Configura el trazo a 0 usando `stroke`.", + "solution": "stroke 0" + }, + { + "hint": "Configura el `color` de tu guitarra a marrón claro o `lightbrown`.", + "solution": "color lightbrown" + }, + { + "hint": "Mueve el cursor al punto donde ubicaremos la caja, la parte más grande de tu guitarra - **escribe** `moveTo 120, 250`", + "solution": "moveTo 120, 250" + }, + { + "hint": "Dibuja la primera parte de la caja usando una elipse - **escribe** `ellipse 60, 65`", + "solution": "ellipse 60, 65" + }, + { + "hint": "Ahora para la segunda parte mueve el cursor `70` píxeles a la derecha usando `move`.", + "solution": "move 70" + }, + { + "hint": "Dibuja un círculo de un tamaño de `55` usando `circle`.", + "solution": "circle 55" + }, + { + "hint": "Toda guitarra necesita un mástil, mueve el cursor para ubicarlo - **escribe** `move 20, -10`", + "solution": "move 20, -10" + }, + { + "hint": "Configura el `color` del mástil a marrón o `brown`.", + "solution": "color brown" + }, + { + "hint": "Dibuja el mástil con un rectángulo - **escribe** `rectangle 150, 20`", + "solution": "rectangle 150, 20" + }, + { + "hint": "Ahora ubiquemos el clavijero - **escribe** `move 150, -5`", + "solution": "move 150, -5" + }, + { + "hint": "Dibuja el clavijero usando la función `rectangle` hazlo de `40` por `30`.", + "solution": "rectangle 40, 30" + }, + { + "hint": "Ahora necesitamos una boca - **escribe** `move -170, 15`", + "solution": "move -170, 15" + }, + { + "hint": "Configura el borde de la boca usando `stroke` `brown` y hazla de un tamaño de `10`.", + "solution": "stroke brown, 10" + }, + { + "hint": "Configura el `color` de la boca a negro o `black`.", + "solution": "color black" + }, + { + "hint": "Dibuja la boca con un círculo de `20` de tamaño, usa `circle`.", + "solution": "circle 20" + }, + { + "hint": "El puente es la pieza que sostiene las cuerdas a la caja. Ubiquémoslo - **escribe** `move -50, -15`", + "solution": "move -50, -15" + }, + { + "hint": "Configura el borde del puente usando `stroke` `red` y de un tamaño de `10`.", + "solution": "stroke red, 10" + }, + { + "hint": "Dibuja el puente con un rectángulo de un tamaño de `2` por `35`. Usa `rectangle`.", + "solution": "rectangle 2, 35" + }, + { + "hint": "Esa guitarra se ve muy bien. Es hora de hacer las cuerdas - **escribe** `move 0, 9`", + "solution": "move 0, 9" + }, + { + "hint": "Configura las propiedades de las cuerdas usando `stroke` `white` de un tamaño de `1`.", + "solution": "stroke white, 1" + }, + { + "hint": "Dibujemos las 4 cuerdas de una sola vez usando un ciclo - **escribe** `for i in [ 1 .. 4 ]`", + "solution": "for i in [ 1 .. 4 ]" + }, + { + "hint": "Dibuja una cuerda usando una línea - **escribe** `line 250`", + "solution": " line 250" + }, + { + "hint": "Y mueve el cursor levemente para dibujar las siguientes - **escribe** `move 0, 4`", + "solution": " move 0, 4" + }, + { + "hint": "Presiona **Enter** y la tecla **Borrar** para configurar el `color` a blanco o `white` fuera del ciclo", + "solution": "color white" + }, + { + "hint": "¡Estás listo para tocar música! Abre un nuevo ciclo - **escribe** `for i in [ 1 .. 10 ]`", + "solution": "for i in [ 1 .. 10 ]" + }, + { + "hint": "Elige una posición aleatoria - **escribe** `moveTo (random 200, 400), (random 100, 400)`", + "solution": " moveTo (random 200, 400), (random 100, 400)", + "validate": "__ moveTo ?\\( *random +200, +400 *\\), +\\( *random +100, +400 *\\)" + }, + { + "hint": "¡Vamos, toca algunas notas! - **copia y pega** `text '♪'`", + "solution": " text '♪'" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/hiking.json b/lib/challenges/locales/es/worlds/summercamp/hiking.json new file mode 100755 index 000000000..cb8117156 --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/hiking.json @@ -0,0 +1,112 @@ +{ + "id": "hiking", + "title": "Cartel de Excursionismo", + "short_title": "Excursionismo", + "icon_class": "challenge_hiking", + "description": "La hermosa sierra de Camp Kano es conocida por su profundo color azul. Sin embargo las 10 montañas de la sierra parecen estar cambiando de posición todo el tiempo lo que hace difícil escalarlas. ¿Deberían los acampantes intentar escalar? ¡Quién sabe! Pero la dirección del campamento quiere un cartel promocionando la actividad.", + "cover": "summercamp/day_18.png", + "completion_text": "¡Bien hecho, has diseñado un increíble cartel publicitario! Ahora juega con los valores aleatorios y el texto. ¿Le falta otra cosa más a este cartel?", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "Por encima de las nubes el cielo se ve azul, **escribe** `background blue`", + "solution": "background blue" + }, + { + "hint": "Las montañas de Camp Kano son de un color azul oscuro. Configura el color usando `color darkblue`.", + "solution": "color darkblue" + }, + { + "hint": "Las montañas tienen un bonito borde grueso, configúralo con `stroke white, 10`", + "solution": "stroke white, 10" + }, + { + "hint": "Vamos a dibujar las diez montañas de Camp Kano utilizando un ciclo. Esto será más rápido que dibujarlas una por una. **Escribe** `for i in [ 0 ... 10 ]` para abrir el ciclo.", + "solution": "for i in [ 0 ... 10 ]" + }, + { + "hint": "Por cada vez que se ejecuta el ciclo, queremos que se dibuje el pico de una montaña aleatoriamente a través de la pantalla. Vamos a seleccionar un valor para X en un rango usando `x = random 0, 500`", + "solution": " x = random 0, 500" + }, + { + "hint": "Sin embargo, para el valor de Y, queremos que cada pico de montaña sea dibujado en la parte alta de la pantalla. **Escribe** `y = random 0, 200`", + "solution": " y = random 0, 200" + }, + { + "hint": "Ahora con nuestros valores X e Y configurados podemos mover el cursor. **Escribe** `moveTo x, y`", + "solution": " moveTo x, y" + }, + { + "hint": "Dibuja una montaña para cada ciclo usando la función polygon. **Escribe** `polygon 400, 500, -400, 500`", + "solution": " polygon 400, 500, -400, 500" + }, + { + "hint": "Primero, sal del ciclo usando la tecla `borrar`. Ahora dibujemos algunas nubes, empieza por suprimir el trazo con `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Las nubes están hechas de gotitas de agua y es fácil ver a través de ellas. Para poder darle al color un efecto de transparencia podemos usar la función 'opacity'. **Escribe** `color (opacity white, .1)`", + "solution": "color (opacity white, .1)", + "validate": "__color \\(opacity white, .1\\)" + }, + { + "hint": "Ahora abramos un nuevo ciclo para dibujar las nubes algodonadas, necesitaremos usar muchos círculos por eso pidámosle al ciclo que los repita unas 250 veces. **Escribe** `for j in [ 0 ... 250 ]`.", + "solution": "for j in [ 0 ... 250 ]" + }, + { + "hint": "Queremos círculos de nubes salpicados aleatoriamente alrededor de la pantalla, elijamos un rango para X entre 0 y 500 usando `x = random 0, 500`", + "solution": " x = random 0, 500" + }, + { + "hint": "Sin embargo, para el valor de Y, queremos que sean dibujadas únicamente en la parte de abajo de la pantalla. **Escribe** `y = random 300, 500`", + "solution": " y = random 300, 500" + }, + { + "hint": "Ahora con los valores de X e Y configurados, podemos mover el cursor. **Escribe** `moveTo x, y`", + "solution": " moveTo x, y" + }, + { + "hint": "Dibujemos las nubes con círculos salpicados por la pantalla usando `circle`, hazlos de un tamaño de `100`", + "solution": " circle 100" + }, + { + "hint": "Presiona la tecla `borrar` una vez para salir del ciclo. Ahora mueve el cursor a donde escribiremos un poco de texto `moveTo 250, 350`", + "solution": "moveTo 250, 350" + }, + { + "hint": "Configura el color de dibujo a rojo - **Escribe** `color red`", + "solution": "color red" + }, + { + "hint": "El mensaje tiene que ser fuerte e impactante, configuremos la fuente a negrita usando `bold true`", + "solution": "bold true" + }, + { + "hint": "También queremos que el texto esté en cursiva, hazlo con `italic true`", + "solution": "italic true" + }, + { + "hint": "Finalmente configuremos el estilo de fuente a Bariol y de un tamaño de 40 usando `font 'Bariol', 40`", + "solution": "font 'Bariol', 40" + }, + { + "hint": "Ingresa el texto con `text 'Excursión a las montañas de'`", + "solution": "text 'Excursión a las montañas de'" + }, + { + "hint": "Ahora, queremos una nueva línea para el gran final **escribe** `font 90`", + "solution": "font 90" + }, + { + "hint": "Movamos el cursor hacia abajo para terminar nuestro mensaje `move 0, 90`", + "solution": "move 0, 90" + }, + { + "hint": "El toque final: **Escribe** `text 'Camp Kano!'`", + "solution": "text 'Camp Kano!'" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/index.json b/lib/challenges/locales/es/worlds/summercamp/index.json new file mode 100644 index 000000000..a54bd7049 --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/index.json @@ -0,0 +1,26 @@ +{ + + "challenges": [ + "./camp_sign", + "./campsite", + "./tent", + "./flag", + "./camp_badge", + "./campfire", + "./ghost", + "./backpack", + "./compass", + "./camera", + "./bear", + "./flashlight", + "./guitar", + "./cinema", + "./bow_and_arrow", + "./table_tennis", + "./fishing", + "./hiking", + "./foraging", + "./tree", + "./fireworks" + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/table_tennis.json b/lib/challenges/locales/es/worlds/summercamp/table_tennis.json new file mode 100755 index 000000000..bbef6d480 --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/table_tennis.json @@ -0,0 +1,121 @@ +{ + "id": "table_tennis", + "title": "Tenis de mesa", + "short_title": "Tenis de mesa", + "icon_class": "challenge_tennis", + "description": "El Tenis de mesa se juega de a dos personas, una de cada lado de una mesa que refleja una miniatura de una cancha de tenis. Los games se juegan a 11 o 21 puntos y una vez finalizada la partida, el ganador tira su pala al piso y expulsa su grito de gloria.", + "cover": "summercamp/day_16.png", + "completion_text": "¡Bien hecho! Hiciste una hermosa mesa de Ping Pong en 3D. ¡Pero no hay nadie jugando ni mirando la partida! Usa tu creatividad y los comandos para dibujar algunas personas disfrutando del juego.", + "difficulty": 2, + "startAt": 0, + "summerCamp": true, + "rewards": { + "wallpaper": 1 + }, + "steps": [ + { + "hint": "Comienza por configurar el trazo a 0 con `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "¡Es un hermoso día soleado! Configura el color del fondo a azul - **escribe** `background blue`", + "solution": "background blue" + }, + { + "hint": "Configura el color a verde para hacer el césped. **escribe** `color green`.", + "solution": "color green" + }, + { + "hint": "Mueve el cursor al lugar adecuado con `moveTo 0, 350`", + "solution": "moveTo 0, 350" + }, + { + "hint": "Cubre la parte de abajo del lienzo con césped. Dibuja un rectángulo usando `rectangle` Hazlo de `500` por `150`.", + "solution": "rectangle 500, 150" + }, + { + "hint": "Dale a tu mesa patas sólidas para sostenerla. Configura el `color` a marrón usando la palabra inglesa `brown`", + "solution": "color brown" + }, + { + "hint": "Mueve el cursor hacia donde ubicaremos la primera pata. **Escribe** `moveTo 20, 310`", + "solution": "moveTo 20, 310" + }, + { + "hint": "Ahora dibuja la primera pata. **Escribe** `rectangle 15, 150`.", + "solution": "rectangle 15, 150" + }, + { + "hint": "Ahora la segunda pata **Escribe** `moveTo 465, 310`.", + "solution": "moveTo 465, 310" + }, + { + "hint": "Ahora dibuja la segunda pata. **Escribe** `rectangle 15, 150`.", + "solution": "rectangle 15, 150" + }, + { + "hint": "Y la tercera. **Escribe** `moveTo 40, 250`.", + "solution": "moveTo 40, 250" + }, + { + "hint": "Ahora dibuja la tercera pata idéntica a las anteriores", + "solution": "rectangle 15, 150" + }, + { + "hint": "Finalmente, la cuarta pata. **Escribe** `moveTo 445, 250`.", + "solution": "moveTo 445, 250" + }, + { + "hint": "Dibuja la cuarta pata", + "solution": "rectangle 15, 150" + }, + { + "hint": "¡Ahora a poner la mesa! Configura el `color` de la mesa a verde oscuro usando el equivalente inglés `darkgreen`.", + "solution": "color darkgreen" + }, + { + "hint": "Muévete para ubicar la mesa. **Escribe** `moveTo 10, 300`.", + "solution": "moveTo 10, 300" + }, + { + "hint": "Tu mesa tiene perspectiva, para dibujarla usa la función `polygon 30, -60, 450, -60, 480, 0`", + "solution": "polygon 30, -60, 450, -60, 480, 0" + }, + { + "hint": "Para un efecto 3D, aclara el color de dibujo con `color lighten darkgreen, 10`", + "solution": "color lighten darkgreen, 10" + }, + { + "hint": "**Dibuja** el lado de la mesa con `rectangle 480, 10`", + "solution": "rectangle 480, 10" + }, + { + "hint": "Para la red, configura el `color` a blanco o `white`", + "solution": "color white" + }, + { + "hint": "Mueve el cursor a `moveTo 248, 220`", + "solution": "moveTo 248, 220" + }, + { + "hint": "Dibuja la red, usa la función `rectangle` de un tamaño de `4` por `80`", + "solution": "rectangle 4, 80" + }, + { + "hint": "¡Necesitamos una pelota saltarina! Usa la función aleatoria (random) para elegir al alzar de qué lado de la mesa estará la pelota. **Escribe** `x = random 40, 460`.", + "solution": "x = random 40, 460" + }, + { + "hint": "¡Ahora usaremos la función random otra vez para decidir cuán alto estará la pelota! **Escribe** `y = random 150, 250`.", + "solution": "y = random 150, 250" + }, + { + "hint": "Mueve el cursor a las variables de X e Y que acabas de crear. **Escribe** `moveTo x, y`.", + "solution": "moveTo x, y" + }, + { + "hint": "Finalmente, dibuja tu pelota con un círculo de un radio de 7. **Escribe** `circle 7`.", + "solution": "circle 7" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/tent.json b/lib/challenges/locales/es/worlds/summercamp/tent.json new file mode 100755 index 000000000..321f8dd7f --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/tent.json @@ -0,0 +1,73 @@ +{ + "id": "tent", + "title": "Arma tu carpa", + "short_title": "Carpa", + "description": "No hay campamento sin carpa. Te hemos proporcionado una carpa básica, que se hace con lona, cuerdas y estacas ¡Pero con tus poderes creativos puedes transformarla en la carpa que tú quieras! \nLa gente ha vivido en carpas tipis y las yurtas por miles de años. ¿Qué podrías agregarle a tu carpa para que te mantenga seguro y cálido? Te invitamos a inspirarte mirando otras creaciones en Mundo Kano o buscando diseños en internet.", + "icon_class": "challenge_setcamp", + "completion_text": "¡Buen trabajo! Ya aprendiste en el último desafío a hacer un árbol, ¿por qué no lo agregás a tu dibujo? ¿Es un pájaro aquello que vuela en el cielo?", + "cover": "summercamp/day_3.png", + "difficulty": 1, + "startAt": 2, + "summerCamp": true, + "rewards": { + "wallpaper": 1 + }, + "steps": [ + { + "hint": "Dibuja un día soleado - **escribe** `background lightblue`", + "solution": "background lightblue" + }, + { + "hint": "Configura el trazo a 0 para evitar dibujar líneas - **escribe** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Mueve el cursor al punto donde ubicaremos el sol - **escribe** `moveTo 400, 50`", + "solution": "moveTo 400, 50" + }, + { + "hint": "Configura el `color` del sol a amarillo, `yellow` en inglés", + "solution": "color yellow" + }, + { + "hint": "Dibuja el sol usando un círculo - **escribe** `circle 40`", + "solution": "circle 40" + }, + { + "hint": "Mueve el cursor para dibujar el césped - **escribe** `moveTo 0, 350`", + "solution": "moveTo 0, 350" + }, + { + "hint": "Configura el `color` del césped a verde, `green` en inglés", + "solution": "color green" + }, + { + "hint": "Dibuja el césped usando la función rectangle - **escribe** `rectangle 500, 150`", + "solution": "rectangle 500, 150" + }, + { + "hint": "¡Excelente! Ahora estamos listos para dibujar la carpa - **escribe** `color red`", + "solution": "color red" + }, + { + "hint": "Posiciona el cursor sobre el césped - **escribe** `moveTo 100, 350`", + "solution": "moveTo 100, 350" + }, + { + "hint": "Dibuja un triángulo usando `polygon` - **escribe** `polygon 150, -200, 300, 0`", + "solution": "polygon 150, -200, 300, 0" + }, + { + "hint": "Necesitamos dibujarle la entrada ahora. Configura el `color` a rojo oscuro escbriendo `darkred`", + "solution": "color darkred" + }, + { + "hint": "Posiciona el cursor en la punta de la carpa - **escribe** `moveTo 250, 150`", + "solution": "moveTo 250, 150" + }, + { + "hint": "Dibuja la entrada - **escribe** `polygon 30, 200, -30, 200`", + "solution": "polygon 30, 200, -30, 200" + } + ] +} diff --git a/lib/challenges/locales/es/worlds/summercamp/tree.json b/lib/challenges/locales/es/worlds/summercamp/tree.json new file mode 100755 index 000000000..189bdf922 --- /dev/null +++ b/lib/challenges/locales/es/worlds/summercamp/tree.json @@ -0,0 +1,17 @@ +{ + "id": "tree", + "title": "Árbol Fractal", + "short_title": "Árbol", + "icon_class": "challenge_tree", + "description": "¡Es hora de jugar! los supervisores del campamento han hecho algo para que juegues, un árbol cuyas ramas pueden crecer ampliamente hacia afuera y contrastar al interior. Todo desarrollado con comandos ¡Personalízalo!", + "cover": "summercamp/day_20.png", + "completion_text": "Juega con los números azules de los primeros comandos ¿Qué función cumplen? ¿Por qué tienen ese efecto? Moldea el árbol a tu gusto. Si algo se complica, vuelve al menú inicial y empieza de nuevo.", + "difficulty": 3, + "startAt": 0, + "summerCamp": true, + "rewards": { + "outfit": 1 + }, + "code": "# Juega con estos números azules\narmLength = 50\niterations = 9 # Pueden chocar si pasas el 15!\ndegreeChange = 20\nhasBlossoms = 3\nblossomSize = 70\nblossomOpacity = .02\n# ^^^ Juega con estos números azules ^^^\n\n###\nEsta es una función que dibuja las ramas\ndel árbol, cuando se completa, vuelve a ejecutarse\nuna y otra vez hasta que todas las\nramas sean dibujadas!\n###\ndrawBranch = (x, y, branchesLeft, startAngle) ->\n if branchesLeft > 0 \n # Muévete hacia donde será dibujada la\n # siguiente rama:\n moveTo x, y\n \n # Las ramas siempre serán azules pero el ancho\n # depende de la distancia respecto a la base del árbol\n stroke blue, branchesLeft \n \n # Un poco de trigonometría, ¡está bien\n # if no entiendes nada de esto! Esto \n # calcula las coordenadas donde debería \n # dibujarse la ramas, y donde\n # debería empezar la siguiente.\n dx = Math.cos(startAngle) * armLength \n dy = -Math.sin(startAngle) * armLength \n \n # Dibuja una línea en las coordenadas que\n # acabamos de calcular\n line dx, dy \n \n # Este bloque de comandos únicamente se ejecuta si\n # la rama tiene flores ¡Puedes\n # cambiar la variable hasBlossoms \n # arriba!\n if branchesLeft <= hasBlossoms \n # Configura el color de dibujo a un lindo rojo\n color opacity \"rgb(247, 45, 99)\", blossomOpacity\n # Nuestras flores no deberían tener un trazo\n stroke 0 \n # ¡Dibuja las flores! Estas flores\n # se superponen unas a otras para crear un\n # lindo efecto.\n circle blossomSize\n \n # Comienza la siguiente rama de la derecha\n drawBranch(x + dx, y + dy, branchesLeft - 1, startAngle - Math.PI / 180 * degreeChange) \n # Comienza la siguiente rama de la izquierda\n drawBranch(x + dx, y + dy, branchesLeft - 1, startAngle + Math.PI / 180 * degreeChange)\n \n###\nFinalmente, ejecutamos la función y vemos qué \nsucede. Juega con los números azules de los primeros \ncomandos y fíjate qué puedes cambiar de este árbol\n###\ndrawBranch(stage.width * .5, stage.height, iterations, Math.PI / 2, length)", + "steps": [] +} diff --git a/lib/challenges/locales/ja/index.json b/lib/challenges/locales/ja/index.json new file mode 100644 index 000000000..d5083d36b --- /dev/null +++ b/lib/challenges/locales/ja/index.json @@ -0,0 +1,71 @@ +{ + "worlds": [ + { + "id": "basic", + "name": "初級", + "description": "このチャレンジを通して、メークアートの基礎を身につけよう", + "cover": "world_covers/basic", + "world_path": "worlds/basic", + "css_class": "basic-challenges", + "share_strategy": "optional", + "type": "normal" + + }, + { + "id": "medium", + "name": "中級", + "description": "中級向けのチャレンジ", + "cover": "world_covers/medium", + "world_path": "worlds/medium", + "css_class": "medium", + "dependency": ["basic"], + "share_strategy": "optional", + "type": "normal" + }, + { + "id": "pixelhack", + "name": "ピクセル・ハック", + "description": "ハウアー・オブ・コード用のチャレンジです", + "cover": "world_covers/pixelhack", + "world_path": "worlds/pixelhack", + "css_class": "pixelhack", + "type": "campaign", + "certificate_after": 2, + "teachers_guide": "/guides/PixelHackEducatorGuide.zip", + "share_strategy": "optional", + "updateForm": { + "url": "https://docs.google.com/forms/d/1nTJ-waAVLQCO3myxKMDQLafL5Fnf9uTPtiejuH-74sY/formResponse", + "field": "entry.1965349241" + }, + "socialText": { + "email": "Kanoのピクセルハックで、ビデオゲームのアート歴史をハックしよう。", + "facebook": "Kanoの #ピクセルハック で、ビデオゲームのアート歴史をハックしよう。", + "twitter": "@TeamKano の #ピクセルハック で、ビデオゲームのアート歴史をハックしよう!\nhttp://art.kano.me/challenges/pixelhack/" + } + }, + { + "id": "summercamp", + "name": "夏キャンプ", + "description": "このチャレンジを通して、メークアートの基礎を身につけよう", + "cover": "world_covers/summercamp", + "world_path": "worlds/summercamp", + "css_class": "_summercamp", + "dependency": ["medium"], + "share_strategy": "optional", + "type": "campaign" + + }, + { + "id": "mischiefweek2015", + "name": "いたずらの週", + "description": "ハロウィーン専用の世界です", + "cover": "world_covers/mischiefweek", + "world_path": "worlds/mischiefweek2015", + "start_date": "2015-10-26T06:00:00", + "css_class": "mischiefweek2015", + "type": "campaign", + "share_strategy": "optional", + "sales_popup_after": 2 + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/basic/baloon.json b/lib/challenges/locales/ja/worlds/basic/baloon.json new file mode 100644 index 000000000..122d81caa --- /dev/null +++ b/lib/challenges/locales/ja/worlds/basic/baloon.json @@ -0,0 +1,42 @@ +{ + "id": "baloon", + "title": "青い風船", + "cover": "blue-baloon.png", + "description": "多辺形で空を飛ぶ風船を描こう!", + "startAt": 2, + "steps": [ + { + "hint": "鉛筆の色を青に変えよう。`color blue`を**タイプ**", + "solution": "color blue" + }, + { + "hint": "筆の幅を0にして、線を描かないようにしよう。", + "solution": "stroke 0" + }, + { + "hint": "100の大きさの円形を描こう。", + "solution": "circle 100" + }, + { + "hint": "100歩で下に動こう。`move 0, 100`を**タイプ**", + "solution": "move 0, 100" + }, + { + "hint": "結び目を描こう。`polygon 15, 15, -15, 15`を**タイプ**", + "solution": "polygon 15, 15, -15, 15" + }, + { + "hint": "もう少し下に動こう。`move 0, 15`を**タイプ**", + "solution": "move 0, 15" + }, + { + "hint": "太くて黒い筆を選ぼう。`stroke black, 5`を**タイプ**", + "solution": "stroke black, 5" + }, + { + "hint": "風船の糸を描こう。`line 0, 200`を**タイプ**", + "solution": "line 0, 200" + } + ], + "completion_text": "素晴らしい風船!次に進む前に色を変えてみない?" +} diff --git a/lib/challenges/locales/ja/worlds/basic/breakfast.json b/lib/challenges/locales/ja/worlds/basic/breakfast.json new file mode 100644 index 000000000..b42d3d54d --- /dev/null +++ b/lib/challenges/locales/ja/worlds/basic/breakfast.json @@ -0,0 +1,197 @@ +{ + "id": "breakfast", + "title": "Breakfast", + "description": "Draw a bacon and eggs breakfast!", + "startAt": 2, + "fatherDay": true, + "steps": [ + { + "hint": "Set the background to blue - **type** `background blue`", + "solution": "background blue" + }, + { + "hint": "Set the stroke to 0, to avoid drawing lines", + "solution": "stroke 0" + }, + { + "hint": "Set the color to white", + "solution": "color white" + }, + { + "hint": "Draw a circle with a size of 240", + "solution": "\n#Plate\ncircle 240", + "validate": "circle 240" + }, + { + "hint": "Set the color to `'#eee'` - **type** `color '#eee'`", + "solution": "color '#eee'" + }, + { + "hint": "Draw a circle with a size of 200", + "solution": "circle 200" + }, + { + "hint": "Move up and left - **type** `move -70, -70`", + "solution": "\n#Egg\nmove -70, -70", + "validate": "move -70,-70" + }, + { + "hint": "Set the color to white", + "solution": "color white" + }, + { + "hint": "Draw a circle with a size of 80", + "solution": "circle 80" + }, + { + "hint": "Set the color to yellow", + "solution": "color yellow" + }, + { + "hint": "Draw a circle with a size of 30", + "solution": "circle 30" + }, + { + "hint": "Move up and right - **type** `move 90, -60`", + "solution": "\n#Bacon 1\nmove 90, -60", + "validate": "move 90,-60" + }, + { + "hint": "Set the color to red", + "solution": "color red" + }, + { + "hint": "Draw a rectangle with a size of 60 and 200 - **type** `rectangle 60, 200`", + "solution": "rectangle 60, 200" + }, + { + "hint": "Move 30 to the right - **type** `move 30`", + "solution": "move 30" + }, + { + "hint": "Set the color to `'#aa0000'` - **type** `color '#aa0000'`", + "solution": "color '#aa0000'" + }, + { + "hint": "Draw a rectangle with a size of 30 and 200 - **type** `rectangle 30, 200`", + "solution": "rectangle 30, 200" + }, + { + "hint": "Move down and left - **type** `move -3, 10`", + "solution": "move -3, 10" + }, + { + "hint": "Set the color to white", + "solution": "color white" + }, + { + "hint": "Draw a rectangle with a size of 6 and 180 - **type** `rectangle 6, 180`", + "solution": "rectangle 6, 180" + }, + { + "hint": "Move down and right - **type** `move 40, 50`", + "solution": "\n#Bacon 2\nmove 40, 50", + "validate": "move 40, 50" + }, + { + "hint": "Set the color to red", + "solution": "color red" + }, + { + "hint": "Draw a rectangle with a size of 60 and 200 - **type** `rectangle 60, 200`", + "solution": "rectangle 60, 200" + }, + { + "hint": "Move 30 to the right - **type** `move 30`", + "solution": "move 30" + }, + { + "hint": "Set the color to `'#aa0000'` - **type** `color '#aa0000'`", + "solution": "color '#aa0000'" + }, + { + "hint": "Draw a rectangle with a size of 30 and 200 - **type** `rectangle 30, 200`", + "solution": "rectangle 30, 200" + }, + { + "hint": "Move down and left - **type** `move -3, 10`", + "solution": "move -3, 10" + }, + { + "hint": "Set the color to white", + "solution": "color white" + }, + { + "hint": "Draw a rectangle with a size of 6 and 180 - **type** `rectangle 6, 180`", + "solution": "rectangle 6, 180" + }, + { + "hint": "Move down and left - **type** `move -200, 150`", + "solution": "\n#Tomato 1\nmove -200, 150", + "validate": "move -200, 150" + }, + { + "hint": "Set the color to red", + "solution": "color red" + }, + { + "hint": "Draw a circle with a size of 40", + "solution": "circle 40" + }, + { + "hint": "Set the color to `'#cc4444'` - **type** `color '#cc4444'`", + "solution": "color '#cc4444'" + }, + { + "hint": "Draw a circle with a size of 35", + "solution": "circle 35" + }, + { + "hint": "Set the color to `'#aa4444'` - **type** `color '#aa4444'`", + "solution": "color '#aa4444'" + }, + { + "hint": "Draw an ellipse with a size of 30 and 10", + "solution": "ellipse 30, 10" + }, + { + "hint": "Draw an ellipse with a size of 10 and 30", + "solution": "ellipse 10, 30" + }, + { + "hint": "Move down and right - **type** `move 70, 50`", + "solution": "\n#Tomato 2\nmove 70, 50", + "validate": "move 70, 50" + }, + { + "hint": "Set the color to red", + "solution": "color red" + }, + { + "hint": "Draw a circle with a size of 40", + "solution": "circle 40" + }, + { + "hint": "Set the color to `'#cc4444'` - **type** `color '#cc4444'`", + "solution": "color '#cc4444'" + }, + { + "hint": "Draw a circle with a size of 35", + "solution": "circle 35" + }, + { + "hint": "Set the color to `'#aa4444'` - **type** `color '#aa4444'`", + "solution": "color '#aa4444'" + }, + { + "hint": "Draw an ellipse with a size of 30 and 10", + "solution": "ellipse 30, 10" + }, + { + "hint": "Draw an ellipse with a size of 10 and 30", + "solution": "ellipse 10, 30" + } + ], + "completion_text": "Well done!", + "cover": "breakfast.png" +} \ No newline at end of file diff --git a/lib/challenges/locales/ja/worlds/basic/index.json b/lib/challenges/locales/ja/worlds/basic/index.json new file mode 100644 index 000000000..2369ad6ca --- /dev/null +++ b/lib/challenges/locales/ja/worlds/basic/index.json @@ -0,0 +1,11 @@ +{ + "challenges": [ + "./sunnyday", + "./swissflag", + "./stare", + "./smiley", + "./baloon", + "./stickman" + + ] +} diff --git a/lib/challenges/locales/ja/worlds/basic/smiley.json b/lib/challenges/locales/ja/worlds/basic/smiley.json new file mode 100644 index 000000000..b92e8d918 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/basic/smiley.json @@ -0,0 +1,50 @@ +{ + "id": "smiley", + "title": "初めての笑顔", + "description": "顔を描こう", + "startAt": 2, + "steps": [ + { + "hint": "鉛筆の色を黄色に変えよう。`color yellow`を**タイプ**", + "solution": "color yellow" + }, + { + "hint": "太くて黒い筆を選ぼう。`stroke black, 20`を**タイプ**", + "solution": "stroke black, 20" + }, + { + "hint": "200の大きさの丸を描こう", + "solution": "circle 200" + }, + { + "hint": "左上を80歩ずつ動こう。`move -80, -80`を**タイプ**", + "solution": "move -80, -80" + }, + { + "hint": "鉛筆の色を黒にしよう。", + "solution": "color black" + }, + { + "hint": "半径20の丸を描こう。", + "solution": "circle 20" + }, + { + "hint": "160歩右へ動こう。`move 160`を**タイプ**", + "solution": "move 160" + }, + { + "hint": "半径20の丸をもう一つ描こう。", + "solution": "circle 20" + }, + { + "hint": "中央と下まで動こう。次の行で`moveTo 250, 270`を**タイプ**", + "solution": "moveTo 250, 270" + }, + { + "hint": "アーク(円弧)は丸の一部で、口に一つ描けば良さそう。`arc 100, 1, 2`を**タイプ**", + "solution": "arc 100, 1, 2" + } + ], + "completion_text": "よくやった!その調子で、笑顔描きジーニャスさん!", + "cover": "smiley.png" +} diff --git a/lib/challenges/locales/ja/worlds/basic/stare.json b/lib/challenges/locales/ja/worlds/basic/stare.json new file mode 100644 index 000000000..4f502b635 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/basic/stare.json @@ -0,0 +1,55 @@ +{ + "id": "stare", + "title": "暗やみでじろじろ", + "description": "暗やみでジロジロ見つめる目を描きましょう", + "startAt": 2, + "steps": [ + { + "hint": "背景を黒(black)にしましょう", + "solution": "background black" + }, + { + "hint": "左に80歩動こう。`move -80`を**タイプ**", + "solution": "move -80", + "validate": "move -80" + }, + { + "hint": "鉛筆の色を白(white)に変えよう", + "solution": "color white" + }, + { + "hint": "楕円を描こう。伸ばした円形のように。`ellipse 60, 40`を**タイプ**", + "solution": "ellipse 60, 40" + }, + { + "hint": "鉛筆の色を黒に変えよう。`color black`を**タイプ**", + "solution": "color black" + }, + { + "hint": "大きさ10の丸を描こう。`circle 10`を**タイプ**", + "solution": "circle 10" + }, + { + "hint": "160歩右側に動こう。`move 160`を**タイプ**", + "solution": "move 160" + }, + { + "hint": "また鉛筆の色を白に変えよう。", + "solution": "color white" + }, + { + "hint": "もう一つの幅60で高さ40の楕円を描こう。`ellipse 60, 40`を**タイプ**", + "solution": "ellipse 60, 40" + }, + { + "hint": "鉛筆の色を黒に変えよう。", + "solution": "color black" + }, + { + "hint": "10の大きさの丸を描いて、できあがり!", + "solution": "circle 10" + } + ], + "completion_text": "本当の魔法使いだ!またジロジロ見つめる目を描きたかったら君に頼むよ!", + "cover": "stare.png" +} diff --git a/lib/challenges/locales/ja/worlds/basic/stickman.json b/lib/challenges/locales/ja/worlds/basic/stickman.json new file mode 100644 index 000000000..5e5f20c52 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/basic/stickman.json @@ -0,0 +1,54 @@ +{ + "id": "stickman", + "title": "棒人間", + "description": "円形と線で棒人間を描こう", + "startAt": 2, + "steps": [ + { + "hint": "筆(`stroke`)の色を黒(`black`)に、幅を`10`に設定しよう", + "solution": "stroke black, 10" + }, + { + "hint": "カーソルを動かそう。`move 0, -50`を**タイプ**", + "solution": "move 0, -50" + }, + { + "hint": "棒人間の体を描こう。`line 0, 150`", + "solution": "line 0, 150" + }, + { + "hint": "棒人間の左腕を描こう。`line -80, 120`", + "solution": "line -80, 120" + }, + { + "hint": "よっし、次は右腕を。`line 80, 120`", + "solution": "line 80, 120" + }, + { + "hint": "下へ行こう。`move 0, 150`を**タイプ**", + "solution": "move 0, 150" + }, + { + "hint": "棒人間の左足を描こう:`line -80, 120`", + "solution": "line -80, 120" + }, + { + "hint": "よっし、次は右足を:`line 80, 120`", + "solution": "line 80, 120" + }, + { + "hint": "絵の上に動こう。`moveTo 250, 100`を**タイプ**", + "solution": "moveTo 250, 100" + }, + { + "hint": "筆の太さを0に戻そう。", + "solution": "stroke 0" + }, + { + "hint": "最後に、多変形で頭を描こう。`polygon -60, 50, 0, 100, 60, 50`を**タイプ**", + "solution": "polygon -60, 50, 0, 100, 60, 50" + } + ], + "completion_text": "良くできました!絵の高さと幅は500ピクセルずつで、正しく動くことは難しい。", + "cover": "stickman.png" +} diff --git a/lib/challenges/locales/ja/worlds/basic/sunnyday.json b/lib/challenges/locales/ja/worlds/basic/sunnyday.json new file mode 100644 index 000000000..97ec66720 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/basic/sunnyday.json @@ -0,0 +1,23 @@ +{ + "id": "sunnyday", + "title": "晴れの日", + "description": "晴れの日をコードで表して、基礎を覚えよう。", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "まず、背景をきれいな空色で塗りましょう。- `background blue`を**タイプ**", + "solution": "background blue" + }, + { + "hint": "次は、鉛筆の色を明るい黄色に変えよう。- 次の行に`color yellow`を**タイプ**", + "solution": "color yellow" + }, + { + "hint": "最後に、「circle」(円型)コマンドで、太陽を描こう。円の大きさを数字で表そう。- 次の行に`circle 150`を**タイプ**", + "solution": "circle 150" + } + ], + "completion_text": "おめでとう!さっぱりした晴れの日ができた。次に、円の大きさを変えて、どうなるか確認して見よう。", + "cover": "sunny-day.png" +} diff --git a/lib/challenges/locales/ja/worlds/basic/swissflag.json b/lib/challenges/locales/ja/worlds/basic/swissflag.json new file mode 100644 index 000000000..d440e5186 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/basic/swissflag.json @@ -0,0 +1,39 @@ +{ + "id": "swissflag", + "title": "スイスの国旗", + "description": "スイスの国旗をコードで作ろう", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "もう少し難しいチャレンジ。まず、壁紙を塗ろう:`background red`を**タイプ**", + "solution": "background red" + }, + { + "hint": "これから太い線を描くので、筆の太さを変えよう。`stroke 66`を**タイプ**", + "solution": "stroke 66" + }, + { + "hint": "次に筆の色を白に変えよう。3行目に`stroke white`を**タイプ**", + "solution": "stroke white" + }, + { + "hint": "最初の線を描いてみよう。線の色は白で、幅は66ピクセルに設定済み。では、100ピクセルの線を描いてみよう:`line 100`を**タイプ**", + "solution": "line 100" + }, + { + "hint": "短くて丈夫な線ができた!もう一本必要。次も100ピクセルの長さだけど、反対方向に。`line -100`を**タイプ**", + "solution": "line -100" + }, + { + "hint": "いいね!次は上下の線も描かなきゃ。どうしたらいいかね?実は「line」(線)に2つの数字を入れられる。一つ目は左右の位置で、2つ目は上下の位置。`line 0, 100`を**タイプ**", + "solution": "line 0, 100" + }, + { + "hint": "線は下に向いてるね!次は上へ行くには`line 0, -100`を**タイプ**", + "solution": "line 0, -100" + } + ], + "completion_text": "素晴らしい国旗ができた!シンプルなデザインはスイスの特徴だ。", + "cover": "swissflag.png" +} diff --git a/lib/challenges/locales/ja/worlds/medium/dots.json b/lib/challenges/locales/ja/worlds/medium/dots.json new file mode 100644 index 000000000..aa4798975 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/medium/dots.json @@ -0,0 +1,40 @@ +{ + "id": "dots", + "title": "水玉模様", + "description": "ループと丸を使って、可愛い水玉模様を描こう。", + "code": "", + "startAt": 1, + "steps": [ + { + "hint": "背景を赤(`red`)にしよう。", + "solution": "background red" + }, + { + "hint": "筆の幅を0にしよう。", + "solution": "stroke 0" + }, + { + "hint": "色を黄色(`yellow`)にしよう。", + "solution": "color yellow" + }, + { + "hint": "次はループを始めよう。`for x in [ 0 .. 25 ]`を**タイプ**", + "solution": "for x in [ 0..25 ]" + }, + { + "hint": "ループの中にはもう一つのループを。`for y in [ 0 .. 25 ]`を**タイプ**", + "solution": " for y in [ 0..25 ]" + }, + { + "hint": "縦と横へ動こう。`moveTo x * 20, y * 20`を**タイプ**", + "solution": " moveTo x * 20, y * 20", + "validate": " moveTo x *\\* *20,y *\\* *20" + }, + { + "hint": "そして水玉を描こう。`circle 6`を**タイプ**", + "solution": " circle 6" + } + ], + "completion_text": "できた!数字を変えて、どうなるか見てみよう。", + "cover": "dots.png" +} diff --git a/lib/challenges/locales/ja/worlds/medium/gradient.json b/lib/challenges/locales/ja/worlds/medium/gradient.json new file mode 100644 index 000000000..d9e1b60ff --- /dev/null +++ b/lib/challenges/locales/ja/worlds/medium/gradient.json @@ -0,0 +1,33 @@ +{ + "id": "gradient", + "title": "虹のパレット", + "description": "ループと色を組み合わせ、魔法の絵を!", + "code": "", + "startAt": 1, + "steps": [ + { + "hint": "まず、forループを始めよう。`for x in [ 0 .. 25 ]`を**タイプ**", + "solution": "for x in [ 0..25 ]" + }, + { + "hint": "次は2つ目のforループを始めよう。`for y in [ 0 .. 25 ]`を**タイプ**", + "solution": " for y in [ 0..25 ]" + }, + { + "hint": "色のトーンを回転させよう。`color rotate red, 10 * x + 10 * y`を**タイプ**", + "solution": " color rotate red, 10 * x + 10 * y", + "validate": " color rotate +red,10 *\\* *x *\\+ *10 *\\* *y" + }, + { + "hint": "そして描くときに毎回動かなきゃ。`moveTo 20 * x, 20 * y`を**タイプ**", + "solution": " moveTo 20 * x, 20 * y", + "validate": " moveTo 20 *\\* *x,20 *\\* *y" + }, + { + "hint": "最後に大きさ20の四角を描こう。", + "solution": " square 20" + } + ], + "completion_text": "回転(rotate)で数字を変えると、どうなるんだろう?", + "cover": "gradient.png" +} diff --git a/lib/challenges/locales/ja/worlds/medium/house.json b/lib/challenges/locales/ja/worlds/medium/house.json new file mode 100644 index 000000000..3a786977e --- /dev/null +++ b/lib/challenges/locales/ja/worlds/medium/house.json @@ -0,0 +1,87 @@ +{ + "id": "house", + "title": "家", + "description": "居心地のよい家を描こう!", + "code": "", + "startAt": 1, + "steps": [ + { + "hint": "まず空を描こう!背景を青(`blue`)に設定しよう。", + "solution": "background blue" + }, + { + "hint": "筆の幅を0にしよう。", + "solution": "stroke 0" + }, + { + "hint": "左上へ動こう。`move -150, -50`を**タイプ**", + "solution": "move -150, -50" + }, + { + "hint": "色をベージュ(`beige`)にしよう。", + "solution": "color beige" + }, + { + "hint": "次は長方形を描こう。`rectangle 300, 200`を**タイプ**", + "solution": "rectangle 300, 200" + }, + { + "hint": "右上へ動こう。`move 150, -100`を**タイプ**", + "solution": "move 150, -100" + }, + { + "hint": "屋根には色を暗赤色(`darkred`)にしよう。", + "solution": "color darkred" + }, + { + "hint": "次は屋根を描こう。`polygon 170, 100, -170, 100`を**タイプ**", + "solution": "polygon 170, 100, -170, 100" + }, + { + "hint": "左下へ動こう。`move -250, 300`を**タイプ**", + "solution": "move -250, 300" + }, + { + "hint": "芝生を描くには色を緑(`green`)に設定しよう。", + "solution": "color green" + }, + { + "hint": "次は芝生を500, 100の長方形(`rectangle`)で描こう。", + "solution": "rectangle 500, 100" + }, + { + "hint": "右上へ動こう。`move 220, -80`を**タイプ**", + "solution": "move 220, -80" + }, + { + "hint": "木のドアの色を茶色(`brown`)に設定しよう。", + "solution": "color brown" + }, + { + "hint": "ドアを60, 80の長方形で描こう。", + "solution": "rectangle 60, 80" + }, + { + "hint": "窓の色を水色(`aqua`)に設定しよう。", + "solution": "color aqua" + }, + { + "hint": "左上へ動こう。`move -80, -80`を**タイプ**", + "solution": "move -80, -80" + }, + { + "hint": "50の四角を描こう。", + "solution": "square 50" + }, + { + "hint": "右へ行こう。`move 170`を**タイプ**", + "solution": "move 170" + }, + { + "hint": "50の四角を描こう。", + "solution": "square 50" + } + ], + "completion_text": "すごい家をコードで描いた!", + "cover": "house.png" +} diff --git a/lib/challenges/locales/ja/worlds/medium/index.json b/lib/challenges/locales/ja/worlds/medium/index.json new file mode 100644 index 000000000..6d4e6623b --- /dev/null +++ b/lib/challenges/locales/ja/worlds/medium/index.json @@ -0,0 +1,13 @@ +{ + "challenges": [ + "./shrinking", + "./random", + "./starry", + "./house", + "./dots", + "./gradient", + "./planet", + "./pizza" + ] +} + diff --git a/lib/challenges/locales/ja/worlds/medium/pizza.json b/lib/challenges/locales/ja/worlds/medium/pizza.json new file mode 100644 index 000000000..592049006 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/medium/pizza.json @@ -0,0 +1,50 @@ +{ + "id": "pizza", + "title": "ピザ", + "description": "おいしいピザをコードで作ろう!", + "startAt": 2, + "steps": [ + { + "hint": "筆の色をベージュ(`beige`)にしよう。", + "solution": "stroke beige" + }, + { + "hint": "筆の幅を50に。", + "solution": "stroke 50" + }, + { + "hint": "色を赤(`red`)にしよう。", + "solution": "color red" + }, + { + "hint": "半径200の円形を描こう。", + "solution": "circle 200" + }, + { + "hint": "美味しそう!筆の幅を0に戻そう。", + "solution": "stroke 0" + }, + { + "hint": "ソースに黄色で大きさ195の円形を描こう。", + "solution": "color yellow\ncircle 195", + "validate": [ + "color yellow", + "circle 195" + ] + }, + { + "hint": "そしてトッピング。色を暗赤色(`darkred`)にしよう。", + "solution": "color darkred" + }, + { + "hint": "そして`moveTo 164, 290`", + "solution": "moveTo 164, 290" + }, + { + "hint": "よっし、最後は半径20の円形を描こう。", + "solution": "circle 20" + } + ], + "completion_text": "美味しそう!想像を働かせて、他のトッピングを考えてみてから、ピザを友達と共有しよう。", + "cover": "pizza.png" +} diff --git a/lib/challenges/locales/ja/worlds/medium/planet.json b/lib/challenges/locales/ja/worlds/medium/planet.json new file mode 100644 index 000000000..4a4f343ca --- /dev/null +++ b/lib/challenges/locales/ja/worlds/medium/planet.json @@ -0,0 +1,60 @@ +{ + "id": "planet", + "title": "惑星画家", + "description": "自分だけの惑星をコードで描こう!", + "startAt": 2, + "steps": [ + { + "hint": "背景をヘキサのコードで設定しよう。`background '#444444'`を**タイプ**", + "solution": "background '#444444'", + "validate": "background '\\#444444'" + }, + { + "hint": "線を書かないように、筆の幅を0にしよう。", + "solution": "stroke 0" + }, + { + "hint": "色は黄色(`yellow`)にしよう。", + "solution": "color yellow" + }, + { + "hint": "次はループを始めよう。`for i in [ 0 .. 32 ]`を**タイプ**", + "solution": "for i in [ 0..32 ]" + }, + { + "hint": "そして、それぞれの星の位置を設定しよう。`moveTo (random 1, 500), (random 1, 500)`を**タイプ**", + "solution": " moveTo (random 1, 500), (random 1, 500)", + "validate": " moveTo ( *random +1,500 *),( *random +1,500 *)" + }, + { + "hint": "星は、半径5の丸で描こう。", + "solution": " circle 5" + }, + { + "hint": "次は、ループの外(インデントなし)で、色を紫にしよう。`color purple`を**タイプ**", + "solution": "color purple" + }, + { + "hint": "次は`moveTo 250, 250`", + "solution": "moveTo 250, 250" + }, + { + "hint": "半径170の円形を描こう。", + "solution": "circle 170" + }, + { + "hint": "色を白(`white`)に。", + "solution": "color white" + }, + { + "hint": "筆を太めで白に。`stroke white, 5`を**タイプ**", + "solution": "stroke white, 5" + }, + { + "hint": "最後に楕円形を描こう。`ellipse 220, 4`を**タイプ**", + "solution": "ellipse 220, 4" + } + ], + "completion_text": "いやー、まるで宇宙だ!共有する前に、色を変えて、惑星をもっと面白くしてみよう!", + "cover": "planet.png" +} diff --git a/lib/challenges/locales/ja/worlds/medium/random.json b/lib/challenges/locales/ja/worlds/medium/random.json new file mode 100644 index 000000000..bc2dd60e7 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/medium/random.json @@ -0,0 +1,46 @@ +{ + "id": "random", + "title": "でたらめ", + "description": "物をどこに置けば良いか迷っていたら、そのための関数はあるよ!", + "startAt": 2, + "steps": [ + { + "hint": "カーソルを適当(不特定)な位置に動かそう。`moveTo (random 1, 500), (random 1, 500)`を**タイプ**", + "solution": "moveTo (random 1, 500), (random 1, 500)" + }, + { + "hint": "色を赤(red)にしよう。`color red`を**タイプ**", + "solution": "color red" + }, + { + "hint": "次は円形をこの適当な位置で描こう。`circle 200`を**タイプ**", + "solution": "circle 200" + }, + { + "hint": "色を緑(green)にしよう。", + "solution": "color green" + }, + { + "hint": "そして半径150の円形を描こう。", + "solution": "circle 150" + }, + { + "hint": "色を黄色(yellow)にしよう。", + "solution": "color yellow" + }, + { + "hint": "半径100の円形を描こう。", + "solution": "circle 100" + }, + { + "hint": "色を青(blue)にしよう。", + "solution": "color blue" + }, + { + "hint": "最後に半径50の円形を描こう。", + "solution": "circle 50" + } + ], + "completion_text": "randomで形をデタラメな場所で描けるんだ。面白いね。", + "cover": "random.png" +} diff --git a/lib/challenges/locales/ja/worlds/medium/shrinking.json b/lib/challenges/locales/ja/worlds/medium/shrinking.json new file mode 100644 index 000000000..e22bd1e26 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/medium/shrinking.json @@ -0,0 +1,28 @@ +{ + "id": "shrinking", + "title": "縮む円形", + "description": "forループで無限に縮む円形!", + "code": "", + "startAt": 1, + "steps": [ + { + "hint": "鉛筆を設定しよう。`stroke gray, 3`を**タイプ**", + "solution": "stroke gray, 3" + }, + { + "hint": "透明な色を設定しよう。`color null`を**タイプ**", + "solution": "color null" + }, + { + "hint": "32個の円形を一気に描こう。`for i in [ 0 .. 32 ]`を**タイプ**", + "solution": "for i in [ 0..32 ]" + }, + { + "hint": "完璧、そしてforループの中で円形を描こう。`circle 10 * i`を**タイプ**", + "solution": " circle 10 * i", + "validate": " circle 10 *\\* *i" + } + ], + "completion_text": "素晴らしい!forループでコードを繰り返すことができるんだ(一つ一つタイプしなくて良い)!", + "cover": "shrinking.png" +} diff --git a/lib/challenges/locales/ja/worlds/medium/starry.json b/lib/challenges/locales/ja/worlds/medium/starry.json new file mode 100644 index 000000000..1e43bec4a --- /dev/null +++ b/lib/challenges/locales/ja/worlds/medium/starry.json @@ -0,0 +1,35 @@ +{ + "id": "starry", + "title": "星空", + "description": "random関数で自分だけの星空をコードで描こう!", + "startAt": 2, + "steps": [ + { + "hint": "背景を紺色(darkblue)にしよう。", + "solution": "background darkblue", + "validate": "^background darkblue$" + }, + { + "hint": "次は鉛筆の幅を0にしよう。", + "solution": "stroke 0" + }, + { + "hint": "そして鉛筆の色を黄色(yellow)に。", + "solution": "color yellow" + }, + { + "hint": "ループを始めよう。`for i in [ 0 .. 32 ]`を**タイプ**", + "solution": "for i in [ 0..32 ]" + }, + { + "hint": "それぞれの星の位置をランダムに設定しよう。`moveTo (random 1, 500), (random 1, 500)`を**タイプ**", + "solution": " moveTo (random 1, 500), (random 1, 500)" + }, + { + "hint": "最後に星をそれぞれ5ピクセルの円形で描こう。", + "solution": " circle 5" + } + ], + "completion_text": "素晴らしい!スペースキーを押して、星を見てみよう…", + "cover": "starry-sky.png" +} diff --git a/lib/challenges/locales/ja/worlds/mischiefweek2015/cat.json b/lib/challenges/locales/ja/worlds/mischiefweek2015/cat.json new file mode 100644 index 000000000..b7838444b --- /dev/null +++ b/lib/challenges/locales/ja/worlds/mischiefweek2015/cat.json @@ -0,0 +1,139 @@ +{ + "id": "cat", + "title": "Spooky Cat", + "cover": "mischiefweek2015/mw-002-cat.png", + "description": "Make a spooky cat with code", + "start_date": "2015-10-27T06:00:00", + "startAt": 2, + "completion_text": "Nice work - you made a spooky black cat! Try changing its color or even its tail! Don't forget to share your cat afterwards.", + "steps": [ + { + "hint": "We can make the background a spooky black by **typing** `background black`.", + "solution": "background black" + }, + { + "hint": "Set the stroke to zero so we have no outlines. **Type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Now let's set the color of the full moon. **Type** `color lightgray`", + "solution": "color lightgray" + }, + { + "hint": "Create a nice big circle for the moon. **Type** `circle 230`.", + "solution": "circle 230" + }, + { + "hint": "Now move downwards so we can draw the grass on the ground. **Type** `moveTo 250, 500`.", + "solution": "moveTo 250, 500" + }, + { + "hint": "It's night time, so we'll make the grass a dark green. **Type** `color darkgreen`.", + "solution": "color darkgreen" + }, + { + "hint": "Draw the grassy hill with an ellipse so it's round. **Type** `ellipse 300, 100`", + "solution": "ellipse 300, 100" + }, + { + "hint": "Now set the color of the cat! To make it black, **type** `color black`.", + "solution": "color black" + }, + { + "hint": "Move the cursor to draw the cat in the middle! **Type** `moveTo 250, 250`.", + "solution": "moveTo 250, 250" + }, + { + "hint": "Let's draw the head with an ellipse. **Type** `ellipse 60, 40`.", + "solution": "ellipse 60, 40" + }, + { + "hint": "Let's move to right and up to draw the first ear. **Type** `moveTo 280, 220`.", + "solution": "moveTo 280, 220" + }, + { + "hint": "We'll use the polygon function to make a nice pointy ear! **Type** `polygon 0, -40, 28, 20, close`.", + "solution": "polygon 0, -40, 28, 20, close" + }, + { + "hint": "Move to the left by 60 so we can draw the other ear! **Type** `move -60`.", + "solution": "move -60" + }, + { + "hint": "This ear is a reflection of the other one! **Type** `polygon 0, -40, -28, 20, close`.", + "solution": "polygon 0, -40, -28, 20, close" + }, + { + "hint": "Let's make the neck underneath. **Type** `moveTo 250, 310`.", + "solution": "moveTo 250, 310" + }, + { + "hint": "Draw it using an ellipse! **Type** `ellipse 30, 50`.", + "solution": "ellipse 30, 50" + }, + { + "hint": "Now lets make the body below. **Type** `moveTo 250, 360`.", + "solution": "moveTo 250, 360" + }, + { + "hint": "We'll use a bigger ellipse this time round! **type** `ellipse 50, 60`.", + "solution": "ellipse 50, 60" + }, + { + "hint": "Now we need to move down and right to make the tail! **Type** `moveTo 320, 380`.", + "solution": "moveTo 320, 380" + }, + { + "hint": "Let's use a sneaky text trick to make a curvy tail. **Type** `font 150`.", + "solution": "font 150" + }, + { + "hint": "We'll make the text bold to make a large. **Type** `bold true`.", + "solution": "bold true" + }, + { + "hint": "Great! Now draw the tail by **typing** `text 'S'`.", + "solution": "text 'S'" + }, + { + "hint": "Finally, we'll make the eyes. **Type** `moveTo 225, 250`.", + "solution": "moveTo 225, 250" + }, + { + "hint": "Set the color to yellow. **Type** `color yellow`.", + "solution": "color yellow" + }, + { + "hint": "We'll draw it using an ellipse. **Type** `ellipse 14, 6`.", + "solution": "ellipse 14, 6" + }, + { + "hint": "Now for the pupil! Set the color to black. **Type** `color black`.", + "solution": "color black" + }, + { + "hint": "Make a circle of radius 6. **Type** `circle 6`.", + "solution": "circle 6" + }, + { + "hint": "Great! Now lets move right to do the other eye. **Type** `moveTo 275, 250`.", + "solution": "moveTo 275, 250" + }, + { + "hint": "Set the color back to yellow. **Type** `color yellow`.", + "solution": "color yellow" + }, + { + "hint": "Make the same ellipse as before. **Type** `ellipse 14,6`.", + "solution": "ellipse 14, 6" + }, + { + "hint": "Set the color back to black. **type** `color black`.", + "solution": "color black" + }, + { + "hint": "Lastly create the second pupil. **Type** `circle 6`.", + "solution": "circle 6" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/mischiefweek2015/ghost.json b/lib/challenges/locales/ja/worlds/mischiefweek2015/ghost.json new file mode 100644 index 000000000..456d04e4f --- /dev/null +++ b/lib/challenges/locales/ja/worlds/mischiefweek2015/ghost.json @@ -0,0 +1,136 @@ +{ + "id": "ghost", + "title": "Ghost", + "description": "Draw your very own ghost. Change the colors to win!", + "start_date": "2015-10-30T06:00:00", + "code": "ghostColor = '#809B79'\nfaceColor = '#634E42'\ntongueColor = '#7A5750'\n", + "startAt": 0, + "steps": [ + { + "hint": "We need to set up some variables to color the ghost - **Type** `ghostColor = '#809B79'`", + "solution": "ghostColor = '#809B79'" + }, + { + "hint": "Another variable for the face - **Type** `faceColor = '#634E42'`", + "solution": "faceColor = '#634E42'" + }, + { + "hint": "Finally a variable for the tongue - **Type** `tongueColor = '#7A5750'`", + "solution": "tongueColor = '#7A5750'" + }, + { + "hint": "We’ll use solid shapes, so set the stroke to zero with `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Our ghost leaves a trail behind that we need to draw first, so we'll set the draw color to something slightly darker with `color darken(ghostColor, 10)`", + "solution": "color darken(ghostColor, 10)" + }, + { + "hint": "Move into position for the trail with `move 0, 60`", + "solution": "move 0, 60" + }, + { + "hint": "And then draw the trail with `circle 70`", + "solution": "circle 70" + }, + { + "hint": "Now we’ll draw the ghost’s body. Set the ghost’s color to our variable with `color ghostColor`", + "solution": "color ghostColor" + }, + { + "hint": "Now move back to draw the body, move back up to the center with `move 0, -60`", + "solution": "move 0, -60" + }, + { + "hint": "Draw the body with `circle 100`", + "solution": "circle 100" + }, + { + "hint": "Now we’ll draw the mouth with the faceColor variable we defined. **Type** `color faceColor`.", + "solution": "color faceColor" + }, + { + "hint": "Now move into position for the mouth with `move -40, 10`", + "solution": "move -40, 10" + }, + { + "hint": "Draw the mouth with `rectangle 80, 35`", + "solution": "rectangle 80, 35" + }, + { + "hint": "The teeth are a polygon. **Hint:** you can copy and paste this: `polygon 10, -10, 20, 0, 30, -10, 40, 0, 50, -10, 60, 0, 70, -10, 80, 0`", + "solution": "polygon 10, -10, 20, 0, 30, -10, 40, 0, 50, -10, 60, 0, 70, -10, 80, 0" + }, + { + "hint": "Now for the tongue, move to the bottom of the mouth with `move 40, 35`", + "solution": "move 40, 35" + }, + { + "hint": "Set the drawing color to our variable with `color tongueColor`", + "solution": "color tongueColor" + }, + { + "hint": "The tongue is a half-circle of radius 25, which we can draw with `arc 25, 0, 1`", + "solution": "arc 25, 0, 1" + }, + { + "hint": "For the eyes, set the drawing color with `color faceColor`", + "solution": "color faceColor" + }, + { + "hint": "Move into position for the eyes with `move -40, -80`", + "solution": "move -40, -80" + }, + { + "hint": "The eye is then drawn with `circle 10`", + "solution": "circle 10" + }, + { + "hint": "Move for the second eye with `move 80, 0`", + "solution": "move 80, 0" + }, + { + "hint": "Draw the second eye with `circle 10`", + "solution": "circle 10" + }, + { + "hint": "For our hands, were going to do something new: make a function. **Type** `hand = ->`", + "solution": "hand = ->" + }, + { + "hint": "This indented block is where your function goes. Any time you call this function this entire block of code will run. Lets set the stroke for our hand with `stroke 10, darken(ghostColor, 10)`", + "solution": " stroke 10, darken(ghostColor, 10)" + }, + { + "hint": "Then draw the first of the three fingers with `line 20, 30`", + "solution": " line 20, 30" + }, + { + "hint": "Then the second with `line 0, 35`", + "solution": " line 0, 35" + }, + { + "hint": "The final finger with `line -20, 30`", + "solution": " line -20, 30" + }, + { + "hint": "Now to draw the hands: make sure you are out of the function block by pressing **BACKSPACE**. Then **type** `move 60, 100` for the first hand.", + "solution": "move 60, 100" + }, + { + "hint": "Draw the hand at the current location with `hand()`", + "solution": "hand()" + }, + { + "hint": "Move over to the left to draw the other hand with `move -200, 0`", + "solution": "move -200, 0" + }, + { + "hint": "Draw the final hand with `hand()`", + "solution": "hand()" + } + ], + "completion_text": "Well done! You can change the color of your ghost by setting ghostColor, faceColor, and tongueColor to whatever you want.", + "cover": "mischiefweek2015/mw-005-ghost.png" +} diff --git a/lib/challenges/locales/ja/worlds/mischiefweek2015/hauntedhouse.json b/lib/challenges/locales/ja/worlds/mischiefweek2015/hauntedhouse.json new file mode 100644 index 000000000..cca16f838 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/mischiefweek2015/hauntedhouse.json @@ -0,0 +1,11 @@ +{ + "id": "hauntedhouse", + "title": "Haunted House", + "description": "Dress the house up for Halloween and express your creativity.", + "start_date": "2015-11-01T06:00:00", + "completion_text": "It's Halloween Night! Change the colours at the top of the code to make this into a night scene then express your creativity by combining previous challenges with it or causing mischief, some ideas to get you started are in the comments.", + "startAt": 0, + "code": "#Colors, that need to be made spookier\nsky = aqua\nground = green\nsun = yellow\nbricks = brown\nroof = red\nframes = gray\nwindows = blue\ndoor = setBrightness(brown,-40)\n\n#Sky\nbackground sky\nstroke 0\nmoveTo 100, 100\ncolor sun\ncircle 60\n#Why not add some spooky clouds or bats\n\n#Ground\nmoveTo 250,530\ncolor ground\nellipse 500,150\n\n#House\nmoveTo 100,180\ncolor bricks\nrectangle 300,270\n\n#Windows\n#Cause some mischief, can you figure out how to throw eggs on all the windows in just 3 lines of code\ndrawWindow = (x,y) ->\n color setBrightness(frames,30)\n moveTo x,y\n rectangle 60,80\n color windows\n moveTo x+5,y+5\n rectangle 50,70\n color setBrightness(frames,30)\n moveTo x, y+37.5\n rectangle 60,5\n moveTo x+27.5, y\n rectangle 5,80\ndrawWindow(120,200)\ndrawWindow(220,200)\ndrawWindow(120,310)\ndrawWindow(320,200)\ndrawWindow(320,310)\n\n#Roof\ncolor roof\nmoveTo 100, 180\npolygon 150, -100, 300, 0\n#You could use the arc function to cover the roof in toilet paper \n\n\n#Door\ncolor setBrightness(frames,-10)\nmoveTo 215, 330\nrectangle 70,110\nmove 5,5\ncolor door\nrectangle 60,105\ncolor setBrightness(frames,-40) \nmove -15,105\nrectangle 90,20\nmove 65,-50\ncolor setBrightness(door,80)\ncircle 3\n#How about putting a pumpkin beside the door", + "steps": [], + "cover": "mischiefweek2015/mw-007-hauntedhouse.png" +} diff --git a/lib/challenges/locales/ja/worlds/mischiefweek2015/index.json b/lib/challenges/locales/ja/worlds/mischiefweek2015/index.json new file mode 100644 index 000000000..2bbe6689e --- /dev/null +++ b/lib/challenges/locales/ja/worlds/mischiefweek2015/index.json @@ -0,0 +1,11 @@ +{ + "challenges": [ + "./skull", + "./cat", + "./pumpkin", + "./potion", + "./ghost", + "./spiderweb", + "./hauntedhouse" + ] +} diff --git a/lib/challenges/locales/ja/worlds/mischiefweek2015/potion.json b/lib/challenges/locales/ja/worlds/mischiefweek2015/potion.json new file mode 100644 index 000000000..cfb784232 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/mischiefweek2015/potion.json @@ -0,0 +1,96 @@ +{ + "id": "potion", + "title": "Potion Flask", + "description": "Brew a potion with code.", + "start_date": "2015-10-29T06:00:00", + "code": "", + "startAt": 2, + "completion_text": "Well done! You can change the color of your potion by setting potionColor to whatever you want. The clear glass you made with opacity(white, .4) will give it a cool effect, whatever color you choose.", + "cover": "mischiefweek2015/mw-004-potion.png", + "steps": [ + { + "hint": "We want solid shapes for this challenge, so **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "For a dark look, lets set `background charcoal`", + "solution": "background charcoal" + }, + { + "hint": "If we want to change our potion color we can set it to a variable. To do that **type** `potionColor = purple`", + "solution": "potionColor = purple" + }, + { + "hint": "Let’s move into position with `move 0, 50`", + "solution": "move 0, 50" + }, + { + "hint": "And set the drawing color with `color potionColor`", + "solution": "color potionColor" + }, + { + "hint": "Finally, we can draw the potion with `circle 90`", + "solution": "circle 90" + }, + { + "hint": "Our potion is going to go up the neck of the flask, and we will use a line. Set up the line style with `stroke potionColor, 40`", + "solution": "stroke potionColor, 40" + }, + { + "hint": "And draw the line up from the middle with `line 0, -120`.", + "solution": "line 0, -120" + }, + { + "hint": "Set the stroke back to zero for the flask’s glass. **Type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Let’s add in another circle to give our potion a natural look. Move to the right and up with `move 30, -30`.", + "solution": "move 30, -30" + }, + { + "hint": "Set the drawing color to a shade slightly darker than the potion color with `color darken(potionColor, 10)`", + "solution": "color darken(potionColor, 10)" + }, + { + "hint": "Finally, draw the circle with `circle 20`", + "solution": "circle 20" + }, + { + "hint": "Move back to the center with `move -30, 30`", + "solution": "move -30, 30" + }, + { + "hint": "Set the color for the glass flask with `color opacity(white, .4)`", + "solution": "color opacity(white, .4)" + }, + { + "hint": "Then draw the flask with an arc. **Type** `arc 100, 1.4, 1.6`", + "solution": "arc 100, 1.4, 1.6" + }, + { + "hint": "See how the arc draws almost a complete circle, but leaves a nice flat top for us? Our flask neck will meet it there, but first we need to draw a cork behind the glass. **Type** `move 0, -130`", + "solution": "move 0, -130" + }, + { + "hint": "Set the drawing color for the cork with `color tan`", + "solution": "color tan" + }, + { + "hint": "And draw the cork with `polygon 20, 0, 30, -40, -30, -40, -20, 0`", + "solution": "polygon 20, 0, 30, -40, -30, -40, -20, 0" + }, + { + "hint": "Now for the neck, lets choose the see-through white color for our stroke. **Type** `stroke 60, opacity(white, .4)`", + "solution": "stroke 60, opacity(white, .4)" + }, + { + "hint": "Move up just a little bit for the neck with `move 0, -25`", + "solution": "move 0, -25" + }, + { + "hint": "Finally, draw the neck with `line 0, 60`", + "solution": "line 0, 60" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/mischiefweek2015/pumpkin.json b/lib/challenges/locales/ja/worlds/mischiefweek2015/pumpkin.json new file mode 100644 index 000000000..16e88cd86 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/mischiefweek2015/pumpkin.json @@ -0,0 +1,87 @@ +{ + "id": "pumpkin", + "title": "Kan-o-lantern", + "cover": "mischiefweek2015/mw-003-pumpkin.png", + "description": "It wouldn't be Halloween without pumpkins, learn how to carve a spooky pumpkin then get creative by changing the face.", + "start_date": "2015-10-28T06:00:00", + "completion_text": "That's a nice Kan-o-lantern! But it needs to be lit to be truly spooky, can you figure out how to light the pumpkin by changing some colors, you could also try carving a spookier looking face. Show off your creativity then share your creation.", + "startAt": 0, + "steps": [ + { + "hint": "Let’s set a spooky scene, make it night time - **type** `background charcoal`", + "solution": "background charcoal" + }, + { + "hint": "The most distinctive thing about pumpkins is their bright orange skin, to set your fill color - **type** `color orange`", + "solution": "color orange" + }, + { + "hint": "We're going to use strokes to build the bulbous shape of the pumpkin, use the darken function to build contrast against the skin - **type** `stroke darken(orange, 20), 30`", + "solution": "stroke darken(orange, 20), 30" + }, + { + "hint": "Build your pumpkin slice by slice using ellipses - **type** `ellipse 180, 140`", + "solution": "ellipse 180, 140" + }, + { + "hint": "Add another slice - **type** `ellipse 130, 140`", + "solution": "ellipse 130, 140" + }, + { + "hint": "It's starting to take shape, add the final slice the same way - **type** `ellipse 50, 140`", + "solution": "ellipse 50, 140" + }, + { + "hint": "Pumpkins are actually fruits, so we need to draw a green stem - **type** `color green`", + "solution": "color green" + }, + { + "hint": "Turn off the orange stroke - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Move the cursor to the top of the pumpkin - **type** `move -20, -180`", + "solution": "move -20, -180" + }, + { + "hint": "Draw the chunky stem of the pumpkin - **type** `square 40`", + "solution": "square 40" + }, + { + "hint": "Now we have a fresh pumpkin, we can get to the fun part, carving your design - **type** `color black`", + "solution": "color black" + }, + { + "hint": "We're going to give them a face, move the cursor to where the eye will be - **type** `moveTo 190, 275`", + "solution": "moveTo 190, 275" + }, + { + "hint": "Cut a hole for the first eye - **type** `circle 15`", + "solution": "circle 15" + }, + { + "hint": "Move the cursor to where the second eye will be - **type** `moveTo 310, 275`", + "solution": "moveTo 310, 275" + }, + { + "hint": "Cut the second hole the same size as the first - **type** `circle 15`", + "solution": "circle 15" + }, + { + "hint": "Next we need to give them a mouth - **type** `moveTo 250, 320`", + "solution": "moveTo 250, 320" + }, + { + "hint": "We need to turn the fill colour off by setting it to null - **type** `color null`", + "solution": "color null" + }, + { + "hint": "We'll use a thick black stroke for the mouth - **type** `stroke 15, black`", + "solution": "stroke 15, black" + }, + { + "hint": "Finally we will use the arc command to give them a smile. - **type** `arc 40, 1, 2, true`", + "solution": "arc 40, 1, 2, true" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/mischiefweek2015/skull.json b/lib/challenges/locales/ja/worlds/mischiefweek2015/skull.json new file mode 100644 index 000000000..ba27a9392 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/mischiefweek2015/skull.json @@ -0,0 +1,75 @@ +{ + "id": "skull", + "title": "Skull", + "cover": "mischiefweek2015/mw-001-skull.png", + "start_date": "2015-10-26T06:00:00", + "description": "", + "completion_text": "Amazing skull! You can dress it up with some background patterns or other facial accessories. When you are done, share your creation for a chance to win it on a t-shirt!", + "startAt": 0, + "steps": [ + { + "hint": "First we need to set the spooky scene, make it night time - **type** `background charcoal`", + "solution": "background charcoal" + }, + { + "hint": "We want to draw solid shapes with no stroke, so **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "We can move into position for the skull with `moveTo 250, 200`", + "solution": "moveTo 250, 200" + }, + { + "hint": "Our skull should be white, so set the drawing color with `color white`", + "solution": "color white" + }, + { + "hint": "The skull is made with an ellipse—a kind of squashed circle. Make this with `ellipse 140, 120`", + "solution": "ellipse 140, 120" + }, + { + "hint": "It's starting to take shape, add the final slice the same way - **type** `move -60, 90`", + "solution": "move -60, 90" + }, + { + "hint": "The mouth of the skull is a square we will draw with `square 120`", + "solution": "square 120" + }, + { + "hint": "Lets move up and over for the eyes - **type** `move 10, -50`", + "solution": "move 10, -50" + }, + { + "hint": "Our skull’s empty eyes peer into your soul. Set their color to charcoal with `color charcoal`", + "solution": "color charcoal" + }, + { + "hint": "The eye is a circle. Draw it with `circle 40`", + "solution": "circle 40" + }, + { + "hint": "Move on over for the other eye. **Type** `move 100`", + "solution": "move 100" + }, + { + "hint": "Now draw the other eye with `circle 40`", + "solution": "circle 40" + }, + { + "hint": "Move on over for the nose with `move -50, 60`", + "solution": "move -50, 60" + }, + { + "hint": "Then draw the nose with `circle 10`", + "solution": "circle 10" + }, + { + "hint": "Finally, for the mouth move down by **typing** `move -40, 60`", + "solution": "move -40, 60" + }, + { + "hint": "Finally, you draw the mouth with `rectangle 80, 20`", + "solution": "rectangle 80, 20" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/mischiefweek2015/spiderweb.json b/lib/challenges/locales/ja/worlds/mischiefweek2015/spiderweb.json new file mode 100644 index 000000000..7d3befdb4 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/mischiefweek2015/spiderweb.json @@ -0,0 +1,12 @@ +{ + "id": "spiderweb", + "title": "Spider Web", + "description": "Play around with a spider web!", + "completion_text": "Happy Halloween! Today’s challenge is for you to play around with the code here. Can you make a different-colored web? Or a bigger spider? Thanks to community member @NOPx90 who coded the spiderweb!", + "cover": "mischiefweek2015/mw-006-spiderweb.png", + "start_date": "2015-10-31T06:00:00", + "startAt": 0, + "code": "# PLAY WITH THESE\nradius = 370\nframes = 30\nbridges = 10\ndegrees = 360\nrotation = 0\n\nbodySize = 80\nlegSpread = 90\nlegLength = 100\neyeSize = 4\neyeSpacing = 12\n\n\n# This defines the spiderweb\nclass SpiderWeb\n constructor: (@x, @y, @radius, @frames, @bridges, @degrees, @rotation) ->\n @x = @x ? 250\n @y = @y ? 250\n @radius = @radius ? 250\n @frames = @frames ? 16\n @bridges = @bridges ? 20\n @degrees = @degrees ? 360\n @rotation = @rotation ? 0\n @frameAngle = @degrees / @frames\n @draw()\n drawFrame: () ->\n moveTo @x , @y\n for i in [ 0 .. @frames ]\n if i * @frameAngle != 360\n radians = (i * @frameAngle + @rotation)*(Math.PI / 180)\n x = Math.cos(radians)\n y = -Math.sin(radians)\n line (x*@radius) , (y*@radius)\n drawBridge: () ->\n r = @radius\n for web in [ 1 .. @bridges ]\n r /= 1.2\n for i in [ 0 ... @frames ]\n # Starting postition\n r1 = (i * @frameAngle + @rotation)*(Math.PI / 180)\n x1 = Math.cos(r1)\n y1 = -Math.sin(r1)\n \n # End position\n r2 = (i * @frameAngle + @frameAngle + @rotation)*(Math.PI / 180)\n x2 = Math.cos(r2)\n y2 = -Math.sin(r2)\n moveTo x1 * r + @x , y1 * r + @y\n lineTo x2 * r + @x , y2 * r + @y\n draw: ( ) ->\n this.drawFrame()\n this.drawBridge()\n\n# Here is the drawing\nbackground setSaturation(darkpurple,-25)\nstroke white\nweb = new SpiderWeb(250,250, radius, frames, bridges, degrees, rotation)\n# Spider Body\nstroke white, 10\nmoveTo 250, 0\nline 0, 200\nmove 0, 200\ncolor black\nstroke 0\nellipse bodySize * 0.8, bodySize\n# Spider Legs\nstroke black, 5\ncolor null\npairOfLegs = (flipHori,flipVert) ->\n spread = legSpread * flipHori\n length = legLength * flipVert\n polygon spread, length, spread * 0.7, length * 2\n polygon spread * 1.3, length * 0.4, spread * 1.7, length * 1.5\npairOfLegs(1,1)\npairOfLegs(-1,1)\npairOfLegs(1,-1)\npairOfLegs(-1,-1)\n\n#Spider Head\nstroke 0\ncolor black\nmove 0, bodySize\nellipse bodySize * 0.5, bodySize * 0.4\ncolor orangered\nmove eyeSpacing * -1.5, eyeSpacing / -2\nfor [1 .. 4]\n circle eyeSize\n move 0, eyeSpacing\n circle eyeSize\n move eyeSpacing, eyeSpacing * -1\n", + "steps": [ + ] +} diff --git a/lib/challenges/locales/ja/worlds/pixelhack/chest.json b/lib/challenges/locales/ja/worlds/pixelhack/chest.json new file mode 100644 index 000000000..60635a1ec --- /dev/null +++ b/lib/challenges/locales/ja/worlds/pixelhack/chest.json @@ -0,0 +1,104 @@ +{ + "id": "chest", + "title": "Loot Chest", + "description": "A mysterious chest found with your code", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Role Playing Games (RPGs) became one of the most popular genres of games in the late 80s. One of the most common objects in these games is the loot chest, let's start by setting a moody scene with a background **type** `background darkslategray`", + "solution": "background darkslategray" + }, + { + "hint": "Next we're going to turn the stroke off **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Position the cursor to the top left corner of where the chest will be - **type** `move -150,-100`", + "solution": "move -150,-100" + }, + { + "hint": "Set the color to gold to give the impression of riches inside **type** `color gold`", + "solution": "color gold" + }, + { + "hint": "We're going to layer this up to keep the number of shapes we have to draw to a minimum, first we draw the golden frame draw a `rectangle` 300 by 200", + "solution": "rectangle 300,200" + }, + { + "hint": "Next we are going to add a highlight to the gold **type** `color lightyellow`", + "solution": "color lightyellow" + }, + { + "hint": "With 8-bit art, simple details add a lot to an object, add a 25 by 100 `rectangle` to give the gold a nice sheen", + "solution": "rectangle 25,100" + }, + { + "hint": "Move your cursor to get ready to draw the wooden part of the chest **type** `move 25,0`", + "solution": "move 25,0" + }, + { + "hint": "Change the fill color to `color brown`", + "solution": "color brown" + }, + { + "hint": "We use a trick of overlaying brown over the gold so the gold looks like a frame holding the wooden panels together **type** `rectangle 250,175`", + "solution": "rectangle 250,175" + }, + { + "hint": "Move the cursor into place to split the wooden part in half with a lid **type** `move 0,60`", + "solution": "move 0,60" + }, + { + "hint": "Switch your `color` back to gold", + "solution": "color gold" + }, + { + "hint": "Draw the seam with a `rectangle` 250 by 25", + "solution": "rectangle 250,25" + }, + { + "hint": "Next we'll continue our highlight effect **type** `color lightyellow`", + "solution": "color lightyellow" + }, + { + "hint": "Continue the highlight effect by drawing a `square` 25 big", + "solution": "square 25" + }, + { + "hint": "Finally we're going to finish with a clasp, move to the middle of the chest **type** `move 75,-25`", + "solution": "move 75,-25" + }, + { + "hint": "Set the `color` to gold so it matches the frame", + "solution": "color gold" + }, + { + "hint": "Draw a `rectangle` 100 by 75", + "solution": "rectangle 100,75" + }, + { + "hint": "Move in to draw the actual clasp **type** `move 25,25`", + "solution": "move 25,25" + }, + { + "hint": "Set the `color` to darkbrown", + "solution": "color darkbrown" + }, + { + "hint": "Finally draw a `rectangle` 50 by 75", + "solution": "rectangle 50,75" + } + ], + "completion_text": "That chest looks great, I wonder what loot is hiding within!", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "chest-nether.png", + "chest-sunken.png", + "chest-open.png" + ] + }, + "cover": "pixel-chest.png", + "guide": "#### New Words\n**square** size | square 25\n\nThis is just a shorthand version of the rectangle \n\n#### What you'll make\n1. Role Playing Games (RPGs) became one of the most popular genres of games in the late 80s. One of the most common objects in these games is the loot chest, let's start by setting a moody scene with a background **type** `background darkslategray`\n2. Next we're going to turn the stroke off **type** `stroke 0`\n3. Position the cursor to the top left corner of where the chest will be **type** `move -150,-100`\n4. Set the color to gold to give the impression of riches inside **type** `color gold`\n5. We're going to layer this up to keep the number of shapes we have to draw to a minimum, first we draw the golden frame draw a `rectangle` 300 by 200\n6. Next we are going to add a highlight to the gold **type** `color lightyellow`\n7. With 8-bit art, simple details add a lot to an object, add a 25 by 100 `rectangle` to give the gold a nice sheen\n8. Move your cursor to get ready to draw the wooden part of the chest **type** `move 25,0`\n9. Change the fill color to `color brown`\n10. We use a trick of overlaying brown over the gold so the gold looks like a frame holding the wooden panels together **type** `rectangle 250,175`\n11. Move the cursor into place to split the wooden part in half with a lid **type** `move 0,60`\n12. Switch your `color` back to gold\n13. Draw the seam with a `rectangle` 250 by 25\n14. Next we'll continue our highlight effect **type** `color lightyellow`\n15. Continue the highlight effect by drawing a `square` 25 big\n16. Finally we're going to finish with a clasp, move to the middle of the chest **type** `move 75,-25`\n17. Set the `color` to gold so it matches the frame\n18. Draw a `rectangle` 100 by 75\n19. Move in to draw the actual clasp **type** `move 25,25`\n20. Set the `color` to darkbrown\n21. Finally draw a `rectangle` 50 by 75\n\n#### What you'll hack\nBy changing the colours and adding a few shapes you can build an environment around your chest. For a more complex challenge change your code to open the chest and code some loot within.\n\n#### Briefing \nThe loot chest has made appearances in too many video games to list. Possibly most prominently in games from the Legend of Zelda, where they would hold everything from small gifts of money to powerful new tools and weapons. What is in this loot chest? That’s up to you. When you’re done with the chest, open it up and put in your own creation as the loot.\n" +} diff --git a/lib/challenges/locales/ja/worlds/pixelhack/colorfrenzy.json b/lib/challenges/locales/ja/worlds/pixelhack/colorfrenzy.json new file mode 100644 index 000000000..ee72945ed --- /dev/null +++ b/lib/challenges/locales/ja/worlds/pixelhack/colorfrenzy.json @@ -0,0 +1,47 @@ +{ + "id": "colorfrenzy", + "title": "Color Frenzy", + "description": "Use a loop to draw an 8-bit pattern.", + "startAt": 2, + "steps": [ + { + "hint": "We’ll just use solid shapes with no stroke. So **type** `stroke 0`.", + "solution": "stroke 0" + }, + { + "hint": "For this one lets use two loops, one to go horizontally across the screen, and one to go down vertically. **Type** `for x in [ 0 .. 20 ]`", + "solution": "for x in [ 0 .. 20 ]" + }, + { + "hint": "The second loop should be `for y in [ 0 .. 20 ]`", + "solution": " for y in [ 0 .. 20 ]", + "validate": " for y in \\[ 0 .. 20 \\]" + }, + { + "hint": "Set the color with `color rotate red, x + y * 10`", + "solution": " color rotate red, x + y * 10", + "validate": " color rotate red, x \\+ y \\* 10" + }, + { + "hint": "Move into position with `moveTo x * 25, y * 25`", + "solution": " moveTo x * 25, y * 25", + "validate": " moveTo x \\* 25, y \\* 25" + }, + { + "hint": "Finally, lets add squares. **Type** `square 25`", + "solution": " square 25", + "validate": " square 25" + } + ], + "completion_text": "Well done! The rotate function cycles through colours creating a rainbow effect.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "color-quint.png", + "color-multi.png", + "color-random.png" + ] + }, + "cover": "pixel-colorfrenzy.png", + "guide": "#### What you'll make\n1. We’ll just use solid shapes with no stroke. So **type** `stroke 0`.\n2. For this one lets use two loops, one to go horizontally across the screen, and one to go down vertically. **Type** `for x in [ 0 .. 20 ]`\n3. The second loop should be `for y in [ 0 .. 20 ]`\n4. Set the color with `color rotate red, x * 10`\n5. Move into position with `moveTo x * 25, y * 25`\n6. Finally, lets add some randomness to the mix. **Type** `square random 20, 25`\n\n#### What you’ll hack\nBecause you are travelling across both the x and the y axes, you can have some pretty crazy color combinations. Using math you can make the rainbows repeat in interesting ways, and then change up how you draw on the screen using a random function. There are loads of variations, see what you can find!\n\n#### Briefing\nWe used one loop in the previous exercises to repeat actions, and then change one thing about the loop. In this challenge, we are going to be looping twice. The first loop is going to loop across the x coordinates—then the second loop is going to loop across the y coordinates. Because we have two loops, we are able to control color going in two different directions, and draw squares in two different directions. These “nested” loops will allow us to cover the canvas with color.\n" +} diff --git a/lib/challenges/locales/ja/worlds/pixelhack/diamondblock.json b/lib/challenges/locales/ja/worlds/pixelhack/diamondblock.json new file mode 100644 index 000000000..c2e73a762 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/pixelhack/diamondblock.json @@ -0,0 +1,74 @@ +{ + "id": "diamondblock", + "title": "8-bit Diamond Block", + "description": "Make a diamond block with loops.", + "startAt": 2, + "steps": [ + { + "hint": "Set stroke to 0.", + "solution": "stroke 0" + }, + { + "hint": "We’ll use two loops for the stone. **Type** `for x in [0 ... 16]`", + "solution": "for x in [0 ... 16]" + }, + { + "hint": "For y use `for y in [0 ... 16]`", + "solution": " for y in [0 ... 16]" + }, + { + "hint": "We’ll use a randomly chosen shade of gray to make the stone. **Type** `color darken gray, random -6, 9`", + "solution": " color darken gray, random -6, 9", + "validate": " color darken gray, random -6, 9" + }, + { + "hint": "Move into position for each square with `moveTo x * 31.25, y * 31.25`", + "solution": " moveTo x * 31.25, y * 31.25", + "validate": " moveTo x \\* 31.25, y \\* 31.25" + }, + { + "hint": "Finally, draw the stone square with `square 32`", + "solution": " square 32", + "validate": " square 32" + }, + { + "hint": "Get out of the loop by bringing your cursor to the beginning of the line with **BACKSPACE**. We’ll start a new pair of loops to draw the diamond. **Type** `for x in [2 ... 14]`", + "solution": "for x in [2 ... 14]" + }, + { + "hint": "This time we are starting at 2 and ending at 14 because we only want the diamond to appear in the middle of the block. **Type** `for y in [2 ... 14]`", + "solution": " for y in [2 ... 14]" + }, + { + "hint": "The diamond should appear randomly, this if statement will only randomly draw the diamond. **Type** `if 1 == random 0, 4`", + "solution": " if 1 == random 0, 4", + "validate": " if 1 == random 0, 4" + }, + { + "hint": "Set the diamond color with `color lighten lightblue, random 0, 40`", + "solution": " color lighten lightblue, random 0, 40", + "validate": " color lighten lightblue, random 0, 40" + }, + { + "hint": "Move into position for each square with `moveTo x * 31.25, y * 31.25`", + "solution": " moveTo x * 31.25, y * 31.25", + "validate": " moveTo x \\* 31.25, y \\* 31.25" + }, + { + "hint": "Finally, draw the diamond square with `square 32`", + "solution": " square 32", + "validate": " square 32" + } + ], + "completion_text": "You’ve hacked the pixels and won! What’s next? More challenges and 8-bit art projects here at Kano if you are interested. Congratulations and well done!", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "diamond-obsidian.png", + "diamond-rainbow.png", + "diamond-lotsof.png" + ] + }, + "cover": "pixel-diamondblock.png", + "guide": "#### What you'll make\n1. Set stroke to 0.\n2. We’ll use two loops for the stone. **Type** `for x in [0 ... 16]`\n3. For y use `for y in [0 ... 16]`\n4. We’ll use a randomly chosen shade of gray to make the stone. **Type** `color darken gray, random -6, 9`\n5. Move into position for each square with `moveTo x * 31.25, y * 31.25`\n6. Finally, draw the stone square with `square 32`\n7. Get out of the loop by bringing your cursor to the beginning of the line with **BACKSPACE**. We’ll start a new pair of loops to draw the diamond. **Type** `for x in [2 ... 14]`\n8. This time we are starting at 2 and ending at 14 because we only want the diamond to appear in the middle of the block. **Type** `for y in [2 ... 14]`\n9. The diamond should appear randomly, this if statement will only randomly draw the diamond. **Type** `if 1 == random 0, 4`\n10. Set the diamond color with `color lighten lightblue, random 0, 40`\n11. Move into position for each square with `moveTo x * 31.25, y * 31.25`\n12. Finally, draw the diamond square with `square 32`\n\n#### What you'll hack\nTo make this Minecraft Block your own all you need to change are two variables: the colour of the top and bottom parts. Make a strawberry, a water block, or anything else by just changing these two lines. For added complexity, make a Mycelium block with some randomness and another for loop. If you really want to have a challenge, try incorporating what you learned in the previous lesson and use the x and y values to add some extra color rotation to the dirt.\n\n#### Briefing\nThe grand finale: diamonds. This is the most precious and sought after Minecraft block. You’ll use nested for loops again to draw the stone, and then another pair of nested for loops to draw the stone, and then another nested for loop to draw the diamond. But as the diamond should be sprinkled throughout the stone we’ll use an if statement and use a random number to determine whether or not we should draw the square. Additionally, we only want to draw the diamond on the inside of the block, so our diamond-drawing loop will run from 2 to 14, rather than 0 to 16.\n" +} diff --git a/lib/challenges/locales/ja/worlds/pixelhack/forloop.json b/lib/challenges/locales/ja/worlds/pixelhack/forloop.json new file mode 100644 index 000000000..28798c88a --- /dev/null +++ b/lib/challenges/locales/ja/worlds/pixelhack/forloop.json @@ -0,0 +1,95 @@ +{ + "id": "forloop", + "title": "For Loop", + "description": "Use a for loop to build a snake with ease.", + "startAt": 2, + "steps": [ + { + "hint": "We're going to recreate the classic game Snake using the power of For Loops. First let's set a dirt background - **type** `background tan`", + "solution": "background tan" + }, + { + "hint": "Turn off the stroke **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "First we position the head of the snake **type** `moveTo 80,250`", + "solution": "moveTo 80,250" + }, + { + "hint": "Set a snake-like color **type** `color olivedrab`", + "solution": "color olivedrab" + }, + { + "hint": "Draw a `circle` 30 pixels big for the head", + "solution": "circle 30" + }, + { + "hint": "This is where we will set the loop up, using the for function, the first number is where to start counting from and the second number is what to count to. So 1 .. 7 makes the computer count to 7 - **type** `for [1 .. 7]`", + "solution": "for [1 .. 7]" + }, + { + "hint": "Everything within this indent will be repeated 7 times, we need a move function to position each part of the body - **type** `move 50,0`", + "solution": " move 50,0" + }, + { + "hint": "We set the body color - **type** `color olivedrab`", + "solution": " color olivedrab" + }, + { + "hint": "Once we add a circle it'll be clear what is going on with the code being repeated several times - **type** `circle 30`", + "solution": " circle 30" + }, + { + "hint": "Let's add a square so the body looks more segmented, notice how we're now drawing 7 shapes for every line of code - **type** `square 30`", + "solution": " square 30" + }, + { + "hint": "We're going to add another detail to the tail so set the `color` to darkgreen", + "solution": " color darkgreen" + }, + { + "hint": "Draw another circle, the code is still indented this will be repeated 7 times - **type** `circle 20`", + "solution": " circle 20" + }, + { + "hint": "Finally draw a `square` 20 pixels big", + "solution": " square 20" + }, + { + "hint": "First make sure you are no longer in the for loop by hitting backspace so we're no longer indented. - **type** `moveTo 70,240`", + "solution": "moveTo 70,240" + }, + { + "hint": "Change the `color` to black", + "solution": "color black" + }, + { + "hint": "Draw an `ellipse` 10 pixels wide and 5 tall.", + "solution": "ellipse 10,5" + }, + { + "hint": "Finally we'll give it a tongue so it can hiss like a snake should - **type** `color salmon`", + "solution": "color salmon" + }, + { + "hint": "Position it on the face - **type** `move -15, 20`", + "solution": "move -15, 20" + }, + { + "hint": "We'll draw a rectangle with a negative width to stretch it out from the mouth - **type** `rectangle -20,4`", + "solution": "rectangle -20,4" + } + ], + "completion_text": "Now you have seen how we can create more art with less lines of code by using loops in clever ways, why not try changing the 7 in the for loop and see what happenes", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "snake-tiny.png", + "snake-apple.png", + "snake-corner.png" + ] + }, + "cover": "pixel-forloop.png", + "guide": "#### New words\n**for i in [rangeMinimum ... rangeMax]**| for in [0 .. 10]\n\nThe for loop executes once for every number in the range provided. 10 times for the range [0 … 10] and 20 times for the range [0 … 20]. The loop executes any code that is indented four spaces appearing after it.\n\n#### What you'll make\n1. We're going to recreate the classic game Snake using the power of For Loops. First let's set a dirt background - **type** `background tan`\n2. Turn off the stroke **type** `stroke 0`\n3. First we position the head of the snake **type** `moveTo 80,250`\n4. Set a snake-like color **type** `color olivedrab`\n5. Draw a `circle` 30 pixels big for the head\n6. This is where we will set the loop up, using the for function, the first number is where to start counting from and the second number is what to count to. So 1 .. 7 makes the computer count to 7 - **type** `for [1 .. 7]`\n7. Everything within this indent will be repeated 7 times, we need a move function to position each part of the body - **type** `move 50,0`\n8. We set the body color - **type** `color olivedrab`\n9. Once we add a circle it'll be clear what is going on with the code being repeated several times - **type** `circle 30`\n10. Let's add a square so the body looks more segmented, notice how we're now drawing 7 shapes for every line of code - **type** `square 30`\n11. We're going to add another detail to the tail so set the `color` to darkgreen\n12. Draw another circle, the code is still indented this will be repeated 7 times - **type** `circle 20`\n13. Finally draw a `square` 20 pixels big\n14. First make sure you are no longer in the for loop by hitting backspace so we're no longer indented. - **type** `moveTo 70,240`\n15. Change the `color` to black\n16. Draw an `ellipse` 10 pixels wide and 5 tall.\n17. Finally we'll give it a tongue so it can hiss like a snake should - **type** `color salmon`\n18. Position it on the face - **type** `move -15, 20`\n19. We'll draw a rectangle with a negative width to stretch it out from the mouth - **type** `rectangle -20,4`\n\n#### What you’ll hack\nThe beauty of the loop is you can change your code once, and every single shape you draw will update. This is another reason to use loops, you can make big changes without rewriting big amounts of code.\n\n#### Briefing\nHow many times have you written the same commands over and over again in the last few challenges? For this snake challenge, each part of the snake is made up of the same circle shape. Instead of writing the same circle code over and over, you can have the computer do it for you!\n" +} diff --git a/lib/challenges/locales/ja/worlds/pixelhack/gradient.json b/lib/challenges/locales/ja/worlds/pixelhack/gradient.json new file mode 100644 index 000000000..acffb6a61 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/pixelhack/gradient.json @@ -0,0 +1,56 @@ +{ + "id": "gradient", + "title": "8-bit sunset", + "description": "Use a loop to draw an 8-bit sunset.", + "startAt": 2, + "steps": [ + { + "hint": "We’ll just use solid shapes with no stroke. So **type** `stroke 0`.", + "solution": "stroke 0" + }, + { + "hint": "To better see the effect of our test, text to bold with `bold true`", + "solution": "bold true" + }, + { + "hint": "We’ll use a loop to draw the sunset. This time going from 0 to 10. **Type** `for y in [ 0 .. 10 ]`", + "solution": "for y in [ 0 .. 10 ]" + }, + { + "hint": "To understand how this loop works, we’ll draw the loop value out. Move into position with `moveTo 250, y * 50`", + "solution": " moveTo 250, y * 50", + "validate": " moveTo 250, y \\* 50" + }, + { + "hint": "Let’s inspect what our loop is doing. You can use the text function with plain text, but you can also pass it a variable. **Type** `text y` to see what the y values are across the screen.", + "solution": " text y", + "validate": " text y" + }, + { + "hint": "The y variable is increasing every time we go through the loop. It goes from 0 (which is off the screen) to 10. To draw our sunset we need to just move to the left edge. **Type** `moveTo 0, y * 50`", + "solution": " moveTo 0, y * 50", + "validate": " moveTo 0, y \\* 50" + }, + { + "hint": "We’ll use a special function to darken the color every loop. **Type** `color darken blue, y * 3`.", + "solution": " color darken blue, y * 3", + "validate": " color darken blue, y \\* 3" + }, + { + "hint": "Now for the sky, this will draw over your numbers. **Type** `rectangle 500, 50`.", + "solution": " rectangle 500, 50", + "validate": " rectangle 500, 50" + } + ], + "completion_text": "Beautiful! See how the blue gets darker as it goes down the screen. The y variable was being passed to the darken function. As the y value increased, the darken function made the blue color get darker.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "grad-yello.png", + "grad-sword.png", + "grad-mage.png" + ] + }, + "cover": "pixel-gradient.png", + "guide": "#### New words\n**bold** state | bold true\n\nCan set whether text is drawn as bold or regular. True is bold, false is regular.\n\n**text** string | text “hello world”\n\nDraws text centered on the drawing cursor. The properties of the text are controlled by the color, font, bold, and italic functions.\n\n\n#### What you'll make\n1. We’ll just use solid shapes with no stroke. So **type** `stroke 0`.\n2. To better see the effect of our test, text to bold with `bold true`\n3. We’ll use a loop to draw the sunset. This time going from 0 to 10. **Type** `for y in [ 0 .. 10 ]`\n4. To understand how this loop works, we’ll draw the loop value out. Move into position with `moveTo 250, y * 50`\n5. Let’s inspect what our loop is doing. You can use the text function with plain text, but you can also pass it a variable. **Type** `text y` to see what the y values are across the screen.\n6. The y variable is increasing every time we go through the loop. It goes from 0 (which is off the screen) to 10. To draw our sunset we need to just move to the left edge. **Type** `moveTo 0, y * 50`\n7. We’ll use a special function to darken the color every loop. **Type** `color darken blue, y * 3`.\n8. Now for the sky, this will draw over your numbers. **Type** `rectangle 500, 50`.\n\n\n#### What you’ll hack\nNow that you’ve got a few pixel art creations under your belt, why not bring them in here and give them the full background treatment they deserve!\n\n#### Briefing\nWith a loop you can tell a computer to do something over and over again. With the `for` loop, you can ask how many times the loop has happened, and depending on what loop it is vary what it is the loop is doing.\n\nIn this sunset, we want to draw rectangular blocks of the same size, and we want to move down a certain distance every time, but this time we need a way of telling the computer that they will have a different color every time. How do we do this? With variables. The way you can ask how many times the loop has happened in a `for` loop is with the word you start the loop with. When we say `for y in [ 0 .. 10]`, we are making the word `y` equal to how many times the loop has executed. It is incremented for us, so any time we use the variable `y`, it will tell the program how many times it has looped.\n\nBecause it increments by one every time, we can use it to travel across color shades by making a color darker in step as our y variable gets bigger. So at the beginning of the loop we have a small y and a regular color, and at the end we have a big y and a dark color.\n\n" +} diff --git a/lib/challenges/locales/ja/worlds/pixelhack/grassblock.json b/lib/challenges/locales/ja/worlds/pixelhack/grassblock.json new file mode 100644 index 000000000..e3ed59246 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/pixelhack/grassblock.json @@ -0,0 +1,62 @@ +{ + "id": "grassblock", + "title": "8-bit Grass Block", + "description": "Make a block you can bring into Minecraft.", + "startAt": 1, + "steps": [ + { + "hint": "We’ll just use solid shapes with no stroke. So **type** `stroke 0`.", + "solution": "stroke 0" + }, + { + "hint": "We’ll have to use two loops here. **Type** `for x in [0 ... 16]`", + "solution": "for x in [0 ... 16]" + }, + { + "hint": "For y use `for y in [0 ... 16]`", + "solution": " for y in [0 ... 16]", + "validate": " for y in \\[0 ... 16\\]" + }, + { + "hint": "We’ll use a randomly chosen shade of brown to make the dirt. **Type** `color darken brown, random 0, 25`", + "solution": " color darken brown, random 0, 25", + "validate": " color darken brown, random 0, 25" + }, + { + "hint": "We’ll need to move into position for each square with `moveTo x * 31.25, y * 31.25`", + "solution": " moveTo x * 31.25, y * 31.25", + "validate": " moveTo x \\* 31.25, y \\* 31.25" + }, + { + "hint": "Finally, draw the dirt square with `square 32`", + "solution": " square 32", + "validate": " square 32" + }, + { + "hint": "The grass should only appear on the top of the block, so we’ll decide if the block should have a green bit drawn over it with `if 4 > y + random 0, 3`", + "solution": " if 4 > y + random 0, 3", + "validate": " if 4 > y \\+ random 0, 3" + }, + { + "hint": "Set the green color with the darken function. **Type** `color darken green, random 0, 25`", + "solution": " color darken green, random 0, 25", + "validate": " color darken green, random 0, 25" + }, + { + "hint": "Finally, draw the square with `square 32`", + "solution": " square 32", + "validate": " square 32" + } + ], + "completion_text": "Nice! Now you can change the brown and green colors to get an interesting effect. Can you make a block that looks like a strawberry?", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "grass-overgrown.png", + "grass-strawb.png", + "grass-myce.png" + ] + }, + "cover": "pixel-grassblock.png", + "guide": "#### What you'll make\n1. We’ll just use solid shapes with no stroke. So **type** `stroke 0`.\n2. We’ll have to use two loops here. **Type** `for x in [0 ... 16]`\n3. For y use `for y in [0 ... 16]`\n4. We’ll use a randomly chosen shade of brown to make the dirt. **Type** `color darken brown, random 0, 25`\n5. We’ll need to move into position for each square with `moveTo x * 31.25, y * 31.25`\n6. Finally, draw the dirt square with `square 32`\n7. The grass should only appear on the top of the block, so we’ll decide if the block should have a green bit drawn over it with `if 4 > y + random 0, 3`\n8. Set the green color with the darken function. **Type** `color darken green, random 0, 25`\n9. Finally, draw the square with `square 32`\n\n#### What you’ll hack\nTo make this Minecraft Block your own all you need to change are two variables: the colour of the top and bottom parts. Make a strawberry, a water block, or anything else by just changing these two lines. For added complexity, make a Mycelium block with some randomness and another for loop. If you really want to have a challenge, try incorporating what you learned in the previous lesson and use the x and y values to add some extra color rotation to the dirt.\n\n#### Briefing \nOne of the most basic and commonly found blocks in minecraft is the grass block. Just sixteen blocks across and down, it is a very simple image, but we’re going to use randomness to give it a bit of texture. Two different layers will be used: one for the grass, and one for the dirt. \n\nIn each layer we will use the nested for loops to draw across and down the screen, and we’ll only change one thing about each: the color.\n" +} diff --git a/lib/challenges/locales/ja/worlds/pixelhack/index.json b/lib/challenges/locales/ja/worlds/pixelhack/index.json new file mode 100644 index 000000000..2552d1e17 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/pixelhack/index.json @@ -0,0 +1,17 @@ +{ + "challenges": [ + "./pong", + "./ship", + "./tetris", + "./chest", + "./variables", + "./sword", + "./steve", + "./mage", + "./forloop", + "./gradient", + "./colorfrenzy", + "./grassblock", + "./diamondblock" + ] +} diff --git a/lib/challenges/locales/ja/worlds/pixelhack/mage.json b/lib/challenges/locales/ja/worlds/pixelhack/mage.json new file mode 100644 index 000000000..4486614f5 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/pixelhack/mage.json @@ -0,0 +1,208 @@ +{ + "id": "mage", + "title": "RPG Mage", + "description": "Draw an 8-bit Aqua Mage", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "We're going to make a Mage character for an RPG game so first we need to set the scene, we'll use the darken function to change the color teal to a more suitable shade of dark blue - **type** `background darken teal,15 `", + "solution": "background darken teal,15" + }, + { + "hint": "We're making pixel art so we'll turn the stroke off - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Let's set the color to saddlebrown for her hair - **type** `color saddlebrown`", + "solution": "color saddlebrown" + }, + { + "hint": "We'll use the moveTo function to move the cursor to a specific canvas coordinate - **type** `moveTo 120,80`", + "solution": "moveTo 120,80" + }, + { + "hint": "We're going to draw the hair first so we can layer the rest of the character over it to create depth - **type** `rectangle 320,400`", + "solution": "rectangle 320,400" + }, + { + "hint": "We're going to be drawing with blocks 20 by 20 pixels big - **type** `move 20,-20`", + "solution": "move 20,-20" + }, + { + "hint": "Stack up another layer of hair - **type** `rectangle 280,20`", + "solution": "rectangle 280,20" + }, + { + "hint": "Move upwards again to create a rounded effect - **type** `move 20,-20`", + "solution": "move 20,-20" + }, + { + "hint": "Draw the final row of hair in - **type** `rectangle 240,20`", + "solution": "rectangle 240,20" + }, + { + "hint": "Next we'll draw the face, - **type** `color sandybrown`", + "solution": "color sandybrown" + }, + { + "hint": "Move the cursor to the top corner of where the face will be - **type** `move 0,120`", + "solution": "move 0,120" + }, + { + "hint": "Draw the face with a `rectangle` that is 240 by 140", + "solution": "rectangle 240,140" + }, + { + "hint": "The face is a little too square so move the cursor up to the forehead - **type** `move 80,-40`", + "solution": "move 80,-40" + }, + { + "hint": "Draw another rectangle to create a fringe - **type** `rectangle 80,40`", + "solution": "rectangle 80,40" + }, + { + "hint": "Move the cursor down the face - **type** `move -40,180`", + "solution": "move -40,180" + }, + { + "hint": "Finish the face off by drawing a chin - **type** `rectangle 160,20`", + "solution": "rectangle 160,20" + }, + { + "hint": "Next we'll draw some robes, our mage specialises in water magic so we'll make them blue - **type** `color paleturquoise`", + "solution": "color paleturquoise" + }, + { + "hint": "Position the cursor for drawing the sleeves - **type** `move -100,20`", + "solution": "move -100,20" + }, + { + "hint": "Draw a `rectangle` 360 wide and 80 tall for the robe sleeves", + "solution": "rectangle 360,80" + }, + { + "hint": "Position the cursor to draw the body of the robe - **type** `move 60,80`", + "solution": "move 60,80" + }, + { + "hint": "Draw a `rectangle` 240 wide and 100 tall for the robe body", + "solution": "rectangle 240,100" + }, + { + "hint": "Next we'll draw a seam on the robe, change the `color` to teal", + "solution": "color teal" + }, + { + "hint": "Move the cursor to the middle of the robe - **type** `move 120,-80`", + "solution": "move 120,-80" + }, + { + "hint": "Draw a thin rectangle for the seam - **type** `rectangle 40,180`", + "solution": "rectangle 40,180" + }, + { + "hint": "Next up we'll draw the arms - **type** `move 140,40`", + "solution": "move 140,40" + }, + { + "hint": "Change the `color` back to sandybrown", + "solution": "color sandybrown" + }, + { + "hint": "Draw the arm with a `rectangle` 40 by 140", + "solution": "rectangle 40,140" + }, + { + "hint": "Move to the the other side of the body - **type** `move -380,40`", + "solution": "move -380,40" + }, + { + "hint": "This arm will be disconnected at first but don't worry, we haven't finished yet - **type** `rectangle 40,100`", + "solution": "rectangle 40,100" + }, + { + "hint": "Every mage needs a staff to cast magic, so we'll draw that next - **type** `color darkmagenta`", + "solution": "color darkmagenta" + }, + { + "hint": "Move to the top of the staff - **type** `move 60,-120`", + "solution": "move 60,-120" + }, + { + "hint": "Draw the staff over the arm so it looks like it's being held - **type** `rectangle -40,220`", + "solution": "rectangle -40,220" + }, + { + "hint": "As we said at the start our character uses water magic so set the color to aquamarine - **type** `color aquamarine`", + "solution": "color aquamarine" + }, + { + "hint": "Draw an orb at the top of the staff, if we use negative numbers then shapes are drawn backwards - **type** `square -80`", + "solution": "square -80" + }, + { + "hint": "We're also going to draw a magic circlet, move to the forehead - **type** `move 60,-200`", + "solution": "move 60,-200" + }, + { + "hint": "Draw a `rectangle` that is 240 by 20", + "solution": "rectangle 240,20" + }, + { + "hint": "Shift down a row on our grid - **type** `move -20,20`", + "solution": "move -20,20" + }, + { + "hint": "Finish off the circlet - **type** `rectangle 280,20`", + "solution": "rectangle 280,20" + }, + { + "hint": "We just need to finish off the face so position the cursor over the eyes - **type** `move 60,60`", + "solution": "move 60,60" + }, + { + "hint": "Set the `color` to black", + "solution": "color black" + }, + { + "hint": "Draw the eyes long and thin - **type** `rectangle 40,80`", + "solution": "rectangle 40,80" + }, + { + "hint": "Move across for the other eye - **type** `move 120,0`", + "solution": "move 120,0" + }, + { + "hint": "Draw the other eye - **type** `rectangle 40,80`", + "solution": "rectangle 40,80" + }, + { + "hint": "One last detail, we're going to make the eyes shiny - **type** `color white`", + "solution": "color white" + }, + { + "hint": "Draw a smaller rectangle within the pupil - **type** `rectangle 20,40`", + "solution": "rectangle 20,40" + }, + { + "hint": "Move to the other eye - **type** `move -120,0`", + "solution": "move -120,0" + }, + { + "hint": "Finish off with one last rectangle - **type** `rectangle 20,40`", + "solution": "rectangle 20,40" + } + ], + "completion_text": "Well done! Your mage is ready to raid some dungeons and cast some spells. Why not change the colours of the outfit to red for fire magic.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "mage-fire.png", + "mage-light.png", + "mage-warrior.png" + ] + }, + "cover": "pixel-mage.png", + "guide": "#### What you'll make\n1. We're going to make a Mage character for an RPG game so first we need to set the scene, we'll use the darken function to change the color teal to a more suitable shade of dark blue - **type** `background darken teal,15 `\n2. We're making pixel art so we'll turn the stroke off - **type** `stroke 0`\n3. Let's set the color to saddlebrown for her hair - **type** `color saddlebrown`\n4. We'll use the moveTo function to move the cursor to a specific canvas coordinate - **type** `moveTo 120,80`\n5. We're going to draw the hair first so we can layer the rest of the character over it to create depth - **type** `rectangle 320,400`\n6. We're going to be drawing with blocks 20 by 20 pixels big - **type** `move 20,-20`\n7. Stack up another layer of hair - **type** `rectangle 280,20`\n8. Move upwards again to create a rounded effect - **type** `move 20,-20`\n9. Draw the final row of hair in - **type** `rectangle 240,20`\n10. Next we'll draw the face, - **type** `color sandybrown`\n11. Move the cursor to the top corner of where the face will be - **type** `move 0,120`\n12. Draw the face with a `rectangle` that is 240 by 140\n13. The face is a little too square so move the cursor up to the forehead - **type** `move 80,-40`\n14. Draw another rectangle to create a fringe - **type** `rectangle 80,40`\n15. Move the cursor down the face - **type** `move -40,180`\n16. Finish the face off by drawing a chin - **type** `rectangle 160,20`\n17. Next we'll draw some robes, our mage specialises in water magic so we'll make them blue - **type** `color paleturquoise`\n18. Position the cursor for drawing the sleeves - **type** `move -100,20`\n19. Draw a `rectangle` 360 wide and 80 tall for the robe sleeves\n20. Position the cursor to draw the body of the robe - **type** `move 60,80`\n21. Draw a `rectangle` 240 wide and 100 tall for the robe body\n22. Next we'll draw a seam on the robe, change the `color` to teal\n23. Move the cursor to the middle of the robe - **type** `move 120,-80`\n24. Draw a thin rectangle for the seam - **type** `rectangle 40,180`\n25. Next up we'll draw the arms - **type** `move 140,40`\n26. Change the `color` back to sandybrown\n27. Draw the arm with a `rectangle` 40 by 140\n28. Move to the the other side of the body - **type** `move -380,40`\n29. This arm will be disconnected at first but don't worry, we haven't finished yet - **type** `rectangle 40,100`\n30. Every mage needs a staff to cast magic, so we'll draw that next - **type** `color darkmagenta`\n31. Move to the top of the staff - **type** `move 60,-120`\n32. Draw the staff over the arm so it looks like it's being held - **type** `rectangle -40,220`\n33. As we said at the start our character uses water magic so set the color to aquamarine - **type** `color aquamarine`\n34. Draw an orb at the top of the staff, if we use negative numbers then shapes are drawn backwards - **type** `square -80`\n35. We're also going to draw a magic circlet, move to the forehead - **type** `move 60,-200`\n36. Draw a `rectangle` that is 240 by 20\n37. Shift down a row on our grid - **type** `move -20,20`\n38. Finish off the circlet - **type** `rectangle 280,20`\n39. We just need to finish off the face so position the cursor over the eyes - **type** `move 60,60`\n40. Set the `color` to black\n41. Draw the eyes long and thin - **type** `rectangle 40,80`\n42. Move across for the other eye - **type** `move 120,0`\n43. Draw the other eye - **type** `rectangle 40,80`\n44. One last detail, we're going to make the eyes shiny - **type** `color white`\n45. Draw a smaller rectangle within the pupil - **type** `rectangle 20,40`\n46. Move to the other eye - **type** `move -120,0`\n47. Finish off with one last rectangle - **type** `rectangle 20,40`\n\n#### What you’ll hack\nThis is a much more intricate drawing, so there are many more things to change. You can go through the colours making up the image and change them to a new palette, and add in new objects. Take a look at the warrior and the lightning mage as ways of powering up your warrior with new powers, armour and weapons.\n\n#### Briefing\nThe simple shapes you have been putting together into simple designs can be refined and brought into more complex creations. This RPG Mage is a much more intricate design, but uses just the same tools to create them.\n" +} diff --git a/lib/challenges/locales/ja/worlds/pixelhack/pong.json b/lib/challenges/locales/ja/worlds/pixelhack/pong.json new file mode 100644 index 000000000..360721423 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/pixelhack/pong.json @@ -0,0 +1,40 @@ +{ + "id": "pong", + "title": "ポン", + "description": "ポン試合をコードで描こう。", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "ポンは(1972年)最初の家庭用ゲームコンソールの一つだった。とても基本的な卓球ゲームなんだ。卓球をやるには何が必要だろう?そうだ、ボールだね。`circle 15`を**タイプ**", + "solution": "circle 15" + }, + { + "hint": "次はパドルが必要だ。moveTo関数を使って、物の位置を決められる。moveToの後の最初の数字は水平(左右)の位置を、2つ目の数字は垂直(上下)の位置を示している。`moveTo 30,100`を**タイプ**", + "solution": "moveTo 30,100" + }, + { + "hint": "パドルを長方形(`rectangle`)関数で描こう。`rectangle 20, 100`を**タイプ**", + "solution": "rectangle 20, 100" + }, + { + "hint": "一人でポンはつまらないから、相手が必要。`moveTo 450,300`を**タイプ**", + "solution": "moveTo 450,300" + }, + { + "hint": "最後は相手のパドルを描こう。最初の数字は幅で、2つ目の数は高さを示している。`rectangle 20, 100`を**タイプ**", + "solution": "rectangle 20, 100" + } + ], + "completion_text": "できた!昔のビデオゲームを再現できた。でもそのままだとちょっとつまらないね。moveToの後の100にクリックし、値を変えてパドルを動かしてみよう。", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "pong-white.png", + "pong-movecolor.png", + "pong-movepaddles.png" + ] + }, + "cover": "pixel-pong.png", + "guide": "#### 新しい単語\n**circle** radius | circle 15\n\n現在位置で円形を描く。数字が大きければ大きいほど、円形も大きくなる。半径(radius)は円形の中心から、端までの距離だ。\n\n**moveTo** x, y | moveTo 30, 100\n\n現在位置を新しい(x, y)場所へ動かす。最初の値はxで、水平の位置を示している。2つ目の値はyで、垂直(上下)の位置を示している。\n\n**rectangle** width, height | rectangle 20, 100\n\n長方形を現在位置で描く。幅(width)と高さ(height)をそれぞれ設定することで長方形の大きさを指定できる。\n\n**color** name | color red\n\n鉛筆の色(color)を変更する。色を設定すると、全ての形や線や文字がこの色になる。色を透明にもできる:`color null`をタイプするだけ。\n\n**background** colorName | background white\n\n背景の色を変える。\n\n#### これから作るのは\n1. ポンは(1972年)最初の家庭用ゲームコンソールの一つだった。とても基本的な卓球ゲームなんだ。卓球をやるには何が必要だろう?そうだ、ボールだね。`circle 15`を**タイプ**\n2. 次はパドルが必要だ。moveTo関数を使って、物の位置を決められる。moveToの後の最初の数字は水平(左右)の位置を、2つ目の数字は垂直(上下)の位置を示している。`moveTo 30,100`を**タイプ**\n3. パドルを長方形(`rectangle`)関数で描こう。`rectangle 20, 100`を**タイプ**\n4. 一人でポンはつまらないから、相手が必要。`moveTo 450,300`を**タイプ**\n5. 最後は相手のパドルを描こう。最初の数字は幅で、2つ目の数は高さを示している。`rectangle 20, 100`を**タイプ**\n\n#### 追加チャレンジ\n美術家の重要なツールの一つは「色」である。最初の色は黒(black)で、形などを描く度に黒で描かれる。\n\n色を例えば赤(red)に変えることができる:最初の`moveTo`の後に`color red`を`rectangle 20, 100`の前にタイプすれば、パドルを違う色で描ける。ただし、色が変わるのはcolorの後だけなので、最後の行にcolorをタイプしても何も変わらない。\n\n背景の色をbackgroundで変えることができる。backgroundをどこに入れても大丈夫で、普通は一回だけ入れることになるが、一番上に入れることがお勧め。\n\n最後に、moveToの後の2つ目の数字を変えると、パドルを上下に動かすことができる。数字を簡単に変えるには、数字にクリックし、スライダーを動かせばいい。\n\n#### 概要\n1972年にアル・アルコーンさんはアタリ社入社後の新入社員課題として、ポンというゲームを作った。ボール一個とパドル2つで、非常にシンプルだったが、短期間で有名になった。そして何千万個も売れて、世界中で流行った。そこまで有名になったので、多くの競合他社は類似物も作り、アタリ社の成功を分けてもらおうとしていた。このゲームの成功のワケはシンプルでコピーしやすいことが一番だったと思われる。\n\nハッカーとして最初の仕事はポンゲームを作ることだ。ハッカーの秘密の一つは、リミックスだ:他人のコードとアイディアをパクり、組み合わせることだ。ポンのオリジナルアイディアを元に、自分だけのゲームが作れるんだ!まずスクリーンにボールとパドルを描く。そしてこれを元に新しい物を作ろう!\n" +} diff --git a/lib/challenges/locales/ja/worlds/pixelhack/ship.json b/lib/challenges/locales/ja/worlds/pixelhack/ship.json new file mode 100644 index 000000000..3e74d8152 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/pixelhack/ship.json @@ -0,0 +1,68 @@ +{ + "id": "ship", + "title": "Asteroids Ship", + "description": "Code a vector spaceship using lines", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Asteroids (1979) was one of the first major arcade games. It is set in space, so we're going to need to set the scene. **type** `background black`", + "solution": "background black" + }, + { + "hint": "The graphics in Asteroids were simple line based graphics called vectors, we still use a more complex version of this concept in computer graphics today. First we need to set our line color and width **type** `stroke white,5`", + "solution": "stroke white,5" + }, + { + "hint": "Next we use the move function to set the starting point for our first line. **type** `move 0, -70`", + "solution": "move 0, -70" + }, + { + "hint": "'Function' is the word we use to define what we are drawing. Let’s draw a line that starts where we just moved the cursor and ends at the bottom left. We type where we want the line to end after the function, so **type** `line -50,150` Try changing the Y value from 150 to -150 watch what happens. The line goes up, above where we started at -50. Let’s move it back down to 150!", + "solution": "line -50,150" + }, + { + "hint": "To move our cursor to the start of the next line we feed the previous coordinates into the move function. **type** `move -50,150`", + "solution": "move -50,150" + }, + { + "hint": "We draw a line inwards and upwards to form the thruster of the ship - **type** `line 50,-25`", + "solution": "line 50,-25" + }, + { + "hint": "Again moving to the same coordinates for a continuous line **type** `move 50,-25`", + "solution": "move 50,-25" + }, + { + "hint": "We replicate the shape for the right side of the ship by reversing the second coordinate to draw downwards instead of up **type** `line 50,25`", + "solution": "line 50,25" + }, + { + "hint": "Follow through with the line again **type** `move 50,25`", + "solution": "move 50,25" + }, + { + "hint": "Our ship starts to take shape. To make a line that goes from the end of the one we just drew to connect back up at the top **type** `line -50,-150`", + "solution": "line -50,-150" + }, + { + "hint": "Finally we move back to our starting point to add a final touch **type** `move -50,-150`", + "solution": "move -50,-150" + }, + { + "hint": "We draw a line down the centre to help the simple shape look more like a ship, early videogames had only a fraction of computing power we are used to today, so graphics had to be basic. **type** `line 0,125`", + "solution": "line 0,125" + } + ], + "completion_text": "It might not look like much but simple graphics like this were where videogames we know today began and games like this lay the foundations for the 3D graphics we're used to today.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "ship-golden.png", + "ship-thrust.png", + "ship-sleek.png" + ] + }, + "cover": "pixel-ship.png", + "guide": "#### New words\n**move** x, y | move 50, 25\n\nMoves the drawing cursor from the current position. The difference from moveTo is that this is relative, not absolute. `move 50, 25` will move the cursor 50 to the right, and 25 down from the current position, as opposed to from the top-left corner. The first value is the x value, which controls how far across horizontally the x part of the coordinate should go. The second value is the y coordinate, which controls how far down vertically the y coordinate should go. Negative values will send it in the opposite direction.\n\n**line** x, y | line 50, 25\n\nDraws a line from the current position to a relative position. The x, y coordinates control the point relative to the cursor where the line will be drawn to.\n\n**stroke** color, width | stroke white, 5\n\nSets the drawing stroke. All following shapes and text will be drawn with the stroke color and width set to this until you change it again. This function is smart and can accept arguments in any order, or only one at a time.\n\n#### What you'll make\n1. Asteroids (1979) was one of the first major arcade games. It was set in space so we're going to need to set the scene **type** `background black`\n2. The graphics in Asteroids were simple line based graphics called vectors, we still use a more complex version of this concept in computer graphics today. First we need to set our line color and width **type** `stroke white,5`\n3. Next we use the move function to set the starting point for our first line. **type** `move 0, -70`\n4. We use the line function to draw a line relative to our starting position, we use a negative number first to move to the left and a positive number second to move downward **type** `line -50,150`\n5. To move our cursor to the start of the next line we feed the previous coordinates into the move function. **type** `move -50,150`\n6. We draw a line inwards and upwards to form the thruster of the ship **type** `line 50,-25`\n7. Again moving to the same coordinates for a continuous line **type** `move 50,-25`\n8. We replicate the shape for the right side of the ship by reversing the second coordinate to draw downwards instead of up **type** `line 50,25`\n9. Follow through with the line again **type** `move 50,25`\n10. Our ship starts to take shape **type** `line -50,-150`\n11. Finally we move back to our starting point to add a final touch **type** `move -50,-150`\n12. We draw a line down the centre to help the simple shape look more like a ship, early videogames had only a fraction of computing power we are used to today, so graphics had to be basic. **type** `line 0,125`\n\n#### What you’ll hack\nIt might not look like much but graphics like this are where the videogames we know today began. Games like this lay the foundations for the 3D graphics we're used to today. You can turn your spaceship into a variety of different things by customising the stroke color and width. \n\nFor something more advanced, try drawing more lines.\n\n#### Briefing\nAsteroids (1979) was one of the first major arcade games. Limited by primitive drawing hardware, the game designers could only draw using simple line based graphics called vectors, we still use a more complex version of this concept in computer graphics today.\n" +} diff --git a/lib/challenges/locales/ja/worlds/pixelhack/steve.json b/lib/challenges/locales/ja/worlds/pixelhack/steve.json new file mode 100644 index 000000000..ed0339cc0 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/pixelhack/steve.json @@ -0,0 +1,127 @@ +{ + "id": "steve", + "title": "Steve", + "description": "Make Steve's face with simple shapes.", + "startAt": 2, + "steps": [ + { + "hint": "We are going to just be using solid squares and rectangles, so lets turn our stroke off with `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Set the background to lightbrown", + "solution": "background lightbrown" + }, + { + "hint": "Set the drawing color for the hair with `color brown`.", + "solution": "color brown" + }, + { + "hint": "The hair starts in the top-left corner, so **type** `moveTo 0, 0`.", + "solution": "moveTo 0, 0" + }, + { + "hint": "We’ll draw a rectangle, which takes a width and height parameter. **Type** `rectangle 500, 150`", + "solution": "rectangle 500, 150" + }, + { + "hint": "Set the drawing color to lightbrown**type** `color lightbrown`", + "solution": "color lightbrown" + }, + { + "hint": "Move into position for the forehead, **type** `moveTo 100, 100`", + "solution": "moveTo 100, 100" + }, + { + "hint": "Now to draw the forehead, **type** `rectangle 300, 50`", + "solution": "rectangle 300, 50" + }, + { + "hint": "For the eyes, set the color to white", + "solution": "color white" + }, + { + "hint": "Now let’s move with `moveTo 100, 200`", + "solution": "moveTo 100, 200" + }, + { + "hint": "Draw the eye with `square 50`", + "solution": "square 50" + }, + { + "hint": "For the other eye, **type** `moveTo 350, 200`", + "solution": "moveTo 350, 200" + }, + { + "hint": "And another square of size 50", + "solution": "square 50" + }, + { + "hint": "For the iris we’ll use the color purple.", + "solution": "color purple" + }, + { + "hint": "Move to `150, 200`.", + "solution": "moveTo 150, 200" + }, + { + "hint": "Draw a square of size 50.", + "solution": "square 50" + }, + { + "hint": "Move to `300, 200`.", + "solution": "moveTo 300, 200" + }, + { + "hint": "And draw the final iris with a square of size 50.", + "solution": "square 50" + }, + { + "hint": "We’ll draw the nose next. **Type** `color brown`", + "solution": "color brown" + }, + { + "hint": "Move into position with `moveTo 200, 250`.", + "solution": "moveTo 200, 250" + }, + { + "hint": "Draw out a rectangle of width `100` and height `50`.", + "solution": "rectangle 100, 50" + }, + { + "hint": "For the mouth set the drawing color to `saddlebrown`.", + "solution": "color saddlebrown" + }, + { + "hint": "Move to `150, 300`", + "solution": "moveTo 150, 300" + }, + { + "hint": "The mouth should be wide rectangle. **Type** `200, 100`.", + "solution": "rectangle 200, 100" + }, + { + "hint": "To make the mouth just right we need to cut out a bit of the top. Set the drawing color to the same color as the skin. **Type** `color lightbrown`", + "solution": "color lightbrown" + }, + { + "hint": "Move to `200, 300`.", + "solution": "moveTo 200, 300" + }, + { + "hint": "Finish up with `rectangle 100, 50` ", + "solution": "rectangle 100, 50" + } + ], + "completion_text": "Well done! Our character is looking good. What parts can you change to make the character look more like you?", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "Steve-blue.png", + "Steve-beard.png", + "Steve-Alex.png" + ] + }, + "cover": "pixel-steve.png", + "guide": "#### What you'll make\n1. We are going to just be using solid squares and rectangles, so lets turn our stroke off with `stroke 0`\n2. Set the background to lightbrown\n3. Set the drawing color for the hair with `color brown`.\n4. The hair starts in the top-left corner, so **type** `moveTo 0, 0`.\n5. We’ll draw a rectangle, which takes a width and height parameter. **Type** `rectangle 500, 150`\n6. Set the drawing color to lightbrown**type** `color lightbrown`\n7. Move into position for the forehead, **type** `moveTo 100, 100`\n8. Now to draw the forehead, **type** `rectangle 300, 50`\n9. For the eyes, set the color to white\n10. Now let’s move with `moveTo 100, 200`\n11. Draw the eye with `square 50`\n12. For the other eye, **type** `moveTo 350, 200`\n13. And another square of size 50\n14. For the iris we’ll use the color purple.\n15. Move to `150, 200`.\n16. Draw a square of size 50.\n17. Move to `300, 200`.\n18. And draw the final iris with a square of size 50.\n19. We’ll draw the nose next. **Type** `color brown`\n20. Move into position with `moveTo 200, 250`.\n21. Draw out a rectangle of width `100` and height `50`.\n22. For the mouth set the drawing color to `saddlebrown`.\n23. Move to `150, 300`\n24. The mouth should be wide rectangle. **Type** `200, 100`.\n25. To make the mouth just right we need to cut out a bit of the top. Set the drawing color to the same color as the skin. **Type** `color lightbrown`\n26. Move to `200, 300`.\n27. Finish up with `rectangle 100, 50` \n\n#### What you’ll hack\nThe shapes here are simple, but that is what makes it so easy to remix and hack! Change the colors of the skin, eyes, or hair, or add in your own facial features to win!\n\n#### Briefing\nSteve is the hero of Minecraft. Not very much is known about Steve: who he is, where he came from, and whether he is even human. But he is the face of the most sensational game and building system of the decade. This simple composition with just squares and rectangles is brought to life with beautiful colors.\n" +} diff --git a/lib/challenges/locales/ja/worlds/pixelhack/sword.json b/lib/challenges/locales/ja/worlds/pixelhack/sword.json new file mode 100644 index 000000000..bc5491c80 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/pixelhack/sword.json @@ -0,0 +1,96 @@ +{ + "id": "sword", + "title": "Diamond Sword", + "description": "Code a sword forged from pure diamonds", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "We're going to make a sword out of diamond so first we will set up some variables to represent the colors **type** `sword = aquamarine`", + "solution": "sword = aquamarine" + }, + { + "hint": "We set up enough variable to represent the darker areas of the sword, we can use the darken function to alter the color of our existing sword color. **type** `darksword = darken sword,40`", + "solution": "darksword = darken sword,40" + }, + { + "hint": "We start by setting the `background` color to slategray", + "solution": "background slategray" + }, + { + "hint": "Next we set our fill color to the variable we set up before **type** `color sword`", + "solution": "color sword" + }, + { + "hint": "and set our stroke color to the darker version of our sword color **type** `stroke darksword,20`", + "solution": "stroke darksword,20" + }, + { + "hint": "Move the cursor to where the top of the blade will be **type** `move -20,-180`", + "solution": "move -20,-180" + }, + { + "hint": "Draw the blade of the sword **type** `rectangle 40,230`", + "solution": "rectangle 40,230" + }, + { + "hint": "It's already starting to take shape, let's create the handle **type** `move 10,250`", + "solution": "move 10,250" + }, + { + "hint": "The grip isn't going to be made of diamond so set the `stroke` color to darkbrown", + "solution": "stroke darkbrown" + }, + { + "hint": "and the `color` to brown", + "solution": "color brown" + }, + { + "hint": "Draw a `rectangle` 20 by 100 for the grip", + "solution": "rectangle 20,100" + }, + { + "hint": "We're going to create the crossguard next **type** `move -70,-10`", + "solution": "move -70,-10" + }, + { + "hint": "Change the `stroke` color back to our darksword variable", + "solution": "stroke darksword" + }, + { + "hint": "We're going to use another color function: lighten to slightly change our diamond color **type** `color lighten darksword,10`", + "solution": "color lighten darksword,10" + }, + { + "hint": "Next draw a `rectangle` 160 by 20", + "solution": "rectangle 160,20" + }, + { + "hint": "Notice how the lighten function altered the diamond color. **type** `move 80, -240`", + "solution": "move 80, -240" + }, + { + "hint": "Finally we're going to add a highlight detail to finish the sword **type** `color white`", + "solution": "color white" + }, + { + "hint": "Turn the stroke off **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Draw a `rectangle` 10 by 230", + "solution": "rectangle 10, 230" + } + ], + "completion_text": "That sword looks exquisite, perfect for fighting your way out of some caves. Try changing the color on the first line, see how it changes all the other colors on the blade because of the variables.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "sword-golden.png", + "sword-shovel.png", + "sword-pickaxe.png" + ] + }, + "cover": "pixel-sword.png", + "guide": "#### New words\n**darken**(color, amount) | darken(blue, 40)\n\nReturns a lightened color by the amount you give it. The amount can be between 0 and 100.\n\n**lighten**(color, amount) | lighten(blue, 40)\n\nReturns a lightened color by the amount you give it. The amount can be between 0 and 100.\n\n\n#### What you'll make\n1. We're going to make a sword out of diamond so first we will set up some variables to represent the colors **type** `sword = aquamarine`\n2. We set up enough variable to represent the darker areas of the sword, we can use the darken function to alter the color of our existing sword color. **type** `darksword = darken sword,40`\n3. We start by setting the `background` color to slategray\n4. Next we set our fill color to the variable we set up before **type** `color sword`\n5. and set our stroke color to the darker version of our sword color **type** `stroke darksword,20`\n6. Move the cursor to where the top of the blade will be **type** `move -20,-180`\n7. Draw the blade of the sword **type** `rectangle 40,230`\n8. It's already starting to take shape, let's create the handle **type** `move 10,250`\n9. The grip isn't going to be made of diamond so set the `stroke` color to darkbrown\n10. and the `color` to brown\n11. Draw a `rectangle` 20 by 100 for the grip\n12. We're going to create the crossguard next **type** `move -70,-10`\n13. Change the `stroke` color back to our darksword variable\n14. We're going to use another color function: lighten to slightly change our diamond color **type** `color lighten darksword,10`\n15. Next draw a `rectangle` 160 by 20\n16. Notice how the lighten function altered the diamond color. **type** `move 80, -240`\n17. Finally we're going to add a highlight detail to finish the sword **type** `color white`\n18. Turn the stroke off **type** `stroke 0`\n19. Draw a `rectangle` 10 by 230\n\n#### What you’ll hack\nBecause all of the colors we used are just shades of our sword color, by changing one variable all the darker and lighter shades will change as well! We can make a diamond sword into a gold one by just changing the sword color.\n\nUsing the same code and style, what other Minecraft-inspired creations can you make?\n\n#### Briefing\nThe diamond sword is the most powerful weapon in the Minecraft players toolbelt. It is also the most difficult to make given the rarity of diamond. All of the different types of swords in Minecraft (diamond, gold, steel, stone…) follow a simple pattern in their design. The only thing that separates them visually is their color. For the diamond sword we’ll make a word called \"sword\" which is set to the color \"aquamarine\". To select different shades for the hilt and outlines, we’ll use the color with special color functions." +} diff --git a/lib/challenges/locales/ja/worlds/pixelhack/tetris.json b/lib/challenges/locales/ja/worlds/pixelhack/tetris.json new file mode 100644 index 000000000..bb9cfbc9f --- /dev/null +++ b/lib/challenges/locales/ja/worlds/pixelhack/tetris.json @@ -0,0 +1,96 @@ +{ + "id": "tetris", + "title": "Tetris", + "description": "Stack some Tetris blocks with code", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Tetris (1984) was the first videogame to be exported from the USSR to the US, going on to sell 170 million copies. We're going to make some Tetris blocks, first turn the stroke off **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Next move your cursor to the start of the first block **type** `moveTo 150,200`", + "solution": "moveTo 150,200" + }, + { + "hint": "We're going to need some colors to tell the blocks apart, change the fill color of your shapes with the color function **type** `color crimson`", + "solution": "color crimson" + }, + { + "hint": "First we're going to draw an L shaped block **type** `rectangle 50,150`", + "solution": "rectangle 50,150" + }, + { + "hint": "Our blocks are all going to be to a 50x50 grid, so you'll notice all our draw and move commands are multiples of 50 **type** `move 0,100`", + "solution": "move 0,100" + }, + { + "hint": "Finish off the block with a 100,50 `rectangle`", + "solution": "rectangle 100,50" + }, + { + "hint": "Let's move to start the next block **type** `move 50,-100`", + "solution": "move 50,-100" + }, + { + "hint": "We'll change the color to tell them apart, color functions affect all shapes drawn below them in the code **type** `color seagreen`", + "solution": "color seagreen" + }, + { + "hint": "Next we'll be drawing the S shaped block **type** `rectangle 50,100`", + "solution": "rectangle 50,100" + }, + { + "hint": "Move one gridspace across and one down **type** `move 50,50`", + "solution": "move 50,50" + }, + { + "hint": "To make an S shape we create another `rectangle` of 50 by 100", + "solution": "rectangle 50,100" + }, + { + "hint": "On to the next block **type** `move 50,-100`", + "solution": "move 50,-100" + }, + { + "hint": "We change the color again **type** `color indigo`", + "solution": "color indigo" + }, + { + "hint": "Next we will draw a long and thin block, draw a `rectangle` 50 by 200", + "solution": "rectangle 50,200" + }, + { + "hint": "One final block to complete the square **type** `move -150,0`", + "solution": "move -150,0" + }, + { + "hint": "Let's make the `color` gold to stand out", + "solution": "color gold" + }, + { + "hint": "Another L block will fit nicely so draw the stem with **type** `rectangle 150,50`", + "solution": "rectangle 150,50" + }, + { + "hint": "Move into place to draw the foot **type** `move 100,0`", + "solution": "move 100,0" + }, + { + "hint": "Finally fill in the foot **type** `rectangle 50,100`", + "solution": "rectangle 50,100" + } + ], + "completion_text": "Well done you created a nice stack of tetrominoes, why not try changing the color of some of the blocks or drawing a few more to fill the screen.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "tetris-gameboy.png", + "tetris-3D.png", + "tetris-row.png" + ] + }, + "cover": "pixel-tetris.png", + "guide": "#### New words\n**color** name | color red\n\nChanges the drawing color. All following shapes and text will be drawn with the fill color set to this color until you change it again. To set the drawing color to transparent, type `color null`\n\n#### What you'll make\n1. Tetris (1984) was the first videogame to be exported from the USSR to the US, going on to sell 170 million copies. We're going to make some Tetris blocks, first turn the stroke off **type** `stroke 0`\n2. Next move your cursor to the start of the first block **type** `moveTo 150,200`\n3. We're going to need some colors to tell the blocks apart, change the fill color of your shapes with the color function **type** `color crimson`\n4. First we're going to draw an L shaped block **type** `rectangle 50,150`\n5. Our blocks are all going to be to a 50x50 grid, so you'll notice all our draw and move commands are multiples of 50 **type** `move 0,100`\n6. Finish off the block with a 100,50 `rectangle`\n7. Let's move to start the next block **type** `move 50,-100`\n8. We'll change the color to tell them apart, color functions affect all shapes drawn below them in the code **type** `color seagreen`\n9. Next we'll be drawing the S shaped block **type** `rectangle 50,100`\n10. Move one gridspace across and one down **type** `move 50,50`\n11. To make an S shape we create another `rectangle` of 50 by 100\n12. On to the next block **type** `move 50,-100`\n13. We change the color again **type** `color indigo`\n14. Next we will draw a long and thin block, draw a `rectangle` 50 by 200\n15. One final block to complete the square **type** `move -150,0`\n16. Let's make the `color` gold to stand out\n17. Another L block will fit nicely so draw the stem with **type** `rectangle 150,50`\n18. Move into place to draw the foot **type** `move 100,0`\n19. Finally fill in the foot **type** `rectangle 50,100`\n\n#### What you’ll hack\nNow you’ve made a cube, give each tetrimino whatever color you want, and add in more.\n\n#### Briefing \nTetris (1984) was the first videogame to be exported from the USSR to the US, going on to sell 170 million copies. We're going to make some Tetris blocks, which are known as tetriminos. Each tetrimino is made up of four squares that connect together, and fit together in interesting ways. In the game, tetriminos fall down endlessly and the goal is to make as many of them fit together without empty spaces.\n" +} diff --git a/lib/challenges/locales/ja/worlds/pixelhack/variables.json b/lib/challenges/locales/ja/worlds/pixelhack/variables.json new file mode 100644 index 000000000..e0972ff3d --- /dev/null +++ b/lib/challenges/locales/ja/worlds/pixelhack/variables.json @@ -0,0 +1,93 @@ +{ + "id": "variables", + "title": "Variables", + "description": "Use variables to create a maze dwelling ghost", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "This classic ghost character first appeared in Pac-Man (1980), because it's a ghost we're going to need a spooky background **type** `background navy`", + "solution": "background navy" + }, + { + "hint": "Next turn the stroke off by typing `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Set the `color` to red", + "solution": "color red" + }, + { + "hint": "Here we're introducing something new, we're going to set the size of the ghost using a variable, variables are a way of repeating the same value in your code **type** `ghostsize = 100`", + "solution": "ghostsize = 100" + }, + { + "hint": "Move the cursor up to where the ghosts head will start **type** `move 0,-50`", + "solution": "move 0,-50" + }, + { + "hint": "We're going to use that variable we set earlier to draw the head, because we set the variable to 100 this command will create a circle 100 pixels big **type** `circle ghostsize`", + "solution": "circle ghostsize" + }, + { + "hint": "We're going to use the variable again, this time with the move command, by placing a minus symbol in front of it this command becomes the same as moving -100,0 **type** `move -ghostsize,0`", + "solution": "move -ghostsize,0" + }, + { + "hint": "Time to draw the rest of the ghost's body, because the body is relative to the head size we will use the variable again **type** `square ghostsize * 2`", + "solution": "square ghostsize * 2", + "validate": "square ghostsize \\* 2" + }, + { + "hint": "We're going to give it some eyes so we need to use the variable again to make sure they're positioned correctly on the head **type** `move ghostsize / 2`", + "solution": "move ghostsize / 2" + }, + { + "hint": "Set the `color` to white", + "solution": "color white" + }, + { + "hint": "Start the eyes off with a `circle` 20 pixels big", + "solution": "circle 20" + }, + { + "hint": "Now set the iris color **type** `color blue`", + "solution": "color blue" + }, + { + "hint": "Finally draw the iris **type** `circle 10`", + "solution": "circle 10" + }, + { + "hint": "We're gonna use the variable one last time to position the other eye correctly **type** `move ghostsize,0`", + "solution": "move ghostsize,0" + }, + { + "hint": "Repeat the process for the second eye, set the `color` to white", + "solution": "color white" + }, + { + "hint": "Draw a `circle` 20 pixels big", + "solution": "circle 20" + }, + { + "hint": "Set the `color` to blue", + "solution": "color blue" + }, + { + "hint": "Finally draw a `circle` 10 pixels big", + "solution": "circle 10" + } + ], + "completion_text": "Nice! Now because you have used a variable, you can click on the ghostsize number and use the slider to change the value. Notice how the eyes stay the same size because they are hardcoded numbers and everything else scales together.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "ghost-big.png", + "ghost-tired.png", + "ghost-scared.png" + ] + }, + "cover": "pixel-variables.png", + "guide": "#### New words\n**variable** = value | ghostsize = 100\n\nCreates a word that is assigned a value and can be used elsewhere.\n\n#### What you'll make\n1. This classic ghost character first appeared in Pac-Man (1980), because it's a ghost we're going to need a spooky background **type** `background navy`\n2. Next turn the stroke off by typing `stroke 0`\n3. Set the `color` to red\n4. Here we're introducing something new, we're going to set the size of the ghost using a variable, variables are a way of repeating the same value in your code **type** `ghostsize = 100`\n5. Move the cursor up to where the ghosts head will start **type** `move 0,-50`\n6. We're going to use that variable we set earlier to draw the head, because we set the variable to 100 this command will create a circle 100 pixels big **type** `circle ghostsize`\n7. We're going to use the variable again, this time with the move command, by placing a minus symbol in front of it this command becomes the same as moving -100,0 **type** `move -ghostsize,0`\n8. Time to draw the rest of the ghost's body, because the body is relative to the head size we will use the variable again **type** `square ghostsize * 2`\n9. We're going to give it some eyes so we need to use the variable again to make sure they're positioned correctly on the head **type** `move ghostsize / 2`\n10. Set the `color` to white\n11. Start the eyes off with a `circle` 20 pixels big\n12. Now set the iris color **type** `color blue`\n13. Finally draw the iris **type** `circle 10`\n14. We're gonna use the variable one last time to position the other eye correctly **type** `move ghostsize,0`\n15. Repeat the process for the second eye, set the `color` to white\n16. Draw a `circle` 20 pixels big\n17. Set the `color` to blue\n18. Finally draw a `circle` 10 pixels big\n\n#### What you’ll hack\nBecause you used a variable for all the different versions of the ghost’s body, you can change it once to see how the ghost’s body resizes! If you notice, the eyes position change with the ghostsize variable, but the eyes’ size don’t. Could you set up another variable that controls the size of the eyes?\n\n#### Briefing\nWhen you write a computer program you are telling a computer to do a series of tasks. And when you run the program, the computer reads all of the tasks and does them. So far we have written programs that will run the same way every single time you do the program, but what if we want the program to be different every time we run the program? If we wanted to vary the way in which the program works every time it was run, we need to use variables.\n\nA variable is a word that takes on the meaning of something else. And when you use it somewhere else it will pass on the word it means. In this challenge you will base the size of many of the ghost’s parts off of a variable. Changing the variable with a slider will then affect all of the different individual shapes sizes, giving you the power to make the whole ghost bigger or smaller at once!\n" +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/backpack.json b/lib/challenges/locales/ja/worlds/summercamp/backpack.json new file mode 100644 index 000000000..fdb455022 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/backpack.json @@ -0,0 +1,143 @@ +{ + "id": "backpack", + "title": "Pack your things", + "short_title": "Backpack", + "icon_class": "challenge_backpack", + "description": "Dick Kelty is the inventor of the aluminium frame backpack. Kelty got the idea for his backpack in 1951 when he and a friend were hiking in the Sierra Nevada. Working in his garage, and with $500 borrowed against his house, Kelty and his wife went into production; he cut and welded the aluminium frames, while she stitched the nylon. They sold the finished backpacks for $24 apiece.", + "cover": "summercamp/day_8.png", + "completion_text": "I have a big challenge for you: try drawing your character behind that backpack! Head, arms, legs… ", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "It's a beautiful day to go for a walk in the forest - **type** `background blue`", + "solution": "background blue" + }, + { + "hint": "Firstly, set the `stroke` to `0`, to avoid drawing the outlines of the shapes", + "solution": "stroke 0" + }, + { + "hint": "Move the cursor to place the floor - in a new line **type** `moveTo 0, 250`", + "solution": "moveTo 0, 250" + }, + { + "hint": "Set the `color` of the grass to `green`", + "solution": "color green" + }, + { + "hint": "Draw the floor with a rectangle - **type** `rectangle 500, 250`", + "solution": "rectangle 500, 250" + }, + { + "hint": "This looks like a nice place for a tree - **type** `moveTo 220`", + "solution": "moveTo 220" + }, + { + "hint": "Set the `color` of the trunk to `lightbrown`", + "solution": "color lightbrown" + }, + { + "hint": "Draw the trunk with a `rectangle` of size `50` by `400`", + "solution": "rectangle 50, 400" + }, + { + "hint": "Beautiful! Now it just needs some leaves - **type** `move 30, -120` to place them", + "solution": "move 30, -120" + }, + { + "hint": "Set the `color` of the leaves to `darkgreen`", + "solution": "color darkgreen" + }, + { + "hint": "Draw a `circle` to represent the leaves with size `200`", + "solution": "circle 200" + }, + { + "hint": "Looking great! Let's move the cursor to place our backpack - **type** `moveTo 150, 200`", + "solution": "moveTo 150, 200" + }, + { + "hint": "Let's choose `color` `brown` for our backpack", + "solution": "color brown" + }, + { + "hint": "Draw the main part of the rucksack with a square - **type** `square 200`", + "solution": "square 200" + }, + { + "hint": "Now move the cursor to bottom part of our backpack - **type** `moveTo 250, 400`", + "solution": "moveTo 250, 400" + }, + { + "hint": "Draw the bottom using an ellipse - **type** `ellipse 100, 30`", + "solution": "ellipse 100, 30" + }, + { + "hint": "We need to store the sleeping bag at the top - **type** `moveTo 250, 200`", + "solution": "moveTo 250, 200" + }, + { + "hint": "Set the `color` of the sleeping bag to `darkred`", + "solution": "color darkred" + }, + { + "hint": "Ready to draw the sleeping bag? Use an ellipse - **type** `ellipse 115, 40`", + "solution": "ellipse 115, 40" + }, + { + "hint": "We need something to secure your sleeping bag to your backpack - **type** `moveTo 200, 160`", + "solution": "moveTo 200, 160" + }, + { + "hint": "The `orangered` seems like a nice `color` for the holders", + "solution": "color orangered" + }, + { + "hint": "Draw the left one first - **type** `rectangle 15, 90`", + "solution": "rectangle 15, 90" + }, + { + "hint": "Position the cursor to the right to draw the next holder - **type** `moveTo 290, 160`", + "solution": "moveTo 290, 160" + }, + { + "hint": "Use a `rectangle` again for the right holder, same as the previous one", + "solution": "rectangle 15, 90" + }, + { + "hint": "Excellent! We need more storage space. Move the cursor to the middle - **type** `moveTo 205, 320`", + "solution": "moveTo 205, 320" + }, + { + "hint": "Use a `rectangle` for the outside pocket, `90` by `60` will suffice", + "solution": "rectangle 90, 60" + }, + { + "hint": "That pocket needs to be closed so bugs can't get in - **type** `moveTo 250, 320`", + "solution": "moveTo 250, 320" + }, + { + "hint": "Set the `color` to `lightbrown`", + "solution": "color lightbrown" + }, + { + "hint": "An `ellipse` of size `48` by `7` will help here", + "solution": "ellipse 48, 7" + }, + { + "hint": "Looking great! Let’s place a button on that pocket - **type** `moveTo 250, 330`", + "solution": "moveTo 250, 330" + }, + { + "hint": "Set the `color` to `brown`", + "solution": "color brown" + }, + { + "hint": "Draw a `circle` button of size `10`", + "solution": "circle 10" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/bear.json b/lib/challenges/locales/ja/worlds/summercamp/bear.json new file mode 100644 index 000000000..3282e8b5c --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/bear.json @@ -0,0 +1,91 @@ +{ + "id": "bear", + "title": "Cheeky Bear", + "short_title": "Bear", + "description": "Bears are very smart and have been known to roll rocks into bear traps to set off the trap and then eat the bait in safety. These animals can run up to 40 miles per hour, fast enough to catch a running horse. Take into account that the fastest known human alive today is Usain Bolt, who can run at 27mph! And because bears can walk short distances on their hind legs, some Native Americans called them “the beast that walks like a man.”", + "icon_class": "challenge_bear", + "cover": "summercamp/day_11.png", + "completion_text": "That cute bear needs a body, and a habitat. Use your code skills to impress other campers with your abilities! Remember that the icons on your left can help you achieve what you have in mind.", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "The bear lives in the forest. Set the background color to green - **type** `background green`", + "solution": "background green" + }, + { + "hint": "The bear has brown fur, let's start to draw his face by getting our paint ready - **type** `color brown`", + "solution": "color brown" + }, + { + "hint": "Set the stroke to 0, to avoid drawing lines - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Draw the face with a circle - **type** `circle 100`", + "solution": "circle 100" + }, + { + "hint": "Now let's move the cursor to draw his left ear - **type** `move -80, -80`", + "solution": "move -80, -80" + }, + { + "hint": "Draw the ear with a `circle` of size `30`", + "solution": "circle 30" + }, + { + "hint": "Move the cursor to the right to draw his other ear - **type** `move 160`", + "solution": "move 160" + }, + { + "hint": "Draw another ear (just like the last one)", + "solution": "circle 30" + }, + { + "hint": "Now head over to where the left eye will go - **type** `move -110, 50`", + "solution": "move -110, 50" + }, + { + "hint": "The rest of the bear's facial features will be `black`, so lets set the `color`", + "solution": "color black" + }, + { + "hint": "Draw the first eye - **type** `circle 5`", + "solution": "circle 5" + }, + { + "hint": "Next move over to where the other eye goes - **type** `move 60`", + "solution": "move 60" + }, + { + "hint": "Fill in the other eye just like the last one", + "solution": "circle 5" + }, + { + "hint": "Move to the center of the face for the bear's most distinctive feature - **type** `move -30, 50`", + "solution": "move -30, 50" + }, + { + "hint": "Draw his nose with a triangle using polygon - **type** `polygon 12, -16, -12, -16`", + "solution": "polygon 12, -16, -12, -16" + }, + { + "hint": "Let's get ready to draw the mouth by moving down a bit further - **type** `move 0, 20`", + "solution": "move 0, 20" + }, + { + "hint": "Set the `stroke` (the outline of a shape) to color `black` and size `3`", + "solution": "stroke black, 3" + }, + { + "hint": "We don't want the mouth to be filled so set its color to null - **type** `color null`", + "solution": "color null" + }, + { + "hint": "An arc is part of a cirlce, just like a smiling mouth - **type** `arc 15, 0.5, 2`", + "solution": "arc 15, 0.5, 2" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/bow_and_arrow.json b/lib/challenges/locales/ja/worlds/summercamp/bow_and_arrow.json new file mode 100644 index 000000000..73a61d1f7 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/bow_and_arrow.json @@ -0,0 +1,107 @@ +{ + "id": "bow_and_arrow", + "title": "Bow and Arrow", + "short_title": "Bow and Arrow", + "icon_class": "challenge_bow", + "description": "Shooting a bow and arrow at a target is an art that requires lots of focus. This challenge is to draw a bow and try to hold it steady while your hand jitters...just like the other humans who have used the bow and arrow for hunting since the dawn of civilization over ten thousand years ago. The oldest known bow, found in Denmark, dates from 9000 BCE!", + "cover": "summercamp/day_15.png", + "completion_text": "Click Refresh and watch the target move while you try to hold your bow steady! Try getting rid of the moving background to make it easier to hit the target, converting your bow to a crossbow, or drawing an arrow in the bullseye.", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "The weather is good today...there is no wind to blow our arrows off course. Set the background color to blue - **type** `background blue`.", + "solution": "background blue" + }, + { + "hint": "We want the background to jitter, so we will start drawing it at a random point. **Type** `moveTo (random -20, 0), (random 240, 260)`.", + "solution": "moveTo (random -20, 0), (random 240, 260)" + }, + { + "hint": "Our target is in a grassy field, so lets get our `color green` ready", + "solution": "color green" + }, + { + "hint": "Draw a big `rectangle` that is `550` pixels high and `300` pixels wide for the grass", + "solution": "rectangle 550, 300" + }, + { + "hint": "Now let's move the cursor to draw our target - **type** `move 275, 10`", + "solution": "move 275, 10" + }, + { + "hint": "First we will draw the wooden legs supporting it - **type** `stroke brown, 15`", + "solution": "stroke brown, 15" + }, + { + "hint": "Draw the left leg - **type** `line -80, 120`", + "solution": "line -80, 120" + }, + { + "hint": "...and now draw the right leg - **type** `line 80, 120`", + "solution": "line 80, 120" + }, + { + "hint": "We will draw a target with white and red rings - **type** `stroke white, 50`", + "solution": "stroke white, 50" + }, + { + "hint": "Now make the inside of the circle red - **type** `color red`", + "solution": "color red" + }, + { + "hint": "First, draw a circle with a radius of 80 pixels- **type** `circle 80`", + "solution": "circle 80" + }, + { + "hint": "Second, draw a `circle` with a radius of `30` pixels", + "solution": "circle 30" + }, + { + "hint": "Move the cursor to draw an arrowhead - **type** `moveTo 250, 220`", + "solution": "moveTo 250, 220" + }, + { + "hint": "Our arrowhead will have a thin gray outline - **type** `stroke gray, 1`", + "solution": "stroke gray, 1" + }, + { + "hint": "The flint arrowhead is going to have the `color dimgray`", + "solution": "color dimgray" + }, + { + "hint": "Draw the arrowhead as a diamond - **type** `polygon -10, 40, 0, 80, 10, 40`", + "solution": "polygon -10, 40, 0, 80, 10, 40" + }, + { + "hint": "Next we will move to draw the shaft of the arrow - **type** `move 0, 40`", + "solution": "move 0, 40" + }, + { + "hint": "The arrow will be made of a light brown wood - **type** `stroke lightbrown, 20`", + "solution": "stroke lightbrown, 20" + }, + { + "hint": "Draw a line for the shaft - **type** `line 200, 360`", + "solution": "line 200, 360" + }, + { + "hint": "The last thing we will draw is our bow. Move the cursor off the screen - **type** `moveTo 800, 375`", + "solution": "moveTo 800, 375" + }, + { + "hint": "We are going to draw an arc for the bow so let's draw it with a thick piece of dark brown wood - **type** `stroke darkbrown, 40`", + "solution": "stroke darkbrown, 40" + }, + { + "hint": "We don't want the arc to have any fill - **type** `color null`", + "solution": "color null" + }, + { + "hint": "Draw the bow with a big arc centered far off the screen - **type** `arc 500, 0, 2`", + "solution": "arc 500, 0, 2" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/camera.json b/lib/challenges/locales/ja/worlds/summercamp/camera.json new file mode 100644 index 000000000..0a53047ee --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/camera.json @@ -0,0 +1,109 @@ +{ + "id": "camera", + "title": "Take a pic!", + "short_title": "Camera", + "icon_class": "challenge_camera", + "description": "Back in the 1820s, early cameras would take several hours to actually capture a film! With annoyingly long exposure hours, photographing people with a nice smile was not really possible. Why? Try and hold a convincing smile while staying perfectly still for hours and you will get your answer. Today, the number of photographs clicked every two minutes is same as the number of photographs clicked by mankind in 1800s.", + "cover": "summercamp/day_10.png", + "completion_text": "Try drawing yourself taking the picture behind that beautiful camera. Perhaps a light for the flash as well?", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": { + "outfit": 1 + }, + "steps": [ + { + "hint": "Set the `background` color to `blue`", + "solution": "background blue" + }, + { + "hint": "Set the `stroke` to `0` for now, to avoid drawing the outline of the shapes", + "solution": "stroke 0" + }, + { + "hint": "Move the cursor to place the camera in the center - **type** `moveTo 100, 150`", + "solution": "moveTo 100, 150" + }, + { + "hint": "Set the `color` of the camera to `dimgray`", + "solution": "color dimgray" + }, + { + "hint": "Now draw the body of the camera with a rectangle - **type** `rectangle 300, 200`", + "solution": "rectangle 300, 200" + }, + { + "hint": "Move the cursor to draw the lense - **type** `move 150, 100`", + "solution": "move 150, 100" + }, + { + "hint": "Set the `color` of the lens to `lightblue`", + "solution": "color lightblue" + }, + { + "hint": "Set the outline of the lens with a `stroke` of `black` color and size `10`", + "solution": "stroke black, 10" + }, + { + "hint": "The lens is a `circle` with size `50`", + "solution": "circle 50" + }, + { + "hint": "Set the `color` to `lightgray` for the second half of the lens", + "solution": "color lightgray" + }, + { + "hint": "Draw an arc that matches the top half of the lens - **type** `arc 50, 2, 1`", + "solution": "arc 50, 2, 1" + }, + { + "hint": "This camera needs a flash! Move the cursor to place it - **type** `move -30, -125`", + "solution": "move -30, -125" + }, + { + "hint": "Draw the flash of the camera with a `rectangle` of size `60` by `20`", + "solution": "rectangle 60, 20" + }, + { + "hint": "Set the `stroke` back to `0`.", + "solution": "stroke 0" + }, + { + "hint": "Set the `color` of the flash to `lightblue`", + "solution": "color lightblue" + }, + { + "hint": "Draw a polygon for the reflection on the flash - **type** `polygon 40, 0, 0, 20`", + "solution": "polygon 40, 0, 0, 20" + }, + { + "hint": "Only the button to shoot the picture is left - **type** `move 100, 10`", + "solution": "move 100, 10" + }, + { + "hint": "Set the `color` of the button to `red`.", + "solution": "color red" + }, + { + "hint": "Draw the button of the camera with a `rectangle` of size `50` by `15`", + "solution": "rectangle 50, 15" + }, + { + "hint": "One more detail! Move the cursor one last time - **type** `move 25, -20`", + "solution": "move 25, -20" + }, + { + "hint": "Set the `color` to `yellow`", + "solution": "color yellow" + }, + { + "hint": "Set the `font` to `'ComicSansMS'` and size `30`", + "solution": "font 'ComicSansMS', 30" + }, + { + "hint": "Write some text - **type** `text 'Click!'`", + "solution": "text 'Click!'" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/camp_badge.json b/lib/challenges/locales/ja/worlds/summercamp/camp_badge.json new file mode 100644 index 000000000..f682de7bc --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/camp_badge.json @@ -0,0 +1,56 @@ +{ + "id": "camp_badge", + "title": "Camp Badge", + "short_title": "Camp Badge", + "icon_class": "challenge_badge", + "description": "First Aid is the most popular merit badge. In fact, 6.9 million Scouts have earned it since its debut in 1911. Other popular ones are Environmental Science, Search and Rescue, and our favourites Programming and Game Design! There are some oddballs as well. For example Truck transportation: “Assume that you are going to ship by truck 500 pounds of goods (freight class 65) from your town to another town 500 miles away. Your shipment must arrive within three days. Explain in writing…”. And Nuclear Science “Obtain a sample of irradiated and non-irradiated foods. Prepare the two foods and compare their taste and texture.”", + "completion_text": "This badge will distinguish your camp from others. Surprise the world with an amazing creation.", + "cover": "summercamp/day_5.png", + "difficulty": 1, + "startAt": 4, + "start_date": "2015-10-07 06:00:00", + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "Set the `background` color to `black`", + "solution": "background black" + }, + { + "hint": "Set the `color` of your badge to `lightblue`", + "solution": "color lightblue" + }, + { + "hint": "Set the stroke for the first circle - **type** `stroke red, 20`", + "solution": "stroke red, 20" + }, + { + "hint": "Draw a `circle` with a size of `200`", + "solution": "circle 200" + }, + { + "hint": "Set the stroke for the second circle - **type** `stroke yellow, 20`", + "solution": "stroke yellow, 20" + }, + { + "hint": "Draw a `circle` with a size of `190`", + "solution": "circle 190" + }, + { + "hint": "Set the `stroke` for the third circle to `purple` color and size `20`", + "solution": "stroke purple, 20" + }, + { + "hint": "Draw a `circle` with a size of `180`", + "solution": "circle 180" + }, + { + "hint": "Add some decoration inside. Set the `color` to `green`", + "solution": "color green" + }, + { + "hint": "An arc is part of a cirlce, draw one that matches the inner circle - **type** `arc 180, 1, 2`", + "solution": "arc 180, 1, 2" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/camp_sign.json b/lib/challenges/locales/ja/worlds/summercamp/camp_sign.json new file mode 100644 index 000000000..7b952989f --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/camp_sign.json @@ -0,0 +1,87 @@ +{ + "id": "camp_sign", + "title": "Your Summer Camp sign", + "short_title": "Camp Sign", + "description": "Welcome to your first day! Before you set out from the lodge, your campsite sign needs a design. Be creative! Use a crazy color scheme, or show what you want to do at camp. \nIn the Pacific Northwest of the United States, indigenous peoples carved Totem Poles to tell the stories of their families and cultures. These beautiful sculptures are carved into trees and often feature characters and events from legends. You can search the internet for images of Totem Poles for inspiration.", + "icon_class": "challenge_campsign", + "cover": "summercamp/day_1.png", + "completion_text": "Well done! Now give your camp its own name and style. Change your camp name on line 18, or the color of the sign on line 3... why not add a nice background and some extra decorations? All those tool icons on the left can help you get started.", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "It's a sunny day! Set the background color to blue - **type** `background blue`", + "solution": "background blue" + }, + { + "hint": "Let's move the cursor over to the place on the screen where we want to start drawing our sign.\n\nPress ENTER to add the next instruction, and - **type** `moveTo 100, 150`", + "solution": "moveTo 100, 150" + }, + { + "hint": "In Make Art we draw shapes using digital pens. Before we draw the next shape, we need to choose the pen we want to use to fill the inside of the shape. Let's select a brown pen by setting the color to lightbrown.\n\n In a new line **type** `color lightbrown`", + "solution": "color lightbrown" + }, + { + "hint": "When we draw a shape we can control how thick the line is that the pen leaves behind on the outside of the shape. This line is called the **stroke**.\n\n Press enter and then set the stroke to 0, to avoid drawing lines - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Now that we have our pen all set up, we can get started on the sign!\n\nDraw the main billboard with a rectangle - **type** `rectangle 300, 200`", + "solution": "rectangle 300, 200" + }, + { + "hint": "Let's draw a shadow. Set the color to brown first - **type** `color brown`", + "solution": "color brown" + }, + { + "hint": "Draw a thin shadow with a rectangle - **type** `rectangle 300, 5`", + "solution": "rectangle 300, 5" + }, + { + "hint": "That sign looks too clean. We need to draw some imperfections.\n\nMove the cursor to place one on the left side of the sign- **type** `moveTo 100, 220`", + "solution": "moveTo 100, 220" + }, + { + "hint": "Our imperfection will be a triangle. First we need to set the `color` to `blue` to match the background.", + "solution": "color blue" + }, + { + "hint": "Set the stroke to be size 5 and brown (to match the sign). You can do both these things in one command - **type** `stroke brown, 5`", + "solution": "stroke brown, 5" + }, + { + "hint": "Now we will use the `polygon` command to draw a triangular imperfection. To create it, we need to list out the positions of the two other corners - **type** `polygon 16, 10, 0, 11`", + "solution": "polygon 16, 10, 0, 11" + }, + { + "hint": "The sign needs a post. Move the cursor to where we will draw it - **type** `moveTo 230, 350`", + "solution": "moveTo 230, 350" + }, + { + "hint": "Set the color of the post to brown - **type** `color brown` ", + "solution": "color brown" + }, + { + "hint": "Set the stroke to 0, again - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Now that we have the colors sorted, draw the post with a rectangle - **type** `rectangle 40, 150`", + "solution": "rectangle 40, 150" + }, + { + "hint": "We need some text in that sign. Move the cursor to place the text - **type** `moveTo 250, 270`", + "solution": "moveTo 250, 270" + }, + { + "hint": "Next we need to choose our font. There are lots to choose from, like `Bariol`, `Georgia`, `Comic Sans MS`, `cursive`, and `Courier`.\n\nPick your favorite and type it in (inside of quote marks) like this - `font 'Bariol', 70`.", + "solution": "font 'Bariol', 70" + }, + { + "hint": "Now write some silly text - **type** `text 'My Camp'`", + "solution": "text 'My Camp'" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/campfire.json b/lib/challenges/locales/ja/worlds/summercamp/campfire.json new file mode 100644 index 000000000..3b311f9ec --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/campfire.json @@ -0,0 +1,90 @@ +{ + "id": "campfire", + "title": "Campfire", + "short_title": "Campfire", + "description": "Time to get a fire going. In the wilderness, this very well might be your only source of light, and heat. Burning at over a thousand degrees fahrenheit, this will be sure to keep you warm, and could keep you fed too! Meats, vegetables, and marshmallows can all be cooked over the open flame with the help of sharpened sticks. \nMost fires are built with wood logs, but yours is going to be built with code and a “loop.” As your fire grows upwards its colour changes into a deep shade of orange as the oxygen it is burning starts to cools down. Your code will produce hundreds of colours with just a few lines of code.", + "icon_class": "challenge_fire", + "completion_text": "Try adding a starry sky, more flames, a ring of rocks to make it safer or even marshmallows!", + "difficulty": 2, + "cover": "summercamp/day_6.png", + "startAt": 5, + "summerCamp": true, + "rewards": { + "wallpaper": 1 + }, + "steps": [ + { + "hint": "It's a dark night. Set the `background` color to `darkblue`", + "solution": "background darkblue" + }, + { + "hint": "Set the stroke to 0, to avoid drawing lines - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Move the cursor to place the floor - **type** `moveTo 0, 300`", + "solution": "moveTo 0, 300" + }, + { + "hint": "Set the `color` to `darkgreen`", + "solution": "color darkgreen" + }, + { + "hint": "Draw the grass using a rectangle - **type** `rectangle 500, 200`", + "solution": "rectangle 500, 200" + }, + { + "hint": "Move the cursor to place the light casted by the fire - **type** `moveTo 250, 400`", + "solution": "moveTo 250, 400" + }, + { + "hint": "Set the `color` to `green`", + "solution": "color green" + }, + { + "hint": "Draw the light using an ellipse - **type** `ellipse 200, 30`", + "solution": "ellipse 200, 30" + }, + { + "hint": "We need some wood to feed the fire - **type** `moveTo 110, 390`", + "solution": "moveTo 110, 390" + }, + { + "hint": "Set the stroke for the logs - **type** `stroke brown, 25`", + "solution": "stroke brown, 25" + }, + { + "hint": "Good, now draw the first log - **type** `line 270, 30`", + "solution": "line 270, 30" + }, + { + "hint": "Move the cursor to place the second log - **type** `moveTo 420, 390`", + "solution": "moveTo 420, 390" + }, + { + "hint": "Draw the second log - **type** `line -290, 30`", + "solution": "line -290, 30" + }, + { + "hint": "Excellent! We are now ready to light the fire - **type** `moveTo 180, 400`", + "solution": "moveTo 180, 400" + }, + { + "hint": "Our fire will be formed by 150 lines! - **type** `for i in [ 1 .. 150 ]`", + "solution": "for i in [ 1 .. 150 ]" + }, + { + "hint": "Set the thickness and color of each line - **type** `stroke 'rgba(255, ' + (i + 50) + ', 0, 0.3)', 10`", + "solution": " stroke 'rgba(255, ' + (i + 50) + ', 0, 0.3)', 10", + "validate": "__^ stroke 'rgba*\\(255, ' \\+ \\(i *\\+ *50\\) *\\+ *', *0, *0.3\\)', 10" + }, + { + "hint": "Now draw the line - **type** `line 150 - i`", + "solution": " line 150 - i" + }, + { + "hint": "Move the cursor for next line - **type** `move 0.5, -2`", + "solution": " move 0.5, -2" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/campsite.json b/lib/challenges/locales/ja/worlds/summercamp/campsite.json new file mode 100644 index 000000000..abce584fa --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/campsite.json @@ -0,0 +1,97 @@ +{ + "id": "campsite", + "title": "Draw your Campsite", + "short_title": "Campsite", + "description": "Time to find a clearing to set up camp. The most important thing to look for when searching for an optimal campsite is flat ground. If possible, keep your campsite close to a water source. This will make cooking and cleanup much easier. Finally, make sure to be surrounded by trees, as they are a great source of kindling and will provide protection from the sun. \nYour friends will want to see what your campsite looks like, so once you have one, draw it! You can use code to set the scene for where you are staying for the next two weeks.", + "icon_class": "challenge_location", + "completion_text": "The camp site is looking great! Try adding more trees, flowers, rocks... perhaps a fence as well?", + "cover": "summercamp/day_2.png", + "difficulty": 1, + "startAt": 1, + "summerCamp": true, + "rewards": { + "outfit": 1 + }, + "steps": [ + { + "hint": "Today is a beautiful day - **type** `background blue`", + "solution": "background blue" + }, + { + "hint": "Set the stroke to 0, to avoid drawing lines - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Move the cursor where the sun will be - **type** `moveTo 400, 50`", + "solution": "moveTo 400, 50" + }, + { + "hint": "Set the `color` of the sun `yellow`", + "solution": "color yellow" + }, + { + "hint": "Draw the sun with a circle - **type** `circle 40`", + "solution": "circle 40" + }, + { + "hint": "There is one cloud in the horizon. - **type** `moveTo 440, 80`", + "solution": "moveTo 440, 80" + }, + { + "hint": "Set the `color` of the cloud `white`", + "solution": "color white" + }, + { + "hint": "Draw the cloud with an ellipse - **type** `ellipse 60, 20`", + "solution": "ellipse 60, 20" + }, + { + "hint": "The lake has a beautiful `color` `aquamarine` this morning", + "solution": "color aquamarine" + }, + { + "hint": "Move the cursor where the lake is - **type** `moveTo 0, 190`", + "solution": "moveTo 0, 190" + }, + { + "hint": "Draw the lake using a simple rectangle - **type** `rectangle 500, 310`", + "solution": "rectangle 500, 310" + }, + { + "hint": "Set the `color` to `green` for the grass", + "solution": "color green" + }, + { + "hint": "Move the cursor before drawing the grass - **type** `moveTo 250, 700`", + "solution": "moveTo 250, 700" + }, + { + "hint": "Draw the camp site with a circle - **type** `circle 500`", + "solution": "circle 500" + }, + { + "hint": "Looking a bit empty, let's draw a tree - **type** `moveTo 120, 300`", + "solution": "moveTo 120, 300" + }, + { + "hint": "Set the `color` of the trunk to `brown`", + "solution": "color brown" + }, + { + "hint": "Draw the trunk of the tree using a rectangle - **type** `rectangle 15, 100`", + "solution": "rectangle 15, 100" + }, + { + "hint": "Now place the foliage of the tree - **type** `move 8, -120`", + "solution": "move 8, -120" + }, + { + "hint": "Set the `color` to `darkgreen`", + "solution": "color darkgreen" + }, + { + "hint": "Draw the foliage with a triangle using `polygon` - **type** `polygon -40, 160, 40, 160`", + "solution": "polygon -40, 160, 40, 160" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/cinema.json b/lib/challenges/locales/ja/worlds/summercamp/cinema.json new file mode 100644 index 000000000..4393cb316 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/cinema.json @@ -0,0 +1,117 @@ +{ + "id": "cinema", + "title": "Relax watching a movie", + "short_title": "Cinema", + "icon_class": "challenge_cinema", + "description": "After playing a short movie presentation by the Skladanowsky brothers in 1895 which consisted of numerous very short 6-second films accompanied by a specially composed piece of music, the Berlin Wintergarten theatre in Mitte, Berlin, became known as the first ever movie theatre. Unfortunately the theatre was destroyed by bombs in 1944, during the Second World War.", + "cover": "summercamp/day_14.png", + "completion_text": "What good is a cinema without a movie playing? Go ahead and try drawing a scene from your favourite movie up on the big screen, and maybe a few friends to watch the film with you! Don't forget the popcorn!", + "difficulty": 2, + "startAt": 0, + "summerCamp": true, + "rewards": { + "wallpaper": 1 + }, + "steps": [ + { + "hint": "It's dark in the cinema. Set the `background` color to `black`", + "solution": "background black" + }, + { + "hint": "Set the `stroke` to `0` in a new line", + "solution": "stroke 0" + }, + { + "hint": "First, move the cursor to place the floor - **type** `moveTo 0, 300`", + "solution": "moveTo 0, 300" + }, + { + "hint": "Set the floor `color` to `gray`", + "solution": "color gray" + }, + { + "hint": "Draw the floor with a rectangle - **type** `rectangle 500, 200`", + "solution": "rectangle 500, 200" + }, + { + "hint": "Now, move the cursor to place the screen - **type** `moveTo 50, 20`", + "solution": "moveTo 50, 20" + }, + { + "hint": "Set the screen `color` to `white`", + "solution": "color white" + }, + { + "hint": "The screen is a perfect `rectangle` of size `400` by `250`", + "solution": "rectangle 400, 250" + }, + { + "hint": "Amazing! This theatre needs a curtain - **type** `moveTo 0`", + "solution": "moveTo 0" + }, + { + "hint": "Set the curtain `color` to `red`", + "solution": "color red" + }, + { + "hint": "Draw a vertical curtain as a `rectangle` of size `30` by `330`", + "solution": "rectangle 30, 330" + }, + { + "hint": "Now draw an horizontal curtain size `500` by `10` in the same way", + "solution": "rectangle 500, 10" + }, + { + "hint": "Looking great! Place the curtain on the right - **type** `move 470`", + "solution": "move 470" + }, + { + "hint": "Draw a vertical curtain, same as the one the left", + "solution": "rectangle 30, 330" + }, + { + "hint": "This theatre needs some seats for our audience - **type** `moveTo 0, 360`", + "solution": "moveTo 0, 360" + }, + { + "hint": "Set the outline of the seats with a `stroke` of `orangered` color and size `10`.", + "solution": "stroke orangered, 10" + }, + { + "hint": "Let's draw 3 rows and 6 columns of seats with a loop - **type** `for x in [ 1 .. 3 ]`", + "solution": "for x in [ 1 .. 3 ]" + }, + { + "hint": "Set the `color` of the seats to `red`", + "solution": " color red" + }, + { + "hint": "Now draw a `rectangle` for the seats, size `500` by `40`", + "solution": " rectangle 500, 40" + }, + { + "hint": "Move the cursor down to place the back of the seats - **type** `move 0, 50`", + "solution": " move 0, 50" + }, + { + "hint": "Inside the loop, open a second loop for the back of the seats - **type** `for y in [ 1 .. 6 ]`", + "solution": " for y in [ 1 .. 6 ]" + }, + { + "hint": "Set the `color` of the backseat to `darkred`", + "solution": " color darkred" + }, + { + "hint": "Brilliant! Almost there. Now draw the back of the seat with an arc - **type** `arc 60, 0, 1`", + "solution": " arc 60, 0, 1" + }, + { + "hint": "Now separate the seats `130` pixels to the right", + "solution": " move 130" + }, + { + "hint": "Last, make sure new rows are positioned correctly - Press **Enter**, then **Backspace** and **type** `move -800` inside the **first** loop", + "solution": " move -800" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/compass.json b/lib/challenges/locales/ja/worlds/summercamp/compass.json new file mode 100644 index 000000000..4732d0453 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/compass.json @@ -0,0 +1,93 @@ +{ + "id": "compass", + "title": "A compass is an essential tool", + "short_title": "Compass", + "icon_class": "challenge_compass", + "description": "Essentially a compass is a magnet, generally a magnetized needle. Since opposites attract the southern pole of the needle is attracted to the Earth's natural magnetic north pole. Did you know that you can create your own simply with a paperclip, cork and a magnet?", + "cover": "summercamp/day_9.png", + "completion_text": "Now try adding the rest of the 'compass rose' components: the other cardinal directions (E, S, W and even NE, NW, SE and SW). Why not a hand holding it?", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": { + "wallpaper": 1 + }, + "steps": [ + { + "hint": "Select `lightgray` for the `background`", + "solution": "background lightgray" + }, + { + "hint": "In a new line, set the outline of your compass with a `stroke` of `gold` color and size `20`", + "solution": "stroke gold, 20" + }, + { + "hint": "Set the `color` of the compass to `gray`", + "solution": "color gray" + }, + { + "hint": "Your compass is a `circle` with size `110`", + "solution": "circle 110" + }, + { + "hint": "Set the `color` to `darkgray` for the second half of the compass", + "solution": "color darkgray" + }, + { + "hint": "Set the `stroke` back to `0`", + "solution": "stroke 0" + }, + { + "hint": "Draw an arc that matches the top half of the compass - **type** `arc 105, 2, 1`", + "solution": "arc 105, 2, 1" + }, + { + "hint": "We need to mark the north somehow - in a new line **type** `moveTo 250, 175`", + "solution": "moveTo 250, 175" + }, + { + "hint": "Set the `color` to `gold`", + "solution": "color gold" + }, + { + "hint": "Set the `font` to `'cursive'` and size `25`", + "solution": "font 'cursive', 25" + }, + { + "hint": "Write an N to represent north - **type** `text 'N'`", + "solution": "text 'N'" + }, + { + "hint": "Now we need a needle with 2 sides. Set the `color` to `red` for the first side", + "solution": "color red" + }, + { + "hint": "Move the cursor to position the needle **type** `moveTo 230, 250`", + "solution": "moveTo 230, 250" + }, + { + "hint": "Draw a triangle with a polygon - **type** `polygon 20, -90, 40, 0`", + "solution": "polygon 20, -90, 40, 0" + }, + { + "hint": "Excellent! Set the `color` to `white` for the second side of the needle", + "solution": "color white" + }, + { + "hint": "Draw the second part - **type** `polygon 20, 90, 40, 0`", + "solution": "polygon 20, 90, 40, 0" + }, + { + "hint": "Finish it with one last detail. Set the `color` to `gold`", + "solution": "color gold" + }, + { + "hint": "Move the cursor to the center of the compass **type** `move 20`", + "solution": "move 20" + }, + { + "hint": "Draw a `circle` of size `20`", + "solution": "circle 20" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/fireworks.json b/lib/challenges/locales/ja/worlds/summercamp/fireworks.json new file mode 100644 index 000000000..ae830ff5e --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/fireworks.json @@ -0,0 +1,50 @@ +{ + "id": "fireworks", + "title": "Fireworks", + "short_title": "Fireworks", + "icon_class": "challenge_fireworks", + "description": "Camp is almost all wrapped up, and to celebrate we have fireworks! Fireworks have been around for centuries and are believed to have been invented by the Chinese. We are almost ready to put on the show, but need a little bit of help designing the fireworks. Can you give it a shot?", + "cover": "summercamp/day_21.png", + "completion_text": "Well done! You made a function that can draw fireworks! Can you improve upon it? Draw them all over the screen, add in other creations and share it!", + "difficulty": 3, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "The sun is down and the moon is new, let’s make the sky dark with `background black`", + "solution": "background black" + }, + { + "hint": "Lets set the `stroke` to `red` for our firework", + "solution": "stroke red" + }, + { + "hint": "We want to draw 60 lines radiating outward, so let’s use a for loop `for i in [0 ... 60]`", + "solution": "for i in [0 ... 60]" + }, + { + "hint": "All of the lines in our firework should have different lengths! So for each line radiating out, let’s set its length with `length = random 1, 200`.", + "solution": " length = random 1, 200" + }, + { + "hint": "For each loop, we are drawing a new line radiating out. So for every time we loop, the angle of the line should change. This uses some advanced math, but don’t fear. Just **type** `angle = (360 / 60 * i) * (Math.PI / 180)`.", + "solution": " angle = (360 / 60 * i) * (Math.PI / 180)", + "validate": "__^ angle *= *\\(360 */ *60 \\* i\\) *\\* *\\(Math[.]PI */ *180\\) *$" + }, + { + "hint": "Using this new angle and the random length let’s calculate where the x coordinate for the end of the radiating line should be. **Type** `dx = 250 + Math.sin(angle) * length`.", + "solution": " dx = 250 + Math.sin(angle) * length", + "validate": "__^ dx *= *250 *\\+ *Math.sin\\(angle\\) *\\* *length" + }, + { + "hint": "Now let’s calculate the y coordinate for the end of the radiating line. **Type** `dy = 250 + Math.cos(angle) * length`.", + "solution": " dy = 250 + Math.cos(angle) * length", + "validate": "__^ dy *= *250 *\\+ *Math.cos\\(angle\\) *\\* *length" + }, + { + "hint": "Finally, with all the coordinates set we are ready to draw the line. **Type** `lineTo dx, dy` ", + "solution": " lineTo dx, dy" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/fishing.json b/lib/challenges/locales/ja/worlds/summercamp/fishing.json new file mode 100644 index 000000000..1ddb8f591 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/fishing.json @@ -0,0 +1,107 @@ +{ + "id": "fishing", + "title": "Fishing", + "short_title": "Fishing", + "icon_class": "challenge_fishing", + "description": "It's time to go fishing! Inside the camp's lake there are trout, catfish, and perch swimming around looking for a snack. Grab your fishing pole and some worms, and head over to the water for todays adventure. ", + "cover": "summercamp/day_17.png", + "completion_text": "Great job! Every time you press a key the image redraws, so try holding down the space bar and watch the waves ripple. Also try adding a fish or making the bobber disappear.", + "difficulty": 2, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "It's a sunny day! Set the background color to lightblue - **type** `background lightblue`", + "solution": "background lightblue" + }, + { + "hint": "We will start by drawing the waves. We want to draw without a fill - set the `color` to be `null`.", + "solution": "color null" + }, + { + "hint": "Our waves will be dark blue - **type** `stroke darkblue, 8`", + "solution": "stroke darkblue, 8" + }, + { + "hint": "Move to the place on the left where we will start - **type** `moveTo 10, 250`", + "solution": "moveTo 10, 250" + }, + { + "hint": "We are going to draw waves on the surface by creating 25 waves inside of a loop - **type** `for i in [1 .. 25]`", + "solution": "for i in [1 .. 25]" + }, + { + "hint": "Create a wave out of an arc with a radius of 20 pixels - **type** `arc 20, 0.8, 0.2`", + "solution": " arc 20, 0.8, 0.2" + }, + { + "hint": "Move each wave a random amount to the left - **type** `move (random 24, 32)`", + "solution": " move (random 24, 32)" + }, + { + "hint": "Press ENTER and then backspace to get rid of the indent. This exits the loop.\n\nNext move to the place where we will draw the rest of the water - **type** `moveTo 0, 270`.", + "solution": "moveTo 0, 270" + }, + { + "hint": "Set the `color` of the water to be the same as the wave", + "solution": "color darkblue" + }, + { + "hint": "Draw a big `rectangle` that is `500` pixels high and `250` pixels wide for the water", + "solution": "rectangle 500, 250" + }, + { + "hint": "Let's get ready to add some little blue waves - **type** `stroke blue, 2`", + "solution": "stroke blue, 2" + }, + { + "hint": "We are going to draw waves 100 times - **type** `for i in [1 .. 100]`", + "solution": "for i in [1 .. 100]" + }, + { + "hint": "Move each wave to a random place on the surface of the water - **type** `moveTo (random 0, 500), (random 260, 500)`", + "solution": " moveTo (random 0, 500), (random 260, 500)" + }, + { + "hint": "Now draw each ripple as a little arc - **type** `arc 10, 0.8, 0.2`", + "solution": " arc 10, 0.8, 0.2" + }, + { + "hint": "Brilliant! When you press the spacebar, a new set of random numbers is selected and the ripples move!\n\nTo catch some fish we need a brown fishing pole - Exit the loop and **type** `stroke brown, 10`.", + "solution": "stroke brown, 10" + }, + { + "hint": "Now move to the place where we will draw the end of the pole - **type** `moveTo 300, 100`", + "solution": "moveTo 300, 100" + }, + { + "hint": "Draw a `line` that is `150` pixels wide and `400` pixels tall", + "solution": "line 150, 400" + }, + { + "hint": "Next we need some fishing line - **type** `stroke lightgray, 1`", + "solution": "stroke lightgray, 1" + }, + { + "hint": "Draw a line that goes to the left and down - **type** `line -100, 200`", + "solution": "line -100, 200" + }, + { + "hint": "To see if a fish is biting we are going to draw a cork. Move to the end of the fishing line - **type** `move -100, (random 197, 202)`", + "solution": "move -100, (random 197, 202)" + }, + { + "hint": "The cork doesn't have an outline - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Set the cork's `color` to `red`", + "solution": "color red" + }, + { + "hint": "Now draw the cork floating in the water - `arc 8, 0, 1`", + "solution": "arc 8, 0, 1" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/flag.json b/lib/challenges/locales/ja/worlds/summercamp/flag.json new file mode 100644 index 000000000..ea40cbe69 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/flag.json @@ -0,0 +1,77 @@ +{ + "id": "flag", + "title": "Create your Flag", + "short_title": "Flag", + "description": "Time to show your true colors. Your campsite is shaping up, and as the campsite’s leader you need to make a flag. We’ve got you started with the basics for a flag and flagpole, but it is up to you to to make it your own. \nYou can look to other flags for inspiration. Countries like France, Nigeria, Sweden, and Switzerland all have very simple color and shape designs, while Spain, Brazil, Kenya, and Saudi Arabia all feature complex designs. When you are done, share your flag to lay claim to your little bit of land!", + "icon_class": "challenge_flag", + "completion_text": "You have a white canvas in front of you, use it wisely. Create the most amazing flag the world has ever seen!", + "cover": "summercamp/day_4.png", + "difficulty": 1, + "startAt": 3, + "summerCamp": true, + "rewards": { + "outfit": 1 + }, + "steps": [ + { + "hint": "Draw the sky where the flag will flutter - **type** `background blue`", + "solution": "background blue" + }, + { + "hint": "Set the stroke to 0, to avoid drawing lines - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Let's move the cursor to place our flagpole in the correct place - **type** `moveTo 100, 100`", + "solution": "moveTo 100, 100" + }, + { + "hint": "Set the `color` of the flagpole to `darkgray`", + "solution": "color darkgray" + }, + { + "hint": "Draw a long, thin pole with a rectangle - **type** `rectangle 10, 400`", + "solution": "rectangle 10, 400" + }, + { + "hint": "Move the cursor to place a ball on top-centre of the flagpole - **type** `move 5`", + "solution": "move 5" + }, + { + "hint": "Set the `color` of the ornament to `gold`", + "solution": "color gold" + }, + { + "hint": "Draw a circle with a size of 8 - in a new line **type** `circle 8`", + "solution": "circle 8" + }, + { + "hint": "Now move the cursor to start drawing our flag - **type** `moveTo 115, 123`", + "solution": "moveTo 115, 123" + }, + { + "hint": "Set the `color` of the flag to `white`", + "solution": "color white" + }, + { + "hint": "Draw the flag with a `rectangle` of size `261` and `171`", + "solution": "rectangle 261, 171" + }, + { + "hint": "That flag needs something to hold of to - **type** `moveTo 100, 140`", + "solution": "moveTo 100, 140" + }, + { + "hint": "Set the `color` of the holder to `brown`", + "solution": "color brown" + }, + { + "hint": "Draw the holder with a `20` by `5` `rectangle`", + "solution": "rectangle 20, 5" + }, + { + "hint": "Now is your turn! Draw an amazing pattern on it - **type** `moveTo 120, 125`", + "solution": "moveTo 120, 125" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/flashlight.json b/lib/challenges/locales/ja/worlds/summercamp/flashlight.json new file mode 100644 index 000000000..a5a6781ce --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/flashlight.json @@ -0,0 +1,93 @@ +{ + "id": "flashlight", + "title": "Lights on!", + "short_title": "Flashlight", + "icon_class": "challenge_flashlight", + "description": "Torches started life as ignited sticks; their flames would light the way for explorers and settlers. With the advent of electricity, and the invention of the dry cell battery in 1887, the road was paved to use incandescent bulbs as a replacement. While the technology inside flashlights has evolved, they are still as useful as ever. Meanwhile, the original torch has found a second coming in circus acts where they are thrown skywards in miraculous fashion.", + "cover": "summercamp/day_12.png", + "completion_text": "You are an adventurer in the dark with your torch. What might you have uncovered as its light passes over the room? Try drawing that fox that you’ve unearthed or that owl hooting in the trees.", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": { + "outfit": 1 + }, + "steps": [ + { + "hint": "It's getting dark outside! Set the `background` color to `darkblue`", + "solution": "background darkblue" + }, + { + "hint": "Set the `stroke` to `0`, we won't need it for this challenge", + "solution": "stroke 0" + }, + { + "hint": "Move the cursor to place our flashlight - **type** `moveTo 200, 200`", + "solution": "moveTo 200, 200" + }, + { + "hint": "Set the `color` of the flashlight to `dimgray`", + "solution": "color dimgray" + }, + { + "hint": "Draw the head of the flashlight with a rectangle - **type** `rectangle 100, 50`", + "solution": "rectangle 100, 50" + }, + { + "hint": "Now move the cursor down to draw the neck - **type** `move 0, 50`", + "solution": "move 0, 50" + }, + { + "hint": "Set the `color` of this piece to `gray`", + "solution": "color gray" + }, + { + "hint": "Draw a polygon - **type** `polygon 20, 40, 80, 40, 100, 0`", + "solution": "polygon 20, 40, 80, 40, 100, 0" + }, + { + "hint": "Exciting! Now move the cursor down to draw the body - **type** `move 20, 40`", + "solution": "move 20, 40" + }, + { + "hint": "Set the `color` of the body to `darkgray`", + "solution": "color darkgray" + }, + { + "hint": "Draw the body of the flashlight with a `rectangle` `60` by `200`", + "solution": "rectangle 60, 200" + }, + { + "hint": "The only thing missing now is a ON/OFF button. Set the `color` to `dimgray`", + "solution": "color dimgray" + }, + { + "hint": "Now move the cursor down to place the button - **type** `move 30, 50`", + "solution": "move 30, 50" + }, + { + "hint": "Draw an ellipse where the button will be located - **type** `ellipse 10, 30`", + "solution": "ellipse 10, 30" + }, + { + "hint": "Set the `color` of the button to `red`", + "solution": "color red" + }, + { + "hint": "Draw the button with an ellipse - **type** `ellipse 10, 20`", + "solution": "ellipse 10, 20" + }, + { + "hint": "You have turned on the light! Set the color of the beam - **type** `color \"rgba(255, 255, 0, 0.8)\"`", + "solution": "color \"rgba(255, 255, 0, 0.8)\"" + }, + { + "hint": "Place the beam in front of the flashlight - **type** `move -50, -140`", + "solution": "move -50, -140" + }, + { + "hint": "Draw the beam of light with a polygon - **type** `polygon 100, 0, 180, -300, -80, -300`", + "solution": "polygon 100, 0, 180, -300, -80, -300" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/foraging.json b/lib/challenges/locales/ja/worlds/summercamp/foraging.json new file mode 100644 index 000000000..2d2add721 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/foraging.json @@ -0,0 +1,57 @@ +{ + "id": "foraging", + "title": "Foraging", + "short_title": "Foraging", + "icon_class": "challenge_foraging", + "description": "The wild is full of plants and fauna to eat. From stinging nettles, to mushrooms, and a multitude of berries, any meal can be improved with naturally growing foods. Berries are common in many parts of the world, and at Camp Kano they run wild even though they are hard to find. You might need to use your coding skills to find them.", + "cover": "summercamp/day_19.png", + "completion_text": "But wait! Where are the berries you are meant to be foraging for? Use `color red`, `moveTo`, and `square 25` to add some extra berries to the scene!", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": { + "wallpaper": 1 + }, + "steps": [ + { + "hint": "Set `stroke` to `0`", + "solution": "stroke 0" + }, + { + "hint": "It’s a bright sunny day! Set `background` to `blue`.", + "solution": "background blue" + }, + { + "hint": "Our foraging scene needs a grass field to start with. Set our drawing color to `green`.", + "solution": "color green" + }, + { + "hint": "We want our grass on the bottom half of the screen, so let’s move into position with `moveTo 0, 300`", + "solution": "moveTo 0, 300" + }, + { + "hint": "The grass is a nice big `rectangle` of size `500, 200`", + "solution": "rectangle 500, 200" + }, + { + "hint": "Now let’s add in a nice boxy tree to our foraging scene. Begin by moving into position at exactly `50, 100`.", + "solution": "moveTo 50, 100" + }, + { + "hint": "Our leaves are drawn with `square 150`.", + "solution": "square 150" + }, + { + "hint": "Next we need to draw the trunk. Move the cursor with `moveTo 100, 250`.", + "solution": "moveTo 100, 250" + }, + { + "hint": "Our wood has a nice `darkbrown` color. Set that as the drawing color.", + "solution": "color darkbrown" + }, + { + "hint": "The trunk is a `rectangle` with a width of `40` and a height of `150`", + "solution": "rectangle 40, 150" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/ghost.json b/lib/challenges/locales/ja/worlds/summercamp/ghost.json new file mode 100644 index 000000000..7e6b445b3 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/ghost.json @@ -0,0 +1,91 @@ +{ + "id": "ghost", + "title": "Ghost gathering", + "short_title": "Ghost", + "description": "Boo! As night falls, the spirits come out to play. A recent poll reported 87% of Chinese office workers believed in ghosts, and according to another report, 25% of Britons say they have seen a ghost. It’s getting dark, so it is hard to see, but we think we found a ghost! Maybe you can find out if it is friendly or not with your creative coding powers.", + "icon_class": "challenge_ghost", + "completion_text": "Spooky! Can you make the ghost scarier? Maybe if it could say \"Boo!\"...", + "difficulty": 2, + "cover": "summercamp/day_7.png", + "startAt": 6, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "Select a spooky color for the background - **type** `background darkpurple`", + "solution": "background darkpurple" + }, + { + "hint": "Set the `stroke` to `0`, to avoid drawing lines", + "solution": "stroke 0" + }, + { + "hint": "Set the `color` to `white` for the ghost", + "solution": "color white" + }, + { + "hint": "Now draw an ellipse for the ghost's body - **type** `ellipse 120, 140`", + "solution": "ellipse 120, 140" + }, + { + "hint": "Set the `color` to `black` for the eyes", + "solution": "color black" + }, + { + "hint": "Move the cursor to draw the first eye - **type** `move -40, -50`", + "solution": "move -40, -50" + }, + { + "hint": "Draw the eye with an ellipse - **type** `ellipse 20, 30`", + "solution": "ellipse 20, 30" + }, + { + "hint": "Set the `color` to `lightgray`", + "solution": "color lightgray" + }, + { + "hint": "Now draw a `circle` with a size of `5`", + "solution": "circle 5" + }, + { + "hint": "Looking good! Now move the cursor to the right for the second eye - **type** `move 30`", + "solution": "move 30" + }, + { + "hint": "Set the `color` back to `black` for the second eye", + "solution": "color black" + }, + { + "hint": "Draw the second eye with an ellipse - **type** `ellipse 20, 30`", + "solution": "ellipse 20, 30" + }, + { + "hint": "Set the `color` to `lightgray`", + "solution": "color lightgray" + }, + { + "hint": "Draw a `circle` with size `5`", + "solution": "circle 5" + }, + { + "hint": "Almost there! Set the `color` to `white`", + "solution": "color white" + }, + { + "hint": "Now move the cursor to the bottom - **type** `move -80, 150`", + "solution": "move -80, 150" + }, + { + "hint": "Let's open a loop - **type** `for i in [ 1 .. 5 ]`", + "solution": "for i in [ 1 .. 5 ]" + }, + { + "hint": "Draw a `circle` with a size of `45`", + "solution": " circle 45" + }, + { + "hint": "And move the cursor slightly to the right - **type** `move 45`", + "solution": " move 45" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/guitar.json b/lib/challenges/locales/ja/worlds/summercamp/guitar.json new file mode 100644 index 000000000..a57697b83 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/guitar.json @@ -0,0 +1,127 @@ +{ + "id": "guitar", + "title": "Play a nice sweet song", + "short_title": "Guitar", + "icon_class": "challenge_guitar", + "description": "Did you know the oldest surviving guitar-like instrument is actually around 3,500 years old? It is a 3-string instrument with a plectrum suspended from the neck, it was owned by an Egyptian singer called Har-Mose and was buried alongside him - You can still see the instrument on display at the Archaeological Museum in Cairo, Egypt.", + "cover": "summercamp/day_13.png", + "completion_text": "What good is a guitar if we don't have a campfire to sing songs around? Try drawing a nice big campfire with some marshmallows for toasting! Maybe a big moon on the horizon too? Be wild, be creative!", + "difficulty": 2, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "It's a very nice night! Set the background color to darkblue - **type** `background darkblue`", + "solution": "background darkblue" + }, + { + "hint": "Set the `stroke` to `0` in a new line.", + "solution": "stroke 0" + }, + { + "hint": "Set your guitar `color` to `lightbrown`.", + "solution": "color lightbrown" + }, + { + "hint": "Move the cursor to place the guitar - **type** `moveTo 120, 250`", + "solution": "moveTo 120, 250" + }, + { + "hint": "Draw the first part of the body with an ellipse - **type** `ellipse 60, 65`", + "solution": "ellipse 60, 65" + }, + { + "hint": "Now for the second part of the body, `move` the cursor `70` pixels to the right.", + "solution": "move 70" + }, + { + "hint": "Draw a `circle` of size `55` for the second part of the guitar.", + "solution": "circle 55" + }, + { + "hint": "Every guitar needs a neck, move the cursor to place it - **type** `move 20, -10`", + "solution": "move 20, -10" + }, + { + "hint": "Set the neck `color` to `brown`.", + "solution": "color brown" + }, + { + "hint": "Draw the neck of the guitar with a rectangle - **type** `rectangle 150, 20`", + "solution": "rectangle 150, 20" + }, + { + "hint": "Now place the headstock - **type** `move 150, -5`", + "solution": "move 150, -5" + }, + { + "hint": "Draw the headstock with a `rectangle` of size `40` by `30`.", + "solution": "rectangle 40, 30" + }, + { + "hint": "Time to place the soundhole in the body - **type** `move -170, 15`", + "solution": "move -170, 15" + }, + { + "hint": "Set the outline of the soundhole with a `stroke` of `brown` color and size `10`.", + "solution": "stroke brown, 10" + }, + { + "hint": "Set the soundhole `color` to `black`.", + "solution": "color black" + }, + { + "hint": "Draw the hole with a `circle` of size `20`.", + "solution": "circle 20" + }, + { + "hint": "The bridge is the piece that fixes the strings to the body. Let's place it - **type** `move -50, -15`", + "solution": "move -50, -15" + }, + { + "hint": "Set the outline of the bridge with a `stroke` of `red` color and size `10`.", + "solution": "stroke red, 10" + }, + { + "hint": "Draw the bridge with a `rectangle` of size `2` by `35`.", + "solution": "rectangle 2, 35" + }, + { + "hint": "That's a good looking guitar. Time for the strings - **type** `move 0, 9`", + "solution": "move 0, 9" + }, + { + "hint": "Set the properties of the strings with a `stroke` of `white` color and size `1`.", + "solution": "stroke white, 1" + }, + { + "hint": "Let's draw the 4 strings with a loop - **type** `for i in [ 1 .. 4 ]`", + "solution": "for i in [ 1 .. 4 ]" + }, + { + "hint": "Draw a string using a line - **type** `line 250`", + "solution": " line 250" + }, + { + "hint": "And move the cursor slightly down to place the next ones - **type** `move 0, 4`", + "solution": " move 0, 4" + }, + { + "hint": "Press **Enter** and **Backspace** to set the `color` to `white` outside the loop", + "solution": "color white" + }, + { + "hint": "You are ready to play music! Start a new loop - **type** `for i in [ 1 .. 10 ]`", + "solution": "for i in [ 1 .. 10 ]" + }, + { + "hint": "Select a random location - **type** `moveTo (random 200, 400), (random 100, 400)`", + "solution": " moveTo (random 200, 400), (random 100, 400)" + }, + { + "hint": "Come on, play some notes! - **copy and paste** `text '♪'`", + "solution": " text '♪'" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/hiking.json b/lib/challenges/locales/ja/worlds/summercamp/hiking.json new file mode 100644 index 000000000..b12407269 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/hiking.json @@ -0,0 +1,111 @@ +{ + "id": "hiking", + "title": "Hiking Poster", + "short_title": "Hiking", + "icon_class": "challenge_hiking", + "description": "The beautiful Camp Kano mountain range is known for its deep blue colour. The ten mountains in the range always seem to be changing position though, which makes for a dangerous climb. Should campers attempt to climb it? Who knows! But management wants an advertising posts so get to it.", + "cover": "summercamp/day_18.png", + "completion_text": "Well done, you’ve made a beautiful poster! Now play around with the random values and the text. What else is the poster missing?", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "Up above the clouds the sky is blue, **type** `background blue`", + "solution": "background blue" + }, + { + "hint": "Camp Kano’s mountains are a beautiful shade of dark blue. Set the drawing colour with `color darkblue`.", + "solution": "color darkblue" + }, + { + "hint": "The mountains also have a nice thick border, give them `stroke white, 10`", + "solution": "stroke white, 10" + }, + { + "hint": "Lets draw the ten mountains of Camp Kano with a loop! This will be much faster than drawing them individually. **Type** `for i in [ 0 ... 10 ]` to open the loop.", + "solution": "for i in [ 0 ... 10 ]" + }, + { + "hint": "For every time the loop runs, we want a mountain’s peak to be drawn randomly across the screen. Let’s select an x value with `x = random 0, 500`", + "solution": " x = random 0, 500" + }, + { + "hint": "However, for the y value, we only want each mountain’s peak to be drawn on the top part of the screen. **Type** `y = random 0, 200`", + "solution": " y = random 0, 200" + }, + { + "hint": "Now with our x and y values set we can move the cursor to them. **Type** `moveTo x, y`", + "solution": " moveTo x, y" + }, + { + "hint": "Draw a mountain for every loop with the polygon function. **Type** `polygon 400, 500, -400, 500`", + "solution": " polygon 400, 500, -400, 500" + }, + { + "hint": "First, get out of the previous for loop’s indent by pressing `BACKSPACE`. Now let’s draw some clouds with `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Clouds are made of small droplets of water vapor, which is see-through! To get a see-through color we use the `opacity` function. **Type** `color (opacity white, .1)`", + "solution": "color (opacity white, .1)" + }, + { + "hint": "Now let’s make a new loop to draw the cloud puffs. We’ll need a lot, so let’s make this a loop last 300 iterations. **Type** `for j in [ 0 ... 250 ]`.", + "solution": "for j in [ 0 ... 250 ]" + }, + { + "hint": "We want cloud puffs sprinkled randomly across the screen, so lets choose an x value between 0 and 500 with`x = random 0, 500`", + "solution": " x = random 0, 500" + }, + { + "hint": "However, for the y value, we only want the cloud puffs to be drawn on the bottom part of the screen. **Type** `y = random 300, 500`", + "solution": " y = random 300, 500" + }, + { + "hint": "Now with our x and y values set we can move the cursor to them. **Type** `moveTo x, y`", + "solution": " moveTo x, y" + }, + { + "hint": "Let’s draw the cloud puff—a big transparent `circle` of size `100`", + "solution": " circle 100" + }, + { + "hint": "Press `BACKSPACE` once to get out of the indented line. Then lets move the cursor into place for some text with `moveTo 250, 350`", + "solution": "moveTo 250, 350" + }, + { + "hint": "Set the drawing color to red - **type** `color red`", + "solution": "color red" + }, + { + "hint": "Our message should be strong and impactful, so lets set the font to bold with `bold true`", + "solution": "bold true" + }, + { + "hint": "We also want to style our text with italics, do this with `italic true`", + "solution": "italic true" + }, + { + "hint": "Finally lets select Bariol at point size 40 with `font 'Bariol', 40`", + "solution": "font 'Bariol', 40" + }, + { + "hint": "Start your message off with `text 'Hike the Blue Mountains of'`", + "solution": "text 'Hike the Blue Mountains of'" + }, + { + "hint": "Now for a new line with a big bold finish. **Type** `font 90`", + "solution": "font 90" + }, + { + "hint": "Lets move the cursor down into place for the final line with `move 0, 90`", + "solution": "move 0, 90" + }, + { + "hint": "The finishing touch: **type** `text 'Camp Kano!'`", + "solution": "text 'Camp Kano!'" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/index.json b/lib/challenges/locales/ja/worlds/summercamp/index.json new file mode 100644 index 000000000..a54bd7049 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/index.json @@ -0,0 +1,26 @@ +{ + + "challenges": [ + "./camp_sign", + "./campsite", + "./tent", + "./flag", + "./camp_badge", + "./campfire", + "./ghost", + "./backpack", + "./compass", + "./camera", + "./bear", + "./flashlight", + "./guitar", + "./cinema", + "./bow_and_arrow", + "./table_tennis", + "./fishing", + "./hiking", + "./foraging", + "./tree", + "./fireworks" + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/table_tennis.json b/lib/challenges/locales/ja/worlds/summercamp/table_tennis.json new file mode 100644 index 000000000..8e5a1fae0 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/table_tennis.json @@ -0,0 +1,121 @@ +{ + "id": "table_tennis", + "title": "Table Tennis", + "short_title": "Table Tennis", + "icon_class": "challenge_tennis", + "description": "Table Tennis is a game played with one or two people on each side of a table with the outline of a miniaturized tennis court drawn on it. Games are played to 11 or 21, and upon completion the victor’s paddle is thrown to the ground as they let out their battle cry.", + "cover": "summercamp/day_16.png", + "completion_text": "Well done! You made a beautiful 3D ping pong table. But there isn’t anyone playing or watching the game! Use your creativity and code to draw some fellow campers enjoying the game.", + "difficulty": 2, + "startAt": 0, + "summerCamp": true, + "rewards": { + "wallpaper": 1 + }, + "steps": [ + { + "hint": "Begin by setting your stroke to zero with `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "It's a sunny day! Set the background color to blue - **type** `background blue`", + "solution": "background blue" + }, + { + "hint": "Set your color to green for the grass. **Type** `color green`.", + "solution": "color green" + }, + { + "hint": "Move your cursor into place with `moveTo 0, 350`", + "solution": "moveTo 0, 350" + }, + { + "hint": "Cover the bottom part of the canvas with grass. Draw a `rectangle` of width `500` and height `150`.", + "solution": "rectangle 500, 150" + }, + { + "hint": "Give your table a solid foundation with some wood legs. Set `color` to `brown`", + "solution": "color brown" + }, + { + "hint": "Move the cursor into position for the first leg. **Type** `moveTo 20, 310`", + "solution": "moveTo 20, 310" + }, + { + "hint": "Now draw the first leg. Type `rectangle 15, 150`.", + "solution": "rectangle 15, 150" + }, + { + "hint": "Now the second leg. **Type** `moveTo 465, 310`.", + "solution": "moveTo 465, 310" + }, + { + "hint": "Now **draw** the second leg. Type `rectangle 15, 150`.", + "solution": "rectangle 15, 150" + }, + { + "hint": "And the third leg. **Type** `moveTo 40, 250`.", + "solution": "moveTo 40, 250" + }, + { + "hint": "Now draw the third leg the same size as the others", + "solution": "rectangle 15, 150" + }, + { + "hint": "Finally, the fourth leg. **Type** `moveTo 445, 250`.", + "solution": "moveTo 445, 250" + }, + { + "hint": "Now draw the fourth leg", + "solution": "rectangle 15, 150" + }, + { + "hint": "Now to put the table on! Set the drawing `color` to `darkgreen`.", + "solution": "color darkgreen" + }, + { + "hint": "Move your table top into place. Type `moveTo 10, 300`.", + "solution": "moveTo 10, 300" + }, + { + "hint": "Your table has perspective, to draw it use `polygon 30, -60, 450, -60, 480, 0`", + "solution": "polygon 30, -60, 450, -60, 480, 0" + }, + { + "hint": "For a cool 3D effect, lighten the drawing color with `color lighten darkgreen, 10`", + "solution": "color lighten darkgreen, 10" + }, + { + "hint": "**Draw** the side of the table with `rectangle 480, 10`", + "solution": "rectangle 480, 10" + }, + { + "hint": "For the net, set the drawing `color` to `white`", + "solution": "color white" + }, + { + "hint": "Move the cursor to **exactly** `moveTo 248, 220`", + "solution": "moveTo 248, 220" + }, + { + "hint": "Draw the net: a `rectangle` with a width of `4`, and height of `80`", + "solution": "rectangle 4, 80" + }, + { + "hint": "Give your scene a bouncing ball! Use random to decide what side of the table the ball should be on. **Type** `x = random 40, 460`.", + "solution": "x = random 40, 460" + }, + { + "hint": "Now we’ll use random to decide how high the ball should be! **Type** `y = random 150, 250`.", + "solution": "y = random 150, 250" + }, + { + "hint": "Move the cursor to the x and y variables you just made. **Type** `moveTo x, y`.", + "solution": "moveTo x, y" + }, + { + "hint": "Finally, draw your ball with a circle with radius 7. Type `circle 7`.", + "solution": "circle 7" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/tent.json b/lib/challenges/locales/ja/worlds/summercamp/tent.json new file mode 100644 index 000000000..e0552bc87 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/tent.json @@ -0,0 +1,73 @@ +{ + "id": "tent", + "title": "Pitch your Tent", + "short_title": "Tent", + "description": "No campsite is complete without a tent. We’ve got you settled with a simple fly tent, which is usually made with a tarpaulin, rope, and stakes. But with your creative powers you can transform it into whatever you want! \nPeople have lived in tents, teepees, yurts, and wigwams for thousands of years. What features can you add to your tent to keep yourself dry and warm? You can always get inspiration from browsing other creations on Kano World, and searching the Internet for other tent designs.", + "icon_class": "challenge_setcamp", + "completion_text": "Nice job! You learnt in the last challenge how to draw a tree, why not adding it to the scene? Is that a bird flying in the sky?", + "cover": "summercamp/day_3.png", + "difficulty": 1, + "startAt": 2, + "summerCamp": true, + "rewards": { + "wallpaper": 1 + }, + "steps": [ + { + "hint": "Draw a sunny day - **type** `background lightblue`", + "solution": "background lightblue" + }, + { + "hint": "Set the stroke to 0, to avoid drawing lines - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Move the cursor where the sun will be - **type** `moveTo 400, 50`", + "solution": "moveTo 400, 50" + }, + { + "hint": "Set the `color` of the sun `yellow`", + "solution": "color yellow" + }, + { + "hint": "Draw the sun with a circle - **type** `circle 40`", + "solution": "circle 40" + }, + { + "hint": "Move the cursor to draw some grass - **type** `moveTo 0, 350`", + "solution": "moveTo 0, 350" + }, + { + "hint": "Set the `color` of the grass `green`", + "solution": "color green" + }, + { + "hint": "Draw the grass using a rectangle - **type** `rectangle 500, 150`", + "solution": "rectangle 500, 150" + }, + { + "hint": "Excellent! Now we are ready to draw the tent - **type** `color red`", + "solution": "color red" + }, + { + "hint": "Position the cursor on top of the grass - **type** `moveTo 100, 350`", + "solution": "moveTo 100, 350" + }, + { + "hint": "Draw a triangle using `polygon` - **type** `polygon 150, -200, 300, 0`", + "solution": "polygon 150, -200, 300, 0" + }, + { + "hint": "We need the entrace now. Set the `color` to `darkred`", + "solution": "color darkred" + }, + { + "hint": "Place the cursor on the tip of the tent - **type** `moveTo 250, 150`", + "solution": "moveTo 250, 150" + }, + { + "hint": "Draw the entrance - **type** `polygon 30, 200, -30, 200`", + "solution": "polygon 30, 200, -30, 200" + } + ] +} diff --git a/lib/challenges/locales/ja/worlds/summercamp/tree.json b/lib/challenges/locales/ja/worlds/summercamp/tree.json new file mode 100644 index 000000000..0e190b858 --- /dev/null +++ b/lib/challenges/locales/ja/worlds/summercamp/tree.json @@ -0,0 +1,17 @@ +{ + "id": "tree", + "title": "Fractal Tree", + "short_title": "Tree", + "icon_class": "challenge_tree", + "description": "Time to play! Our counselors made you something to play with. A tree which can grow branches that expand outwards, and contract inwards. It can blossom fully, or shrivel to nothing. All with code. Make it yours.", + "cover": "summercamp/day_20.png", + "completion_text": "Play around with the blue numbers at the top of the code. What do they do? Why do they do that? Shape the tree to your liking. If things mess up, go back to the main menu and start again.", + "difficulty": 3, + "startAt": 0, + "summerCamp": true, + "rewards": { + "outfit": 1 + }, + "code": "# Play with these blue numbers\narmLength = 50\niterations = 9 # Might crash if you go over 15!\ndegreeChange = 20\nhasBlossoms = 3\nblossomSize = 70\nblossomOpacity = .02\n# ^^^ Play with these blue numbers ^^^\n\n###\nThis is a function that draws a tree\nbranch, when it completes, it calls itself\nover and over and over again until all the\ntree’s branches have been drawn!\n###\ndrawBranch = (x, y, branchesLeft, startAngle) ->\n if branchesLeft > 0 \n # Move to where the next branch should\n # be drawn:\n moveTo x, y\n \n # A branch is always blue, but the width\n # depends on how far from the base it is!\n stroke blue, branchesLeft \n \n # A bit of trigonometry here, it’s alright\n # if you don’t understand this! This \n # calculates coordinates for where the \n # branch should be drawn to, and where\n # the next branch should start.\n dx = Math.cos(startAngle) * armLength \n dy = -Math.sin(startAngle) * armLength \n \n # Draw a line to the new coordinates we\n # just calculated\n line dx, dy \n \n # This block of code only executes if\n # the current branch has blossoms. You\n # can change the hasBlossoms variable up\n # top!\n if branchesLeft <= hasBlossoms \n # Set the drawing color to a nice red\n color opacity \"rgb(247, 45, 99)\", blossomOpacity\n # Our blossoms shouldn’t have a stroke\n stroke 0 \n # Draw the blossom! These big blossoms\n # overlap over each other to create a\n # neat effect.\n circle blossomSize\n \n # Starts the next branch on the right\n drawBranch(x + dx, y + dy, branchesLeft - 1, startAngle - Math.PI / 180 * degreeChange) \n # Starts the next branch on the left\n drawBranch(x + dx, y + dy, branchesLeft - 1, startAngle + Math.PI / 180 * degreeChange)\n \n###\nFinally we call our function and see what\nhappens. Play with the numbers at the top of\nthe function and see how they change the tree\n###\ndrawBranch(stage.width * .5, stage.height, iterations, Math.PI / 2, length)", + "steps": [] +} diff --git a/lib/challenges/medal.js b/lib/challenges/medal.js deleted file mode 100644 index dae5cc8ef..000000000 --- a/lib/challenges/medal.js +++ /dev/null @@ -1,81 +0,0 @@ -var palette = require('../language/modules/palette.json'), - generate = require('./util/generate'); - -module.exports = { - id : 'medal', - title : 'Make a Medal', - description : 'Code you\'re own winners medal!', - startAt : 2, - steps : generate.fromSequence([ - [ - 'Set the stroke to red', - 'color red', - [ - [ 'stroke-color', { color: palette.red } ] - ] - ], - [ - 'Set the stroke to size 90', - 'stroke 0', - [ - [ 'stroke-width', { width: 90 } ] - ] - ], - [ - 'Draw a line - **type** `line -100, -270`', - 'line -100, -270', - [ - [ 'line', { dx: -100, dy: -270 } ] - ] - ], - [ - 'Draw a line - **type** `line 100, -270`', - 'line 100, -270', - [ - [ 'line', { dx: 100, dy: -270 } ] - ] - ], - [ - 'Set the stroke to zero', - 'stroke black, 5', - [ - [ 'stroke-width', { width: 0 } ] - ] - ], - [ - 'Set the color to gold - **type** `color gold`', - 'color gold', - [ - [ 'color', { color: palette.gold } ] - ] - ], - [ - 'Draw a circle with a size of 170 ', - 'circle 170', - [ - [ 'ellipse', { rx: 170, isCircle: true } ] - ] - ], - [ - 'Set the color to white', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - 'Now to write on the medal, set the font size - **type** `font 40`', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - 'Write something on the medal - **type** `text \'Winner\'`', - 'move 0, 15', - [ - [ 'move-to', { dx: 0, dy: 15 } ] - ] - ] - ]) -}; diff --git a/lib/challenges/pizza.js b/lib/challenges/pizza.js deleted file mode 100644 index 1be69a93a..000000000 --- a/lib/challenges/pizza.js +++ /dev/null @@ -1,76 +0,0 @@ -var palette = require('../language/modules/palette.json'), - generate = require('./util/generate'); - -module.exports = { - id : 'pizza', - title : 'Pizza', - description : 'Code yourself a tasty pizza!', - startAt : 2, - steps : generate.fromSequence([ - [ - 'Set the stroke to the color beige', - 'stroke beige', - [ - [ 'stroke-color', { color: palette.beige } ] - ] - ], - [ - 'Set the stroke to 50', - 'stroke 50', - [ - [ 'stroke-width', { width: 50 } ] - ] - ], - [ - 'Set the color to red', - 'color red', - [ - [ 'color', { color: palette.red } ] - ] - ], - [ - 'Draw a circle with a size of 200', - 'circle 200', - [ - [ 'ellipse', { rx: 200, isCircle: true } ] - ] - ], - [ - 'Looking tasty! Set the stroke back to 0', - 'stroke 0', - [ - [ 'stroke-width', { width: 0 } ] - ] - ], - [ - 'Top it with a cheesy yellow circle of size 195', - 'color yellow\ncircle 195', - [ - [ 'color', { color: palette.yellow } ], - [ 'ellipse', { rx: 195, isCircle: true } ] - ] - ], - [ - 'It\'s not pizza without toppings - set the color to darkred', - 'color darkred', - [ - [ 'color', { color: palette.darkred } ] - ] - ], - [ - 'Now `moveTo` `164, 290`', - 'moveTo 164, 290', - [ - [ 'move-to', { x: 164, y: 290 } ] - ] - ], - [ - 'Cool, now draw a circle with a size of 20', - 'circle 20', - [ - [ 'ellipse', { rx: 20, isCircle: true } ] - ] - ] - - ]) -}; diff --git a/lib/challenges/planet.js b/lib/challenges/planet.js deleted file mode 100644 index a1373d79c..000000000 --- a/lib/challenges/planet.js +++ /dev/null @@ -1,133 +0,0 @@ -var palette = require('../language/modules/palette.json'), - generate = require('./util/generate'); - -module.exports = { - id : 'planet', - title : 'Planet painter', - description : 'Code your own planet!', - startAt : 2, - steps : generate.fromSequence([ - [ - 'Set the background using a hex code - **type** `background \'#444444\'`', - 'color \'#444444\'', - [ - [ 'background', { color: '#444444' } ] - ] - ], - [ - 'Set the stroke to 0, to avoid drawing lines', - 'stroke 0', - [ - [ 'stroke-width', { width: 0 } ] - ] - ], - [ - 'Set the color to yellow', - 'color yellow', - [ - [ 'color', { color: palette.yellow } ] - ] - ], - [ - 'Now let\'s open a loop - **type** `for i in [ 0 .. 32 ]`', - 'for i in [ 0 .. 32 ]', - [ - [ 'for-loop', { iterator: 'i', range: '0..32' } ] - ] - ], - [ - 'Now to set where each star will go - **type** `moveTo (random 1, 500), (random 1, 500)`', - ' moveTo (random 1, 500), (random 1, 500)', - function () { - var i = 0, - out = []; - - function validateMove(options) { - return ( - options.x > 0 && options.x <= 500 && - options.y > 0 && options.y <= 500 - ); - } - - for (i = 0; i < 33; i += 1) { - out.push([ 'move-to', validateMove ]); - } - - return out; - } - ], - [ - 'Draw each star as a circle with a size of 5', - ' circle 5', - function () { - var i = 0, - out = []; - - function validateMove(options) { - return ( - options.x > 0 && options.x <= 500 && - options.y > 0 && options.y <= 500 - ); - } - - function validateStar(options) { - return ( - options.isCircle && - options.rx === 5 - ); - } - - for (i = 0; i < 33; i += 1) { - out.push([ 'move-to', validateMove ]); - out.push([ 'ellipse', validateStar ]); - } - - return out; - }, - { override: true } - ], - [ - 'Now, make sure you\'re out of the for loop (not indented) and **type** `color purple`', - 'color purple', - [ - [ 'color', { color: palette.purple } ] - ] - ], - [ - 'Now `moveTo 250, 250`', - 'moveTo 250, 250', - [ - [ 'move-to', { x: 250, y: 250 } ] - ] - ], - [ - 'Now draw a circle with a size of 170', - 'circle 170', - [ - [ 'ellipse', { rx: 170, isCircle: true } ] - ] - ], - [ - 'Set the color to white', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - 'Choose a thick, white stroke - in a new line, **type** `stroke white, 5`', - 'stroke white, 5', - [ - [ 'stroke-color', { color: palette.white } ], - [ 'stroke-width', { width: 5 } ] - ] - ], - [ - 'Now draw an ellipse - **type** `ellipse 220, 4`', - 'ellipse 220, 4', - [ - [ 'ellipse', { rx: 220, ry: 4 } ] - ] - ] - ]) -}; \ No newline at end of file diff --git a/lib/challenges/random.js b/lib/challenges/random.js deleted file mode 100644 index 2d5b1ab54..000000000 --- a/lib/challenges/random.js +++ /dev/null @@ -1,80 +0,0 @@ -var palette = require('../language/modules/palette.json'), - generate = require('./util/generate'); - -module.exports = { - id : 'random', - title : 'Random!', - description : 'Not sure where to put something - theres a function for that!', - startAt : 2, - steps : generate.fromSequence([ - [ - 'Let\'s move the cursor somewhere random - **type** `moveTo (random 1, 500), (random 1, 500)`', - 'moveTo random(1, 500), random(1, 500)', - [ - [ 'move-to', function (options) { - return ( - options.x > 0 && options.x <= 500 && - options.y > 0 && options.y <= 500 - ); - } ] - ] - ], - [ - 'Set the color to red - **type** `color red`', - 'color red', - [ - [ 'color', { color: palette.red } ] - ] - ], - [ - 'Now let\'s draw a circle in a random place - **type** `circle 200`', - 'circle 200', - [ - [ 'ellipse', { rx: 200, isCircle: true } ] - ] - ], - [ - 'Set the drawing color to green', - 'color green', - [ - [ 'color', { color: palette.green } ] - ] - ], - [ - 'Now draw a circle with size 150', - 'circle 150', - [ - [ 'ellipse', { rx: 150, isCircle: true } ] - ] - ], - [ - 'Set the color to yellow', - 'color yellow', - [ - [ 'color', { color: palette.yellow } ] - ] - ], - [ - 'Now draw a circle with size 100', - 'circle 100', - [ - [ 'ellipse', { rx: 100, isCircle: true } ] - ] - ], - [ - 'Set the color to blue', - 'color blue', - [ - [ 'color', { color: palette.blue } ] - ] - ], - [ - 'Finish it of with a circle with a size of 50', - 'circle 50', - [ - [ 'ellipse', { rx: 50, isCircle: true } ] - ] - ], - - ]) -}; diff --git a/lib/challenges/scripts/change_cover.js b/lib/challenges/scripts/change_cover.js new file mode 100644 index 000000000..83777cf98 --- /dev/null +++ b/lib/challenges/scripts/change_cover.js @@ -0,0 +1,36 @@ +"use strict"; +var fs = require('fs'), + challenges = [ + 'japan', + 'sweden', + 'stare', + 'smiley', + 'baloon', + 'stickman', + 'shrinking', + 'random', + 'starry', + 'house', + // 'medal', + 'dots', + 'gradient', + 'planet', + 'pizza', + 'breakfast' + ], + baseDir = '../worlds/basic/'; + +challenges.forEach(function (ch) { + var obj = require(baseDir + ch), + formattedJSON; + obj.cover = obj.id + '.png'; + formattedJSON = JSON.stringify(obj, null, 4); + fs.writeFile(baseDir + ch + '.json', formattedJSON, function (err) { + if (err) { + throw err; + } + }); + console.log(" --------- " + ch); + //console.log(formattedJSON); + +}); diff --git a/lib/challenges/scripts/sc_converter.js b/lib/challenges/scripts/sc_converter.js new file mode 100644 index 000000000..e9139d661 --- /dev/null +++ b/lib/challenges/scripts/sc_converter.js @@ -0,0 +1,80 @@ +"use strict"; +/** + * Script used to refactor old summercamp challenges to new ones. + * @type {[type]} + */ +var fs = require('fs'), + slugify = require('slugify'), + challenges = [ + 'day_one', + 'day_two', + 'day_three', + 'day_four', + 'day_five', + 'day_six', + 'day_seven', + 'day_eight', + 'day_nine', + 'day_ten', + 'day_eleven', + 'day_twelve', + 'day_thirteen', + 'day_fourteen', + 'day_fifteen', + 'day_sixteen', + 'day_seventeen', + 'day_eighteen', + 'day_nineteen', + 'day_twenty', + 'day_twentyone' + ], + baseDir = "../summer_camp/", + jsonBaseDir = "../worlds/summercamp/", + arr = []; + +console.log("Length " + challenges.length); +challenges.forEach(function (fileName) { + var challenge = require(baseDir + fileName), + solution = (challenge.steps[challenge.steps.length - 1]) ? challenge.steps[challenge.steps.length - 1].solution : "", + solLength = solution.split('\n').length, + stepsLength = challenge.steps.length, + formattedJSON, + title, + slugSource = challenge.short_title || challenge.title; + //arr = []; + + title = slugify(slugSource.toLowerCase(), "_"); + /*challenge.id = title; + challenge.steps.forEach(function (step, idx) { + + var sol = step.solution.split('\n'); + step.solution = sol[idx]; + }); + + + console.log(" ------------ " + title); + + if (solLength !== stepsLength) { + console.log("----- " + title + " requires more attention"); + } + + formattedJSON = JSON.stringify(challenge, null, 4); + fs.writeFile(jsonBaseDir + title + '.json', formattedJSON, function (err) { + if (err) { + throw err; + } + }); +*/ + /* + challenge.steps.forEach(function(step) { + console.log(JSON.stringify(step, null, 4)); + });*/ + + //console.log(JSON.stringify(challenge, null, 4)); + arr.push("./" + title); + + +}); + + console.log(JSON.stringify(arr, null, 4)); + diff --git a/lib/challenges/scripts/scriptsconverter.js b/lib/challenges/scripts/scriptsconverter.js new file mode 100644 index 000000000..1c4777da9 --- /dev/null +++ b/lib/challenges/scripts/scriptsconverter.js @@ -0,0 +1,75 @@ +"use strict"; + +var fs = require('fs'), + challenges = [ + 'japan', + 'sweden', + 'stare', + 'smiley', + 'baloon', + 'stickman', + 'shrinking', + 'random', + 'starry', + 'house', + // 'medal', + 'dots', + 'gradient', + 'planet', + 'pizza', + 'breakfast' + ], + baseDir = "../", + jsonBaseDir = "../descriptors/", + SUCCESS_MESSAGES = [ + 'Nice work! That is one cool flag!', //Japan + 'Cool beans - enough of flags, let\'s try something else!', //Sweden + 'You Wizard! The next time I need spooky eyes I know who to call!', //Stare + 'Nice! Keep up the good work you face drawing genius!', //Smiley + 'Awesome balloon! Why not change the color before moving on?', //Blue balloon + 'Nice one! The canvas is 500 wide and 500 high, moving about on it is a skill!', //Stickman + 'Great! For loops let us repeat bits of code (it saves on all the typing)!', //Shrinking + 'Random functions give us a random number so we can put things in a surprise spot.', //random + 'Awesome! Press space and see what happens to the stars...', //Starry + 'You built an awesome house with code!', //House + 'Mathematical! Change the numbers and see what happens.', //Dots + 'Try changing the numbers in the rotate function and see what happens.', //Gradient + 'Astronomical! Change the colors and see what you can add to make your planet even cooler before hitting share!', //planet + 'Tasty! Finish it off with more toppings, let your imagination run wild and see what you can make, then share it with the world!', //Pizza + 'Well done!', //null + ]; + +console.log("Length " + challenges.length + SUCCESS_MESSAGES.length); +challenges.forEach(function (fileName, idx) { + var challenge = require(baseDir + fileName), + solution = challenge.steps[challenge.steps.length - 1].solution, + solLength = solution.split('\n').length, + stepsLength = challenge.steps.length, + formattedJSON; + + challenge.completion_text = SUCCESS_MESSAGES[idx]; + challenge.steps.forEach(function (step, idx) { + var sol = step.solution.split('\n'); + step.solution = sol[idx]; + step.validate = "^" + sol[idx] + "$"; + }); + + + + if (solLength !== stepsLength) { + console.log("----- " + fileName + " requires more attention"); + } + + formattedJSON = JSON.stringify(challenge, null, 4); + fs.writeFile(jsonBaseDir + fileName + '.json', formattedJSON, function (err) { + if (err) { + throw err; + } + }); + + + /*challenge.steps.forEach(function(step) { + console.log(JSON.stringify(step, null, 4)); + });*/ + +}); diff --git a/lib/challenges/scripts/solve.js b/lib/challenges/scripts/solve.js new file mode 100644 index 000000000..cf4935c8a --- /dev/null +++ b/lib/challenges/scripts/solve.js @@ -0,0 +1,18 @@ +/** + * Solves a challenge specified in the filename + */ +"use strict"; +function run() { + + var fileName = process.argv[2], + challenge; + if (!fileName) { + throw "Missing name of the challenge use: \n node solve.js challengePath"; + } + challenge = require(fileName); + challenge.steps.forEach(function (step) { + console.log(step.solution); + }); +} + +run(); diff --git a/lib/challenges/shrinking.js b/lib/challenges/shrinking.js deleted file mode 100644 index 072987b31..000000000 --- a/lib/challenges/shrinking.js +++ /dev/null @@ -1,48 +0,0 @@ -var palette = require('../language/modules/palette.json'), - generate = require('./util/generate'); - -module.exports = { - id : 'shrinking', - title : 'Shrinking Circles', - description : 'Ever shrinking circles with a for loop!', - code : '', - startAt : 1, - steps : generate.fromSequence([ - [ - 'Set the stroke - **type** `stroke gray, 3`', - 'stroke gray, 3', - [ - [ 'stroke-color', { color: palette.gray } ], - [ 'stroke-width', { width: 3 } ] - ] - ], - [ - 'Set the color to see through - **type** `color null`', - 'color null', - [ - [ 'color', { color: null } ] - ] - ], - [ - 'Let\'s draw 32 circles all at once - **type** `for i in [ 0 .. 32 ]`', - 'for i in [ 0 .. 32 ]', - [ - [ 'for-loop', { iterator: 'i', range: '0..32' } ] - ] - ], - [ - 'Awesome, now for the circles - inside the for loop **type** `circle 10 * i`', - ' circle 10 * i', - function () { - var i = 0, - out = []; - - for (i = 0; i < 33; i += 1) { - out.push([ 'ellipse', { isCircle: true, rx: i * 10 } ]); - } - - return out; - } - ] - ]) -}; \ No newline at end of file diff --git a/lib/challenges/smiley.js b/lib/challenges/smiley.js deleted file mode 100644 index d5043dbd6..000000000 --- a/lib/challenges/smiley.js +++ /dev/null @@ -1,82 +0,0 @@ -var palette = require('../language/modules/palette.json'), - generate = require('./util/generate'); - -module.exports = { - id : 'smiley', - title : 'Your first face', - description : 'Draw a face', - startAt : 2, - steps : generate.fromSequence([ - [ - 'Set the drawing color to yellow - **type** `color yellow`', - 'color yellow', - [ - [ 'color', { color: palette.yellow } ] - ] - ], - [ - 'Choose a thick black stroke - **type** `stroke black, 20`', - 'stroke black, 20', - [ - [ 'stroke-color', { color: palette.black } ], - [ 'stroke-width', { width: 20 } ] - ], - ], - [ - 'Draw a circle with a size of 200', - 'circle 200', - [ - [ 'ellipse', { rx: 200, isCircle: true } ] - ] - ], - [ - 'Move left and up by 80 - **type** `move -80, -80`', - 'move -80, -80', - [ - [ 'move-to', { dx: -80, dy: -80 } ] - ] - ], - [ - 'Set the drawing color to black', - 'color black', - [ - [ 'color', { color: palette.black} ] - ] - ], - [ - 'Draw a circle with a radius of 20', - 'circle 20', - [ - [ 'ellipse', { rx: 20, isCircle: true } ] - ] - ], - [ - 'Move right by 160 - **type** `move 160`', - 'move 160', - [ - [ 'move-to', { dx: 160, dy: 0 } ] - ] - ], - [ - 'Draw another circle with a size of 20', - 'circle 20', - [ - [ 'ellipse', { rx: 20, isCircle: true } ] - ] - ], - [ - 'Move to the center and down - In a new line, **type** `moveTo 250, 270`', - 'moveTo 250, 270', - [ - [ 'move-to', { x: 250, y: 270 } ] - ] - ], - [ - 'An arc is part of a circle, we can draw one as the mouth - **type** `arc 100, 1, 2`', - 'arc 100, 1, 2', - [ - [ 'arc', { radius: 100, start: 1, end: 2 } ] - ] - ] - ]) -}; diff --git a/lib/challenges/snowman.js b/lib/challenges/snowman.js deleted file mode 100644 index 36119f202..000000000 --- a/lib/challenges/snowman.js +++ /dev/null @@ -1,185 +0,0 @@ -var palette = require('../language/modules/palette.json'), - generate = require('./util/generate'); - -module.exports = { - id : 'snowman', - title : 'Snowman', - description : 'Draw a snowman using circles and loops', - startAt : 2, - steps : generate.fromSequence([ - [ - 'Set the `background` to `darkblue`', - 'background darkblue', - [ - [ 'background', { color: palette.darkblue } ] - ] - ], - [ - 'Move down, ***type*** `move 0, 200`', - 'move 0, 200', - [ - [ 'move-to', { dx: 0, dy: 200 } ] - ] - ], - [ - 'Set the `stroke` to `0`', - 'stroke 0', - [ - [ 'stroke-width', { width: 0 } ] - ] - ], - [ - 'Set the `color` to `white`', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - 'Draw a `circle` with a size of `200`', - 'circle 200', - [ - [ 'ellipse', { rx: 200, isCircle: true } ] - ] - ], - [ - 'Move back up, ***type*** `move 0, -200`', - 'move 0, -200', - [ - [ 'move-to', { dx: 0, dy: -200 } ] - ] - ], - [ - 'Set the `stroke` to `lightgray`, with a size of `4`', - 'stroke lightgray, 4', - [ - [ 'stroke-color', { color: palette.lightgray } ], - [ 'stroke-width', { width: 4 } ] - ] - ], - [ - 'Draw a `circle` with a size of `100`', - 'circle 100', - [ - [ 'ellipse', { rx: 100, isCircle: true } ] - ] - ], - [ - 'Set the `stroke` to `0`', - 'stroke 0', - [ - [ 'stroke-width', { width: 0 } ] - ] - ], - [ - 'Move left, ***type*** `move -60`', - 'move 0, -60', - [ - [ 'move-to', { dx: -60, dy: 0 } ] - ] - ], - [ - 'Set the `color` to `black`', - 'color black', - [ - [ 'color', { color: palette.black } ] - ] - ], - [ - 'Draw a `circle` with a size of `10`', - 'circle 10', - [ - [ 'ellipse', { rx: 10, isCircle: true } ] - ] - ], - [ - 'Move right, ***type*** `move 120`', - 'move 0, 120', - [ - [ 'move-to', { dx: 120, dy: 0 } ] - ] - ], - [ - 'Draw a `circle` with a size of `10`', - 'circle 10', - [ - [ 'ellipse', { rx: 10, isCircle: true } ] - ] - ], - [ - 'Move left and down, ***type*** `move -60, 30`', - 'move -60, 30', - [ - [ 'move-to', { dx: -60, dy: 30 } ] - ] - ], - [ - 'Set the `color` to `orange`', - 'color orange', - [ - [ 'color', { color: palette.orange } ] - ] - ], - [ - 'Draw a `circle` with a size of `15`', - 'circle 15', - [ - [ 'ellipse', { rx: 15, isCircle: true } ] - ] - ], - [ - 'Set the `color` to `white`', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - 'Now open a loop - ***type*** `for i in [ 0 .. 50 ]`', - '\nfor i in [ 0 .. 50 ]', - [ - [ 'for-loop', { iterator: 'i', range: '0..50' } ] - ] - ], - [ - 'Move around the canvas - **type** `moveTo (random 1, 500), (random 1, 500)`', - ' moveTo (random 1, 500), (random 1, 500)', - function () { - var i = 0, - out = []; - - for (i = 0; i < 51; i += 1) { - out.push([ 'move-to', function (options) { - return ( - options.x > 0 && options.x <= 500 && - options.y > 0 && options.y <= 500 - ); - } ]); - } - - return out; - } - ], - [ - 'Draw the snow! Add `circle 5`', - ' circle 5', - function () { - var i = 0, - out = []; - - for (i = 0; i < 51; i += 1) { - out.push([ 'move-to', function (options) { - return ( - options.x > 0 && options.x <= 500 && - options.y > 0 && options.y <= 500 - ); - } ]); - out.push([ 'ellipse', { rx: 5, isCircle: true }]); - } - - return out; - }, - { override: true } - ] - ]) -}; \ No newline at end of file diff --git a/lib/challenges/stare.js b/lib/challenges/stare.js deleted file mode 100644 index feffd32b2..000000000 --- a/lib/challenges/stare.js +++ /dev/null @@ -1,89 +0,0 @@ -var palette = require('../language/modules/palette.json'), - generate = require('./util/generate'); - -module.exports = { - id : 'stare', - title : 'Stare in the dark', - description : 'Draw a pair of staring eyes in the dark', - startAt : 2, - steps : generate.fromSequence([ - [ - - 'Set the background to black', - 'background black', - [ - [ 'background', { color: palette.black } ] - ], - ], - [ - 'Move to the left by 80 - **type** `move -80`', - 'move -80', - [ - [ 'move-to', { dx: -80, dy: 0 } ] - ] - ], - [ - 'Set the drawing color to white', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - 'Draw an ellipse, it\'s like a stretched circle - **type** `ellipse 60, 40`', - 'ellipse 60, 40', - [ - [ 'ellipse', { rx: 60, ry: 40 } ] - ] - ], - [ - 'Set the drawing color to black - **type** `color black`', - 'color black', - [ - [ 'color', { color: palette.black } ], - ] - ], - [ - 'Draw a circle with a size of 10 - **type** `circle 10`', - 'circle 10', - [ - [ 'ellipse', { rx: 10, isCircle: true } ] - ] - ], - [ - 'Move to the right by 160 - **type** `move 160`', - 'move 160', - [ - [ 'move-to', { dx: 160, dy: 0 } ] - ] - ], - [ - 'Set the drawing color to white again', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - 'Now draw another ellipse with width 60 and height 40 - **type** `ellipse 60, 40`', - 'ellipse 60, 40', - [ - [ 'ellipse', { rx: 60, ry: 40 } ] - ] - ], - [ - 'Set the drawing color to black', - 'color black', - [ - [ 'color', { color: palette.black } ] - ] - ], - [ - 'Finish it up by drawing a circle with a size of 10', - 'circle 10', - [ - [ 'ellipse', { rx: 10, isCircle: true } ] - ] - ] - ]) -}; diff --git a/lib/challenges/starry.js b/lib/challenges/starry.js deleted file mode 100644 index d95b4c20f..000000000 --- a/lib/challenges/starry.js +++ /dev/null @@ -1,90 +0,0 @@ -var palette = require('../language/modules/palette.json'), - generate = require('./util/generate'); - -module.exports = { - id : 'starry-sky', - title : 'Starry sky', - description : 'Code your own starry night sky using the random function!', - startAt : 2, - steps : generate.fromSequence([ - [ - 'Set the background to darkblue', - 'background darkblue', - [ - [ 'background', { color: palette.darkblue } ] - ] - ], - [ - 'Now set the stroke to 0', - 'stroke 0', - [ - [ 'stroke-width', { width: 0 } ] - ] - ], - [ - 'And set the drawing color to yellow', - 'color yellow', - [ - [ 'color', { color: palette.yellow } ] - ] - ], - [ - 'Now let\'s open a loop - **type** `for i in [ 0 .. 32 ]`', - 'for i in [ 0 .. 32 ]', - [ - [ 'for-loop', { iterator: 'i', range: '0..32' } ] - ] - ], - [ - 'Now to set where each star will go - **type** `moveTo (random 1, 500), (random 1, 500)`', - ' moveTo (random 1, 500), (random 1, 500)', - function () { - var i = 0, - out = []; - - function validateMove(options) { - return ( - options.x > 0 && options.x <= 500 && - options.y > 0 && options.y <= 500 - ); - } - - for (i = 0; i < 33; i += 1) { - out.push([ 'move-to', validateMove ]); - } - - return out; - } - ], - [ - 'Finally draw each star as a circle with a size of 5', - ' circle 5', - function () { - var i = 0, - out = []; - - function validateMove(options) { - return ( - options.x > 0 && options.x <= 500 && - options.y > 0 && options.y <= 500 - ); - } - - function validateStar(options) { - return ( - options.isCircle && - options.rx === 5 - ); - } - - for (i = 0; i < 33; i += 1) { - out.push([ 'move-to', validateMove ]); - out.push([ 'ellipse', validateStar ]); - } - - return out; - }, - { override: true } - ], - ]) -}; diff --git a/lib/challenges/stickman.js b/lib/challenges/stickman.js deleted file mode 100644 index cc4baa579..000000000 --- a/lib/challenges/stickman.js +++ /dev/null @@ -1,95 +0,0 @@ -var palette = require('../language/modules/palette.json'), - generate = require('./util/generate'); - -module.exports = { - id : 'stickman', - title : 'Stickman', - description : 'Draw a stickman using circles and lines', - startAt : 2, - steps : generate.fromSequence([ - [ - 'Set the `stroke` to `black` with a size of `10`', - 'stroke black, 10', - [ - [ 'stroke-color', { color: palette.black } ], - [ 'stroke-width', { width: 10 } ] - ] - ], - [ - 'Move up on the canvas, **type** `move 0, -50`', - 'move 0, -50', - [ - [ 'move-to', { dx: 0, dy: -50 } ] - ] - ], - [ - 'Draw the stickman body - `line 0, 150`', - 'line 0, 150', - [ - [ 'line', { dx: 0, dy: 150 } ] - ] - ], - [ - 'Draw the stickman left arm - `line -80, 120`', - 'line -80, 120', - [ - [ 'line', { dx: -80, dy: 120 } ] - ] - ], - [ - 'Good, now with the right arm - `line 80, 120`', - 'line 80, 120', - [ - [ 'line', { dx: 80, dy: 120 } ] - ] - ], - [ - 'Move down, **type** `move 0, 150`', - 'move 0, 150', - [ - [ 'move-to', { dx: 0, dy: 150 } ] - ] - ], - [ - 'Draw the stickman left leg: `line -80, 120`', - 'line -80, 120', - [ - [ 'line', { dx: -80, dy: 120 } ] - ] - ], - [ - 'Good, now with the right leg - `line 80, 120`', - 'line 80, 120', - [ - [ 'line', { dx: 80, dy: 120 } ] - ] - ], - [ - 'Move to the top of the drawing, **type** `moveTo 250, 100`', - 'moveTo 250, 100', - [ - [ 'move-to', { x: 250, y: 100 } ] - ] - ], - [ - 'Set the stroke back to 0', - 'stroke 0', - [ - [ 'stroke-width', { width: 0 } ] - ] - ], - [ - 'Now to draw a many sided shape - **type** `polygon -60, 50, 0, 100 , 60, 50`', - 'polygon -60, 50, 0, 100 , 60, 50', - [ - [ 'polygon', { points: [ - { x: 0, y: 0 }, - { x: -60, y: 50 }, - { x: 0, y: 100 }, - { x: 60, y: 50 } - ] } ] - ] - ], - - ]) -}; diff --git a/lib/challenges/summer_camp/day_eight.js b/lib/challenges/summer_camp/day_eight.js deleted file mode 100644 index 912b6c574..000000000 --- a/lib/challenges/summer_camp/day_eight.js +++ /dev/null @@ -1,242 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_eight', - title : 'Pack your things', - short_title : 'Backpack', - icon_class : 'challenge_backpack', - description : 'Dick Kelty is the inventor of the aluminium frame backpack. Kelty got the idea for his backpack in 1951 when he and a friend were hiking in the Sierra Nevada. Working in his garage, and with $500 borrowed against his house, Kelty and his wife went into production; he cut and welded the aluminium frames, while she stitched the nylon. They sold the finished backpacks for $24 apiece.', - img : '/assets/summercamp/ch_pics/day_8.png', - completion_text: 'I have a big challenge for you: try drawing your character behind that backpack! Head, arms, legs… ', - difficulty : 1, - startAt : 0, - summerCamp : true, - rewards : null, - steps : generate.fromSequence([ - [ - 'It\'s a beautiful day to go for a walk in the forest - **type** `background blue`', - 'background blue', - [ - [ 'background', { color: palette.blue } ] - ] - ], - [ - 'Firstly, set the `stroke` to `0`, to avoid drawing the outlines of the shapes', - 'stroke 0', - [ - [ 'stroke-width', { 'width': 0 } ] - ] - ], - [ - 'Move the cursor to place the floor - in a new line **type** `moveTo 0, 250`', - 'moveTo 0, 250', - [ - [ 'move-to', { x: 0, y: 250 } ] - ] - ], - [ - 'Set the `color` of the grass to `green`', - 'color green', - [ - [ 'color', { color: palette.green } ] - ] - ], - [ - 'Draw the floor with a rectangle - **type** `rectangle 500, 250`', - 'rectangle 500, 250', - [ - [ 'rectangle', { width: 500, height: 250 } ] - ] - ], - [ - 'This looks like a nice place for a tree - **type** `moveTo 220`', - 'moveTo 220', - [ - [ 'move-to', { x: 220, y: 0 } ] - ] - ], - [ - 'Set the `color` of the trunk to `lightbrown`', - 'color lightbrown', - [ - [ 'color', { color: palette.lightbrown } ] - ] - ], - [ - 'Draw the trunk with a `rectangle` of size `50` by `400`', - 'rectangle 50, 400', - [ - [ 'rectangle', { width: 50, height: 400 } ] - ] - ], - [ - 'Beautiful! Now it just needs some leaves - **type** `move 30, -120` to place them', - 'move 30, -120', - [ - [ 'move-to', { dx: 30, dy: -120 } ] - ] - ], - [ - 'Set the `color` of the leaves to `darkgreen`', - 'color darkgreen', - [ - [ 'color', { color: palette.darkgreen } ] - ] - ], - [ - 'Draw a `circle` to represent the leaves with size `200`', - 'circle 200', - [ - [ 'ellipse', { rx: 200, isCircle: true } ] - ] - ], - [ - 'Looking great! Let\'s move the cursor to place our backpack - **type** `moveTo 150, 200`', - 'moveTo 150, 200', - [ - [ 'move-to', { x: 150, y: 200 } ] - ] - ], - [ - 'Let\'s choose `color` `brown` for our backpack', - 'color brown', - [ - [ 'color', { color: palette.brown } ] - ] - ], - [ - 'Draw the main part of the rucksack with a square - **type** `square 200`', - 'square 200', - [ - [ 'rectangle', { width: 200, height: 200 } ] - ] - ], - [ - 'Now move the cursor to bottom part of our backpack - **type** `moveTo 250, 400`', - 'moveTo 250, 400', - [ - [ 'move-to', { x: 250, y: 400 } ] - ] - ], - [ - 'Draw the bottom using an ellipse - **type** `ellipse 100, 30`', - 'ellipse 100, 30', - [ - [ 'ellipse', { rx: 100, ry: 30 } ] - ] - ], - [ - 'We need to store the sleeping bag at the top - **type** `moveTo 250, 200`', - 'moveTo 250, 200', - [ - [ 'move-to', { x: 250, y: 200 } ] - ] - ], - [ - 'Set the `color` of the sleeping bag to `darkred`', - 'color darkred', - [ - [ 'color', { color: palette.darkred } ] - ] - ], - [ - 'Ready to draw the sleeping bag? Use an ellipse - **type** `ellipse 115, 40`', - 'ellipse 115, 40', - [ - [ 'ellipse', { rx: 115, ry: 40 } ] - ] - ], - [ - 'We need something to secure your sleeping bag to your backpack - **type** `moveTo 200, 160`', - 'moveTo 200, 160', - [ - [ 'move-to', { x: 200, y: 160 } ] - ] - ], - [ - 'The `orangered` seems like a nice `color` for the holders', - 'color orangered', - [ - [ 'color', { color: palette.orangered } ] - ] - ], - [ - 'Draw the left one first - **type** `rectangle 15, 90`', - 'rectangle 15, 90', - [ - [ 'rectangle', { width: 15, height: 90 } ] - ] - ], - [ - 'Position the cursor to the right to draw the next holder - **type** `moveTo 290, 160`', - 'moveTo 290, 160', - [ - [ 'move-to', { x: 290, y: 160 } ] - ] - ], - [ - 'Use a `rectangle` again for the right holder, same as the previous one', - 'rectangle 15, 90', - [ - [ 'rectangle', { width: 15, height: 90 } ] - ] - ], - [ - 'Excellent! We need more storage space. Move the cursor to the middle - **type** `moveTo 205, 320`', - 'moveTo 205, 320', - [ - [ 'move-to', { x: 205, y: 320 } ] - ] - ], - [ - 'Use a `rectangle` for the outside pocket, `90` by `60` will suffice', - 'rectangle 90, 60', - [ - [ 'rectangle', { width: 90, height: 60 } ] - ] - ], - [ - 'That pocket needs to be closed so bugs can\'t get in - **type** `moveTo 250, 320`', - 'moveTo 250, 320', - [ - [ 'move-to', { x: 250, y: 320 } ] - ] - ], - [ - 'Set the `color` to `lightbrown`', - 'color lightbrown', - [ - [ 'color', { color: palette.lightbrown } ] - ] - ], - [ - 'An `ellipse` of size `48` by `7` will help here', - 'ellipse 48, 7', - [ - [ 'ellipse', { rx: 48, ry: 7 } ] - ] - ], - [ - 'Looking great! Let\’s place a button on that pocket - **type** `moveTo 250, 330`', - 'moveTo 250, 330', - [ - [ 'move-to', { x: 250, y: 330 } ] - ] - ], - [ - 'Set the `color` to `brown`', - 'color brown', - [ - [ 'color', { color: palette.brown } ] - ] - ], - [ - 'Draw a `circle` button of size `10`', - 'circle 10', - [ - [ 'ellipse', { rx: 10, isCircle: true } ] - ] - ], - ]) -}; diff --git a/lib/challenges/summer_camp/day_eighteen.js b/lib/challenges/summer_camp/day_eighteen.js deleted file mode 100644 index 975c5b89e..000000000 --- a/lib/challenges/summer_camp/day_eighteen.js +++ /dev/null @@ -1,295 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_eighteen', - title : 'Hiking Poster', - short_title : 'Hiking', - icon_class : 'challenge_hiking', - description : 'The beautiful Camp Kano mountain range is known for its deep blue colour. The ten mountains in the range always seem to be changing position though, which makes for a dangerous climb. Should campers attempt to climb it? Who knows! But management wants an advertising posts so get to it.', - img : '/assets/summercamp/ch_pics/day_18.png', - completion_text: 'Well done, you’ve made a beautiful poster! Now play around with the random values and the text. What else is the poster missing?', - difficulty : 1, - startAt : 0, - summerCamp : true, - rewards : null, - steps : generate.fromSequence([ - [ - 'Up above the clouds the sky is blue, **type** `background blue`', - 'background blue', - [ - [ 'background', { color: palette.blue } ] - ] - ], - [ - 'Camp Kano’s mountains are a beautiful shade of dark blue. Set the drawing colour with `color darkblue`.', - 'color darkblue', - [ - [ 'color', { color: palette.darkblue } ] - ] - ], - [ - 'The mountains also have a nice thick border, give them `stroke 10, white`', - 'stroke 10, white', - [ - [ 'stroke-color', { color: palette.white } ], - [ 'stroke-width', { width: 10 } ] - ] - ], - - - [ - 'Lets draw the ten mountains of Camp Kano with a loop! This will be much faster than drawing them individually. **Type** `for i in [ 0 ... 10 ]` to open the loop.', - 'for i in [ 0 ... 10 ]', - [ - [ 'for-loop', { iterator: 'i', range: '0...10' } ] - ] - ], - [ - 'For every time the loop runs, we want a mountain’s peak to be drawn randomly across the screen. Let’s select an x value with `x = random 0, 500`', - 'x = random 0, 500', - function () { // None of the looping works with or without the - var out = []; - for (var i = 0; i < 10; i++) { - out.push([ 'var', function (opts) { - return opts.name === 'x' && opts.value === 'random0,500'; - }]); - } - return out; - } - ], - [ - 'However, for the y value, we only want each mountain’s peak to be drawn on the top part of the screen. **Type** `y = random 0, 200`', - 'y = random 0, 200', - function () { - var out = []; - var i = 0; - for (i = 0; i < 10; i++) { - out.push([ 'var', function (opts) { - return opts.name === 'x' && opts.value === 'random0,500'; - }]); - out.push([ 'var', function (opts) { - return opts.name === 'y' && opts.value === 'random0,200' - }]); - } - return out; - }, - {override: true} - ], - [ - 'Now with our x and y values set we can move the cursor to them. **Type** `moveTo x, y`', - 'moveTo x, y', - function () { - var out = []; - for (var i = 0; i < 10; i++) { - out.push([ 'var', function (opts) { - return opts.name === 'x' && opts.value === 'random0,500'; - }]); - out.push([ 'var', function (opts) { - return opts.name === 'y' && opts.value === 'random0,200' - }]); - out.push( - ['move-to', function (opts) { - return (opts.x >= 0 && opts.x <= 500) && (opts.y > 0 && opts.y <= 200) - }] - ); - } - return out; - }, - {override: true} - ], - [ - 'Draw a mountain for every loop with the polygon function. **Type** `polygon 400, 500, -400, 500`', - 'polygon 400, 500, -400, 500', - function () { - var out = []; - var i = 0; - - for (i = 0; i < 10; i++) { - out.push([ 'var', function (opts) { - return opts.name === 'x' && opts.value === 'random0,500'; - }]); - out.push([ 'var', function (opts) { - return opts.name === 'y' && opts.value === 'random0,200' - }]); - out.push( - ['move-to', function (opts) { - return (opts.x >= 0 && opts.x <= 500) && (opts.y > 0 && opts.y <= 200) - }] - ); - out.push( - [ 'polygon', { points: [ - { x: 0, y: 0 }, - { x: 400, y: 500 }, - { x: -400, y: 500 } - ]}] - ); - } - return out; - }, - {override: true} - ], - [ - 'First, get out of the previous for loop’s indent by pressing `BACKSPACE`. Now let’s draw some clouds with `stroke 0`', - 'stroke 0', - [ - [ 'stroke-width', { width: 0 } ] - ] - ], - [ - 'Clouds are made of small droplets of water vapor, which is see-through! To get a see-through color we use the `opacity` function. **Type** `color (opacity white, .1)`', - 'color(opacity white, .1)', - [ - [ 'color', { color: 'rgba(255, 255, 255, 0.1)' } ] - ] - ], - [ - 'Now let’s make a new loop to draw the cloud puffs. We’ll need a lot, so let’s make this a loop last 300 iterations. **Type** `for j in [ 0 ... 250 ]`.', - 'for j in [ 0 ... 250 ]', - [ - [ 'for-loop', { iterator: 'j', range: '0...250' } ] - ] - ], - [ - 'We want cloud puffs sprinkled randomly across the screen, so lets choose an x value between 0 and 500 with`x = random 0, 500`', - 'x = random 0, 500', - function () { - var out = []; - var i=0; - for (i = 0; i < 250; i++) { - out.push([ 'var', function (opts) { - return opts.name === 'x' && opts.value === 'random0,500'; - }]); - } - return out; - } - ], - [ - 'However, for the y value, we only want the cloud puffs to be drawn on the bottom part of the screen. **Type** `y = random 300, 500`', - 'y = random 300, 500', - function () { - var out = []; - for (var i = 0; i < 250; i++) { - out.push([ 'var', function (opts) { - return opts.name === 'x' && opts.value === 'random0,500'; - }]); - out.push([ 'var', function (opts) { - return opts.name === 'y' && opts.value === 'random300,500'; - }]); - } - return out; - }, - {override: true} - ], - [ - 'Now with our x and y values set we can move the cursor to them. **Type** `moveTo x, y`', - 'moveTo x, y', - function () { - var out = []; - for (var i = 0; i < 250; i++) { - out.push([ 'var', function (opts) { - return opts.name === 'x' && opts.value === 'random0,500'; - }]); - out.push([ 'var', function (opts) { - return opts.name === 'y' && opts.value === 'random300,500'; - }]); - out.push( - ['move-to', function (opts) { - return (opts.x >= 0 && opts.x <= 500) && (opts.y >= 300 && opts.y <= 500); - }] - ); - } - return out; - }, - {override: true} - ], - [ - 'Let’s draw the cloud puff—a big transparent `circle` of size `100`', - 'color blue', - function () { - var out = []; - for (var i = 0; i < 250; i++) { - out.push([ 'var', function (opts) { - return opts.name === 'x' && opts.value === 'random0,500'; - }]); - out.push([ 'var', function (opts) { - - return opts.name === 'y' && opts.value === 'random300,500'; - }]); - out.push( - ['move-to', function (opts) { - return (opts.x >= 0 && opts.x <= 500) && (opts.y >= 300 && opts.y <= 500); - }] - ); - out.push([ 'ellipse', { rx: 100, isCircle: true } ]); - } - return out; - }, - {override: true} - ], - [ - 'Press `BACKSPACE` once to get out of the indented line. Then lets move the cursor into place for some text with `moveTo 250, 350`', - 'moveTo 250, 350', - [ - [ 'move-to', { x: 250, y: 350 } ] - ] - ], - [ - 'Set the drawing color to red - **type** `color red`', - 'color red', - [ - [ 'color', { color: palette.red } ] - ] - ], - [ - 'Our message should be strong and impactful, so lets set the font to bold with `bold true`', - 'bold true', - [ - [ 'text-bold', {state: true} ] - ] - ], - [ - 'We also want to style our text with italics, do this with `italic true`', - 'bold true', - [ - [ 'text-italic', { state: true } ] - ] - ], - [ - 'Finally lets select Bariol at point size 40 with `font \'Bariol\', 40`', - 'font \'Bariol\', 40', - [ - [ 'font-family', { font: 'Bariol' } ], - [ 'text-size', { size: '40' } ] - ] - ], - [ - 'Start your message off with `text \'Hike the Blue Mountains of\'`', - 'text \'Hike the Blue Mountains of\'', - [ - [ 'text', { value: 'Hike the Blue Mountains of' } ] - ] - ], - [ - 'Now for a new line with a big bold finish. **Type** `font 90`', - 'font \'Bariol\', 90', - [ - [ 'text-size', { size: '90' } ] - ] - ], - [ - 'Lets move the cursor down into place for the final line with `move 0, 90`', - 'move 0, 90', - [ - [ 'move-to', { dx: 0, dy: 90 } ] - ] - ], - [ - 'The finishing touch: **type** `text \'Camp Kano!\'`', - 'text \'Camp Kano!\'', - [ - [ 'text', { value: 'Camp Kano!' } ] - ] - ] - ]) -}; diff --git a/lib/challenges/summer_camp/day_eleven.js b/lib/challenges/summer_camp/day_eleven.js deleted file mode 100644 index cd90c8771..000000000 --- a/lib/challenges/summer_camp/day_eleven.js +++ /dev/null @@ -1,156 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_eleven', - title : 'Cheeky Bear', - short_title : 'Bear', - description : 'Bears are very smart and have been known to roll rocks into bear traps to set off the trap and then eat the bait in safety. These animals can run up to 40 miles per hour, fast enough to catch a running horse. Take into account that the fastest known human alive today is Usain Bolt, who can run at 27mph! And because bears can walk short distances on their hind legs, some Native Americans called them \“the beast that walks like a man.\”', - icon_class : 'challenge_bear', - img : '/assets/summercamp/ch_pics/day_11.png', - completion_text: 'That cute bear needs a body, and a habitat. Use your code skills to impress other campers with your abilities! Remember that the icons on your left can help you achieve what you have in mind.', - difficulty : 1, - startAt : 0, - summerCamp : true, - rewards : null, - steps : generate.fromSequence([ - [ - 'The bear lives in the forest. Set the background color to green - **type** `background green`', - 'background green', - [ - [ 'background', { color: palette.green } ] - ] - ], - [ - 'The bear has brown fur, let\'s start to draw his face by getting our paint ready - **type** `color brown`', - 'color brown', - [ - [ 'color', { color: palette.brown } ] - ] - ], - [ - 'Set the stroke to 0, to avoid drawing lines - **type** `stroke 0`', - 'stroke 0', - [ - [ 'stroke-width', { 'width': 0 } ] - ] - ], - [ - 'Draw the face with a circle - **type** `circle 100`', - 'circle 100', - [ - [ 'ellipse', { rx: 100, isCircle: true } ] - ] - ], - [ - 'Now let\'s move the cursor to draw his left ear - **type** `move -80, -80`', - 'move -80, -80', - [ - [ 'move-to', { dx: -80, dy: -80 } ] - ] - ], - [ - 'Draw the ear with a `circle` of size `30`', - 'circle 30', - [ - [ 'ellipse', { rx: 30, isCircle: true } ] - ] - ], - [ - 'Move the cursor to the right to draw his other ear - **type** `move 160`', - 'move 160', - [ - [ 'move-to', { dx: 160 } ] - ] - ], - [ - 'Draw another ear (just like the last one)', - 'circle 30', - [ - [ 'ellipse', { rx: 30, isCircle: true } ] - ] - ], - [ - 'Now head over to where the left eye will go - **type** `move -110, 50`', - 'move -110, 50', - [ - [ 'move-to', { dx: -110, dy: 50 } ] - ] - ], - [ - 'The rest of the bear\'s facial features will be `black`, so lets set the `color`', - 'color black', - [ - [ 'color', { color: palette.black } ] - ] - ], - [ - 'Draw the first eye - **type** `circle 5`', - 'circle 5', - [ - [ 'ellipse', { rx: 5, isCircle: true } ] - ] - ], - [ - 'Next move over to where the other eye goes - **type** `move 60`', - 'move 60', - [ - [ 'move-to', { dx: 60 } ] - ] - ], - [ - 'Fill in the other eye just like the last one', - 'circle 5', - [ - [ 'ellipse', { rx: 5, isCircle: true } ] - ] - ], - [ - 'Move to the center of the face for the bear\'s most distinctive feature - **type** `move -30, 50`', - 'move -30, 50', - [ - [ 'move-to', { dx: -30, dy: 50 } ] - ] - ], - [ - 'Draw his nose with a triangle using polygon - **type** `polygon 12, -16, -12, -16`', - 'polygon 12, -16, -12, -16', - [ - [ 'polygon', { points: [ - { x: 0, y: -0 }, - { x: 12, y: -16 }, - { x: -12, y: -16 } - ] } ] - ] - ], - [ - 'Let\'s get ready to draw the mouth by moving down a bit further - **type** `move 0, 20`', - 'move 0, 20', - [ - [ 'move-to', { dx: 0, dy: 20 } ] - ] - ], - [ - 'Set the `stroke` (the outline of a shape) to size `3` and `black`', - 'stroke black, 3', - [ - [ 'stroke-color', { color: palette.black } ], - [ 'stroke-width', { width: 3 } ] - ] - ], - [ - 'We don\'t want the mouth to be filled so set its color to null - **type** `color null`', - 'color null', - [ - [ 'color', null ] - ] - ], - [ - 'An arc is part of a cirlce, just like a smiling mouth - **type** `arc 15, 0.5, 2`', - 'arc 15, 0.5, 2', - [ - [ 'arc', { radius: 15, start: 0.5, end: 2 }] - ] - ] - ]) -}; \ No newline at end of file diff --git a/lib/challenges/summer_camp/day_fifteen.js b/lib/challenges/summer_camp/day_fifteen.js deleted file mode 100644 index 1b7508c81..000000000 --- a/lib/challenges/summer_camp/day_fifteen.js +++ /dev/null @@ -1,194 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_fifteen', - title : 'Bow and Arrow', - short_title : 'Bow and Arrow', - icon_class : 'challenge_bow', - description : 'Shooting a bow and arrow at a target is an art that requires lots of focus. This challenge is to draw a bow and try to hold it steady while your hand jitters...just like the other humans who have used the bow and arrow for hunting since the dawn of civilization over ten thousand years ago. The oldest known bow, found in Denmark, dates from 9000 BCE!', - img : '/assets/summercamp/ch_pics/day_15.png', - completion_text: 'Click Refresh and watch the target move while you try to hold your bow steady! Try getting rid of the moving background to make it easier to hit the target, converting your bow to a crossbow, or drawing an arrow in the bullseye.', - difficulty : 1, - startAt : 0, - summerCamp : true, - rewards : null, - steps : generate.fromSequence([ - [ - 'The weather is good today...there is no wind to blow our arrows off course. Set the background color to blue - **type** `background blue`.', - 'background lightblue', - [ - [ 'background', { color: palette.blue } ] - ] - ], - [ - 'We want the background to jitter, so we will start drawing it at a random point. **Type** `moveTo (random -20, 0), (random 240, 260)`.', - 'moveTo (random -20, 0), (random 240, 260)', - [ - [ 'move-to', function (options) { - return options.x >= -20 - && options.x <= 0 - && options.y >= 240 - && options.y <= 260 - }] - ] - ], - [ - 'Our target is in a grassy field, so let\s get our `color green` ready', - 'color green', - [ - [ 'color', { color: palette.green } ] - ] - ], - [ - 'Draw a big `rectangle` that is `550` pixels high and `300` pixels wide for the grass', - 'rectangle 550, 300', - [ - [ 'rectangle', { width: 550, height: 300 } ] - ] - ], - [ - 'Now let\'s move the cursor to draw our target - **type** `move 275, 10`', - 'move 275, 10', - [ - [ 'move-to', { dx: 275, dy: 10 } ] - ] - ], - [ - 'First we will draw the wooden legs supporting it - **type** `stroke brown, 15`', - 'stroke brown, 15', - [ - [ 'stroke-color', { color: palette.brown } ], - [ 'stroke-width', { width: 15 } ] - ] - ], - [ - 'Draw the left leg - **type** `line -80, 120`...', - 'line -80, 120', - [ - [ 'line', { dx: -80, dy: 120 } ] - ] - ], - [ - '...and now draw the right leg - **type** `line 80, 120`', - 'line 80, 120', - [ - [ 'line', { dx: 80, dy: 120 } ] - ] - ], - [ - 'We will draw a target with white and red rings - **type** `stroke white, 50`', - 'stroke white, 50', - [ - [ 'stroke-color', { color: palette.white } ], - [ 'stroke-width', { width: 50 } ] - ] - ], - [ - 'Now make the inside of the circle red - **type** `color red`', - 'color red', - [ - [ 'color', { color: palette.red } ] - ] - ], - [ - 'First, draw a circle with a radius of 80 pixels- **type** `circle 80`', - 'circle 80', - [ - [ 'ellipse', { rx: 80, isCircle: true } ] - ] - ], - [ - 'Second, draw a `circle` with a radius of `30` pixels', - 'circle 30', - [ - [ 'ellipse', { rx: 30, isCircle: true } ] - ] - ], - [ - 'Move the cursor to draw an arrowhead - **type** `moveTo 250, 220`', - 'moveTo 250, 220', - [ - [ 'move-to', { x: 250, y: 220 } ] - ] - ], - [ - 'Our arrowhead will have a thin gray outline - **type** `stroke gray, 1`', - 'stroke gray, 1', - [ - [ 'stroke-color', { color: palette.gray } ], - [ 'stroke-width', { width: 1 } ] - ] - ], - [ - 'The flint arrowhead is going to have the `color dimgray`', - 'color dimgray', - [ - [ 'color', { color: palette.dimgray } ] - ] - ], - [ - 'Draw the arrowhead as a diamond - **type** `polygon -10, 40, 0, 80, 10, 40`', - 'polygon -10, 40, 0, 80, 10, 40', - [ - [ 'polygon', { points: [ - { x: 0, y: 0 }, - { x: -10, y: 40 }, - { x: 0, y: 80 }, - { x: 10, y: 40 } - ] } ] - ] - ], - [ - 'Next we will move to draw the shaft of the arrow - **type** `move 0, 40`', - 'move 0, 40', - [ - [ 'move-to', { dx: 0, dy: 40 } ] - ] - ], - [ - 'The arrow will be made of a light brown wood - **type** `stroke lightbrown, 20`', - 'stroke lightbrown, 20', - [ - [ 'stroke-color', { color: palette.lightbrown } ], - [ 'stroke-width', { width: 20 } ] - ] - ], - [ - 'Draw a line for the shaft - **type** `line 200, 360`', - 'line 200, 360', - [ - [ 'line', { dx: 200, dy: 360 } ] - ] - ], - [ - 'The last thing we will draw is our bow. Move the cursor off the screen - **type** `moveTo 800, 375`', - 'moveTo 800, 375', - [ - [ 'move-to', { x: 800, y: 375 } ] - ] - ], - [ - 'We are going to draw an arc for the bow so let\'s draw it with a thick piece of dark brown wood - **type** `stroke darkbrown, 40`', - 'stroke darkbrown, 40', - [ - [ 'stroke-color', { color: palette.darkbrown } ], - [ 'stroke-width', { width: 40 } ] - ] - ], - [ - 'We don\'t want the arc to have any fill - **type** `color null`', - 'color null', - [ - [ 'color', null ] - ] - ], - [ - 'Draw the bow with a big arc centered far off the screen - **type** `arc 500, 0, 2`', - 'arc 500, 0, 2', - [ - [ 'arc', { radius: 500, start: 0, end: 2 }] - ] - ], - ]) -}; diff --git a/lib/challenges/summer_camp/day_five.js b/lib/challenges/summer_camp/day_five.js deleted file mode 100644 index 51385e46a..000000000 --- a/lib/challenges/summer_camp/day_five.js +++ /dev/null @@ -1,91 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_five', - title : 'Camp Badge', - short_title : 'Camp Badge', - icon_class : 'challenge_badge', - description : 'First Aid is the most popular merit badge. In fact, 6.9 million Scouts have earned it since its debut in 1911. Other popular ones are Environmental Science, Search and Rescue, and our favourites Programming and Game Design! There are some oddballs as well. For example Truck transportation: \“Assume that you are going to ship by truck 500 pounds of goods (freight class 65) from your town to another town 500 miles away. Your shipment must arrive within three days. Explain in writing…\”. And Nuclear Science \“Obtain a sample of irradiated and non-irradiated foods. Prepare the two foods and compare their taste and texture.\”', - completion_text: 'This badge will distinguish your camp from others. Surprise the world with an amazing creation.', - img : '/assets/summercamp/ch_pics/day_5.png', - difficulty : 1, - startAt : 4, - summerCamp : true, - rewards : null, - steps : generate.fromSequence([ - [ - 'Set the `background` color to `black`', - 'background black', - [ - [ 'background', { color: palette.black } ] - ] - ], - [ - 'Set the `color` of your badge to `lightblue`', - 'color lightblue', - [ - [ 'color', { color: palette.lightblue } ] - ] - ], - [ - 'Set the stroke for the first circle - **type** `stroke red, 20`', - 'stroke red, 20', - [ - [ 'stroke-color', { color: palette.red } ], - [ 'stroke-width', { width: 20 } ] - ] - ], - [ - 'Draw a `circle` with a size of `200`', - 'circle 200', - [ - [ 'ellipse', { rx: 200, isCircle: true } ] - ] - ], - [ - 'Set the stroke for the second circle - **type** `stroke yellow, 20`', - 'stroke yellow, 20', - [ - [ 'stroke-color', { color: palette.yellow } ], - [ 'stroke-width', { width: 20 } ] - ] - ], - [ - 'Draw a `circle` with a size of `190`', - 'circle 190', - [ - [ 'ellipse', { rx: 190, isCircle: true } ] - ] - ], - [ - 'Set the `stroke` for the third circle to size `20` and `purple` color', - 'stroke purple, 20', - [ - [ 'stroke-color', { color: palette.purple } ], - [ 'stroke-width', { width: 20 } ] - ] - ], - [ - 'Draw a `circle` with a size of `180`', - 'circle 180', - [ - [ 'ellipse', { rx: 180, isCircle: true } ] - ] - ], - [ - 'Add some decoration inside. Set the `color` to `green`', - 'color green', - [ - [ 'color', { color: palette.green } ] - ] - ], - [ - 'An arc is part of a cirlce, draw one that matches the inner circle - **type** `arc 180, 1, 2`', - 'arc 180, 1, 2', - [ - [ 'arc', { radius: 180, start: 1, end: 2 } ] - ] - ] - ]) -}; diff --git a/lib/challenges/summer_camp/day_four.js b/lib/challenges/summer_camp/day_four.js deleted file mode 100644 index ef162c965..000000000 --- a/lib/challenges/summer_camp/day_four.js +++ /dev/null @@ -1,123 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_four', - title : 'Create your Flag', - short_title : 'Flag', - description : 'Time to show your true colors. Your campsite is shaping up, and as the campsite’s leader you need to make a flag. We’ve got you started with the basics for a flag and flagpole, but it is up to you to to make it your own. \nYou can look to other flags for inspiration. Countries like France, Nigeria, Sweden, and Switzerland all have very simple color and shape designs, while Spain, Brazil, Kenya, and Saudi Arabia all feature complex designs. When you are done, share your flag to lay claim to your little bit of land!', - icon_class : 'challenge_flag', - completion_text: 'You have a white canvas in front of you, use it wisely. Create the most amazing flag the world has ever seen!', - img : '/assets/summercamp/ch_pics/day_4.png', - difficulty : 1, - startAt : 3, - summerCamp : true, - rewards : {'outfit': 1}, - steps : generate.fromSequence([ - [ - 'Draw the sky where the flag will flutter - **type** `background blue`', - 'background blue', - [ - [ 'background', { color: palette.blue } ] - ] - ], - [ - 'Set the stroke to 0, to avoid drawing lines - **type** `stroke 0`', - 'stroke 0', - [ - [ 'stroke-width', { 'width': 0 } ] - ] - ], - [ - 'Let\'s move the cursor to place our flagpole in the correct place - **type** `moveTo 100, 100`', - 'moveTo 100, 100', - [ - [ 'move-to', { x: 100, y: 100 } ] - ] - ], - [ - 'Set the `color` of the flagpole to `darkgray`', - 'color darkgray', - [ - [ 'color', { color: palette.darkgray } ] - ] - ], - [ - 'Draw a long, thin pole with a rectangle - **type** `rectangle 10, 400`', - 'rectangle 10, 400', - [ - [ 'rectangle', { width: 10, height: 400 } ] - ] - ], - [ - 'Move the cursor to place a ball on top-centre of the flagpole - **type** `move 5`', - 'move 5', - [ - [ 'move-to', { dx: 5, dy: 0 } ] - ] - ], - [ - 'Set the `color` of the ornament to `gold`', - 'color gold', - [ - [ 'color', { color: palette.gold } ] - ] - ], - [ - 'Draw a circle with a size of 8 - in a new line **type** `circle 8`', - 'circle 8', - [ - [ 'ellipse', { rx: 8, isCircle: true } ] - ] - ], - [ - 'Now move the cursor to start drawing our flag - **type** `moveTo 115, 123`', - 'moveTo 115, 123', - [ - [ 'move-to', { x: 115, y: 123 } ] - ] - ], - [ - 'Set the `color` of the flag to `white`', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - 'Draw the flag with a `rectangle` of size `261` and `171`', - 'rectangle 261, 171', - [ - [ 'rectangle', { width: 261, height: 171 } ] - ] - ], - [ - 'That flag needs something to hold of to - **type** `moveTo 100, 140`', - 'moveTo 100, 140', - [ - [ 'move-to', { x: 100, y: 140 } ] - ] - ], - [ - 'Set the `color` of the holder to `brown`', - 'color brown', - [ - [ 'color', { color: palette.brown } ] - ] - ], - [ - 'Draw the holder with a `20` by `5` `rectangle`', - 'rectangle 20, 5', - [ - [ 'rectangle', { width: 20, height: 5 } ] - ] - ], - [ - 'Now is your turn! Draw an amazing pattern on it - **type** `moveTo 120, 125`', - 'moveTo 120, 125', - [ - [ 'move-to', { x: 120, y: 125 } ] - ] - ], - ]) -}; diff --git a/lib/challenges/summer_camp/day_fourteen.js b/lib/challenges/summer_camp/day_fourteen.js deleted file mode 100644 index b67afba51..000000000 --- a/lib/challenges/summer_camp/day_fourteen.js +++ /dev/null @@ -1,285 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_fourteen', - title : 'Relax watching a movie', - short_title : 'Cinema', - icon_class : 'challenge_cinema', - description : 'After playing a short movie presentation by the Skladanowsky brothers in 1895 which consisted of numerous very short 6-second films accompanied by a specially composed piece of music, the Berlin Wintergarten theatre in Mitte, Berlin, became known as the first ever movie theatre. Unfortunately the theatre was destroyed by bombs in 1944, during the Second World War.', - img : '/assets/summercamp/ch_pics/day_14.png', - completion_text: 'What good is a cinema without a movie playing? Go ahead and try drawing a scene from your favourite movie up on the big screen, and maybe a few friends to watch the film with you! Don\'t forget the popcorn!', - difficulty : 2, - startAt : 0, - summerCamp : true, - rewards : {'wallpaper': 1}, - steps : generate.fromSequence([ - [ - 'It\'s dark in the cinema. Set the `background` color to `black`', - 'background black', - [ - [ 'background', { color: palette.black } ] - ] - ], - [ - 'Set the `stroke` to `0` in a new line', - 'stroke 0', - [ - [ 'stroke-width', { 'width': 0 } ] - ] - ], - [ - 'First, move the cursor to place the floor - **type** `moveTo 0, 300`', - 'moveTo 0, 300', - [ - [ 'move-to', { x: 0, y: 300 } ] - ] - ], - [ - 'Set the floor `color` to `gray`', - 'color gray', - [ - [ 'color', { color: palette.gray } ] - ] - ], - [ - 'Draw the floor with a rectangle - **type** `rectangle 500, 200`', - 'rectangle 500, 200', - [ - [ 'rectangle', { width: 500, height: 200 } ] - ] - ], - [ - 'Now, move the cursor to place the screen - **type** `moveTo 50, 20`', - 'moveTo 50, 20', - [ - [ 'move-to', { x: 50, y: 20 } ] - ] - ], - [ - 'Set the screen `color` to `white`', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - 'The screen is a perfect `rectangle` of size `400` by `250`', - 'rectangle 400, 250', - [ - [ 'rectangle', { width: 400, height: 250 } ] - ] - ], - [ - 'Amazing! This theatre needs a curtain - **type** `moveTo 0`', - 'moveTo 0', - [ - [ 'move-to', { x: 0, y: 0 } ] - ] - ], - [ - 'Set the curtain `color` to `red`', - 'color red', - [ - [ 'color', { color: palette.red } ] - ] - ], - [ - 'Draw a vertical curtain as a `rectangle` of size `30` by `330`', - 'rectangle 30, 330', - [ - [ 'rectangle', { width: 30, height: 330 } ] - ] - ], - [ - 'Now draw an horizontal curtain size `500` by `10` in the same way', - 'rectangle 500, 10', - [ - [ 'rectangle', { width: 500, height: 10 } ] - ] - ], - [ - 'Looking great! Place the curtain on the right - **type** `move 470`', - 'move 470', - [ - [ 'move-to', { dx: 470, dy: 0 } ] - ] - ], - [ - 'Draw a vertical curtain, same as the one the left', - 'rectangle 30, 330', - [ - [ 'rectangle', { width: 30, height: 330 } ] - ] - ], - [ - 'This theatre needs some seats for our audience - **type** `moveTo 0, 360`', - 'moveTo 0, 360', - [ - [ 'move-to', { x: 0, y: 360 } ] - ] - ], - [ - 'Set the outline of the seats with a `stroke` of `10` and `orangered` color.', - 'stroke orangered, 10', - [ - [ 'stroke-color', { color: palette.orangered } ], - [ 'stroke-width', { 'width': 10 } ] - ] - ], - [ - 'Let\'s draw 3 rows and 6 columns of seats with a loop - **type** `for x in [ 1 .. 3 ]`', - 'for x in [ 1 .. 3 ]', - [ - [ 'for-loop', { iterator: 'x', range: '1..3' } ] - ] - ], - [ - 'Set the `color` of the seats to `red`', - ' line 250', - function () { - var x = 0, - out = []; - - for (x = 0; x < 3; x += 1) { - out.push([ 'color', { color: palette.red } ]); - } - return out; - } - ], - [ - 'Now draw a `rectangle` for the seats, size `500` by `40`', - ' rectangle 500, 40', - function () { - var x = 0, - out = []; - - for (x = 0; x < 3; x += 1) { - out.push([ 'color', { color: palette.red } ]); - out.push([ 'rectangle', { width: 500, height: 40 } ]); - } - return out; - }, - { override: true } - ], - [ - 'Move the cursor down to place the back of the seats - **type** `move 0, 50`', - ' move 0, 50', - function () { - var x = 0, - out = []; - - for (x = 0; x < 3; x += 1) { - out.push([ 'color', { color: palette.red } ]); - out.push([ 'rectangle', { width: 500, height: 40 } ]); - out.push([ 'move-to', { dx: 0, dy: 50 } ]); - } - return out; - }, - { override: true } - ], - [ - 'Inside the loop, open a second loop for the back of the seats - **type** `for y in [ 1 .. 6 ]`', - ' for y in [ 1 .. 6 ]', - function () { - var out = [], - x; - - for (x = 0; x < 3; x += 1) { - out.push([ 'color', { color: palette.red } ]); - out.push([ 'rectangle', { width: 500, height: 40 } ]); - out.push([ 'move-to', { dx: 0, dy: 50 } ]); - out.push([ 'for-loop', { iterator: 'y', range: '1..6' } ]); - } - return out; - }, - { override: true } - ], - [ - 'Set the `color` of the backseat to `darkred`', - ' color darkred', - function () { - var out = [], - x; - - for (x = 0; x < 3; x += 1) { - out.push([ 'color', { color: palette.red } ]); - out.push([ 'rectangle', { width: 500, height: 40 } ]); - out.push([ 'move-to', { dx: 0, dy: 50 } ]); - out.push([ 'for-loop', { iterator: 'y', range: '1..6' } ]); - for (y = 0; y < 6; y += 1) { - out.push([ 'color', { color: palette.darkred } ]); - } - } - return out; - }, - { override: true } - ], - [ - 'Brilliant! Almost there. Now draw the back of the seat with an arc - **type** `arc 60, 0, 1`', - ' arc 60, 0, 1', - function () { - var out = [], - x; - - for (x = 0; x < 3; x += 1) { - out.push([ 'color', { color: palette.red } ]); - out.push([ 'rectangle', { width: 500, height: 40 } ]); - out.push([ 'move-to', { dx: 0, dy: 50 } ]); - out.push([ 'for-loop', { iterator: 'y', range: '1..6' } ]); - for (y = 0; y < 6; y += 1) { - out.push([ 'color', { color: palette.darkred } ]); - out.push([ 'arc', { radius: 60, start: 0, end: 1 }]); - } - } - return out; - }, - { override: true } - ], - [ - 'Now separate the seats `130` pixels to the right', - ' move 130', - function () { - var out = [], - x; - - for (x = 0; x < 3; x += 1) { - out.push([ 'color', { color: palette.red } ]); - out.push([ 'rectangle', { width: 500, height: 40 } ]); - out.push([ 'move-to', { dx: 0, dy: 50 } ]); - out.push([ 'for-loop', { iterator: 'y', range: '1..6' } ]); - for (y = 0; y < 6; y += 1) { - out.push([ 'color', { color: palette.darkred } ]); - out.push([ 'arc', { radius: 60, start: 0, end: 1 }]); - out.push([ 'move-to', { dx: 130, dy: 0 } ]); - } - } - return out; - }, - { override: true } - ], - [ - 'Last, make sure new rows are positioned correctly - Press **Enter**, then **Backspace** and **type** `move -800` inside the **first** loop', - ' move -800', - function () { - var out = [], - x; - - for (x = 0; x < 3; x += 1) { - out.push([ 'color', { color: palette.red } ]); - out.push([ 'rectangle', { width: 500, height: 40 } ]); - out.push([ 'move-to', { dx: 0, dy: 50 } ]); - out.push([ 'for-loop', { iterator: 'y', range: '1..6' } ]); - for (y = 0; y < 6; y += 1) { - out.push([ 'color', { color: palette.darkred } ]); - out.push([ 'arc', { radius: 60, start: 0, end: 1 }]); - out.push([ 'move-to', { dx: 130, dy: 0 } ]); - } - out.push([ 'move-to', { dx: -800, dy: 0 } ]); - } - return out; - }, - { override: true } - ], - ]) -}; diff --git a/lib/challenges/summer_camp/day_nine.js b/lib/challenges/summer_camp/day_nine.js deleted file mode 100644 index e5917037f..000000000 --- a/lib/challenges/summer_camp/day_nine.js +++ /dev/null @@ -1,161 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_nine', - title : 'A compass is an essential tool', - short_title : 'Compass', - icon_class : 'challenge_compass', - description : 'Essentially a compass is a magnet, generally a magnetized needle. Since opposites attract the southern pole of the needle is attracted to the Earth\'s natural magnetic north pole. Did you know that you can create your own simply with a paperclip, cork and a magnet?', - img : '/assets/summercamp/ch_pics/day_9.png', - completion_text: 'Now try adding the rest of the \'compass rose\' components: the other cardinal directions (E, S, W and even NE, NW, SE and SW). Why not a hand holding it?', - difficulty : 1, - startAt : 0, - summerCamp : true, - rewards : {'wallpaper': 1}, - steps : generate.fromSequence([ - [ - 'Select `lightgray` for the `background`', - 'background lightgray', - [ - [ 'background', { color: palette.lightgray } ] - ] - ], - [ - 'In a new line, set the outline of your compass with a `stroke` of `20` and `gold` color', - 'stroke gold, 20', - [ - [ 'stroke-color', { color: palette.gold } ], - [ 'stroke-width', { 'width': 20 } ] - ] - ], - [ - 'Set the `color` of the compass to `gray`', - 'color gray', - [ - [ 'color', { color: palette.gray } ] - ] - ], - [ - 'Your compass is a `circle` with size `110`', - 'circle 110', - [ - [ 'ellipse', { rx: 110, isCircle: true } ] - ] - ], - [ - 'Set the `color` to `darkgray` for the second half of the compass', - 'color darkgray', - [ - [ 'color', { color: palette.darkgray } ] - ] - ], - [ - 'Set the `stroke` back to `0`', - 'stroke 0', - [ - [ 'stroke-width', { 'width': 0 } ] - ] - ], - [ - 'Draw an arc that matches the top half of the compass - **type** `arc 105, 2, 1`', - 'arc 105, 2, 1', - [ - [ 'arc', { radius: 105, start: 2, end: 1 } ] - ] - ], - [ - 'We need to mark the north somehow - in a new line **type** `moveTo 250, 175`', - 'moveTo 250, 175', - [ - [ 'move-to', { x: 250, y: 175 } ] - ] - ], - [ - 'Set the `color` to `gold`', - 'color gold', - [ - [ 'color', { color: palette.gold } ] - ] - ], - [ - 'Set the `font` to `\'cursive\'` and size `25`', - 'font \'cursive\', 25', - [ - [ 'font-family', { font: 'cursive' } ], - [ 'text-size', { size: '25' } ], - ] - ], - [ - 'Write an N to represent north - **type** `text \'N\'`', - 'text \'N\'', - [ - [ 'text', { value: 'N' } ] - ] - ], - [ - 'Now we need a needle with 2 sides. Set the `color` to `red` for the first side', - 'color red', - [ - [ 'color', { color: palette.red } ] - ] - ], - [ - 'Move the cursor to position the needle **type** `moveTo 230, 250`', - 'moveTo 230, 250', - [ - [ 'move-to', { x: 230, y: 250 } ] - ] - ], - [ - 'Draw a triangle with a polygon - **type** `polygon 20, -90, 40, 0`', - 'polygon 20, -90, 40, 0', - [ - [ 'polygon', { points: [ - { x: 0, y: -0 }, - { x: 20, y: -90 }, - { x: 40, y: -0 } - ] } ] - ] - ], - [ - 'Excellent! Set the `color` to `white` for the second side of the needle', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - 'Draw the second part - **type** `polygon 20, 90, 40, 0`', - 'polygon 20, 90, 40, 0', - [ - [ 'polygon', { points: [ - { x: 0, y: -0 }, - { x: 20, y: 90 }, - { x: 40, y: -0 } - ] } ] - ] - ], - [ - 'Finish it with one last detail. Set the `color` to `gold`', - 'color gold', - [ - [ 'color', { color: palette.gold } ] - ] - ], - [ - 'Move the cursor to the center of the compass **type** `move 20`', - 'move 20', - [ - [ 'move-to', { dx: 20, dy: 0 } ] - ] - ], - [ - 'Draw a `circle` of size `20`', - 'circle 20', - [ - [ 'ellipse', { rx: 20, isCircle: true } ] - ] - ] - ]) -}; diff --git a/lib/challenges/summer_camp/day_nineteen.js b/lib/challenges/summer_camp/day_nineteen.js deleted file mode 100644 index c5b251fa5..000000000 --- a/lib/challenges/summer_camp/day_nineteen.js +++ /dev/null @@ -1,91 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_nineteen', - title : 'Foraging', - short_title : 'Foraging', - icon_class : 'challenge_foraging', - description : 'The wild is full of plants and fauna to eat. From stinging nettles, to mushrooms, and a multitude of berries, any meal can be improved with naturally growing foods. Berries are common in many parts of the world, and at Camp Kano they run wild even though they are hard to find. You might need to use your coding skills to find them.', - img : '/assets/summercamp/ch_pics/day_19.png', - completion_text: 'But wait! Where are the berries you are meant to be foraging for? Use `color red`, `moveTo`, and `square 25` to add some extra berries to the scene!', - difficulty : 1, - startAt : 0, - summerCamp : true, - rewards : {'wallpaper': 1}, - steps : generate.fromSequence([ - [ - 'Set `stroke` to `0`', - 'stroke 0', - [ - [ 'stroke-width', { width: 0 } ] - ] - ], - [ - 'It’s a bright sunny day! Set `background` to `blue`.', - 'background blue', - [ - [ 'background', { color : palette.blue } ] - ] - ], - [ - 'Our foraging scene needs a grass field to start with. Set our drawing color to `green`.', - 'color green', - [ - [ 'color', { color : palette.green } ] - ] - ], - [ - 'We want our grass on the bottom half of the screen, so let’s move into position with `moveTo 0, 300`', - 'moveTo 0, 300', - [ - [ 'move-to', { x: 0, y: 300 } ] - ] - - ], - [ - 'The grass is a nice big `rectangle` of size `500, 200`', - 'rectangle 500, 200', - [ - [ 'rectangle', { width: 500, height: 200 } ] - ] - ], - [ - 'Now let’s add in a nice boxy tree to our foraging scene. Begin by moving into position at exactly `50, 100`.', - 'moveTo 50, 100', - [ - [ 'move-to', { x: 50, y: 100 } ] - ] - ], - [ - 'Our leaves are drawn with `square 150`.', - 'square 150', - [ - [ 'rectangle', { width: 150, isSquare: true } ] - ] - ], - [ - 'Next we need to draw the trunk. Move the cursor with `moveTo 100, 250`.', - 'moveTo 100, 250', - [ - [ 'move-to', { x: 100, y: 250 } ] - ] - ], - [ - 'Our wood has a nice `darkbrown` color. Set that as the drawing color.', - 'color darkbrown', - [ - [ 'color', { color: palette.darkbrown } ] - ] - ], - [ - 'The trunk is a `rectangle` with a width of `40` and a height of `150`', - 'rectangle 40, 150', - [ - [ 'rectangle', { width: 40, height: 150 } ] - ] - ] - ]) -}; - - diff --git a/lib/challenges/summer_camp/day_one.js b/lib/challenges/summer_camp/day_one.js deleted file mode 100644 index acd90b2cd..000000000 --- a/lib/challenges/summer_camp/day_one.js +++ /dev/null @@ -1,162 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_one', - title : 'Your Summer Camp sign', - short_title : 'Camp Sign', - description : 'Welcome to your first day! Before you set out from the lodge, your campsite sign needs a design. Be creative! Use a crazy color scheme, or show what you want to do at camp. \nIn the Pacific Northwest of the United States, indigenous peoples carved Totem Poles to tell the stories of their families and cultures. These beautiful sculptures are carved into trees and often feature characters and events from legends. You can search the internet for images of Totem Poles for inspiration.', - icon_class : 'challenge_campsign', - img : '/assets/summercamp/ch_pics/day_1.png', - completion_text: 'Well done! Now give your camp its own name and style. Change your camp name on line 18, or the color of the sign on line 3... why not add a nice background and some extra decorations? All those tool icons on the left can help you get started.', - difficulty : 1, - startAt : 0, - summerCamp : true, - rewards : null, - steps : generate.fromSequence([ - [ - 'It\'s a sunny day! Set the background color to blue - **type** `background blue`', - 'background blue', - [ - [ 'background', { color: palette.blue } ] - ] - ], - [ - 'Let\'s move the cursor over to the place on the screen where we want to start drawing our sign.\n\nPress ENTER to add the next instruction, and - **type** `moveTo 100, 150`', - 'moveTo 100, 150', - [ - [ 'move-to', { x: 100, y: 150 } ] - ] - ], - [ - 'In Make Art we draw shapes using digital pens. Before we draw the next shape, we need to choose the pen we want to use to fill the inside of the shape. Let\'s select a brown pen by setting the color to lightbrown.\n\n In a new line **type** `color lightbrown`', - 'color lightbrown', - [ - [ 'color', { color: palette.lightbrown } ] - ] - ], - [ - 'When we draw a shape we can control how thick the line is that the pen leaves behind on the outside of the shape. This line is called the **stroke**.\n\n Press enter and then set the stroke to 0, to avoid drawing lines - **type** `stroke 0`', - 'stroke 0', - [ - [ 'stroke-width', function(options){ - return !isNaN(options.width); - }] - ] - ], - [ - 'Now that we have our pen all set up, we can get started on the sign!\n\nDraw the main billboard with a rectangle - **type** `rectangle 300, 200`', - 'rectangle 300, 200', - [ - [ 'rectangle', { width: 300, height: 200 } ] - ] - ], - [ - 'Let\'s draw a shadow. Set the color to brown first - **type** `color brown`', - 'color brown', - [ - [ 'color', { color: palette.brown } ] - ] - ], - [ - 'Draw a thin shadow with a rectangle - **type** `rectangle 300, 5`', - 'rectangle 300, 5', - [ - [ 'rectangle', { width: 300, height: 5 } ] - ] - ], - [ - 'That sign looks too clean. We need to draw some imperfections.\n\nMove the cursor to place one on the left side of the sign- **type** `moveTo 100, 220`', - 'moveTo 100, 220', - [ - [ 'move-to', { x: 100, y: 220 } ] - ] - ], - [ - 'Our imperfection will be a triangle. First we need to set the `color` to `blue` to match the background.', - 'color blue', - [ - [ 'color', { color: palette.blue } ] - ] - ], - [ - 'Set the stroke to be size 5 and brown (to match the sign). You can do both these things in one command - **type** `stroke brown, 5`', - 'stroke brown, 5', - [ - [ 'stroke-color', { color: palette.brown } ], - [ 'stroke-width', { width: 5 } ] - ] - ], - - [ - 'Now we will use the `polygon` command to draw a triangular imperfection. To create it, we need to list out the positions of the two other corners - **type** `polygon 16, 10, 0, 11`', - 'polygon 16, 10, 0, 11', - [ - [ 'polygon', { points: [ - { x: 0, y: -0 }, - { x: 16, y: 10 }, - { x: 0, y: 11 } - ] } ] - ] - ], - [ - 'The sign needs a post. Move the cursor to where we will draw it - **type** `moveTo 230, 350`', - 'moveTo 230, 350', - [ - [ 'move-to', { x: 230, y: 350 } ] - ] - ], - [ - 'Set the color of the post to brown - **type** `color brown` ', - 'color brown', - [ - [ 'color', { color: palette.brown } ] - ] - ], - [ - 'Set the stroke to 0, again - **type** `stroke 0`', - 'stroke 0', - [ - [ 'stroke-width', { width: 0 } ] - ] - ], - [ - 'Now that we have the colors sorted, draw the post with a rectangle - **type** `rectangle 40, 150`', - 'rectangle 40, 150', - [ - [ 'rectangle', { width: 40, height: 150 } ] - ] - ], - [ - 'We need some text in that sign. Move the cursor to place the text - **type** `moveTo 250, 270`', - 'moveTo 250, 270', - [ - [ 'move-to', { x: 250, y: 270 } ] - ] - ], - [ - 'Next we need to choose our font. There are lots to choose from, like `Bariol`, `Georgia`, `Comic Sans MS`, `cursive`, and `Courier`.\n\nPick your favorite and type it in (inside of quote marks) like this - `font \'Bariol\', 70`.', - 'font \'Bariol\', 70', - [ - [ 'font-family', function(options){ - return (options.font === "Bariol") || - (options.font === "Georgia") || - (options.font === "Comic Sans MS") || - (options.font === "cursive") || - (options.font === "Courier"); - }], - [ 'text-size', { size: '70' } ], - ] - ], - [ - 'Now write some silly text - **type** `text \'My Camp\'`', - 'text \'My Camp\'', - [ - [ 'text', function(options){ - return (typeof(options.value)=="string" && - options.value.length > 0); - }] - ] - ] - ]) -}; diff --git a/lib/challenges/summer_camp/day_seven.js b/lib/challenges/summer_camp/day_seven.js deleted file mode 100644 index be1027e49..000000000 --- a/lib/challenges/summer_camp/day_seven.js +++ /dev/null @@ -1,166 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_seven', - title : 'Ghost gathering', - short_title : 'Ghost', - description : 'Boo! As night falls, the spirits come out to play. A recent poll reported 87% of Chinese office workers believed in ghosts, and according to another report, 25% of Britons say they have seen a ghost. It’s getting dark, so it is hard to see, but we think we found a ghost! Maybe you can find out if it is friendly or not with your creative coding powers.', - icon_class : 'challenge_ghost', - completion_text: 'Spooky! Can you make the ghost scarier? Maybe if it could say \"Boo!\"...', - difficulty : 2, - img : '/assets/summercamp/ch_pics/day_7.png', - startAt : 6, - summerCamp : true, - rewards : null, - steps : generate.fromSequence([ - [ - 'Select a spooky color for the background - **type** `background darkpurple`', - 'background darkpurple', - [ - [ 'background', { color: palette.darkpurple } ] - ] - ], - [ - 'Set the `stroke` to `0`, to avoid drawing lines', - 'stroke 0', - [ - [ 'stroke-width', { 'width': 0 } ] - ] - ], - [ - 'Set the `color` to `white` for the ghost', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - 'Now draw an ellipse for the ghost\'s body - **type** `ellipse 120, 140`', - 'ellipse 120, 140', - [ - [ 'ellipse', { rx: 120, ry: 140 } ] - ] - ], - [ - 'Set the `color` to `black` for the eyes', - 'color black', - [ - [ 'color', { color: palette.black } ] - ] - ], - [ - 'Move the cursor to draw the first eye - **type** `move -40, -50`', - 'move -40, -50', - [ - [ 'move-to', { dx: -40, dy: -50 } ] - ] - ], - [ - 'Draw the eye with an ellipse - **type** `ellipse 20, 30`', - 'ellipse 20, 30', - [ - [ 'ellipse', { rx: 20, ry: 30 } ] - ] - ], - [ - 'Set the `color` to `lightgray`', - 'color lightgray', - [ - [ 'color', { color: palette.lightgray } ] - ] - ], - [ - 'Now draw a `circle` with a size of `5`', - 'circle 5', - [ - [ 'ellipse', { rx: 5, isCircle: true } ] - ] - ], - [ - 'Looking good! Now move the cursor to the right for the second eye - **type** `move 30`', - 'move 30', - [ - [ 'move-to', { dx: 30, dy: 0 } ] - ] - ], - [ - 'Set the `color` back to `black` for the second eye', - 'color black', - [ - [ 'color', { color: palette.black } ] - ] - ], - [ - 'Draw the second eye with an ellipse - **type** `ellipse 20, 30`', - 'ellipse 20, 30', - [ - [ 'ellipse', { rx: 20, ry: 30 } ] - ] - ], - [ - 'Set the `color` to `lightgray`', - 'color lightgray', - [ - [ 'color', { color: palette.lightgray } ] - ] - ], - [ - 'Draw a `circle` with size `5`', - 'circle 5', - [ - [ 'ellipse', { rx: 5, isCircle: true } ] - ] - ], - [ - 'Almost there! Set the `color` to `white`', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - 'Now move the cursor to the bottom - **type** `move -80, 150`', - 'move -80, 150', - [ - [ 'move-to', { dx: -80, dy: 150 } ] - ] - ], - [ - 'Let\'s open a loop - **type** `for i in [ 1 .. 5 ]`', - 'for i in [ 1 .. 5 ]', - [ - [ 'for-loop', { iterator: 'i', range: '1..5' } ] - ] - ], - [ - 'Draw a `circle` with a size of `45`', - ' circle 45', - function () { - var i = 0, - out = []; - - for (i = 0; i < 5; i += 1) { - out.push([ 'ellipse', { rx: 45, isCircle: true } ]); - } - - return out; - } - ], - [ - 'And move the cursor slightly to the right - **type** `move 45`', - ' move 45', - function () { - var i = 0, - out = []; - - for (i = 0; i < 5; i += 1) { - out.push([ 'ellipse', { rx: 45, isCircle: true } ]); - out.push([ 'move-to', { dx: 45, dy: 0 } ]); - } - return out; - }, - { override: true } - ] - ]) -}; diff --git a/lib/challenges/summer_camp/day_seventeen.js b/lib/challenges/summer_camp/day_seventeen.js deleted file mode 100644 index c6c5ee19e..000000000 --- a/lib/challenges/summer_camp/day_seventeen.js +++ /dev/null @@ -1,223 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_seventeen', - title : 'Fishing', - short_title : 'Fishing', - icon_class : 'challenge_fishing', - description : 'It\'s time to go fishing! Inside the camp\'s lake there are trout, catfish, and perch swimming around looking for a snack. Grab your fishing pole and some worms, and head over to the water for today\s adventure. ', - img : '/assets/summercamp/ch_pics/day_17.png', - completion_text: 'Great job! Every time you press a key the image redraws, so try holding down the space bar and watch the waves ripple. Also try adding a fish or making the bobber disappear.', - difficulty : 2, - startAt : 0, - summerCamp : true, - rewards : null, - steps : generate.fromSequence([ - [ - 'It\'s a sunny day! Set the background color to blue - **type** `background blue`', - 'background lightblue', - [ - [ 'background', { color: palette.blue } ] - ] - ], - [ - 'We will start by drawing the waves. We want to draw without a fill - set the `color` to be `null`.', - 'color null', - [ - [ 'color', null ] - ] - ], - [ - 'Our waves will be dark blue - **type** `stroke darkblue, 8`', - 'stroke darkblue, 8', - [ - [ 'stroke-color', { color: palette.darkblue } ], - [ 'stroke-width', { width: 8 } ] - ] - ], - [ - 'Move to the place on the left where we will start - **type** `moveTo 10, 250`', - 'moveTo 10, 250', - [ - [ 'move-to', { x: 10, y: 250 } ] - ] - ], - [ - 'We are going to draw waves on the surface by creating 25 waves inside of a loop - **type** `for i in [1 .. 25]`', - 'for i in [1 .. 25]', - [ - [ 'for-loop', { iterator: 'i', range: '1..25' } ] - ] - ], - [ - 'Create a wave out of an arc with a radius of 20 pixels - **type** `arc 20, 0.8, 0.2`', - ' arc 20, 0.8, 0.2', - function () { - var out = [], - i = 1; - for (i = 1; i <= 25; i += 1) { - out.push([ 'arc', { radius: 20, start: 0.8, end: 0.2 } ]); - } - return out; - } - ], - [ - 'Move each wave a random amount to the left - **type** `move (random 24, 32)`', - ' move (random 24, 32)', - function () { - var out = [], - i = 1; - for (i = 1; i <= 25; i += 1) { - out.push([ 'arc', { radius: 20, start: 0.8, end: 0.2 } ]); - out.push([ 'move-to', function (options) { - return options.dx >= 24 && options.dx <= 32 - }]) - } - return out; - }, - { override: true } - ], - [ - 'Press ENTER and then backspace to get rid of the indent. This exits the loop.\n\nNext move to the place where we will draw the rest of the water - **type** `moveTo 0, 270`.', - 'moveTo 0, 270', - [ - [ 'move-to', { x: 0, y: 270 } ] - ] - ], - [ - 'Set the `color` of the water to be the same as the wave', - 'color darkblue', - [ - [ 'color', { color: palette.darkblue } ] - ] - ], - [ - 'Draw a big `rectangle` that is `500` pixels high and `250` pixels wide for the water', - 'rectangle 500, 250', - [ - [ 'rectangle', { width: 500, height: 250 } ] - ] - ], - [ - 'Let\'s get ready to add some little blue waves - **type** `stroke blue, 2`', - 'stroke blue, 2', - [ - [ 'stroke-color', { color: palette.blue } ], - [ 'stroke-width', { width: 2 } ] - ] - ], - [ - 'We are going to draw waves 100 times - **type** `for i in [1 .. 100]`', - 'for i in [1 .. 100]', - [ - [ 'for-loop', { iterator: 'i', range: '1..100' } ] - ] - ], - [ - 'Move each wave to a random place on the surface of the water - **type** `moveTo (random 0, 500), (random 260, 500)`', - ' moveTo (random 0, 500), (random 260, 500)', - function () { - var out = [], - i = 1; - for (i = 1; i <= 100; i += 1) { - out.push([ 'move-to', function (options) { - return options.x >= 0 - && options.x <= 500 - && options.y >= 260 - && options.y <= 500 - }]); - } - return out; - } - ], - [ - 'Now draw each ripple as a little arc - **type** `arc 10, 0.8, 0.2`', - ' arc 10, 0.8, 0.2', - function () { - var out = [], - i = 1; - for (i = 1; i <= 100; i += 1) { - out.push([ 'move-to', function (options) { - return options.x >= 0 - && options.x <= 500 - && options.y >= 260 - && options.y <= 500 - }]); - out.push([ 'arc', { radius: 10, start: 0.8, end: 0.2 } ]); - } - return out; - }, - { override: true } - ], - [ - 'Brilliant! When you press the spacebar, a new set of random numbers is selected and the ripples move!\n\nTo catch some fish we need a brown fishing pole - Exit the loop and **type** `stroke brown, 10`.', - 'stroke brown, 10', - [ - [ 'stroke-color', { color: palette.brown } ], - [ 'stroke-width', { width: 10 } ] - ] - ], - [ - 'Now move to the place where we will draw the end of the pole - **type** `moveTo 300, 100`', - 'moveTo 300, 100', - [ - [ 'move-to', { x: 300, y: 100 } ] - ] - ], - [ - 'Draw a `line` that is `150` pixels wide and `400` pixels tall', - 'line 150, 400', - [ - [ 'line', { dx: 150, dy: 400 } ] - ] - ], - [ - 'Next we need some fishing line - **type** `stroke lightgray, 1`', - 'stroke lightgray, 1', - [ - [ 'stroke-color', { color: palette.lightgray } ], - [ 'stroke-width', { width: 1 } ] - ] - ], - [ - 'Draw a line that goes to the left and down - **type** `line -100, 200`', - 'line -100, 200', - [ - [ 'line', { dx: -100, dy: 200 } ] - ] - ], - [ - 'To see if a fish is biting we are going to draw a cork. Move to the end of the fishing line - **type** `move -100, (random 197, 202)`', - 'move -100, (random 197, 202)', - [ - [ 'move-to', function(options){ - return options.dx == -100 - && options.dy >= 197 - && options.dy <= 202 - }] - ] - ], - [ - 'The cork doesn\'t have an outline - **type** `stroke 0`', - 'stroke 0', - [ - [ 'stroke-width', { 'width': 0 } ] - ] - ], - [ - 'Set the cork\'s `color` to `red`', - 'color red', - [ - [ 'color', { color: palette.red } ] - ] - ], - [ - 'Now draw the cork floating in the water - `arc 8, 0, 1`', - 'arc 8, 0, 1', - [ - [ 'arc', { radius: 8, start: 0, end: 1 } ] - ] - ] - ]) -}; diff --git a/lib/challenges/summer_camp/day_six.js b/lib/challenges/summer_camp/day_six.js deleted file mode 100644 index 7b22be961..000000000 --- a/lib/challenges/summer_camp/day_six.js +++ /dev/null @@ -1,168 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_six', - title : 'Campfire', - short_title : 'Campfire', - description : 'Time to get a fire going. In the wilderness, this very well might be your only source of light, and heat. Burning at over a thousand degrees fahrenheit, this will be sure to keep you warm, and could keep you fed too! Meats, vegetables, and marshmallows can all be cooked over the open flame with the help of sharpened sticks. \nMost fires are built with wood logs, but yours is going to be built with code and a “loop.” As your fire grows upwards its colour changes into a deep shade of orange as the oxygen it is burning starts to cools down. Your code will produce hundreds of colours with just a few lines of code.', - icon_class : 'challenge_fire', - completion_text: 'Try adding a starry sky, more flames, a ring of rocks to make it safer or even marshmallows!', - difficulty : 2, - img : '/assets/summercamp/ch_pics/day_6.png', - startAt : 5, - summerCamp : true, - rewards : {'wallpaper': 1}, - steps : generate.fromSequence([ - [ - 'It\'s a dark night. Set the `background` color to `darkblue`', - 'background darkblue', - [ - [ 'background', { color: palette.darkblue } ] - ] - ], - [ - 'Set the stroke to 0, to avoid drawing lines - **type** `stroke 0`', - 'stroke 0', - [ - [ 'stroke-width', { 'width': 0 } ] - ] - ], - [ - 'Move the cursor to place the floor - **type** `moveTo 0, 300`', - 'moveTo 0, 300', - [ - [ 'move-to', { x: 0, y: 300 } ] - ] - ], - [ - 'Set the `color` to `darkgreen`', - 'color darkgreen', - [ - [ 'color', { color: palette.darkgreen } ] - ] - ], - [ - 'Draw the grass using a rectangle - **type** `rectangle 500, 200`', - 'rectangle 500, 200', - [ - [ 'rectangle', { width: 500, height: 200 } ] - ] - ], - [ - 'Move the cursor to place the light casted by the fire - **type** `moveTo 250, 400`', - 'moveTo 250, 400', - [ - [ 'move-to', { x: 250, y: 400 } ] - ] - ], - [ - 'Set the `color` to `green`', - 'color green', - [ - [ 'color', { color: palette.green } ] - ] - ], - [ - 'Draw the light using an ellipse - **type** `ellipse 200, 30`', - 'ellipse 200, 30', - [ - [ 'ellipse', { rx: 200, ry: 30 } ] - ] - ], - [ - 'We need some wood to feed the fire - **type** `moveTo 110, 390`', - 'moveTo 110, 390', - [ - [ 'move-to', { x: 110, y: 390 } ] - ] - ], - [ - 'Set the stroke for the logs - **type** `stroke brown, 25`', - 'stroke brown, 25', - [ - [ 'stroke-color', { color: palette.brown } ], - [ 'stroke-width', { width: 25 } ] - ] - ], - [ - 'Good, now draw the first log - **type** `line 270, 30`', - 'line 270, 30', - [ - [ 'line', { dx: 270, dy: 30 } ] - ] - ], - [ - 'Move the cursor to place the second log - **type** `moveTo 420, 390`', - 'moveTo 420, 390', - [ - [ 'move-to', { x: 420, y: 390 } ] - ] - ], - [ - 'Draw the second log - **type** `line -290, 30`', - 'line -290, 30', - [ - [ 'line', { dx: -290, dy: 30 } ] - ] - ], - [ - 'Excellent! We are now ready to light the fire - **type** `moveTo 180, 400`', - 'moveTo 180, 400', - [ - [ 'move-to', { x: 180, y: 400 } ] - ] - ], - [ - 'Our fire will be formed by 150 lines! - **type** `for i in [ 1 .. 150 ]`', - 'for i in [ 1 .. 150 ]', - [ - [ 'for-loop', { iterator: 'i', range: '1..150' } ] - ] - ], - [ - 'Set the thickness and color of each line - **type** `stroke \'rgba(255, \' + (i + 50) + \', 0, 0.3)\', 10`', - ' stroke \'rgba(255, \' + (i + 50) + \', 0, 0.3)\', 10', - function () { - var out = [], - i = 1; - for (i = 1; i <= 150; i += 1) { - out.push([ 'stroke-color', { color: 'rgba(255, ' + (i + 50) + ', 0, 0.3)' } ]); - out.push([ 'stroke-width', { width: 10 } ]); - } - return out; - } - ], - [ - 'Now draw the line - **type** `line 150 - i`', - ' line 150 - i', - function () { - var out = [], - i = 1; - for (i = 1; i <= 150; i += 1) { - out.push([ 'stroke-color', { color: 'rgba(255, ' + (i + 50) + ', 0, 0.3)' } ]); - out.push([ 'stroke-width', { width: 10 } ]); - out.push([ 'line', { dx: 150 - i, dy: 0 } ]); - } - return out; - }, - { override: true } - ], - [ - 'Move the cursor for next line - **type** `move 0.5, -2`', - ' move 0.5, -2', - function () { - var out = [], - i = 1; - for (i = 1; i <= 150; i += 1) { - out.push([ 'stroke-color', { color: 'rgba(255, ' + (i + 50) + ', 0, 0.3)' } ]); - out.push([ 'stroke-width', { width: 10 } ]); - out.push([ 'line', { dx: 150 - i, dy: 0 } ]); - out.push([ 'move-to', { dx: 0.5, dy: -2 } ]); - } - return out; - }, - { override: true } - ] - ]) -}; diff --git a/lib/challenges/summer_camp/day_sixteen.js b/lib/challenges/summer_camp/day_sixteen.js deleted file mode 100644 index dd775f6ca..000000000 --- a/lib/challenges/summer_camp/day_sixteen.js +++ /dev/null @@ -1,211 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_sixteen', - title : 'Table Tennis', - short_title : 'Table Tennis', - icon_class : 'challenge_tennis', - description : 'Table Tennis is a game played with one or two people on each side of a table with the outline of a miniaturized tennis court drawn on it. Games are played to 11 or 21, and upon completion the victor’s paddle is thrown to the ground as they let out their battle cry.', - img : '/assets/summercamp/ch_pics/day_16.png', - completion_text: 'Well done! You made a beautiful 3D ping pong table. But there isn’t anyone playing or watching the game! Use your creativity and code to draw some fellow campers enjoying the game.', - difficulty : 2, - startAt : 0, - summerCamp : true, - rewards : {'wallpaper': 1}, - steps : generate.fromSequence([ - [ - 'Begin by setting your stroke to zero with `stroke 0`', - 'stroke 0', - [ - [ 'stroke-width', { width: 0 } ] - ] - ], - [ - 'It\'s a sunny day! Set the background color to blue - **type** `background blue`', - 'background blue', - [ - [ 'background', { color: palette.blue } ] - ] - ], - [ - 'Set your color to green for the grass. **Type** `color green`.', - 'color green', - [ - [ 'color', { color: palette.green } ] - ] - ], - [ - 'Move your cursor into place with `moveTo 0, 350`', - 'moveTo 0, 350', - [ - [ 'move-to', { x: 0, y: 350 } ] - ] - ], - [ - 'Cover the bottom part of the canvas with grass. Draw a `rectangle` of width `500` and height `150`.', - 'rectangle 500, 150', - [ - [ 'rectangle', { width: 500, height: 150 } ] - ] - ], - [ - 'Give your table a solid foundation with some wood legs. Set `color` to `brown`', - 'color brown', - [ - [ 'color', { color: palette.brown } ] - ] - ], - [ - 'Move the cursor into position for the first leg. **Type** `moveTo 20, 310`', - 'moveTo 20, 310', - [ - [ 'move-to', { x: 20, y: 310 } ] - ] - ], - [ - 'Now draw the first leg. Type `rectangle 15, 150`.', - 'rectangle 15, 150', - [ - [ 'rectangle', { width: 15, height: 150 } ] - ] - ], - [ - 'Now the second leg. **Type** `moveTo 465, 310`.', - 'moveTo 465, 310', - [ - [ 'move-to', { x: 465, y: 310 } ] - ] - ], - [ - 'Now **draw** the second leg. Type `rectangle 15, 150`.', - 'rectangle 15, 150', - [ - [ 'rectangle', { width: 15, height: 150 } ] - ] - ], - [ - 'And the third leg. **Type** `moveTo 40, 250`.', - 'moveTo 40, 250', - [ - [ 'move-to', { x: 40, y: 250 } ] - ] - ], - [ - 'Now draw the third leg the same size as the others', - 'rectangle 15, 150', - [ - [ 'rectangle', { width: 15, height: 150 } ] - ] - ], - [ - 'Finally, the fourth leg. **Type** `moveTo 445, 250`.', - 'moveTo 445, 250', - [ - [ 'move-to', { x: 445, y: 250 } ] - ] - ], - [ - 'Now draw the fourth leg', - 'rectangle 15, 150', - [ - [ 'rectangle', { width: 15, height: 150 } ] - ] - ], - [ - 'Now to put the table on! Set the drawing `color` to `darkgreen`.', - 'color darkgreen', - [ - [ 'color', { color: palette.darkgreen } ] - ] - ], - [ - 'Move your table top into place. Type `moveTo 10, 300`.', - 'moveTo 10, 300', - [ - [ 'move-to', { x: 10, y: 300 } ] - ] - ], - [ - 'Your table has perspective, to draw it use `polygon 30, -60, 450, -60, 480, 0`', - 'polygon 30, -60, 450, -60, 480, 0', - [ - [ 'polygon', { points: [ - { x: 0, y: 0 }, - { x: 30, y: -60 }, - { x: 450, y: -60 }, - { x: 480, y: 0 } - ] } ] - ] - ], - [ - 'For a cool 3D effect, lighten the drawing color with `color lighten darkgreen, 10`', - 'color lighten darkgreen, 10', - [ - [ 'color', { color: 'rgba(111, 138, 81, 1)' } ] - ] - ], - [ - '**Draw** the side of the table with `rectangle 480, 10`', - 'rectangle 480, 10', - [ - [ 'rectangle', { width: 480, height: 10 } ] - ] - ], - [ - 'For the net, set the drawing `color` to `white`', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - '`move` the cursor to **exactly** `248, 220`', - 'moveTo 248, 220', - [ - [ 'move-to', { x: 248, y: 220 } ] - ] - ], - [ - 'Draw the net: a `rectangle` with a width of `4`, and height of `80`', - 'rectangle 4, 80', - [ - [ 'rectangle', { width: 4, height: 80 } ] - ] - ], - [ - 'Give your scene a bouncing ball! Use random to decide what side of the table the ball should be on. **Type** `x = random 40, 460`.', - 'x = random 40, 460', - [ - [ 'var', function (opts) { - return opts.name === 'x' && opts.value === 'random40,460'; - }] - ] - ], - [ - 'Now we’ll use random to decide how high the ball should be! **Type** `y = random 150, 250`.', - 'y = random 150, 250', - [ - ['var', function (opts) { - return (opts.name === 'y' && opts.value === 'random150,250'); - }] - ] - ], - [ - 'Move the cursor to the x and y variables you just made. **Type** `moveTo x, y`.', - 'moveTo x, y', - [ - [ 'move-to', function (opts) { - return (opts.x >= 40 && opts.x <= 460) && (opts.y > 150 && opts.y <= 250) - }] - ] - ], - [ - 'Finally, draw your ball with a circle with radius 7. Type `circle 7`.', - 'circle 7', - [ - [ 'ellipse', { rx: 7, isCircle: true } ] - ] - ] - ]) -}; diff --git a/lib/challenges/summer_camp/day_ten.js b/lib/challenges/summer_camp/day_ten.js deleted file mode 100644 index de7d91189..000000000 --- a/lib/challenges/summer_camp/day_ten.js +++ /dev/null @@ -1,185 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_ten', - title : 'Take a pic!', - short_title : 'Camera', - icon_class : 'challenge_camera', - description : 'Back in the 1820s, early cameras would take several hours to actually capture a film! With annoyingly long exposure hours, photographing people with a nice smile was not really possible. Why? Try and hold a convincing smile while staying perfectly still for hours and you will get your answer. Today, the number of photographs clicked every two minutes is same as the number of photographs clicked by mankind in 1800s.', - img : '/assets/summercamp/ch_pics/day_10.png', - completion_text: 'Try drawing yourself taking the picture behind that beautiful camera. Perhaps a light for the flash as well?', - difficulty : 1, - startAt : 0, - summerCamp : true, - rewards : {'outfit': 1}, - steps : generate.fromSequence([ - [ - 'Set the `background` color to `blue`', - 'background blue', - [ - [ 'background', { color: palette.blue } ] - ] - ], - [ - 'Set the `stroke` to `0` for now, to avoid drawing the outline of the shapes', - 'stroke 0', - [ - [ 'stroke-width', { 'width': 0 } ] - ] - ], - [ - 'Move the cursor to place the camera in the center - **type** `moveTo 100, 150`', - 'moveTo 100, 150', - [ - [ 'move-to', { x: 100, y: 150 } ] - ] - ], - [ - 'Set the `color` of the camera to `dimgray`', - 'color dimgray', - [ - [ 'color', { color: palette.dimgray } ] - ] - ], - [ - 'Now draw the body of the camera with a rectangle - **type** `rectangle 300, 200`', - 'rectangle 300, 200', - [ - [ 'rectangle', { width: 300, height: 200 } ] - ] - ], - [ - 'Move the cursor to draw the lense - **type** `move 150, 100`', - 'move 150, 100', - [ - [ 'move-to', { dx: 150, dy: 100 } ] - ] - ], - [ - 'Set the `color` of the lens to `lightblue`', - 'color lightblue', - [ - [ 'color', { color: palette.lightblue } ] - ] - ], - [ - 'Set the outline of the lens with a `stroke` of `10` and `black` color', - 'stroke black, 10', - [ - [ 'stroke-color', { color: palette.black } ], - [ 'stroke-width', { 'width': 10 } ] - ] - ], - [ - 'The lens is a `circle` with size `50`', - 'circle 50', - [ - [ 'ellipse', { rx: 50, isCircle: true } ] - ] - ], - [ - 'Set the `color` to `lightgray` for the second half of the lens', - 'color lightgray', - [ - [ 'color', { color: palette.lightgray } ] - ] - ], - [ - 'Draw an arc that matches the top half of the lens - **type** `arc 50, 2, 1`', - 'arc 50, 2, 1', - [ - [ 'arc', { radius: 50, start: 2, end: 1 } ] - ] - ], - [ - 'This camera needs a flash! Move the cursor to place it - **type** `move -30, -125`', - 'move -30, -125', - [ - [ 'move-to', { dx: -30, dy: -125 } ] - ] - ], - [ - 'Draw the flash of the camera with a `rectangle` of size `60` by `20`', - 'rectangle 60, 20', - [ - [ 'rectangle', { width: 60, height: 20 } ] - ] - ], - [ - 'Set the `stroke` back to `0`.', - 'stroke 0', - [ - [ 'stroke-width', { 'width': 0 } ] - ] - ], - [ - 'Set the `color` of the flash to `lightblue`', - 'color lightblue', - [ - [ 'color', { color: palette.lightblue } ] - ] - ], - [ - 'Draw a polygon for the reflection on the flash - **type** `polygon 40, 0, 0, 20`', - 'polygon 40, 0, 0, 20', - [ - [ 'polygon', { points: [ - { x: 0, y: -0 }, - { x: 40, y: 0 }, - { x: 0, y: 20 } - ] } ] - ] - ], - [ - 'Only the button to shoot the picture is left - **type** `move 100, 10`', - 'move 100, 10', - [ - [ 'move-to', { dx: 100, dy: 10 } ] - ] - ], - [ - 'Set the `color` of the button to `red`.', - 'color red', - [ - [ 'color', { color: palette.red } ] - ] - ], - [ - 'Draw the button of the camera with a `rectangle` of size `50` by `15`', - 'rectangle 50, 15', - [ - [ 'rectangle', { width: 50, height: 15 } ] - ] - ], - [ - 'One more detail! Move the cursor one last time - **type** `move 25, -20`', - 'move 25, -20', - [ - [ 'move-to', { dx: 25, dy: -20 } ] - ] - ], - [ - 'Set the `color` to `yellow`', - 'color yellow', - [ - [ 'color', { color: palette.yellow } ] - ] - ], - [ - 'Set the `font` to `\'ComicSansMS\'` and size `30`', - 'font \'ComicSansMS\', 30', - [ - [ 'font-family', { font: 'ComicSansMS' } ], - [ 'text-size', { size: '30' } ], - ] - ], - [ - 'Write some text - **type** `text \'Click!\'`', - 'text \'Click!\'', - [ - [ 'text', { value: 'Click!' } ] - ] - ] - ]) -}; diff --git a/lib/challenges/summer_camp/day_thirteen.js b/lib/challenges/summer_camp/day_thirteen.js deleted file mode 100644 index e04dde235..000000000 --- a/lib/challenges/summer_camp/day_thirteen.js +++ /dev/null @@ -1,257 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_thirteen', - title : 'Play a nice sweet song', - short_title : 'Guitar', - icon_class : 'challenge_guitar', - description : 'Did you know the oldest surviving guitar-like instrument is actually around 3,500 years old? It is a 3-string instrument with a plectrum suspended from the neck, it was owned by an Egyptian singer called Har-Mose and was buried alongside him - You can still see the instrument on display at the Archaeological Museum in Cairo, Egypt.', - img : '/assets/summercamp/ch_pics/day_13.png', - completion_text: 'What good is a guitar if we don\'t have a campfire to sing songs around? Try drawing a nice big campfire with some marshmallows for toasting! Maybe a big moon on the horizon too? Be wild, be creative!', - difficulty : 2, - startAt : 0, - summerCamp : true, - rewards : null, - steps : generate.fromSequence([ - [ - 'It\'s a very nice night! Set the background color to darkblue - **type** `background darkblue`', - 'background darkblue', - [ - [ 'background', { color: palette.darkblue } ] - ] - ], - [ - 'Set the `stroke` to `0` in a new line.', - 'stroke 0', - [ - [ 'stroke-width', { 'width': 0 } ] - ] - ], - [ - 'Set your guitar `color` to `lightbrown`.', - 'color lightbrown', - [ - [ 'color', { color: palette.lightbrown } ] - ] - ], - [ - 'Move the cursor to place the guitar - **type** `moveTo 120, 250`', - 'moveTo 120, 250', - [ - [ 'move-to', { x: 120, y: 250 } ] - ] - ], - [ - 'Draw the first part of the body with an ellipse - **type** `ellipse 60, 65`', - 'ellipse 60, 65', - [ - [ 'ellipse', { rx: 60, ry: 65 } ] - ] - ], - [ - 'Now for the second part of the body, `move` the cursor `70` pixels to the right.', - 'move 70', - [ - [ 'move-to', { dx: 70, dy: 0 } ] - ] - ], - [ - 'Draw a `circle` of size `55` for the second part of the guitar.', - 'circle 55', - [ - [ 'ellipse', { rx: 55, isCircle: true } ] - ] - ], - [ - 'Every guitar needs a neck, move the cursor to place it - **type** `move 20, -10`', - 'move 20, -10', - [ - [ 'move-to', { dx: 20, dy: -10 } ] - ] - ], - [ - 'Set the neck `color` to `brown`.', - 'color brown', - [ - [ 'color', { color: palette.brown } ] - ] - ], - [ - 'Draw the neck of the guitar with a rectangle - **type** `rectangle 150, 20`', - 'rectangle 150, 20', - [ - [ 'rectangle', { width: 150, height: 20 } ] - ] - ], - [ - 'Now place the headstock - **type** `move 150, -5`', - 'move 150, -5', - [ - [ 'move-to', { dx: 150, dy: -5 } ] - ] - ], - [ - 'Draw the headstock with a `rectangle` of size `40` by `30`.', - 'rectangle 40, 30', - [ - [ 'rectangle', { width: 40, height: 30 } ] - ] - ], - [ - 'Time to place the soundhole in the body - **type** `move -170, 15`', - 'move -170, 15', - [ - [ 'move-to', { dx: -170, dy: 15 } ] - ] - ], - [ - 'Set the outline of the soundhole with a `stroke` of `10` and `brown` color.', - 'stroke brown, 10', - [ - [ 'stroke-color', { color: palette.brown } ], - [ 'stroke-width', { 'width': 10 } ] - ] - ], - [ - 'Set the soundhole `color` to `black`.', - 'color black', - [ - [ 'color', { color: palette.black } ] - ] - ], - [ - 'Draw the hole with a `circle` of size `20`.', - 'circle 20', - [ - [ 'ellipse', { rx: 20, isCircle: true } ] - ] - ], - [ - 'The bridge is the piece that fixes the strings to the body. Let\'s place it - **type** `move -50, -15`', - 'move -50, -15', - [ - [ 'move-to', { dx: -50, dy: -15 } ] - ] - ], - [ - 'Set the outline of the bridge with a `stroke` of `10` and `red` color.', - 'stroke red, 10', - [ - [ 'stroke-color', { color: palette.red } ], - [ 'stroke-width', { 'width': 10 } ] - ] - ], - [ - 'Draw the bridge with a `rectangle` of size `2` by `35`.', - 'rectangle 2, 35', - [ - [ 'rectangle', { width: 2, height: 35 } ] - ] - ], - [ - 'That\'s a good looking guitar. Time for the strings - **type** `move 0, 9`', - 'move 0, 9', - [ - [ 'move-to', { dx: 0, dy: 9 } ] - ] - ], - [ - 'Set the properties of the strings with a `stroke` of `1` and `white` color.', - 'stroke white, 1', - [ - [ 'stroke-color', { color: palette.white } ], - [ 'stroke-width', { 'width': 1 } ] - ] - ], - [ - 'Let\'s draw the 4 strings with a loop - **type** `for i in [ 1 .. 4 ]`', - 'for i in [ 1 .. 4 ]', - [ - [ 'for-loop', { iterator: 'i', range: '1..4' } ] - ] - ], - [ - 'Draw a string using a line - **type** `line 250`', - ' line 250', - function () { - var i = 0, - out = []; - - for (i = 0; i < 4; i += 1) { - out.push([ 'line', { dx: 250, dy: 0 } ]); - } - return out; - } - ], - [ - 'And move the cursor slightly down to place the next ones - **type** `move 0, 4`', - ' move 0, 4', - function () { - var i = 0, - out = []; - - for (i = 0; i < 4; i += 1) { - out.push([ 'line', { dx: 250, dy: 0 } ]); - out.push([ 'move-to', { dx: 0, dy: 4 } ]); - } - return out; - }, - { override: true } - ], - [ - 'Press **Enter** and **Backspace** to set the `color` to `white` outside the loop', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - 'You are ready to play music! Start a new loop - **type** `for i in [ 1 .. 10 ]`', - 'for i in [ 1 .. 10 ]', - [ - [ 'for-loop', { iterator: 'i', range: '1..10' } ] - ] - ], - [ - 'Select a random location - **type** `moveTo (random 200, 400), (random 100, 400)`', - ' moveTo (random 200, 400), (random 100, 400)', - function () { - var i = 0, - out = []; - - for (i = 0; i < 10; i += 1) { - out.push([ 'move-to', function (options) { - return ( - options.x >= 200 && options.x <= 400 && - options.y >= 100 && options.y <= 400 - ); - } - ]); - } - return out; - } - ], - [ - 'Come on, play some notes! - **copy and paste** `text \'♪\'`', - ' text \'♪\'', - function () { - var i = 0, - out = []; - - for (i = 0; i < 10; i += 1) { - out.push([ 'move-to', function (options) { - return ( - options.x >= 200 && options.x <= 400 && - options.y >= 100 && options.y <= 400 - ); - } - ]); - out.push([ 'text', { value: '♪' } ]); - } - return out; - }, - { override: true } - ], - ]) -}; diff --git a/lib/challenges/summer_camp/day_three.js b/lib/challenges/summer_camp/day_three.js deleted file mode 100644 index c690874f8..000000000 --- a/lib/challenges/summer_camp/day_three.js +++ /dev/null @@ -1,124 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_three', - title : 'Pitch your Tent', - short_title : 'Tent', - description : 'No campsite is complete without a tent. We’ve got you settled with a simple fly tent, which is usually made with a tarpaulin, rope, and stakes. But with your creative powers you can transform it into whatever you want! \nPeople have lived in tents, teepees, yurts, and wigwams for thousands of years. What features can you add to your tent to keep yourself dry and warm? You can always get inspiration from browsing other creations on Kano World, and searching the Internet for other tent designs.', - icon_class : 'challenge_setcamp', - completion_text: 'Nice job! You learnt in the last challenge how to draw a tree, why not adding it to the scene? Is that a bird flying in the sky?', - img : '/assets/summercamp/ch_pics/day_3.png', - difficulty : 1, - startAt : 2, - summerCamp : true, - rewards : {'wallpaper': 1}, - steps : generate.fromSequence([ - [ - 'Draw a sunny day - **type** `background lightblue`', - 'background lightblue', - [ - [ 'background', { color: palette.lightblue } ] - ] - ], - [ - 'Set the stroke to 0, to avoid drawing lines - **type** `stroke 0`', - 'stroke 0', - [ - [ 'stroke-width', { 'width': 0 } ] - ] - ], - [ - 'Move the cursor where the sun will be - **type** `moveTo 400, 50`', - 'moveTo 400, 50', - [ - [ 'move-to', { x: 400, y: 50 } ] - ] - ], - [ - 'Set the `color` of the sun `yellow`', - 'color yellow', - [ - [ 'color', { color: palette.yellow } ] - ] - ], - [ - 'Draw the sun with a circle - **type** `circle 40`', - 'circle 40', - [ - [ 'ellipse', { rx: 40, isCircle: true } ] - ] - ], - [ - 'Move the cursor to draw some grass - **type** `moveTo 0, 350`', - 'moveTo 0, 350', - [ - [ 'move-to', { x: 0, y: 350 } ] - ] - ], - [ - 'Set the `color` of the grass `green`', - 'color green', - [ - [ 'color', { color: palette.green } ] - ] - ], - [ - 'Draw the grass using a rectangle - **type** `rectangle 500, 150`', - 'rectangle 500, 150', - [ - [ 'rectangle', { width: 500, height: 150 } ] - ] - ], - [ - 'Excellent! Now we are ready to draw the tent - **type** `color red`', - 'color red', - [ - [ 'color', { color: palette.red } ] - ] - ], - [ - 'Position the cursor on top of the grass - **type** `moveTo 100, 350`', - 'moveTo 100, 350', - [ - [ 'move-to', { x: 100, y: 350 } ] - ] - ], - [ - 'Draw a triangle using `polygon` - **type** `polygon 150, -200, 300, 0`', - 'polygon 150, -200, 300, 0', - [ - [ 'polygon', { points: [ - { x: 0, y: -0 }, - { x: 150, y: -200 }, - { x: 300, y: 0 } - ] } ] - ] - ], - [ - 'We need the entrace now. Set the `color` to `darkred`', - 'color darkred', - [ - [ 'color', { color: palette.darkred } ] - ] - ], - [ - 'Place the cursor on the tip of the tent - **type** `moveTo 250, 150`', - 'moveTo 250, 150', - [ - [ 'move-to', { x: 250, y: 150 } ] - ] - ], - [ - 'Draw the entrance - **type** `polygon 30, 200, -30, 200`', - 'polygon 30, 200, -30, 200', - [ - [ 'polygon', { points: [ - { x: 0, y: -0 }, - { x: 30, y: 200 }, - { x: -30, y: 200 } - ] } ] - ] - ], - ]) -}; diff --git a/lib/challenges/summer_camp/day_twelve.js b/lib/challenges/summer_camp/day_twelve.js deleted file mode 100644 index 603db8830..000000000 --- a/lib/challenges/summer_camp/day_twelve.js +++ /dev/null @@ -1,161 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_twelve', - title : 'Lights on!', - short_title : 'Flashlight', - icon_class : 'challenge_flashlight', - description : 'Torches started life as ignited sticks; their flames would light the way for explorers and settlers. With the advent of electricity, and the invention of the dry cell battery in 1887, the road was paved to use incandescent bulbs as a replacement. While the technology inside flashlights has evolved, they are still as useful as ever. Meanwhile, the original torch has found a second coming in circus acts where they are thrown skywards in miraculous fashion.', - img : '/assets/summercamp/ch_pics/day_12.png', - completion_text: 'You are an adventurer in the dark with your torch. What might you have uncovered as its light passes over the room? Try drawing that fox that you’ve unearthed or that owl hooting in the trees.', - difficulty : 1, - startAt : 0, - summerCamp : true, - rewards : {'outfit': 1}, - steps : generate.fromSequence([ - [ - 'It\'s getting dark outside! Set the `background` color to `darkblue`', - 'background darkblue', - [ - [ 'background', { color: palette.darkblue } ] - ] - ], - [ - 'Set the `stroke` to `0`, we won\'t need it for this challenge', - 'stroke 0', - [ - [ 'stroke-width', { 'width': 0 } ] - ] - ], - [ - 'Move the cursor to place our flashlight - **type** `moveTo 200, 200`', - 'moveTo 200, 200', - [ - [ 'move-to', { x: 200, y: 200 } ] - ] - ], - [ - 'Set the `color` of the flashlight to `dimgray`', - 'color dimgray', - [ - [ 'color', { color: palette.dimgray } ] - ] - ], - [ - 'Draw the head of the flashlight with a rectangle - **type** `rectangle 100, 50`', - 'rectangle 100, 50', - [ - [ 'rectangle', { width: 100, height: 50 } ] - ] - ], - [ - 'Now move the cursor down to draw the neck - **type** `move 0, 50`', - 'move 0, 50', - [ - [ 'move-to', { dx: 0, dy: 50 } ] - ] - ], - [ - 'Set the `color` of this piece to `gray`', - 'color gray', - [ - [ 'color', { color: palette.gray } ] - ] - ], - [ - 'Draw a polygon - **type** `polygon 20, 40, 80, 40, 100, 0`', - 'polygon 20, 40, 80, 40, 100, 0', - [ - [ 'polygon', { points: [ - { x: 0, y: -0 }, - { x: 20, y: 40 }, - { x: 80, y: 40 }, - { x: 100, y: 0 } - ] } ] - ] - ], - [ - 'Exciting! Now move the cursor down to draw the body - **type** `move 20, 40`', - 'move 20, 40', - [ - [ 'move-to', { dx: 20, dy: 40 } ] - ] - ], - [ - 'Set the `color` of the body to `darkgray`', - 'color darkgray', - [ - [ 'color', { color: palette.darkgray } ] - ] - ], - [ - 'Draw the body of the flashlight with a `rectangle` `60` by `200`', - 'rectangle 60, 200', - [ - [ 'rectangle', { width: 60, height: 200 } ] - ] - ], - [ - 'The only thing missing now is a ON/OFF button. Set the `color` to `dimgray`', - 'color dimgray', - [ - [ 'color', { color: palette.dimgray } ] - ] - ], - [ - 'Now move the cursor down to place the button - **type** `move 30, 50`', - 'move 30, 50', - [ - [ 'move-to', { dx: 30, dy: 50 } ] - ] - ], - [ - 'Draw an ellipse where the button will be located - **type** `ellipse 10, 30`', - 'ellipse 10, 30', - [ - [ 'ellipse', { rx: 10, ry: 30 } ] - ] - ], - [ - 'Set the `color` of the button to `red`', - 'color red', - [ - [ 'color', { color: palette.red } ] - ] - ], - [ - 'Draw the button with an ellipse - **type** `ellipse 10, 20`', - 'ellipse 10, 20', - [ - [ 'ellipse', { rx: 10, ry: 20 } ] - ] - ], - [ - 'You have turned on the light! Set the color of the beam - **type** `color \"rgba(255, 255, 0, 0.8)\"`', - 'color \"rgba(255, 255, 0, 0.8)\"', - [ - [ 'color', { color: 'rgba(255, 255, 0, 0.8)' } ] - ] - ], - [ - 'Place the beam in front of the flashlight - **type** `move -50, -140`', - 'move -50, -140', - [ - [ 'move-to', { dx: -50, dy: -140 } ] - ] - ], - [ - 'Draw the beam of light with a polygon - **type** `polygon 100, 0, 180, -300, -80, -300`', - 'polygon 100, 0, 180, -300, -80, -300', - [ - [ 'polygon', { points: [ - { x: 0, y: -0 }, - { x: 100, y: 0 }, - { x: 180, y: -300 }, - { x: -80, y: -300 } - ] } ] - ] - ] - ]) -}; diff --git a/lib/challenges/summer_camp/day_twenty.js b/lib/challenges/summer_camp/day_twenty.js deleted file mode 100644 index 5aef47a14..000000000 --- a/lib/challenges/summer_camp/day_twenty.js +++ /dev/null @@ -1,19 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_twenty', - title : 'Fractal Tree', - short_title : 'Tree', - icon_class : 'challenge_tree', - description : 'Time to play! Our counselors made you something to play with. A tree which can grow branches that expand outwards, and contract inwards. It can blossom fully, or shrivel to nothing. All with code. Make it yours.', - img : '/assets/summercamp/ch_pics/day_20.png', - completion_text: 'Play around with the blue numbers at the top of the code. What do they do? Why do they do that? Shape the tree to your liking. If things mess up, go back to the main menu and start again.', - difficulty : 3, - startAt : 0, - summerCamp : true, - rewards : {'outfit': 1}, - code : '# Play with these blue numbers\narmLength = 50\niterations = 9 # Might crash if you go over 15!\ndegreeChange = 20\nhasBlossoms = 3\nblossomSize = 70\nblossomOpacity = .02\n# ^^^ Play with these blue numbers ^^^\n\n###\nThis is a function that draws a tree\nbranch, when it completes, it calls itself\nover and over and over again until all the\ntree’s branches have been drawn!\n###\ndrawBranch = (x, y, branchesLeft, startAngle) ->\n if branchesLeft > 0 \n # Move to where the next branch should\n # be drawn:\n moveTo x, y\n \n # A branch is always blue, but the width\n # depends on how far from the base it is!\n stroke blue, branchesLeft \n \n # A bit of trigonometry here, it’s alright\n # if you don’t understand this! This \n # calculates coordinates for where the \n # branch should be drawn to, and where\n # the next branch should start.\n dx = Math.cos(startAngle) * armLength \n dy = -Math.sin(startAngle) * armLength \n \n # Draw a line to the new coordinates we\n # just calculated\n line dx, dy \n \n # This block of code only executes if\n # the current branch has blossoms. You\n # can change the hasBlossoms variable up\n # top!\n if branchesLeft <= hasBlossoms \n # Set the drawing color to a nice red\n color opacity "rgb(247, 45, 99)", blossomOpacity\n # Our blossoms shouldn’t have a stroke\n stroke 0 \n # Draw the blossom! These big blossoms\n # overlap over each other to create a\n # neat effect.\n circle blossomSize\n \n # Starts the next branch on the right\n drawBranch(x + dx, y + dy, branchesLeft - 1, startAngle - Math.PI / 180 * degreeChange) \n # Starts the next branch on the left\n drawBranch(x + dx, y + dy, branchesLeft - 1, startAngle + Math.PI / 180 * degreeChange)\n \n###\nFinally we call our function and see what\nhappens. Play with the numbers at the top of\nthe function and see how they change the tree\n###\ndrawBranch(stage.width * .5, stage.height, iterations, Math.PI / 2, length)', - steps : generate.fromSequence([ - ]) -}; diff --git a/lib/challenges/summer_camp/day_twentyone.js b/lib/challenges/summer_camp/day_twentyone.js deleted file mode 100644 index 3d1965666..000000000 --- a/lib/challenges/summer_camp/day_twentyone.js +++ /dev/null @@ -1,143 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_twentyone', - title : 'Fireworks', - short_title : 'Fireworks', - icon_class : 'challenge_fireworks', - description : 'Camp is almost all wrapped up, and to celebrate we have fireworks! Fireworks have been around for centuries and are believed to have been invented by the Chinese. We are almost ready to put on the show, but need a little bit of help designing the fireworks. Can you give it a shot?', - img : '/assets/summercamp/ch_pics/day_21.png', - completion_text: 'Well done! You made a function that can draw fireworks! Can you improve upon it? Draw them all over the screen, add in other creations and share it!', - difficulty : 3, - startAt : 0, - summerCamp : true, - rewards : null, - steps : generate.fromSequence([ - [ - 'The sun is down and the moon is new, let’s make the sky dark with `background black`', - 'background black', - [ - [ 'background', { color: palette.black } ] - ] - ], - [ - 'Lets set the `stroke` to `red` for our firework', - 'stroke red', - [ - ['stroke-color', { color: palette.red } ] - ] - ], - [ - 'We want to draw 60 lines radiating outward, so let’s use a for loop `for i in [ 0 ... 60 ]`', - 'for i in [ 0 ... 60 ]', - [ - [ 'for-loop', { iterator: 'i', range: '0...60' } ] - ] - ], - [ - 'All of the lines in our firework should have different lengths! So for each line radiating out, let’s set its length with `length = random 1, 200`.', - ' length = random 1, 200', - function () { - var out = [], - i; - for (i = 0; i < 60; i++) { - out.push( [ 'var', function (opts) { - return (opts.name === 'length' && opts.value === 'random1,200' ); - }]); - } - return out; - } - ], - [ - 'For each loop, we are drawing a new line radiating out. So for every time we loop, the angle of the line should change. This uses some advanced math, but don’t fear. Just **type** `angle = (360 / 60 * i) * (Math.PI / 180)`.', - ' angle = (360 / 60 * i) * (Math.PI / 180)', - function () { - var out = [], - i; - for (i = 0; i < 60; i++) { - out.push( [ 'var', function (opts) { - return (opts.name === 'length' && opts.value === 'random1,200' ); - }]); - out.push( [ 'var', function (opts) { - return (opts.name === 'angle' && opts.value === '(360/60*i)*(Math.PI/180)' ); - }]); - } - return out; - }, - {"override": true} - ], - [ - 'Using this new angle and the random length let’s calculate where the x coordinate for the end of the radiating line should be. **Type** `dx = 250 + Math.sin(angle) * length`.', - ' dx = 250 + Math.sin(angle) * length', - function () { - var out = [], - i; - for (i = 0; i < 60; i++) { - out.push( [ 'var', function (opts) { - return (opts.name === 'length' && opts.value === 'random1,200' ); - }]); - out.push( [ 'var', function (opts) { - return (opts.name === 'angle' && opts.value === '(360/60*i)*(Math.PI/180)' ); - }]); - out.push( [ 'var', function (opts) { - return (opts.name === 'dx' && opts.value === '250+Math.sin(angle)*length' ); - }]); - } - return out; - }, - {"override": true} - ], - [ - 'Now let’s calculate the y coordinate for the end of the radiating line. **Type** `dy = 250 + Math.cos(angle) * length`.', - ' dy = 250 + Math.cos(angle) * length', - function () { - var out = [], - i; - for (i = 0; i < 60; i++) { - out.push( [ 'var', function (opts) { - return (opts.name === 'length' && opts.value === 'random1,200' ); - }]); - out.push( [ 'var', function (opts) { - return (opts.name === 'angle' && opts.value === '(360/60*i)*(Math.PI/180)' ); - }]); - out.push( [ 'var', function (opts) { - return (opts.name === 'dx' && opts.value === '250+Math.sin(angle)*length' ); - }]); - out.push( [ 'var', function (opts) { - return (opts.name === 'dy' && opts.value === '250+Math.cos(angle)*length' ); - }]); - } - return out; - }, - {"override": true} - ], - [ - 'Finally, with all the coordinates set we are ready to draw the line. **Type** `lineTo dx, dy` ', - ' lineTo dx, dy', - function () { - var out = [], - i; - for (i = 0; i < 60; i++) { - out.push( [ 'var', function (opts) { - return (opts.name === 'length' && opts.value === 'random1,200' ); - }]); - out.push( [ 'var', function (opts) { - return (opts.name === 'angle' && opts.value === '(360/60*i)*(Math.PI/180)' ); - }]); - out.push( [ 'var', function (opts) { - return (opts.name === 'dx' && opts.value === '250+Math.sin(angle)*length' ); - }]); - out.push( [ 'var', function (opts) { - return (opts.name === 'dy' && opts.value === '250+Math.cos(angle)*length' ); - }]); - out.push( [ 'line', function (opts) { - return (typeof opts.dx === 'number') && (typeof opts.dy === 'number'); - }]); - } - return out; - }, - {"override": true} - ] - ]) -}; diff --git a/lib/challenges/summer_camp/day_two.js b/lib/challenges/summer_camp/day_two.js deleted file mode 100644 index 500393ba0..000000000 --- a/lib/challenges/summer_camp/day_two.js +++ /dev/null @@ -1,162 +0,0 @@ -var palette = require('../../language/modules/palette.json'), - generate = require('./../util/generate'); - -module.exports = { - id : 'day_two', - title : 'Draw your Campsite', - short_title : 'Campsite', - description : 'Time to find a clearing to set up camp. The most important thing to look for when searching for an optimal campsite is flat ground. If possible, keep your campsite close to a water source. This will make cooking and cleanup much easier. Finally, make sure to be surrounded by trees, as they are a great source of kindling and will provide protection from the sun. \nYour friends will want to see what your campsite looks like, so once you have one, draw it! You can use code to set the scene for where you are staying for the next two weeks.', - icon_class : 'challenge_location', - completion_text: 'The camp site is looking great! Try adding more trees, flowers, rocks... perhaps a fence as well?', - img : '/assets/summercamp/ch_pics/day_2.png', - difficulty : 1, - startAt : 1, - summerCamp : true, - rewards : {'outfit': 1}, - steps : generate.fromSequence([ - [ - 'Today is a beautiful day - **type** `background blue`', - 'background blue', - [ - [ 'background', { color: palette.blue } ] - ] - ], - [ - 'Set the stroke to 0, to avoid drawing lines - **type** `stroke 0`', - 'stroke 0', - [ - [ 'stroke-width', { 'width': 0 } ] - ] - ], - [ - 'Move the cursor where the sun will be - **type** `moveTo 400, 50`', - 'moveTo 400, 50', - [ - [ 'move-to', { x: 400, y: 50 } ] - ] - ], - [ - 'Set the `color` of the sun `yellow`', - 'color yellow', - [ - [ 'color', { color: palette.yellow } ] - ] - ], - [ - 'Draw the sun with a circle - **type** `circle 40`', - 'circle 40', - [ - [ 'ellipse', { rx: 40, isCircle: true } ] - ] - ], - [ - 'There is one cloud in the horizon. - **type** `moveTo 440, 80`', - 'moveTo 440, 80', - [ - [ 'move-to', { x: 440, y: 80 } ] - ] - ], - [ - 'Set the `color` of the cloud `white`', - 'color white', - [ - [ 'color', { color: palette.white } ] - ] - ], - [ - 'Draw the cloud with an ellipse - **type** `ellipse 60, 20`', - 'ellipse 60, 20', - [ - [ 'ellipse', { rx: 60, ry: 20 } ] - ] - ], - [ - 'The lake has a beautiful `color` `aquamarine` this morning', - 'color aquamarine', - [ - [ 'color', { color: palette.aquamarine } ] - ] - ], - [ - 'Move the cursor where the lake is - **type** `moveTo 0, 190`', - 'moveTo 0, 190', - [ - [ 'move-to', { x: 0, y: 190 } ] - ] - ], - [ - 'Draw the lake using a simple rectangle - **type** `rectangle 500, 310`', - 'rectangle 500, 310', - [ - [ 'rectangle', { width: 500, height: 310 } ] - ] - ], - [ - 'Set the `color` to `green` for the grass', - 'color green', - [ - [ 'color', { color: palette.green } ] - ] - ], - [ - 'Move the cursor before drawing the grass - **type** `moveTo 250, 700`', - 'moveTo 250, 700', - [ - [ 'move-to', { x: 250, y: 700 } ] - ] - ], - [ - 'Draw the camp site with a circle - **type** `circle 500`', - 'circle 500', - [ - [ 'ellipse', { rx: 500, isCircle: true } ] - ] - ], - [ - 'Looking a bit empty, let\'s draw a tree - **type** `moveTo 120, 300`', - 'moveTo 120, 300', - [ - [ 'move-to', { x: 120, y: 300 } ] - ] - ], - [ - 'Set the `color` of the trunk to `brown`', - 'color brown', - [ - [ 'color', { color: palette.brown } ] - ] - ], - [ - 'Draw the trunk of the tree using a rectangle - **type** `rectangle 15, 100`', - 'rectangle 15, 100', - [ - [ 'rectangle', { width: 15, height: 100 } ] - ] - ], - [ - 'Now place the foliage of the tree - **type** `move 8, -120`', - 'move 8, -120', - [ - [ 'move-to', { dx: 8, dy: -120 } ] - ] - ], - [ - 'Set the `color` to `darkgreen`', - 'color darkgreen', - [ - [ 'color', { color: palette.darkgreen } ] - ] - ], - [ - 'Draw the foliage with a triangle using `polygon` - **type** `polygon -40, 160, 40, 160`', - 'polygon -40, 160, 40, 160', - [ - [ 'polygon', { points: [ - { x: 0, y: -0 }, - { x: -40, y: 160 }, - { x: 40, y: 160 } - ] } ] - ] - ], - ]) -}; diff --git a/lib/challenges/summer_camp/index.js b/lib/challenges/summer_camp/index.js deleted file mode 100644 index a3e034b47..000000000 --- a/lib/challenges/summer_camp/index.js +++ /dev/null @@ -1,23 +0,0 @@ -module.exports = [ - require('./day_one'), - require('./day_two'), - require('./day_three'), - require('./day_four'), - require('./day_five'), - require('./day_six'), - require('./day_seven'), - require('./day_eight'), - require('./day_nine'), - require('./day_ten'), - require('./day_eleven'), - require('./day_twelve'), - require('./day_thirteen'), - require('./day_fourteen'), - require('./day_fifteen'), - require('./day_sixteen'), - require('./day_seventeen'), - require('./day_eighteen'), - require('./day_nineteen'), - require('./day_twenty'), - require('./day_twentyone') - ]; \ No newline at end of file diff --git a/lib/challenges/sweden.js b/lib/challenges/sweden.js deleted file mode 100644 index 792d0f067..000000000 --- a/lib/challenges/sweden.js +++ /dev/null @@ -1,61 +0,0 @@ -var palette = require('../language/modules/palette.json'), - generate = require('./util/generate'); - -module.exports = { - id : 'flag-sweden', - title : 'Swedish flag', - description : 'A flag challenge with two crossing rectangles!', - code : '', - startAt : 2, - steps : generate.fromSequence([ - [ - 'Set the background to blue - **type** `background blue`', - 'background blue', - [ - [ 'background', { color: palette.blue } ] - ] - ], - [ - 'Set the drawing color to yellow - **type** `color yellow`', - 'color yellow', - [ - [ 'color', { color: palette.yellow } ] - ] - ], - [ - 'Set the stroke to 0, to avoid drawing outlines - in a new line, **type** `stroke 0`', - 'stroke 0', - [ - [ 'stroke-width', { width: 0 } ] - ] - ], - [ - 'Move to the top and left - in a new line, **type** `moveTo 150`', - 'moveTo 150', - [ - [ 'move-to', { x: 150, y: 0 } ] - ] - ], - [ - 'Draw your first rectangle - **type** `rectangle 50, 500`', - 'rectangle 50, 500', - [ - [ 'rectangle', { width: 50, height: 500 } ] - ] - ], - [ - 'Move to the left and down - in a new line, **type** `moveTo 0, 150`', - 'moveTo 0 , 150', - [ - [ 'move-to', { x: 0, y: 150 } ] - ] - ], - [ - 'Draw another rectangle with width 500 and height 50 - in a new line, **type** `rectangle 500, 50`', - 'rectangle 500, 50', - [ - [ 'rectangle', { width: 500, height: 50 } ] - ] - ] - ]) -}; \ No newline at end of file diff --git a/lib/challenges/util/validator.js b/lib/challenges/util/validator.js new file mode 100644 index 000000000..c27af44f3 --- /dev/null +++ b/lib/challenges/util/validator.js @@ -0,0 +1,186 @@ +"use strict"; + +var stringUtil = require('../../util/string'); + +module.exports = function (steps, synonyms) { + + var validateString = function (regex, str) { + var reg = new RegExp(regex); + return !!reg.exec(str); //just the boolean result + }, + /** + * Replaces synonyms in a rule + * @param {string} rule The rule + * @return {string} The modified rule + */ + addSynonims = function (rule) { + //add the synonims + if (typeof synonyms === "object") { + Object.keys(synonyms).forEach(function (baseWord) { + var syns = synonyms[baseWord], + newWord = '(' + baseWord; //synonyms for 1 word + + if (rule.indexOf(baseWord) > -1) { + syns.forEach(function (key) { + newWord = newWord + '|' + key; + }); + newWord = newWord + ')'; + rule = rule.replace(baseWord, newWord); + } + }); + } + return rule; + }, + /** + * Completes the regex: + * - adding EOL and beginning of line + * - making whitespaces optional + * @param {[type]} rule [description] + * @return {[type]} [description] + */ + completeRegex = function (rule) { + + //remove all the spaces around ,*()[]= + rule = rule.replace(/ *([\,\(\)\[\]\=]|\.\.) */g, "$1"); + + //make all the spaces optional + rule = rule.replace(/([,\[\]=\/\<\>]|\.\.)/g, " ?$1 ?"); + + //escape brackets, dash + rule = rule.replace(/[\[\]\.\(\)]/g, "\\$&"); + + //escape math operators + rule = rule.replace(/[\+\-\*\/\%]/g, "\\$&"); + + //add the synonims + rule = addSynonims(rule); + + rule = "^" + rule + " *$"; + + //NOTE: the regex comes out correct, but not particularly clean from here + return rule; + }, + + validateSingleRule = function (rule, line) { + var fn; + if (typeof rule === "string") { + if (rule.indexOf("@@") === 0) { + //if a rule starts with @@ what follows needs to be escaped + rule = rule.substr(2, rule.length - 1); + rule = stringUtil.escapeRegex(rule); + } else if (rule.indexOf("__") === 0) { + //If a rule is prefixed with __ it will be left untouched + rule = rule.substr(2, rule.length - 1); + } else { + rule = completeRegex(rule); + } + return validateString(rule, line); + } else if (typeof rule === "object") { + if (rule.type === "function") { + /*jshint evil: true*/ + eval("fn = " + rule.fn); + /*jshint evil: false*/ + return fn(line); + } + } + return false; + }, + validator = { + /** + * Validates a step (possibly many rules and many lines) + * @param {Array/String} rules An array or a string containing the rules to be validated + * @param {object} lines An array of lines that should be matched against the steps + * @return {object} [description] + */ + validateStep: function (rules, lines) { + var res = true, + rep = {valid: false}; + if (rules instanceof Array) { + rules.forEach(function (rule, idx) { + var line = lines[idx]; + res = res && validateSingleRule(rule, line); + }); + } else { + res = validateSingleRule(rules, lines[0]); + } + rep.valid = res; + return rep; + }, + /** + * Checks all the steps in the code. + * It returns a report in the following form: + * { + * lastValidStep: 12, + * report: { + * steps: [ + * {valid: true, lines: [12]}, + * {valid: true, lines: [13]}, + * {valid: true, lines: [14]}, + * {valid: true, lines: [16,17]}, + * {valid: false, lines: [18,19]}, + * {valid: false, lines: [20]} + * ] + * } + * } + * @param {string} code all the code written so far + * @param {all the steps} steps [description] + * @param {[type]} currentStep [description] + * @return {object} A report of the result + */ + validate: function (code) { + var lines = code.split('\n'), + report = {lastValidStep: null, steps: [], complete: false}, + currentLine = 0, + validSteps = 0, + validCode = true, + firstBrokenLine = null; + + + steps.forEach(function (step, stepIdx) { + var rules = step.validate || step.solution, + i, + currLines = [], + stepReport, + firstLineOfStep = currentLine; + //every step could be made of more than 1 line + if (rules instanceof Array) { + for (i = 0; i < rules.length; i++) { + currLines.push(lines[currentLine]); + currentLine++; + } + } else { + currLines.push(lines[currentLine]); + currentLine++; + } + //validate the rules and the lines we have + stepReport = validator.validateStep(rules, currLines); + stepReport.lines = []; + + validCode = validCode && stepReport.valid; + + if (firstBrokenLine === null && !validCode) { + firstBrokenLine = stepIdx; + } + + if (stepReport.valid) { + report.lastValidStep = stepIdx; + validSteps++; + + } + for (i = 0; i < currLines.length; i++) { + //TODO: this could possibly done cleaner + stepReport.lines.push(i + firstLineOfStep); + } + report.steps.push(stepReport); + }); + report.complete = validSteps === steps.length; + report.firstBrokenLine = firstBrokenLine; + return report; + }, + private: { + completeRegex: completeRegex + } + }; + return validator; +}; + diff --git a/lib/challenges/worlds/basic/baloon.json b/lib/challenges/worlds/basic/baloon.json new file mode 100644 index 000000000..2f396bafe --- /dev/null +++ b/lib/challenges/worlds/basic/baloon.json @@ -0,0 +1,42 @@ +{ + "id": "baloon", + "title": "Blue Balloon", + "cover": "blue-baloon.png", + "description": "Draw a balloon floating in the air using polygons!", + "startAt": 2, + "steps": [ + { + "hint": "Set the color to blue - **type** `color blue`", + "solution": "color blue" + }, + { + "hint": "Set the stroke to 0, to avoid drawing lines", + "solution": "stroke 0" + }, + { + "hint": "Draw a circle with a size of 100", + "solution": "circle 100" + }, + { + "hint": "Move down by 100 - **type** `move 0, 100`", + "solution": "move 0, 100" + }, + { + "hint": "Draw the knot - **type** `polygon 15, 15, -15, 15`", + "solution": "polygon 15, 15, -15, 15" + }, + { + "hint": "Move down a little more - **type** `move 0, 15`", + "solution": "move 0, 15" + }, + { + "hint": "Choose a thick black stroke - **type** `stroke black, 5`", + "solution": "stroke black, 5" + }, + { + "hint": "Draw the line of the balloon thread - **type** `line 0, 200`", + "solution": "line 0, 200" + } + ], + "completion_text": "Awesome balloon! Why not change the color before moving on?" +} diff --git a/lib/challenges/worlds/basic/breakfast.json b/lib/challenges/worlds/basic/breakfast.json new file mode 100644 index 000000000..b42d3d54d --- /dev/null +++ b/lib/challenges/worlds/basic/breakfast.json @@ -0,0 +1,197 @@ +{ + "id": "breakfast", + "title": "Breakfast", + "description": "Draw a bacon and eggs breakfast!", + "startAt": 2, + "fatherDay": true, + "steps": [ + { + "hint": "Set the background to blue - **type** `background blue`", + "solution": "background blue" + }, + { + "hint": "Set the stroke to 0, to avoid drawing lines", + "solution": "stroke 0" + }, + { + "hint": "Set the color to white", + "solution": "color white" + }, + { + "hint": "Draw a circle with a size of 240", + "solution": "\n#Plate\ncircle 240", + "validate": "circle 240" + }, + { + "hint": "Set the color to `'#eee'` - **type** `color '#eee'`", + "solution": "color '#eee'" + }, + { + "hint": "Draw a circle with a size of 200", + "solution": "circle 200" + }, + { + "hint": "Move up and left - **type** `move -70, -70`", + "solution": "\n#Egg\nmove -70, -70", + "validate": "move -70,-70" + }, + { + "hint": "Set the color to white", + "solution": "color white" + }, + { + "hint": "Draw a circle with a size of 80", + "solution": "circle 80" + }, + { + "hint": "Set the color to yellow", + "solution": "color yellow" + }, + { + "hint": "Draw a circle with a size of 30", + "solution": "circle 30" + }, + { + "hint": "Move up and right - **type** `move 90, -60`", + "solution": "\n#Bacon 1\nmove 90, -60", + "validate": "move 90,-60" + }, + { + "hint": "Set the color to red", + "solution": "color red" + }, + { + "hint": "Draw a rectangle with a size of 60 and 200 - **type** `rectangle 60, 200`", + "solution": "rectangle 60, 200" + }, + { + "hint": "Move 30 to the right - **type** `move 30`", + "solution": "move 30" + }, + { + "hint": "Set the color to `'#aa0000'` - **type** `color '#aa0000'`", + "solution": "color '#aa0000'" + }, + { + "hint": "Draw a rectangle with a size of 30 and 200 - **type** `rectangle 30, 200`", + "solution": "rectangle 30, 200" + }, + { + "hint": "Move down and left - **type** `move -3, 10`", + "solution": "move -3, 10" + }, + { + "hint": "Set the color to white", + "solution": "color white" + }, + { + "hint": "Draw a rectangle with a size of 6 and 180 - **type** `rectangle 6, 180`", + "solution": "rectangle 6, 180" + }, + { + "hint": "Move down and right - **type** `move 40, 50`", + "solution": "\n#Bacon 2\nmove 40, 50", + "validate": "move 40, 50" + }, + { + "hint": "Set the color to red", + "solution": "color red" + }, + { + "hint": "Draw a rectangle with a size of 60 and 200 - **type** `rectangle 60, 200`", + "solution": "rectangle 60, 200" + }, + { + "hint": "Move 30 to the right - **type** `move 30`", + "solution": "move 30" + }, + { + "hint": "Set the color to `'#aa0000'` - **type** `color '#aa0000'`", + "solution": "color '#aa0000'" + }, + { + "hint": "Draw a rectangle with a size of 30 and 200 - **type** `rectangle 30, 200`", + "solution": "rectangle 30, 200" + }, + { + "hint": "Move down and left - **type** `move -3, 10`", + "solution": "move -3, 10" + }, + { + "hint": "Set the color to white", + "solution": "color white" + }, + { + "hint": "Draw a rectangle with a size of 6 and 180 - **type** `rectangle 6, 180`", + "solution": "rectangle 6, 180" + }, + { + "hint": "Move down and left - **type** `move -200, 150`", + "solution": "\n#Tomato 1\nmove -200, 150", + "validate": "move -200, 150" + }, + { + "hint": "Set the color to red", + "solution": "color red" + }, + { + "hint": "Draw a circle with a size of 40", + "solution": "circle 40" + }, + { + "hint": "Set the color to `'#cc4444'` - **type** `color '#cc4444'`", + "solution": "color '#cc4444'" + }, + { + "hint": "Draw a circle with a size of 35", + "solution": "circle 35" + }, + { + "hint": "Set the color to `'#aa4444'` - **type** `color '#aa4444'`", + "solution": "color '#aa4444'" + }, + { + "hint": "Draw an ellipse with a size of 30 and 10", + "solution": "ellipse 30, 10" + }, + { + "hint": "Draw an ellipse with a size of 10 and 30", + "solution": "ellipse 10, 30" + }, + { + "hint": "Move down and right - **type** `move 70, 50`", + "solution": "\n#Tomato 2\nmove 70, 50", + "validate": "move 70, 50" + }, + { + "hint": "Set the color to red", + "solution": "color red" + }, + { + "hint": "Draw a circle with a size of 40", + "solution": "circle 40" + }, + { + "hint": "Set the color to `'#cc4444'` - **type** `color '#cc4444'`", + "solution": "color '#cc4444'" + }, + { + "hint": "Draw a circle with a size of 35", + "solution": "circle 35" + }, + { + "hint": "Set the color to `'#aa4444'` - **type** `color '#aa4444'`", + "solution": "color '#aa4444'" + }, + { + "hint": "Draw an ellipse with a size of 30 and 10", + "solution": "ellipse 30, 10" + }, + { + "hint": "Draw an ellipse with a size of 10 and 30", + "solution": "ellipse 10, 30" + } + ], + "completion_text": "Well done!", + "cover": "breakfast.png" +} \ No newline at end of file diff --git a/lib/challenges/worlds/basic/index.json b/lib/challenges/worlds/basic/index.json new file mode 100644 index 000000000..2369ad6ca --- /dev/null +++ b/lib/challenges/worlds/basic/index.json @@ -0,0 +1,11 @@ +{ + "challenges": [ + "./sunnyday", + "./swissflag", + "./stare", + "./smiley", + "./baloon", + "./stickman" + + ] +} diff --git a/lib/challenges/worlds/basic/smiley.json b/lib/challenges/worlds/basic/smiley.json new file mode 100644 index 000000000..54b2960d8 --- /dev/null +++ b/lib/challenges/worlds/basic/smiley.json @@ -0,0 +1,50 @@ +{ + "id": "smiley", + "title": "Your first face", + "description": "Draw a face", + "startAt": 2, + "steps": [ + { + "hint": "Set the drawing color to yellow - **type** `color yellow`", + "solution": "color yellow" + }, + { + "hint": "Choose a thick black stroke - **type** `stroke black, 20`", + "solution": "stroke black, 20" + }, + { + "hint": "Draw a circle with a size of 200", + "solution": "circle 200" + }, + { + "hint": "Move left and up by 80 - **type** `move -80, -80`", + "solution": "move -80, -80" + }, + { + "hint": "Set the drawing color to black", + "solution": "color black" + }, + { + "hint": "Draw a circle with a radius of 20", + "solution": "circle 20" + }, + { + "hint": "Move right by 160 - **type** `move 160`", + "solution": "move 160" + }, + { + "hint": "Draw another circle with a size of 20", + "solution": "circle 20" + }, + { + "hint": "Move to the center and down - In a new line, **type** `moveTo 250, 270`", + "solution": "moveTo 250, 270" + }, + { + "hint": "An arc is part of a circle, we can draw one as the mouth - **type** `arc 100, 1, 2`", + "solution": "arc 100, 1, 2" + } + ], + "completion_text": "Nice! Keep up the good work you face drawing genius!", + "cover": "smiley.png" +} diff --git a/lib/challenges/worlds/basic/stare.json b/lib/challenges/worlds/basic/stare.json new file mode 100644 index 000000000..b5744bbf0 --- /dev/null +++ b/lib/challenges/worlds/basic/stare.json @@ -0,0 +1,55 @@ +{ + "id": "stare", + "title": "Stare in the dark", + "description": "Draw a pair of staring eyes in the dark", + "startAt": 2, + "steps": [ + { + "hint": "Set the background to black", + "solution": "background black" + }, + { + "hint": "Move to the left by 80 - **type** `move -80`", + "solution": "move -80", + "validate": "move -80" + }, + { + "hint": "Set the drawing color to white", + "solution": "color white" + }, + { + "hint": "Draw an ellipse, it's like a stretched circle - **type** `ellipse 60, 40`", + "solution": "ellipse 60, 40" + }, + { + "hint": "Set the drawing color to black - **type** `color black`", + "solution": "color black" + }, + { + "hint": "Draw a circle with a size of 10 - **type** `circle 10`", + "solution": "circle 10" + }, + { + "hint": "Move to the right by 160 - **type** `move 160`", + "solution": "move 160" + }, + { + "hint": "Set the drawing color to white again", + "solution": "color white" + }, + { + "hint": "Now draw another ellipse with width 60 and height 40 - **type** `ellipse 60, 40`", + "solution": "ellipse 60, 40" + }, + { + "hint": "Set the drawing color to black", + "solution": "color black" + }, + { + "hint": "Finish it up by drawing a circle with a size of 10", + "solution": "circle 10" + } + ], + "completion_text": "You Wizard! The next time I need spooky eyes I know who to call!", + "cover": "stare.png" +} diff --git a/lib/challenges/worlds/basic/stickman.json b/lib/challenges/worlds/basic/stickman.json new file mode 100644 index 000000000..8441783bb --- /dev/null +++ b/lib/challenges/worlds/basic/stickman.json @@ -0,0 +1,54 @@ +{ + "id": "stickman", + "title": "Stickman", + "description": "Draw a stickman using circles and lines", + "startAt": 2, + "steps": [ + { + "hint": "Set the `stroke` to `black` with a size of `10`", + "solution": "stroke black, 10" + }, + { + "hint": "Move up on the canvas, **type** `move 0, -50`", + "solution": "move 0, -50" + }, + { + "hint": "Draw the stickman body - `line 0, 150`", + "solution": "line 0, 150" + }, + { + "hint": "Draw the stickman left arm - `line -80, 120`", + "solution": "line -80, 120" + }, + { + "hint": "Good, now with the right arm - `line 80, 120`", + "solution": "line 80, 120" + }, + { + "hint": "Move down, **type** `move 0, 150`", + "solution": "move 0, 150" + }, + { + "hint": "Draw the stickman left leg: `line -80, 120`", + "solution": "line -80, 120" + }, + { + "hint": "Good, now with the right leg - `line 80, 120`", + "solution": "line 80, 120" + }, + { + "hint": "Move to the top of the drawing, **type** `moveTo 250, 100`", + "solution": "moveTo 250, 100" + }, + { + "hint": "Set the stroke back to 0", + "solution": "stroke 0" + }, + { + "hint": "Now to draw a many sided shape - **type** `polygon -60, 50, 0, 100, 60, 50`", + "solution": "polygon -60, 50, 0, 100, 60, 50" + } + ], + "completion_text": "Nice one! The canvas is 500 wide and 500 high, moving about on it is a skill!", + "cover": "stickman.png" +} diff --git a/lib/challenges/worlds/basic/sunnyday.json b/lib/challenges/worlds/basic/sunnyday.json new file mode 100644 index 000000000..2f751fffe --- /dev/null +++ b/lib/challenges/worlds/basic/sunnyday.json @@ -0,0 +1,23 @@ +{ + "id": "sunnyday", + "title": "Sunny Day", + "description": "Learn the basics by coding a clear sunny day.", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "First we will fill the canvas with a nice sky blue - **type** `background blue`", + "solution": "background blue" + }, + { + "hint": "Now we need to change the drawing color to a bright yellow - in a new line **type** `color yellow`", + "solution": "color yellow" + }, + { + "hint": "Finally we draw the sun, we use the circle command followed by the size we want the circle to be - in a new line **type** `circle 150`", + "solution": "circle 150" + } + ], + "completion_text": "Well done! It's a bright and sunny day, now change the number next to circle and see what happens", + "cover": "sunny-day.png" +} diff --git a/lib/challenges/worlds/basic/swissflag.json b/lib/challenges/worlds/basic/swissflag.json new file mode 100644 index 000000000..05dc69c33 --- /dev/null +++ b/lib/challenges/worlds/basic/swissflag.json @@ -0,0 +1,39 @@ +{ + "id": "swissflag", + "title": "Swiss Flag", + "description": "Make the Swiss Flag with code", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Now for something a little more challenging. We can make the background a solid color by **typing** `background red`.", + "solution": "background red" + }, + { + "hint": "We’re going to draw lines, so we need to set a nice big stroke for them. **Type** `stroke 66`", + "solution": "stroke 66" + }, + { + "hint": "Now let’s set the stroke color to white - on the third line **type** `stroke white`", + "solution": "stroke white" + }, + { + "hint": "Let’s draw our first line. We have already set that it will be white and 66 pixels wide. We will draw a line of length 100 by **typing** `line 100`.", + "solution": "line 100" + }, + { + "hint": "What a short, stubby line. It needs a friend. We’ll make its friend 100 pixels long too, but this time in the opposite direction. **Type** `line -100`.", + "solution": "line -100" + }, + { + "hint": "Much better, now we need lines going up and down. But how are we going to do that? The line function can actually take two numbers. The first number controls where the horizontal position is, the second controls where the vertical position is. **Type** `line 0, 100`", + "solution": "line 0, 100" + }, + { + "hint": "The line goes down! To go the other way we need to type **type** `line 0, -100`.", + "solution": "line 0, -100" + } + ], + "completion_text": "What a great flag! The Swiss are known for their great minimalist designs.", + "cover": "swissflag.png" +} diff --git a/lib/challenges/worlds/medium/dots.json b/lib/challenges/worlds/medium/dots.json new file mode 100644 index 000000000..6c6166abb --- /dev/null +++ b/lib/challenges/worlds/medium/dots.json @@ -0,0 +1,39 @@ +{ + "id": "dots", + "title": "Dots Pattern", + "description": "Create a fancy dots pattern using loops and circles!", + "code": "", + "startAt": 1, + "steps": [ + { + "hint": "Set the background to red", + "solution": "background red" + }, + { + "hint": "Set the stroke to 0", + "solution": "stroke 0" + }, + { + "hint": "Set the color to yellow", + "solution": "color yellow" + }, + { + "hint": "Now open a loop - **type** `for x in [ 0 .. 25 ]`", + "solution": "for x in [ 0..25 ]" + }, + { + "hint": "Inside this loop, open a second loop - **type** `for y in [ 0 .. 25 ]`", + "solution": " for y in [ 0..25 ]" + }, + { + "hint": "Move around, **type** `moveTo x * 20, y * 20`", + "solution": " moveTo x * 20, y * 20" + }, + { + "hint": "Now for the dots - **type** `circle 6`", + "solution": " circle 6" + } + ], + "completion_text": "Mathematical! Change the numbers and see what happens.", + "cover": "dots.png" +} diff --git a/lib/challenges/worlds/medium/gradient.json b/lib/challenges/worlds/medium/gradient.json new file mode 100644 index 000000000..744be51f1 --- /dev/null +++ b/lib/challenges/worlds/medium/gradient.json @@ -0,0 +1,31 @@ +{ + "id": "gradient", + "title": "Rainbow gradient", + "description": "Combine for loops and colors to make something magical!", + "code": "", + "startAt": 1, + "steps": [ + { + "hint": "Start by opening a for loop - **type** `for x in [ 0 .. 25 ]`", + "solution": "for x in [ 0..25 ]" + }, + { + "hint": "Now lets open a second for loop inside - **type** `for y in [ 0 .. 25 ]`", + "solution": " for y in [ 0..25 ]" + }, + { + "hint": "Let's rotate through the color spectrum - **type** `color rotate red, 10 * x + 10 * y`", + "solution": " color rotate red, 10 * x + 10 * y" + }, + { + "hint": "Now we need to move every time we draw - **type** `moveTo 20 * x, 20 * y`", + "solution": " moveTo 20 * x, 20 * y" + }, + { + "hint": "Now for the shapes draw a square of size 20", + "solution": " square 20" + } + ], + "completion_text": "Try changing the numbers in the rotate function and see what happens.", + "cover": "gradient.png" +} diff --git a/lib/challenges/worlds/medium/house.json b/lib/challenges/worlds/medium/house.json new file mode 100644 index 000000000..e3fc73ccb --- /dev/null +++ b/lib/challenges/worlds/medium/house.json @@ -0,0 +1,87 @@ +{ + "id": "house", + "title": "House", + "description": "Draw a cosy house!", + "code": "", + "startAt": 1, + "steps": [ + { + "hint": "Let's start with the sky! Set the `background` to `blue`", + "solution": "background blue" + }, + { + "hint": "Now set the stroke to 0", + "solution": "stroke 0" + }, + { + "hint": "Move to the left and up, **type** `move -150, -50`", + "solution": "move -150, -50" + }, + { + "hint": "Now set the color to beige", + "solution": "color beige" + }, + { + "hint": "Now draw rectangle, **type** `rectangle 300, 200`", + "solution": "rectangle 300, 200" + }, + { + "hint": "Move to the right and up, **type** `move 150, -100`", + "solution": "move 150, -100" + }, + { + "hint": "Set the color to darkred for the roof", + "solution": "color darkred" + }, + { + "hint": "Now let's draw the roof, **type** `polygon 170, 100, -170, 100`", + "solution": "polygon 170, 100, -170, 100" + }, + { + "hint": "Move to the left and down, **type** `move -250, 300`", + "solution": "move -250, 300" + }, + { + "hint": "Now set the color to green for the grass", + "solution": "color green" + }, + { + "hint": "Draw rectangle for the grass, width a size of 500, 100", + "solution": "rectangle 500, 100" + }, + { + "hint": "Move to the right and up, **type** `move 220, -80`", + "solution": "move 220, -80" + }, + { + "hint": "Now set the color to brown for the wooden door", + "solution": "color brown" + }, + { + "hint": "Draw rectangle for the door, with a size of 60, 80", + "solution": "rectangle 60, 80" + }, + { + "hint": "Set the color to aqua for the windows", + "solution": "color aqua" + }, + { + "hint": "Move to the left and up, **type** `move -80, -80`", + "solution": "move -80, -80" + }, + { + "hint": "Draw square with a size of 50", + "solution": "square 50" + }, + { + "hint": "Move to the right, **type** `move 170`", + "solution": "move 170" + }, + { + "hint": "Draw square with a size of 50", + "solution": "square 50" + } + ], + "completion_text": "You built an awesome house with code!", + "cover": "house.png" +} diff --git a/lib/challenges/worlds/medium/index.json b/lib/challenges/worlds/medium/index.json new file mode 100644 index 000000000..6d4e6623b --- /dev/null +++ b/lib/challenges/worlds/medium/index.json @@ -0,0 +1,13 @@ +{ + "challenges": [ + "./shrinking", + "./random", + "./starry", + "./house", + "./dots", + "./gradient", + "./planet", + "./pizza" + ] +} + diff --git a/lib/challenges/worlds/medium/pizza.json b/lib/challenges/worlds/medium/pizza.json new file mode 100644 index 000000000..fef200afc --- /dev/null +++ b/lib/challenges/worlds/medium/pizza.json @@ -0,0 +1,50 @@ +{ + "id": "pizza", + "title": "Pizza", + "description": "Code yourself a tasty pizza!", + "startAt": 2, + "steps": [ + { + "hint": "Set the stroke to the color beige", + "solution": "stroke beige" + }, + { + "hint": "Set the stroke to 50", + "solution": "stroke 50" + }, + { + "hint": "Set the color to red", + "solution": "color red" + }, + { + "hint": "Draw a circle with a size of 200", + "solution": "circle 200" + }, + { + "hint": "Looking tasty! Set the stroke back to 0", + "solution": "stroke 0" + }, + { + "hint": "Top it with a cheesy yellow circle of size 195", + "solution": "color yellow\ncircle 195", + "validate": [ + "color yellow", + "circle 195" + ] + }, + { + "hint": "It's not pizza without toppings - set the color to darkred", + "solution": "color darkred" + }, + { + "hint": "Now `moveTo 164, 290`", + "solution": "moveTo 164, 290" + }, + { + "hint": "Cool, now draw a circle with a size of 20", + "solution": "circle 20" + } + ], + "completion_text": "Tasty! Finish it off with more toppings, let your imagination run wild and see what you can make, then share it with the world!", + "cover": "pizza.png" +} diff --git a/lib/challenges/worlds/medium/planet.json b/lib/challenges/worlds/medium/planet.json new file mode 100644 index 000000000..bdc15596e --- /dev/null +++ b/lib/challenges/worlds/medium/planet.json @@ -0,0 +1,60 @@ +{ + "id": "planet", + "title": "Planet painter", + "description": "Code your own planet!", + "startAt": 2, + "steps": [ + { + "hint": "Set the background using a hex code - **type** `background '#444444'`", + "solution": "background '#444444'", + "validate": "background '\\#444444'" + }, + { + "hint": "Set the stroke to 0, to avoid drawing lines", + "solution": "stroke 0" + }, + { + "hint": "Set the color to yellow", + "solution": "color yellow" + }, + { + "hint": "Now let's open a loop - **type** `for i in [ 0 .. 32 ]`", + "solution": "for i in [ 0..32 ]" + }, + { + "hint": "Now to set where each star will go - **type** `moveTo (random 1, 500), (random 1, 500)`", + "solution": " moveTo (random 1, 500), (random 1, 500)", + "validate": "__ moveTo ?\\( *random +1, +500 *\\), +\\( *random +1, +500 *\\)" + }, + { + "hint": "Draw each star as a circle with a size of 5", + "solution": " circle 5" + }, + { + "hint": "Now, make sure you're out of the for loop (not indented) and **type** `color purple`", + "solution": "color purple" + }, + { + "hint": "Now `moveTo 250, 250`", + "solution": "moveTo 250, 250" + }, + { + "hint": "Now draw a circle with a size of 170", + "solution": "circle 170" + }, + { + "hint": "Set the color to white", + "solution": "color white" + }, + { + "hint": "Choose a thick, white stroke - in a new line, **type** `stroke white, 5`", + "solution": "stroke white, 5" + }, + { + "hint": "Now draw an ellipse - **type** `ellipse 220, 4`", + "solution": "ellipse 220, 4" + } + ], + "completion_text": "Astronomical! Change the colors and see what you can add to make your planet even cooler before hitting share!", + "cover": "planet.png" +} diff --git a/lib/challenges/worlds/medium/random.json b/lib/challenges/worlds/medium/random.json new file mode 100644 index 000000000..e9c8495d0 --- /dev/null +++ b/lib/challenges/worlds/medium/random.json @@ -0,0 +1,47 @@ +{ + "id": "random", + "title": "Random!", + "description": "Not sure where to put something - theres a function for that!", + "startAt": 2, + "steps": [ + { + "hint": "Let's move the cursor somewhere random - **type** `moveTo (random 1, 500), (random 1, 500)`", + "solution": "moveTo (random 1, 500), (random 1, 500)", + "validate": "__moveTo ?\\( *random +1, +500 *\\), +\\( *random +1, +500 *\\)" + }, + { + "hint": "Set the color to red - **type** `color red`", + "solution": "color red" + }, + { + "hint": "Now let's draw a circle in a random place - **type** `circle 200`", + "solution": "circle 200" + }, + { + "hint": "Set the drawing color to green", + "solution": "color green" + }, + { + "hint": "Now draw a circle with size 150", + "solution": "circle 150" + }, + { + "hint": "Set the color to yellow", + "solution": "color yellow" + }, + { + "hint": "Now draw a circle with size 100", + "solution": "circle 100" + }, + { + "hint": "Set the color to blue", + "solution": "color blue" + }, + { + "hint": "Finish it of with a circle with a size of 50", + "solution": "circle 50" + } + ], + "completion_text": "Random functions give us a random number so we can put things in a surprise spot.", + "cover": "random.png" +} diff --git a/lib/challenges/worlds/medium/shrinking.json b/lib/challenges/worlds/medium/shrinking.json new file mode 100644 index 000000000..15437942a --- /dev/null +++ b/lib/challenges/worlds/medium/shrinking.json @@ -0,0 +1,27 @@ +{ + "id": "shrinking", + "title": "Shrinking Circles", + "description": "Ever shrinking circles with a for loop!", + "code": "", + "startAt": 1, + "steps": [ + { + "hint": "Set the stroke - **type** `stroke gray, 3`", + "solution": "stroke gray, 3" + }, + { + "hint": "Set the color to see through - **type** `color null`", + "solution": "color null" + }, + { + "hint": "Let's draw 32 circles all at once - **type** `for i in [ 0 .. 32 ]`", + "solution": "for i in [ 0..32 ]" + }, + { + "hint": "Awesome, now for the circles - inside the for loop **type** `circle 10 * i`", + "solution": " circle 10 * i" + } + ], + "completion_text": "Great! For loops let us repeat bits of code (it saves on all the typing)!", + "cover": "shrinking.png" +} diff --git a/lib/challenges/worlds/medium/starry.json b/lib/challenges/worlds/medium/starry.json new file mode 100644 index 000000000..190fd5ec6 --- /dev/null +++ b/lib/challenges/worlds/medium/starry.json @@ -0,0 +1,37 @@ +{ + "id": "starry", + "title": "Starry sky", + "description": "Code your own starry night sky using the random function!", + "startAt": 2, + "steps": [ + { + "hint": "Set the background to darkblue", + "solution": "background darkblue", + "validate": "^background darkblue$" + }, + { + "hint": "Now set the stroke to 0", + "solution": "stroke 0" + }, + { + "hint": "And set the drawing color to yellow", + "solution": "color yellow" + }, + { + "hint": "Now let's open a loop - **type** `for i in [ 0 .. 32 ]`", + "solution": "for i in [ 0..32 ]" + }, + { + "hint": "Now to set where each star will go - **type** `moveTo (random 1, 500), (random 1, 500)`", + "solution": " moveTo (random 1, 500), (random 1, 500)", + "validate": "__ moveTo ?\\( *random +1, +500 *\\), +\\( *random +1, +500 *\\)" + + }, + { + "hint": "Finally draw each star as a circle with a size of 5", + "solution": " circle 5" + } + ], + "completion_text": "Awesome! Press space and see what happens to the stars...", + "cover": "starry-sky.png" +} diff --git a/lib/challenges/worlds/mischiefweek2015/cat.json b/lib/challenges/worlds/mischiefweek2015/cat.json new file mode 100644 index 000000000..b7838444b --- /dev/null +++ b/lib/challenges/worlds/mischiefweek2015/cat.json @@ -0,0 +1,139 @@ +{ + "id": "cat", + "title": "Spooky Cat", + "cover": "mischiefweek2015/mw-002-cat.png", + "description": "Make a spooky cat with code", + "start_date": "2015-10-27T06:00:00", + "startAt": 2, + "completion_text": "Nice work - you made a spooky black cat! Try changing its color or even its tail! Don't forget to share your cat afterwards.", + "steps": [ + { + "hint": "We can make the background a spooky black by **typing** `background black`.", + "solution": "background black" + }, + { + "hint": "Set the stroke to zero so we have no outlines. **Type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Now let's set the color of the full moon. **Type** `color lightgray`", + "solution": "color lightgray" + }, + { + "hint": "Create a nice big circle for the moon. **Type** `circle 230`.", + "solution": "circle 230" + }, + { + "hint": "Now move downwards so we can draw the grass on the ground. **Type** `moveTo 250, 500`.", + "solution": "moveTo 250, 500" + }, + { + "hint": "It's night time, so we'll make the grass a dark green. **Type** `color darkgreen`.", + "solution": "color darkgreen" + }, + { + "hint": "Draw the grassy hill with an ellipse so it's round. **Type** `ellipse 300, 100`", + "solution": "ellipse 300, 100" + }, + { + "hint": "Now set the color of the cat! To make it black, **type** `color black`.", + "solution": "color black" + }, + { + "hint": "Move the cursor to draw the cat in the middle! **Type** `moveTo 250, 250`.", + "solution": "moveTo 250, 250" + }, + { + "hint": "Let's draw the head with an ellipse. **Type** `ellipse 60, 40`.", + "solution": "ellipse 60, 40" + }, + { + "hint": "Let's move to right and up to draw the first ear. **Type** `moveTo 280, 220`.", + "solution": "moveTo 280, 220" + }, + { + "hint": "We'll use the polygon function to make a nice pointy ear! **Type** `polygon 0, -40, 28, 20, close`.", + "solution": "polygon 0, -40, 28, 20, close" + }, + { + "hint": "Move to the left by 60 so we can draw the other ear! **Type** `move -60`.", + "solution": "move -60" + }, + { + "hint": "This ear is a reflection of the other one! **Type** `polygon 0, -40, -28, 20, close`.", + "solution": "polygon 0, -40, -28, 20, close" + }, + { + "hint": "Let's make the neck underneath. **Type** `moveTo 250, 310`.", + "solution": "moveTo 250, 310" + }, + { + "hint": "Draw it using an ellipse! **Type** `ellipse 30, 50`.", + "solution": "ellipse 30, 50" + }, + { + "hint": "Now lets make the body below. **Type** `moveTo 250, 360`.", + "solution": "moveTo 250, 360" + }, + { + "hint": "We'll use a bigger ellipse this time round! **type** `ellipse 50, 60`.", + "solution": "ellipse 50, 60" + }, + { + "hint": "Now we need to move down and right to make the tail! **Type** `moveTo 320, 380`.", + "solution": "moveTo 320, 380" + }, + { + "hint": "Let's use a sneaky text trick to make a curvy tail. **Type** `font 150`.", + "solution": "font 150" + }, + { + "hint": "We'll make the text bold to make a large. **Type** `bold true`.", + "solution": "bold true" + }, + { + "hint": "Great! Now draw the tail by **typing** `text 'S'`.", + "solution": "text 'S'" + }, + { + "hint": "Finally, we'll make the eyes. **Type** `moveTo 225, 250`.", + "solution": "moveTo 225, 250" + }, + { + "hint": "Set the color to yellow. **Type** `color yellow`.", + "solution": "color yellow" + }, + { + "hint": "We'll draw it using an ellipse. **Type** `ellipse 14, 6`.", + "solution": "ellipse 14, 6" + }, + { + "hint": "Now for the pupil! Set the color to black. **Type** `color black`.", + "solution": "color black" + }, + { + "hint": "Make a circle of radius 6. **Type** `circle 6`.", + "solution": "circle 6" + }, + { + "hint": "Great! Now lets move right to do the other eye. **Type** `moveTo 275, 250`.", + "solution": "moveTo 275, 250" + }, + { + "hint": "Set the color back to yellow. **Type** `color yellow`.", + "solution": "color yellow" + }, + { + "hint": "Make the same ellipse as before. **Type** `ellipse 14,6`.", + "solution": "ellipse 14, 6" + }, + { + "hint": "Set the color back to black. **type** `color black`.", + "solution": "color black" + }, + { + "hint": "Lastly create the second pupil. **Type** `circle 6`.", + "solution": "circle 6" + } + ] +} diff --git a/lib/challenges/worlds/mischiefweek2015/ghost.json b/lib/challenges/worlds/mischiefweek2015/ghost.json new file mode 100644 index 000000000..456d04e4f --- /dev/null +++ b/lib/challenges/worlds/mischiefweek2015/ghost.json @@ -0,0 +1,136 @@ +{ + "id": "ghost", + "title": "Ghost", + "description": "Draw your very own ghost. Change the colors to win!", + "start_date": "2015-10-30T06:00:00", + "code": "ghostColor = '#809B79'\nfaceColor = '#634E42'\ntongueColor = '#7A5750'\n", + "startAt": 0, + "steps": [ + { + "hint": "We need to set up some variables to color the ghost - **Type** `ghostColor = '#809B79'`", + "solution": "ghostColor = '#809B79'" + }, + { + "hint": "Another variable for the face - **Type** `faceColor = '#634E42'`", + "solution": "faceColor = '#634E42'" + }, + { + "hint": "Finally a variable for the tongue - **Type** `tongueColor = '#7A5750'`", + "solution": "tongueColor = '#7A5750'" + }, + { + "hint": "We’ll use solid shapes, so set the stroke to zero with `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Our ghost leaves a trail behind that we need to draw first, so we'll set the draw color to something slightly darker with `color darken(ghostColor, 10)`", + "solution": "color darken(ghostColor, 10)" + }, + { + "hint": "Move into position for the trail with `move 0, 60`", + "solution": "move 0, 60" + }, + { + "hint": "And then draw the trail with `circle 70`", + "solution": "circle 70" + }, + { + "hint": "Now we’ll draw the ghost’s body. Set the ghost’s color to our variable with `color ghostColor`", + "solution": "color ghostColor" + }, + { + "hint": "Now move back to draw the body, move back up to the center with `move 0, -60`", + "solution": "move 0, -60" + }, + { + "hint": "Draw the body with `circle 100`", + "solution": "circle 100" + }, + { + "hint": "Now we’ll draw the mouth with the faceColor variable we defined. **Type** `color faceColor`.", + "solution": "color faceColor" + }, + { + "hint": "Now move into position for the mouth with `move -40, 10`", + "solution": "move -40, 10" + }, + { + "hint": "Draw the mouth with `rectangle 80, 35`", + "solution": "rectangle 80, 35" + }, + { + "hint": "The teeth are a polygon. **Hint:** you can copy and paste this: `polygon 10, -10, 20, 0, 30, -10, 40, 0, 50, -10, 60, 0, 70, -10, 80, 0`", + "solution": "polygon 10, -10, 20, 0, 30, -10, 40, 0, 50, -10, 60, 0, 70, -10, 80, 0" + }, + { + "hint": "Now for the tongue, move to the bottom of the mouth with `move 40, 35`", + "solution": "move 40, 35" + }, + { + "hint": "Set the drawing color to our variable with `color tongueColor`", + "solution": "color tongueColor" + }, + { + "hint": "The tongue is a half-circle of radius 25, which we can draw with `arc 25, 0, 1`", + "solution": "arc 25, 0, 1" + }, + { + "hint": "For the eyes, set the drawing color with `color faceColor`", + "solution": "color faceColor" + }, + { + "hint": "Move into position for the eyes with `move -40, -80`", + "solution": "move -40, -80" + }, + { + "hint": "The eye is then drawn with `circle 10`", + "solution": "circle 10" + }, + { + "hint": "Move for the second eye with `move 80, 0`", + "solution": "move 80, 0" + }, + { + "hint": "Draw the second eye with `circle 10`", + "solution": "circle 10" + }, + { + "hint": "For our hands, were going to do something new: make a function. **Type** `hand = ->`", + "solution": "hand = ->" + }, + { + "hint": "This indented block is where your function goes. Any time you call this function this entire block of code will run. Lets set the stroke for our hand with `stroke 10, darken(ghostColor, 10)`", + "solution": " stroke 10, darken(ghostColor, 10)" + }, + { + "hint": "Then draw the first of the three fingers with `line 20, 30`", + "solution": " line 20, 30" + }, + { + "hint": "Then the second with `line 0, 35`", + "solution": " line 0, 35" + }, + { + "hint": "The final finger with `line -20, 30`", + "solution": " line -20, 30" + }, + { + "hint": "Now to draw the hands: make sure you are out of the function block by pressing **BACKSPACE**. Then **type** `move 60, 100` for the first hand.", + "solution": "move 60, 100" + }, + { + "hint": "Draw the hand at the current location with `hand()`", + "solution": "hand()" + }, + { + "hint": "Move over to the left to draw the other hand with `move -200, 0`", + "solution": "move -200, 0" + }, + { + "hint": "Draw the final hand with `hand()`", + "solution": "hand()" + } + ], + "completion_text": "Well done! You can change the color of your ghost by setting ghostColor, faceColor, and tongueColor to whatever you want.", + "cover": "mischiefweek2015/mw-005-ghost.png" +} diff --git a/lib/challenges/worlds/mischiefweek2015/hauntedhouse.json b/lib/challenges/worlds/mischiefweek2015/hauntedhouse.json new file mode 100644 index 000000000..cca16f838 --- /dev/null +++ b/lib/challenges/worlds/mischiefweek2015/hauntedhouse.json @@ -0,0 +1,11 @@ +{ + "id": "hauntedhouse", + "title": "Haunted House", + "description": "Dress the house up for Halloween and express your creativity.", + "start_date": "2015-11-01T06:00:00", + "completion_text": "It's Halloween Night! Change the colours at the top of the code to make this into a night scene then express your creativity by combining previous challenges with it or causing mischief, some ideas to get you started are in the comments.", + "startAt": 0, + "code": "#Colors, that need to be made spookier\nsky = aqua\nground = green\nsun = yellow\nbricks = brown\nroof = red\nframes = gray\nwindows = blue\ndoor = setBrightness(brown,-40)\n\n#Sky\nbackground sky\nstroke 0\nmoveTo 100, 100\ncolor sun\ncircle 60\n#Why not add some spooky clouds or bats\n\n#Ground\nmoveTo 250,530\ncolor ground\nellipse 500,150\n\n#House\nmoveTo 100,180\ncolor bricks\nrectangle 300,270\n\n#Windows\n#Cause some mischief, can you figure out how to throw eggs on all the windows in just 3 lines of code\ndrawWindow = (x,y) ->\n color setBrightness(frames,30)\n moveTo x,y\n rectangle 60,80\n color windows\n moveTo x+5,y+5\n rectangle 50,70\n color setBrightness(frames,30)\n moveTo x, y+37.5\n rectangle 60,5\n moveTo x+27.5, y\n rectangle 5,80\ndrawWindow(120,200)\ndrawWindow(220,200)\ndrawWindow(120,310)\ndrawWindow(320,200)\ndrawWindow(320,310)\n\n#Roof\ncolor roof\nmoveTo 100, 180\npolygon 150, -100, 300, 0\n#You could use the arc function to cover the roof in toilet paper \n\n\n#Door\ncolor setBrightness(frames,-10)\nmoveTo 215, 330\nrectangle 70,110\nmove 5,5\ncolor door\nrectangle 60,105\ncolor setBrightness(frames,-40) \nmove -15,105\nrectangle 90,20\nmove 65,-50\ncolor setBrightness(door,80)\ncircle 3\n#How about putting a pumpkin beside the door", + "steps": [], + "cover": "mischiefweek2015/mw-007-hauntedhouse.png" +} diff --git a/lib/challenges/worlds/mischiefweek2015/index.json b/lib/challenges/worlds/mischiefweek2015/index.json new file mode 100644 index 000000000..2bbe6689e --- /dev/null +++ b/lib/challenges/worlds/mischiefweek2015/index.json @@ -0,0 +1,11 @@ +{ + "challenges": [ + "./skull", + "./cat", + "./pumpkin", + "./potion", + "./ghost", + "./spiderweb", + "./hauntedhouse" + ] +} diff --git a/lib/challenges/worlds/mischiefweek2015/potion.json b/lib/challenges/worlds/mischiefweek2015/potion.json new file mode 100644 index 000000000..cfb784232 --- /dev/null +++ b/lib/challenges/worlds/mischiefweek2015/potion.json @@ -0,0 +1,96 @@ +{ + "id": "potion", + "title": "Potion Flask", + "description": "Brew a potion with code.", + "start_date": "2015-10-29T06:00:00", + "code": "", + "startAt": 2, + "completion_text": "Well done! You can change the color of your potion by setting potionColor to whatever you want. The clear glass you made with opacity(white, .4) will give it a cool effect, whatever color you choose.", + "cover": "mischiefweek2015/mw-004-potion.png", + "steps": [ + { + "hint": "We want solid shapes for this challenge, so **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "For a dark look, lets set `background charcoal`", + "solution": "background charcoal" + }, + { + "hint": "If we want to change our potion color we can set it to a variable. To do that **type** `potionColor = purple`", + "solution": "potionColor = purple" + }, + { + "hint": "Let’s move into position with `move 0, 50`", + "solution": "move 0, 50" + }, + { + "hint": "And set the drawing color with `color potionColor`", + "solution": "color potionColor" + }, + { + "hint": "Finally, we can draw the potion with `circle 90`", + "solution": "circle 90" + }, + { + "hint": "Our potion is going to go up the neck of the flask, and we will use a line. Set up the line style with `stroke potionColor, 40`", + "solution": "stroke potionColor, 40" + }, + { + "hint": "And draw the line up from the middle with `line 0, -120`.", + "solution": "line 0, -120" + }, + { + "hint": "Set the stroke back to zero for the flask’s glass. **Type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Let’s add in another circle to give our potion a natural look. Move to the right and up with `move 30, -30`.", + "solution": "move 30, -30" + }, + { + "hint": "Set the drawing color to a shade slightly darker than the potion color with `color darken(potionColor, 10)`", + "solution": "color darken(potionColor, 10)" + }, + { + "hint": "Finally, draw the circle with `circle 20`", + "solution": "circle 20" + }, + { + "hint": "Move back to the center with `move -30, 30`", + "solution": "move -30, 30" + }, + { + "hint": "Set the color for the glass flask with `color opacity(white, .4)`", + "solution": "color opacity(white, .4)" + }, + { + "hint": "Then draw the flask with an arc. **Type** `arc 100, 1.4, 1.6`", + "solution": "arc 100, 1.4, 1.6" + }, + { + "hint": "See how the arc draws almost a complete circle, but leaves a nice flat top for us? Our flask neck will meet it there, but first we need to draw a cork behind the glass. **Type** `move 0, -130`", + "solution": "move 0, -130" + }, + { + "hint": "Set the drawing color for the cork with `color tan`", + "solution": "color tan" + }, + { + "hint": "And draw the cork with `polygon 20, 0, 30, -40, -30, -40, -20, 0`", + "solution": "polygon 20, 0, 30, -40, -30, -40, -20, 0" + }, + { + "hint": "Now for the neck, lets choose the see-through white color for our stroke. **Type** `stroke 60, opacity(white, .4)`", + "solution": "stroke 60, opacity(white, .4)" + }, + { + "hint": "Move up just a little bit for the neck with `move 0, -25`", + "solution": "move 0, -25" + }, + { + "hint": "Finally, draw the neck with `line 0, 60`", + "solution": "line 0, 60" + } + ] +} diff --git a/lib/challenges/worlds/mischiefweek2015/pumpkin.json b/lib/challenges/worlds/mischiefweek2015/pumpkin.json new file mode 100644 index 000000000..16e88cd86 --- /dev/null +++ b/lib/challenges/worlds/mischiefweek2015/pumpkin.json @@ -0,0 +1,87 @@ +{ + "id": "pumpkin", + "title": "Kan-o-lantern", + "cover": "mischiefweek2015/mw-003-pumpkin.png", + "description": "It wouldn't be Halloween without pumpkins, learn how to carve a spooky pumpkin then get creative by changing the face.", + "start_date": "2015-10-28T06:00:00", + "completion_text": "That's a nice Kan-o-lantern! But it needs to be lit to be truly spooky, can you figure out how to light the pumpkin by changing some colors, you could also try carving a spookier looking face. Show off your creativity then share your creation.", + "startAt": 0, + "steps": [ + { + "hint": "Let’s set a spooky scene, make it night time - **type** `background charcoal`", + "solution": "background charcoal" + }, + { + "hint": "The most distinctive thing about pumpkins is their bright orange skin, to set your fill color - **type** `color orange`", + "solution": "color orange" + }, + { + "hint": "We're going to use strokes to build the bulbous shape of the pumpkin, use the darken function to build contrast against the skin - **type** `stroke darken(orange, 20), 30`", + "solution": "stroke darken(orange, 20), 30" + }, + { + "hint": "Build your pumpkin slice by slice using ellipses - **type** `ellipse 180, 140`", + "solution": "ellipse 180, 140" + }, + { + "hint": "Add another slice - **type** `ellipse 130, 140`", + "solution": "ellipse 130, 140" + }, + { + "hint": "It's starting to take shape, add the final slice the same way - **type** `ellipse 50, 140`", + "solution": "ellipse 50, 140" + }, + { + "hint": "Pumpkins are actually fruits, so we need to draw a green stem - **type** `color green`", + "solution": "color green" + }, + { + "hint": "Turn off the orange stroke - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Move the cursor to the top of the pumpkin - **type** `move -20, -180`", + "solution": "move -20, -180" + }, + { + "hint": "Draw the chunky stem of the pumpkin - **type** `square 40`", + "solution": "square 40" + }, + { + "hint": "Now we have a fresh pumpkin, we can get to the fun part, carving your design - **type** `color black`", + "solution": "color black" + }, + { + "hint": "We're going to give them a face, move the cursor to where the eye will be - **type** `moveTo 190, 275`", + "solution": "moveTo 190, 275" + }, + { + "hint": "Cut a hole for the first eye - **type** `circle 15`", + "solution": "circle 15" + }, + { + "hint": "Move the cursor to where the second eye will be - **type** `moveTo 310, 275`", + "solution": "moveTo 310, 275" + }, + { + "hint": "Cut the second hole the same size as the first - **type** `circle 15`", + "solution": "circle 15" + }, + { + "hint": "Next we need to give them a mouth - **type** `moveTo 250, 320`", + "solution": "moveTo 250, 320" + }, + { + "hint": "We need to turn the fill colour off by setting it to null - **type** `color null`", + "solution": "color null" + }, + { + "hint": "We'll use a thick black stroke for the mouth - **type** `stroke 15, black`", + "solution": "stroke 15, black" + }, + { + "hint": "Finally we will use the arc command to give them a smile. - **type** `arc 40, 1, 2, true`", + "solution": "arc 40, 1, 2, true" + } + ] +} diff --git a/lib/challenges/worlds/mischiefweek2015/skull.json b/lib/challenges/worlds/mischiefweek2015/skull.json new file mode 100644 index 000000000..ba27a9392 --- /dev/null +++ b/lib/challenges/worlds/mischiefweek2015/skull.json @@ -0,0 +1,75 @@ +{ + "id": "skull", + "title": "Skull", + "cover": "mischiefweek2015/mw-001-skull.png", + "start_date": "2015-10-26T06:00:00", + "description": "", + "completion_text": "Amazing skull! You can dress it up with some background patterns or other facial accessories. When you are done, share your creation for a chance to win it on a t-shirt!", + "startAt": 0, + "steps": [ + { + "hint": "First we need to set the spooky scene, make it night time - **type** `background charcoal`", + "solution": "background charcoal" + }, + { + "hint": "We want to draw solid shapes with no stroke, so **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "We can move into position for the skull with `moveTo 250, 200`", + "solution": "moveTo 250, 200" + }, + { + "hint": "Our skull should be white, so set the drawing color with `color white`", + "solution": "color white" + }, + { + "hint": "The skull is made with an ellipse—a kind of squashed circle. Make this with `ellipse 140, 120`", + "solution": "ellipse 140, 120" + }, + { + "hint": "It's starting to take shape, add the final slice the same way - **type** `move -60, 90`", + "solution": "move -60, 90" + }, + { + "hint": "The mouth of the skull is a square we will draw with `square 120`", + "solution": "square 120" + }, + { + "hint": "Lets move up and over for the eyes - **type** `move 10, -50`", + "solution": "move 10, -50" + }, + { + "hint": "Our skull’s empty eyes peer into your soul. Set their color to charcoal with `color charcoal`", + "solution": "color charcoal" + }, + { + "hint": "The eye is a circle. Draw it with `circle 40`", + "solution": "circle 40" + }, + { + "hint": "Move on over for the other eye. **Type** `move 100`", + "solution": "move 100" + }, + { + "hint": "Now draw the other eye with `circle 40`", + "solution": "circle 40" + }, + { + "hint": "Move on over for the nose with `move -50, 60`", + "solution": "move -50, 60" + }, + { + "hint": "Then draw the nose with `circle 10`", + "solution": "circle 10" + }, + { + "hint": "Finally, for the mouth move down by **typing** `move -40, 60`", + "solution": "move -40, 60" + }, + { + "hint": "Finally, you draw the mouth with `rectangle 80, 20`", + "solution": "rectangle 80, 20" + } + ] +} diff --git a/lib/challenges/worlds/mischiefweek2015/spiderweb.json b/lib/challenges/worlds/mischiefweek2015/spiderweb.json new file mode 100644 index 000000000..7d3befdb4 --- /dev/null +++ b/lib/challenges/worlds/mischiefweek2015/spiderweb.json @@ -0,0 +1,12 @@ +{ + "id": "spiderweb", + "title": "Spider Web", + "description": "Play around with a spider web!", + "completion_text": "Happy Halloween! Today’s challenge is for you to play around with the code here. Can you make a different-colored web? Or a bigger spider? Thanks to community member @NOPx90 who coded the spiderweb!", + "cover": "mischiefweek2015/mw-006-spiderweb.png", + "start_date": "2015-10-31T06:00:00", + "startAt": 0, + "code": "# PLAY WITH THESE\nradius = 370\nframes = 30\nbridges = 10\ndegrees = 360\nrotation = 0\n\nbodySize = 80\nlegSpread = 90\nlegLength = 100\neyeSize = 4\neyeSpacing = 12\n\n\n# This defines the spiderweb\nclass SpiderWeb\n constructor: (@x, @y, @radius, @frames, @bridges, @degrees, @rotation) ->\n @x = @x ? 250\n @y = @y ? 250\n @radius = @radius ? 250\n @frames = @frames ? 16\n @bridges = @bridges ? 20\n @degrees = @degrees ? 360\n @rotation = @rotation ? 0\n @frameAngle = @degrees / @frames\n @draw()\n drawFrame: () ->\n moveTo @x , @y\n for i in [ 0 .. @frames ]\n if i * @frameAngle != 360\n radians = (i * @frameAngle + @rotation)*(Math.PI / 180)\n x = Math.cos(radians)\n y = -Math.sin(radians)\n line (x*@radius) , (y*@radius)\n drawBridge: () ->\n r = @radius\n for web in [ 1 .. @bridges ]\n r /= 1.2\n for i in [ 0 ... @frames ]\n # Starting postition\n r1 = (i * @frameAngle + @rotation)*(Math.PI / 180)\n x1 = Math.cos(r1)\n y1 = -Math.sin(r1)\n \n # End position\n r2 = (i * @frameAngle + @frameAngle + @rotation)*(Math.PI / 180)\n x2 = Math.cos(r2)\n y2 = -Math.sin(r2)\n moveTo x1 * r + @x , y1 * r + @y\n lineTo x2 * r + @x , y2 * r + @y\n draw: ( ) ->\n this.drawFrame()\n this.drawBridge()\n\n# Here is the drawing\nbackground setSaturation(darkpurple,-25)\nstroke white\nweb = new SpiderWeb(250,250, radius, frames, bridges, degrees, rotation)\n# Spider Body\nstroke white, 10\nmoveTo 250, 0\nline 0, 200\nmove 0, 200\ncolor black\nstroke 0\nellipse bodySize * 0.8, bodySize\n# Spider Legs\nstroke black, 5\ncolor null\npairOfLegs = (flipHori,flipVert) ->\n spread = legSpread * flipHori\n length = legLength * flipVert\n polygon spread, length, spread * 0.7, length * 2\n polygon spread * 1.3, length * 0.4, spread * 1.7, length * 1.5\npairOfLegs(1,1)\npairOfLegs(-1,1)\npairOfLegs(1,-1)\npairOfLegs(-1,-1)\n\n#Spider Head\nstroke 0\ncolor black\nmove 0, bodySize\nellipse bodySize * 0.5, bodySize * 0.4\ncolor orangered\nmove eyeSpacing * -1.5, eyeSpacing / -2\nfor [1 .. 4]\n circle eyeSize\n move 0, eyeSpacing\n circle eyeSize\n move eyeSpacing, eyeSpacing * -1\n", + "steps": [ + ] +} diff --git a/lib/challenges/worlds/ozwaldboateng/ancientcodes.json b/lib/challenges/worlds/ozwaldboateng/ancientcodes.json new file mode 100644 index 000000000..b15f1ee9b --- /dev/null +++ b/lib/challenges/worlds/ozwaldboateng/ancientcodes.json @@ -0,0 +1,55 @@ +{ + "id": "ancientcodes", + "title": "Ancient Codes", + "description": "Learn how to take simple shapes and compose them into a repeatable pattern", + "code": "houndstooth = ->\n stroke 0\n rectangle 20, 10\n rectangle -10, 20\n rectangle 10, -20\n rectangle -20, -10\n\n", + "startAt": 8, + "steps": [ + { + "hint": "", + "solution": "houndstooth = ->" + }, + { + "hint": "", + "solution": " stroke 0" + }, + { + "hint": "", + "solution": " rectangle 20, 10" + }, + { + "hint": "", + "solution": " rectangle -10, 20" + }, + { + "hint": "", + "solution": " rectangle 10, -20" + }, + { + "hint": "", + "solution": " rectangle -20, -10" + }, + { + "hint": "In this challenge we’re going to take our houndstooth shape and turn it into a more complex pattern. We’ve put your houndstooth code into a reusable function, which will save us the trouble of writing all those commands hundreds of times. We’ll put them in a pattern with a purple background. Type `background rgb(110, 60, 158)`", + "solution": "background rgb(110, 60, 158)" + }, + { + "hint": "We will use a loop to travel across the canvas with `for x in [0 .. 500] by 40`", + "solution": "for x in [0 .. 500] by 40" + }, + { + "hint": "Next let’s use another loop to travel down the canvas. Type `for y in [20 .. 500] by 40`.", + "solution": " for y in [20 .. 500] by 40" + }, + { + "hint": "Let’s move into position with `moveTo x, y`", + "solution": " moveTo x, y" + }, + { + "hint": "And now we use the special word we created above with your code by typing `houndstooth()`", + "solution": " houndstooth()" + } + ], + "completion_text": "Well done! The houndstooth is a popular pattern that gets its distinctive looks from the loom it is woven on. Looms have been used for over eight thousand years, and the intricate designs produced by them were created with some of the earliest coding languages. In fact the digital information encoded in punch cards were first used by 19th century looms before computers borrowed them.", + "cover": "ozwaldboateng/ancientcodes.png" +} diff --git a/lib/challenges/worlds/ozwaldboateng/bespokedesign.json b/lib/challenges/worlds/ozwaldboateng/bespokedesign.json new file mode 100644 index 000000000..d83e27e36 --- /dev/null +++ b/lib/challenges/worlds/ozwaldboateng/bespokedesign.json @@ -0,0 +1,46 @@ +{ + "id": "bespokedesign", + "title": "Bespoke Design", + "description": "Bring out your own personality with a twist on this subtle tweed pattern", + "code": "", + "steps": [ + { + "hint": "This is an opportunity for you to bring out your own personality with a twist on the classic herringbone zigzag pattern. We’ll make it a bright Boateng orange by typing `stroke orange, 2`", + "solution": "stroke orange, 2" + }, + { + "hint": "Move into position with `move -50, -50`", + "solution": "move -50, -50" + }, + { + "hint": "To loop down the canvas, type `for i in [0 ... 10]`", + "solution": "for i in [0 ... 10]" + }, + { + "hint": "Our zigzag’s direction switches between up and down, to keep track we’ll use a variable. Type `direction = 20`", + "solution": " direction = 20" + }, + { + "hint": "Next, we’ll make another loop to travel across the canvas. Type `for j in [0 ... 10]`", + "solution": " for j in [0 ... 10]" + }, + { + "hint": "Draw the line with `line 10, direction`", + "solution": " line 10, direction" + }, + { + "hint": "Then we’ll move the drawing cursor into position at the end of the line with `move 10, direction`", + "solution": " move 10, direction" + }, + { + "hint": "We’ll change direction of our zigzag by multiplying it by negative one. Type `direction *= -1`", + "solution": " direction *= -1" + }, + { + "hint": "Exit the second loop by pressing `BACKSPACE` once. Next, type `move -100, 10`, making sure you only have one tab before it.", + "solution": " move -100, 10" + } + ], + "completion_text": "This herringbone pattern has been worn by many thousands of men and women throughout history. Ozwald Boateng uses it every now and then, but still manages to create a suit that becomes a unique expression of the wearer’s personality. Being true to yourself doesn’t mean you have to do something nobody else is doing, sometimes it means taking what you know and making it yours. Play around with the colors here—find something that feels right for you.", + "cover": "ozwaldboateng/bespokedesign.png" +} diff --git a/lib/challenges/worlds/ozwaldboateng/color.json b/lib/challenges/worlds/ozwaldboateng/color.json new file mode 100644 index 000000000..d36844687 --- /dev/null +++ b/lib/challenges/worlds/ozwaldboateng/color.json @@ -0,0 +1,27 @@ +{ + "id": "color", + "title": "Color", + "description": "Learn how Ozwald Boateng chooses combinations to evoke feelings", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Welcome to the world of London fashion designer Ozwald Boateng. His iconic suits have been worn by the likes of Will Smith and Richard Branson, and are well known for their vibrant, nontraditional colors. We’ll explore how Boateng uses color with a bit of an experiment. Set the drawing color to blue by typing `color rgb(102, 211, 231)`.", + "solution": "color rgb(102, 211, 231)" + }, + { + "hint": "Great, now we’ll draw a shape using this bright blue. First we need to do some housekeeping by turning off stroke by typing `stroke 0`.", + "solution": "stroke 0" + }, + { + "hint": "Now draw the circle by typing `circle 150`", + "solution": "circle 150" + }, + { + "hint": "This blue evokes a certain feeling when set against a white background. But watch, as you set it against another color, the same blue circle will change its appearance. Type `background rgb(109, 147, 248)`", + "solution": "background rgb(109, 147, 248)" + } + ], + "completion_text": "Amazing! See how adding a different background color completely changes the feeling of the blue in the circle? It isn’t as overpowering as it first appeared. Ozwald Boateng uses tricks like this to create harmony and dissonance with his use of color. See if you can change the colors of the background and circle to bring out different emotions.", + "cover": "ozwaldboateng/color.png" +} diff --git a/lib/challenges/worlds/ozwaldboateng/cut.json b/lib/challenges/worlds/ozwaldboateng/cut.json new file mode 100644 index 000000000..16656ffba --- /dev/null +++ b/lib/challenges/worlds/ozwaldboateng/cut.json @@ -0,0 +1,43 @@ +{ + "id": "cut", + "title": "Cut", + "description": "see how a simple technique, nested looping, can be used to create very powerful illusions", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Boateng’s suits play tricks on the eyes, making the wearer appear both taller and slimmer. We’ll use simple shapes to create a similar illusion. Start by typing `stroke 0`.", + "solution": "stroke 0" + }, + { + "hint": "We’ll set the background to a big beautiful red by typing `background rgb(208, 89, 109)`", + "solution": "background rgb(208, 89, 109)" + }, + { + "hint": "And contrast it by setting the drawing color for our shapes to blue with `color rgb(102, 211, 231)`", + "solution": "color rgb(102, 211, 231)" + }, + { + "hint": "Next, we start a loop that will scan left to right across the canvas, drawing shapes. Type `for x in [50 .. 450] by 20`.", + "solution": "for x in [50 .. 450] by 20" + }, + { + "hint": "Each shape is going to start small on the left, grow slightly bigger in the middle, and become small again on the right. For this we will use what computer artists call a “shaping function” and store its value in the variable “size”. Type `size = Math.pow(x - 250, 2) / -4000 + 10`.", + "solution": " size = Math.pow(x - 250, 2) / -4000 + 10" + }, + { + "hint": "We’ll make another loop, this time to run top to bottom with `for y in [50 .. 450] by 20`.", + "solution": " for y in [50 .. 450] by 20" + }, + { + "hint": "Now for each iteration of the loops we want to move the drawing cursor into position by typing `moveTo x, y`", + "solution": " moveTo x, y" + }, + { + "hint": "And finally, draw the squares using the size variable we created above with `square size`", + "solution": " square size" + } + ], + "completion_text": "Beautiful! Using only rectangles, we can achieve an image that transcends the screen it sits on. Boateng’s masterful understanding of the human body helps him cut a slim silhouette, combining simple shapes into a moving masterpiece, similar to what you have done here.", + "cover": "ozwaldboateng/cut.png" +} diff --git a/lib/challenges/worlds/ozwaldboateng/index.json b/lib/challenges/worlds/ozwaldboateng/index.json new file mode 100644 index 000000000..f7dc1ad95 --- /dev/null +++ b/lib/challenges/worlds/ozwaldboateng/index.json @@ -0,0 +1,12 @@ +{ + "challenges": [ + "./color", + "./material", + "./cut", + "./pattern", + "./ancientcodes", + "./inspiration", + "./bespokedesign", + "./masterchallenge" + ] +} diff --git a/lib/challenges/worlds/ozwaldboateng/inspiration.json b/lib/challenges/worlds/ozwaldboateng/inspiration.json new file mode 100644 index 000000000..5a6ed7296 --- /dev/null +++ b/lib/challenges/worlds/ozwaldboateng/inspiration.json @@ -0,0 +1,39 @@ +{ + "id": "inspiration", + "title": "Inspiration", + "description": "", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "The artist Bridget Riley, spent years copying famous paintings to learn about their use of shape and color before creating her minimalist masterpieces. This composition has a nice ivory background. Type `background ivory`.", + "solution": "background ivory" + }, + { + "hint": "We’ll want to see only the outlines of the circles. We can do this by typing `color transparent`", + "solution": "color transparent" + }, + { + "hint": "Next we’ll use two loops to draw our circles. The first one goes across the canvas in increments of fifty. Type `for x in [0 .. 500] by 50`", + "solution": "for x in [0 .. 500] by 50" + }, + { + "hint": "The second loop goes down the canvas. Type `for y in [0 .. 500] by 50`", + "solution": " for y in [0 .. 500] by 50" + }, + { + "hint": "We only want to draw circles sometimes. Which we will do by using an “if statement”. Type `if random(0, 10) > 2`. Read this as “if the computer guesses a random number between 0 and 10, and it is bigger than two, draw a circle.”", + "solution": " if random(0, 10) > 2" + }, + { + "hint": "Next let’s move into position with `moveTo x, y`", + "solution": " moveTo x, y" + }, + { + "hint": "Finally we can draw the circle with `circle 50`", + "solution": " circle 50" + } + ], + "completion_text": "You have to know the rules first if you want to break them. Ozwald Boateng grew up wearing suits he sewed himself. As he grew older his designs became more distinctive, he started breaking traditions and creating new ones, just like how Bridget Riley did with her paintings of circles. Today, Boateng’s suits are sold in a store on Savile Row, the centuries-old home of British tailoring where the suit was invented.", + "cover": "ozwaldboateng/inspiration.png" +} diff --git a/lib/challenges/worlds/ozwaldboateng/masterchallenge.json b/lib/challenges/worlds/ozwaldboateng/masterchallenge.json new file mode 100644 index 000000000..039c6e9be --- /dev/null +++ b/lib/challenges/worlds/ozwaldboateng/masterchallenge.json @@ -0,0 +1,9 @@ +{ + "id": "masterchallenge", + "title": "Master Challenge", + "description" : "To create something new you must look into the future", + "code": "cross = ->\n stroke 0\n color yellow\n for x in [0 ... 100] by 20\n move 0, x\n square 20\n move 0, 80 - 2 * x\n square 20\n move 20, -(80 - x)\n\nmypattern = ->\n move 50, 50\n ### ▼ Your Code here ▼ ###\n \n ### ▲ Your Code here ▲ ###\n\nbackground black\nfor x in [0 ... 500] by 100\n for y in [0 ... 500] by 100\n moveTo x, y\n if (x / 100 + y / 100) % 2 is 1\n cross()\n else\n mypattern()\nstroke 2, white\nfor x in [100 ... 500] by 100\n moveTo x, 0\n line 0, 500\nfor y in [100 ... 500] by 100\n moveTo 0, y\n line 500, 0", + "steps": [], + "completion_text": "“If you can’t visualise it, you’ll never see it.” — Ozwald Boateng. You may look backwards to search for inspiration, but to create something new you must look into the future. This is a traditional Kente pattern from Ghana, where Ozwald Boateng’s parents moved to London from. Finish the design by typing your own code on to line 14. If you want, go back to the previous zig-zag challenge to copy that code and paste it here. It works perfectly. Good luck!", + "cover": "ozwaldboateng/masterchallenge.png" +} diff --git a/lib/challenges/worlds/ozwaldboateng/material.json b/lib/challenges/worlds/ozwaldboateng/material.json new file mode 100644 index 000000000..b133040ca --- /dev/null +++ b/lib/challenges/worlds/ozwaldboateng/material.json @@ -0,0 +1,27 @@ +{ + "id": "material", + "title": "Material", + "description": "learn composition and how simple layering can be used to create beautiful shapes", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Like fashion designers who choose fabrics based on how they stretch and feel, computer artists have to carefully choose and combine shapes. Type `rectangle 100, 50`.", + "solution": "rectangle 100, 50" + }, + { + "hint": "When arranged by a talented maker, simple shapes can magically transform into complex creations. Type `rectangle -50, 100`.", + "solution": "rectangle -50, 100" + }, + { + "hint": "This challenge repeats the same rectangular shape four times to create the houndstooth, a centuries-old weaving pattern. Type `rectangle 50, -100`.", + "solution": "rectangle 50, -100" + }, + { + "hint": "For the final piece, type `rectangle -100, -50`.", + "solution": "rectangle -100, -50" + } + ], + "completion_text": "Great job! Ozwald Boateng is famous for his use of mohair in his suits. Like wool it is warm in the winter and cool in the summer, but it is uniquely soft and silky, perfect for the modern man. The properties of the fabric become a part of the suit, but the arrangement and cut of the fabric create the final look.", + "cover": "ozwaldboateng/material.png" +} diff --git a/lib/challenges/worlds/ozwaldboateng/pattern.json b/lib/challenges/worlds/ozwaldboateng/pattern.json new file mode 100644 index 000000000..9d23654f5 --- /dev/null +++ b/lib/challenges/worlds/ozwaldboateng/pattern.json @@ -0,0 +1,35 @@ +{ + "id": "pattern", + "title": "Pattern", + "description": "Learn about color interactions and how shapes can affect our perception of color", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Patterns can create entirely new spaces of color. We’ll create a pattern based off of Ozwald Boateng’s limited edition ties from this season. Let’s get started by typing `background black`", + "solution": "background black" + }, + { + "hint": "We’ll set the stroke color with `stroke 30, red`", + "solution": "stroke 30, red" + }, + { + "hint": "And to give us just the strokes with no fill, we will type `color transparent`", + "solution": "color transparent" + }, + { + "hint": "Our pattern is created by circles inside of circles, which we’ll draw using a loop that radiates outwards. Type `for r in [0 .. 350] by 50`.", + "solution": "for r in [0 .. 350] by 50" + }, + { + "hint": "Our second loop will go all around the circle, letting us draw in our pattern. Type `for i in [0 ... 2] by .1`", + "solution": " for i in [0 ... 2] by .1" + }, + { + "hint": "Finally, complete the pattern by drawing the arcs with `arc r, i, i - .05`", + "solution": " arc r, i, i - .05" + } + ], + "completion_text": "Great job! This hypnotic circular pattern uses solid black and red, but the simultaneous contrast of both change our perception of both, making our brain think it sees colors where our eyes actually see sharp edges! Ozwald Boateng has ties in many different colors, try remixing the code for your own unique color combination.", + "cover": "ozwaldboateng/pattern.png" +} diff --git a/lib/challenges/worlds/pixelhack/chest.json b/lib/challenges/worlds/pixelhack/chest.json new file mode 100644 index 000000000..60635a1ec --- /dev/null +++ b/lib/challenges/worlds/pixelhack/chest.json @@ -0,0 +1,104 @@ +{ + "id": "chest", + "title": "Loot Chest", + "description": "A mysterious chest found with your code", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Role Playing Games (RPGs) became one of the most popular genres of games in the late 80s. One of the most common objects in these games is the loot chest, let's start by setting a moody scene with a background **type** `background darkslategray`", + "solution": "background darkslategray" + }, + { + "hint": "Next we're going to turn the stroke off **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Position the cursor to the top left corner of where the chest will be - **type** `move -150,-100`", + "solution": "move -150,-100" + }, + { + "hint": "Set the color to gold to give the impression of riches inside **type** `color gold`", + "solution": "color gold" + }, + { + "hint": "We're going to layer this up to keep the number of shapes we have to draw to a minimum, first we draw the golden frame draw a `rectangle` 300 by 200", + "solution": "rectangle 300,200" + }, + { + "hint": "Next we are going to add a highlight to the gold **type** `color lightyellow`", + "solution": "color lightyellow" + }, + { + "hint": "With 8-bit art, simple details add a lot to an object, add a 25 by 100 `rectangle` to give the gold a nice sheen", + "solution": "rectangle 25,100" + }, + { + "hint": "Move your cursor to get ready to draw the wooden part of the chest **type** `move 25,0`", + "solution": "move 25,0" + }, + { + "hint": "Change the fill color to `color brown`", + "solution": "color brown" + }, + { + "hint": "We use a trick of overlaying brown over the gold so the gold looks like a frame holding the wooden panels together **type** `rectangle 250,175`", + "solution": "rectangle 250,175" + }, + { + "hint": "Move the cursor into place to split the wooden part in half with a lid **type** `move 0,60`", + "solution": "move 0,60" + }, + { + "hint": "Switch your `color` back to gold", + "solution": "color gold" + }, + { + "hint": "Draw the seam with a `rectangle` 250 by 25", + "solution": "rectangle 250,25" + }, + { + "hint": "Next we'll continue our highlight effect **type** `color lightyellow`", + "solution": "color lightyellow" + }, + { + "hint": "Continue the highlight effect by drawing a `square` 25 big", + "solution": "square 25" + }, + { + "hint": "Finally we're going to finish with a clasp, move to the middle of the chest **type** `move 75,-25`", + "solution": "move 75,-25" + }, + { + "hint": "Set the `color` to gold so it matches the frame", + "solution": "color gold" + }, + { + "hint": "Draw a `rectangle` 100 by 75", + "solution": "rectangle 100,75" + }, + { + "hint": "Move in to draw the actual clasp **type** `move 25,25`", + "solution": "move 25,25" + }, + { + "hint": "Set the `color` to darkbrown", + "solution": "color darkbrown" + }, + { + "hint": "Finally draw a `rectangle` 50 by 75", + "solution": "rectangle 50,75" + } + ], + "completion_text": "That chest looks great, I wonder what loot is hiding within!", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "chest-nether.png", + "chest-sunken.png", + "chest-open.png" + ] + }, + "cover": "pixel-chest.png", + "guide": "#### New Words\n**square** size | square 25\n\nThis is just a shorthand version of the rectangle \n\n#### What you'll make\n1. Role Playing Games (RPGs) became one of the most popular genres of games in the late 80s. One of the most common objects in these games is the loot chest, let's start by setting a moody scene with a background **type** `background darkslategray`\n2. Next we're going to turn the stroke off **type** `stroke 0`\n3. Position the cursor to the top left corner of where the chest will be **type** `move -150,-100`\n4. Set the color to gold to give the impression of riches inside **type** `color gold`\n5. We're going to layer this up to keep the number of shapes we have to draw to a minimum, first we draw the golden frame draw a `rectangle` 300 by 200\n6. Next we are going to add a highlight to the gold **type** `color lightyellow`\n7. With 8-bit art, simple details add a lot to an object, add a 25 by 100 `rectangle` to give the gold a nice sheen\n8. Move your cursor to get ready to draw the wooden part of the chest **type** `move 25,0`\n9. Change the fill color to `color brown`\n10. We use a trick of overlaying brown over the gold so the gold looks like a frame holding the wooden panels together **type** `rectangle 250,175`\n11. Move the cursor into place to split the wooden part in half with a lid **type** `move 0,60`\n12. Switch your `color` back to gold\n13. Draw the seam with a `rectangle` 250 by 25\n14. Next we'll continue our highlight effect **type** `color lightyellow`\n15. Continue the highlight effect by drawing a `square` 25 big\n16. Finally we're going to finish with a clasp, move to the middle of the chest **type** `move 75,-25`\n17. Set the `color` to gold so it matches the frame\n18. Draw a `rectangle` 100 by 75\n19. Move in to draw the actual clasp **type** `move 25,25`\n20. Set the `color` to darkbrown\n21. Finally draw a `rectangle` 50 by 75\n\n#### What you'll hack\nBy changing the colours and adding a few shapes you can build an environment around your chest. For a more complex challenge change your code to open the chest and code some loot within.\n\n#### Briefing \nThe loot chest has made appearances in too many video games to list. Possibly most prominently in games from the Legend of Zelda, where they would hold everything from small gifts of money to powerful new tools and weapons. What is in this loot chest? That’s up to you. When you’re done with the chest, open it up and put in your own creation as the loot.\n" +} diff --git a/lib/challenges/worlds/pixelhack/colorfrenzy.json b/lib/challenges/worlds/pixelhack/colorfrenzy.json new file mode 100644 index 000000000..888290bb3 --- /dev/null +++ b/lib/challenges/worlds/pixelhack/colorfrenzy.json @@ -0,0 +1,43 @@ +{ + "id": "colorfrenzy", + "title": "Color Frenzy", + "description": "Use a loop to draw an 8-bit pattern.", + "startAt": 2, + "steps": [ + { + "hint": "We’ll just use solid shapes with no stroke. So **type** `stroke 0`.", + "solution": "stroke 0" + }, + { + "hint": "For this one lets use two loops, one to go horizontally across the screen, and one to go down vertically. **Type** `for x in [ 0 .. 20 ]`", + "solution": "for x in [ 0 .. 20 ]" + }, + { + "hint": "The second loop should be `for y in [ 0 .. 20 ]`", + "solution": " for y in [ 0 .. 20 ]" + }, + { + "hint": "Set the color with `color rotate red, x + y * 10`", + "solution": " color rotate red, x + y * 10" + }, + { + "hint": "Move into position with `moveTo x * 25, y * 25`", + "solution": " moveTo x * 25, y * 25" + }, + { + "hint": "Finally, lets add squares. **Type** `square 25`", + "solution": " square 25" + } + ], + "completion_text": "Well done! The rotate function cycles through colours creating a rainbow effect.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "color-quint.png", + "color-multi.png", + "color-random.png" + ] + }, + "cover": "pixel-colorfrenzy.png", + "guide": "#### What you'll make\n1. We’ll just use solid shapes with no stroke. So **type** `stroke 0`.\n2. For this one lets use two loops, one to go horizontally across the screen, and one to go down vertically. **Type** `for x in [ 0 .. 20 ]`\n3. The second loop should be `for y in [ 0 .. 20 ]`\n4. Set the color with `color rotate red, x * 10`\n5. Move into position with `moveTo x * 25, y * 25`\n6. Finally, lets add some randomness to the mix. **Type** `square random 20, 25`\n\n#### What you’ll hack\nBecause you are travelling across both the x and the y axes, you can have some pretty crazy color combinations. Using math you can make the rainbows repeat in interesting ways, and then change up how you draw on the screen using a random function. There are loads of variations, see what you can find!\n\n#### Briefing\nWe used one loop in the previous exercises to repeat actions, and then change one thing about the loop. In this challenge, we are going to be looping twice. The first loop is going to loop across the x coordinates—then the second loop is going to loop across the y coordinates. Because we have two loops, we are able to control color going in two different directions, and draw squares in two different directions. These “nested” loops will allow us to cover the canvas with color.\n" +} diff --git a/lib/challenges/worlds/pixelhack/diamondblock.json b/lib/challenges/worlds/pixelhack/diamondblock.json new file mode 100644 index 000000000..dc2633c4d --- /dev/null +++ b/lib/challenges/worlds/pixelhack/diamondblock.json @@ -0,0 +1,72 @@ +{ + "id": "diamondblock", + "title": "8-bit Diamond Block", + "description": "Make a diamond block with loops.", + "startAt": 2, + "steps": [ + { + "hint": "Set stroke to 0.", + "solution": "stroke 0" + }, + { + "hint": "We’ll use two loops for the stone. **Type** `for x in [0 ... 16]`", + "solution": "for x in [0 ... 16]" + }, + { + "hint": "For y use `for y in [0 ... 16]`", + "solution": " for y in [0 ... 16]" + }, + { + "hint": "We’ll use a randomly chosen shade of gray to make the stone. **Type** `color darken gray, random -6, 9`", + "solution": " color darken gray, random -6, 9", + "validate": " color darken gray, random -6, 9" + }, + { + "hint": "Move into position for each square with `moveTo x * 31.25, y * 31.25`", + "solution": " moveTo x * 31.25, y * 31.25" + }, + { + "hint": "Finally, draw the stone square with `square 32`", + "solution": " square 32", + "validate": " square 32" + }, + { + "hint": "Get out of the loop by bringing your cursor to the beginning of the line with **BACKSPACE**. We’ll start a new pair of loops to draw the diamond. **Type** `for x in [2 ... 14]`", + "solution": "for x in [2 ... 14]" + }, + { + "hint": "This time we are starting at 2 and ending at 14 because we only want the diamond to appear in the middle of the block. **Type** `for y in [2 ... 14]`", + "solution": " for y in [2 ... 14]" + }, + { + "hint": "The diamond should appear randomly, this if statement will only randomly draw the diamond. **Type** `if 1 == random 0, 4`", + "solution": " if 1 == random 0, 4", + "validate": " if 1 == random 0, 4" + }, + { + "hint": "Set the diamond color with `color lighten lightblue, random 0, 40`", + "solution": " color lighten lightblue, random 0, 40", + "validate": " color lighten lightblue, random 0, 40" + }, + { + "hint": "Move into position for each square with `moveTo x * 31.25, y * 31.25`", + "solution": " moveTo x * 31.25, y * 31.25" + }, + { + "hint": "Finally, draw the diamond square with `square 32`", + "solution": " square 32", + "validate": " square 32" + } + ], + "completion_text": "You’ve hacked the pixels and won! What’s next? More challenges and 8-bit art projects here at Kano if you are interested. Congratulations and well done!", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "diamond-obsidian.png", + "diamond-rainbow.png", + "diamond-lotsof.png" + ] + }, + "cover": "pixel-diamondblock.png", + "guide": "#### What you'll make\n1. Set stroke to 0.\n2. We’ll use two loops for the stone. **Type** `for x in [0 ... 16]`\n3. For y use `for y in [0 ... 16]`\n4. We’ll use a randomly chosen shade of gray to make the stone. **Type** `color darken gray, random -6, 9`\n5. Move into position for each square with `moveTo x * 31.25, y * 31.25`\n6. Finally, draw the stone square with `square 32`\n7. Get out of the loop by bringing your cursor to the beginning of the line with **BACKSPACE**. We’ll start a new pair of loops to draw the diamond. **Type** `for x in [2 ... 14]`\n8. This time we are starting at 2 and ending at 14 because we only want the diamond to appear in the middle of the block. **Type** `for y in [2 ... 14]`\n9. The diamond should appear randomly, this if statement will only randomly draw the diamond. **Type** `if 1 == random 0, 4`\n10. Set the diamond color with `color lighten lightblue, random 0, 40`\n11. Move into position for each square with `moveTo x * 31.25, y * 31.25`\n12. Finally, draw the diamond square with `square 32`\n\n#### What you'll hack\nTo make this Minecraft Block your own all you need to change are two variables: the colour of the top and bottom parts. Make a strawberry, a water block, or anything else by just changing these two lines. For added complexity, make a Mycelium block with some randomness and another for loop. If you really want to have a challenge, try incorporating what you learned in the previous lesson and use the x and y values to add some extra color rotation to the dirt.\n\n#### Briefing\nThe grand finale: diamonds. This is the most precious and sought after Minecraft block. You’ll use nested for loops again to draw the stone, and then another pair of nested for loops to draw the stone, and then another nested for loop to draw the diamond. But as the diamond should be sprinkled throughout the stone we’ll use an if statement and use a random number to determine whether or not we should draw the square. Additionally, we only want to draw the diamond on the inside of the block, so our diamond-drawing loop will run from 2 to 14, rather than 0 to 16.\n" +} diff --git a/lib/challenges/worlds/pixelhack/forloop.json b/lib/challenges/worlds/pixelhack/forloop.json new file mode 100644 index 000000000..28798c88a --- /dev/null +++ b/lib/challenges/worlds/pixelhack/forloop.json @@ -0,0 +1,95 @@ +{ + "id": "forloop", + "title": "For Loop", + "description": "Use a for loop to build a snake with ease.", + "startAt": 2, + "steps": [ + { + "hint": "We're going to recreate the classic game Snake using the power of For Loops. First let's set a dirt background - **type** `background tan`", + "solution": "background tan" + }, + { + "hint": "Turn off the stroke **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "First we position the head of the snake **type** `moveTo 80,250`", + "solution": "moveTo 80,250" + }, + { + "hint": "Set a snake-like color **type** `color olivedrab`", + "solution": "color olivedrab" + }, + { + "hint": "Draw a `circle` 30 pixels big for the head", + "solution": "circle 30" + }, + { + "hint": "This is where we will set the loop up, using the for function, the first number is where to start counting from and the second number is what to count to. So 1 .. 7 makes the computer count to 7 - **type** `for [1 .. 7]`", + "solution": "for [1 .. 7]" + }, + { + "hint": "Everything within this indent will be repeated 7 times, we need a move function to position each part of the body - **type** `move 50,0`", + "solution": " move 50,0" + }, + { + "hint": "We set the body color - **type** `color olivedrab`", + "solution": " color olivedrab" + }, + { + "hint": "Once we add a circle it'll be clear what is going on with the code being repeated several times - **type** `circle 30`", + "solution": " circle 30" + }, + { + "hint": "Let's add a square so the body looks more segmented, notice how we're now drawing 7 shapes for every line of code - **type** `square 30`", + "solution": " square 30" + }, + { + "hint": "We're going to add another detail to the tail so set the `color` to darkgreen", + "solution": " color darkgreen" + }, + { + "hint": "Draw another circle, the code is still indented this will be repeated 7 times - **type** `circle 20`", + "solution": " circle 20" + }, + { + "hint": "Finally draw a `square` 20 pixels big", + "solution": " square 20" + }, + { + "hint": "First make sure you are no longer in the for loop by hitting backspace so we're no longer indented. - **type** `moveTo 70,240`", + "solution": "moveTo 70,240" + }, + { + "hint": "Change the `color` to black", + "solution": "color black" + }, + { + "hint": "Draw an `ellipse` 10 pixels wide and 5 tall.", + "solution": "ellipse 10,5" + }, + { + "hint": "Finally we'll give it a tongue so it can hiss like a snake should - **type** `color salmon`", + "solution": "color salmon" + }, + { + "hint": "Position it on the face - **type** `move -15, 20`", + "solution": "move -15, 20" + }, + { + "hint": "We'll draw a rectangle with a negative width to stretch it out from the mouth - **type** `rectangle -20,4`", + "solution": "rectangle -20,4" + } + ], + "completion_text": "Now you have seen how we can create more art with less lines of code by using loops in clever ways, why not try changing the 7 in the for loop and see what happenes", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "snake-tiny.png", + "snake-apple.png", + "snake-corner.png" + ] + }, + "cover": "pixel-forloop.png", + "guide": "#### New words\n**for i in [rangeMinimum ... rangeMax]**| for in [0 .. 10]\n\nThe for loop executes once for every number in the range provided. 10 times for the range [0 … 10] and 20 times for the range [0 … 20]. The loop executes any code that is indented four spaces appearing after it.\n\n#### What you'll make\n1. We're going to recreate the classic game Snake using the power of For Loops. First let's set a dirt background - **type** `background tan`\n2. Turn off the stroke **type** `stroke 0`\n3. First we position the head of the snake **type** `moveTo 80,250`\n4. Set a snake-like color **type** `color olivedrab`\n5. Draw a `circle` 30 pixels big for the head\n6. This is where we will set the loop up, using the for function, the first number is where to start counting from and the second number is what to count to. So 1 .. 7 makes the computer count to 7 - **type** `for [1 .. 7]`\n7. Everything within this indent will be repeated 7 times, we need a move function to position each part of the body - **type** `move 50,0`\n8. We set the body color - **type** `color olivedrab`\n9. Once we add a circle it'll be clear what is going on with the code being repeated several times - **type** `circle 30`\n10. Let's add a square so the body looks more segmented, notice how we're now drawing 7 shapes for every line of code - **type** `square 30`\n11. We're going to add another detail to the tail so set the `color` to darkgreen\n12. Draw another circle, the code is still indented this will be repeated 7 times - **type** `circle 20`\n13. Finally draw a `square` 20 pixels big\n14. First make sure you are no longer in the for loop by hitting backspace so we're no longer indented. - **type** `moveTo 70,240`\n15. Change the `color` to black\n16. Draw an `ellipse` 10 pixels wide and 5 tall.\n17. Finally we'll give it a tongue so it can hiss like a snake should - **type** `color salmon`\n18. Position it on the face - **type** `move -15, 20`\n19. We'll draw a rectangle with a negative width to stretch it out from the mouth - **type** `rectangle -20,4`\n\n#### What you’ll hack\nThe beauty of the loop is you can change your code once, and every single shape you draw will update. This is another reason to use loops, you can make big changes without rewriting big amounts of code.\n\n#### Briefing\nHow many times have you written the same commands over and over again in the last few challenges? For this snake challenge, each part of the snake is made up of the same circle shape. Instead of writing the same circle code over and over, you can have the computer do it for you!\n" +} diff --git a/lib/challenges/worlds/pixelhack/gradient.json b/lib/challenges/worlds/pixelhack/gradient.json new file mode 100644 index 000000000..3ed86e9e3 --- /dev/null +++ b/lib/challenges/worlds/pixelhack/gradient.json @@ -0,0 +1,53 @@ +{ + "id": "gradient", + "title": "8-bit sunset", + "description": "Use a loop to draw an 8-bit sunset.", + "startAt": 2, + "steps": [ + { + "hint": "We’ll just use solid shapes with no stroke. So **type** `stroke 0`.", + "solution": "stroke 0" + }, + { + "hint": "To better see the effect of our test, text to bold with `bold true`", + "solution": "bold true" + }, + { + "hint": "We’ll use a loop to draw the sunset. This time going from 0 to 10. **Type** `for y in [ 0 .. 10 ]`", + "solution": "for y in [ 0 .. 10 ]" + }, + { + "hint": "To understand how this loop works, we’ll draw the loop value out. Move into position with `moveTo 250, y * 50`", + "solution": " moveTo 250, y * 50" + }, + { + "hint": "Let’s inspect what our loop is doing. You can use the text function with plain text, but you can also pass it a variable. **Type** `text y` to see what the y values are across the screen.", + "solution": " text y", + "validate": " text y" + }, + { + "hint": "The y variable is increasing every time we go through the loop. It goes from 0 (which is off the screen) to 10. To draw our sunset we need to just move to the left edge. **Type** `moveTo 0, y * 50`", + "solution": " moveTo 0, y * 50" + }, + { + "hint": "We’ll use a special function to darken the color every loop. **Type** `color darken blue, y * 3`.", + "solution": " color darken blue, y * 3" + }, + { + "hint": "Now for the sky, this will draw over your numbers. **Type** `rectangle 500, 50`.", + "solution": " rectangle 500, 50", + "validate": " rectangle 500, 50" + } + ], + "completion_text": "Beautiful! See how the blue gets darker as it goes down the screen. The y variable was being passed to the darken function. As the y value increased, the darken function made the blue color get darker.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "grad-yello.png", + "grad-sword.png", + "grad-mage.png" + ] + }, + "cover": "pixel-gradient.png", + "guide": "#### New words\n**bold** state | bold true\n\nCan set whether text is drawn as bold or regular. True is bold, false is regular.\n\n**text** string | text “hello world”\n\nDraws text centered on the drawing cursor. The properties of the text are controlled by the color, font, bold, and italic functions.\n\n\n#### What you'll make\n1. We’ll just use solid shapes with no stroke. So **type** `stroke 0`.\n2. To better see the effect of our test, text to bold with `bold true`\n3. We’ll use a loop to draw the sunset. This time going from 0 to 10. **Type** `for y in [ 0 .. 10 ]`\n4. To understand how this loop works, we’ll draw the loop value out. Move into position with `moveTo 250, y * 50`\n5. Let’s inspect what our loop is doing. You can use the text function with plain text, but you can also pass it a variable. **Type** `text y` to see what the y values are across the screen.\n6. The y variable is increasing every time we go through the loop. It goes from 0 (which is off the screen) to 10. To draw our sunset we need to just move to the left edge. **Type** `moveTo 0, y * 50`\n7. We’ll use a special function to darken the color every loop. **Type** `color darken blue, y * 3`.\n8. Now for the sky, this will draw over your numbers. **Type** `rectangle 500, 50`.\n\n\n#### What you’ll hack\nNow that you’ve got a few pixel art creations under your belt, why not bring them in here and give them the full background treatment they deserve!\n\n#### Briefing\nWith a loop you can tell a computer to do something over and over again. With the `for` loop, you can ask how many times the loop has happened, and depending on what loop it is vary what it is the loop is doing.\n\nIn this sunset, we want to draw rectangular blocks of the same size, and we want to move down a certain distance every time, but this time we need a way of telling the computer that they will have a different color every time. How do we do this? With variables. The way you can ask how many times the loop has happened in a `for` loop is with the word you start the loop with. When we say `for y in [ 0 .. 10]`, we are making the word `y` equal to how many times the loop has executed. It is incremented for us, so any time we use the variable `y`, it will tell the program how many times it has looped.\n\nBecause it increments by one every time, we can use it to travel across color shades by making a color darker in step as our y variable gets bigger. So at the beginning of the loop we have a small y and a regular color, and at the end we have a big y and a dark color.\n\n" +} diff --git a/lib/challenges/worlds/pixelhack/grassblock.json b/lib/challenges/worlds/pixelhack/grassblock.json new file mode 100644 index 000000000..98830f060 --- /dev/null +++ b/lib/challenges/worlds/pixelhack/grassblock.json @@ -0,0 +1,60 @@ +{ + "id": "grassblock", + "title": "8-bit Grass Block", + "description": "Make a block you can bring into Minecraft.", + "startAt": 1, + "steps": [ + { + "hint": "We’ll just use solid shapes with no stroke. So **type** `stroke 0`.", + "solution": "stroke 0" + }, + { + "hint": "We’ll have to use two loops here. **Type** `for x in [0 ... 16]`", + "solution": "for x in [0 ... 16]" + }, + { + "hint": "For y use `for y in [0 ... 16]`", + "solution": " for y in [0 ... 16]", + "validate": " for y in \\[0 ... 16\\]" + }, + { + "hint": "We’ll use a randomly chosen shade of brown to make the dirt. **Type** `color darken brown, random 0, 25`", + "solution": " color darken brown, random 0, 25", + "validate": " color darken brown, random 0, 25" + }, + { + "hint": "We’ll need to move into position for each square with `moveTo x * 31.25, y * 31.25`", + "solution": " moveTo x * 31.25, y * 31.25" + }, + { + "hint": "Finally, draw the dirt square with `square 32`", + "solution": " square 32", + "validate": " square 32" + }, + { + "hint": "The grass should only appear on the top of the block, so we’ll decide if the block should have a green bit drawn over it with `if 4 > y + random 0, 3`", + "solution": " if 4 > y + random 0, 3" + }, + { + "hint": "Set the green color with the darken function. **Type** `color darken green, random 0, 25`", + "solution": " color darken green, random 0, 25", + "validate": " color darken green, random 0, 25" + }, + { + "hint": "Finally, draw the square with `square 32`", + "solution": " square 32", + "validate": " square 32" + } + ], + "completion_text": "Nice! Now you can change the brown and green colors to get an interesting effect. Can you make a block that looks like a strawberry?", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "grass-overgrown.png", + "grass-strawb.png", + "grass-myce.png" + ] + }, + "cover": "pixel-grassblock.png", + "guide": "#### What you'll make\n1. We’ll just use solid shapes with no stroke. So **type** `stroke 0`.\n2. We’ll have to use two loops here. **Type** `for x in [0 ... 16]`\n3. For y use `for y in [0 ... 16]`\n4. We’ll use a randomly chosen shade of brown to make the dirt. **Type** `color darken brown, random 0, 25`\n5. We’ll need to move into position for each square with `moveTo x * 31.25, y * 31.25`\n6. Finally, draw the dirt square with `square 32`\n7. The grass should only appear on the top of the block, so we’ll decide if the block should have a green bit drawn over it with `if 4 > y + random 0, 3`\n8. Set the green color with the darken function. **Type** `color darken green, random 0, 25`\n9. Finally, draw the square with `square 32`\n\n#### What you’ll hack\nTo make this Minecraft Block your own all you need to change are two variables: the colour of the top and bottom parts. Make a strawberry, a water block, or anything else by just changing these two lines. For added complexity, make a Mycelium block with some randomness and another for loop. If you really want to have a challenge, try incorporating what you learned in the previous lesson and use the x and y values to add some extra color rotation to the dirt.\n\n#### Briefing \nOne of the most basic and commonly found blocks in minecraft is the grass block. Just sixteen blocks across and down, it is a very simple image, but we’re going to use randomness to give it a bit of texture. Two different layers will be used: one for the grass, and one for the dirt. \n\nIn each layer we will use the nested for loops to draw across and down the screen, and we’ll only change one thing about each: the color.\n" +} diff --git a/lib/challenges/worlds/pixelhack/index.json b/lib/challenges/worlds/pixelhack/index.json new file mode 100644 index 000000000..2552d1e17 --- /dev/null +++ b/lib/challenges/worlds/pixelhack/index.json @@ -0,0 +1,17 @@ +{ + "challenges": [ + "./pong", + "./ship", + "./tetris", + "./chest", + "./variables", + "./sword", + "./steve", + "./mage", + "./forloop", + "./gradient", + "./colorfrenzy", + "./grassblock", + "./diamondblock" + ] +} diff --git a/lib/challenges/worlds/pixelhack/mage.json b/lib/challenges/worlds/pixelhack/mage.json new file mode 100644 index 000000000..4486614f5 --- /dev/null +++ b/lib/challenges/worlds/pixelhack/mage.json @@ -0,0 +1,208 @@ +{ + "id": "mage", + "title": "RPG Mage", + "description": "Draw an 8-bit Aqua Mage", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "We're going to make a Mage character for an RPG game so first we need to set the scene, we'll use the darken function to change the color teal to a more suitable shade of dark blue - **type** `background darken teal,15 `", + "solution": "background darken teal,15" + }, + { + "hint": "We're making pixel art so we'll turn the stroke off - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Let's set the color to saddlebrown for her hair - **type** `color saddlebrown`", + "solution": "color saddlebrown" + }, + { + "hint": "We'll use the moveTo function to move the cursor to a specific canvas coordinate - **type** `moveTo 120,80`", + "solution": "moveTo 120,80" + }, + { + "hint": "We're going to draw the hair first so we can layer the rest of the character over it to create depth - **type** `rectangle 320,400`", + "solution": "rectangle 320,400" + }, + { + "hint": "We're going to be drawing with blocks 20 by 20 pixels big - **type** `move 20,-20`", + "solution": "move 20,-20" + }, + { + "hint": "Stack up another layer of hair - **type** `rectangle 280,20`", + "solution": "rectangle 280,20" + }, + { + "hint": "Move upwards again to create a rounded effect - **type** `move 20,-20`", + "solution": "move 20,-20" + }, + { + "hint": "Draw the final row of hair in - **type** `rectangle 240,20`", + "solution": "rectangle 240,20" + }, + { + "hint": "Next we'll draw the face, - **type** `color sandybrown`", + "solution": "color sandybrown" + }, + { + "hint": "Move the cursor to the top corner of where the face will be - **type** `move 0,120`", + "solution": "move 0,120" + }, + { + "hint": "Draw the face with a `rectangle` that is 240 by 140", + "solution": "rectangle 240,140" + }, + { + "hint": "The face is a little too square so move the cursor up to the forehead - **type** `move 80,-40`", + "solution": "move 80,-40" + }, + { + "hint": "Draw another rectangle to create a fringe - **type** `rectangle 80,40`", + "solution": "rectangle 80,40" + }, + { + "hint": "Move the cursor down the face - **type** `move -40,180`", + "solution": "move -40,180" + }, + { + "hint": "Finish the face off by drawing a chin - **type** `rectangle 160,20`", + "solution": "rectangle 160,20" + }, + { + "hint": "Next we'll draw some robes, our mage specialises in water magic so we'll make them blue - **type** `color paleturquoise`", + "solution": "color paleturquoise" + }, + { + "hint": "Position the cursor for drawing the sleeves - **type** `move -100,20`", + "solution": "move -100,20" + }, + { + "hint": "Draw a `rectangle` 360 wide and 80 tall for the robe sleeves", + "solution": "rectangle 360,80" + }, + { + "hint": "Position the cursor to draw the body of the robe - **type** `move 60,80`", + "solution": "move 60,80" + }, + { + "hint": "Draw a `rectangle` 240 wide and 100 tall for the robe body", + "solution": "rectangle 240,100" + }, + { + "hint": "Next we'll draw a seam on the robe, change the `color` to teal", + "solution": "color teal" + }, + { + "hint": "Move the cursor to the middle of the robe - **type** `move 120,-80`", + "solution": "move 120,-80" + }, + { + "hint": "Draw a thin rectangle for the seam - **type** `rectangle 40,180`", + "solution": "rectangle 40,180" + }, + { + "hint": "Next up we'll draw the arms - **type** `move 140,40`", + "solution": "move 140,40" + }, + { + "hint": "Change the `color` back to sandybrown", + "solution": "color sandybrown" + }, + { + "hint": "Draw the arm with a `rectangle` 40 by 140", + "solution": "rectangle 40,140" + }, + { + "hint": "Move to the the other side of the body - **type** `move -380,40`", + "solution": "move -380,40" + }, + { + "hint": "This arm will be disconnected at first but don't worry, we haven't finished yet - **type** `rectangle 40,100`", + "solution": "rectangle 40,100" + }, + { + "hint": "Every mage needs a staff to cast magic, so we'll draw that next - **type** `color darkmagenta`", + "solution": "color darkmagenta" + }, + { + "hint": "Move to the top of the staff - **type** `move 60,-120`", + "solution": "move 60,-120" + }, + { + "hint": "Draw the staff over the arm so it looks like it's being held - **type** `rectangle -40,220`", + "solution": "rectangle -40,220" + }, + { + "hint": "As we said at the start our character uses water magic so set the color to aquamarine - **type** `color aquamarine`", + "solution": "color aquamarine" + }, + { + "hint": "Draw an orb at the top of the staff, if we use negative numbers then shapes are drawn backwards - **type** `square -80`", + "solution": "square -80" + }, + { + "hint": "We're also going to draw a magic circlet, move to the forehead - **type** `move 60,-200`", + "solution": "move 60,-200" + }, + { + "hint": "Draw a `rectangle` that is 240 by 20", + "solution": "rectangle 240,20" + }, + { + "hint": "Shift down a row on our grid - **type** `move -20,20`", + "solution": "move -20,20" + }, + { + "hint": "Finish off the circlet - **type** `rectangle 280,20`", + "solution": "rectangle 280,20" + }, + { + "hint": "We just need to finish off the face so position the cursor over the eyes - **type** `move 60,60`", + "solution": "move 60,60" + }, + { + "hint": "Set the `color` to black", + "solution": "color black" + }, + { + "hint": "Draw the eyes long and thin - **type** `rectangle 40,80`", + "solution": "rectangle 40,80" + }, + { + "hint": "Move across for the other eye - **type** `move 120,0`", + "solution": "move 120,0" + }, + { + "hint": "Draw the other eye - **type** `rectangle 40,80`", + "solution": "rectangle 40,80" + }, + { + "hint": "One last detail, we're going to make the eyes shiny - **type** `color white`", + "solution": "color white" + }, + { + "hint": "Draw a smaller rectangle within the pupil - **type** `rectangle 20,40`", + "solution": "rectangle 20,40" + }, + { + "hint": "Move to the other eye - **type** `move -120,0`", + "solution": "move -120,0" + }, + { + "hint": "Finish off with one last rectangle - **type** `rectangle 20,40`", + "solution": "rectangle 20,40" + } + ], + "completion_text": "Well done! Your mage is ready to raid some dungeons and cast some spells. Why not change the colours of the outfit to red for fire magic.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "mage-fire.png", + "mage-light.png", + "mage-warrior.png" + ] + }, + "cover": "pixel-mage.png", + "guide": "#### What you'll make\n1. We're going to make a Mage character for an RPG game so first we need to set the scene, we'll use the darken function to change the color teal to a more suitable shade of dark blue - **type** `background darken teal,15 `\n2. We're making pixel art so we'll turn the stroke off - **type** `stroke 0`\n3. Let's set the color to saddlebrown for her hair - **type** `color saddlebrown`\n4. We'll use the moveTo function to move the cursor to a specific canvas coordinate - **type** `moveTo 120,80`\n5. We're going to draw the hair first so we can layer the rest of the character over it to create depth - **type** `rectangle 320,400`\n6. We're going to be drawing with blocks 20 by 20 pixels big - **type** `move 20,-20`\n7. Stack up another layer of hair - **type** `rectangle 280,20`\n8. Move upwards again to create a rounded effect - **type** `move 20,-20`\n9. Draw the final row of hair in - **type** `rectangle 240,20`\n10. Next we'll draw the face, - **type** `color sandybrown`\n11. Move the cursor to the top corner of where the face will be - **type** `move 0,120`\n12. Draw the face with a `rectangle` that is 240 by 140\n13. The face is a little too square so move the cursor up to the forehead - **type** `move 80,-40`\n14. Draw another rectangle to create a fringe - **type** `rectangle 80,40`\n15. Move the cursor down the face - **type** `move -40,180`\n16. Finish the face off by drawing a chin - **type** `rectangle 160,20`\n17. Next we'll draw some robes, our mage specialises in water magic so we'll make them blue - **type** `color paleturquoise`\n18. Position the cursor for drawing the sleeves - **type** `move -100,20`\n19. Draw a `rectangle` 360 wide and 80 tall for the robe sleeves\n20. Position the cursor to draw the body of the robe - **type** `move 60,80`\n21. Draw a `rectangle` 240 wide and 100 tall for the robe body\n22. Next we'll draw a seam on the robe, change the `color` to teal\n23. Move the cursor to the middle of the robe - **type** `move 120,-80`\n24. Draw a thin rectangle for the seam - **type** `rectangle 40,180`\n25. Next up we'll draw the arms - **type** `move 140,40`\n26. Change the `color` back to sandybrown\n27. Draw the arm with a `rectangle` 40 by 140\n28. Move to the the other side of the body - **type** `move -380,40`\n29. This arm will be disconnected at first but don't worry, we haven't finished yet - **type** `rectangle 40,100`\n30. Every mage needs a staff to cast magic, so we'll draw that next - **type** `color darkmagenta`\n31. Move to the top of the staff - **type** `move 60,-120`\n32. Draw the staff over the arm so it looks like it's being held - **type** `rectangle -40,220`\n33. As we said at the start our character uses water magic so set the color to aquamarine - **type** `color aquamarine`\n34. Draw an orb at the top of the staff, if we use negative numbers then shapes are drawn backwards - **type** `square -80`\n35. We're also going to draw a magic circlet, move to the forehead - **type** `move 60,-200`\n36. Draw a `rectangle` that is 240 by 20\n37. Shift down a row on our grid - **type** `move -20,20`\n38. Finish off the circlet - **type** `rectangle 280,20`\n39. We just need to finish off the face so position the cursor over the eyes - **type** `move 60,60`\n40. Set the `color` to black\n41. Draw the eyes long and thin - **type** `rectangle 40,80`\n42. Move across for the other eye - **type** `move 120,0`\n43. Draw the other eye - **type** `rectangle 40,80`\n44. One last detail, we're going to make the eyes shiny - **type** `color white`\n45. Draw a smaller rectangle within the pupil - **type** `rectangle 20,40`\n46. Move to the other eye - **type** `move -120,0`\n47. Finish off with one last rectangle - **type** `rectangle 20,40`\n\n#### What you’ll hack\nThis is a much more intricate drawing, so there are many more things to change. You can go through the colours making up the image and change them to a new palette, and add in new objects. Take a look at the warrior and the lightning mage as ways of powering up your warrior with new powers, armour and weapons.\n\n#### Briefing\nThe simple shapes you have been putting together into simple designs can be refined and brought into more complex creations. This RPG Mage is a much more intricate design, but uses just the same tools to create them.\n" +} diff --git a/lib/challenges/worlds/pixelhack/pong.json b/lib/challenges/worlds/pixelhack/pong.json new file mode 100644 index 000000000..e69fbd42e --- /dev/null +++ b/lib/challenges/worlds/pixelhack/pong.json @@ -0,0 +1,40 @@ +{ + "id": "pong", + "title": "Pong", + "description": "Code a Pong match", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Pong (1972) was one of the first home game consoles. It is an incredibly basic table tennis game. And what do we need to play table tennis? First, a ball. **type** `circle 15`", + "solution": "circle 15" + }, + { + "hint": "Next we need to draw some paddles. We use the moveTo function to position objects. The first number after MoveTo tells you where the object goes the object goes horizontally (left and right). The second number tells you where the object goes vertically (up and down). **type** `moveTo 30,100`", + "solution": "moveTo 30,100" + }, + { + "hint": "We'll draw the paddles using the rectangle function, for the first paddle **type** `rectangle 20, 100`", + "solution": "rectangle 20, 100" + }, + { + "hint": "It's no fun to play Pong alone so we need an opponent **type** `moveTo 450,300`", + "solution": "moveTo 450,300" + }, + { + "hint": "Finally, let’s draw the opponent's paddle, the first number is the width and the second the height. **type** `rectangle 20, 100`", + "solution": "rectangle 20, 100" + } + ], + "completion_text": "Well done! You've recreated one of the first videogames, pretty boring to look at right? Why not try clicking on the 100 after the first moveTo command and using the slider to reposition the paddle.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "pong-white.png", + "pong-movecolor.png", + "pong-movepaddles.png" + ] + }, + "cover": "pixel-pong.png", + "guide": "#### New words\n**circle** radius | circle 15\n\nDraws a circle at the current position. The bigger the radius number, the bigger the circle: radius is the distance from the center of a circle to its edge.\n\n**moveTo** x, y | moveTo 30, 100\n\nMoves the drawing position to the new (x, y) place. The first value is the x value, which controls how far across horizontally the x part of the coordinate should go. The second value is the y coordinate, which controls how far down vertically the y coordinate should go.\n\n**rectangle** width, height | rectangle 20, 100\n\nDraws a rectangle at the current position. The width and height independently control how wide and tall the rectangle is.\n\n**color** name | color red\n\nChanges the drawing color. All following shapes and text will be drawn with the fill color set to this color until you change it again. To set the drawing color to transparent, type `color null`\n\n**background** colorName | background white\n\nChanges the background color.\n\n#### What you'll make\n1. Pong (1972) was one of the first home game consoles, being an incredibly basic table tennis game the first thing we need is a ball. **Type** `circle 15`\n2. Next we need to draw some paddles, use the moveTo function to position them. The first number is the horizontal position and the second number the vertical. **Type** `moveTo 30, 100`\n3. We'll draw the paddles using the rectangle function, for the first paddle. **Type** `rectangle 20, 100`\n4. It's no fun to play Pong alone so we need an opponent. **Type** `moveTo 450, 300`\n5. Finally, let’s draw the opponent's paddle, the first number is the width and the second the height. **Type** `rectangle 20, 100`\n\n#### What you’ll hack\nThere is one other essential tool every coding artist is going to need to know: color. The default starting color is black, and every time a shape is drawn in Make Art the drawing tool checks to see what color should be drawn. So because you haven’t specified a color yet, it will draw everything black.\n\nYou can change the color to red, for instance, by typing color red after the first `moveTo` command and before `rectangle 20, 100`to change the color of both paddles. Note: this will only change any shapes drawn after this command, so typing it at the bottom of your code won’t do anything. \n\nThe background color can be changed with background charcoal. You can put this anywhere in your code, and for most creations you’ll only call it once. It is best practice to put it at the top of the your code.\n\nFinally, you can move your paddles up and down by changing the second number next to each moveTo function. You can play with them by clicking on the number and using the slider to change the number.\n\n#### Briefing\nIn 1972, Al Alcorn got handed a \"warm-up exercise\" for his new job at game company Atari, and came up with Pong: two paddles, one ball, and soon after, lines of people around the block to play it. Pong went on to become an international sensation, with millions of games sold. It was so famous, in fact that dozens of knock-offs were made by competitors who tried to ride the coattails of Atari’s success. What made the game so simple and universal was what made it so easy to copy. \n\nYour first task as a hacker is to make your very own Pong game. One of the secrets to being a good hacker is remixing: taking ideas and code from other places and putting them together into something new. You can take the original idea of Pong and then hack it together into your own game! You’ll set up a basic screen with paddles and balls. Then it is up to you to hack it into something new! \n" +} diff --git a/lib/challenges/worlds/pixelhack/ship.json b/lib/challenges/worlds/pixelhack/ship.json new file mode 100644 index 000000000..3e74d8152 --- /dev/null +++ b/lib/challenges/worlds/pixelhack/ship.json @@ -0,0 +1,68 @@ +{ + "id": "ship", + "title": "Asteroids Ship", + "description": "Code a vector spaceship using lines", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Asteroids (1979) was one of the first major arcade games. It is set in space, so we're going to need to set the scene. **type** `background black`", + "solution": "background black" + }, + { + "hint": "The graphics in Asteroids were simple line based graphics called vectors, we still use a more complex version of this concept in computer graphics today. First we need to set our line color and width **type** `stroke white,5`", + "solution": "stroke white,5" + }, + { + "hint": "Next we use the move function to set the starting point for our first line. **type** `move 0, -70`", + "solution": "move 0, -70" + }, + { + "hint": "'Function' is the word we use to define what we are drawing. Let’s draw a line that starts where we just moved the cursor and ends at the bottom left. We type where we want the line to end after the function, so **type** `line -50,150` Try changing the Y value from 150 to -150 watch what happens. The line goes up, above where we started at -50. Let’s move it back down to 150!", + "solution": "line -50,150" + }, + { + "hint": "To move our cursor to the start of the next line we feed the previous coordinates into the move function. **type** `move -50,150`", + "solution": "move -50,150" + }, + { + "hint": "We draw a line inwards and upwards to form the thruster of the ship - **type** `line 50,-25`", + "solution": "line 50,-25" + }, + { + "hint": "Again moving to the same coordinates for a continuous line **type** `move 50,-25`", + "solution": "move 50,-25" + }, + { + "hint": "We replicate the shape for the right side of the ship by reversing the second coordinate to draw downwards instead of up **type** `line 50,25`", + "solution": "line 50,25" + }, + { + "hint": "Follow through with the line again **type** `move 50,25`", + "solution": "move 50,25" + }, + { + "hint": "Our ship starts to take shape. To make a line that goes from the end of the one we just drew to connect back up at the top **type** `line -50,-150`", + "solution": "line -50,-150" + }, + { + "hint": "Finally we move back to our starting point to add a final touch **type** `move -50,-150`", + "solution": "move -50,-150" + }, + { + "hint": "We draw a line down the centre to help the simple shape look more like a ship, early videogames had only a fraction of computing power we are used to today, so graphics had to be basic. **type** `line 0,125`", + "solution": "line 0,125" + } + ], + "completion_text": "It might not look like much but simple graphics like this were where videogames we know today began and games like this lay the foundations for the 3D graphics we're used to today.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "ship-golden.png", + "ship-thrust.png", + "ship-sleek.png" + ] + }, + "cover": "pixel-ship.png", + "guide": "#### New words\n**move** x, y | move 50, 25\n\nMoves the drawing cursor from the current position. The difference from moveTo is that this is relative, not absolute. `move 50, 25` will move the cursor 50 to the right, and 25 down from the current position, as opposed to from the top-left corner. The first value is the x value, which controls how far across horizontally the x part of the coordinate should go. The second value is the y coordinate, which controls how far down vertically the y coordinate should go. Negative values will send it in the opposite direction.\n\n**line** x, y | line 50, 25\n\nDraws a line from the current position to a relative position. The x, y coordinates control the point relative to the cursor where the line will be drawn to.\n\n**stroke** color, width | stroke white, 5\n\nSets the drawing stroke. All following shapes and text will be drawn with the stroke color and width set to this until you change it again. This function is smart and can accept arguments in any order, or only one at a time.\n\n#### What you'll make\n1. Asteroids (1979) was one of the first major arcade games. It was set in space so we're going to need to set the scene **type** `background black`\n2. The graphics in Asteroids were simple line based graphics called vectors, we still use a more complex version of this concept in computer graphics today. First we need to set our line color and width **type** `stroke white,5`\n3. Next we use the move function to set the starting point for our first line. **type** `move 0, -70`\n4. We use the line function to draw a line relative to our starting position, we use a negative number first to move to the left and a positive number second to move downward **type** `line -50,150`\n5. To move our cursor to the start of the next line we feed the previous coordinates into the move function. **type** `move -50,150`\n6. We draw a line inwards and upwards to form the thruster of the ship **type** `line 50,-25`\n7. Again moving to the same coordinates for a continuous line **type** `move 50,-25`\n8. We replicate the shape for the right side of the ship by reversing the second coordinate to draw downwards instead of up **type** `line 50,25`\n9. Follow through with the line again **type** `move 50,25`\n10. Our ship starts to take shape **type** `line -50,-150`\n11. Finally we move back to our starting point to add a final touch **type** `move -50,-150`\n12. We draw a line down the centre to help the simple shape look more like a ship, early videogames had only a fraction of computing power we are used to today, so graphics had to be basic. **type** `line 0,125`\n\n#### What you’ll hack\nIt might not look like much but graphics like this are where the videogames we know today began. Games like this lay the foundations for the 3D graphics we're used to today. You can turn your spaceship into a variety of different things by customising the stroke color and width. \n\nFor something more advanced, try drawing more lines.\n\n#### Briefing\nAsteroids (1979) was one of the first major arcade games. Limited by primitive drawing hardware, the game designers could only draw using simple line based graphics called vectors, we still use a more complex version of this concept in computer graphics today.\n" +} diff --git a/lib/challenges/worlds/pixelhack/steve.json b/lib/challenges/worlds/pixelhack/steve.json new file mode 100644 index 000000000..ed0339cc0 --- /dev/null +++ b/lib/challenges/worlds/pixelhack/steve.json @@ -0,0 +1,127 @@ +{ + "id": "steve", + "title": "Steve", + "description": "Make Steve's face with simple shapes.", + "startAt": 2, + "steps": [ + { + "hint": "We are going to just be using solid squares and rectangles, so lets turn our stroke off with `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Set the background to lightbrown", + "solution": "background lightbrown" + }, + { + "hint": "Set the drawing color for the hair with `color brown`.", + "solution": "color brown" + }, + { + "hint": "The hair starts in the top-left corner, so **type** `moveTo 0, 0`.", + "solution": "moveTo 0, 0" + }, + { + "hint": "We’ll draw a rectangle, which takes a width and height parameter. **Type** `rectangle 500, 150`", + "solution": "rectangle 500, 150" + }, + { + "hint": "Set the drawing color to lightbrown**type** `color lightbrown`", + "solution": "color lightbrown" + }, + { + "hint": "Move into position for the forehead, **type** `moveTo 100, 100`", + "solution": "moveTo 100, 100" + }, + { + "hint": "Now to draw the forehead, **type** `rectangle 300, 50`", + "solution": "rectangle 300, 50" + }, + { + "hint": "For the eyes, set the color to white", + "solution": "color white" + }, + { + "hint": "Now let’s move with `moveTo 100, 200`", + "solution": "moveTo 100, 200" + }, + { + "hint": "Draw the eye with `square 50`", + "solution": "square 50" + }, + { + "hint": "For the other eye, **type** `moveTo 350, 200`", + "solution": "moveTo 350, 200" + }, + { + "hint": "And another square of size 50", + "solution": "square 50" + }, + { + "hint": "For the iris we’ll use the color purple.", + "solution": "color purple" + }, + { + "hint": "Move to `150, 200`.", + "solution": "moveTo 150, 200" + }, + { + "hint": "Draw a square of size 50.", + "solution": "square 50" + }, + { + "hint": "Move to `300, 200`.", + "solution": "moveTo 300, 200" + }, + { + "hint": "And draw the final iris with a square of size 50.", + "solution": "square 50" + }, + { + "hint": "We’ll draw the nose next. **Type** `color brown`", + "solution": "color brown" + }, + { + "hint": "Move into position with `moveTo 200, 250`.", + "solution": "moveTo 200, 250" + }, + { + "hint": "Draw out a rectangle of width `100` and height `50`.", + "solution": "rectangle 100, 50" + }, + { + "hint": "For the mouth set the drawing color to `saddlebrown`.", + "solution": "color saddlebrown" + }, + { + "hint": "Move to `150, 300`", + "solution": "moveTo 150, 300" + }, + { + "hint": "The mouth should be wide rectangle. **Type** `200, 100`.", + "solution": "rectangle 200, 100" + }, + { + "hint": "To make the mouth just right we need to cut out a bit of the top. Set the drawing color to the same color as the skin. **Type** `color lightbrown`", + "solution": "color lightbrown" + }, + { + "hint": "Move to `200, 300`.", + "solution": "moveTo 200, 300" + }, + { + "hint": "Finish up with `rectangle 100, 50` ", + "solution": "rectangle 100, 50" + } + ], + "completion_text": "Well done! Our character is looking good. What parts can you change to make the character look more like you?", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "Steve-blue.png", + "Steve-beard.png", + "Steve-Alex.png" + ] + }, + "cover": "pixel-steve.png", + "guide": "#### What you'll make\n1. We are going to just be using solid squares and rectangles, so lets turn our stroke off with `stroke 0`\n2. Set the background to lightbrown\n3. Set the drawing color for the hair with `color brown`.\n4. The hair starts in the top-left corner, so **type** `moveTo 0, 0`.\n5. We’ll draw a rectangle, which takes a width and height parameter. **Type** `rectangle 500, 150`\n6. Set the drawing color to lightbrown**type** `color lightbrown`\n7. Move into position for the forehead, **type** `moveTo 100, 100`\n8. Now to draw the forehead, **type** `rectangle 300, 50`\n9. For the eyes, set the color to white\n10. Now let’s move with `moveTo 100, 200`\n11. Draw the eye with `square 50`\n12. For the other eye, **type** `moveTo 350, 200`\n13. And another square of size 50\n14. For the iris we’ll use the color purple.\n15. Move to `150, 200`.\n16. Draw a square of size 50.\n17. Move to `300, 200`.\n18. And draw the final iris with a square of size 50.\n19. We’ll draw the nose next. **Type** `color brown`\n20. Move into position with `moveTo 200, 250`.\n21. Draw out a rectangle of width `100` and height `50`.\n22. For the mouth set the drawing color to `saddlebrown`.\n23. Move to `150, 300`\n24. The mouth should be wide rectangle. **Type** `200, 100`.\n25. To make the mouth just right we need to cut out a bit of the top. Set the drawing color to the same color as the skin. **Type** `color lightbrown`\n26. Move to `200, 300`.\n27. Finish up with `rectangle 100, 50` \n\n#### What you’ll hack\nThe shapes here are simple, but that is what makes it so easy to remix and hack! Change the colors of the skin, eyes, or hair, or add in your own facial features to win!\n\n#### Briefing\nSteve is the hero of Minecraft. Not very much is known about Steve: who he is, where he came from, and whether he is even human. But he is the face of the most sensational game and building system of the decade. This simple composition with just squares and rectangles is brought to life with beautiful colors.\n" +} diff --git a/lib/challenges/worlds/pixelhack/sword.json b/lib/challenges/worlds/pixelhack/sword.json new file mode 100644 index 000000000..bc5491c80 --- /dev/null +++ b/lib/challenges/worlds/pixelhack/sword.json @@ -0,0 +1,96 @@ +{ + "id": "sword", + "title": "Diamond Sword", + "description": "Code a sword forged from pure diamonds", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "We're going to make a sword out of diamond so first we will set up some variables to represent the colors **type** `sword = aquamarine`", + "solution": "sword = aquamarine" + }, + { + "hint": "We set up enough variable to represent the darker areas of the sword, we can use the darken function to alter the color of our existing sword color. **type** `darksword = darken sword,40`", + "solution": "darksword = darken sword,40" + }, + { + "hint": "We start by setting the `background` color to slategray", + "solution": "background slategray" + }, + { + "hint": "Next we set our fill color to the variable we set up before **type** `color sword`", + "solution": "color sword" + }, + { + "hint": "and set our stroke color to the darker version of our sword color **type** `stroke darksword,20`", + "solution": "stroke darksword,20" + }, + { + "hint": "Move the cursor to where the top of the blade will be **type** `move -20,-180`", + "solution": "move -20,-180" + }, + { + "hint": "Draw the blade of the sword **type** `rectangle 40,230`", + "solution": "rectangle 40,230" + }, + { + "hint": "It's already starting to take shape, let's create the handle **type** `move 10,250`", + "solution": "move 10,250" + }, + { + "hint": "The grip isn't going to be made of diamond so set the `stroke` color to darkbrown", + "solution": "stroke darkbrown" + }, + { + "hint": "and the `color` to brown", + "solution": "color brown" + }, + { + "hint": "Draw a `rectangle` 20 by 100 for the grip", + "solution": "rectangle 20,100" + }, + { + "hint": "We're going to create the crossguard next **type** `move -70,-10`", + "solution": "move -70,-10" + }, + { + "hint": "Change the `stroke` color back to our darksword variable", + "solution": "stroke darksword" + }, + { + "hint": "We're going to use another color function: lighten to slightly change our diamond color **type** `color lighten darksword,10`", + "solution": "color lighten darksword,10" + }, + { + "hint": "Next draw a `rectangle` 160 by 20", + "solution": "rectangle 160,20" + }, + { + "hint": "Notice how the lighten function altered the diamond color. **type** `move 80, -240`", + "solution": "move 80, -240" + }, + { + "hint": "Finally we're going to add a highlight detail to finish the sword **type** `color white`", + "solution": "color white" + }, + { + "hint": "Turn the stroke off **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Draw a `rectangle` 10 by 230", + "solution": "rectangle 10, 230" + } + ], + "completion_text": "That sword looks exquisite, perfect for fighting your way out of some caves. Try changing the color on the first line, see how it changes all the other colors on the blade because of the variables.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "sword-golden.png", + "sword-shovel.png", + "sword-pickaxe.png" + ] + }, + "cover": "pixel-sword.png", + "guide": "#### New words\n**darken**(color, amount) | darken(blue, 40)\n\nReturns a lightened color by the amount you give it. The amount can be between 0 and 100.\n\n**lighten**(color, amount) | lighten(blue, 40)\n\nReturns a lightened color by the amount you give it. The amount can be between 0 and 100.\n\n\n#### What you'll make\n1. We're going to make a sword out of diamond so first we will set up some variables to represent the colors **type** `sword = aquamarine`\n2. We set up enough variable to represent the darker areas of the sword, we can use the darken function to alter the color of our existing sword color. **type** `darksword = darken sword,40`\n3. We start by setting the `background` color to slategray\n4. Next we set our fill color to the variable we set up before **type** `color sword`\n5. and set our stroke color to the darker version of our sword color **type** `stroke darksword,20`\n6. Move the cursor to where the top of the blade will be **type** `move -20,-180`\n7. Draw the blade of the sword **type** `rectangle 40,230`\n8. It's already starting to take shape, let's create the handle **type** `move 10,250`\n9. The grip isn't going to be made of diamond so set the `stroke` color to darkbrown\n10. and the `color` to brown\n11. Draw a `rectangle` 20 by 100 for the grip\n12. We're going to create the crossguard next **type** `move -70,-10`\n13. Change the `stroke` color back to our darksword variable\n14. We're going to use another color function: lighten to slightly change our diamond color **type** `color lighten darksword,10`\n15. Next draw a `rectangle` 160 by 20\n16. Notice how the lighten function altered the diamond color. **type** `move 80, -240`\n17. Finally we're going to add a highlight detail to finish the sword **type** `color white`\n18. Turn the stroke off **type** `stroke 0`\n19. Draw a `rectangle` 10 by 230\n\n#### What you’ll hack\nBecause all of the colors we used are just shades of our sword color, by changing one variable all the darker and lighter shades will change as well! We can make a diamond sword into a gold one by just changing the sword color.\n\nUsing the same code and style, what other Minecraft-inspired creations can you make?\n\n#### Briefing\nThe diamond sword is the most powerful weapon in the Minecraft players toolbelt. It is also the most difficult to make given the rarity of diamond. All of the different types of swords in Minecraft (diamond, gold, steel, stone…) follow a simple pattern in their design. The only thing that separates them visually is their color. For the diamond sword we’ll make a word called \"sword\" which is set to the color \"aquamarine\". To select different shades for the hilt and outlines, we’ll use the color with special color functions." +} diff --git a/lib/challenges/worlds/pixelhack/tetris.json b/lib/challenges/worlds/pixelhack/tetris.json new file mode 100644 index 000000000..bb9cfbc9f --- /dev/null +++ b/lib/challenges/worlds/pixelhack/tetris.json @@ -0,0 +1,96 @@ +{ + "id": "tetris", + "title": "Tetris", + "description": "Stack some Tetris blocks with code", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "Tetris (1984) was the first videogame to be exported from the USSR to the US, going on to sell 170 million copies. We're going to make some Tetris blocks, first turn the stroke off **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Next move your cursor to the start of the first block **type** `moveTo 150,200`", + "solution": "moveTo 150,200" + }, + { + "hint": "We're going to need some colors to tell the blocks apart, change the fill color of your shapes with the color function **type** `color crimson`", + "solution": "color crimson" + }, + { + "hint": "First we're going to draw an L shaped block **type** `rectangle 50,150`", + "solution": "rectangle 50,150" + }, + { + "hint": "Our blocks are all going to be to a 50x50 grid, so you'll notice all our draw and move commands are multiples of 50 **type** `move 0,100`", + "solution": "move 0,100" + }, + { + "hint": "Finish off the block with a 100,50 `rectangle`", + "solution": "rectangle 100,50" + }, + { + "hint": "Let's move to start the next block **type** `move 50,-100`", + "solution": "move 50,-100" + }, + { + "hint": "We'll change the color to tell them apart, color functions affect all shapes drawn below them in the code **type** `color seagreen`", + "solution": "color seagreen" + }, + { + "hint": "Next we'll be drawing the S shaped block **type** `rectangle 50,100`", + "solution": "rectangle 50,100" + }, + { + "hint": "Move one gridspace across and one down **type** `move 50,50`", + "solution": "move 50,50" + }, + { + "hint": "To make an S shape we create another `rectangle` of 50 by 100", + "solution": "rectangle 50,100" + }, + { + "hint": "On to the next block **type** `move 50,-100`", + "solution": "move 50,-100" + }, + { + "hint": "We change the color again **type** `color indigo`", + "solution": "color indigo" + }, + { + "hint": "Next we will draw a long and thin block, draw a `rectangle` 50 by 200", + "solution": "rectangle 50,200" + }, + { + "hint": "One final block to complete the square **type** `move -150,0`", + "solution": "move -150,0" + }, + { + "hint": "Let's make the `color` gold to stand out", + "solution": "color gold" + }, + { + "hint": "Another L block will fit nicely so draw the stem with **type** `rectangle 150,50`", + "solution": "rectangle 150,50" + }, + { + "hint": "Move into place to draw the foot **type** `move 100,0`", + "solution": "move 100,0" + }, + { + "hint": "Finally fill in the foot **type** `rectangle 50,100`", + "solution": "rectangle 50,100" + } + ], + "completion_text": "Well done you created a nice stack of tetrominoes, why not try changing the color of some of the blocks or drawing a few more to fill the screen.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "tetris-gameboy.png", + "tetris-3D.png", + "tetris-row.png" + ] + }, + "cover": "pixel-tetris.png", + "guide": "#### New words\n**color** name | color red\n\nChanges the drawing color. All following shapes and text will be drawn with the fill color set to this color until you change it again. To set the drawing color to transparent, type `color null`\n\n#### What you'll make\n1. Tetris (1984) was the first videogame to be exported from the USSR to the US, going on to sell 170 million copies. We're going to make some Tetris blocks, first turn the stroke off **type** `stroke 0`\n2. Next move your cursor to the start of the first block **type** `moveTo 150,200`\n3. We're going to need some colors to tell the blocks apart, change the fill color of your shapes with the color function **type** `color crimson`\n4. First we're going to draw an L shaped block **type** `rectangle 50,150`\n5. Our blocks are all going to be to a 50x50 grid, so you'll notice all our draw and move commands are multiples of 50 **type** `move 0,100`\n6. Finish off the block with a 100,50 `rectangle`\n7. Let's move to start the next block **type** `move 50,-100`\n8. We'll change the color to tell them apart, color functions affect all shapes drawn below them in the code **type** `color seagreen`\n9. Next we'll be drawing the S shaped block **type** `rectangle 50,100`\n10. Move one gridspace across and one down **type** `move 50,50`\n11. To make an S shape we create another `rectangle` of 50 by 100\n12. On to the next block **type** `move 50,-100`\n13. We change the color again **type** `color indigo`\n14. Next we will draw a long and thin block, draw a `rectangle` 50 by 200\n15. One final block to complete the square **type** `move -150,0`\n16. Let's make the `color` gold to stand out\n17. Another L block will fit nicely so draw the stem with **type** `rectangle 150,50`\n18. Move into place to draw the foot **type** `move 100,0`\n19. Finally fill in the foot **type** `rectangle 50,100`\n\n#### What you’ll hack\nNow you’ve made a cube, give each tetrimino whatever color you want, and add in more.\n\n#### Briefing \nTetris (1984) was the first videogame to be exported from the USSR to the US, going on to sell 170 million copies. We're going to make some Tetris blocks, which are known as tetriminos. Each tetrimino is made up of four squares that connect together, and fit together in interesting ways. In the game, tetriminos fall down endlessly and the goal is to make as many of them fit together without empty spaces.\n" +} diff --git a/lib/challenges/worlds/pixelhack/variables.json b/lib/challenges/worlds/pixelhack/variables.json new file mode 100644 index 000000000..8ff8ef2bb --- /dev/null +++ b/lib/challenges/worlds/pixelhack/variables.json @@ -0,0 +1,92 @@ +{ + "id": "variables", + "title": "Variables", + "description": "Use variables to create a maze dwelling ghost", + "code": "", + "startAt": 2, + "steps": [ + { + "hint": "This classic ghost character first appeared in Pac-Man (1980), because it's a ghost we're going to need a spooky background **type** `background navy`", + "solution": "background navy" + }, + { + "hint": "Next turn the stroke off by typing `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Set the `color` to red", + "solution": "color red" + }, + { + "hint": "Here we're introducing something new, we're going to set the size of the ghost using a variable, variables are a way of repeating the same value in your code **type** `ghostsize = 100`", + "solution": "ghostsize = 100" + }, + { + "hint": "Move the cursor up to where the ghosts head will start **type** `move 0,-50`", + "solution": "move 0,-50" + }, + { + "hint": "We're going to use that variable we set earlier to draw the head, because we set the variable to 100 this command will create a circle 100 pixels big **type** `circle ghostsize`", + "solution": "circle ghostsize" + }, + { + "hint": "We're going to use the variable again, this time with the move command, by placing a minus symbol in front of it this command becomes the same as moving -100,0 **type** `move -ghostsize,0`", + "solution": "move -ghostsize,0" + }, + { + "hint": "Time to draw the rest of the ghost's body, because the body is relative to the head size we will use the variable again **type** `square ghostsize * 2`", + "solution": "square ghostsize * 2" + }, + { + "hint": "We're going to give it some eyes so we need to use the variable again to make sure they're positioned correctly on the head **type** `move ghostsize / 2`", + "solution": "move ghostsize / 2" + }, + { + "hint": "Set the `color` to white", + "solution": "color white" + }, + { + "hint": "Start the eyes off with a `circle` 20 pixels big", + "solution": "circle 20" + }, + { + "hint": "Now set the iris color **type** `color blue`", + "solution": "color blue" + }, + { + "hint": "Finally draw the iris **type** `circle 10`", + "solution": "circle 10" + }, + { + "hint": "We're gonna use the variable one last time to position the other eye correctly **type** `move ghostsize,0`", + "solution": "move ghostsize,0" + }, + { + "hint": "Repeat the process for the second eye, set the `color` to white", + "solution": "color white" + }, + { + "hint": "Draw a `circle` 20 pixels big", + "solution": "circle 20" + }, + { + "hint": "Set the `color` to blue", + "solution": "color blue" + }, + { + "hint": "Finally draw a `circle` 10 pixels big", + "solution": "circle 10" + } + ], + "completion_text": "Nice! Now because you have used a variable, you can click on the ghostsize number and use the slider to change the value. Notice how the eyes stay the same size because they are hardcoded numbers and everything else scales together.", + "gallery": { + "cover_path": "/assets/challenges/images/pixelremixes/", + "remixes": [ + "ghost-big.png", + "ghost-tired.png", + "ghost-scared.png" + ] + }, + "cover": "pixel-variables.png", + "guide": "#### New words\n**variable** = value | ghostsize = 100\n\nCreates a word that is assigned a value and can be used elsewhere.\n\n#### What you'll make\n1. This classic ghost character first appeared in Pac-Man (1980), because it's a ghost we're going to need a spooky background **type** `background navy`\n2. Next turn the stroke off by typing `stroke 0`\n3. Set the `color` to red\n4. Here we're introducing something new, we're going to set the size of the ghost using a variable, variables are a way of repeating the same value in your code **type** `ghostsize = 100`\n5. Move the cursor up to where the ghosts head will start **type** `move 0,-50`\n6. We're going to use that variable we set earlier to draw the head, because we set the variable to 100 this command will create a circle 100 pixels big **type** `circle ghostsize`\n7. We're going to use the variable again, this time with the move command, by placing a minus symbol in front of it this command becomes the same as moving -100,0 **type** `move -ghostsize,0`\n8. Time to draw the rest of the ghost's body, because the body is relative to the head size we will use the variable again **type** `square ghostsize * 2`\n9. We're going to give it some eyes so we need to use the variable again to make sure they're positioned correctly on the head **type** `move ghostsize / 2`\n10. Set the `color` to white\n11. Start the eyes off with a `circle` 20 pixels big\n12. Now set the iris color **type** `color blue`\n13. Finally draw the iris **type** `circle 10`\n14. We're gonna use the variable one last time to position the other eye correctly **type** `move ghostsize,0`\n15. Repeat the process for the second eye, set the `color` to white\n16. Draw a `circle` 20 pixels big\n17. Set the `color` to blue\n18. Finally draw a `circle` 10 pixels big\n\n#### What you’ll hack\nBecause you used a variable for all the different versions of the ghost’s body, you can change it once to see how the ghost’s body resizes! If you notice, the eyes position change with the ghostsize variable, but the eyes’ size don’t. Could you set up another variable that controls the size of the eyes?\n\n#### Briefing\nWhen you write a computer program you are telling a computer to do a series of tasks. And when you run the program, the computer reads all of the tasks and does them. So far we have written programs that will run the same way every single time you do the program, but what if we want the program to be different every time we run the program? If we wanted to vary the way in which the program works every time it was run, we need to use variables.\n\nA variable is a word that takes on the meaning of something else. And when you use it somewhere else it will pass on the word it means. In this challenge you will base the size of many of the ghost’s parts off of a variable. Changing the variable with a slider will then affect all of the different individual shapes sizes, giving you the power to make the whole ghost bigger or smaller at once!\n" +} diff --git a/lib/challenges/worlds/summercamp/backpack.json b/lib/challenges/worlds/summercamp/backpack.json new file mode 100644 index 000000000..fdb455022 --- /dev/null +++ b/lib/challenges/worlds/summercamp/backpack.json @@ -0,0 +1,143 @@ +{ + "id": "backpack", + "title": "Pack your things", + "short_title": "Backpack", + "icon_class": "challenge_backpack", + "description": "Dick Kelty is the inventor of the aluminium frame backpack. Kelty got the idea for his backpack in 1951 when he and a friend were hiking in the Sierra Nevada. Working in his garage, and with $500 borrowed against his house, Kelty and his wife went into production; he cut and welded the aluminium frames, while she stitched the nylon. They sold the finished backpacks for $24 apiece.", + "cover": "summercamp/day_8.png", + "completion_text": "I have a big challenge for you: try drawing your character behind that backpack! Head, arms, legs… ", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "It's a beautiful day to go for a walk in the forest - **type** `background blue`", + "solution": "background blue" + }, + { + "hint": "Firstly, set the `stroke` to `0`, to avoid drawing the outlines of the shapes", + "solution": "stroke 0" + }, + { + "hint": "Move the cursor to place the floor - in a new line **type** `moveTo 0, 250`", + "solution": "moveTo 0, 250" + }, + { + "hint": "Set the `color` of the grass to `green`", + "solution": "color green" + }, + { + "hint": "Draw the floor with a rectangle - **type** `rectangle 500, 250`", + "solution": "rectangle 500, 250" + }, + { + "hint": "This looks like a nice place for a tree - **type** `moveTo 220`", + "solution": "moveTo 220" + }, + { + "hint": "Set the `color` of the trunk to `lightbrown`", + "solution": "color lightbrown" + }, + { + "hint": "Draw the trunk with a `rectangle` of size `50` by `400`", + "solution": "rectangle 50, 400" + }, + { + "hint": "Beautiful! Now it just needs some leaves - **type** `move 30, -120` to place them", + "solution": "move 30, -120" + }, + { + "hint": "Set the `color` of the leaves to `darkgreen`", + "solution": "color darkgreen" + }, + { + "hint": "Draw a `circle` to represent the leaves with size `200`", + "solution": "circle 200" + }, + { + "hint": "Looking great! Let's move the cursor to place our backpack - **type** `moveTo 150, 200`", + "solution": "moveTo 150, 200" + }, + { + "hint": "Let's choose `color` `brown` for our backpack", + "solution": "color brown" + }, + { + "hint": "Draw the main part of the rucksack with a square - **type** `square 200`", + "solution": "square 200" + }, + { + "hint": "Now move the cursor to bottom part of our backpack - **type** `moveTo 250, 400`", + "solution": "moveTo 250, 400" + }, + { + "hint": "Draw the bottom using an ellipse - **type** `ellipse 100, 30`", + "solution": "ellipse 100, 30" + }, + { + "hint": "We need to store the sleeping bag at the top - **type** `moveTo 250, 200`", + "solution": "moveTo 250, 200" + }, + { + "hint": "Set the `color` of the sleeping bag to `darkred`", + "solution": "color darkred" + }, + { + "hint": "Ready to draw the sleeping bag? Use an ellipse - **type** `ellipse 115, 40`", + "solution": "ellipse 115, 40" + }, + { + "hint": "We need something to secure your sleeping bag to your backpack - **type** `moveTo 200, 160`", + "solution": "moveTo 200, 160" + }, + { + "hint": "The `orangered` seems like a nice `color` for the holders", + "solution": "color orangered" + }, + { + "hint": "Draw the left one first - **type** `rectangle 15, 90`", + "solution": "rectangle 15, 90" + }, + { + "hint": "Position the cursor to the right to draw the next holder - **type** `moveTo 290, 160`", + "solution": "moveTo 290, 160" + }, + { + "hint": "Use a `rectangle` again for the right holder, same as the previous one", + "solution": "rectangle 15, 90" + }, + { + "hint": "Excellent! We need more storage space. Move the cursor to the middle - **type** `moveTo 205, 320`", + "solution": "moveTo 205, 320" + }, + { + "hint": "Use a `rectangle` for the outside pocket, `90` by `60` will suffice", + "solution": "rectangle 90, 60" + }, + { + "hint": "That pocket needs to be closed so bugs can't get in - **type** `moveTo 250, 320`", + "solution": "moveTo 250, 320" + }, + { + "hint": "Set the `color` to `lightbrown`", + "solution": "color lightbrown" + }, + { + "hint": "An `ellipse` of size `48` by `7` will help here", + "solution": "ellipse 48, 7" + }, + { + "hint": "Looking great! Let’s place a button on that pocket - **type** `moveTo 250, 330`", + "solution": "moveTo 250, 330" + }, + { + "hint": "Set the `color` to `brown`", + "solution": "color brown" + }, + { + "hint": "Draw a `circle` button of size `10`", + "solution": "circle 10" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/bear.json b/lib/challenges/worlds/summercamp/bear.json new file mode 100644 index 000000000..3282e8b5c --- /dev/null +++ b/lib/challenges/worlds/summercamp/bear.json @@ -0,0 +1,91 @@ +{ + "id": "bear", + "title": "Cheeky Bear", + "short_title": "Bear", + "description": "Bears are very smart and have been known to roll rocks into bear traps to set off the trap and then eat the bait in safety. These animals can run up to 40 miles per hour, fast enough to catch a running horse. Take into account that the fastest known human alive today is Usain Bolt, who can run at 27mph! And because bears can walk short distances on their hind legs, some Native Americans called them “the beast that walks like a man.”", + "icon_class": "challenge_bear", + "cover": "summercamp/day_11.png", + "completion_text": "That cute bear needs a body, and a habitat. Use your code skills to impress other campers with your abilities! Remember that the icons on your left can help you achieve what you have in mind.", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "The bear lives in the forest. Set the background color to green - **type** `background green`", + "solution": "background green" + }, + { + "hint": "The bear has brown fur, let's start to draw his face by getting our paint ready - **type** `color brown`", + "solution": "color brown" + }, + { + "hint": "Set the stroke to 0, to avoid drawing lines - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Draw the face with a circle - **type** `circle 100`", + "solution": "circle 100" + }, + { + "hint": "Now let's move the cursor to draw his left ear - **type** `move -80, -80`", + "solution": "move -80, -80" + }, + { + "hint": "Draw the ear with a `circle` of size `30`", + "solution": "circle 30" + }, + { + "hint": "Move the cursor to the right to draw his other ear - **type** `move 160`", + "solution": "move 160" + }, + { + "hint": "Draw another ear (just like the last one)", + "solution": "circle 30" + }, + { + "hint": "Now head over to where the left eye will go - **type** `move -110, 50`", + "solution": "move -110, 50" + }, + { + "hint": "The rest of the bear's facial features will be `black`, so lets set the `color`", + "solution": "color black" + }, + { + "hint": "Draw the first eye - **type** `circle 5`", + "solution": "circle 5" + }, + { + "hint": "Next move over to where the other eye goes - **type** `move 60`", + "solution": "move 60" + }, + { + "hint": "Fill in the other eye just like the last one", + "solution": "circle 5" + }, + { + "hint": "Move to the center of the face for the bear's most distinctive feature - **type** `move -30, 50`", + "solution": "move -30, 50" + }, + { + "hint": "Draw his nose with a triangle using polygon - **type** `polygon 12, -16, -12, -16`", + "solution": "polygon 12, -16, -12, -16" + }, + { + "hint": "Let's get ready to draw the mouth by moving down a bit further - **type** `move 0, 20`", + "solution": "move 0, 20" + }, + { + "hint": "Set the `stroke` (the outline of a shape) to color `black` and size `3`", + "solution": "stroke black, 3" + }, + { + "hint": "We don't want the mouth to be filled so set its color to null - **type** `color null`", + "solution": "color null" + }, + { + "hint": "An arc is part of a cirlce, just like a smiling mouth - **type** `arc 15, 0.5, 2`", + "solution": "arc 15, 0.5, 2" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/bow_and_arrow.json b/lib/challenges/worlds/summercamp/bow_and_arrow.json new file mode 100644 index 000000000..c3f571e91 --- /dev/null +++ b/lib/challenges/worlds/summercamp/bow_and_arrow.json @@ -0,0 +1,108 @@ +{ + "id": "bow_and_arrow", + "title": "Bow and Arrow", + "short_title": "Bow and Arrow", + "icon_class": "challenge_bow", + "description": "Shooting a bow and arrow at a target is an art that requires lots of focus. This challenge is to draw a bow and try to hold it steady while your hand jitters...just like the other humans who have used the bow and arrow for hunting since the dawn of civilization over ten thousand years ago. The oldest known bow, found in Denmark, dates from 9000 BCE!", + "cover": "summercamp/day_15.png", + "completion_text": "Click Refresh and watch the target move while you try to hold your bow steady! Try getting rid of the moving background to make it easier to hit the target, converting your bow to a crossbow, or drawing an arrow in the bullseye.", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "The weather is good today...there is no wind to blow our arrows off course. Set the background color to blue - **type** `background blue`.", + "solution": "background blue" + }, + { + "hint": "We want the background to jitter, so we will start drawing it at a random point. **Type** `moveTo (random -20, 0), (random 240, 260)`.", + "solution": "moveTo (random -20, 0), (random 240, 260)", + "validate": "__moveTo ?\\( *random +-20, +0 *\\), +\\( *random +240, +260 *\\)" + }, + { + "hint": "Our target is in a grassy field, so lets get our `color green` ready", + "solution": "color green" + }, + { + "hint": "Draw a big `rectangle` that is `550` pixels high and `300` pixels wide for the grass", + "solution": "rectangle 550, 300" + }, + { + "hint": "Now let's move the cursor to draw our target - **type** `move 275, 10`", + "solution": "move 275, 10" + }, + { + "hint": "First we will draw the wooden legs supporting it - **type** `stroke brown, 15`", + "solution": "stroke brown, 15" + }, + { + "hint": "Draw the left leg - **type** `line -80, 120`", + "solution": "line -80, 120" + }, + { + "hint": "...and now draw the right leg - **type** `line 80, 120`", + "solution": "line 80, 120" + }, + { + "hint": "We will draw a target with white and red rings - **type** `stroke white, 50`", + "solution": "stroke white, 50" + }, + { + "hint": "Now make the inside of the circle red - **type** `color red`", + "solution": "color red" + }, + { + "hint": "First, draw a circle with a radius of 80 pixels- **type** `circle 80`", + "solution": "circle 80" + }, + { + "hint": "Second, draw a `circle` with a radius of `30` pixels", + "solution": "circle 30" + }, + { + "hint": "Move the cursor to draw an arrowhead - **type** `moveTo 250, 220`", + "solution": "moveTo 250, 220" + }, + { + "hint": "Our arrowhead will have a thin gray outline - **type** `stroke gray, 1`", + "solution": "stroke gray, 1" + }, + { + "hint": "The flint arrowhead is going to have the `color dimgray`", + "solution": "color dimgray" + }, + { + "hint": "Draw the arrowhead as a diamond - **type** `polygon -10, 40, 0, 80, 10, 40`", + "solution": "polygon -10, 40, 0, 80, 10, 40" + }, + { + "hint": "Next we will move to draw the shaft of the arrow - **type** `move 0, 40`", + "solution": "move 0, 40" + }, + { + "hint": "The arrow will be made of a light brown wood - **type** `stroke lightbrown, 20`", + "solution": "stroke lightbrown, 20" + }, + { + "hint": "Draw a line for the shaft - **type** `line 200, 360`", + "solution": "line 200, 360" + }, + { + "hint": "The last thing we will draw is our bow. Move the cursor off the screen - **type** `moveTo 800, 375`", + "solution": "moveTo 800, 375" + }, + { + "hint": "We are going to draw an arc for the bow so let's draw it with a thick piece of dark brown wood - **type** `stroke darkbrown, 40`", + "solution": "stroke darkbrown, 40" + }, + { + "hint": "We don't want the arc to have any fill - **type** `color null`", + "solution": "color null" + }, + { + "hint": "Draw the bow with a big arc centered far off the screen - **type** `arc 500, 0, 2`", + "solution": "arc 500, 0, 2" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/camera.json b/lib/challenges/worlds/summercamp/camera.json new file mode 100644 index 000000000..0a53047ee --- /dev/null +++ b/lib/challenges/worlds/summercamp/camera.json @@ -0,0 +1,109 @@ +{ + "id": "camera", + "title": "Take a pic!", + "short_title": "Camera", + "icon_class": "challenge_camera", + "description": "Back in the 1820s, early cameras would take several hours to actually capture a film! With annoyingly long exposure hours, photographing people with a nice smile was not really possible. Why? Try and hold a convincing smile while staying perfectly still for hours and you will get your answer. Today, the number of photographs clicked every two minutes is same as the number of photographs clicked by mankind in 1800s.", + "cover": "summercamp/day_10.png", + "completion_text": "Try drawing yourself taking the picture behind that beautiful camera. Perhaps a light for the flash as well?", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": { + "outfit": 1 + }, + "steps": [ + { + "hint": "Set the `background` color to `blue`", + "solution": "background blue" + }, + { + "hint": "Set the `stroke` to `0` for now, to avoid drawing the outline of the shapes", + "solution": "stroke 0" + }, + { + "hint": "Move the cursor to place the camera in the center - **type** `moveTo 100, 150`", + "solution": "moveTo 100, 150" + }, + { + "hint": "Set the `color` of the camera to `dimgray`", + "solution": "color dimgray" + }, + { + "hint": "Now draw the body of the camera with a rectangle - **type** `rectangle 300, 200`", + "solution": "rectangle 300, 200" + }, + { + "hint": "Move the cursor to draw the lense - **type** `move 150, 100`", + "solution": "move 150, 100" + }, + { + "hint": "Set the `color` of the lens to `lightblue`", + "solution": "color lightblue" + }, + { + "hint": "Set the outline of the lens with a `stroke` of `black` color and size `10`", + "solution": "stroke black, 10" + }, + { + "hint": "The lens is a `circle` with size `50`", + "solution": "circle 50" + }, + { + "hint": "Set the `color` to `lightgray` for the second half of the lens", + "solution": "color lightgray" + }, + { + "hint": "Draw an arc that matches the top half of the lens - **type** `arc 50, 2, 1`", + "solution": "arc 50, 2, 1" + }, + { + "hint": "This camera needs a flash! Move the cursor to place it - **type** `move -30, -125`", + "solution": "move -30, -125" + }, + { + "hint": "Draw the flash of the camera with a `rectangle` of size `60` by `20`", + "solution": "rectangle 60, 20" + }, + { + "hint": "Set the `stroke` back to `0`.", + "solution": "stroke 0" + }, + { + "hint": "Set the `color` of the flash to `lightblue`", + "solution": "color lightblue" + }, + { + "hint": "Draw a polygon for the reflection on the flash - **type** `polygon 40, 0, 0, 20`", + "solution": "polygon 40, 0, 0, 20" + }, + { + "hint": "Only the button to shoot the picture is left - **type** `move 100, 10`", + "solution": "move 100, 10" + }, + { + "hint": "Set the `color` of the button to `red`.", + "solution": "color red" + }, + { + "hint": "Draw the button of the camera with a `rectangle` of size `50` by `15`", + "solution": "rectangle 50, 15" + }, + { + "hint": "One more detail! Move the cursor one last time - **type** `move 25, -20`", + "solution": "move 25, -20" + }, + { + "hint": "Set the `color` to `yellow`", + "solution": "color yellow" + }, + { + "hint": "Set the `font` to `'ComicSansMS'` and size `30`", + "solution": "font 'ComicSansMS', 30" + }, + { + "hint": "Write some text - **type** `text 'Click!'`", + "solution": "text 'Click!'" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/camp_badge.json b/lib/challenges/worlds/summercamp/camp_badge.json new file mode 100644 index 000000000..f682de7bc --- /dev/null +++ b/lib/challenges/worlds/summercamp/camp_badge.json @@ -0,0 +1,56 @@ +{ + "id": "camp_badge", + "title": "Camp Badge", + "short_title": "Camp Badge", + "icon_class": "challenge_badge", + "description": "First Aid is the most popular merit badge. In fact, 6.9 million Scouts have earned it since its debut in 1911. Other popular ones are Environmental Science, Search and Rescue, and our favourites Programming and Game Design! There are some oddballs as well. For example Truck transportation: “Assume that you are going to ship by truck 500 pounds of goods (freight class 65) from your town to another town 500 miles away. Your shipment must arrive within three days. Explain in writing…”. And Nuclear Science “Obtain a sample of irradiated and non-irradiated foods. Prepare the two foods and compare their taste and texture.”", + "completion_text": "This badge will distinguish your camp from others. Surprise the world with an amazing creation.", + "cover": "summercamp/day_5.png", + "difficulty": 1, + "startAt": 4, + "start_date": "2015-10-07 06:00:00", + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "Set the `background` color to `black`", + "solution": "background black" + }, + { + "hint": "Set the `color` of your badge to `lightblue`", + "solution": "color lightblue" + }, + { + "hint": "Set the stroke for the first circle - **type** `stroke red, 20`", + "solution": "stroke red, 20" + }, + { + "hint": "Draw a `circle` with a size of `200`", + "solution": "circle 200" + }, + { + "hint": "Set the stroke for the second circle - **type** `stroke yellow, 20`", + "solution": "stroke yellow, 20" + }, + { + "hint": "Draw a `circle` with a size of `190`", + "solution": "circle 190" + }, + { + "hint": "Set the `stroke` for the third circle to `purple` color and size `20`", + "solution": "stroke purple, 20" + }, + { + "hint": "Draw a `circle` with a size of `180`", + "solution": "circle 180" + }, + { + "hint": "Add some decoration inside. Set the `color` to `green`", + "solution": "color green" + }, + { + "hint": "An arc is part of a cirlce, draw one that matches the inner circle - **type** `arc 180, 1, 2`", + "solution": "arc 180, 1, 2" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/camp_sign.json b/lib/challenges/worlds/summercamp/camp_sign.json new file mode 100644 index 000000000..7b952989f --- /dev/null +++ b/lib/challenges/worlds/summercamp/camp_sign.json @@ -0,0 +1,87 @@ +{ + "id": "camp_sign", + "title": "Your Summer Camp sign", + "short_title": "Camp Sign", + "description": "Welcome to your first day! Before you set out from the lodge, your campsite sign needs a design. Be creative! Use a crazy color scheme, or show what you want to do at camp. \nIn the Pacific Northwest of the United States, indigenous peoples carved Totem Poles to tell the stories of their families and cultures. These beautiful sculptures are carved into trees and often feature characters and events from legends. You can search the internet for images of Totem Poles for inspiration.", + "icon_class": "challenge_campsign", + "cover": "summercamp/day_1.png", + "completion_text": "Well done! Now give your camp its own name and style. Change your camp name on line 18, or the color of the sign on line 3... why not add a nice background and some extra decorations? All those tool icons on the left can help you get started.", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "It's a sunny day! Set the background color to blue - **type** `background blue`", + "solution": "background blue" + }, + { + "hint": "Let's move the cursor over to the place on the screen where we want to start drawing our sign.\n\nPress ENTER to add the next instruction, and - **type** `moveTo 100, 150`", + "solution": "moveTo 100, 150" + }, + { + "hint": "In Make Art we draw shapes using digital pens. Before we draw the next shape, we need to choose the pen we want to use to fill the inside of the shape. Let's select a brown pen by setting the color to lightbrown.\n\n In a new line **type** `color lightbrown`", + "solution": "color lightbrown" + }, + { + "hint": "When we draw a shape we can control how thick the line is that the pen leaves behind on the outside of the shape. This line is called the **stroke**.\n\n Press enter and then set the stroke to 0, to avoid drawing lines - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Now that we have our pen all set up, we can get started on the sign!\n\nDraw the main billboard with a rectangle - **type** `rectangle 300, 200`", + "solution": "rectangle 300, 200" + }, + { + "hint": "Let's draw a shadow. Set the color to brown first - **type** `color brown`", + "solution": "color brown" + }, + { + "hint": "Draw a thin shadow with a rectangle - **type** `rectangle 300, 5`", + "solution": "rectangle 300, 5" + }, + { + "hint": "That sign looks too clean. We need to draw some imperfections.\n\nMove the cursor to place one on the left side of the sign- **type** `moveTo 100, 220`", + "solution": "moveTo 100, 220" + }, + { + "hint": "Our imperfection will be a triangle. First we need to set the `color` to `blue` to match the background.", + "solution": "color blue" + }, + { + "hint": "Set the stroke to be size 5 and brown (to match the sign). You can do both these things in one command - **type** `stroke brown, 5`", + "solution": "stroke brown, 5" + }, + { + "hint": "Now we will use the `polygon` command to draw a triangular imperfection. To create it, we need to list out the positions of the two other corners - **type** `polygon 16, 10, 0, 11`", + "solution": "polygon 16, 10, 0, 11" + }, + { + "hint": "The sign needs a post. Move the cursor to where we will draw it - **type** `moveTo 230, 350`", + "solution": "moveTo 230, 350" + }, + { + "hint": "Set the color of the post to brown - **type** `color brown` ", + "solution": "color brown" + }, + { + "hint": "Set the stroke to 0, again - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Now that we have the colors sorted, draw the post with a rectangle - **type** `rectangle 40, 150`", + "solution": "rectangle 40, 150" + }, + { + "hint": "We need some text in that sign. Move the cursor to place the text - **type** `moveTo 250, 270`", + "solution": "moveTo 250, 270" + }, + { + "hint": "Next we need to choose our font. There are lots to choose from, like `Bariol`, `Georgia`, `Comic Sans MS`, `cursive`, and `Courier`.\n\nPick your favorite and type it in (inside of quote marks) like this - `font 'Bariol', 70`.", + "solution": "font 'Bariol', 70" + }, + { + "hint": "Now write some silly text - **type** `text 'My Camp'`", + "solution": "text 'My Camp'" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/campfire.json b/lib/challenges/worlds/summercamp/campfire.json new file mode 100644 index 000000000..3b311f9ec --- /dev/null +++ b/lib/challenges/worlds/summercamp/campfire.json @@ -0,0 +1,90 @@ +{ + "id": "campfire", + "title": "Campfire", + "short_title": "Campfire", + "description": "Time to get a fire going. In the wilderness, this very well might be your only source of light, and heat. Burning at over a thousand degrees fahrenheit, this will be sure to keep you warm, and could keep you fed too! Meats, vegetables, and marshmallows can all be cooked over the open flame with the help of sharpened sticks. \nMost fires are built with wood logs, but yours is going to be built with code and a “loop.” As your fire grows upwards its colour changes into a deep shade of orange as the oxygen it is burning starts to cools down. Your code will produce hundreds of colours with just a few lines of code.", + "icon_class": "challenge_fire", + "completion_text": "Try adding a starry sky, more flames, a ring of rocks to make it safer or even marshmallows!", + "difficulty": 2, + "cover": "summercamp/day_6.png", + "startAt": 5, + "summerCamp": true, + "rewards": { + "wallpaper": 1 + }, + "steps": [ + { + "hint": "It's a dark night. Set the `background` color to `darkblue`", + "solution": "background darkblue" + }, + { + "hint": "Set the stroke to 0, to avoid drawing lines - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Move the cursor to place the floor - **type** `moveTo 0, 300`", + "solution": "moveTo 0, 300" + }, + { + "hint": "Set the `color` to `darkgreen`", + "solution": "color darkgreen" + }, + { + "hint": "Draw the grass using a rectangle - **type** `rectangle 500, 200`", + "solution": "rectangle 500, 200" + }, + { + "hint": "Move the cursor to place the light casted by the fire - **type** `moveTo 250, 400`", + "solution": "moveTo 250, 400" + }, + { + "hint": "Set the `color` to `green`", + "solution": "color green" + }, + { + "hint": "Draw the light using an ellipse - **type** `ellipse 200, 30`", + "solution": "ellipse 200, 30" + }, + { + "hint": "We need some wood to feed the fire - **type** `moveTo 110, 390`", + "solution": "moveTo 110, 390" + }, + { + "hint": "Set the stroke for the logs - **type** `stroke brown, 25`", + "solution": "stroke brown, 25" + }, + { + "hint": "Good, now draw the first log - **type** `line 270, 30`", + "solution": "line 270, 30" + }, + { + "hint": "Move the cursor to place the second log - **type** `moveTo 420, 390`", + "solution": "moveTo 420, 390" + }, + { + "hint": "Draw the second log - **type** `line -290, 30`", + "solution": "line -290, 30" + }, + { + "hint": "Excellent! We are now ready to light the fire - **type** `moveTo 180, 400`", + "solution": "moveTo 180, 400" + }, + { + "hint": "Our fire will be formed by 150 lines! - **type** `for i in [ 1 .. 150 ]`", + "solution": "for i in [ 1 .. 150 ]" + }, + { + "hint": "Set the thickness and color of each line - **type** `stroke 'rgba(255, ' + (i + 50) + ', 0, 0.3)', 10`", + "solution": " stroke 'rgba(255, ' + (i + 50) + ', 0, 0.3)', 10", + "validate": "__^ stroke 'rgba*\\(255, ' \\+ \\(i *\\+ *50\\) *\\+ *', *0, *0.3\\)', 10" + }, + { + "hint": "Now draw the line - **type** `line 150 - i`", + "solution": " line 150 - i" + }, + { + "hint": "Move the cursor for next line - **type** `move 0.5, -2`", + "solution": " move 0.5, -2" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/campsite.json b/lib/challenges/worlds/summercamp/campsite.json new file mode 100644 index 000000000..abce584fa --- /dev/null +++ b/lib/challenges/worlds/summercamp/campsite.json @@ -0,0 +1,97 @@ +{ + "id": "campsite", + "title": "Draw your Campsite", + "short_title": "Campsite", + "description": "Time to find a clearing to set up camp. The most important thing to look for when searching for an optimal campsite is flat ground. If possible, keep your campsite close to a water source. This will make cooking and cleanup much easier. Finally, make sure to be surrounded by trees, as they are a great source of kindling and will provide protection from the sun. \nYour friends will want to see what your campsite looks like, so once you have one, draw it! You can use code to set the scene for where you are staying for the next two weeks.", + "icon_class": "challenge_location", + "completion_text": "The camp site is looking great! Try adding more trees, flowers, rocks... perhaps a fence as well?", + "cover": "summercamp/day_2.png", + "difficulty": 1, + "startAt": 1, + "summerCamp": true, + "rewards": { + "outfit": 1 + }, + "steps": [ + { + "hint": "Today is a beautiful day - **type** `background blue`", + "solution": "background blue" + }, + { + "hint": "Set the stroke to 0, to avoid drawing lines - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Move the cursor where the sun will be - **type** `moveTo 400, 50`", + "solution": "moveTo 400, 50" + }, + { + "hint": "Set the `color` of the sun `yellow`", + "solution": "color yellow" + }, + { + "hint": "Draw the sun with a circle - **type** `circle 40`", + "solution": "circle 40" + }, + { + "hint": "There is one cloud in the horizon. - **type** `moveTo 440, 80`", + "solution": "moveTo 440, 80" + }, + { + "hint": "Set the `color` of the cloud `white`", + "solution": "color white" + }, + { + "hint": "Draw the cloud with an ellipse - **type** `ellipse 60, 20`", + "solution": "ellipse 60, 20" + }, + { + "hint": "The lake has a beautiful `color` `aquamarine` this morning", + "solution": "color aquamarine" + }, + { + "hint": "Move the cursor where the lake is - **type** `moveTo 0, 190`", + "solution": "moveTo 0, 190" + }, + { + "hint": "Draw the lake using a simple rectangle - **type** `rectangle 500, 310`", + "solution": "rectangle 500, 310" + }, + { + "hint": "Set the `color` to `green` for the grass", + "solution": "color green" + }, + { + "hint": "Move the cursor before drawing the grass - **type** `moveTo 250, 700`", + "solution": "moveTo 250, 700" + }, + { + "hint": "Draw the camp site with a circle - **type** `circle 500`", + "solution": "circle 500" + }, + { + "hint": "Looking a bit empty, let's draw a tree - **type** `moveTo 120, 300`", + "solution": "moveTo 120, 300" + }, + { + "hint": "Set the `color` of the trunk to `brown`", + "solution": "color brown" + }, + { + "hint": "Draw the trunk of the tree using a rectangle - **type** `rectangle 15, 100`", + "solution": "rectangle 15, 100" + }, + { + "hint": "Now place the foliage of the tree - **type** `move 8, -120`", + "solution": "move 8, -120" + }, + { + "hint": "Set the `color` to `darkgreen`", + "solution": "color darkgreen" + }, + { + "hint": "Draw the foliage with a triangle using `polygon` - **type** `polygon -40, 160, 40, 160`", + "solution": "polygon -40, 160, 40, 160" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/cinema.json b/lib/challenges/worlds/summercamp/cinema.json new file mode 100644 index 000000000..4393cb316 --- /dev/null +++ b/lib/challenges/worlds/summercamp/cinema.json @@ -0,0 +1,117 @@ +{ + "id": "cinema", + "title": "Relax watching a movie", + "short_title": "Cinema", + "icon_class": "challenge_cinema", + "description": "After playing a short movie presentation by the Skladanowsky brothers in 1895 which consisted of numerous very short 6-second films accompanied by a specially composed piece of music, the Berlin Wintergarten theatre in Mitte, Berlin, became known as the first ever movie theatre. Unfortunately the theatre was destroyed by bombs in 1944, during the Second World War.", + "cover": "summercamp/day_14.png", + "completion_text": "What good is a cinema without a movie playing? Go ahead and try drawing a scene from your favourite movie up on the big screen, and maybe a few friends to watch the film with you! Don't forget the popcorn!", + "difficulty": 2, + "startAt": 0, + "summerCamp": true, + "rewards": { + "wallpaper": 1 + }, + "steps": [ + { + "hint": "It's dark in the cinema. Set the `background` color to `black`", + "solution": "background black" + }, + { + "hint": "Set the `stroke` to `0` in a new line", + "solution": "stroke 0" + }, + { + "hint": "First, move the cursor to place the floor - **type** `moveTo 0, 300`", + "solution": "moveTo 0, 300" + }, + { + "hint": "Set the floor `color` to `gray`", + "solution": "color gray" + }, + { + "hint": "Draw the floor with a rectangle - **type** `rectangle 500, 200`", + "solution": "rectangle 500, 200" + }, + { + "hint": "Now, move the cursor to place the screen - **type** `moveTo 50, 20`", + "solution": "moveTo 50, 20" + }, + { + "hint": "Set the screen `color` to `white`", + "solution": "color white" + }, + { + "hint": "The screen is a perfect `rectangle` of size `400` by `250`", + "solution": "rectangle 400, 250" + }, + { + "hint": "Amazing! This theatre needs a curtain - **type** `moveTo 0`", + "solution": "moveTo 0" + }, + { + "hint": "Set the curtain `color` to `red`", + "solution": "color red" + }, + { + "hint": "Draw a vertical curtain as a `rectangle` of size `30` by `330`", + "solution": "rectangle 30, 330" + }, + { + "hint": "Now draw an horizontal curtain size `500` by `10` in the same way", + "solution": "rectangle 500, 10" + }, + { + "hint": "Looking great! Place the curtain on the right - **type** `move 470`", + "solution": "move 470" + }, + { + "hint": "Draw a vertical curtain, same as the one the left", + "solution": "rectangle 30, 330" + }, + { + "hint": "This theatre needs some seats for our audience - **type** `moveTo 0, 360`", + "solution": "moveTo 0, 360" + }, + { + "hint": "Set the outline of the seats with a `stroke` of `orangered` color and size `10`.", + "solution": "stroke orangered, 10" + }, + { + "hint": "Let's draw 3 rows and 6 columns of seats with a loop - **type** `for x in [ 1 .. 3 ]`", + "solution": "for x in [ 1 .. 3 ]" + }, + { + "hint": "Set the `color` of the seats to `red`", + "solution": " color red" + }, + { + "hint": "Now draw a `rectangle` for the seats, size `500` by `40`", + "solution": " rectangle 500, 40" + }, + { + "hint": "Move the cursor down to place the back of the seats - **type** `move 0, 50`", + "solution": " move 0, 50" + }, + { + "hint": "Inside the loop, open a second loop for the back of the seats - **type** `for y in [ 1 .. 6 ]`", + "solution": " for y in [ 1 .. 6 ]" + }, + { + "hint": "Set the `color` of the backseat to `darkred`", + "solution": " color darkred" + }, + { + "hint": "Brilliant! Almost there. Now draw the back of the seat with an arc - **type** `arc 60, 0, 1`", + "solution": " arc 60, 0, 1" + }, + { + "hint": "Now separate the seats `130` pixels to the right", + "solution": " move 130" + }, + { + "hint": "Last, make sure new rows are positioned correctly - Press **Enter**, then **Backspace** and **type** `move -800` inside the **first** loop", + "solution": " move -800" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/compass.json b/lib/challenges/worlds/summercamp/compass.json new file mode 100644 index 000000000..4732d0453 --- /dev/null +++ b/lib/challenges/worlds/summercamp/compass.json @@ -0,0 +1,93 @@ +{ + "id": "compass", + "title": "A compass is an essential tool", + "short_title": "Compass", + "icon_class": "challenge_compass", + "description": "Essentially a compass is a magnet, generally a magnetized needle. Since opposites attract the southern pole of the needle is attracted to the Earth's natural magnetic north pole. Did you know that you can create your own simply with a paperclip, cork and a magnet?", + "cover": "summercamp/day_9.png", + "completion_text": "Now try adding the rest of the 'compass rose' components: the other cardinal directions (E, S, W and even NE, NW, SE and SW). Why not a hand holding it?", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": { + "wallpaper": 1 + }, + "steps": [ + { + "hint": "Select `lightgray` for the `background`", + "solution": "background lightgray" + }, + { + "hint": "In a new line, set the outline of your compass with a `stroke` of `gold` color and size `20`", + "solution": "stroke gold, 20" + }, + { + "hint": "Set the `color` of the compass to `gray`", + "solution": "color gray" + }, + { + "hint": "Your compass is a `circle` with size `110`", + "solution": "circle 110" + }, + { + "hint": "Set the `color` to `darkgray` for the second half of the compass", + "solution": "color darkgray" + }, + { + "hint": "Set the `stroke` back to `0`", + "solution": "stroke 0" + }, + { + "hint": "Draw an arc that matches the top half of the compass - **type** `arc 105, 2, 1`", + "solution": "arc 105, 2, 1" + }, + { + "hint": "We need to mark the north somehow - in a new line **type** `moveTo 250, 175`", + "solution": "moveTo 250, 175" + }, + { + "hint": "Set the `color` to `gold`", + "solution": "color gold" + }, + { + "hint": "Set the `font` to `'cursive'` and size `25`", + "solution": "font 'cursive', 25" + }, + { + "hint": "Write an N to represent north - **type** `text 'N'`", + "solution": "text 'N'" + }, + { + "hint": "Now we need a needle with 2 sides. Set the `color` to `red` for the first side", + "solution": "color red" + }, + { + "hint": "Move the cursor to position the needle **type** `moveTo 230, 250`", + "solution": "moveTo 230, 250" + }, + { + "hint": "Draw a triangle with a polygon - **type** `polygon 20, -90, 40, 0`", + "solution": "polygon 20, -90, 40, 0" + }, + { + "hint": "Excellent! Set the `color` to `white` for the second side of the needle", + "solution": "color white" + }, + { + "hint": "Draw the second part - **type** `polygon 20, 90, 40, 0`", + "solution": "polygon 20, 90, 40, 0" + }, + { + "hint": "Finish it with one last detail. Set the `color` to `gold`", + "solution": "color gold" + }, + { + "hint": "Move the cursor to the center of the compass **type** `move 20`", + "solution": "move 20" + }, + { + "hint": "Draw a `circle` of size `20`", + "solution": "circle 20" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/fireworks.json b/lib/challenges/worlds/summercamp/fireworks.json new file mode 100644 index 000000000..ae830ff5e --- /dev/null +++ b/lib/challenges/worlds/summercamp/fireworks.json @@ -0,0 +1,50 @@ +{ + "id": "fireworks", + "title": "Fireworks", + "short_title": "Fireworks", + "icon_class": "challenge_fireworks", + "description": "Camp is almost all wrapped up, and to celebrate we have fireworks! Fireworks have been around for centuries and are believed to have been invented by the Chinese. We are almost ready to put on the show, but need a little bit of help designing the fireworks. Can you give it a shot?", + "cover": "summercamp/day_21.png", + "completion_text": "Well done! You made a function that can draw fireworks! Can you improve upon it? Draw them all over the screen, add in other creations and share it!", + "difficulty": 3, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "The sun is down and the moon is new, let’s make the sky dark with `background black`", + "solution": "background black" + }, + { + "hint": "Lets set the `stroke` to `red` for our firework", + "solution": "stroke red" + }, + { + "hint": "We want to draw 60 lines radiating outward, so let’s use a for loop `for i in [0 ... 60]`", + "solution": "for i in [0 ... 60]" + }, + { + "hint": "All of the lines in our firework should have different lengths! So for each line radiating out, let’s set its length with `length = random 1, 200`.", + "solution": " length = random 1, 200" + }, + { + "hint": "For each loop, we are drawing a new line radiating out. So for every time we loop, the angle of the line should change. This uses some advanced math, but don’t fear. Just **type** `angle = (360 / 60 * i) * (Math.PI / 180)`.", + "solution": " angle = (360 / 60 * i) * (Math.PI / 180)", + "validate": "__^ angle *= *\\(360 */ *60 \\* i\\) *\\* *\\(Math[.]PI */ *180\\) *$" + }, + { + "hint": "Using this new angle and the random length let’s calculate where the x coordinate for the end of the radiating line should be. **Type** `dx = 250 + Math.sin(angle) * length`.", + "solution": " dx = 250 + Math.sin(angle) * length", + "validate": "__^ dx *= *250 *\\+ *Math.sin\\(angle\\) *\\* *length" + }, + { + "hint": "Now let’s calculate the y coordinate for the end of the radiating line. **Type** `dy = 250 + Math.cos(angle) * length`.", + "solution": " dy = 250 + Math.cos(angle) * length", + "validate": "__^ dy *= *250 *\\+ *Math.cos\\(angle\\) *\\* *length" + }, + { + "hint": "Finally, with all the coordinates set we are ready to draw the line. **Type** `lineTo dx, dy` ", + "solution": " lineTo dx, dy" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/fishing.json b/lib/challenges/worlds/summercamp/fishing.json new file mode 100644 index 000000000..3b85db20f --- /dev/null +++ b/lib/challenges/worlds/summercamp/fishing.json @@ -0,0 +1,110 @@ +{ + "id": "fishing", + "title": "Fishing", + "short_title": "Fishing", + "icon_class": "challenge_fishing", + "description": "It's time to go fishing! Inside the camp's lake there are trout, catfish, and perch swimming around looking for a snack. Grab your fishing pole and some worms, and head over to the water for todays adventure. ", + "cover": "summercamp/day_17.png", + "completion_text": "Great job! Every time you press a key the image redraws, so try holding down the space bar and watch the waves ripple. Also try adding a fish or making the bobber disappear.", + "difficulty": 2, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "It's a sunny day! Set the background color to lightblue - **type** `background lightblue`", + "solution": "background lightblue" + }, + { + "hint": "We will start by drawing the waves. We want to draw without a fill - set the `color` to be `null`.", + "solution": "color null" + }, + { + "hint": "Our waves will be dark blue - **type** `stroke darkblue, 8`", + "solution": "stroke darkblue, 8" + }, + { + "hint": "Move to the place on the left where we will start - **type** `moveTo 10, 250`", + "solution": "moveTo 10, 250" + }, + { + "hint": "We are going to draw waves on the surface by creating 25 waves inside of a loop - **type** `for i in [1 .. 25]`", + "solution": "for i in [1 .. 25]" + }, + { + "hint": "Create a wave out of an arc with a radius of 20 pixels - **type** `arc 20, 0.8, 0.2`", + "solution": " arc 20, 0.8, 0.2" + }, + { + "hint": "Move each wave a random amount to the left - **type** `move (random 24, 32)`", + "solution": " move (random 24, 32)", + "validate": "__ move \\(random 24, +32\\)" + }, + { + "hint": "Press ENTER and then backspace to get rid of the indent. This exits the loop.\n\nNext move to the place where we will draw the rest of the water - **type** `moveTo 0, 270`.", + "solution": "moveTo 0, 270" + }, + { + "hint": "Set the `color` of the water to be the same as the wave", + "solution": "color darkblue" + }, + { + "hint": "Draw a big `rectangle` that is `500` pixels high and `250` pixels wide for the water", + "solution": "rectangle 500, 250" + }, + { + "hint": "Let's get ready to add some little blue waves - **type** `stroke blue, 2`", + "solution": "stroke blue, 2" + }, + { + "hint": "We are going to draw waves 100 times - **type** `for i in [1 .. 100]`", + "solution": "for i in [1 .. 100]" + }, + { + "hint": "Move each wave to a random place on the surface of the water - **type** `moveTo (random 0, 500), (random 260, 500)`", + "solution": " moveTo (random 0, 500), (random 260, 500)", + "validate": "__ moveTo ?\\( *random +0, +500 *\\), +\\( *random +260, +500 *\\)" + }, + { + "hint": "Now draw each ripple as a little arc - **type** `arc 10, 0.8, 0.2`", + "solution": " arc 10, 0.8, 0.2" + }, + { + "hint": "Brilliant! When you press the spacebar, a new set of random numbers is selected and the ripples move!\n\nTo catch some fish we need a brown fishing pole - Exit the loop and **type** `stroke brown, 10`.", + "solution": "stroke brown, 10" + }, + { + "hint": "Now move to the place where we will draw the end of the pole - **type** `moveTo 300, 100`", + "solution": "moveTo 300, 100" + }, + { + "hint": "Draw a `line` that is `150` pixels wide and `400` pixels tall", + "solution": "line 150, 400" + }, + { + "hint": "Next we need some fishing line - **type** `stroke lightgray, 1`", + "solution": "stroke lightgray, 1" + }, + { + "hint": "Draw a line that goes to the left and down - **type** `line -100, 200`", + "solution": "line -100, 200" + }, + { + "hint": "To see if a fish is biting we are going to draw a cork. Move to the end of the fishing line - **type** `move -100, (random 197, 202)`", + "solution": "move -100, (random 197, 202)", + "valudate": "__move -100, \\(random 197, 202\\)" + }, + { + "hint": "The cork doesn't have an outline - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Set the cork's `color` to `red`", + "solution": "color red" + }, + { + "hint": "Now draw the cork floating in the water - `arc 8, 0, 1`", + "solution": "arc 8, 0, 1" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/flag.json b/lib/challenges/worlds/summercamp/flag.json new file mode 100644 index 000000000..ea40cbe69 --- /dev/null +++ b/lib/challenges/worlds/summercamp/flag.json @@ -0,0 +1,77 @@ +{ + "id": "flag", + "title": "Create your Flag", + "short_title": "Flag", + "description": "Time to show your true colors. Your campsite is shaping up, and as the campsite’s leader you need to make a flag. We’ve got you started with the basics for a flag and flagpole, but it is up to you to to make it your own. \nYou can look to other flags for inspiration. Countries like France, Nigeria, Sweden, and Switzerland all have very simple color and shape designs, while Spain, Brazil, Kenya, and Saudi Arabia all feature complex designs. When you are done, share your flag to lay claim to your little bit of land!", + "icon_class": "challenge_flag", + "completion_text": "You have a white canvas in front of you, use it wisely. Create the most amazing flag the world has ever seen!", + "cover": "summercamp/day_4.png", + "difficulty": 1, + "startAt": 3, + "summerCamp": true, + "rewards": { + "outfit": 1 + }, + "steps": [ + { + "hint": "Draw the sky where the flag will flutter - **type** `background blue`", + "solution": "background blue" + }, + { + "hint": "Set the stroke to 0, to avoid drawing lines - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Let's move the cursor to place our flagpole in the correct place - **type** `moveTo 100, 100`", + "solution": "moveTo 100, 100" + }, + { + "hint": "Set the `color` of the flagpole to `darkgray`", + "solution": "color darkgray" + }, + { + "hint": "Draw a long, thin pole with a rectangle - **type** `rectangle 10, 400`", + "solution": "rectangle 10, 400" + }, + { + "hint": "Move the cursor to place a ball on top-centre of the flagpole - **type** `move 5`", + "solution": "move 5" + }, + { + "hint": "Set the `color` of the ornament to `gold`", + "solution": "color gold" + }, + { + "hint": "Draw a circle with a size of 8 - in a new line **type** `circle 8`", + "solution": "circle 8" + }, + { + "hint": "Now move the cursor to start drawing our flag - **type** `moveTo 115, 123`", + "solution": "moveTo 115, 123" + }, + { + "hint": "Set the `color` of the flag to `white`", + "solution": "color white" + }, + { + "hint": "Draw the flag with a `rectangle` of size `261` and `171`", + "solution": "rectangle 261, 171" + }, + { + "hint": "That flag needs something to hold of to - **type** `moveTo 100, 140`", + "solution": "moveTo 100, 140" + }, + { + "hint": "Set the `color` of the holder to `brown`", + "solution": "color brown" + }, + { + "hint": "Draw the holder with a `20` by `5` `rectangle`", + "solution": "rectangle 20, 5" + }, + { + "hint": "Now is your turn! Draw an amazing pattern on it - **type** `moveTo 120, 125`", + "solution": "moveTo 120, 125" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/flashlight.json b/lib/challenges/worlds/summercamp/flashlight.json new file mode 100644 index 000000000..a5a6781ce --- /dev/null +++ b/lib/challenges/worlds/summercamp/flashlight.json @@ -0,0 +1,93 @@ +{ + "id": "flashlight", + "title": "Lights on!", + "short_title": "Flashlight", + "icon_class": "challenge_flashlight", + "description": "Torches started life as ignited sticks; their flames would light the way for explorers and settlers. With the advent of electricity, and the invention of the dry cell battery in 1887, the road was paved to use incandescent bulbs as a replacement. While the technology inside flashlights has evolved, they are still as useful as ever. Meanwhile, the original torch has found a second coming in circus acts where they are thrown skywards in miraculous fashion.", + "cover": "summercamp/day_12.png", + "completion_text": "You are an adventurer in the dark with your torch. What might you have uncovered as its light passes over the room? Try drawing that fox that you’ve unearthed or that owl hooting in the trees.", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": { + "outfit": 1 + }, + "steps": [ + { + "hint": "It's getting dark outside! Set the `background` color to `darkblue`", + "solution": "background darkblue" + }, + { + "hint": "Set the `stroke` to `0`, we won't need it for this challenge", + "solution": "stroke 0" + }, + { + "hint": "Move the cursor to place our flashlight - **type** `moveTo 200, 200`", + "solution": "moveTo 200, 200" + }, + { + "hint": "Set the `color` of the flashlight to `dimgray`", + "solution": "color dimgray" + }, + { + "hint": "Draw the head of the flashlight with a rectangle - **type** `rectangle 100, 50`", + "solution": "rectangle 100, 50" + }, + { + "hint": "Now move the cursor down to draw the neck - **type** `move 0, 50`", + "solution": "move 0, 50" + }, + { + "hint": "Set the `color` of this piece to `gray`", + "solution": "color gray" + }, + { + "hint": "Draw a polygon - **type** `polygon 20, 40, 80, 40, 100, 0`", + "solution": "polygon 20, 40, 80, 40, 100, 0" + }, + { + "hint": "Exciting! Now move the cursor down to draw the body - **type** `move 20, 40`", + "solution": "move 20, 40" + }, + { + "hint": "Set the `color` of the body to `darkgray`", + "solution": "color darkgray" + }, + { + "hint": "Draw the body of the flashlight with a `rectangle` `60` by `200`", + "solution": "rectangle 60, 200" + }, + { + "hint": "The only thing missing now is a ON/OFF button. Set the `color` to `dimgray`", + "solution": "color dimgray" + }, + { + "hint": "Now move the cursor down to place the button - **type** `move 30, 50`", + "solution": "move 30, 50" + }, + { + "hint": "Draw an ellipse where the button will be located - **type** `ellipse 10, 30`", + "solution": "ellipse 10, 30" + }, + { + "hint": "Set the `color` of the button to `red`", + "solution": "color red" + }, + { + "hint": "Draw the button with an ellipse - **type** `ellipse 10, 20`", + "solution": "ellipse 10, 20" + }, + { + "hint": "You have turned on the light! Set the color of the beam - **type** `color \"rgba(255, 255, 0, 0.8)\"`", + "solution": "color \"rgba(255, 255, 0, 0.8)\"" + }, + { + "hint": "Place the beam in front of the flashlight - **type** `move -50, -140`", + "solution": "move -50, -140" + }, + { + "hint": "Draw the beam of light with a polygon - **type** `polygon 100, 0, 180, -300, -80, -300`", + "solution": "polygon 100, 0, 180, -300, -80, -300" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/foraging.json b/lib/challenges/worlds/summercamp/foraging.json new file mode 100644 index 000000000..2d2add721 --- /dev/null +++ b/lib/challenges/worlds/summercamp/foraging.json @@ -0,0 +1,57 @@ +{ + "id": "foraging", + "title": "Foraging", + "short_title": "Foraging", + "icon_class": "challenge_foraging", + "description": "The wild is full of plants and fauna to eat. From stinging nettles, to mushrooms, and a multitude of berries, any meal can be improved with naturally growing foods. Berries are common in many parts of the world, and at Camp Kano they run wild even though they are hard to find. You might need to use your coding skills to find them.", + "cover": "summercamp/day_19.png", + "completion_text": "But wait! Where are the berries you are meant to be foraging for? Use `color red`, `moveTo`, and `square 25` to add some extra berries to the scene!", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": { + "wallpaper": 1 + }, + "steps": [ + { + "hint": "Set `stroke` to `0`", + "solution": "stroke 0" + }, + { + "hint": "It’s a bright sunny day! Set `background` to `blue`.", + "solution": "background blue" + }, + { + "hint": "Our foraging scene needs a grass field to start with. Set our drawing color to `green`.", + "solution": "color green" + }, + { + "hint": "We want our grass on the bottom half of the screen, so let’s move into position with `moveTo 0, 300`", + "solution": "moveTo 0, 300" + }, + { + "hint": "The grass is a nice big `rectangle` of size `500, 200`", + "solution": "rectangle 500, 200" + }, + { + "hint": "Now let’s add in a nice boxy tree to our foraging scene. Begin by moving into position at exactly `50, 100`.", + "solution": "moveTo 50, 100" + }, + { + "hint": "Our leaves are drawn with `square 150`.", + "solution": "square 150" + }, + { + "hint": "Next we need to draw the trunk. Move the cursor with `moveTo 100, 250`.", + "solution": "moveTo 100, 250" + }, + { + "hint": "Our wood has a nice `darkbrown` color. Set that as the drawing color.", + "solution": "color darkbrown" + }, + { + "hint": "The trunk is a `rectangle` with a width of `40` and a height of `150`", + "solution": "rectangle 40, 150" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/ghost.json b/lib/challenges/worlds/summercamp/ghost.json new file mode 100644 index 000000000..7e6b445b3 --- /dev/null +++ b/lib/challenges/worlds/summercamp/ghost.json @@ -0,0 +1,91 @@ +{ + "id": "ghost", + "title": "Ghost gathering", + "short_title": "Ghost", + "description": "Boo! As night falls, the spirits come out to play. A recent poll reported 87% of Chinese office workers believed in ghosts, and according to another report, 25% of Britons say they have seen a ghost. It’s getting dark, so it is hard to see, but we think we found a ghost! Maybe you can find out if it is friendly or not with your creative coding powers.", + "icon_class": "challenge_ghost", + "completion_text": "Spooky! Can you make the ghost scarier? Maybe if it could say \"Boo!\"...", + "difficulty": 2, + "cover": "summercamp/day_7.png", + "startAt": 6, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "Select a spooky color for the background - **type** `background darkpurple`", + "solution": "background darkpurple" + }, + { + "hint": "Set the `stroke` to `0`, to avoid drawing lines", + "solution": "stroke 0" + }, + { + "hint": "Set the `color` to `white` for the ghost", + "solution": "color white" + }, + { + "hint": "Now draw an ellipse for the ghost's body - **type** `ellipse 120, 140`", + "solution": "ellipse 120, 140" + }, + { + "hint": "Set the `color` to `black` for the eyes", + "solution": "color black" + }, + { + "hint": "Move the cursor to draw the first eye - **type** `move -40, -50`", + "solution": "move -40, -50" + }, + { + "hint": "Draw the eye with an ellipse - **type** `ellipse 20, 30`", + "solution": "ellipse 20, 30" + }, + { + "hint": "Set the `color` to `lightgray`", + "solution": "color lightgray" + }, + { + "hint": "Now draw a `circle` with a size of `5`", + "solution": "circle 5" + }, + { + "hint": "Looking good! Now move the cursor to the right for the second eye - **type** `move 30`", + "solution": "move 30" + }, + { + "hint": "Set the `color` back to `black` for the second eye", + "solution": "color black" + }, + { + "hint": "Draw the second eye with an ellipse - **type** `ellipse 20, 30`", + "solution": "ellipse 20, 30" + }, + { + "hint": "Set the `color` to `lightgray`", + "solution": "color lightgray" + }, + { + "hint": "Draw a `circle` with size `5`", + "solution": "circle 5" + }, + { + "hint": "Almost there! Set the `color` to `white`", + "solution": "color white" + }, + { + "hint": "Now move the cursor to the bottom - **type** `move -80, 150`", + "solution": "move -80, 150" + }, + { + "hint": "Let's open a loop - **type** `for i in [ 1 .. 5 ]`", + "solution": "for i in [ 1 .. 5 ]" + }, + { + "hint": "Draw a `circle` with a size of `45`", + "solution": " circle 45" + }, + { + "hint": "And move the cursor slightly to the right - **type** `move 45`", + "solution": " move 45" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/guitar.json b/lib/challenges/worlds/summercamp/guitar.json new file mode 100644 index 000000000..c6fa84b89 --- /dev/null +++ b/lib/challenges/worlds/summercamp/guitar.json @@ -0,0 +1,128 @@ +{ + "id": "guitar", + "title": "Play a nice sweet song", + "short_title": "Guitar", + "icon_class": "challenge_guitar", + "description": "Did you know the oldest surviving guitar-like instrument is actually around 3,500 years old? It is a 3-string instrument with a plectrum suspended from the neck, it was owned by an Egyptian singer called Har-Mose and was buried alongside him - You can still see the instrument on display at the Archaeological Museum in Cairo, Egypt.", + "cover": "summercamp/day_13.png", + "completion_text": "What good is a guitar if we don't have a campfire to sing songs around? Try drawing a nice big campfire with some marshmallows for toasting! Maybe a big moon on the horizon too? Be wild, be creative!", + "difficulty": 2, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "It's a very nice night! Set the background color to darkblue - **type** `background darkblue`", + "solution": "background darkblue" + }, + { + "hint": "Set the `stroke` to `0` in a new line.", + "solution": "stroke 0" + }, + { + "hint": "Set your guitar `color` to `lightbrown`.", + "solution": "color lightbrown" + }, + { + "hint": "Move the cursor to place the guitar - **type** `moveTo 120, 250`", + "solution": "moveTo 120, 250" + }, + { + "hint": "Draw the first part of the body with an ellipse - **type** `ellipse 60, 65`", + "solution": "ellipse 60, 65" + }, + { + "hint": "Now for the second part of the body, `move` the cursor `70` pixels to the right.", + "solution": "move 70" + }, + { + "hint": "Draw a `circle` of size `55` for the second part of the guitar.", + "solution": "circle 55" + }, + { + "hint": "Every guitar needs a neck, move the cursor to place it - **type** `move 20, -10`", + "solution": "move 20, -10" + }, + { + "hint": "Set the neck `color` to `brown`.", + "solution": "color brown" + }, + { + "hint": "Draw the neck of the guitar with a rectangle - **type** `rectangle 150, 20`", + "solution": "rectangle 150, 20" + }, + { + "hint": "Now place the headstock - **type** `move 150, -5`", + "solution": "move 150, -5" + }, + { + "hint": "Draw the headstock with a `rectangle` of size `40` by `30`.", + "solution": "rectangle 40, 30" + }, + { + "hint": "Time to place the soundhole in the body - **type** `move -170, 15`", + "solution": "move -170, 15" + }, + { + "hint": "Set the outline of the soundhole with a `stroke` of `brown` color and size `10`.", + "solution": "stroke brown, 10" + }, + { + "hint": "Set the soundhole `color` to `black`.", + "solution": "color black" + }, + { + "hint": "Draw the hole with a `circle` of size `20`.", + "solution": "circle 20" + }, + { + "hint": "The bridge is the piece that fixes the strings to the body. Let's place it - **type** `move -50, -15`", + "solution": "move -50, -15" + }, + { + "hint": "Set the outline of the bridge with a `stroke` of `red` color and size `10`.", + "solution": "stroke red, 10" + }, + { + "hint": "Draw the bridge with a `rectangle` of size `2` by `35`.", + "solution": "rectangle 2, 35" + }, + { + "hint": "That's a good looking guitar. Time for the strings - **type** `move 0, 9`", + "solution": "move 0, 9" + }, + { + "hint": "Set the properties of the strings with a `stroke` of `white` color and size `1`.", + "solution": "stroke white, 1" + }, + { + "hint": "Let's draw the 4 strings with a loop - **type** `for i in [ 1 .. 4 ]`", + "solution": "for i in [ 1 .. 4 ]" + }, + { + "hint": "Draw a string using a line - **type** `line 250`", + "solution": " line 250" + }, + { + "hint": "And move the cursor slightly down to place the next ones - **type** `move 0, 4`", + "solution": " move 0, 4" + }, + { + "hint": "Press **Enter** and **Backspace** to set the `color` to `white` outside the loop", + "solution": "color white" + }, + { + "hint": "You are ready to play music! Start a new loop - **type** `for i in [ 1 .. 10 ]`", + "solution": "for i in [ 1 .. 10 ]" + }, + { + "hint": "Select a random location - **type** `moveTo (random 200, 400), (random 100, 400)`", + "solution": " moveTo (random 200, 400), (random 100, 400)", + "validate": "__ moveTo ?\\( *random +200, +400 *\\), +\\( *random +100, +400 *\\)" + }, + { + "hint": "Come on, play some notes! - **copy and paste** `text '♪'`", + "solution": " text '♪'" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/hiking.json b/lib/challenges/worlds/summercamp/hiking.json new file mode 100644 index 000000000..44c30e2ec --- /dev/null +++ b/lib/challenges/worlds/summercamp/hiking.json @@ -0,0 +1,112 @@ +{ + "id": "hiking", + "title": "Hiking Poster", + "short_title": "Hiking", + "icon_class": "challenge_hiking", + "description": "The beautiful Camp Kano mountain range is known for its deep blue colour. The ten mountains in the range always seem to be changing position though, which makes for a dangerous climb. Should campers attempt to climb it? Who knows! But management wants an advertising posts so get to it.", + "cover": "summercamp/day_18.png", + "completion_text": "Well done, you’ve made a beautiful poster! Now play around with the random values and the text. What else is the poster missing?", + "difficulty": 1, + "startAt": 0, + "summerCamp": true, + "rewards": null, + "steps": [ + { + "hint": "Up above the clouds the sky is blue, **type** `background blue`", + "solution": "background blue" + }, + { + "hint": "Camp Kano’s mountains are a beautiful shade of dark blue. Set the drawing colour with `color darkblue`.", + "solution": "color darkblue" + }, + { + "hint": "The mountains also have a nice thick border, give them `stroke white, 10`", + "solution": "stroke white, 10" + }, + { + "hint": "Lets draw the ten mountains of Camp Kano with a loop! This will be much faster than drawing them individually. **Type** `for i in [ 0 ... 10 ]` to open the loop.", + "solution": "for i in [ 0 ... 10 ]" + }, + { + "hint": "For every time the loop runs, we want a mountain’s peak to be drawn randomly across the screen. Let’s select an x value with `x = random 0, 500`", + "solution": " x = random 0, 500" + }, + { + "hint": "However, for the y value, we only want each mountain’s peak to be drawn on the top part of the screen. **Type** `y = random 0, 200`", + "solution": " y = random 0, 200" + }, + { + "hint": "Now with our x and y values set we can move the cursor to them. **Type** `moveTo x, y`", + "solution": " moveTo x, y" + }, + { + "hint": "Draw a mountain for every loop with the polygon function. **Type** `polygon 400, 500, -400, 500`", + "solution": " polygon 400, 500, -400, 500" + }, + { + "hint": "First, get out of the previous for loop’s indent by pressing `BACKSPACE`. Now let’s draw some clouds with `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Clouds are made of small droplets of water vapor, which is see-through! To get a see-through color we use the `opacity` function. **Type** `color (opacity white, .1)`", + "solution": "color (opacity white, .1)", + "validate": "__color \\(opacity white, .1\\)" + }, + { + "hint": "Now let’s make a new loop to draw the cloud puffs. We’ll need a lot, so let’s make this a loop last 300 iterations. **Type** `for j in [ 0 ... 250 ]`.", + "solution": "for j in [ 0 ... 250 ]" + }, + { + "hint": "We want cloud puffs sprinkled randomly across the screen, so lets choose an x value between 0 and 500 with`x = random 0, 500`", + "solution": " x = random 0, 500" + }, + { + "hint": "However, for the y value, we only want the cloud puffs to be drawn on the bottom part of the screen. **Type** `y = random 300, 500`", + "solution": " y = random 300, 500" + }, + { + "hint": "Now with our x and y values set we can move the cursor to them. **Type** `moveTo x, y`", + "solution": " moveTo x, y" + }, + { + "hint": "Let’s draw the cloud puff—a big transparent `circle` of size `100`", + "solution": " circle 100" + }, + { + "hint": "Press `BACKSPACE` once to get out of the indented line. Then lets move the cursor into place for some text with `moveTo 250, 350`", + "solution": "moveTo 250, 350" + }, + { + "hint": "Set the drawing color to red - **type** `color red`", + "solution": "color red" + }, + { + "hint": "Our message should be strong and impactful, so lets set the font to bold with `bold true`", + "solution": "bold true" + }, + { + "hint": "We also want to style our text with italics, do this with `italic true`", + "solution": "italic true" + }, + { + "hint": "Finally lets select Bariol at point size 40 with `font 'Bariol', 40`", + "solution": "font 'Bariol', 40" + }, + { + "hint": "Start your message off with `text 'Hike the Blue Mountains of'`", + "solution": "text 'Hike the Blue Mountains of'" + }, + { + "hint": "Now for a new line with a big bold finish. **Type** `font 90`", + "solution": "font 90" + }, + { + "hint": "Lets move the cursor down into place for the final line with `move 0, 90`", + "solution": "move 0, 90" + }, + { + "hint": "The finishing touch: **type** `text 'Camp Kano!'`", + "solution": "text 'Camp Kano!'" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/index.json b/lib/challenges/worlds/summercamp/index.json new file mode 100644 index 000000000..a54bd7049 --- /dev/null +++ b/lib/challenges/worlds/summercamp/index.json @@ -0,0 +1,26 @@ +{ + + "challenges": [ + "./camp_sign", + "./campsite", + "./tent", + "./flag", + "./camp_badge", + "./campfire", + "./ghost", + "./backpack", + "./compass", + "./camera", + "./bear", + "./flashlight", + "./guitar", + "./cinema", + "./bow_and_arrow", + "./table_tennis", + "./fishing", + "./hiking", + "./foraging", + "./tree", + "./fireworks" + ] +} diff --git a/lib/challenges/worlds/summercamp/table_tennis.json b/lib/challenges/worlds/summercamp/table_tennis.json new file mode 100644 index 000000000..8e5a1fae0 --- /dev/null +++ b/lib/challenges/worlds/summercamp/table_tennis.json @@ -0,0 +1,121 @@ +{ + "id": "table_tennis", + "title": "Table Tennis", + "short_title": "Table Tennis", + "icon_class": "challenge_tennis", + "description": "Table Tennis is a game played with one or two people on each side of a table with the outline of a miniaturized tennis court drawn on it. Games are played to 11 or 21, and upon completion the victor’s paddle is thrown to the ground as they let out their battle cry.", + "cover": "summercamp/day_16.png", + "completion_text": "Well done! You made a beautiful 3D ping pong table. But there isn’t anyone playing or watching the game! Use your creativity and code to draw some fellow campers enjoying the game.", + "difficulty": 2, + "startAt": 0, + "summerCamp": true, + "rewards": { + "wallpaper": 1 + }, + "steps": [ + { + "hint": "Begin by setting your stroke to zero with `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "It's a sunny day! Set the background color to blue - **type** `background blue`", + "solution": "background blue" + }, + { + "hint": "Set your color to green for the grass. **Type** `color green`.", + "solution": "color green" + }, + { + "hint": "Move your cursor into place with `moveTo 0, 350`", + "solution": "moveTo 0, 350" + }, + { + "hint": "Cover the bottom part of the canvas with grass. Draw a `rectangle` of width `500` and height `150`.", + "solution": "rectangle 500, 150" + }, + { + "hint": "Give your table a solid foundation with some wood legs. Set `color` to `brown`", + "solution": "color brown" + }, + { + "hint": "Move the cursor into position for the first leg. **Type** `moveTo 20, 310`", + "solution": "moveTo 20, 310" + }, + { + "hint": "Now draw the first leg. Type `rectangle 15, 150`.", + "solution": "rectangle 15, 150" + }, + { + "hint": "Now the second leg. **Type** `moveTo 465, 310`.", + "solution": "moveTo 465, 310" + }, + { + "hint": "Now **draw** the second leg. Type `rectangle 15, 150`.", + "solution": "rectangle 15, 150" + }, + { + "hint": "And the third leg. **Type** `moveTo 40, 250`.", + "solution": "moveTo 40, 250" + }, + { + "hint": "Now draw the third leg the same size as the others", + "solution": "rectangle 15, 150" + }, + { + "hint": "Finally, the fourth leg. **Type** `moveTo 445, 250`.", + "solution": "moveTo 445, 250" + }, + { + "hint": "Now draw the fourth leg", + "solution": "rectangle 15, 150" + }, + { + "hint": "Now to put the table on! Set the drawing `color` to `darkgreen`.", + "solution": "color darkgreen" + }, + { + "hint": "Move your table top into place. Type `moveTo 10, 300`.", + "solution": "moveTo 10, 300" + }, + { + "hint": "Your table has perspective, to draw it use `polygon 30, -60, 450, -60, 480, 0`", + "solution": "polygon 30, -60, 450, -60, 480, 0" + }, + { + "hint": "For a cool 3D effect, lighten the drawing color with `color lighten darkgreen, 10`", + "solution": "color lighten darkgreen, 10" + }, + { + "hint": "**Draw** the side of the table with `rectangle 480, 10`", + "solution": "rectangle 480, 10" + }, + { + "hint": "For the net, set the drawing `color` to `white`", + "solution": "color white" + }, + { + "hint": "Move the cursor to **exactly** `moveTo 248, 220`", + "solution": "moveTo 248, 220" + }, + { + "hint": "Draw the net: a `rectangle` with a width of `4`, and height of `80`", + "solution": "rectangle 4, 80" + }, + { + "hint": "Give your scene a bouncing ball! Use random to decide what side of the table the ball should be on. **Type** `x = random 40, 460`.", + "solution": "x = random 40, 460" + }, + { + "hint": "Now we’ll use random to decide how high the ball should be! **Type** `y = random 150, 250`.", + "solution": "y = random 150, 250" + }, + { + "hint": "Move the cursor to the x and y variables you just made. **Type** `moveTo x, y`.", + "solution": "moveTo x, y" + }, + { + "hint": "Finally, draw your ball with a circle with radius 7. Type `circle 7`.", + "solution": "circle 7" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/tent.json b/lib/challenges/worlds/summercamp/tent.json new file mode 100644 index 000000000..e0552bc87 --- /dev/null +++ b/lib/challenges/worlds/summercamp/tent.json @@ -0,0 +1,73 @@ +{ + "id": "tent", + "title": "Pitch your Tent", + "short_title": "Tent", + "description": "No campsite is complete without a tent. We’ve got you settled with a simple fly tent, which is usually made with a tarpaulin, rope, and stakes. But with your creative powers you can transform it into whatever you want! \nPeople have lived in tents, teepees, yurts, and wigwams for thousands of years. What features can you add to your tent to keep yourself dry and warm? You can always get inspiration from browsing other creations on Kano World, and searching the Internet for other tent designs.", + "icon_class": "challenge_setcamp", + "completion_text": "Nice job! You learnt in the last challenge how to draw a tree, why not adding it to the scene? Is that a bird flying in the sky?", + "cover": "summercamp/day_3.png", + "difficulty": 1, + "startAt": 2, + "summerCamp": true, + "rewards": { + "wallpaper": 1 + }, + "steps": [ + { + "hint": "Draw a sunny day - **type** `background lightblue`", + "solution": "background lightblue" + }, + { + "hint": "Set the stroke to 0, to avoid drawing lines - **type** `stroke 0`", + "solution": "stroke 0" + }, + { + "hint": "Move the cursor where the sun will be - **type** `moveTo 400, 50`", + "solution": "moveTo 400, 50" + }, + { + "hint": "Set the `color` of the sun `yellow`", + "solution": "color yellow" + }, + { + "hint": "Draw the sun with a circle - **type** `circle 40`", + "solution": "circle 40" + }, + { + "hint": "Move the cursor to draw some grass - **type** `moveTo 0, 350`", + "solution": "moveTo 0, 350" + }, + { + "hint": "Set the `color` of the grass `green`", + "solution": "color green" + }, + { + "hint": "Draw the grass using a rectangle - **type** `rectangle 500, 150`", + "solution": "rectangle 500, 150" + }, + { + "hint": "Excellent! Now we are ready to draw the tent - **type** `color red`", + "solution": "color red" + }, + { + "hint": "Position the cursor on top of the grass - **type** `moveTo 100, 350`", + "solution": "moveTo 100, 350" + }, + { + "hint": "Draw a triangle using `polygon` - **type** `polygon 150, -200, 300, 0`", + "solution": "polygon 150, -200, 300, 0" + }, + { + "hint": "We need the entrace now. Set the `color` to `darkred`", + "solution": "color darkred" + }, + { + "hint": "Place the cursor on the tip of the tent - **type** `moveTo 250, 150`", + "solution": "moveTo 250, 150" + }, + { + "hint": "Draw the entrance - **type** `polygon 30, 200, -30, 200`", + "solution": "polygon 30, 200, -30, 200" + } + ] +} diff --git a/lib/challenges/worlds/summercamp/tree.json b/lib/challenges/worlds/summercamp/tree.json new file mode 100644 index 000000000..0e190b858 --- /dev/null +++ b/lib/challenges/worlds/summercamp/tree.json @@ -0,0 +1,17 @@ +{ + "id": "tree", + "title": "Fractal Tree", + "short_title": "Tree", + "icon_class": "challenge_tree", + "description": "Time to play! Our counselors made you something to play with. A tree which can grow branches that expand outwards, and contract inwards. It can blossom fully, or shrivel to nothing. All with code. Make it yours.", + "cover": "summercamp/day_20.png", + "completion_text": "Play around with the blue numbers at the top of the code. What do they do? Why do they do that? Shape the tree to your liking. If things mess up, go back to the main menu and start again.", + "difficulty": 3, + "startAt": 0, + "summerCamp": true, + "rewards": { + "outfit": 1 + }, + "code": "# Play with these blue numbers\narmLength = 50\niterations = 9 # Might crash if you go over 15!\ndegreeChange = 20\nhasBlossoms = 3\nblossomSize = 70\nblossomOpacity = .02\n# ^^^ Play with these blue numbers ^^^\n\n###\nThis is a function that draws a tree\nbranch, when it completes, it calls itself\nover and over and over again until all the\ntree’s branches have been drawn!\n###\ndrawBranch = (x, y, branchesLeft, startAngle) ->\n if branchesLeft > 0 \n # Move to where the next branch should\n # be drawn:\n moveTo x, y\n \n # A branch is always blue, but the width\n # depends on how far from the base it is!\n stroke blue, branchesLeft \n \n # A bit of trigonometry here, it’s alright\n # if you don’t understand this! This \n # calculates coordinates for where the \n # branch should be drawn to, and where\n # the next branch should start.\n dx = Math.cos(startAngle) * armLength \n dy = -Math.sin(startAngle) * armLength \n \n # Draw a line to the new coordinates we\n # just calculated\n line dx, dy \n \n # This block of code only executes if\n # the current branch has blossoms. You\n # can change the hasBlossoms variable up\n # top!\n if branchesLeft <= hasBlossoms \n # Set the drawing color to a nice red\n color opacity \"rgb(247, 45, 99)\", blossomOpacity\n # Our blossoms shouldn’t have a stroke\n stroke 0 \n # Draw the blossom! These big blossoms\n # overlap over each other to create a\n # neat effect.\n circle blossomSize\n \n # Starts the next branch on the right\n drawBranch(x + dx, y + dy, branchesLeft - 1, startAngle - Math.PI / 180 * degreeChange) \n # Starts the next branch on the left\n drawBranch(x + dx, y + dy, branchesLeft - 1, startAngle + Math.PI / 180 * degreeChange)\n \n###\nFinally we call our function and see what\nhappens. Play with the numbers at the top of\nthe function and see how they change the tree\n###\ndrawBranch(stage.width * .5, stage.height, iterations, Math.PI / 2, length)", + "steps": [] +} diff --git a/lib/controller/auth-form.js b/lib/controller/auth-form.js new file mode 100644 index 000000000..b529af58b --- /dev/null +++ b/lib/controller/auth-form.js @@ -0,0 +1,45 @@ +'use strict'; +/* + * Login Form Controller + * + * Opens up the login form. + */ + +var app = require('../app'), + tracking = require('../core/tracking'); + +app.controller('AuthController', ['$scope', '$rootScope', '$element', 'API', 'AUTH', function ($scope, $rootScope, $element, api, auth) { + var loginForm = $element.find('kano-login-form')[0], + signupForm = $element.find('kano-signup-form')[0]; + + $scope.mode = 'login'; + $scope.toggleMode = function () { + $scope.mode = $scope.mode === 'login' ? 'signup' : 'login'; + }; + + $scope.onSuccess = function (ev) { + auth.login(ev.details, function (user) { + $rootScope.updateUser(user); + $rootScope.$apply(function () { + $rootScope.auth.closeModal(); + }); + }); + }; + + $scope.onSignupSuccess = function (ev) { + tracking.dispatchTrackingEvent('signedUpToKanoWorld'); + $rootScope.updateUser(ev.details.user); + }; + + $scope.close = function () { + $rootScope.auth.closeModal(); + }; + + loginForm.addEventListener('success', $scope.onSuccess); + signupForm.addEventListener('success', $scope.onSignupSuccess); + signupForm.addEventListener('success', $scope.onSuccess); + + loginForm.addEventListener('signup-click', $scope.$apply.bind($scope, $scope.toggleMode)); + signupForm.addEventListener('login-click', $scope.$apply.bind($scope, $scope.toggleMode)); + +}]); diff --git a/lib/controller/challenge.js b/lib/controller/challenge.js index 1fdeb7501..fbfcc1d22 100644 --- a/lib/controller/challenge.js +++ b/lib/controller/challenge.js @@ -1,109 +1,314 @@ +"use strict"; var app = require('../app'), api, - fileUtil = require('../util/file'), - challenges = require('../challenges/index'), - challengeAssert = require('../challenges/util/assert'), + notify = require('../api/notify'), language = require('../language/index'), session = require('../language/session'), sound = require('../core/sound'), - analytics = require('../core/analytics'); - + tracking = require('../core/tracking'), + getValidator = require('../challenges/util/validator'), + DEFAULT_SUCCESS_MESSAGE = 'Well done!', //null + HINT_HIGHLIGHT_DELAY = 10000, + VALIDATE_DELAY, + config, + timer; /* * Challenge Controller * * Controller for export modal */ -var SUCCESS_MESSAGES = [ - 'Well done!', //null - 'Nice work! That is one cool flag!', //Japan - 'Cool beans - enough of flags, let\'s try something else!', //Sweden - 'You Wizard! The next time I need spooky eyes I know who to call!', //Stare - 'Nice! Keep up the good work you face drawing genius!', //Smiley - 'Awesome balloon! Why not change the color before moving on?', //Blue balloon - 'Nice one! The canvas is 500 wide and 500 high, moving about on it is a skill!', //Stickman - 'Great! For loops let us repeat bits of code (it saves on all the typing)!', //Shrinking - 'Random functions give us a random number so we can put things in a surprise spot.', //random - 'Awesome! Press space and see what happens to the stars...', //Starry - 'You built an awesome house with code!', //House - 'Mathematical! Change the numbers and see what happens.', //Dots - 'Try changing the numbers in the rotate function and see what happens.', //Gradient - 'Astronomical! Change the colors and see what you can add to make your planet even cooler before hitting share!', //planet - 'Tasty! Finish it off with more toppings, let your imagination run wild and see what you can make, then share it with the world!', //Pizza - 'Well done!', //null - ], - HINT_HIGHLIGHT_DELAY = 10000, - VALIDATE_DELAY; +app.controller('ChallengeController', function ($scope, $routeParams, $window, $timeout, $rootScope, $location, contentService, emailService, socialService) { + var win = angular.element($window), + hintTimer, + worldId; -app.controller('ChallengeController', function ($scope, $routeParams, $window, $timeout, $rootScope) { - api = $rootScope.api; - VALIDATE_DELAY = $rootScope.cfg.OFFLINE ? 1020 : 20; + config = $rootScope.cfg; - var win = angular.element($window), - hintTimer; - - $scope.id = $routeParams.id ? parseInt($routeParams.id, 10) : 1; - $scope.lastChallengeVisited.set($scope.id); - $scope.content = challenges[$scope.id - 1]; - $scope.challenge = { code: $scope.content.code }; - $scope.fatherDay = $scope.content.fatherDay; - $scope.hasNext = challenges.length > $scope.id; - setStep(0); - $scope.started = true; - $scope.animationClass = ''; - analytics.track('Started Challenge ' + $scope.id, { - category: 'Started Challenge' - }); + /** + * Returns true if the code compiles + * @param {string} code The coffeescript code + * @return {boolean} True if the code compiles + */ + function isValidCode(code) { + var err, + // Create a canvas element + canvas = document.createElement('canvas'), + ctx; + canvas.width = 500; + canvas.height = 400; + + // Get the fake drawing context + ctx = canvas.getContext('2d'); + err = language.run(code, {ctx: ctx}); + canvas = undefined; + return (typeof err === 'undefined'); + } - $scope.$watch('step', function (step) { - $scope.hint = $scope.content.steps[step] ? $scope.content.steps[step].hint : null; - $scope.solution = $scope.getSolution(); - animateAndPlaySound(step); - }); - /* + + /** + * Saves code in the local storage + * @param {string} code a string containing the code + */ + function saveCode(code) { + localStorage["code_" + $scope.worldId + "_" + $scope.id] = code; + } + + + + /** + * Returns the next challenge in the world if it exists + * @return {object} The next Challenge in the world + */ + function getNextChallenge() { + var position = $scope.index, + challenges = $rootScope.selectedWorld.challenges; + return challenges[position]; + } + + + + /** + * Asynchronously loads the challenge + */ + function loadChallenge() { + contentService.challenge.get($scope.worldId, $scope.id).then(function (challenge) { + var lsCode; + + if ($scope.isChallengeLocked(challenge)) { + $location.path('/challenges/' + $rootScope.selectedWorld.id); + } + + lsCode = localStorage["code_" + $scope.worldId + "_" + $scope.id]; + + $scope.lastChallengeVisited.set($scope.worldId, $scope.index); //??? + + $scope.content = challenge; + $scope.index = challenge.index; + $scope.challenge = { code: lsCode || $scope.content.code }; + $scope.validator = getValidator($scope.content.steps, config.languageSynonyms); + + $scope.next = getNextChallenge(); + + setStep(0); + $scope.started = true; + $scope.animationClass = ''; + + $scope.$watch('step', function (step) { + $scope.hint = $scope.content.steps[step] ? $scope.content.steps[step].hint : null; + $scope.solution = $scope.getSolution(); + animateAndPlaySound(step); + }); + }); + } + + + + /** * Initialise controller * * @return void */ function init() { + $scope.nextModal = false; + $scope.shareModal = false; + $scope.mailTab = false; + $scope.loading = false; + $scope.unlockedWorld = null; + $rootScope.exportModal = false; + $rootScope.successful = false; $scope.closeChallengeComplete(); + socialService.init(); + socialService.twitter.share(function (res) { + if (res) { + $scope.closeShareModal(); + if (!$scope.nextModal) { + $scope.openNextModal(); + } + $scope.$apply(); + } + }); + api = $rootScope.api; + VALIDATE_DELAY = $rootScope.cfg.OFFLINE ? 1020 : 20; + + $scope.id = $routeParams.id; + $scope.worldId = $routeParams.world; + + $scope.offline = $rootScope.cfg.OFFLINE; + + if (!$rootScope.worlds) { + contentService.world.getAll().then(function (data) { + $rootScope.worlds = data; + }, function (err) { + console.err("Couldn't load worlds " + err); + }); + } + + if (!$rootScope.selectedWorld) { + //You're hitting the address directly, and we need to load the world's information + contentService.world.get("worlds/" + $scope.worldId).then(function (data) { + $scope.challenges = data.challenges; + $rootScope.selectedWorld = data; + worldId = $rootScope.selectedWorld.id; + $rootScope.$broadcast('world-loaded', data); + loadChallenge(); + }); + } else { + loadChallenge(); + worldId = $rootScope.selectedWorld.id; + + } - if ($scope.fatherDay && localStorage.fatherDayCode) { - $scope.challenge.code = localStorage.fatherDayCode; - $scope.completed = true; + if (!$rootScope.inWorldProgress) { + $rootScope.inWorldProgress = contentService.progress.get($scope.worldId); } } - /* - * Share father's day card - * - * @return void + $rootScope.$watch('successful', function (val) { + if (val) { + $scope.closeExportModal(); + if ($scope.next) { + $scope.next.locked = $scope.isChallengeLocked($scope.next) ? true : false; + } + $scope.openShareModal(); + } + }); + + $rootScope.openNextModal = function () { + if (!$scope.next) { + $scope.openFinishedGame(); + } else { + $scope.nextModal = true; + } + }; + + $scope.closeNextModal = function () { + $scope.nextModal = false; + }; + + $scope.openShareModal = function () { + if ($rootScope.creation) { + $scope.shareModal = true; + } else if ($rootScope.successful && !$rootScope.creation) { + $scope.openNextModal(); + } + }; + + $scope.closeShareModal = function () { + $scope.shareModal = false; + $scope.closeMailTab(); + }; + + $scope.openExportModal = function () { + $rootScope.exportModal = true; + }; + + $scope.closeExportModal = function () { + $rootScope.exportModal = false; + }; + + $scope.openMailTab = function () { + $scope.mailTab = true; + }; + + $scope.closeMailTab = function () { + $scope.mailTab = false; + }; + + $scope.skipSocialSharing = function () { + $scope.closeShareModal(); + $scope.openNextModal(); + }; + + /** + * Goes to the next challenge depending on the world locking strategy + * @return {[type]} [description] */ - $scope.shareFatherDay = function () { - var canvas = document.querySelector('canvas'), - image = canvas.toDataURL('image/png'), - cover = fileUtil.dataURItoBlob(image), - attachment = new Blob([ $scope.challenge.code ], { type: 'text/plain' }); - - cover.filename = 'cover.png'; - attachment.filename = 'code.draw'; - - api.online.share.post({ - app : 'kano-draw', - title : 'Father\'s Day Card', - files : { - cover : cover, - attachment : attachment + $scope.goToNext = function () { + if ($rootScope.selectedWorld.share_strategy && !$rootScope.creation) { + $scope.openExportModal(); + } else { + $scope.openNextModal(); + } + }; + + $scope.twitterShare = function (creation) { + var url = socialService.twitter.build(creation); + window.open(url, '_blank', 'height=500,width=500'); + tracking.dispatchTrackingEvent('worldExternalShare'); + }; + + $scope.facebookShare = function (creation) { + var options = { + title : creation.title + ' on Make Art', + url : creation.url, + picture : creation.cover_url, + caption : 'Shared by ' + creation.username + ' through ' + creation.world, + text : creation.description + }; + + socialService.facebook.share(options, function (err, res) { + if (err) { + return err; } - }) - .then(function (res) { - var itemId = res.body.item.id; - location.href = 'http://fathersday.kano.me/card/' + itemId + '/edit'; + if (res) { + tracking.dispatchTrackingEvent('worldExternalShare'); + $scope.closeShareModal(); + if (!$scope.nextModal) { + $scope.openNextModal(); + } + $scope.$apply(); + } }); }; + $scope.sendMail = function (creation) { + var emailObj; + if (!creation.email) { + return false; + } else { + $scope.loading = true; + if (emailService.validate(creation.email)) { + creation.user_email = $rootScope.user.email; + creation.type = 'art-share'; + emailObj = emailService.buildObject(creation); + + emailService.send(emailObj, function (response) { + if (response.status !== 200) { + $scope.loading = false; + return notify.failure(); + } + tracking.dispatchTrackingEvent('worldExternalShare'); + $scope.loading = false; + emailService.reset(creation); + $scope.closeMailTab(); + $scope.closeShareModal(); + + if (!$scope.nextModal) { + $scope.openNextModal(); + } + + $scope.$apply(); + + return notify.success(); + }, function (error) { + if (error) { + emailService.reset(creation); + $scope.closeMailTab(); + $scope.loading = false; + return notify.failure(); + } + }); + } else { + return notify.failure(); + } + } + }; + + $scope.isChallengeLocked = contentService.challenge.isLocked; + /* * Get back to first step * @@ -120,7 +325,9 @@ app.controller('ChallengeController', function ($scope, $routeParams, $window, $ * @return void */ $scope.toggleSolution = function () { - if (hintTimer) { $timeout.cancel(hintTimer); } + if (hintTimer) { + $timeout.cancel(hintTimer); + } $scope.highlightHelp = false; $scope.showSolution = !$scope.showSolution; }; @@ -131,49 +338,48 @@ app.controller('ChallengeController', function ($scope, $routeParams, $window, $ * @return void */ $scope.validate = function () { + if ($rootScope.cfg.OFFLINE) { + clearTimeout(timer); + } + // Next tick... - setTimeout(function () { + timer = setTimeout(function () { var code = language.strip($scope.challenge.code), step = 0, steps = $scope.content.steps, - history = session.steps || [], - assertObj = challengeAssert(code, history), - validateStep, i, finished; + finished, + report; - for (i = $scope.step; i < steps.length; i += 1) { - validateStep = steps[i].validate; + report = $scope.validator.validate(code, steps); - if (validateStep.call(assertObj, code, history)) { - step = i + 1; - } + $scope.challengeReport = report; + + step = (report.lastValidStep !== null) ? report.lastValidStep + 1 : 0; + + if (report.complete || (step >= steps.length && isValidCode(code))) { + //we consider complete the code of a user who reached the last step and broke previous ones + //as long as the code compiles + finished = true; } if (step > $scope.step) { + //we have a new valid step setStep(step); - } - - if ($scope.step > steps.length - 1) { - finished = true; + saveCode(code); } if (session.steps && finished && !$scope.completed) { - analytics.track('Completed Challenge ' + $scope.id, { - category: 'Completed Challenge' - }); + tracking.dispatchTrackingEvent('worldTutorialCompleted'); + tracking.trackUserProgress($scope.id); $scope.completed = true; - if ($scope.fatherDay) { - localStorage.fatherDayComplete = true; - localStorage.fatherDayCode = $scope.challenge.code; - } else { - $rootScope.updateProgress($scope.id + 1); - } - - $rootScope.updateProgress($scope.id + 1); + $rootScope.updateProgress(worldId, $scope.index + 1); api.progress.trackLinesOfCode($scope.challenge.code.split('\n').length); + } $scope.$apply(); + }, VALIDATE_DELAY); }; @@ -184,13 +390,16 @@ app.controller('ChallengeController', function ($scope, $routeParams, $window, $ * @return void */ function setStep(index) { - if (hintTimer) { $timeout.cancel(hintTimer); } + if (hintTimer) { + $timeout.cancel(hintTimer); + } $scope.highlightHelp = false; $scope.step = index; $scope.showSolution = false; - hintTimer = $timeout(function() { + + hintTimer = $timeout(function () { $scope.highlightHelp = true; }, HINT_HIGHLIGHT_DELAY); } @@ -201,11 +410,20 @@ app.controller('ChallengeController', function ($scope, $routeParams, $window, $ * @return {String} */ $scope.getSolution = function () { - var content = $scope.content.steps[$scope.step]; + var steps = $scope.content.steps, + i, + solution = ""; - if (!content) { return null; } - return content.solution; + if (!steps) { + return null; + } + for (i = 0; i <= $scope.step; i++) { + if (steps[i]) { + solution += steps[i].solution + "\n"; + } + } + return solution; }; /* @@ -216,12 +434,12 @@ app.controller('ChallengeController', function ($scope, $routeParams, $window, $ $scope.successMessage = function () { //If we are executing draw on Pi we want to show the xp gained var xpGain = parseInt($scope.xpGain, 10), - successMsg = SUCCESS_MESSAGES[$scope.id % SUCCESS_MESSAGES.length], + successMsg = $scope.content.completion_text || DEFAULT_SUCCESS_MESSAGE, xpMessage = xpGain ? ' You earned ' + $scope.xpGain + 'xp!' : '', onlineMessage = successMsg, offlineMessage = onlineMessage + xpMessage; - return $rootScope.cfg.OFFLINE ? offlineMessage : onlineMessage; + return $rootScope.cfg.OFFLINE ? offlineMessage : onlineMessage; }; /* @@ -286,7 +504,22 @@ app.controller('ChallengeController', function ($scope, $routeParams, $window, $ * * @return void */ - $scope.openFinishedGame = function() { + $scope.openFinishedGame = function () { + var arr = [], + progressGroups = $rootScope.progress.groups; + + $rootScope.worlds.forEach(function (world) { + // Check for worlds that are not locked and not completed + if (!contentService.world.isLocked(world) && !contentService.world.isCompleted(world)) { + if (!progressGroups.hasOwnProperty(world.id)) { + // If the user has no progress for that world, it is new & unlocked + arr.push(world); + } + } + }); + + // Return the first world in the array as the unlocked world + $scope.unlockedWorld = arr.length ? arr[0] : null; $scope.gameCompleteOpen = true; }; @@ -295,7 +528,7 @@ app.controller('ChallengeController', function ($scope, $routeParams, $window, $ * * @return void */ - $scope.closeFinishedGame = function() { + $scope.closeFinishedGame = function () { $scope.challengeCompleteOpen = false; }; diff --git a/lib/controller/challenges.js b/lib/controller/challenges.js index 1bc71455f..f3247f8d5 100644 --- a/lib/controller/challenges.js +++ b/lib/controller/challenges.js @@ -1,7 +1,6 @@ +"use strict"; var api, - app = require('../app'), - challenges = require('../challenges/index'), - analytics = require('../core/analytics'); + app = require('../app'); /* * Challenges Controller @@ -9,17 +8,16 @@ var api, * Controller for challenges selection screen */ -app.controller('ChallengesController', function ($scope, $rootScope) { - api = $rootScope.api; - - // Assign index to each challenge - challenges.forEach(function (challenge, i) { - challenge.index = i; - }); +app.controller('ChallengesController', function ($scope, $rootScope, $routeParams, $location, $http, contentService) { + var config = window.CONFIG, + domain = window.location.hostname, + domainCfg = (config.DOMAIN_CFG) ? config.DOMAIN_CFG[domain] : null, + routeWorldId = $routeParams.world, + routeWorld; - $scope.challenges = challenges.filter(function (challenge) { - return !challenge.fatherDay; - }); + api = $rootScope.api; + $scope.formData = {}; + $rootScope.inWorldProgress = { challengeNo: 1 }; init(); @@ -29,24 +27,88 @@ app.controller('ChallengesController', function ($scope, $rootScope) { * @return void */ function init() { - api.online.share.list({}, { app_name: 'kano-draw', limit: 19 }) - .then(function (res) { - // Next tick.. - setTimeout(function () { - $scope.shares = res.body.entries; - $scope.$apply(); - }); + $scope.certModal = false; + contentService.world.getAll().then(function gotWorlds(data) { + $rootScope.worlds = data; + if (routeWorldId) { + //a world has been selected through the URL + $rootScope.worlds.forEach(function (world) { + if (world.id === routeWorldId) { + routeWorld = world; + } + }); + } + if (routeWorld && !$scope.isWorldLocked(routeWorld)) { + $scope.loadWorld(routeWorld); + } else { + //don't load a world automatically + $location.path('/challenges'); + $scope.unloadWorld(); + } + }, function errorWorlds(err) { + //we might want in the future to load something offline + console.err("Couldn't load worlds " + err); + }); + + + if (!(domainCfg && domainCfg.hideShares)) { + api.online.share.list({}, { app_name: 'kano-draw', limit: 19 }) + .then(function (res) { + // Next tick.. + setTimeout(function () { + $scope.shares = res.body.entries; + $scope.$apply(); + }); + }); + } } + /** + * Loads all the information for a world + * @param {object} world the object that contains the world information + */ + $scope.loadWorld = function (world) { + var worldPath = "worlds/" + world.id; + if (!$scope.isWorldLocked(world)) { + contentService.world.get(worldPath).then(function (data) { + $scope.challenges = data.challenges; + $rootScope.selectedWorld = data; + $rootScope.selectedWorldClass = $rootScope.selectedWorld.css_class; + $rootScope.inWorldProgress = contentService.progress.get($rootScope.selectedWorld.id); + $rootScope.$broadcast('world-loaded', data); + }); + } + }; + + $scope.unloadWorld = function () { + $rootScope.selectedWorld = undefined; + $rootScope.selectedWorldClass = undefined; + $rootScope.inWorldProgress = {challengeNo: 1}; + $location.path('/challenges'); + }; + /* - * Returns true if challenge is disabled + * Select a challenge and open challenge modal * - * @param {Number} index - * @return {Boolean} + * @param {Object} challenge + * @return void + */ + $scope.selectChallenge = function (challenge) { + if ($scope.isLocked(challenge)) { + return; + } + + $scope.selectedChallenge = challenge; + }; + + /* + * Deselect a challenge and close challenge modal + * + * @return void */ - $scope.isCompleted = function (index) { - return index + 1 < $rootScope.progress.challengeNo; + $scope.deselectedChallenge = function () { + $scope.selectedChallenge = null; }; /* @@ -62,56 +124,137 @@ app.controller('ChallengesController', function ($scope, $rootScope) { }; /* - * Returns true if challenge is locked - * - * @param {Number} index - * @return {Boolean} + * Accept user email for Kano updates + */ + $scope.submit = function () { + var data; + if (!validateEmail($scope.formData.email)) { + $scope.success = ''; + $scope.error = 'Please enter a valid email address!'; + return; + } + $scope.error = ''; + data = $rootScope.selectedWorld.updateForm.field + '=' + $scope.formData.email; + + postEmail(data, formNotification, formNotification); + }; + + function formNotification() { + $scope.error = ''; + $scope.success = 'Thank you for signing up!'; + $scope.formData.email = ''; + setTimeout(function () { + $scope.success = ''; + $scope.$apply(); + }, 5000); + } + + function postEmail(data, successCB, errorCB) { + var req = { + method : 'POST', + url : $rootScope.selectedWorld.updateForm.url, + headers : { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + data : data + }; + + $http(req).then(successCB, errorCB); + } + + function validateEmail(email) { + var regExp = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; + return regExp.test(email); + } + + + /** + * Returns the URL for a certificate for a specific user + * @return {string} a url */ - $scope.isLocked = function (index) { - return index >= $rootScope.progress.challengeNo; + $scope.getCertificateUrl = function () { + var url = 'http://certificate.kano.me/' + $rootScope.selectedWorld.id + '/?name='; + if ($rootScope.user) { + url += $rootScope.user.username; + } + + if (true && $scope.isCertAchieved($rootScope.selectedWorld)) { + return url; + } + + return '#0'; + }; + + $scope.checkCertOnPi = function (e) { + if ($rootScope.cfg.OFFLINE) { + e.preventDefault(); + $scope.toggleCertModal(); + } + }; + + $scope.toggleCertModal = function () { + if ($scope.certModal) { + $scope.certModal = false; + } else { + $scope.certModal = true; + } }; + /** + * Returns true if the world is visible. + * @param {object} world The world + * @return {Boolean} true if the world is completed + */ + $scope.isWorldInIndex = contentService.world.isVisible; + + /** + * Returns true if the world is completed. + * @param {object} world The world + * @return {Boolean} true if the world is completed + */ + $scope.isWorldCompleted = contentService.world.isCompleted; + + /** + *Returns true if a world is locked; + */ + $scope.isWorldLocked = contentService.world.isLocked; + /* - * Returns true if challenge is last unlocked + * Returns true if world is current. + * @param {object} world + * @return {Boolean} + */ + $scope.isWorldCurrent = contentService.world.isCurrent; + + /* + * Returns true if challenge is locked * - * @param {Number} index + * @param {object} the challenge item * @return {Boolean} */ - $scope.isCurrent = function (index) { - return index + 1 === $rootScope.progress.challengeNo; - }; + $scope.isLocked = contentService.challenge.isLocked; /* - * Returns true if all challenges have been unlocked + * Returns true if challenge is disabled * * @param {Number} index * @return {Boolean} */ - $scope.isLastUnlocked = function (index) { - return index === $rootScope.progress.challengeNo; - }; + $scope.isCompleted = contentService.challenge.isCompleted; /* - * Select a challenge and open challenge modal + * Returns true if challenge is last unlocked * - * @param {Object} challenge - * @return void + * @param {Number} index + * @return {Boolean} */ - $scope.selectChallenge = function (challenge) { - if ($scope.isLocked(challenge.index)) { return; } - - analytics.track('Viewed Challenge ' + (challenge.index + 1), { - category : 'Viewed Challenge' - }); - $scope.selectedChallenge = challenge; - }; + $scope.isCurrent = contentService.challenge.isCurrent; /* - * Deselect a challenge and close challenge modal + * Returns true if a certificate is achieved * - * @return void + * @param {Object} world + * @return {Boolean} */ - $scope.deselectedChallenge = function () { - $scope.selectedChallenge = null; - }; + $scope.isCertAchieved = contentService.world.isCertAchieved; }); diff --git a/lib/controller/feedback.js b/lib/controller/feedback.js new file mode 100644 index 000000000..0d564a22c --- /dev/null +++ b/lib/controller/feedback.js @@ -0,0 +1,87 @@ +'use strict'; +/* + * Feedback Screen Controller + * + * Opens up when on main route + */ + +var api, + app = require('../app'), + _ = require('lodash'), + ERROR_MSG = 'We are sorry but an error occured.'; + +app.controller('FeedbackController', function ($scope, $rootScope, $routeParams) { + api = $rootScope.api; + $scope.loading = false; + $scope.questions = null; + $scope.error = ''; + $scope.feedback = { + rating: 'rating-1' + }; + + if ($routeParams.world) { + $scope.feedback.world = $routeParams.world; + } + + if ($routeParams.id) { + $scope.feedback.challenge = $routeParams.id; + } + + api.questions.list({}) + .then(function (res) { + if (res.body.questions) { + $scope.questions = _.filter(res.body.questions, { tags: ['feedback', 'make-art'] }); + $scope.$apply(); + } + }); + + $scope.sendFeedback = function () { + var answer, + answers = [], + answerKeys = Object.keys($scope.feedback); + + $scope.loading = true; + + _.each(answerKeys, function (key) { + answer = _.filter($scope.questions, { tags: [key] }); + answer = { + question_id : answer[0].id, + tags : answer[0].tags, + text : $scope.feedback[key] + }; + answers.push(answer); + }); + + if (!answers.length) { + $scope.error = ERROR_MSG; + return; + } + + api.questions.respond({ + username: $rootScope.user ? $rootScope.user.username : $rootScope.cfg.UNKNOWN_USER, + email: $rootScope.user ? $rootScope.user.email : $rootScope.cfg.UNKNOWN_USER + '@kano.me', + answers: answers + }) + .then(function () { + handleClick(); + }, function () { + $scope.loading = false; + $scope.error = ERROR_MSG; + }); + }; + + function handleClick() { + $scope.feedback.thought = ''; + document.querySelector('.form-message').classList.remove('hide'); + document.querySelector('.form-container').classList.add('hide'); + document.querySelector('.feedback-buttons').classList.add('hide'); + + setTimeout(function () { + $rootScope.feedback.closeModal(); + }, 2500); + } + + $scope.closeModal = function () { + $rootScope.feedback.closeModal(); + }; +}); diff --git a/lib/controller/main.js b/lib/controller/main.js index 0b5e30c7a..b4c995d42 100644 --- a/lib/controller/main.js +++ b/lib/controller/main.js @@ -6,6 +6,11 @@ var app = require('../app'); -app.controller('MainController', function () { - // ... -}); +app.controller('MainController', ['$scope', '$rootScope', '$location', function ($scope, $rootScope, $location) { + var path = $location.path(), + isRoot = path === '/' || path === '/challenges'; + if (isRoot) { + $location.path('/challenges'); + $rootScope.splash.open(); + } +}]); diff --git a/lib/controller/promo-popup.js b/lib/controller/promo-popup.js index d8dc878e7..1eb59c570 100644 --- a/lib/controller/promo-popup.js +++ b/lib/controller/promo-popup.js @@ -38,41 +38,66 @@ app.controller('PromoPopupController', function ($scope, $rootScope) { 'RPI/A' : 'pi-1', 'RPI/A+' : 'pi-1' }, + init, + loadedProfile, + loadedWorld; - + $scope.isPopupOpen = false; //this drives the opening of the promo popup /** * Initialises the promo popup */ init = function () { - var lsItemName = 'promoPopupOpen', promoPopupOpen = localStorage.getItem(lsItemName), day = new Date(), ts = day.getYear() + "-" + day.getMonth() + "-" + day.getDate(), profile = ($rootScope.user) ? $rootScope.user.profile : undefined, pi_v, - cfgKey = "none"; //the user doesn't have a kit; - if (profile) { - pi_v = (profile.kano_kit) ? profile.kano_kit.pi_v : undefined; - cfgKey = (keyMapping[pi_v]) ? keyMapping[pi_v] : cfgKey; - } - $scope.cfg = cfg[cfgKey]; + cfgKey = "none", //the user doesn't have a kit; + worldId, + promoIndex, + challengeIndex; + + loadedWorld = !!$rootScope.selectedWorld; + + if (loadedWorld && loadedProfile) { + worldId = $rootScope.selectedWorld.id, + promoIndex = $rootScope.selectedWorld.sales_popup_after, + challengeIndex = $rootScope.progress.groups[worldId] ? $rootScope.progress.groups[worldId].challengeNo : 1; + + if (profile) { + pi_v = (profile.kano_kit) ? profile.kano_kit.pi_v : undefined; + cfgKey = (keyMapping[pi_v]) ? keyMapping[pi_v] : cfgKey; + } + $scope.cfg = cfg[cfgKey]; - // it opens only once a day - if (false && promoPopupOpen !== ts) { - $scope.isPopupOpen = true; - localStorage.setItem(lsItemName, ts); + // it opens only once a day + if (promoPopupOpen !== ts && challengeIndex > promoIndex) { + $scope.isPopupOpen = true; + localStorage.setItem(lsItemName, ts); + } } }; - $scope.isPopupOpen = false; //this drives the opening of the promo popup - $rootScope.$on('user-profile-loaded', init); + $rootScope.$on('user-profile-loaded', function () { + loadedProfile = true; + init(); + }); + + $rootScope.$watch('selectedWorld', function () { + if (!loadedWorld && $rootScope.selectedWorld) { + loadedWorld = true; + init(); + } + }); + setTimeout(function () { //We've waited long enough! if (!$rootScope.user) { + loadedProfile = true; init(); } }, 1000); diff --git a/lib/controller/share.js b/lib/controller/share.js index adba005a7..628a30765 100644 --- a/lib/controller/share.js +++ b/lib/controller/share.js @@ -14,7 +14,7 @@ app.controller('ShareController', function ($scope, $routeParams, $http, $locati $scope.id = $routeParams.id || null; // Get share by id given in route - api.share.get.byId({ id: $scope.id }) + api.online.share.get.byId({ id: $scope.id }) .then(function (res) { $scope.item = res.body.item; @@ -54,4 +54,4 @@ app.controller('ShareController', function ($scope, $routeParams, $http, $locati $scope.$apply(); }, 1); }; -}); \ No newline at end of file +}); diff --git a/lib/controller/splash.js b/lib/controller/splash.js index ec7e63d9b..82eb54919 100644 --- a/lib/controller/splash.js +++ b/lib/controller/splash.js @@ -6,6 +6,12 @@ var app = require('../app'); -app.controller('SplashController', function ($scope, $location) { - $scope.isSplashOpen = $location.path() === '/'; -}); \ No newline at end of file +app.controller('SplashController', ['$scope', '$rootScope', '$location', function ($scope, $rootScope, $location) { + var path = $location.path(), + isRoot = path === '/' || path === '/challenges'; + if (isRoot) { + $rootScope.splash.open(); + } else { + $rootScope.splash.close(); + } +}]); diff --git a/lib/controller/summer-camp-challenge.js b/lib/controller/summer-camp-challenge.js deleted file mode 100644 index be91ee98b..000000000 --- a/lib/controller/summer-camp-challenge.js +++ /dev/null @@ -1,313 +0,0 @@ -var app = require('../app'), - api, - fileUtil = require('../util/file'), - challenges = require('../challenges/summer_camp/index'), - challengeAssert = require('../challenges/util/assert'), - language = require('../language/index'), - session = require('../language/session'), - sound = require('../core/sound'), - analytics = require('../core/analytics'), - moment = require('moment'); - -/* - * Challenge Controller - * - * Controller for export modal - */ - -var DEF_SUCCESS_MESSAGE = 'Well done!', - HINT_HIGHLIGHT_DELAY = 10000, - VALIDATE_DELAY, - LOCAL_STORAGE_CODE_PREFIX = 'summerChallengeCode'; - -app.controller('SummerCampChallengeController', function ($scope, $routeParams, $window, $timeout, $rootScope, $location) { - api = $rootScope.api; - VALIDATE_DELAY = $rootScope.cfg.OFFLINE ? 1020 : 20; - - var win = angular.element($window), - hintTimer, - summerCampGroup = $rootScope.progress.groups.summercamp, - progressNo = summerCampGroup ? summerCampGroup.challengeNo : 1, - now = moment().date(), - startDate = moment('10-08-2015 06:00:00', 'DD-MM-YYYY HH:mm:ss').date(), - diff = now - startDate; - - $scope.id = $routeParams.id ? parseInt($routeParams.id, 10) : 1; - $rootScope.id = $scope.id; - $rootScope.progessNo = progressNo; - - // Check if the difference in the route params and the current day of summercamp is greater than 1 - // Check if the id in the route params is either greater than or equal to the progress challenge number. - // If both are true, then redirect the user to the summercamp calendar - // if (!config.TEST_MODE && ($scope.id - diff) > 1 && $scope.id >= progressNo) { - // $location.path('/summercamp'); - // } - // else { - // $scope.lastChallengeVisited.set($scope.id, 'summercamp'); - // } - - $scope.lastChallengeVisited.set($scope.id, 'summercamp'); - $scope.content = challenges[$scope.id - 1]; - $scope.challenge = { code: $scope.content.code }; - $scope.hasNext = challenges.length > $scope.id; - $scope.openModal = null; - - setStep(0); - $scope.started = true; - $scope.animationClass = ''; - analytics.track('Started Challenge ' + $scope.id, { - category: 'Started Summer Camp Challenge' - }); - - - $scope.$watch('step', function (step) { - $scope.hint = $scope.content.steps[step] ? $scope.content.steps[step].hint : null; - $scope.solution = $scope.getSolution(); - animateAndPlaySound(step); - }); - - $rootScope.$watch('successful', function (msg) { - if (msg) { - if (!$rootScope.progessNo || $rootScope.id >= $rootScope.progessNo) { - $rootScope.updateProgress($rootScope.id + 1, 'summercamp'); - } - $rootScope.successful = false; - $location.path('/summercamp'); - } - }); - - /* - * Initialise controller - * - * @return void - */ - function init() { - $scope.challenge.code = $scope.challenge.code || retrieveCode($scope.id - 1); - $scope.validate(true); - $scope.closeChallengeComplete(); - $scope.completed = $scope.id < $rootScope.progressNo; - } - - /* - * Get back to first step - * - * @return void - */ - $scope.restart = function () { - var localStorageKey = LOCAL_STORAGE_CODE_PREFIX + ($scope.id - 1); - if (localStorage[localStorageKey]) { - localStorage.removeItem(localStorageKey); - } - $scope.step = 0; - $scope.completed = false; - }; - - - /* - * Show / Hide solution - * - * @return void - */ - $scope.toggleSolution = function () { - if (hintTimer) { $timeout.cancel(hintTimer); } - $scope.highlightHelp = false; - $scope.showSolution = !$scope.showSolution; - }; - - /** - * - * Validate code to determine success of challenge - * @param {boolean} noTracking Doesn't track completion if true (needed when loading from local storage) - * @return void - */ - $scope.validate = function (noTracking) { - // Next tick... - setTimeout(function () { - var code = language.strip($scope.challenge.code), - step = 0, - steps = $scope.content.steps, - history = session.steps || [], - assertObj = challengeAssert(code, history), - validateStep, i, finished; - storeCode($scope.id - 1 ); - for (i = $scope.step; i < steps.length; i += 1) { - validateStep = steps[i].validate; - - if (validateStep.call(assertObj, code, history)) { - step = i + 1; - } - } - - if (step > $scope.step) { - setStep(step); - } - - if ($scope.step > steps.length - 1) { - finished = true; - } - - if (session.steps && finished && !$scope.completed) { - $scope.completed = true; - - if (!noTracking) { - analytics.track('Completed Challenge ' + $scope.id, { - category: 'Completed Summer Camp Challenge' - }); - - api.progress.trackLinesOfCode($scope.challenge.code.split('\n').length); - } - - if ($scope.challengeNo === 21) { - $scope.openFeedback(); - } - } - - $scope.$apply(); - }, VALIDATE_DELAY); - }; - - $rootScope.shareModal = false; - - - function storeCode (index) { - var key = LOCAL_STORAGE_CODE_PREFIX + index; - if (localStorage[key]) { - localStorage.removeItem(key); - } - localStorage[key] = $scope.challenge.code; - } - - function retrieveCode (index) { - var key = LOCAL_STORAGE_CODE_PREFIX + index; - return localStorage[key] || ''; - } - - //opens a modal - $scope.setOpenModal = function () { - $rootScope.shareModal = true; - }; - - /* - * Set current challenge step - * - * @param {Number} index - * @return void - */ - function setStep(index) { - if (hintTimer) { $timeout.cancel(hintTimer); } - - $scope.highlightHelp = false; - - $scope.step = index; - $scope.showSolution = false; - hintTimer = $timeout(function() { - $scope.highlightHelp = true; - }, HINT_HIGHLIGHT_DELAY); - } - - /* - * Get current step solution - * - * @return {String} - */ - $scope.getSolution = function () { - var content = $scope.content.steps[$scope.step]; - - if (!content) { return null; } - - return content.solution; - }; - - /* - * Show success message - * - * @return void - */ - $scope.successMessage = function () { - //If we are executing draw on Pi we want to show the xp gained - var xpGain = parseInt($scope.xpGain, 10), - successMsg = $scope.content.completion_text || DEF_SUCCESS_MESSAGE, - xpMessage = xpGain ? ' You earned ' + $scope.xpGain + 'xp!' : '', - onlineMessage = successMsg, - offlineMessage = onlineMessage + xpMessage; - - return $rootScope.cfg.OFFLINE ? offlineMessage : onlineMessage; - }; - - /* - * Start challenge after reading the intro - * - * @return void - */ - $scope.start = function () { - $scope.started = true; - }; - - /* - * Show complete challenge panel - * - * @return void - */ - $scope.challengeComplete = function () { - $scope.isChallengeCompleteOpen = true; - }; - - /* - * Hide complete challenge panel - * - * @return void - */ - $scope.closeChallengeComplete = function () { - $scope.isChallengeCompleteOpen = false; - }; - - // Listen for key press - win.bind('keydown', function (e) { - if (e.keyCode === 27) { // ESC - $scope.$apply(); - } - }); - - /* - * Animate progress circle and play sound - * - * @return void - */ - function animateAndPlaySound(step) { - if (step) { - $scope.animationClass = 'animate-pulse'; - - if (step < $scope.content.steps.length) { - sound.play('pop'); - } else { - sound.play('success'); - } - - $timeout(resetAnimation, 500); - } - - function resetAnimation() { - $scope.animationClass = ''; - } - } - - /* - * Close game completion modal - * - * @return void - */ - $scope.openFinishedGame = function() { - $scope.gameCompleteOpen = true; - }; - - /* - * Close game completion modal - * - * @return void - */ - $scope.closeFinishedGame = function() { - $scope.challengeCompleteOpen = false; - }; - - init(); -}); diff --git a/lib/controller/summer-camp-leaderboard.js b/lib/controller/summer-camp-leaderboard.js deleted file mode 100644 index 2ccb24bf8..000000000 --- a/lib/controller/summer-camp-leaderboard.js +++ /dev/null @@ -1,29 +0,0 @@ -var app = require('../app'), - api; - -app.controller('SummerCampLeaderboardController', function ($scope, $rootScope) { - api = $rootScope.api; - // setTimeout needed because $rootScope.user not populated in time - setTimeout(function() { - var leaderboardFn = api.summercamp.getLeaderboard, - username; - - if ($rootScope.user) { - username = $rootScope.user.username; - leaderboardFn = api.summercamp.getUserLeaderboard; - } - - leaderboardFn({ - username: username - }) - .then(function (res) { - $scope.leaderboard_entries = res.body; - $scope.$apply(); - }, function (res) { - $scope.showError(res.body); - }) - .catch(function (err) { - throw err; - }); - }, 500); -}); diff --git a/lib/controller/summer-camp.js b/lib/controller/summer-camp.js deleted file mode 100644 index eca83a6e3..000000000 --- a/lib/controller/summer-camp.js +++ /dev/null @@ -1,397 +0,0 @@ -var app = require('../app'), - challenges = require('../challenges/summer_camp/index'), - api, - social = require('../core/social'), - moment = require('moment'), - notify = require('../api/notify'), - countDownInterval, - startDate = moment('10-08-2015 06:00:00', 'DD-MM-YYYY HH:mm:ss'), - analytics = require('../core/analytics'); - -/* - * Summer Challenges Controller - * - * Controller for summer challenges selection screen - */ - -app.controller('SummerCampController', function ($interval, $timeout, $scope, $rootScope, $location, emailService) { - api = $rootScope.api; - - if ($rootScope.cfg.TEST_MODE) { - startDate = moment('01-07-2015 06:00:00', 'DD-MM-YYYY HH:mm:ss'); - } - - $scope.feedbackOpen = false; - - $scope.openFeedback = function(){ - $scope.feedbackOpen = true; - $scope.$apply(); - }; - - $scope.closeFeedback = function(){ - $scope.feedbackOpen = false; - $scope.$apply(); - }; - - // Assign index to each challenge - challenges.forEach(function (challenge, i) { - challenge.index = i; - }); - - $scope.summerCampChallenges = challenges; - $scope.selectedSummerChallenge = null; - $scope.isFutureChallenge = false; - $scope.mailPreview = false; - $rootScope.progress.groups['summercamp'] = $rootScope.progress.groups['summercamp'] || { 'challengeNo' : 1 }; - - if ($rootScope.progress.groups['summercamp'].challengeNo === $scope.summerCampChallenges.length + 1) { - $scope.openFeedback(); - } - - // Add cover image of shares to respective summer camp challenges - // Declare variables to be used - var i, uid, shares, challengeNo; - - // Check if there's a uuid variable in the localStorage - if (localStorage.uuid) { - uid = localStorage.uuid; - - // Get about 50 shares by a user based on the user's id - api.online.share.list({}, {limit: 50, user_id: uid}) - .then(function(data) { - // Assign the entries from the returned object into the shares variable - shares = data.body.entries; - - // loop through the objects in the shares - for (i = 0; i < shares.length; i++) { - // check for every share that has a summerCamp campaign code - if (shares[i].campaign_ref.code === 'summerCamp') { - // Reduce the challengeNo in the share campaign_ref by 1 and assign it to the challengeNo variable - challengeNo = shares[i].campaign_ref.challengeNo - 1; - // Find the respective summercamp challenge and assign a cover_url, world_url, shareTitle, shareDescription & username to the challenge - $scope.summerCampChallenges[challengeNo].cover_url = shares[i].cover_url; - $scope.summerCampChallenges[challengeNo].world_url = 'http://world.kano.me/shared/' + shares[i].id; - $scope.summerCampChallenges[challengeNo].shareTitle = shares[i].title; - $scope.summerCampChallenges[challengeNo].shareDescription = shares[i].description; - $scope.summerCampChallenges[challengeNo].username = shares[i].user.username; - } - } - }); - } - - // Initialise the facebook SDK - social.init(); - - // Call the facebook share function - $scope.facebookShare = function (challenge) { - social.share.facebook({ - title : challenge.shareTitle + ' on Make Art', - url : challenge.world_url, - picture : challenge.cover_url, - caption : 'Shared by ' + challenge.username + ' through Summer Camp', - text : challenge.shareDescription - }, function (err, res) { - if (err) { return err; } - }); - }; - - $scope.openPreview = function () { - $scope.mailPreview = true; - }; - - $scope.closePreview = function () { - $scope.mailPreview = false; - }; - - // Call the send function from the email service - $scope.sendMail = function (challengeObj) { - var emailObj; - if (!challengeObj.name || !challengeObj.message || !challengeObj.email) { - return false; - } else { - if (emailService.validate(challengeObj.email)) { - challengeObj.user_email = $rootScope.user.email; - emailObj = emailService.buildObject(challengeObj); - - emailService.send(emailObj, function (response) { - if (response.status === 200) { - emailService.reset(challengeObj); - $scope.mailPreview = false; - - return notify.success(); - } - }, function (error) { - if (error) { - emailService.reset(challengeObj); - $scope.mailPreview = false; - - return notify.failure(); - } - }); - } else { - return notify.failure(); - } - } - }; - - /* - * Returns true if challenge is disabled - * - * @param {Number} index - * @return {Boolean} - */ - $scope.isCompleted = function (index) { - return index + 1 < $rootScope.progress.groups['summercamp'].challengeNo; - }; - - /** - * Return an additional class for the background in the calendar - * @param {number} the day - * @return {string} - */ - $scope.additionalBgClass = function (day) { - var additionalClass = (challenges[day] ? challenges[day].icon_class: null); - if (!$scope.isCompleted(day) && (additionalClass)) { - return additionalClass; - } - if ($scope.isCompleted(day)) { - return ''; - } - return 'unknown'; - }; - - /* - * Returns true if challenge is locked - * - * @param {Number} index - * @return {Boolean} - */ - $scope.isLocked = function (index) { - - if (config.TEST_MODE) { - return false; - } - - return index >= $rootScope.progress.groups['summercamp'].challengeNo; - }; - - /* - * Returns true if challenge is last unlocked - * - * @param {Number} index - * @return {Boolean} - */ - $scope.isCurrent = function (index) { - return index + 1 === $rootScope.progress.groups['summercamp'].challengeNo; - }; - - /* - * Returns true if all challenges have been unlocked - * - * @param {Number} index - * @return {Boolean} - */ - $scope.isLastUnlocked = function (index) { - return index === $rootScope.progress.groups['summercamp'].challengeNo; - }; - - /* - * Select a challenge and open challenge modal - * - * @param {Object} day - * @return void - */ - $scope.selectChallenge = function (day) { - if ($scope.isLocked(day)) { return; } - var selectedChallenge = day; - $scope.selectedSummerChallengeDay = startDate.date() + day; - $scope.selectedSummerChallenge = selectedChallenge; - $scope.selectedSummerChallengeObj = challenges[selectedChallenge]; - $scope.isFutureChallenge = isFutureChallenge(day); - analytics.track('Viewed Challenge ' + day, { - category : 'Viewed Summer Camp Challenge' - }); - countDownToNext(); - }; - - /* - * Open a challenge by double-clicking and check if it's unlocked and not a future - * challenge. - * - * @param {Number} day - * @return void - */ - $scope.openChallenge = function (day) { - if (!$scope.isLocked(day) && !isFutureChallenge(day)) { - day = day + 1; - $location.path('/summercamp/challenge/' + day); - } - }; - - // Initialize the selected day variable with -1 - $scope.selectedDay = -1; - - /* Set a day to be active when a challenge is selected in the calendar - * Also check if the day is not locked and not a future challenge - * - * @param {Number} index - * @return void - */ - $scope.setActive = function(index) { - if (!$scope.isLocked(index) && !isFutureChallenge(index)) { - $scope.selectedDay = index; - } - }; - - /* Get the active challenge day on the calendar - * and use that to apply the proper css class - * - * @param {Number} index - * @return {Boolean} - */ - $scope.getActive = function(index) { - return $scope.selectedDay === index; - }; - - /* - * Deselect a challenge and close challenge modal - * - * @return void - */ - $scope.deselectedChallenge = function () { - $scope.selectedSummerChallenge = null; - }; - - /* - * Returns an AP containing max elements - * - * @param {Number} max - * @return {Array} - */ - $scope.range = function (max) { - var ar = []; - - for(var i = 0; i < max; i++) { - ar.push(i); - } - return ar; - }; - - // Close register modal - $scope.closeModal = function () { - $scope.register = false; - }; - - // Create calendar dates - $scope.weekdays = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']; - - $scope.loading = true; - - $scope.currentDay = function(index) { - return index >= $rootScope.progress.groups['summercamp'].challengeNo && checkTime(index); - }; - - // This is just used to highlight the day name on the calendar - $scope.isCurrentDayIndex = function(index) { - var now = new Date(); - return index === (now.getDay() || 7) - 1; - } - - /* - * Returns true if challenge is a future challenge - * - * @param {Number} day - * @return {Boolean} - */ - function isFutureChallenge(day) { - return (day > currentDayIndex()) ? true : false; - }; - - function currentDayIndex() { - var today = moment(), - diff = today.diff(startDate), - remainder = diff / 1000; - - return parseInt(remainder / 86400, 10); - } - - function countDown() { - var today = moment(); - var diff = startDate.diff(today); - var remainder = diff / 1000; - - $scope.days = parseInt(remainder / 86400, 10); - remainder = remainder % 86400; - - $scope.hours = parseInt(remainder / 3600, 10); - $scope.hours = (($scope.hours < 10) ? '0' : '') + $scope.hours; - remainder = remainder % 3600; - - $scope.minutes = parseInt(remainder / 60, 10); - $scope.minutes = (($scope.minutes < 10) ? '0' : '') + $scope.minutes; - - $scope.seconds = parseInt(remainder % 60, 10); - $scope.seconds = (($scope.seconds < 10) ? '0' : '') + $scope.seconds; - - $scope.loading = false; - if (diff < 1) { - if (countDownInterval) { - $interval.cancel(countDownInterval); - } - $location.path('/summercamp'); - } - } - - function countDownToNext() { - var day = $scope.selectedSummerChallenge + 1; - var nextStartDate = moment(startDate); - var now = moment(); - var nextDay = moment().add(1, 'day'); - var timeDiff; - - $scope.timeToNext = $scope.timeToNext || {}; - //debugger; - nextStartDate.add(day, 'days'); - - //console.log(day, nextDay, nextStartDate, now); - if (nextDay.isBefore(nextStartDate)) { - //if we're just looking at the next - timeDiff = moment(nextStartDate.diff(now)); - //debugger; - - $scope.timeToNext.h = timeDiff.hours(); - $scope.timeToNext.m = timeDiff.minutes(); - $scope.timeToNext.s = timeDiff.seconds(); - //$scope.timeToNext = timeDiffObj; - $timeout(countDownToNext, 500); - } else { - $scope.timeToNext = null; - - } - } - - function checkTime(index) { - var today = moment(); - if(today.isAfter(startDate)) { - var dayDiff = today.date() - startDate.date(); - if (index <= dayDiff) { - - $interval(function () { - $scope.currentDay(index + 1); - }, today.diff(startDate)); - return true; - } - } - else { - return false; - } - } - - if (!$rootScope.cfg.TEST_MODE) { - countDownInterval = $interval(countDown, 1000); - } - - // We have our indexes screwed somewhere. I shouldn't have to do -1 here - $scope.selectChallenge($rootScope.progress.groups['summercamp'].challengeNo - 1); - $scope.setActive($rootScope.progress.groups['summercamp'].challengeNo - 1); -}); diff --git a/lib/core/analytics.js b/lib/core/analytics.js deleted file mode 100644 index 7e81d811a..000000000 --- a/lib/core/analytics.js +++ /dev/null @@ -1,71 +0,0 @@ -var config = window.CONFIG, - analytics = window.analytics; - -/* - * Analytics module - * - * Wrapper to Segment.io analytics - * More documentation at: https://segment.com/docs/libraries/analytics.js - */ - -var enabled = config.SEGMENTIO_ID && !config.OFFLINE && analytics; - -/* - * Initialise Segment.io if `SEGMENTIO_ID` is present in config, start - * tracking page views - * - * @return void - */ -exports.init = function () { - if (!enabled) { return; } - - window.analytics.load(config.SEGMENTIO_ID); -}; - -/* - * Track current page view - * - * @param {String} pageId - * @return void - */ -exports.page = function (pageId) { - if (!enabled) { return; } - - window.analytics.page(pageId); -}; - -/* - * Tie a user to the tracked data - * - * - * @param {String} [userId] - The database ID for the user. If as yet - * unknown, you can omit and just record traits - * @param {Object} [traits] - Dictionary of known traits of the user, e.g. - * email or name - * @param {Object} [options] - Dictionary to enable or disable specific - * integrations for the call - * @param {Function} [callback] - Callback called after a short timeout - * @return void - */ -exports.identify = function (userId, traits, options, callback) { - if (!enabled) { return; } - - window.analytics.identify(userId, traits, options, callback); -}; - -/* - * Record actions that a user performs - * - * @param {String} event - Tracked event name, e.g. 'Added to Cart' - * @param {Object} [properties] - Dictionary of event properties, e.g. price, - * productType, etc. - * @param {Object} [options] - Dictionary to enable or disable specific - * integrations for the call - * @param {Function} [callback] - Callback called after a short timeout - * @return void - */ -exports.track = function (event, properties, options, callback) { - if (!enabled) { return; } - - window.analytics.track(event, properties, options, callback); -}; diff --git a/lib/core/auth.js b/lib/core/auth.js index 9b6e9dccf..cbc93214f 100644 --- a/lib/core/auth.js +++ b/lib/core/auth.js @@ -5,7 +5,8 @@ */ var api, - user = null; + user = null, + tracking = require('./tracking'); /* * Get user object if logged in @@ -37,17 +38,30 @@ function auth (config) { // Call async API method to checked if there's a logged in user api.auth.init(function (err, loggedUser) { if (loggedUser) { user = loggedUser; } - if (callback) { callback(); } + if (callback) { callback(loggedUser); } }); } return { init : init, - login : api.auth.login, - logout : api.auth.logout, + login : function (session, callback) { + user = session.user; + tracking.dispatchTrackingEvent('loggedInToKanoWorld'); + tracking.trackVisitType('Logged in'); + api.auth.saveLogin(session.token, function () { + if (callback) { callback(user); } + }); + }, + logout : function (callback) { + user = null; + api.auth.logout(false); + tracking.dispatchTrackingEvent('loggedOutOfKanoWorld'); + tracking.trackVisitType('Logged out'); + if (callback) { callback(); } + }, getState : getState, getUser : getUser }; } -module.exports = auth; \ No newline at end of file +module.exports = auth; diff --git a/lib/core/config.js b/lib/core/config.js index 70fe849be..a250e2cab 100644 --- a/lib/core/config.js +++ b/lib/core/config.js @@ -4,6 +4,8 @@ * Central config inclusive of environment sensitive variable parsed * from rendered page */ +"use strict"; +var langSynonyms = require('../language/synonyms'); module.exports = { "default": { @@ -13,16 +15,39 @@ module.exports = { SEGMENTIO_ID : window.CONFIG ? window.CONFIG.SEGMENTIO_ID : null, TEST_MODE : window.CONFIG ? window.CONFIG.TEST_MODE : false, FACEBOOK_APP_ID : window.CONFIG ? window.CONFIG.FACEBOOK_APP_ID : false, - MAILSERVER : window.CONFIG ? window.CONFIG.MAILSERVER : false, API_URL : window.CONFIG ? window.CONFIG.API_URL : false, - WORLD_URL : window.CONFIG ? window.CONFIG.WORLD_URL : false + WORLD_URL : window.CONFIG ? window.CONFIG.WORLD_URL : false, + CHALLENGES_URL : window.CONFIG ? window.CONFIG.CHALLENGES_URL : false, + UNKNOWN_USER : window.CONFIG ? window.CONFIG.UNKNOWN_USER : null, + DOMAIN_CFG: { + "hourofcode.kano.me": { + 'mapToWorld': 'pixelhack', + 'hideShares': true + }, + "csedweek.kano.me": { + 'mapToWorld': 'pixelhack', + 'hideShares': true + } + }, + DEFAULT_AVATAR : 'https://s3-eu-west-1.amazonaws.com/world.kano.me/users/avatars/563890fec4d6960800c721f7/avatar-circle.png', + languageSynonyms: langSynonyms }, "development": { FACEBOOK_APP_ID : '832712683515218', - MAILSERVER : 'http://localhost:7000/summercamp/send', WORLD_URL : 'http://localhost:5000', - API_URL : 'http://localhost:1234' + API_URL : 'http://localhost:1234', + UNKNOWN_USER : 'tanc' }, - "staging": {}, - "production": {} -}; \ No newline at end of file + "staging": { + FACEBOOK_APP_ID : '832712683515218', + API_URL : 'https://api-staging.kano.me', + WORLD_URL : 'https://world-staging.kano.me', + UNKNOWN_USER : 'tanc'}, + "production": { + FACEBOOK_APP_ID : '832712683515218', + API_URL : 'https://api.kano.me', + WORLD_URL : 'http://world.kano.me', + UNKNOWN_USER : 'tanc' + } + +}; diff --git a/lib/core/social.js b/lib/core/facebook.js similarity index 85% rename from lib/core/social.js rename to lib/core/facebook.js index c507dbf8c..9baf39a0a 100644 --- a/lib/core/social.js +++ b/lib/core/facebook.js @@ -1,18 +1,15 @@ +"use strict"; /* - * Social module - * - * Centralised module to handle social sharing / integration / SDKs + * Facebook module */ -var share = {}; - /* * Share content with given options on Facebook * * @param {Object} options * @param {Function} callback */ -share.facebook = function (options, callback) { +function share(options, callback) { window.FB.ui({ method : 'feed', name : options.title || 'Kano World', @@ -28,7 +25,7 @@ share.facebook = function (options, callback) { return callback(res, !res ? null : null); }); -}; +} /* * Add http protocol to URL if missing @@ -55,8 +52,8 @@ function init() { * I really didn't wanna pollute the main HTML file with this stuff.. */ function initFacebook() { - var facebookRoot = document.createElement('div'); - var appId = window.CONFIG.FACEBOOK_APP_ID; + var facebookRoot = document.createElement('div'), + appId = window.CONFIG.FACEBOOK_APP_ID; facebookRoot.setAttribute('id', 'fb-root'); document.body.appendChild(facebookRoot); @@ -73,7 +70,9 @@ function initFacebook() { (function (d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; - if (d.getElementById(id)) { return; } + if (d.getElementById(id)) { + return; + } js = d.createElement(s); js.id = id; @@ -85,4 +84,4 @@ function initFacebook() { module.exports = { init : init, share : share -}; \ No newline at end of file +}; diff --git a/lib/core/sound.js b/lib/core/sound.js index 6379eba26..73cba1441 100644 --- a/lib/core/sound.js +++ b/lib/core/sound.js @@ -1,5 +1,4 @@ -var play = require('play-audio'), - api, +var api, config = window.CONFIG; var cfg = { @@ -17,12 +16,18 @@ api = require('../api')(cfg); * @return void */ exports.play = function (name) { + var soundPath = 'assets/sounds/' + name + '.mp3', + audio; //Pi is not compatible with HTML5 audio object if (config.OFFLINE) { - api.sound.playSound('assets/sounds/' + name + '.mp3'); + api.sound.playSound(soundPath); } else { - play('/assets/sounds/' + name + '.mp3').play(); + audio = document.createElement('audio'); + + audio.src = '/' + soundPath; + audio.load(); + audio.play(); } -}; \ No newline at end of file +}; diff --git a/lib/core/tracking.js b/lib/core/tracking.js new file mode 100644 index 000000000..7a0c7f37e --- /dev/null +++ b/lib/core/tracking.js @@ -0,0 +1,181 @@ +/* + * Tracking module + * Currently we are using Google Analytics with Google Tag Manager +*/ + +var state = { + account : false, + userProgress : {}, + userType : null, + visitType : null +} + +/** + * Check whether the user has ever had an account + */ +function checkAccount () { + var account = state.account || checkVisitType() === 'Logged in' || isPi(); + if (!account) { + var storedAccount = localStorage.getItem('KW_ACCOUNT'); + account = storedAccount ? JSON.parse(storedAccount) : false; + }; + state.account = account; + return account; +} + +/** + * Function for checking number of challenges completed this session + */ +function checkUserProgress () { + var userProgress = state.userProgress + if (!userProgress.completedStories) { + var storedProgress = sessionStorage.getItem('KW_PROGRESS'); + if (storedProgress) { + userProgress = JSON.parse(storedProgress); + } else { + userProgress = { + completedStories: [] + } + sessionStorage.setItem('KW_PROGRESS', JSON.stringify(userProgress)); + } + } + return userProgress; +} + +/** + * Check whether the user is using a Kano Kit + */ +function checkUserType () { + var userType = state.userType; + if (!userType) { + userType = isPi() ? 'paid' : 'free'; + } + state.userType = userType; + return userType; +} + +/** + * Check whether the user is currently logged in + */ +function checkVisitType () { + var visitType = state.visitType; + if (!visitType) { + var storedToken = localStorage.getItem('KW_TOKEN') || null; + visitType = storedToken ? 'Logged in' : 'Logged out'; + state.visitType = visitType; + } + return visitType; +} + +/** + * Wrapper for dispatching events to GTM datalayer + * + * @param {Object || String} trackingEvent + */ +function dispatchTrackingEvent(trackingEvent) { + var payload = trackingEvent; + if (trackingEvent !== Object(trackingEvent)) { + payload = { + event: trackingEvent + }; + } + window.dataLayer = window.dataLayer || []; + window.dataLayer.push(payload); +} + +/** + * Function to dispatch virtualPageViews with all + * the required information + */ +function dispatchVirtualPageView() { + var payload = { + account : checkAccount(), + challengesCompleted : checkUserProgress().completedStories.length, + event : 'virtualPageView', + userType : checkUserType(), + virtualPageTitle : document.title, + virtualPageURL : window.location.pathname, + visitType : checkVisitType() + }; + this.dispatchTrackingEvent(payload); +} + +/* + * Initialise tracking + * + * @return void + */ +function init () { + checkUserType(); + checkVisitType(); + checkAccount(); + + return; +}; + +/** + * Generic function to check whether the user is using a Kano Kit + * + * note: not currently fullproof + */ + +function isPi () { + var userAgent = window.navigator.userAgent; + return userAgent.indexOf('armv6l') !== -1 || userAgent.indexOf('armv7l') !== -1; +} + +/** + * Update the account based on the user logging in, if there + * wasn't a previous account + */ +function trackAccount () { + if (!state.account) { + state.account = true; + dispatchTrackingEvent({ + account: true + }); + localStorage.setItem('KW_ACCOUNT', true); + } +} + +/** + * Function for update number of challenges completed this session + * + * @param {String} challenge + */ +function trackUserProgress (challenge) { + var userProgress = checkUserProgress(); + if (challenge && userProgress.completedStories.indexOf(challenge) === -1) { + userProgress.completedStories.push(challenge); + } + dispatchTrackingEvent({ + challengesCompleted: userProgress.completedStories.length + }); + sessionStorage.setItem('KW_PROGRESS', JSON.stringify(userProgress)); +} + +/** + * Update the visitType based in user logging in or out and dispatch + * the updated tracking event + * + * @param {String} type + */ +function trackVisitType (type) { + if (state.visitType !== type) { + dispatchTrackingEvent({ + visitType: type + }); + state.visitType = type; + } + if (type === 'Logged in') { + trackAccount(); + } +} + +module.exports = { + dispatchTrackingEvent : dispatchTrackingEvent, + dispatchVirtualPageView : dispatchVirtualPageView, + init : init, + trackUserProgress : trackUserProgress, + trackVisitType : trackVisitType +}; diff --git a/lib/core/twitter.js b/lib/core/twitter.js new file mode 100644 index 000000000..080ecabe2 --- /dev/null +++ b/lib/core/twitter.js @@ -0,0 +1,39 @@ +"use strict"; +function init() { + window.twttr = (function (d, s, id) { + var js, + fjs = d.getElementsByTagName(s)[0], + t = window.twttr || {}; + + if (d.getElementById(id)) { + return t; + } + js = d.createElement(s); + js.id = id; + js.src = "https://platform.twitter.com/widgets.js"; + fjs.parentNode.insertBefore(js, fjs); + + t._e = []; + t.ready = function (f) { + t._e.push(f); + }; + + return t; + }(document, "script", "twitter-wjs")); +} + +function share(callback) { + window.twttr.ready(function (twttr) { + twttr.events.bind('tweet', function (res) { + if (!res) { + return; + } + callback(res); + }); + }); +} + +module.exports = { + init: init, + share: share +}; diff --git a/lib/directive/auth.js b/lib/directive/auth.js new file mode 100644 index 000000000..90621e805 --- /dev/null +++ b/lib/directive/auth.js @@ -0,0 +1,19 @@ +"use strict"; +var i18n = require('../i18n'), + app = require('../app'); + +/* + * Auth directive + * + * Diplay alogin/signup form an authenticate the user + */ +app.directive('authForm', function () { + return { + restrict : 'E', + templateUrl : i18n.getHtmlLocalePath() + '/directive/auth.html', + scope : { + mode: '=' + }, + controller: 'AuthController' + }; +}); diff --git a/lib/directive/display.js b/lib/directive/display.js index 2650941eb..5754731d6 100644 --- a/lib/directive/display.js +++ b/lib/directive/display.js @@ -1,10 +1,13 @@ -var app = require('../app'), +"use strict"; +var i18n = require('../i18n'), + app = require('../app'), session = require('../language/session'), - config = require('../core/config'), fileUtil = require('../util/file'), - td = require('throttle-debounce'); - -var THROTTLE_MS = config.OFFLINE ? 1000 : 1; + td = require('throttle-debounce'), + firstRender = true, + THROTTLE_MS, + VALIDATE_DELAY, + config; /* * Display directive @@ -12,13 +15,16 @@ var THROTTLE_MS = config.OFFLINE ? 1000 : 1; * Handles live updatingm execution of code and rendering coming from its model */ -var firstRender = true; -app.directive('display', function ($window, $timeout) { +app.directive('display', function ($window, $timeout, $rootScope) { + config = $rootScope.cfg; + THROTTLE_MS = config.OFFLINE ? 1000 : 1; + VALIDATE_DELAY = config.OFFLINE ? 1000 : 1; + return { require : '^workspace', restrict : 'E', - templateUrl : '/directive/display.html', + templateUrl : i18n.getHtmlLocalePath() + '/directive/display.html', scope : { source : '=', mode : '=', @@ -27,7 +33,7 @@ app.directive('display', function ($window, $timeout) { }, link : function (scope, element, attrs, workspaceCtl) { - var win = angular.element($window), + var timer, win = angular.element($window), loadInput = element.find('input')[0]; // Attach workspace to scope @@ -109,24 +115,30 @@ app.directive('display', function ($window, $timeout) { settings = scope, err; - // Reset error, evaluate code and catch new potentia;errors - scope.error = null; - err = language.run(scope.source, settings); - scope.cursorPosition = language.cursorPosition || scope.getCenter(); - scope.displayCoordsPos(); - - if (err) { - // Drawing failed - scope.drawingFailed = true; + if (config.OFFLINE) { + clearTimeout(timer); + } - if ('loc' in err) { - displayEditorError(err); + timer = setTimeout(function () { + // Reset error, evaluate code and catch new potentia;errors + scope.error = null; + err = language.run(scope.source, settings); + scope.cursorPosition = language.cursorPosition || scope.getCenter(); + scope.displayCoordsPos(); + + if (err) { + // Drawing failed + scope.drawingFailed = true; + + if ('loc' in err) { + displayEditorError(err); + } + } else { + // Drawing succeded + scope.drawingFailed = false; + workspaceCtl.scope.error = null; } - } else { - // Drawing succeded - scope.drawingFailed = false; - workspaceCtl.scope.error = null; - } + }, VALIDATE_DELAY); }); /* @@ -179,13 +191,15 @@ app.directive('display', function ($window, $timeout) { }); /* - * Set coordinates to display + * Set coordinates to display, round decimal places to 2. * * @param {Number} x * @param {Number} y * @return void */ function setCoordsPosition(x, y) { + x = x % 1 === 0 ? x : Number(x.toFixed(2)); + y = y % 1 === 0 ? y : Number(y.toFixed(2)); scope.coordsPosition = { x: x, y: y }; } @@ -236,7 +250,7 @@ app.directive('display', function ($window, $timeout) { var file = loadInput.files[0], reader = new FileReader(); - reader.onload = function(evt) { + reader.onload = function (evt) { var fileData = evt.target.result; scope.setCode(fileData); @@ -250,12 +264,13 @@ app.directive('display', function ($window, $timeout) { * * @return void */ - scope.save = function() { + scope.save = function () { + var blob; if (config.OFFLINE) { return scope.setOpenModal('save'); } - var blob = new Blob([ scope.source ], { type: 'text/plain' }); + blob = new Blob([scope.source], { type: 'text/plain' }); fileUtil.downloadBlob(blob, 'creation.draw'); }; @@ -263,4 +278,4 @@ app.directive('display', function ($window, $timeout) { init(); } }; -}); \ No newline at end of file +}); diff --git a/lib/directive/editor-input.js b/lib/directive/editor-input.js index 44155d3de..fa7922ebe 100644 --- a/lib/directive/editor-input.js +++ b/lib/directive/editor-input.js @@ -1,4 +1,5 @@ -var app = require('../app'), +var i18n = require('../i18n'), + app = require('../app'), palette = require('../language/modules/palette.json'), docs = require('../../content/docs.json'), equal = require('deep-equal'), @@ -44,7 +45,7 @@ app.directive('editor', function ($rootScope, $controller, $compile) { return { require : '^workspace', restrict : 'E', - templateUrl : '/directive/editor.html', + templateUrl : i18n.getHtmlLocalePath() + '/directive/editor.html', scope : { ngModel : '=', editable : '=', @@ -605,4 +606,4 @@ function getAutoCompleteList() { }); return out; -} \ No newline at end of file +} diff --git a/lib/directive/editor.js b/lib/directive/editor.js index f7653bcfd..8222b1d91 100644 --- a/lib/directive/editor.js +++ b/lib/directive/editor.js @@ -1,6 +1,9 @@ -var app = require('../app'), +"use strict"; + +var i18n = require('../i18n'), + app = require('../app'), palette = require('../language/modules/palette.json'), - config = require('../core/config'), + config, docs = require('../../content/docs.json'), equal = require('deep-equal'), domUtil = require('../util/dom'), @@ -8,22 +11,15 @@ var app = require('../app'), tokenHandlers = { number : require('../editor/token-handler/NumberHandler'), color : require('../editor/token-handler/ColorHandler') - }; - -/* - * Disable number handler on Pi version - */ -if (config.OFFLINE) { - delete tokenHandlers.number; -} + }, /* * Editor directive * - * Initialises, configures and binds ACE editor and binds its value to a model + * Initialises, configures and binds ACE editor and binds its value to a model */ -var EDITOR_DEFAULTS = { + EDITOR_DEFAULTS = { mode : 'ace/mode/coffee', theme : 'ace/theme/dawn', wrapMode : false, @@ -45,14 +41,23 @@ var EDITOR_DEFAULTS = { * @return void */ function initialiseEditor() { - langTools.setCompleters([ { getCompletions: getAutoComplete } ]); + langTools.setCompleters([{ getCompletions: getAutoComplete }]); } -app.directive('editor', function ($rootScope, $controller, $compile) { +app.directive('editor', function ($rootScope, $controller, $compile, $routeParams, contentService) { + config = $rootScope.cfg; + docs = docs[i18n.getLanguage() || 'en']; + /* + * Disable number handler on Pi version + */ + if (config.OFFLINE) { + delete tokenHandlers.number; + } + return { require : '?workspace', restrict : 'E', - templateUrl : '/directive/editor.html', + templateUrl : i18n.getHtmlLocalePath() + '/directive/editor.html', scope : { ngModel : '=', editable : '=', @@ -87,6 +92,20 @@ app.directive('editor', function ($rootScope, $controller, $compile) { scope.ngModel = scope.ngModel || editorElement.innerHTML; // Select first docs category scope.selectDocsCategory(scope.docs[0]); + // Set guide to an empty string + scope.guide = ''; + // Set challengeId & worldId from the route params + scope.challengeId = $routeParams.id; + scope.worldId = $routeParams.world; + // Get the guide from a challenge + if (scope.worldId && scope.challengeId) { + scope.teachers_guide = $rootScope.cfg.OFFLINE ? '' : $rootScope.selectedWorld.teachers_guide; + contentService.challenge.get(scope.worldId, scope.challengeId).then(function (challenge) { + if (challenge.guide) { + scope.guide = $rootScope.cfg.OFFLINE ? '' : challenge.guide; + } + }); + } // Initialise docs tab scrollable pane initScrollablePane(); // Initialise ACE editor @@ -371,11 +390,12 @@ app.directive('editor', function ($rootScope, $controller, $compile) { } function onCursorMove() { - if (preventMove || !scope.editable) { return; } - var range = engine.getSelectionRange(), token; + if (preventMove || !scope.editable) { return; } + + // Return if selection is active if (!equal(range.start, range.end)) { return; } @@ -558,6 +578,9 @@ app.directive('editor', function ($rootScope, $controller, $compile) { */ function onMouseDownAnywhere(e) { lastFocused = e.target; + if (tokenHandler && !domUtil.isIncludedBy(lastFocused, editorElement) && !domUtil.isIncludedBy(lastFocused, tokenHandler.el)) { + closeTokenHandler(); + } } /* diff --git a/lib/directive/export-modal.js b/lib/directive/export-modal.js index 89da4deb5..3e0750cfb 100644 --- a/lib/directive/export-modal.js +++ b/lib/directive/export-modal.js @@ -1,7 +1,9 @@ +"use strict"; var api, - app = require('../app'); - -var WALLPAPER_RATIOS = { + i18n = require('../i18n'), + app = require('../app'), + tracking = require ('../core/tracking'), + WALLPAPER_RATIOS = { '1024': { width : 1024, height : 768 @@ -22,10 +24,10 @@ var WALLPAPER_RATIOS = { * Share modal directive under display */ -app.directive('exportModal', function ($rootScope, $location, $routeParams) { +app.directive('exportModal', function ($rootScope, $routeParams) { return { restrict : 'E', - templateUrl : '/directive/export-modal.html', + templateUrl : i18n.getHtmlLocalePath() + '/directive/export-modal.html', scope : { display : '=', action : '=' @@ -38,7 +40,11 @@ app.directive('exportModal', function ($rootScope, $location, $routeParams) { // Setup scope scope.open = false; scope.meta = {}; + scope.loading = false; + scope.loggedIn = $rootScope.loggedIn ? true : false, + scope.optional = ($rootScope.selectedWorld ? ($rootScope.selectedWorld.share_strategy === 'optional') : ''); $rootScope.successful = false; + $rootScope.creation = null; // Initialise init(); @@ -47,11 +53,6 @@ app.directive('exportModal', function ($rootScope, $location, $routeParams) { function init() { var _shareCache; - var location = $location.url(); - if (location.match(/summercamp/)) { - scope.category = true; - } - // Next tick.. setTimeout(function () { if (scope.display.workspace && scope.display.workspace.scope._shareCache) { @@ -62,12 +63,19 @@ app.directive('exportModal', function ($rootScope, $location, $routeParams) { }); } - $rootScope.$watch('shareModal', function (val) { + $rootScope.$watch('exportModal', function (val) { if (val) { - open(); + if (scope.display.mode === 'challenge') { + scope.display.setOpenModal('share'); + } } }); + scope.skipSharing = function () { + scope.close(); + $rootScope.openNextModal(); + }; + /* * Submit form * @@ -78,6 +86,9 @@ app.directive('exportModal', function ($rootScope, $location, $routeParams) { return showError('Please choose a title'); } else if (scope.meta.title.length > 100) { return showError('Title is too long'); + } else if (scope.meta.description && + scope.meta.description.length > 500) { + return showError('Description is too long'); } resetError(); @@ -91,6 +102,7 @@ app.directive('exportModal', function ($rootScope, $location, $routeParams) { */ function performAction() { if (scope.action === 'share') { + scope.loading = true; share(); } else if (scope.action === 'save') { save(); @@ -135,10 +147,10 @@ app.directive('exportModal', function ($rootScope, $location, $routeParams) { * * @return void */ - scope.close = function() { + scope.close = function () { scope.open = false; - $rootScope.shareModal = false; scope.display.openModal = null; + $rootScope.exportModal = false; }; /* @@ -157,7 +169,7 @@ app.directive('exportModal', function ($rootScope, $location, $routeParams) { */ function bind() { - // Open or close on parent display modal state change + // Open or close on parent display modal state change scope.display.$watch('openModal', function (modalId) { if (modalId === scope.action && !scope.open) { open(); @@ -188,40 +200,54 @@ app.directive('exportModal', function ($rootScope, $location, $routeParams) { * @return void */ function share() { - var title = scope.meta.title || '', + var creation, + options, + title = scope.meta.title || '', code = scope.display.source, description = scope.meta.description || '', - challengeNo = $routeParams.id; + challengeId = $routeParams.id, + world = $routeParams.world; if (!$rootScope.loggedIn) { // Store current details and prompt login if not currently logged in - var options = { + options = { title : title, code : code, - description : description + description : description, + challengeId : challengeId }; - if (scope.category) { - options.challengeNo = challengeNo; - } - localStorage._shareCache = JSON.stringify(options); - api.auth.login(); + $rootScope.auth.openModal(); + scope.loading = false; return; } api.progress.trackLinesOfCode(code.split('\n').length); - if (scope.category) { - api.challengeIO.share(title, code, description, scope.imageURL, challengeNo); - $rootScope.successful = true; - } - else { - api.challengeIO.share(title, code, description, scope.imageURL); - } - - scope.close(); + api.challengeIO.share(title, code, description, scope.imageURL, world, challengeId, function (data) { + if (data.body === '') { + scope.loading = false; + $rootScope.successful = true; + scope.close(); + } else if (data.body.item) { + scope.loading = false; + creation = data.body.item; + creation.world = $rootScope.selectedWorld ? $rootScope.selectedWorld.name : null; + creation.username = $rootScope.user.username; + creation.url = $rootScope.cfg.WORLD_URL + "/shared/" + creation.slug; + $rootScope.creation = creation; + $rootScope.successful = true; + scope.close(); + } else if (data.body && !data.body.item) { + scope.loading = false; + $rootScope.successful = true; + scope.close(); + } + tracking.dispatchTrackingEvent('worldInternalShare'); + $rootScope.$apply(); + }); } /* @@ -245,7 +271,7 @@ app.directive('exportModal', function ($rootScope, $location, $routeParams) { * * @return void */ - scope.exportWallpaper = function() { + scope.exportWallpaper = function () { var wallpapers = getWallpapers(); api.challengeIO.saveWallpaper( @@ -263,9 +289,10 @@ app.directive('exportModal', function ($rootScope, $location, $routeParams) { * @return void */ function getWallpapers() { - var canvas = scope.display.canvas; - - var original = { + var ratio, + setCanvas, + canvas = scope.display.canvas, + original = { width : canvas.width, height : canvas.height }, @@ -273,7 +300,7 @@ app.directive('exportModal', function ($rootScope, $location, $routeParams) { tempCtx = tempCanvas.getContext('2d'), wallpapers = {}; - var setCanvas = function(size) { + setCanvas = function (size) { var scaleFactor = Math.min( size.width / original.width, size.height / original.height @@ -296,7 +323,7 @@ app.directive('exportModal', function ($rootScope, $location, $routeParams) { tempCtx.drawImage(canvas, offset.x, offset.y); }; - for (var ratio in WALLPAPER_RATIOS) { + for (ratio in WALLPAPER_RATIOS) { if (WALLPAPER_RATIOS.hasOwnProperty(ratio)) { setCanvas(WALLPAPER_RATIOS[ratio]); wallpapers[ratio] = tempCanvas.toDataURL('image/png'); diff --git a/lib/directive/progress-circle.js b/lib/directive/progress-circle.js index 5ae688911..752b4eb10 100644 --- a/lib/directive/progress-circle.js +++ b/lib/directive/progress-circle.js @@ -1,4 +1,5 @@ -var app = require('../app'); +var i18n = require('../i18n'), + app = require('../app'); var XMLNS = 'http://www.w3.org/2000/svg', RADIUS = 30, @@ -13,7 +14,7 @@ var XMLNS = 'http://www.w3.org/2000/svg', app.directive('progressCircle', function () { return { restrict : 'E', - templateUrl : '/directive/progress-circle.html', + templateUrl : i18n.getHtmlLocalePath() + '/directive/progress-circle.html', scope : { value : '=', max : '=' diff --git a/lib/directive/social.js b/lib/directive/social.js new file mode 100644 index 000000000..07a0799aa --- /dev/null +++ b/lib/directive/social.js @@ -0,0 +1,105 @@ +"use strict"; +var i18n = require('../i18n'), + app = require('../app'), + tracking = require('../core/tracking'), + notify = require('../api/notify'); + +/* + * Social sharing directive + */ + +app.directive('socialSharing', function ($rootScope, socialService, emailService) { + return { + restrict: 'E', + templateUrl : i18n.getHtmlLocalePath() + '/directive/social.html', + scope: { + type: '=' + }, + link : function (scope) { + var cover_url = 'http://art.kano.me/assets/challenges/images/' + $rootScope.selectedWorld.cover + '@2x.png'; + function init() { + socialService.init(); + socialService.twitter.share(function (res) { + if (!res) { + return; + } + tracking.dispatchTrackingEvent('worldExternalShare'); + return; + }); + } + + init(); + + scope.loading = false; + scope.mailModal = false; + scope.buildURL = socialService.twitter.build; + scope.mailForm = { + title: $rootScope.selectedWorld.name, + type: 'world-invite', + description: $rootScope.selectedWorld.socialText ? $rootScope.selectedWorld.socialText.email : null, + cover_url: cover_url, + url: 'http://art.kano.me/' + $rootScope.selectedWorld.id + }; + + scope.open = function () { + scope.mailModal = true; + }; + scope.close = function () { + scope.mailModal = false; + }; + scope.facebookShare = function () { + var options = { + title : $rootScope.selectedWorld.name + ' on Make Art', + url : 'http://art.kano.me/challenges/' + $rootScope.selectedWorld.id, + picture : cover_url, + caption : 'Shared by ' + $rootScope.user.username + ' via ' + $rootScope.selectedWorld.name, + text : $rootScope.selectedWorld.socialText.facebook + }; + + socialService.facebook.share(options, function (err, res) { + if (!res || err) { + return err; + } + tracking.dispatchTrackingEvent('worldExternalShare'); + }); + }; + + scope.sendMail = function () { + var emailObj; + if (!scope.mailForm.email || !scope.mailForm.description) { + return; + } else { + if (!emailService.validate(scope.mailForm.email)) { + scope.error = 'Invalid email address'; + return; + } + scope.error = ''; + scope.loading = true; + scope.mailForm.user_email = $rootScope.user.email; + scope.mailForm.username = $rootScope.user.username; + emailObj = emailService.buildObject(scope.mailForm); + + emailService.send(emailObj, function (res) { + if (res.status !== 200) { + scope.loading = false; + scope.$apply(); + return notify.failure(res); + } + emailService.reset(scope.mailForm); + tracking.dispatchTrackingEvent('worldExternalShare'); + + scope.loading = false; + scope.close(); + scope.$apply(); + + return notify.success(); + }, function (error) { + scope.loading = false; + scope.$apply(); + return notify.failure(error); + }); + } + }; + } + }; +}); diff --git a/lib/editor/token-handler/BaseHandler.js b/lib/editor/token-handler/BaseHandler.js index c41ee5aad..d92a5999b 100644 --- a/lib/editor/token-handler/BaseHandler.js +++ b/lib/editor/token-handler/BaseHandler.js @@ -1,3 +1,4 @@ +"use strict"; /* * BaseHandler class * @@ -10,7 +11,8 @@ * token. */ -var SPACING = 15; +var SPACING = 15, + _ = require('lodash'); /* * BaseHandler constructor @@ -81,13 +83,17 @@ BaseHandler.prototype.getTemplate = function () { BaseHandler.prototype.resize = function () { // Next tick.. setTimeout(function () { - if (!this.el || !this.token.el) { return; } + var bbox, tokenBbox, x, y; + + if (!this.el || !this.token.el) { + return; + } this.el.style.display = 'block'; - var bbox = this.el.getBoundingClientRect(), - tokenBbox = this.token.el.getBoundingClientRect(), - x = tokenBbox.left + tokenBbox.width / 2 - bbox.width / 2 + document.body.scrollLeft, - y = tokenBbox.top - bbox.height - SPACING + document.body.scrollTop; + bbox = this.el.getBoundingClientRect(); + tokenBbox = this.token.el.getBoundingClientRect(); + x = tokenBbox.left + tokenBbox.width / 2 - bbox.width / 2 + document.body.scrollLeft; + y = tokenBbox.top - bbox.height - SPACING + document.body.scrollTop; this.el.style.left = Math.floor(x) + 'px'; this.el.style.top = Math.floor(y) + 'px'; @@ -109,7 +115,15 @@ BaseHandler.prototype.close = function () { * @return {Object} */ BaseHandler.prototype.getTokenElement = function () { - var lineElement = this.getLineElement(); + var lineElement = this.getLineElement(), + token = this.token; + + if (lineElement.childNodes[this.token.index].nodeName === '#text') { + this.token.index = _.findIndex(lineElement.childNodes, function (el, index) { + return (el.innerText === token.value) && (index >= token.index); + }); + } + return lineElement.childNodes[this.token.index]; }; @@ -124,14 +138,14 @@ BaseHandler.prototype.getLineElement = function () { * @return [{Object}] */ BaseHandler.prototype.getAllTokens = function () { - var lines = this.session.getValue().split('\n'), + var i, lines = this.session.getValue().split('\n'), tokens = []; - for (var i = 0; i < lines.length; i += 1) { + for (i = 0; i < lines.length; i += 1) { tokens = tokens.concat(this.session.getTokens(i)); } return tokens; }; -module.exports = BaseHandler; \ No newline at end of file +module.exports = BaseHandler; diff --git a/lib/i18n.js b/lib/i18n.js new file mode 100644 index 000000000..bc6e21dc4 --- /dev/null +++ b/lib/i18n.js @@ -0,0 +1,54 @@ +var url = require('url'); + +var SUPPORTED_LOCALES = [ + 'ja', + 'en', + 'es', +]; + +function getLanguage() { + var parsedUrl = url.parse(window.location.href, true); + + if (parsedUrl.query['lang'] !== undefined) { + var lang = parsedUrl.query['lang']; + if (SUPPORTED_LOCALES.indexOf(lang) > -1) { + return lang; + } + // not in supported languages so fall back to normal detection + } + + var language = window.navigator.languages ? window.navigator.languages[0] : + window.navigator.userLanguage || window.navigator.language || 'en', + p = language.indexOf('-'); + + // check if full locale is supported + if (SUPPORTED_LOCALES.indexOf(language) > -1) { + return language; + } + + language = language.toLowerCase(); + + // otherwise check that if just language is supported + language = (p > -1) ? language.substr(0, p) : language; + if (SUPPORTED_LOCALES.indexOf(language) > -1) { + return language; + } + // language is not supported so default to 'en' + return 'en'; +} + +function getChallengeLocalePath () { + var language = getLanguage(); + return language === 'en' ? '' : '/locales/' + language; +} + +function getHtmlLocalePath () { + var language = getLanguage(); + return '/locales/' + language; +} + +module.exports = { + getLanguage: getLanguage, + getHtmlLocalePath: getHtmlLocalePath, + getChallengeLocalePath: getChallengeLocalePath +}; diff --git a/lib/index.js b/lib/index.js index 0d0957eb3..f14c8f1c2 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,3 +1,4 @@ +"use strict"; /* * Main Index module * @@ -14,6 +15,8 @@ require('./routes'); // Service require('./service/email'); +require('./service/content'); +require('./service/social'); // Controllers require('./controller/main'); @@ -27,10 +30,14 @@ require('./controller/share'); require('./controller/local-launch'); require('./controller/examples'); require('./controller/promo-popup'); +require('./controller/feedback'); +require('./controller/auth-form'); // Directives require('./directive/workspace'); require('./directive/editor'); require('./directive/display'); require('./directive/progress-circle'); -require('./directive/export-modal'); \ No newline at end of file +require('./directive/export-modal'); +require('./directive/auth'); +require('./directive/social'); diff --git a/lib/language/index.js b/lib/language/index.js index 40cde6bcc..1b945556d 100644 --- a/lib/language/index.js +++ b/lib/language/index.js @@ -5,14 +5,10 @@ */ var coffee = require('coffee-script'), - config = require('../core/config'), + config, session = require('./session'), - modules = require('./modules/index'); - -var ERROR_LOC_REGEX = /\s+at Object\.eval \((.+):(\d+):(\d+)\)/, - FORLOOP_REGEX = /^\s*for\s+([a-zA-Z0-9_\\@\\$])+\s+in\s*\s*\[([a-zA-Z0-9_\s\-\*\+\.\\]+)\]\s*$/, - FUNC_REGEX = /^([A-Za-z0-9_]+)(\(.*\))/, - VAR_DEC_REGEX = /^([A-Za-z0-9_]+)=(.+)/; + modules = require('./modules/index'), + ERROR_LOC_REGEX = /\s+at Object\.eval \((.+):(\d+):(\d+)\)/; /* * Reset current drawing session @@ -21,6 +17,7 @@ var ERROR_LOC_REGEX = /\s+at Object\.eval \((.+):(\d+):(\d+)\)/, * @return void */ function resetSession(settings) { + "use strict"; session.ctx = settings.ctx; session.width = settings.width; session.height = settings.height; @@ -40,6 +37,7 @@ function resetSession(settings) { function run(code, settings) { var compiled; + config = window.CONFIG; code = preCompile(code || ''); // Reset session @@ -85,22 +83,13 @@ function run(code, settings) { } /* - * Precompile step - Add forLoopRecorder functions and empty blocks after loops + * Precompile step - Cleans the code up * * @param {String} code * @return {String} */ function preCompile(code) { - var lines, - i, - line, - forMatch, - varMatch, - funcMatch, - recLine, - voidLine, - funcName, - indent; + "use strict"; code = code // Only use fat arrow (Block access to Window through `this`) .replace(/->/g, '=>') @@ -109,62 +98,7 @@ function preCompile(code) { return start + '->'; }); - - //this array will contain those functions which are customly defined by the user - session.declaredFunctions = []; - - lines = code.split('\n'); - - //if it's an if - for (i = 0; i < lines.length; i += 1) { - line = lines[i]; - - forMatch = line.match(FORLOOP_REGEX); - varMatch = line.replace(/ /g, '').match(VAR_DEC_REGEX); - funcMatch = line.replace(/ /g, '').match(FUNC_REGEX); - - if (forMatch) { - indent = getIndentation(line); - - recLine = 'recordForLoop("' + forMatch[1] + '", "' + forMatch[2] + '")'; - recLine = setIndentation(recLine, indent); - voidLine = setIndentation('" "', indent + 1); - - lines[i] = [ recLine, lines[i], voidLine ].join('\n'); - } else if (varMatch) { - if (varMatch[2].indexOf('=>') > -1) { - //it's a function declaration - session.declaredFunctions.push(varMatch[1]); - } - indent = getIndentation(line); - recLine = 'recordVar("'+ varMatch[1] +'", "' + varMatch[2].replace(/\"/g, '\\\"') +'")'; - recLine = setIndentation(recLine, indent); - - lines[i] = [recLine, lines[i]].join('\n'); - } else if (funcMatch) { - //we're hitting this branch only if it's a function call not part of a variable assignment - funcName = funcMatch[1]; - if (session.declaredFunctions.indexOf(funcName) > -1) { - indent = getIndentation(line); - recLine = 'recordFunc("'+ funcMatch[1] +'", "' + funcMatch[2].replace(/\"/g, '\\\"') +'")'; - recLine = setIndentation(recLine, indent); - lines[i] = [recLine, lines[i]].join('\n'); - - } - - } - - } - - return lines.join('\n'); -} - -function setIndentation(str, tabs) { - return new Array(tabs + 1).join(' ') + str; -} - -function getIndentation(str) { - return Math.floor(str.match(/^\s*[!\s]*/)[0].replace(/\t/g, ' ').length / 4); + return code; } /* @@ -174,8 +108,11 @@ function getIndentation(str) { * @return [{Number}] */ function getErrorLocation(err) { + "use strict"; var trace, - traceTop; + traceTop, + x, + y; trace = err.stack.split('\n').map(function (line) { return line.match(ERROR_LOC_REGEX); @@ -186,10 +123,10 @@ function getErrorLocation(err) { if (trace.length > 0) { traceTop = trace[0]; - var x = parseInt(traceTop[2], 10) -1, - y = parseInt(traceTop[3], 10) - 1; + x = parseInt(traceTop[2], 10) - 1; + y = parseInt(traceTop[3], 10) - 1; - return [ x, y ]; + return [x, y]; } else { return null; } @@ -202,19 +139,32 @@ function getErrorLocation(err) { * @return {String} */ function strip(code) { + "use strict"; if (code) { code = code // Remove multi-line comments .replace(/###((.|\n)*)###/gm, '') // Remove inline comments - .replace(/(#.*(\n|$))/g, '') + .replace(/[^' ](#.*)|^[ ]*(#.*)($|\n)/g, '') // Remove spaces .replace(/^\s*[\r\n]/gm, ''); // Trim spaces on edges return code.trim(); } - return code; + return code; +} + + +function checkValidity(code) { + "use strict"; + var compiled; + try { + compiled = coffee.compile(code || '', { sourceMap: true }); + return true; + } catch (err) { + return false; + } } /* @@ -256,5 +206,7 @@ function evalInContext(code) { module.exports = { run : run, - strip : strip + strip : strip, + checkValidity: checkValidity, + evalInContext: evalInContext }; diff --git a/lib/language/modules/colors.js b/lib/language/modules/colors.js index b90eeb2c9..ddaac1219 100644 --- a/lib/language/modules/colors.js +++ b/lib/language/modules/colors.js @@ -136,6 +136,31 @@ function rotate(color, amount) { return Color(color).rotate(amount).rgbaString(); } +/* + * Rotate color hue by given amount + * + * @param {Number} red + * @param {Number} green + * @param {Number} blue + * @return {String} + */ +function rgb(red, green, blue) { + return "rgb(" + red + ", " + green + ", " + blue + ")"; +} + +/* + * Rotate alpha color hue by given amount + * + * @param {Number} red + * @param {Number} green + * @param {Number} blue + * @param {Number} alpha + * @return {String} + */ +function rgba(red, green, blue, alpha) { + return "rgba(" + red + ", " + green + ", " + blue + ", " + alpha + ")"; +} + /* * Get color opacity or set it to value if it's passed * @@ -233,9 +258,11 @@ module.exports = { hue : hue, setTransparency : setTransparency, rotate : rotate, + rgb : rgb, + rgba : rgba, opacity : opacity, opacize : opacize, transparentize : transparentize, setBrightness : setBrightness, setSaturation : setSaturation -}; \ No newline at end of file +}; diff --git a/lib/language/modules/palette.json b/lib/language/modules/palette.json index 22a40a1dd..2cf513c92 100644 --- a/lib/language/modules/palette.json +++ b/lib/language/modules/palette.json @@ -13,6 +13,7 @@ "brown" : "#A36A42", "burlywood" : "#DEB887", "cadetblue" : "#5F9EA0", + "charcoal" : "#333333", "chartreuse" : "#7FFF00", "chocolate" : "#D2691E", "coral" : "#FF7F50", @@ -136,6 +137,7 @@ "steelblue" : "#4682B4", "tan" : "#D2B48C", "teal" : "#008080", + "transparent" : "rgba(0,0,0,0)", "thistle" : "#D8BFD8", "tomato" : "#FF6347", "turquoise" : "#40E0D0", diff --git a/lib/language/modules/security.js b/lib/language/modules/security.js index 8d6fec684..54caa0b6a 100644 --- a/lib/language/modules/security.js +++ b/lib/language/modules/security.js @@ -6,10 +6,15 @@ var OVERRIDES = [ 'window', + 'top', 'Window', + 'Document', 'document', 'console', 'alert', + 'addEventListener', + 'removeEventListener', + 'releaseEvents', 'localStorage', 'KW_SDK', 'angular', @@ -17,8 +22,20 @@ var OVERRIDES = [ '$', 'open', 'location', + 'parent', + 'postMessage', + 'print', + 'profile', + 'prompt', 'requestAnimationFrame', 'cancelAnimationFrame', + 'scroll', + 'scrollBy', + 'scrollTo', + 'scrollX', + 'scrollY', + 'session', + 'sessionStorage', 'setTimeout', 'setInterval' ]; @@ -28,4 +45,4 @@ module.exports = {}; // Build exports object OVERRIDES.forEach(function (key) { module.exports[key] = null; -}); \ No newline at end of file +}); diff --git a/lib/language/synonyms.json b/lib/language/synonyms.json new file mode 100644 index 000000000..6c779a99f --- /dev/null +++ b/lib/language/synonyms.json @@ -0,0 +1,4 @@ +{ + "color": ["colour"], + "grey": ["gray"] +} diff --git a/lib/routes.js b/lib/routes.js index 529a615d3..40fc886b7 100644 --- a/lib/routes.js +++ b/lib/routes.js @@ -1,4 +1,5 @@ -var app = require('./app'); +var i18n = require('./i18n'), + app = require('./app'); /* * Routes module @@ -9,39 +10,44 @@ var app = require('./app'); app.config(function ($routeProvider) { $routeProvider - // Challenge view (Defaults to first challenge) - .when('/challenge', { - templateUrl : '/challenge.html', - controller : 'ChallengeController' + .when('/', { + template: '', + controller : 'MainController' }) // Challenges selection view .when('/challenges', { - templateUrl : '/challenges.html', + templateUrl : i18n.getHtmlLocalePath() + '/challenges.html', controller : 'ChallengesController' }) // Challenge view (With challenge ID) - .when('/challenge/:id', { - templateUrl : '/challenge.html', + .when('/challenge/:world/:id', { + templateUrl : i18n.getHtmlLocalePath() + '/challenge.html', controller : 'ChallengeController' }) + // Challenge view (With only worldID) + .when('/challenges/:world/', { + templateUrl : i18n.getHtmlLocalePath() + '/challenges.html', + controller : 'ChallengesController' + }) + // Playground view .when('/playground', { - templateUrl : '/playground.html', + templateUrl : i18n.getHtmlLocalePath() + '/playground.html', controller : 'PlaygroundController' }) // Load share item by ID view .when('/share/:id', { - templateUrl : '/share.html', + templateUrl : i18n.getHtmlLocalePath() + '/share.html', controller : 'ShareController' }) // Launch a local share .when('/localLoad/:path*', { - templateUrl : '/share.html', + templateUrl : i18n.getHtmlLocalePath() + '/share.html', controller : 'LocalLaunchController' }) diff --git a/lib/service/content.js b/lib/service/content.js new file mode 100644 index 000000000..49afa39f2 --- /dev/null +++ b/lib/service/content.js @@ -0,0 +1,177 @@ +"use strict"; +var app = require("../app"), + i18n = require("../i18n"), + _ = require('lodash'), + config = window.CONFIG; + +app.factory('contentService', function ($http, $q, $rootScope) { + function getWorlds () { + var defer = $q.defer(), + url = config.CHALLENGES_URL + i18n.getChallengeLocalePath() + "/index.json"; + $http({ + method: 'GET', + url: url + }).then(function successCallback(response) { + defer.resolve(response.data.worlds); + }, function errorCallback(response) { + defer.reject(response); + }); + return defer.promise; + } + + function getWorld(contentUrl) { + var defer = $q.defer(), + url = config.CHALLENGES_URL + i18n.getChallengeLocalePath() + "/" + contentUrl + "/index.json"; + $http({ + method: 'GET', + url: url + }).then(function successCallback(response) { + + defer.resolve(response.data); + + }, function errorCallback(response) { + + defer.reject(response); + + }); + return defer.promise; + } + + function getChallenge(world, challenge_id) { + var defer = $q.defer(), + url = config.CHALLENGES_URL + i18n.getChallengeLocalePath() + "/worlds/" + world + "/" + challenge_id + ".json"; + $http({ + method: 'GET', + url: url + }).then(function successCallback(response) { + defer.resolve(response.data); + }, function errorCallback(response) { + defer.reject(response); + }); + return defer.promise; + } + + function isChallengeLocked(challenge) { + var index = challenge.index, + now = new Date(), + start_date = challenge.start_date; + + if (start_date) { + start_date = new Date(start_date); + if (start_date > now) { + return true; + } + } + + return index > $rootScope.inWorldProgress.challengeNo; + } + + function isChallengeCurrent(challenge) { + return challenge.index === $rootScope.inWorldProgress.challengeNo; + } + + function isChallengeCompleted(challenge) { + return challenge.index < $rootScope.inWorldProgress.challengeNo; + } + + function isWorldLocked(world) { + var now = new Date(), + date_status, + start_date; + + if (world.start_date) { + start_date = new Date(world.start_date); + date_status = start_date >= now; + + if (date_status) { + return true; + } + } + + if (world.dependency) { + return !areDependenciesCompleted(world); + } + + return false; + } + + function isWorldCurrent(world) { + return (world.type === "normal") && isWorldLocked(world) && !isWorldCompleted(world); + } + + function isWorldCompleted(world) { + var progress = getProgressGroup(world.id); + if (progress.challengeNo > world.challenges_num) { + return true; + } + return false; + } + + function areDependenciesCompleted(world) { + var completed = true; + if (world.dependency) { + world.dependency.forEach(function (worldId) { + completed = completed && isWorldCompleted(getWorldById(worldId)); + }); + } + return completed; + } + + function getWorldById(id) { + var worldObj = _.filter($rootScope.worlds, function (world) { + return world.id === id ? world : null; + }); + return worldObj[0]; + } + + function getProgressGroup(worldId) { + var progressGroup = $rootScope.progress.groups[worldId]; + + if (!progressGroup) { + progressGroup = {challengeNo: 1}; + $rootScope.progress.groups[worldId] = progressGroup; + } + + return progressGroup; + } + + function isWorldVisibile(world) { + return world.visibility !== 'hidden'; + } + + function isCertificateAchieved(world) { + var progress; + + if (world) { + progress = getProgressGroup(world.id); + + if (world.certificate_after && progress.challengeNo > world.certificate_after) { + return true; + } + } + return false; + } + + + return { + challenge: { + get : getChallenge, + isLocked : isChallengeLocked, + isCurrent : isChallengeCurrent, + isCompleted : isChallengeCompleted + }, + world: { + get : getWorld, + getById : getWorldById, + getAll : getWorlds, + isLocked : isWorldLocked, + isCurrent : isWorldCurrent, + isCompleted : isWorldCompleted, + isVisible : isWorldVisibile, + isCertAchieved: isCertificateAchieved + }, + progress: { + get : getProgressGroup + } + }; +}); diff --git a/lib/service/email.js b/lib/service/email.js index 50b965927..4a5a60217 100644 --- a/lib/service/email.js +++ b/lib/service/email.js @@ -1,48 +1,41 @@ +"use strict"; var app = require('../app'); -app.factory('emailService', function ($http, $rootScope){ - function resetFields (item) { - item.name = ''; - item.message = ''; - item.email = ''; - } +app.factory('emailService', function ($rootScope) { + function resetFields(item) { + item.email = ''; + } - function buildEmailObject (item) { - return { - name : item.name ? item.name : item.username, - message : item.message, - title : item.shareTitle ? item.shareTitle : item.short_title, - world_url : item.world_url, - cover_url : item.cover_url ? item.cover_url : 'http://art.kano.me/' + item.img, - user_email : item.user_email, - email : item.email - }; - } + function buildEmailObject(item) { + return { + type : item.type, + options : { + from_name : item.username, + from_email : item.user_email, + to_name : item.to_name || null, + to_email : item.email, + message : item.description || null, + title : item.title || null, + url : item.url || null, + cover_url : item.cover_url || null + } + }; + } - function emailer (item, successCB, errorCB) { - var host = $rootScope.cfg.MAILSERVER; + function emailer(item, successCB, errorCB) { + $rootScope.api.mailer(item) + .then(successCB, errorCB); + } - var req = { - method : 'POST', - url : host, - headers : { - 'Content-Type': 'application/json' - }, - data : JSON.stringify(item) - }; + function validateEmail(email) { + var regExp = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; + return regExp.test(email); + } - $http(req).then(successCB, errorCB); - } - - function validateEmail(email) { - var regExp = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; - return regExp.test(email); - } - - return { - reset : resetFields, - buildObject : buildEmailObject, - send : emailer, - validate : validateEmail - }; -}); \ No newline at end of file + return { + reset : resetFields, + buildObject : buildEmailObject, + send : emailer, + validate : validateEmail + }; +}); diff --git a/lib/service/social.js b/lib/service/social.js new file mode 100644 index 000000000..c8c3a3638 --- /dev/null +++ b/lib/service/social.js @@ -0,0 +1,29 @@ +"use strict"; +var app = require('../app'), + facebook = require('../core/facebook'), + twitter = require('../core/twitter'); + +app.factory('socialService', function ($rootScope) { + function init() { + facebook.init(); + twitter.init(); + } + + function buildURL(creation) { + var text; + if (creation) { + text = "For #" + creation.world.replace(/ /g, '') + " with @TeamKano I created " + creation.title + " on Make Art.\n" + creation.url; + } else { + text = $rootScope.selectedWorld.socialText.twitter; + } + return encodeURI("https://twitter.com/intent/tweet?text=" + text).replace(/#/g, '%23'); + } + + twitter.build = buildURL; + + return { + init: init, + facebook: facebook, + twitter: twitter + }; +}); diff --git a/lib/util/string.js b/lib/util/string.js index 442f95e34..052489bd1 100644 --- a/lib/util/string.js +++ b/lib/util/string.js @@ -1,3 +1,5 @@ +"use strict"; + /* * String utilities * @@ -13,4 +15,13 @@ */ exports.splice = function (str, index, count, add) { return str.slice(0, index) + (add || '') + str.slice(index + count); -}; \ No newline at end of file +}; + +/** + * Escapes a string to be used as RegExp + * @param {string} value The string + * @return {string} The escaped string + */ +exports.escapeRegex = function (value) { + return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&"); +}; diff --git a/locales/en/challenge.json b/locales/en/challenge.json new file mode 100644 index 000000000..db0f47962 --- /dev/null +++ b/locales/en/challenge.json @@ -0,0 +1,23 @@ +{ + "challenge_title": "Challenge {{ id }}:", + "start": "Start", + "hint": "Hint", + "next": "Next", + "done": "Done", + "can_you_hack_this_challenge": "Can you hack this challenge?", + "make_it_into_a_fathers_day_card": "Make it into a Father's day card!", + "now_sign_up_to_kano_world_to_share_your_creation": "Now sign-up to Kano World to share your creation and send a card to your dad!", + "share_your_fathers_day_card": "Share your Father's day card!", + "now_you_can_share_the_card_on_kano_world": "Now you can share the card on Kano World and share it to your dad!", + "challenges_completed": "Challenges completed", + "now_make_something_new": "Now make something new!", + "new_world_unlocked_play_now": "New world unlocked! Play Now - ", + "menu": "Menu", + "playground": "Playground", + "you_did_it_go_back_for_more_coding_fun": "You did it, go back for more coding fun!", + "hour_of_code": "Hour Of Code", + "solution": "Solution", + "success_online": "{{ content.completion_text || 'Well done!' }}", + "success_offline": "{{ content.completion_text || 'Well done!' }} You've earned {{ xpGain }} XP!" +} + diff --git a/locales/en/challenges.json b/locales/en/challenges.json new file mode 100644 index 000000000..b1d430d3b --- /dev/null +++ b/locales/en/challenges.json @@ -0,0 +1,12 @@ +{ + "challenges": "Challenges", + "get_kano_updates": "Get Kano Updates", + "sign_up": "Sign Up", + "playground": "Playground", + "certificate": "Certificate", + "teachers_guide": "Teacher's Guide", + "latest_shares": "Latest Shares", + "browse_more": "Browse more", + "by": "by" +} + diff --git a/locales/en/directive.json b/locales/en/directive.json new file mode 100644 index 000000000..9b1352f7c --- /dev/null +++ b/locales/en/directive.json @@ -0,0 +1,29 @@ +{ + "save_to_gallery": "save to gallery", + "save_drawing": "save drawing", + "title": "Title", + "description": "Description", + "save": "Save", + "skip": "Skip", + "save_wallpaper": "Save Wallpaper", + "login_to_your_account": "Login to Your Account", + "create_your_account": "Create your account", + "share": "Share", + "save": "Save", + "reset": "Reset", + "load": "Load", + "toggle_autocomplete": "Toggle autocomplete", + "autocomplete": "Autocomplete", + "toggle_fullscreen": "Toggle fullscreen", + "fullscreen": "Fullscreen", + "download_teachers_guide": "Download teacher's guide", + "click_plus_to_add_a_shape_1": "Click", + "click_plus_to_add_a_shape_2": "to add a shape to your code", + "download_teachers_guide": "Download teacher's guide", + "guide": "Guide", + "recipients_email_address": "Recipient\\'s email address", + "your_message": "Your message", + "error": "{{ error.type | upperfirst }} Error", + "error_line": "on line {{ error.row + 1 || 0 }}", + "error_text": "{{ error.text || 0 }}" +} diff --git a/locales/en/partial.json b/locales/en/partial.json new file mode 100644 index 000000000..09e4e3cff --- /dev/null +++ b/locales/en/partial.json @@ -0,0 +1,35 @@ +{ + "pixel_hack": "Pixel Hack:", + "code_your_way_through_the_history": "code your way through the history of video game art.", + "welcome_to_pixel_hack": "Welcome to Pixel Hack", + "start_your_coding_adventure": "Start your coding adventure by drawing Pong and other retro games. Move on to master 8-bit art for your own Minecraft characters and more. Show us how you can hack our challenges. Earn your Pixel Master Badge.", + "happy_hacking": "Happy Hacking!", + "claim_your_pixel_hack_certificate": "Claim your Pixel Hack certificate.", + "visit_this_address_from_a_computer": "Visit this address from a computer with a connected printer to create your certificate.", + "discover_kano": "Discover Kano", + "login": "Login", + "signup": "Sign up", + "logout": "Logout", + "feedback": "Feedback", + "whats_up": "What\\'s up?", + "thank_you": "Thank You!", + "send": "Send", + "load": "Load", + "load_from_where": "Load from where", + "your_kano": "Your Kano", + "internet": "Internet", + "share_by_email": "Share by email", + "enter_an_email_address": "Enter an email address", + "i_just_made_this_with_code": "I just made this with code! Want to try your own? It's easy, fun and for everyone", + "your_name": "Your name...", + "next_up": "Next up:", + "back_to_world": "'Back to ' + selectedWorld.name", + "come_back_tomorrow_to_continue": "Come back tomorrow to continue this challenge", + "share_on_facebook": "Share on Facebook", + "share_on_twitter": "Share on Twitter", + "email_address": "Email address", + "share_with_friends": "Share with friends:", + "skip_sharing": "Skip sharing", + "start":"Start", + "draw_with_code":"Draw With Code" +} diff --git a/locales/es/challenge.json b/locales/es/challenge.json new file mode 100644 index 000000000..32b0ccf54 --- /dev/null +++ b/locales/es/challenge.json @@ -0,0 +1,22 @@ +{ + "new_world_unlocked_play_now": "¡Nuevo mundo desbloqueado! Jugar Ahora - ", + "now_sign_up_to_kano_world_to_share_your_creation": "¡Ahora entra al Mundo Kano para compartir tus creaciones y enviar una tarjeta a tu padre!", + "hint": "Pista", + "share_your_fathers_day_card": "¡Comparte tu tarjeta del Día del Padre!", + "menu": "Menú", + "now_you_can_share_the_card_on_kano_world": "¡Ahora puedes compartir tu tarjeta en Mundo Kano y también con tu padre!", + "solution": "Solución", + "next": "Siguiente", + "challenges_completed": "Desafíos completos", + "start": "Empezar", + "hour_of_code": "Hora de programar", + "challenge_title": "Desafío {{ id }}:", + "done": "Hecho", + "playground": "Playground", + "now_make_something_new": "¡Ahora crea algo nuevo!", + "can_you_hack_this_challenge": "¿Puedes hackear este desafío?", + "you_did_it_go_back_for_more_coding_fun": "¡Lo lograste, vuelve atrás para programar más!", + "make_it_into_a_fathers_day_card": "¡Crea una tarjeta para el Día del Padre!", + "success_online": "{{ content.completion_text || 'Buen trabajo!' }}", + "success_offline": "{{ content.completion_text || 'Buen trabajo!' }} ¡Ganaste {{ xpGain }} PX!" +} diff --git a/locales/es/challenges.json b/locales/es/challenges.json new file mode 100644 index 000000000..60626e1a8 --- /dev/null +++ b/locales/es/challenges.json @@ -0,0 +1,11 @@ +{ + "browse_more": "Buscar más", + "certificate": "Certificado", + "get_kano_updates": "Obtener actualizaciones de Kano", + "teachers_guide": "Guía docente", + "challenges": "Desafíos", + "playground": "Playground", + "latest_shares": "Últimos compartidos", + "sign_up": "Ingresar", + "by": "por" +} diff --git a/locales/es/directive.json b/locales/es/directive.json new file mode 100644 index 000000000..5a8d31db0 --- /dev/null +++ b/locales/es/directive.json @@ -0,0 +1,27 @@ +{ + "load": "Cargar", + "recipients_email_address": "Correo electrónico del destinatario", + "your_message": "Tu mensaje", + "skip": "Saltear", + "share": "Compartir", + "save_drawing": "guardar dibujo", + "toggle_autocomplete": "Activar autocompletar", + "fullscreen": "Pantalla completa", + "title": "Título", + "download_teachers_guide": "Descargar guía docente", + "save_to_gallery": "guardar en galería", + "save_wallpaper": "Guardar fondo de pantalla", + "login_to_your_account": "Ingresa a tu cuenta", + "create_your_account": "Crea tu cuenta", + "save": "Guardar", + "description": "Descripción", + "click_plus_to_add_a_shape_1": "Haz clic", + "toggle_fullscreen": "Activar pantalla completa", + "reset": "Reiniciar", + "click_plus_to_add_a_shape_2": "para agregar una figura", + "autocomplete": "Autocompletar", + "guide": "Guía", + "error": "Error de Sintaxis", + "error_line": "en la línea {{ error.row + 1 || 0 }}", + "error_text": "" +} \ No newline at end of file diff --git a/locales/es/partial.json b/locales/es/partial.json new file mode 100644 index 000000000..087f8938a --- /dev/null +++ b/locales/es/partial.json @@ -0,0 +1,35 @@ +{ + "load": "Cargar", + "feedback": "Opinión y comentarios", + "load_from_where": "Cargar desde aquí", + "send": "Enviar", + "i_just_made_this_with_code": "¡Acabo de programar esto! ¿Quieres intentarlo? Es fácil y divertido para cualquiera", + "discover_kano": "Descubre Kano", + "code_your_way_through_the_history": "programa el camino históricamente recorrido por el arte en videojuegos.", + "email_address": "Correo electrónico", + "start_your_coding_adventure": "Comienza tu aventura en programación dibujando Ping Pong y otros juegos retro. Avanza a arte en 8-bits para tus propias creaciones de personajes de Minecraft y más. Muéstranos cómo hackear nuestros desafíos. Gana la insignia Pixel Master.", + "your_kano": "Tu Kano", + "whats_up": "¿Qué hay de nuevo?", + "welcome_to_pixel_hack": "Bienvenido a Pixel Hack", + "come_back_tomorrow_to_continue": "Vuelve mañana para continuar con este desafío", + "claim_your_pixel_hack_certificate": "Reclama tu certificado de Pixel Hack.", + "pixel_hack": "Pixel Hack:", + "happy_hacking": "¡Suerte Hackeando!", + "internet": "Internet", + "next_up": "Siguiente:", + "skip_sharing": "Saltear compartir", + "logout": "Salir", + "share_on_facebook": "Compartir en Facebook", + "share_with_friends": "Compartir con amigos:", + "visit_this_address_from_a_computer": "Visita esta página desde una computadora que se encuentre conectada a una impresora para crear tu certificado.", + "share_on_twitter": "Compartir en Twitter", + "share_by_email": "Compartir vía correo electrónico", + "enter_an_email_address": "Ingresa un correo electrónico", + "your_name": "Tu nombre...", + "login": "Ingresar", + "signup": "Regístrate", + "back_to_world": "'Atrás' + selectedWorld.name", + "thank_you": "¡Gracias!", + "start":"Comienza", + "draw_with_code":"Dibujar Con Código" +} diff --git a/locales/ja/challenge.json b/locales/ja/challenge.json new file mode 100644 index 000000000..25cfe7dbd --- /dev/null +++ b/locales/ja/challenge.json @@ -0,0 +1,20 @@ +{ + "challenge_title": "{{ id }}チャレンジ:", + "start": "スタート", + "hint": "ヒント", + "next": "次へ", + "done": "終わり", + "can_you_hack_this_challenge": "これもチャレンジしてみるかい?", + "make_it_into_a_fathers_day_card": "父の日のカードにしよう!", + "now_sign_up_to_kano_world_to_share_your_creation": "さあ、Kanoワールドに登路し、作品を共有し、お父さんへカードを送ろう!", + "share_your_fathers_day_card": "父の日のカードを共有しよう!", + "now_you_can_share_the_card_on_kano_world": "よっし、Kanoワールドでカードを共有し、お父さんへ送られるよ!", + "challenges_completed": "チャレンジ完了!", + "now_make_something_new": "さあ、新しいものを作ろう!", + "new_world_unlocked_play_now": "新しいワールドに入れるよ! 早速遊ぼうー", + "menu": "メニュー", + "playground": "遊び場", + "you_did_it_go_back_for_more_coding_fun": "やったぜ! 戻って、コードでもっと遊ぼう!", + "hour_of_code": "ハウアー・オブ・コード", + "solution": "正解は…" +} diff --git a/locales/ja/challenges.json b/locales/ja/challenges.json new file mode 100644 index 000000000..1f537ad39 --- /dev/null +++ b/locales/ja/challenges.json @@ -0,0 +1,12 @@ +{ + "challenges": "チャレンジ一覧", + "get_kano_updates": "Kanoお知らせを受け取る", + "sign_up": "登録", + "playground": "遊び場", + "certificate": "証明書", + "teachers_guide": "講師用のガイド", + "latest_shares": "最新の共有", + "browse_more": "もっと見る", + "by": "by" +} + diff --git a/locales/ja/directive.json b/locales/ja/directive.json new file mode 100644 index 000000000..0f4193cf9 --- /dev/null +++ b/locales/ja/directive.json @@ -0,0 +1,29 @@ +{ + "save_to_gallery": "ギャラリーへ保存", + "save_drawing": "描画を保存", + "title": "タイトル", + "description": "説明", + "save": "保存", + "skip": "スキップ", + "save_wallpaper": "壁紙を保存", + "login_to_your_account": "アカウントへログイン", + "create_your_account": "アカウントを作成", + "share": "共有", + "save": "保存", + "reset": "リセット", + "load": "読み込む", + "toggle_autocomplete": "オートコンプリート切り替え", + "autocomplete": "オートコンプリート", + "toggle_fullscreen": "全画面切り替え", + "fullscreen": "全画面", + "download_teachers_guide": "講師用ガイドをダウンロード", + "click_plus_to_add_a_shape_1": "形をコードに挿入するには、", + "click_plus_to_add_a_shape_2": "を押してみて", + "download_teachers_guide": "教師用のガイドをダウンロード", + "guide": "ガイド", + "recipients_email_address": "宛先のメールアドレス", + "your_message": "メッセージ", + "error": "{{ error.type | upperfirst }} Error", + "error_line": "on line {{ error.row + 1 || 0 }}", + "error_text": "{{ error.text || 0 }}" +} diff --git a/locales/ja/partial.json b/locales/ja/partial.json new file mode 100644 index 000000000..77df88ccc --- /dev/null +++ b/locales/ja/partial.json @@ -0,0 +1,35 @@ +{ + "pixel_hack": "ピクセルハック:", + "code_your_way_through_the_history": "ビデオゲームのアート歴史をコードで歩んでみよう。", + "welcome_to_pixel_hack": "ピクセルハックへようこそ", + "start_your_coding_adventure": "ポングやその他のレトロなゲームからコードの冒険を始めよう。次に8ビットアートをマスターし、自分のマインクラフトキャラクターなど作ろう。乗り越えたチャレンジを皆に見せて、ピクセルマスターのバッジをゲットしよう。", + "happy_hacking": "ハッキングを楽しめ!", + "claim_your_pixel_hack_certificate": "ピクセルハック証明書を求めよう。", + "visit_this_address_from_a_computer": "証明書を作るには、プリンターに繋がっているパソコンから次のリンクにアクセスしよう。", + "discover_kano": "Kanoを探検する", + "login": "ログイン", + "signup": "サインアップ", + "logout": "ログアウト", + "feedback": "ご意見", + "whats_up": "思ったこと", + "thank_you": "ありがとう!", + "send": "送信", + "load": "読み込む", + "load_from_where": "どこから読み込む", + "your_kano": "あなたのKanoから", + "internet": "インターネットから", + "share_by_email": "eメールで共有", + "enter_an_email_address": "メールアドレスを入力", + "i_just_made_this_with_code": "さっき、これをコードで作ったよ!あなたもやってみませんか?簡単で皆で遊べるよ。", + "your_name": "お名前…", + "next_up": "次は:", + "back_to_world": "selectedWorld.name + 'へ戻る'", + "come_back_tomorrow_to_continue": "明日戻ってきて、このチャレンジを続けよう。", + "share_on_facebook": "Facebookで共有する", + "share_on_twitter": "Twitterで共有する", + "email_address": "メールアドレス", + "share_with_friends": "友達と共有する:", + "skip_sharing": "共有しない", + "start":"Start", + "draw_with_code":"Draw With Code" +} diff --git a/package.json b/package.json index 91ca2135d..11c0b1f04 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "draw", - "version": "0.0.0-2", + "version": "0.1.0", "description": "App to learn programming using a basic CoffeeScript drawing API", "main": "index.js", "scripts": { @@ -8,9 +8,10 @@ "watch": "gulp watch", "build": "gulp", "bundle": "./bundle", - "postinstall": "node node_modules/.bin/gulp default", + "postinstall": "node node_modules/.bin/bower i && node_modules/.bin/gulp default", "jshint": "jshint lib", - "jscs": "jscs lib" + "jscs": "jscs lib", + "test": "./node_modules/.bin/mocha test/**/*" }, "author": "Tancredi Trugenberger", "repository": { @@ -20,30 +21,39 @@ "license": "MIT2", "dependencies": { "api-service": "1.0.0", + "bower": "^1.8.0", "cli-color": "~0.2.x", "coffee-script": "~1.7.x", "color": "^0.7.3", "deep-equal": "^1.0.0", + "del": "1.1.1", "express": "^4.10.5", "griddy": "0.0.x", - "gulp": "~3.5.x", + "gulp": "^3.9.x", "gulp-browserify": "~0.4.x", + "gulp-callback": "0.0.3", + "gulp-html-i18n": "0.3.4", "gulp-jade": "~0.4.x", "gulp-livereload": "1.2.0", + "gulp-ng-annotate": "^2.0.0", "gulp-rename": "~0.2.x", "gulp-stylus": "^2.0.1", + "gulp-uglify": "^2.0.0", "http-server": "~0.6.x", - "kano-world-sdk": ">1.0.0", + "kano-world-sdk": "3.0.14", "lodash": "~2.4.x", "marked": "~0.3.x", "moment": "^2.10.6", "nib": "~1.0.x", "partialify": "^3.1.1", - "play-audio": "^0.1.0", "throttle-debounce": "^0.1.1", "tiny-lr": "0.0.9" }, + "devDependencies": { + "chai": "3.2.x", + "mocha": "2.3.x" + }, "engines": { - "node": "0.12.x" + "node": "6.10.x" } } diff --git a/po/lang-docs-po-to-json b/po/lang-docs-po-to-json new file mode 100755 index 000000000..0b3eba135 --- /dev/null +++ b/po/lang-docs-po-to-json @@ -0,0 +1,121 @@ +#!/usr/bin/env python +# +# lang-docs-po-to-json +# +# Convert docs po file to content/docs.json +# +# Copyright (C) 2016 Kano Computing Ltd. +# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2 +# +# Tool to convert res/locales/en/lang.lua file to its corresponding lang.po file +# in a given locale and language. The lang.po file will be empty and ready to be +# given to translators. +# +# Dependencies: +# +# 1. python module: polib +# pip install polib +# +# 2. python module: docopt +# pip install docopt + + +""" +Usage: + lang-po-to-json + + +Options: + -h, --help show this message + +Values: + locale the folder name under res/locales/ + +Examples: + ./lang-po-to-json es_AR + +""" + + +import io +import os +import sys +import json +import datetime +import copy + +import polib +import docopt + +CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) + +# constants +LOCALES_DIR = os.path.join(CURRENT_DIR, '../locales') +DOCS_FILENAME = os.path.join(CURRENT_DIR, '../content/docs.json') +POT_FILENAME = os.path.join(LOCALES_DIR, 'messages-docs.pot') +DEFAULT_LOCALE = 'en' + + +def convert_locale_to_browser(locale): + return locale.replace('_', '-') + + +def get_translation(po_file, msgid): + entry = po_file.find(msgid) + if not entry: + print(u'Could not find translation for "{}"'.format(msgid)) + return msgid + return entry.msgstr + +def translate_entry(po_file, entry): + # translate entry + entry['label'] = get_translation(po_file, entry['label']) + commands = [] + for command in entry['commands']: + command['description'] = get_translation(po_file, command['description']) + args = [] + for arg in command['args']: + args.append([ + arg[0], + arg[1], + get_translation(po_file, arg[2]), + arg[3], + ]) + + command['args'] = args + commands.append(command) + entry['commands'] = commands + + return entry + + +def main(args): + locale = args[''] + date = datetime.date.today() + + LOCALE_PO_FILENAME = os.path.join(LOCALES_DIR, '{}-docs.po'.format(locale)) + # get po file + if not os.path.exists(LOCALE_PO_FILENAME): + print('Error: Cannot find po file for locale {}'.format(locale)) + sys.exit(1) + + po_file = polib.pofile(LOCALE_PO_FILENAME) + + with open(DOCS_FILENAME, 'r') as json_data_file: + json_data = json.load(json_data_file, encoding='utf-8') + + translated_entries = [] + for entry in json_data[DEFAULT_LOCALE]: + # translate each entry + translated_entries.append( + translate_entry(po_file, copy.deepcopy(entry)) + ) + + json_data[convert_locale_to_browser(locale)] = translated_entries + with io.open(DOCS_FILENAME, 'w', encoding='utf8') as docs_file: + data = json.dumps(json_data, ensure_ascii=False, indent=4) + docs_file.write(unicode(data)) + +if __name__ == '__main__': + args = docopt.docopt(__doc__) + sys.exit(main(args)) diff --git a/po/lang-extract-doc-strings b/po/lang-extract-doc-strings new file mode 100755 index 000000000..a00d24728 --- /dev/null +++ b/po/lang-extract-doc-strings @@ -0,0 +1,125 @@ +#!/usr/bin/env python +# +# lang-extract-doc-strings +# +# Extract all translatable strings from docs into a pot file +# +# Copyright (C) 2016 Kano Computing Ltd. +# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2 +# +# Tool to convert res/locales/en/lang.lua file to its corresponding lang.po file +# in a given locale and language. The lang.po file will be empty and ready to be +# given to translators. +# +# Dependencies: +# +# 1. python module: polib +# pip install polib +# +# 2. python module: docopt +# pip install docopt + + +""" +Usage: + lang-extract-strings + +Options: + -h, --help show this message +""" + + +import os +import sys +import json +import datetime + +import polib +import docopt + +CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) + +# constants +HEADER = '''Messages for make-art. +Copyright (C) {} Kano Computing Ltd. +This file is distributed under the same license as the make-art package. + , {} +''' +LOCALES_DIR = os.path.join(CURRENT_DIR, '../locales') +DOCS_FILENAME = os.path.join(CURRENT_DIR, '../content/docs.json') +POT_FILENAME = os.path.join(LOCALES_DIR, 'messages-docs.pot') +DEFAULT_LOCALE = 'en' + + +def extract_strings(docs_data): + types = docs_data[DEFAULT_LOCALE] + strings = [] + + for index, _type in enumerate(types): + if 'label' in _type: + strings.append(( + _type['label'], + 'en[{}]'.format(index), + )) + + for command_index, command in enumerate(_type['commands']): + if 'description' in command: + strings.append(( + command['description'], + 'en[{}].commands[{}]'.format(index, command_index), + )) + + for args_index, arg in enumerate(command['args']): + strings.append(( + arg[2], + 'en[{}].commands[{}].args[{}]'.format(index, command_index, args_index), + )) + + return strings + + +def main(args): + date = datetime.date.today() + + # convert the json to a pot file + new_po_file = polib.POFile(check_for_duplicates=True) + new_po_file.metadata = { + 'Project-Id-Version': '1.0', + 'Report-Msgid-Bugs-To': 'dev@kano.me', + 'POT-Creation-Date': '{} 14:00+0100'.format(date), + 'PO-Revision-Date': '{} 14:00+0100'.format(date), + 'Last-Translator': '', + 'Language-Team': '', + 'Language': '', + 'MIME-Version': '1.0', + 'Content-Type': 'text/plain; charset=utf-8', + 'Content-Transfer-Encoding': '8bit', + } + new_po_file.header = HEADER.format(date.year, date.year) + + # Get all strings + with open(DOCS_FILENAME) as json_data_file: + json_data = json.load(json_data_file) + + doc_strings = extract_strings(json_data) + + for string, location in doc_strings: + entry = polib.POEntry( + msgid=string, + msgstr=u'', + occurrences=[(location, 0)] + ) + try: + new_po_file.append(entry) + except ValueError: + # string already exists + existing_entry = new_po_file.find(string) + existing_entry.occurrences.append((location, 0)) + + # write the po file + new_po_file.save(POT_FILENAME) + + +if __name__ == '__main__': + args = docopt.docopt(__doc__) + sys.exit(main(args)) diff --git a/po/lang-extract-strings b/po/lang-extract-strings new file mode 100755 index 000000000..557952f94 --- /dev/null +++ b/po/lang-extract-strings @@ -0,0 +1,112 @@ +#!/usr/bin/env python +# +# lang-extract-strings +# +# Extract all translatable strings to a pot file +# +# Copyright (C) 2016 Kano Computing Ltd. +# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2 +# +# Tool to convert res/locales/en/lang.lua file to its corresponding lang.po file +# in a given locale and language. The lang.po file will be empty and ready to be +# given to translators. +# +# Dependencies: +# +# 1. python module: polib +# pip install polib +# +# 2. python module: docopt +# pip install docopt + + +""" +Usage: + lang-extract-strings + +Options: + -h, --help show this message +""" + + +import os +import sys +import json +import datetime + +import polib +import docopt + +CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) + +# constants +HEADER = '''Messages for make-art. +Copyright (C) {} Kano Computing Ltd. +This file is distributed under the same license as the make-art package. + , {} +''' +LOCALES_DIR = os.path.join(CURRENT_DIR, '../locales') +POT_FILENAME = os.path.join(LOCALES_DIR, 'messages.pot') + + +def create_entries(filename, data): + entries = [] + for key in data: + entry = polib.POEntry( + msgid=data[key], + msgstr=u'', + occurrences=[( + '{}.{}'.format( + os.path.splitext(filename)[0], + key, + ), + 0 + )] + ) + entries.append(entry) + + return entries + + +def main(args): + date = datetime.date.today() + + EN_LOCALE_DIR = os.path.join(LOCALES_DIR, 'en') + + # convert the json to a pot file + new_po_file = polib.POFile(check_for_duplicates=True) + new_po_file.metadata = { + 'Project-Id-Version': '1.0', + 'Report-Msgid-Bugs-To': 'dev@kano.me', + 'POT-Creation-Date': '{} 14:00+0100'.format(date), + 'PO-Revision-Date': '{} 14:00+0100'.format(date), + 'Last-Translator': '', + 'Language-Team': '', + 'Language': '', + 'MIME-Version': '1.0', + 'Content-Type': 'text/plain; charset=utf-8', + 'Content-Transfer-Encoding': '8bit', + } + new_po_file.header = HEADER.format(date.year, date.year) + + # Get all strings + all_strings = {} + for f in os.listdir(EN_LOCALE_DIR): + if os.path.isfile(os.path.join(EN_LOCALE_DIR, f)) and f.endswith('.json'): + with open(os.path.join(EN_LOCALE_DIR, f)) as json_data_file: + json_data = json.load(json_data_file) + + for entry in create_entries(f, json_data): + try: + new_po_file.append(entry) + except ValueError: + existing_entry = new_po_file.find(entry.msgid) + existing_entry.occurrences.append(entry.occurrences[0]) + + # write the po file + new_po_file.save(POT_FILENAME) + + +if __name__ == '__main__': + args = docopt.docopt(__doc__) + sys.exit(main(args)) diff --git a/po/lang-po-to-json b/po/lang-po-to-json new file mode 100755 index 000000000..0462c1291 --- /dev/null +++ b/po/lang-po-to-json @@ -0,0 +1,111 @@ +#!/usr/bin/env python +# +# lang-po-to-json +# +# Convert po to json files +# +# Copyright (C) 2016 Kano Computing Ltd. +# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2 +# +# Tool to convert res/locales/en/lang.lua file to its corresponding lang.po file +# in a given locale and language. The lang.po file will be empty and ready to be +# given to translators. +# +# Dependencies: +# +# 1. python module: polib +# pip install polib +# +# 2. python module: docopt +# pip install docopt + + +""" +Usage: + lang-po-to-json + + +Options: + -h, --help show this message + +Values: + locale the folder name under res/locales/ + +Examples: + ./lang-po-to-json es_AR + +""" + + +import io +import os +import sys +import json +import datetime + +import polib +import docopt + +CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) + +# constants +LOCALES_DIR = os.path.join(CURRENT_DIR, '../locales') +DEFAULT_LOCALE = os.path.join(LOCALES_DIR, 'en') + + +def convert_locale_to_browser(locale): + return locale.replace('_', '-') + + +def translate_data(po_file, data): + translated_data = {} + # Find entry in po file + for key in sorted(data): + try: + entry = next(e for e in po_file if e.occurrences[0][0].split('.')[1] == key) + if not entry.msgstr: + print('Warning: String "{}" has not been translated'.format(entry.msgid)) + translated_data[key] = data[key] + else: + translated_data[key] = entry.msgstr + except StopIteration: + # Entry has not been translated + print('Warning: Key `{}` cannot be found in po file'.format(key)) + translated_data[key] = data[key] + + return translated_data + + +def main(args): + locale = args[''] + date = datetime.date.today() + + LOCALE_PO_FILENAME = os.path.join(LOCALES_DIR, '{}.po'.format(locale)) + # get po file + if not os.path.exists(LOCALE_PO_FILENAME): + print('Error: Cannot find po file for locale {}'.format(locale)) + sys.exit(1) + + po_file = polib.pofile(LOCALE_PO_FILENAME) + + NEW_LOCALE_DIR = os.path.join(LOCALES_DIR, convert_locale_to_browser(locale)) + + # create locale folder + os.system('mkdir -p {}'.format(NEW_LOCALE_DIR)) + + for f in os.listdir(DEFAULT_LOCALE): + if os.path.isfile(os.path.join(DEFAULT_LOCALE, f)) and f.endswith('.json'): + with open(os.path.join(DEFAULT_LOCALE, f)) as json_data_file: + json_data = json.load(json_data_file) + + translated_data = translate_data(po_file, json_data) + + # save translated file + with io.open(os.path.join(NEW_LOCALE_DIR, f), 'w', encoding='utf8') as locale_file: + data = json.dumps(translated_data, ensure_ascii=False, indent=4) + locale_file.write(unicode(data)) + + +if __name__ == '__main__': + args = docopt.docopt(__doc__) + sys.exit(main(args)) diff --git a/resources/icon-set/Read Me.txt b/resources/icon-set/Read Me.txt index cd97d24a0..8491652f8 100755 --- a/resources/icon-set/Read Me.txt +++ b/resources/icon-set/Read Me.txt @@ -1,5 +1,7 @@ Open *demo.html* to see a list of all the glyphs in your font along with their codes/ligatures. +To use the generated font in desktop programs, you can install the TTF font. In order to copy the character associated with each icon, refer to the text box at the bottom right corner of each glyph in demo.html. The character inside this text box may be invisible; but it can still be copied. See this guide for more info: https://icomoon.io/#docs/local-fonts + You won't need any of the files located under the *demo-files* directory when including the generated font in your own projects. -You can import *selection.json* back to the IcoMoon app using the *Import Icons* button (or via Main Menu > Manage Projects) to retrieve your icon selection. +You can import *selection.json* back to the IcoMoon app using the *Import Icons* button (or via Main Menu → Manage Projects) to retrieve your icon selection. diff --git a/resources/icon-set/demo-files/demo.css b/resources/icon-set/demo-files/demo.css deleted file mode 100755 index 982f938d3..000000000 --- a/resources/icon-set/demo-files/demo.css +++ /dev/null @@ -1,153 +0,0 @@ -body { - padding: 0; - margin: 0; - font-family: sans-serif; - font-size: 1em; - line-height: 1.5; - color: #555; - background: #fff; -} -h1 { - font-size: 1.5em; - font-weight: normal; -} -small { - font-size: .66666667em; -} -a { - color: #e74c3c; - text-decoration: none; -} -a:hover, a:focus { - box-shadow: 0 1px #e74c3c; -} -.bshadow0, input { - box-shadow: inset 0 -2px #e7e7e7; -} -input:hover { - box-shadow: inset 0 -2px #ccc; -} -input, fieldset { - font-size: 1em; - margin: 0; - padding: 0; - border: 0; -} -input { - color: inherit; - line-height: 1.5; - height: 1.5em; - padding: .25em 0; -} -input:focus { - outline: none; - box-shadow: inset 0 -2px #449fdb; -} -.glyph { - font-size: 16px; - width: 15em; - padding-bottom: 1em; - margin-right: 4em; - margin-bottom: 1em; - float: left; - overflow: hidden; -} -.liga { - width: 80%; - width: calc(100% - 2.5em); -} -.talign-right { - text-align: right; -} -.talign-center { - text-align: center; -} -.bgc1 { - background: #f1f1f1; -} -.fgc1 { - color: #999; -} -.fgc0 { - color: #000; -} -p { - margin-top: 1em; - margin-bottom: 1em; -} -.mvm { - margin-top: .75em; - margin-bottom: .75em; -} -.mtn { - margin-top: 0; -} -.mtl, .mal { - margin-top: 1.5em; -} -.mbl, .mal { - margin-bottom: 1.5em; -} -.mal, .mhl { - margin-left: 1.5em; - margin-right: 1.5em; -} -.mhmm { - margin-left: 1em; - margin-right: 1em; -} -.mls { - margin-left: .25em; -} -.ptl { - padding-top: 1.5em; -} -.pbs, .pvs { - padding-bottom: .25em; -} -.pvs, .pts { - padding-top: .25em; -} -.unit { - float: left; -} -.unitRight { - float: right; -} -.size1of2 { - width: 50%; -} -.size1of1 { - width: 100%; -} -.clearfix:before, .clearfix:after { - content: " "; - display: table; -} -.clearfix:after { - clear: both; -} -.hidden-true { - display: none; -} -.textbox0 { - width: 3em; - background: #f1f1f1; - padding: .25em .5em; - line-height: 1.5; - height: 1.5em; -} -#testDrive { - display: block; - padding-top: 24px; - line-height: 1.5; -} -.fs0 { - font-size: 16px; -} -.fs1 { - font-size: 32px; -} -.fs2 { - font-size: 32px; -} diff --git a/resources/icon-set/demo-files/demo.js b/resources/icon-set/demo-files/demo.js deleted file mode 100755 index e72f449b7..000000000 --- a/resources/icon-set/demo-files/demo.js +++ /dev/null @@ -1,30 +0,0 @@ -if (!('boxShadow' in document.body.style)) { - document.body.setAttribute('class', 'noBoxShadow'); -} - -document.body.addEventListener("click", function(e) { - var target = e.target; - if (target.tagName === "INPUT" && - target.getAttribute('class').indexOf('liga') === -1) { - target.select(); - } -}); - -(function() { - var fontSize = document.getElementById('fontSize'), - testDrive = document.getElementById('testDrive'), - testText = document.getElementById('testText'); - function updateTest() { - testDrive.innerHTML = testText.value || String.fromCharCode(160); - if (window.icomoonLiga) { - window.icomoonLiga(testDrive); - } - } - function updateSize() { - testDrive.style.fontSize = fontSize.value + 'px'; - } - fontSize.addEventListener('change', updateSize, false); - testText.addEventListener('input', updateTest, false); - testText.addEventListener('change', updateTest, false); - updateSize(); -}()); diff --git a/resources/icon-set/demo.html b/resources/icon-set/demo.html deleted file mode 100755 index 7fdb6cf79..000000000 --- a/resources/icon-set/demo.html +++ /dev/null @@ -1,634 +0,0 @@ - - - - - IcoMoon Demo - - - - - -
-

Font Name: icomoon (Glyphs: 37)

-
-
-

Grid Size: 14

-
-
- - - - icon-mouse-pointer -
-
- - -
-
- liga: - -
-
-
-
-

Grid Size: Unknown

-
-
- - - - icon-campfire -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-menu -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-locked -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-unlocked -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-arrow-down -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-arrow-left -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-arrow-right -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-arrow-up -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-autocomplete -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-chevron-down -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-chevron-left -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-chevron-right -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-chevron-up -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-code -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-colors -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-cross -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-draw -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-full-screen -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-game -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-general -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-hint -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-lines -
-
- - -
-
- liga: - -
-
-
-
- - icon-login -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-logout -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-play -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-plus -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-position -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-reset -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-save -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-shapes -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-share -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-text -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-tick -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-tooltips -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-trophy -
-
- - -
-
- liga: - -
-
-
-
- - - - icon-wand -
-
- - -
-
- liga: - -
-
-
- - -
-

Font Test Drive

- - - -
  -
-
- -
-

Generated by IcoMoon

-
- - - - \ No newline at end of file diff --git a/resources/icon-set/fonts/icomoon.eot b/resources/icon-set/fonts/icomoon.eot index 4ec3187f0..eeb3c764a 100755 Binary files a/resources/icon-set/fonts/icomoon.eot and b/resources/icon-set/fonts/icomoon.eot differ diff --git a/resources/icon-set/fonts/icomoon.svg b/resources/icon-set/fonts/icomoon.svg index 2411948e4..76d3a4014 100755 --- a/resources/icon-set/fonts/icomoon.svg +++ b/resources/icon-set/fonts/icomoon.svg @@ -44,4 +44,9 @@ + + + + + \ No newline at end of file diff --git a/resources/icon-set/fonts/icomoon.ttf b/resources/icon-set/fonts/icomoon.ttf index eeecc5e95..600184ea6 100755 Binary files a/resources/icon-set/fonts/icomoon.ttf and b/resources/icon-set/fonts/icomoon.ttf differ diff --git a/resources/icon-set/fonts/icomoon.woff b/resources/icon-set/fonts/icomoon.woff index 3822ecbb4..56dbdabfc 100755 Binary files a/resources/icon-set/fonts/icomoon.woff and b/resources/icon-set/fonts/icomoon.woff differ diff --git a/resources/icon-set/selection.json b/resources/icon-set/selection.json index df86b91c3..7dca057dc 100755 --- a/resources/icon-set/selection.json +++ b/resources/icon-set/selection.json @@ -4,28 +4,411 @@ { "icon": { "paths": [ - "M647.429 596q17.714 17.143 8 39.429-9.714 22.857-33.714 22.857h-218.286l114.857 272q5.714 14.286 0 28t-19.429 20l-101.143 42.857q-14.286 5.714-28 0t-20-19.429l-109.143-258.286-178.286 178.286q-10.857 10.857-25.714 10.857-6.857 0-13.714-2.857-22.857-9.714-22.857-33.714v-859.429q0-24 22.857-33.714 6.857-2.857 13.714-2.857 15.429 0 25.714 10.857z" + "M594.505 789.943s0 234.057-88.942 234.057h353.426s-88.942 0-88.942-234.057h-175.543z", + "M1191.351 117.029c32.317 0 58.514 26.198 58.514 58.514v526.629c0 32.317-26.198 58.514-58.514 58.514h-1015.808c-32.317 0-58.514-26.198-58.514-58.514v-526.629c0-32.317 26.198-58.514 58.514-58.514h1015.808zM1191.351 0h-1015.808c-96.95 0-175.543 78.593-175.543 175.543v526.629c0 96.95 78.593 175.543 175.543 175.543h1015.808c96.95 0 175.543-78.593 175.543-175.543v-526.629c0-96.95-78.593-175.543-175.543-175.543v0z" + ], + "attrs": [ + { + "fill": "rgb(255, 255, 255)" + }, + { + "fill": "rgb(255, 255, 255)" + } ], - "attrs": [], "isMulticolor": false, - "width": 658, + "width": 1366, + "grid": 0, "tags": [ - "mouse-pointer" - ], - "grid": 14 + "cpu" + ] }, - "attrs": [], + "attrs": [ + { + "fill": "rgb(255, 255, 255)" + }, + { + "fill": "rgb(255, 255, 255)" + } + ], "properties": { - "order": 1, + "order": 111, "id": 0, "prevSize": 32, - "code": 58916, - "name": "mouse-pointer" + "code": 59652, + "name": "cpu" }, "setIdx": 0, "setId": 2, "iconIdx": 0 }, + { + "icon": { + "paths": [ + "M806.034 923.063h-478.354c-8.777 0-13.166-5.851-13.166-13.166 0-8.777 5.851-13.166 13.166-13.166h478.354c8.777 0 16.091-8.777 16.091-16.091v-727.040c0-8.777 5.851-13.166 13.166-13.166 8.777 0 13.166 5.851 13.166 13.166v724.114c1.463 24.869-20.48 45.349-42.423 45.349z", + "M245.76 244.297v40.96c2.926 2.926 8.777 2.926 11.703 2.926 5.851 0 11.703 0 16.091 2.926v-40.96c-5.851-5.851-11.703-8.777-16.091-8.777s-8.777 2.926-11.703 2.926z", + "M256 345.234c-43.886 0-78.994-35.109-78.994-78.994s35.109-78.994 78.994-78.994 78.994 35.109 78.994 78.994c0 8.777-5.851 13.166-13.166 13.166-8.777 0-16.091-5.851-16.091-13.166 0-27.794-21.943-49.737-49.737-49.737s-49.737 21.943-49.737 49.737 21.943 49.737 49.737 49.737c8.777 0 13.166 5.851 13.166 13.166s-4.389 16.091-13.166 16.091z", + "M256 351.086c5.851 0 11.703 0 16.091 2.926v-90.697c0-8.777-5.851-13.166-13.166-13.166s-13.166 8.777-13.166 13.166v87.771c2.926 0 5.851 0 10.24 0z", + "M256 538.331c-43.886 0-78.994-35.109-78.994-78.994s35.109-78.994 78.994-78.994 78.994 35.109 78.994 78.994c0 8.777-5.851 13.166-13.166 13.166-8.777 0-16.091-5.851-16.091-13.166 0-27.794-21.943-49.737-49.737-49.737s-49.737 21.943-49.737 49.737 21.943 49.737 49.737 49.737c8.777 0 13.166 5.851 13.166 13.166 1.463 7.314-4.389 16.091-13.166 16.091z", + "M256 544.183c5.851 0 11.703 0 16.091 2.926v-87.771c0-8.777-5.851-13.166-13.166-13.166s-13.166 5.851-13.166 13.166v87.771c2.926-2.926 5.851-2.926 10.24-2.926z", + "M273.554 675.84v-43.886c-5.851-5.851-11.703-5.851-16.091-5.851-2.926 0-8.777 0-11.703 2.926v40.96c2.926 2.926 8.777 2.926 10.24 2.926 5.851 0 11.703 2.926 17.554 2.926z", + "M750.446 99.474h-460.8c-24.869 0-43.886 19.017-43.886 43.886v16.091c2.926 0 8.777 0 11.703 0 5.851 0 11.703 0 16.091 2.926v-17.554c0-8.777 8.777-16.091 16.091-16.091h460.8c8.777 0 16.091 8.777 16.091 16.091v678.766c0 8.777-8.777 16.091-16.091 16.091h-460.8c-8.777 0-16.091-8.777-16.091-16.091v-71.68c-5.851 2.926-11.703 2.926-16.091 2.926-2.926 0-8.777 0-11.703 0v68.754c0 24.869 19.017 43.886 43.886 43.886h460.8c24.869 0 43.886-19.017 43.886-43.886v-678.766c0-23.406-21.943-45.349-43.886-45.349z", + "M256 729.966c-43.886 0-78.994-35.109-78.994-78.994s35.109-78.994 78.994-78.994 78.994 35.109 78.994 78.994c0 8.777-5.851 13.166-13.166 13.166-8.777 0-16.091-5.851-16.091-13.166 0-27.794-21.943-49.737-49.737-49.737s-49.737 21.943-49.737 49.737 21.943 49.737 49.737 49.737c8.777 0 13.166 5.851 13.166 13.166 1.463 8.777-4.389 16.091-13.166 16.091z", + "M258.926 826.514c-8.777 0-13.166-5.851-13.166-13.166v-165.303c0-8.777 5.851-13.166 13.166-13.166s13.166 5.851 13.166 13.166v165.303c1.463 7.314-7.314 13.166-13.166 13.166z", + "M416.914 558.811c-5.851 0-11.703-5.851-11.703-11.703 0-2.926 1.463-5.851 2.926-7.314l76.069-109.714h-61.44c-5.851 0-11.703-5.851-11.703-11.703s5.851-11.703 11.703-11.703h84.846c5.851 0 11.703 5.851 11.703 11.703 0 1.463 0 4.389-1.463 5.851l-76.069 109.714h68.754c5.851 0 11.703 5.851 11.703 11.703s-5.851 11.703-11.703 11.703h-93.623z", + "M563.2 548.571c0 7.314-5.851 13.166-13.166 13.166s-13.166-5.851-13.166-13.166v-128.731c0-7.314 5.851-13.166 13.166-13.166s13.166 5.851 13.166 13.166v128.731z", + "M615.863 500.297v48.274c0 7.314-5.851 13.166-13.166 13.166s-13.166-5.851-13.166-13.166v-127.269c0-7.314 5.851-13.166 13.166-13.166h42.423c26.331 0 46.811 14.629 46.811 46.811 0 30.72-20.48 46.811-46.811 46.811h-29.257zM615.863 431.543v45.349h27.794c14.629 0 21.943-8.777 21.943-23.406s-8.777-23.406-21.943-23.406h-27.794z" + ], + "attrs": [ + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + } + ], + "isMulticolor": false, + "tags": [ + "zip" + ], + "grid": 0 + }, + "attrs": [ + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + } + ], + "properties": { + "order": 42, + "id": 0, + "prevSize": 32, + "code": 59651, + "name": "zip" + }, + "setIdx": 1, + "setId": 1, + "iconIdx": 0 + }, + { + "icon": { + "paths": [ + "M806.034 923.063h-478.354c-8.777 0-13.166-5.851-13.166-13.166 0-8.777 5.851-13.166 13.166-13.166h478.354c8.777 0 16.091-8.777 16.091-16.091v-727.040c0-8.777 5.851-13.166 13.166-13.166 8.777 0 13.166 5.851 13.166 13.166v724.114c1.463 24.869-20.48 45.349-42.423 45.349z", + "M245.76 244.297v40.96c2.926 2.926 8.777 2.926 11.703 2.926 5.851 0 11.703 0 16.091 2.926v-40.96c-5.851-5.851-11.703-8.777-16.091-8.777s-8.777 2.926-11.703 2.926z", + "M256 345.234c-43.886 0-78.994-35.109-78.994-78.994s35.109-78.994 78.994-78.994 78.994 35.109 78.994 78.994c0 8.777-5.851 13.166-13.166 13.166-8.777 0-16.091-5.851-16.091-13.166 0-27.794-21.943-49.737-49.737-49.737s-49.737 21.943-49.737 49.737c0 27.794 21.943 49.737 49.737 49.737 8.777 0 13.166 5.851 13.166 13.166s-4.389 16.091-13.166 16.091z", + "M256 351.086c5.851 0 11.703 0 16.091 2.926v-90.697c0-8.777-5.851-13.166-13.166-13.166s-13.166 8.777-13.166 13.166v87.771c2.926 0 5.851 0 10.24 0z", + "M256 538.331c-43.886 0-78.994-35.109-78.994-78.994s35.109-78.994 78.994-78.994 78.994 35.109 78.994 78.994c0 8.777-5.851 13.166-13.166 13.166-8.777 0-16.091-5.851-16.091-13.166 0-27.794-21.943-49.737-49.737-49.737s-49.737 21.943-49.737 49.737c0 27.794 21.943 49.737 49.737 49.737 8.777 0 13.166 5.851 13.166 13.166 1.463 7.314-4.389 16.091-13.166 16.091z", + "M256 544.183c5.851 0 11.703 0 16.091 2.926v-87.771c0-8.777-5.851-13.166-13.166-13.166s-13.166 5.851-13.166 13.166v87.771c2.926-2.926 5.851-2.926 10.24-2.926z", + "M273.554 675.84v-43.886c-5.851-5.851-11.703-5.851-16.091-5.851-2.926 0-8.777 0-11.703 2.926v40.96c2.926 2.926 8.777 2.926 10.24 2.926 5.851 0 11.703 2.926 17.554 2.926z", + "M750.446 99.474h-460.8c-24.869 0-43.886 19.017-43.886 43.886v16.091c2.926 0 8.777 0 11.703 0 5.851 0 11.703 0 16.091 2.926v-17.554c0-8.777 8.777-16.091 16.091-16.091h460.8c8.777 0 16.091 8.777 16.091 16.091v678.766c0 8.777-8.777 16.091-16.091 16.091h-460.8c-8.777 0-16.091-8.777-16.091-16.091v-71.68c-5.851 2.926-11.703 2.926-16.091 2.926-2.926 0-8.777 0-11.703 0v68.754c0 24.869 19.017 43.886 43.886 43.886h460.8c24.869 0 43.886-19.017 43.886-43.886v-678.766c0-23.406-21.943-45.349-43.886-45.349z", + "M256 729.966c-43.886 0-78.994-35.109-78.994-78.994s35.109-78.994 78.994-78.994 78.994 35.109 78.994 78.994c0 8.777-5.851 13.166-13.166 13.166-8.777 0-16.091-5.851-16.091-13.166 0-27.794-21.943-49.737-49.737-49.737s-49.737 21.943-49.737 49.737c0 27.794 21.943 49.737 49.737 49.737 8.777 0 13.166 5.851 13.166 13.166 1.463 8.777-4.389 16.091-13.166 16.091z", + "M258.926 826.514c-8.777 0-13.166-5.851-13.166-13.166v-165.303c0-8.777 5.851-13.166 13.166-13.166s13.166 5.851 13.166 13.166v165.303c1.463 7.314-7.314 13.166-13.166 13.166z", + "M396.434 498.834v48.274c0 7.314-5.851 13.166-13.166 13.166s-13.166-5.851-13.166-13.166v-127.269c0-7.314 5.851-13.166 13.166-13.166h42.423c26.331 0 46.811 14.629 46.811 46.811 0 30.72-20.48 46.811-46.811 46.811h-29.257zM396.434 430.080v45.349h27.794c14.629 0 21.943-8.777 21.943-23.406s-8.777-23.406-21.943-23.406h-27.794z", + "M538.331 406.674c45.349 0 73.143 20.48 73.143 76.069s-27.794 76.069-73.143 76.069h-30.72c-7.314 0-13.166-5.851-13.166-13.166v-125.806c0-7.314 5.851-13.166 13.166-13.166h30.72zM520.777 535.406h17.554c29.257 0 46.811-13.166 46.811-52.663s-17.554-52.663-46.811-52.663h-17.554v105.326z", + "M659.749 547.109c0 7.314-5.851 13.166-13.166 13.166s-13.166-5.851-13.166-13.166v-127.269c0-7.314 5.851-13.166 13.166-13.166h70.217c5.851 0 11.703 5.851 11.703 11.703s-5.851 11.703-11.703 11.703h-57.051v42.423h42.423c5.851 0 11.703 5.851 11.703 11.703s-5.851 11.703-11.703 11.703h-42.423v51.2z" + ], + "attrs": [ + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + } + ], + "isMulticolor": false, + "tags": [ + "pdf-guide" + ], + "grid": 0 + }, + "attrs": [ + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + } + ], + "properties": { + "order": 41, + "id": 1, + "prevSize": 32, + "code": 59650, + "name": "pdf-guide" + }, + "setIdx": 1, + "setId": 1, + "iconIdx": 1 + }, + { + "icon": { + "paths": [ + "M171.099 945.231l444.635-293.599c0.318 0.184 0.636 0.289 0.954 0.473 42.921 24.182 90.825 36.575 138.862 36.575 47.984 0 95.836-12.367 138.73-36.496 0.345-0.21 0.742-0.341 1.087-0.551l444.635 293.599h-1168.904zM1431.57 134.459v776.56l-470.43-310.64 470.43-465.92zM79.532 134.459l470.43 465.946-470.43 310.613v-776.56zM872.569 572.574c-68.424 48.653-165.558 48.653-234.035 0-0.159-0.105-0.318-0.131-0.477-0.236-8.722-6.249-17.099-13.023-24.84-20.69l-477.455-472.878h1239.581l-477.455 472.878c-7.768 7.667-16.145 14.441-24.867 20.69-0.133 0.105-0.318 0.131-0.451 0.236v0zM1511.102 981.018v-941.634c0-5.067-1.060-9.899-2.837-14.362-0.080-0.21-0.106-0.394-0.186-0.604-4.030-9.689-11.85-17.434-21.633-21.425-0.212-0.105-0.424-0.131-0.61-0.21-4.507-1.733-9.385-2.783-14.501-2.783h-1431.57c-5.143 0-10.021 1.050-14.501 2.809-0.212 0.053-0.424 0.105-0.61 0.184-9.809 3.991-17.603 11.737-21.659 21.425-0.080 0.21-0.106 0.394-0.186 0.604-1.75 4.464-2.81 9.269-2.81 14.362v945.231c0 3.597 0.636 7.037 1.564 10.345 0.106 0.368 0.027 0.709 0.133 1.077 0.133 0.368 0.398 0.656 0.53 1.024 1.219 3.597 2.81 6.984 4.957 10.030 0.239 0.368 0.53 0.63 0.795 0.971 2.068 2.757 4.507 5.173 7.211 7.299 0.504 0.394 0.928 0.814 1.432 1.182 2.943 2.074 6.177 3.728 9.623 4.962 0.716 0.263 1.432 0.446 2.147 0.656 3.632 1.077 7.396 1.838 11.373 1.838h1432.074c22.004 0 39.766-17.644 39.766-39.385 0-1.26-0.398-2.363-0.504-3.597v0z" + ], + "width": 1512, + "attrs": [ + { + "fill": "rgb(255, 255, 255)" + } + ], + "isMulticolor": false, + "tags": [ + "mail" + ], + "grid": 0 + }, + "attrs": [ + { + "fill": "rgb(255, 255, 255)" + } + ], + "properties": { + "order": 40, + "id": 2, + "prevSize": 32, + "code": 59649, + "name": "mail" + }, + "setIdx": 1, + "setId": 1, + "iconIdx": 2 + }, + { + "icon": { + "paths": [ + "M711.035 922.424h-477.684c-8.236 0-13.727-5.491-13.727-13.727s5.491-13.727 13.727-13.727h477.684c8.236 0 16.472-8.236 16.472-16.472v-724.761c0-8.236 5.491-13.727 13.727-13.727s13.727 5.491 13.727 13.727v724.761c0 24.708-21.962 43.925-43.925 43.925z", + "M557.298 617.694c0 8.236-2.745 16.472-10.981 24.708-5.491 5.491-13.727 8.236-21.962 8.236s-16.472-2.745-24.708-8.236l-112.558-98.831v76.869c0 8.236-2.745 16.472-8.236 21.962s-13.727 8.236-21.962 8.236c-8.236 0-10.981-2.745-19.217-8.236-5.491-5.491-5.491-13.727-5.491-21.962v-244.332c0-8.236 0-16.472 5.491-21.962s10.981-10.981 21.962-10.981c8.236 0 16.472 2.745 21.962 10.981 5.491 5.491 8.236 13.727 8.236 21.962v76.869l112.558-98.831c5.491-5.491 13.727-10.981 24.708-10.981 8.236 0 16.472 2.745 21.962 10.981 5.491 5.491 10.981 13.727 10.981 21.962s-2.745 16.472-8.236 21.962l-118.048 96.086z", + "M150.992 244.332v41.18c2.745 2.745 8.236 2.745 10.981 2.745 5.491 0 10.981 0 16.472 2.745v-41.18c-5.491-5.491-10.981-8.236-16.472-8.236s-8.236 2.745-10.981 2.745z", + "M161.973 345.909c-43.925 0-79.614-35.689-79.614-79.614s35.689-79.614 79.614-79.614 79.614 35.689 79.614 79.614c0 8.236-5.491 13.727-13.727 13.727s-16.472-5.491-16.472-13.727c0-27.453-21.962-49.416-49.416-49.416s-49.416 21.962-49.416 49.416 21.962 49.416 49.416 49.416c8.236 0 13.727 5.491 13.727 13.727s-5.491 16.472-13.727 16.472z", + "M161.973 351.399c5.491 0 10.981 0 16.472 2.745v-90.595c0-8.236-5.491-13.727-13.727-13.727s-13.727 8.236-13.727 13.727v87.85c2.745 0 5.491 0 10.981 0z", + "M161.973 538.080c-43.925 0-79.614-35.689-79.614-79.614s35.689-79.614 79.614-79.614 79.614 35.689 79.614 79.614c0 8.236-5.491 13.727-13.727 13.727s-16.472-5.491-16.472-13.727c0-27.453-21.962-49.416-49.416-49.416s-49.416 21.962-49.416 49.416 21.962 49.416 49.416 49.416c8.236 0 13.727 5.491 13.727 13.727s-5.491 16.472-13.727 16.472z", + "M161.973 543.571c5.491 0 10.981 0 16.472 2.745v-87.85c0-8.236-5.491-13.727-13.727-13.727s-13.727 5.491-13.727 13.727v87.85c2.745-2.745 5.491-2.745 10.981-2.745z", + "M178.445 675.346v-43.925c-5.491-5.491-10.981-5.491-16.472-5.491-2.745 0-8.236 0-10.981 2.745v41.18c2.745 2.745 8.236 2.745 10.981 2.745 5.491-0 10.981 2.745 16.472 2.745z", + "M656.129 98.831h-461.212c-24.708 0-43.925 19.217-43.925 43.925v16.472c2.745 0 8.236 0 10.981 0 5.491 0 10.981 0 16.472 2.745v-16.472c0-8.236 8.236-16.472 16.472-16.472h461.212c8.236 0 16.472 8.236 16.472 16.472v678.091c0 8.236-8.236 16.472-16.472 16.472h-461.212c-8.236 0-16.472-8.236-16.472-16.472v-71.378c-5.491 2.745-10.981 2.745-16.472 2.745-2.745 0-8.236 0-10.981 0v68.633c0 24.708 19.217 43.925 43.925 43.925h461.212c24.708 0 43.925-19.217 43.925-43.925v-678.091c0-24.708-21.962-46.67-43.925-46.67z", + "M161.973 730.252c-43.925 0-79.614-35.689-79.614-79.614s35.689-79.614 79.614-79.614 79.614 35.689 79.614 79.614c0 8.236-5.491 13.727-13.727 13.727s-16.472-5.491-16.472-13.727c0-27.453-21.962-49.416-49.416-49.416s-49.416 21.962-49.416 49.416 21.962 49.416 49.416 49.416c8.236 0 13.727 5.491 13.727 13.727s-5.491 16.472-13.727 16.472z", + "M164.718 826.338c-8.236 0-13.727-5.491-13.727-13.727v-164.718c0-8.236 5.491-13.727 13.727-13.727s13.727 5.491 13.727 13.727v164.718c0 8.236-8.236 13.727-13.727 13.727z" + ], + "width": 835, + "attrs": [ + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + } + ], + "isMulticolor": false, + "tags": [ + "guide" + ], + "grid": 0 + }, + "attrs": [ + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + }, + { + "fill": "rgb(176, 180, 184)" + } + ], + "properties": { + "order": 38, + "id": 3, + "prevSize": 32, + "code": 59648, + "name": "guide" + }, + "setIdx": 1, + "setId": 1, + "iconIdx": 3 + }, { "icon": { "paths": [ @@ -41,10 +424,10 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "campfire" - ] + ], + "grid": 0 }, "attrs": [ {}, @@ -54,14 +437,14 @@ ], "properties": { "order": 36, - "id": 0, + "id": 4, "prevSize": 32, "code": 58915, "name": "campfire" }, "setIdx": 1, "setId": 1, - "iconIdx": 0 + "iconIdx": 4 }, { "icon": { @@ -76,10 +459,10 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "menu" - ] + ], + "grid": 0 }, "attrs": [ {}, @@ -88,14 +471,14 @@ ], "properties": { "order": 35, - "id": 35, + "id": 5, "prevSize": 32, "code": 58900, "name": "menu" }, "setIdx": 1, "setId": 1, - "iconIdx": 1 + "iconIdx": 5 }, { "icon": { @@ -108,10 +491,10 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "locked" - ] + ], + "grid": 0 }, "attrs": [ {}, @@ -119,14 +502,14 @@ ], "properties": { "order": 34, - "id": 34, + "id": 6, "prevSize": 32, "code": 58913, "name": "locked" }, "setIdx": 1, "setId": 1, - "iconIdx": 2 + "iconIdx": 6 }, { "icon": { @@ -143,10 +526,10 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "unlocked" - ] + ], + "grid": 0 }, "attrs": [ {}, @@ -156,14 +539,14 @@ ], "properties": { "order": 33, - "id": 33, + "id": 7, "prevSize": 32, "code": 58914, "name": "unlocked" }, "setIdx": 1, "setId": 1, - "iconIdx": 3 + "iconIdx": 7 }, { "icon": { @@ -174,24 +557,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "arrow-down" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 1, - "id": 32, + "id": 8, "prevSize": 32, "code": 58880, "name": "arrow-down" }, "setIdx": 1, "setId": 1, - "iconIdx": 4 + "iconIdx": 8 }, { "icon": { @@ -202,24 +585,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "arrow-left" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 2, - "id": 31, + "id": 9, "prevSize": 32, "code": 58881, "name": "arrow-left" }, "setIdx": 1, "setId": 1, - "iconIdx": 5 + "iconIdx": 9 }, { "icon": { @@ -230,24 +613,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "arrow-right" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 3, - "id": 30, + "id": 10, "prevSize": 32, "code": 58882, "name": "arrow-right" }, "setIdx": 1, "setId": 1, - "iconIdx": 6 + "iconIdx": 10 }, { "icon": { @@ -258,24 +641,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "arrow-up" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 4, - "id": 29, + "id": 11, "prevSize": 32, "code": 58883, "name": "arrow-up" }, "setIdx": 1, "setId": 1, - "iconIdx": 7 + "iconIdx": 11 }, { "icon": { @@ -288,10 +671,10 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "autocomplete" - ] + ], + "grid": 0 }, "attrs": [ {}, @@ -299,14 +682,14 @@ ], "properties": { "order": 5, - "id": 28, + "id": 12, "prevSize": 32, "code": 58884, "name": "autocomplete" }, "setIdx": 1, "setId": 1, - "iconIdx": 8 + "iconIdx": 12 }, { "icon": { @@ -317,24 +700,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "chevron-down" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 16, - "id": 27, + "id": 13, "prevSize": 32, "code": 58885, "name": "chevron-down" }, "setIdx": 1, "setId": 1, - "iconIdx": 9 + "iconIdx": 13 }, { "icon": { @@ -345,24 +728,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "chevron-left" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 17, - "id": 26, + "id": 14, "prevSize": 32, "code": 58886, "name": "chevron-left" }, "setIdx": 1, "setId": 1, - "iconIdx": 10 + "iconIdx": 14 }, { "icon": { @@ -373,24 +756,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "chevron-right" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 18, - "id": 25, + "id": 15, "prevSize": 32, "code": 58887, "name": "chevron-right" }, "setIdx": 1, "setId": 1, - "iconIdx": 11 + "iconIdx": 15 }, { "icon": { @@ -401,24 +784,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "chevron-up" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 19, - "id": 24, + "id": 16, "prevSize": 32, "code": 58888, "name": "chevron-up" }, "setIdx": 1, "setId": 1, - "iconIdx": 12 + "iconIdx": 16 }, { "icon": { @@ -431,10 +814,10 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "code" - ] + ], + "grid": 0 }, "attrs": [ {}, @@ -442,14 +825,14 @@ ], "properties": { "order": 20, - "id": 23, + "id": 17, "prevSize": 32, "code": 58889, "name": "code" }, "setIdx": 1, "setId": 1, - "iconIdx": 13 + "iconIdx": 17 }, { "icon": { @@ -460,24 +843,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "colors" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 21, - "id": 22, + "id": 18, "prevSize": 32, "code": 58890, "name": "colors" }, "setIdx": 1, "setId": 1, - "iconIdx": 14 + "iconIdx": 18 }, { "icon": { @@ -488,24 +871,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "cross" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 22, - "id": 21, + "id": 19, "prevSize": 32, "code": 58891, "name": "cross" }, "setIdx": 1, "setId": 1, - "iconIdx": 15 + "iconIdx": 19 }, { "icon": { @@ -518,10 +901,10 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "draw" - ] + ], + "grid": 0 }, "attrs": [ {}, @@ -536,7 +919,7 @@ }, "setIdx": 1, "setId": 1, - "iconIdx": 16 + "iconIdx": 20 }, { "icon": { @@ -553,10 +936,10 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "full-screen" - ] + ], + "grid": 0 }, "attrs": [ {}, @@ -566,14 +949,14 @@ ], "properties": { "order": 24, - "id": 19, + "id": 21, "prevSize": 32, "code": 58893, "name": "full-screen" }, "setIdx": 1, "setId": 1, - "iconIdx": 17 + "iconIdx": 21 }, { "icon": { @@ -584,24 +967,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "game" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 6, - "id": 18, + "id": 22, "prevSize": 32, "code": 58894, "name": "game" }, "setIdx": 1, "setId": 1, - "iconIdx": 18 + "iconIdx": 22 }, { "icon": { @@ -616,10 +999,10 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "general" - ] + ], + "grid": 0 }, "attrs": [ {}, @@ -628,14 +1011,14 @@ ], "properties": { "order": 7, - "id": 17, + "id": 23, "prevSize": 32, "code": 58895, "name": "general" }, "setIdx": 1, "setId": 1, - "iconIdx": 19 + "iconIdx": 23 }, { "icon": { @@ -662,10 +1045,10 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "hint" - ] + ], + "grid": 0 }, "attrs": [ {}, @@ -680,14 +1063,14 @@ ], "properties": { "order": 8, - "id": 16, + "id": 24, "prevSize": 32, "code": 58896, "name": "hint" }, "setIdx": 1, "setId": 1, - "iconIdx": 20 + "iconIdx": 24 }, { "icon": { @@ -698,24 +1081,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "lines" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 9, - "id": 15, + "id": 25, "prevSize": 32, "code": 58897, "name": "lines" }, "setIdx": 1, "setId": 1, - "iconIdx": 21 + "iconIdx": 25 }, { "icon": { @@ -728,10 +1111,10 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "login" - ] + ], + "grid": 0 }, "attrs": [ {}, @@ -739,14 +1122,14 @@ ], "properties": { "order": 10, - "id": 14, + "id": 26, "prevSize": 32, "code": 58898, "name": "login" }, "setIdx": 1, "setId": 1, - "iconIdx": 22 + "iconIdx": 26 }, { "icon": { @@ -759,10 +1142,10 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "logout" - ] + ], + "grid": 0 }, "attrs": [ {}, @@ -770,14 +1153,14 @@ ], "properties": { "order": 25, - "id": 13, + "id": 27, "prevSize": 32, "code": 58899, "name": "logout" }, "setIdx": 1, "setId": 1, - "iconIdx": 23 + "iconIdx": 27 }, { "icon": { @@ -788,24 +1171,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "play" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 26, - "id": 11, + "id": 28, "prevSize": 32, "code": 58901, "name": "play" }, "setIdx": 1, "setId": 1, - "iconIdx": 24 + "iconIdx": 28 }, { "icon": { @@ -816,24 +1199,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "plus" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 27, - "id": 10, + "id": 29, "prevSize": 32, "code": 58902, "name": "plus" }, "setIdx": 1, "setId": 1, - "iconIdx": 25 + "iconIdx": 29 }, { "icon": { @@ -844,24 +1227,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "position" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 28, - "id": 9, + "id": 30, "prevSize": 32, "code": 58903, "name": "position" }, "setIdx": 1, "setId": 1, - "iconIdx": 26 + "iconIdx": 30 }, { "icon": { @@ -872,24 +1255,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "reset" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 29, - "id": 8, + "id": 31, "prevSize": 32, "code": 58904, "name": "reset" }, "setIdx": 1, "setId": 1, - "iconIdx": 27 + "iconIdx": 31 }, { "icon": { @@ -908,10 +1291,10 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "save" - ] + ], + "grid": 0 }, "attrs": [ {}, @@ -922,14 +1305,14 @@ ], "properties": { "order": 30, - "id": 7, + "id": 32, "prevSize": 32, "code": 58905, "name": "save" }, "setIdx": 1, "setId": 1, - "iconIdx": 28 + "iconIdx": 32 }, { "icon": { @@ -942,10 +1325,10 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "shapes" - ] + ], + "grid": 0 }, "attrs": [ {}, @@ -953,14 +1336,14 @@ ], "properties": { "order": 31, - "id": 6, + "id": 33, "prevSize": 32, "code": 58906, "name": "shapes" }, "setIdx": 1, "setId": 1, - "iconIdx": 29 + "iconIdx": 33 }, { "icon": { @@ -971,24 +1354,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "share" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 32, - "id": 5, + "id": 34, "prevSize": 32, "code": 58907, "name": "share" }, "setIdx": 1, "setId": 1, - "iconIdx": 30 + "iconIdx": 34 }, { "icon": { @@ -1001,10 +1384,10 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "text" - ] + ], + "grid": 0 }, "attrs": [ {}, @@ -1012,14 +1395,14 @@ ], "properties": { "order": 11, - "id": 4, + "id": 35, "prevSize": 32, "code": 58908, "name": "text" }, "setIdx": 1, "setId": 1, - "iconIdx": 31 + "iconIdx": 35 }, { "icon": { @@ -1030,24 +1413,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "tick" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 12, - "id": 3, + "id": 36, "prevSize": 32, "code": 58909, "name": "tick" }, "setIdx": 1, "setId": 1, - "iconIdx": 32 + "iconIdx": 36 }, { "icon": { @@ -1062,10 +1445,10 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "tooltips" - ] + ], + "grid": 0 }, "attrs": [ {}, @@ -1074,14 +1457,14 @@ ], "properties": { "order": 13, - "id": 2, + "id": 37, "prevSize": 32, "code": 58910, "name": "tooltips" }, "setIdx": 1, "setId": 1, - "iconIdx": 33 + "iconIdx": 37 }, { "icon": { @@ -1092,24 +1475,24 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "trophy" - ] + ], + "grid": 0 }, "attrs": [ {} ], "properties": { "order": 14, - "id": 1, + "id": 38, "prevSize": 32, "code": 58911, "name": "trophy" }, "setIdx": 1, "setId": 1, - "iconIdx": 34 + "iconIdx": 38 }, { "icon": { @@ -1126,10 +1509,10 @@ {} ], "isMulticolor": false, - "grid": 0, "tags": [ "wand" - ] + ], + "grid": 0 }, "attrs": [ {}, @@ -1139,14 +1522,39 @@ ], "properties": { "order": 15, - "id": 0, + "id": 39, "prevSize": 32, "code": 58912, "name": "wand" }, "setIdx": 1, "setId": 1, - "iconIdx": 35 + "iconIdx": 39 + }, + { + "icon": { + "paths": [ + "M647.429 596q17.714 17.143 8 39.429-9.714 22.857-33.714 22.857h-218.286l114.857 272q5.714 14.286 0 28t-19.429 20l-101.143 42.857q-14.286 5.714-28 0t-20-19.429l-109.143-258.286-178.286 178.286q-10.857 10.857-25.714 10.857-6.857 0-13.714-2.857-22.857-9.714-22.857-33.714v-859.429q0-24 22.857-33.714 6.857-2.857 13.714-2.857 15.429 0 25.714 10.857z" + ], + "width": 658, + "attrs": [], + "isMulticolor": false, + "tags": [ + "mouse-pointer" + ], + "grid": 14 + }, + "attrs": [], + "properties": { + "order": 1, + "id": 0, + "prevSize": 32, + "code": 58916, + "name": "mouse-pointer" + }, + "setIdx": 2, + "setId": 0, + "iconIdx": 0 } ], "height": 1024, diff --git a/resources/icon-set/style.css b/resources/icon-set/style.css index f6338e69e..9dca87e8b 100755 --- a/resources/icon-set/style.css +++ b/resources/icon-set/style.css @@ -1,136 +1,153 @@ @font-face { - font-family: 'icomoon'; - src:url('fonts/icomoon.eot?nnkq9x'); - src:url('fonts/icomoon.eot?#iefixnnkq9x') format('embedded-opentype'), - url('fonts/icomoon.ttf?nnkq9x') format('truetype'), - url('fonts/icomoon.woff?nnkq9x') format('woff'), - url('fonts/icomoon.svg?nnkq9x#icomoon') format('svg'); - font-weight: normal; - font-style: normal; + font-family: 'icomoon'; + src: url('fonts/icomoon.eot?9v3uet'); + src: url('fonts/icomoon.eot?9v3uet#iefix') format('embedded-opentype'), + url('fonts/icomoon.ttf?9v3uet') format('truetype'), + url('fonts/icomoon.woff?9v3uet') format('woff'), + url('fonts/icomoon.svg?9v3uet#icomoon') format('svg'); + font-weight: normal; + font-style: normal; } [class^="icon-"], [class*=" icon-"] { - font-family: 'icomoon'; - speak: none; - font-style: normal; - font-weight: normal; - font-variant: normal; - text-transform: none; - line-height: 1; + /* use !important to prevent issues with browser extensions that change fonts */ + font-family: 'icomoon' !important; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; - /* Better Font Rendering =========== */ - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } -.icon-mouse-pointer:before { - content: "\e624"; +.icon-cpu:before { + content: "\e904"; +} +.icon-zip:before { + content: "\e903"; +} +.icon-pdf-guide:before { + content: "\e902"; +} +.icon-mail:before { + content: "\e901"; +} +.icon-guide:before { + content: "\e900"; } .icon-campfire:before { - content: "\e623"; + content: "\e623"; } .icon-menu:before { - content: "\e614"; + content: "\e614"; } .icon-locked:before { - content: "\e621"; + content: "\e621"; } .icon-unlocked:before { - content: "\e622"; + content: "\e622"; } .icon-arrow-down:before { - content: "\e600"; + content: "\e600"; } .icon-arrow-left:before { - content: "\e601"; + content: "\e601"; } .icon-arrow-right:before { - content: "\e602"; + content: "\e602"; } .icon-arrow-up:before { - content: "\e603"; + content: "\e603"; } .icon-autocomplete:before { - content: "\e604"; + content: "\e604"; } .icon-chevron-down:before { - content: "\e605"; + content: "\e605"; } .icon-chevron-left:before { - content: "\e606"; + content: "\e606"; } .icon-chevron-right:before { - content: "\e607"; + content: "\e607"; } .icon-chevron-up:before { - content: "\e608"; + content: "\e608"; } .icon-code:before { - content: "\e609"; + content: "\e609"; } .icon-colors:before { - content: "\e60a"; + content: "\e60a"; } .icon-cross:before { - content: "\e60b"; + content: "\e60b"; } .icon-draw:before { - content: "\e60c"; + content: "\e60c"; } .icon-full-screen:before { - content: "\e60d"; + content: "\e60d"; } .icon-game:before { - content: "\e60e"; + content: "\e60e"; } .icon-general:before { - content: "\e60f"; + content: "\e60f"; } .icon-hint:before { - content: "\e610"; + content: "\e610"; } .icon-lines:before { - content: "\e611"; + content: "\e611"; } .icon-login:before { - content: "\e612"; + content: "\e612"; } .icon-logout:before { - content: "\e613"; + content: "\e613"; } .icon-play:before { - content: "\e615"; + content: "\e615"; } .icon-plus:before { - content: "\e616"; + content: "\e616"; } .icon-position:before { - content: "\e617"; + content: "\e617"; } .icon-reset:before { - content: "\e618"; + content: "\e618"; } .icon-save:before { - content: "\e619"; + content: "\e619"; } .icon-shapes:before { - content: "\e61a"; + content: "\e61a"; } .icon-share:before { - content: "\e61b"; + content: "\e61b"; } .icon-text:before { - content: "\e61c"; + content: "\e61c"; } .icon-tick:before { - content: "\e61d"; + content: "\e61d"; } .icon-tooltips:before { - content: "\e61e"; + content: "\e61e"; } .icon-trophy:before { - content: "\e61f"; + content: "\e61f"; } .icon-wand:before { - content: "\e620"; + content: "\e620"; +} +.icon-mouse-pointer:before { + content: "\e624"; } + diff --git a/styles/core/header.styl b/styles/core/header.styl index 6926479c1..3b31c3789 100644 --- a/styles/core/header.styl +++ b/styles/core/header.styl @@ -1,16 +1,19 @@ header clearfix() background color-header - padding 20px text-align center position relative + .main-navigation + min-height 40px + padding-bottom 20px + a.logo illustration-fit-height 'layout/draw-logo', header-height margin auto display inline-block - margin-top 5px float left + margin-top 5px margin-right 10px // position absolute // left 50% @@ -32,14 +35,33 @@ header li margin 0 15px float left - + + &.discover + a + border-radius(3px) + border 1px solid color-primary + color color-primary + padding 4px 20px + opacity 0.8 + text-transform none + + i + opacity 1 + font-size 16px + margin-right 10px + + &:hover + opacity 1 + background-color color-primary + color color-white + &.coming-soon position relative - + a opacity 1 color darken(color-grey-darker, 0.2) - + div background-color color-primary position absolute @@ -75,6 +97,9 @@ header &.active opacity 1 + &.signup + top 0 + i opacity .5 font-size 18px @@ -106,7 +131,7 @@ header position relative margin-top 2px opacity 1 - + .avatar width 35px height @width @@ -114,12 +139,8 @@ header overflow hidden display inline-block margin -10px 10px - + img width @width + 2px height @width margin -1px - -.summercamp - banner(#7fc04b, #fff) - \ No newline at end of file diff --git a/styles/core/icons.styl b/styles/core/icons.styl index 12b9b0e6d..e6d4310ce 100644 --- a/styles/core/icons.styl +++ b/styles/core/icons.styl @@ -23,6 +23,26 @@ icon() icon() } +.icon-cpu:before { + content: "\e904"; +} + +.icon-zip:before { + content: "\e903"; +} + +.icon-pdf-guide:before { + content: "\e902"; +} + +.icon-mail:before { + content: "\e901"; +} + +.icon-guide:before { + content: "\e900"; +} + .icon-mouse-pointer:before { content: "\e624"; } diff --git a/styles/core/kano-nav.styl b/styles/core/kano-nav.styl new file mode 100644 index 000000000..7844aee8e --- /dev/null +++ b/styles/core/kano-nav.styl @@ -0,0 +1,134 @@ +kano-nav + z-index 8 !important + + .kano-nav.page-width + width 100% + + ul.nav + debullet() + display flex + display -webkit-flex + font-size 16px + + &.nav-secondary + justify-content flex-start + -webkit-justify-content flex-start + + @media all and (max-width: 768px) + align-items flex-start + -webkit-align-items flex-start + flex-direction column + -webkit-flex-direction column + + li + font-size 24px + font-weight bold + padding 20px + + @media all and (min-width: 768px) + align-items center + -webkit-align-items center + flex-direction row + -webkit-flex-direction row + justify-content flex-end + -webkit-justify-content flex-end + + li + margin 0 15px + + &:first-child + margin-left 0 + + &:last-child + margin-right 0 + + &.nav-right + align-items center + -webkit-align-items center + height 100% + + @media all and (min-width: 768px) + flex-direction row + -webkit-flex-direction row + justify-content flex-end + -webkit-justify-content flex-end + + @media all and (min-width: 978px) + min-width 280px + + li + margin-left 15px + + li + i + color color-ash + font-size 18px + margin-right 5px + position relative + top 2px + + a + smooth-font() + color color-ash + line-height header-height + font-weight bold + position relative + top -2px + + &.active + color color-charcoal + + i + color color-orange + + &.signup + top 0 + + button.close + background color-red + width 25px + height @width + line-height @width + padding 0 + margin-top 5px + + i + font-size 9px + opacity 1 + margin 0 + position static + + &:hover + background lighten(color-red, 5) + + a.user-display + color color-ash + margin-top 0 + align-items center + -webkit-align-items center + display flex + display -webkit-flex + flex-direction row + -webkit-flex-direction row + justify-content space-around + -webkit-justify-content space-around + position relative + margin-top 2px + opacity 1 + + .avatar + width 35px + height @width + border-radius @width + overflow hidden + display inline-block + margin -10px 10px + + img + width @width + 2px + height @width + margin -1px + + @media all and (max-width: 978px) + .username + display none diff --git a/styles/core/layout.styl b/styles/core/layout.styl index 61c298ecd..a109adbe0 100644 --- a/styles/core/layout.styl +++ b/styles/core/layout.styl @@ -18,7 +18,7 @@ body section display block padding: 30px 0 - + &:last-child margin-bottom 0 @@ -43,26 +43,18 @@ img.invert filter: invert(100%); .kano-logo - bg-image('layout/kano-logo', 127px 50px, center center, no-repeat) - border-radius(0 0 5px 5px) - position fixed - bottom 10px - right 10px - width 127px - height 50px - padding 5px - background-color color-bg - - &:before - border-radius(5px 5px 0 0) - no-select() - content 'Powered by' - position absolute - bottom 100% - left 0 - width: 100% - text-align center - color color-white - background color-bg - padding-top 3px - font-size 12px \ No newline at end of file + bg-image('layout/with-kano', contain) + border-radius 0 + position absolute + top 58px + width 90px + height 20px + left 31px + opacity 0.5 + transition opacity 0.3s linear + + &:hover + opacity 1 + +.banner + banner(color-orange, #fff) diff --git a/styles/core/variables.styl b/styles/core/variables.styl index 1685dd949..41016d5f9 100644 --- a/styles/core/variables.styl +++ b/styles/core/variables.styl @@ -17,6 +17,8 @@ color-grey-light = #aaa color-grey-mid = #ececec color-grey-dark = #999 color-grey-darker = #666 +color-ash = #a7a7a7 +color-charcoal = #44423d color-bg = #51555c color-header = #444444 @@ -44,7 +46,7 @@ color-language-number = #59b3d0 color-language-identifier = #ff842a color-language-language = #b0d942 -editor-height = 551px +editor-height = 521px header-height = 35px editor-tabs-size = 45px -editor-title-height = 50px \ No newline at end of file +editor-title-height = 50px diff --git a/styles/editor/controls.styl b/styles/editor/controls.styl index 77795b5d1..955a814cf 100644 --- a/styles/editor/controls.styl +++ b/styles/editor/controls.styl @@ -1,6 +1,42 @@ -editor .controls - position absolute - z-index 1 - right 10px - bottom 10px - z-index 8 \ No newline at end of file +editor + .controls + background-color #393B3E + display(flex) + justify-content(center) + padding 5px 0 + + a + background-color #393B3E + display inline-block + padding 5px 10px + margin-right 10px + color color-grey-dark + font-weight bold + border-radius(3px) + smooth-font() + + .round + display inline-block + width 6px + height 6px + margin-right 7px + border-radius 50% + border 2px solid color-grey-dark + + &:hover, &.active + background-color #6E757E + color color-white + + .round + color color-white + border-color color-white + + &.active + .round + background-color color-white + + &.full + background none + position fixed + bottom 10px + right 10px \ No newline at end of file diff --git a/styles/editor/guide.styl b/styles/editor/guide.styl new file mode 100644 index 000000000..3585b4af4 --- /dev/null +++ b/styles/editor/guide.styl @@ -0,0 +1,72 @@ +editor + .icon-guide + font-size 32px + + .editor-guide + border-radius() + background color-editor-bg + position relative + + .inner + padding 20px 30px + height editor-height + overflow auto + box-sizing border-box + + &, h4, p + color color-white + + &:before, &:after + absolute-cover() + content '' + height 30px + transition opacity .2s + top 0 + z-index 2 + + &:before + border-radius(3px 3px 0 0) + background linear-gradient(rgba(color-editor-bg, 1), rgba(color-editor-bg, 0)) + + &:after + border-radius(0 0 3px 3px) + top auto + bottom 0 + background linear-gradient(rgba(color-editor-bg, 0), rgba(color-editor-bg, 1)) + + h4 + smooth-font() + font-size 20px + font-weight bold + margin-bottom 5px + + code + color #ff842a + background-color transparent + padding 0 + font-size 100% + + .teachers-guide + display(flex) + align-items(center) + justify-content(center) + margin-bottom 10px + + a + display(inline-flex) + align-items(center) + justify-content(center) + background-color #636A73 + padding 5px 12px + color #BEBFC1 + font-weight bold + text-transform uppercase + font-size 16px + border-radius(3px) + smooth-font() + + &:hover + background-color lighten(#636A73, 5) + + i + font-size 3em \ No newline at end of file diff --git a/styles/editor/tabs.styl b/styles/editor/tabs.styl index eadc85bc4..1a0249998 100644 --- a/styles/editor/tabs.styl +++ b/styles/editor/tabs.styl @@ -1,7 +1,7 @@ editor position relative - .editor-docs, .editor-wrap + .editor-docs, .editor-wrap, .editor-guide margin-left editor-tabs-size + 20px ul.editor-tabs diff --git a/styles/editor/theme.styl b/styles/editor/theme.styl index 06bae7270..6c81bb07a 100644 --- a/styles/editor/theme.styl +++ b/styles/editor/theme.styl @@ -39,8 +39,6 @@ body.full-screen-editor .actions display none - .controls - position fixed editor display block @@ -64,7 +62,7 @@ editor height 100% background color-editor-bg overflow hidden - padding 10px 0 + padding 10px 0 0 box-sizing border-box &.has-title diff --git a/styles/elements/buttons.styl b/styles/elements/buttons.styl index 3285b1530..a8272b0e8 100644 --- a/styles/elements/buttons.styl +++ b/styles/elements/buttons.styl @@ -47,6 +47,23 @@ button, a.button, input[type='submit'], input[type='reset'] &.button-editor button-color(lighten(color-editor-bg, 10)) + + &.button-facebook + button-color(#31488b) + + &.button-twitter + button-color(#55acee) + + &.button-facebook, &.button-twitter, &.button-email + padding 10px !important + img + width 20px + height 20px + border-radius(0) + background none + + &.button-email + button-color(color-green) &.large padding 13px 30px diff --git a/styles/elements/display.styl b/styles/elements/display.styl index 3aa5ce1a9..767080978 100644 --- a/styles/elements/display.styl +++ b/styles/elements/display.styl @@ -48,9 +48,35 @@ display background #f5f5f5 .actions + position relative padding-bottom 20px padding-top 10px text-align center + + .position-indicator + display inline-block + margin 7px 15px + position absolute + left 0 + font-weight bold + font-size 13px + text-transform uppercase + color darken(color-grey-dark, 10) + pointer-events none + + i + &.icon-mouse-pointer + font-size 12px + padding-right 6px + &.icon-plus + font-size 9px + padding-right 5px + + .pos-value + position relative + display inline-block + width 30px + margin-left 3px .action smooth-font() @@ -108,30 +134,3 @@ display p font-size 14px font-style italic - - .toolbar - position absolute - bottom 0 - left 0 - right 0 - padding 10px - font-weight bold - - .position-indicator - font-size 13px - position absolute - right 10px - bottom 10px - text-transform uppercase - color rgba(color-grey-darker, .5) - pointer-events none - - & i:before - font-size 10px - padding-right 6px - - .pos-value - position relative - display inline-block - width 30px - margin-left 3px \ No newline at end of file diff --git a/styles/elements/export-dialog.styl b/styles/elements/export-dialog.styl index 204ee0b71..789d005bc 100644 --- a/styles/elements/export-dialog.styl +++ b/styles/elements/export-dialog.styl @@ -12,6 +12,7 @@ border-radius 3px border 2px solid #eeeeee resize none + margin-bottom 20px &:focus border 2px solid #ababab @@ -22,18 +23,20 @@ background #fff textarea - height 96px - margin-bottom 5px + height 181px .buttons - text-align right - margin-top 20px - button display inline-block margin-bottom 0 - padding 20px + padding 10px 20px + &.skip + background-color color-grey-light + + &:hover + background-color darken(color-grey-light, 5) + .xp margin-left 10px color #ddd @@ -43,16 +46,16 @@ input:invalid ~ .button background color-disabled - + .facebook-share, .email-share font-size 14px text-decoration underline text-transform none font-weight 600 font-smoothing antialiased - text-align left + text-align center i margin-right 10px - + .facebook-share - color #3C599B \ No newline at end of file + color #3C599B diff --git a/styles/elements/hero-header.styl b/styles/elements/hero-header.styl new file mode 100644 index 000000000..c3d53a48b --- /dev/null +++ b/styles/elements/hero-header.styl @@ -0,0 +1,63 @@ +.hero-header + -webkit-font-smoothing antialiased + -moz-osx-font-smoothing grayscale + + .hero-image + height 35vw + max-height 340px + min-height 160px + + .hero-links + align-items center + background-color #ffffff + display flex + justify-content center + padding 15px + + @media all and (max-width: 680px) + flex-direction column + + @media all and (min-width: 681px) + flex-direction row + + .hero-link + align-items center + display flex + flex 1 1 auto + flex-direction row + justify-content flex-start + max-width 350px + width 100% + + @media all and (max-width: 680px) + &:nth-child(2n) + margin-top 20px + + @media all and (min-width: 681px) + margin 0 40px + + .hero-link-thumbnail + flex 1 0 70px + + .hero-link-image + height auto + width 100% + + &:first-child + .hero-link-thumbnail + max-width 70px + + &:nth-child(2n) + .hero-link-thumbnail + max-width 60px + + .hero-link-text + color color-ash + font-size 20px + font-weight bold + padding-left 20px + +.pixelhack + .hero-header + .hero-image + bg-image("pixelhack/pixelhack-hero", cover, center, no-repeat, "jpg") diff --git a/styles/elements/kano-register.styl b/styles/elements/kano-register.styl new file mode 100644 index 000000000..d738f064e --- /dev/null +++ b/styles/elements/kano-register.styl @@ -0,0 +1,110 @@ +.register-input + border-radius 4px + background color-grey-lighter + border 2px solid color-grey + margin-bottom 20px + width 100% + font-size 1rem + padding 9px 15px + box-sizing border-box + font-weight 200 + +.register-errors + background color-red + padding 10px + border-radius 10px + color color-white + display none + +.register-label + font-weight normal + font-size 1.2rem + +kano-username-field + label + @extend .register-label + .generate-nickname + float right + font-size 0.8em + color color-orange + font-weight 800 + cursor pointer + font-weight 500 + border-bottom 1px dotted + font-size 1rem + #input + @extend .register-input + .errors + @extend .register-errors + +kano-password-field + label + @extend .register-label + #input + @extend .register-input + .errors + @extend .register-errors + .password-field + position relative + .password-indicator + position absolute + right 10px + top 13px + width 30px + height 17px + background-size 30px 17px + .password-indicator.show-password + background-image url('/assets/auth/show-icon.png') + @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) + background-image url('/assets/auth/show-icon@2x.png') + .password-indicator.hide-password + background-image url('/assets/auth/hide-icon.png') + @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) + background-image url('/assets/auth/hide-icon@2x.png') + +kano-email-field + label + @extend .register-label + #input + @extend .register-input + .errors + @extend .register-errors + +kano-signup-form + text-align left + #kano-signup-form-errors + @extend .register-errors + .buttons + margin 10px + text-align center + .register-button + width 100% + margin-bottom 30px + + +kano-login-form + text-align left + #kano-login-form-errors + @extend .register-errors + #spinner + display none + #errors + @extend .register-errors + .actions + text-align center + .success + width 100% + kano-password-field + .password-indicator + display none + + +.register-heading + color color-orange + font-weight 600 + text-align center + margin-bottom 40px + +.auth-form + h3 + @extend .register-heading diff --git a/styles/elements/modal.styl b/styles/elements/modal.styl index 49f740bed..751a9e60d 100644 --- a/styles/elements/modal.styl +++ b/styles/elements/modal.styl @@ -20,8 +20,8 @@ position absolute left 50% top 150px - margin-left -300px - width 600px + margin-left -360px + width 720px box-sizing border-box padding 25px min-height 50px diff --git a/styles/elements/social-sharing.styl b/styles/elements/social-sharing.styl new file mode 100644 index 000000000..61e08f61e --- /dev/null +++ b/styles/elements/social-sharing.styl @@ -0,0 +1,87 @@ +.pixelhack .social-sharing + position fixed + right 0 + top 0 + bottom 0 + display(flex) + justify-content(center) + + .buttons + display(flex) + flex-direction(column) + align-self(center) + padding 10px + background-color color-white + border-radius(3px 0 0 3px) + + a.button + margin 0 0 10px 0 + padding 20px + color color-white + border-radius(3px) + display(flex) + justify-content(center) + align-content(center) + + &:last-child + margin-bottom 0 + + &.button-mail + button-color(color-blue) + padding 11px 8px + + i + position relative + left 0 + right 0 + opacity 1 + font-weight bold + + &.button-facebook + button-color(#31488b) + + &.button-twitter + button-color(#55acee) + + &.button-facebook, &.button-twitter + + img + width 16px + height 16px + + @media screen and (max-width: 1160px) + display none + +.modal-mail-sender + width 400px + margin-left -200px + padding 20px + + h4 + font-weight bold + smooth-font() + + input, textarea + display block + margin 0 0 10px + padding 12px 10px + width 100% + background color-white + border 1px solid color-ruler + box-sizing border-box + box-shadow 0 1px 0 0 rgba(#000, .1) inset + border-radius(3px) + font-family font-body + font-size 16px + font-weight bold + color lighten(color-black, 10) + smooth-font() + + &:focus + border 1px solid color-primary + outline 0 + + textarea + height 180px + resize none + \ No newline at end of file diff --git a/styles/main.styl b/styles/main.styl index 3ed307813..03f3349e2 100644 --- a/styles/main.styl +++ b/styles/main.styl @@ -11,6 +11,7 @@ @import 'core/variables' @import 'core/layout' @import 'core/header' +@import 'core/kano-nav' @import 'core/fonts' @import 'core/typography' @import 'core/icons' @@ -22,12 +23,15 @@ @import 'elements/category-icons' @import 'elements/modal' @import 'elements/export-dialog' +@import 'elements/hero-header' @import 'elements/load-dialog' @import 'elements/notify' @import 'elements/workspace' @import 'elements/display' @import 'elements/loading' @import 'elements/progress-circle' +@import 'elements/kano-register' +@import 'elements/social-sharing' // Editor @import 'editor/theme' @@ -38,10 +42,17 @@ @import 'editor/controls' @import 'editor/search' @import 'editor/token-handler' +@import 'editor/guide' // Views @import 'views/splash' @import 'views/challenges' @import 'views/challenge' @import 'views/summer-camp' -@import 'views/promo-popup' \ No newline at end of file +@import 'views/promo-popup' +@import 'views/feedbackSplash' +@import 'views/auth-modal' +@import 'views/partial/challenge-info' +@import 'views/partial/mail-preview' +@import 'views/partial/next-challenge' +@import 'views/partial/share-creation' diff --git a/styles/mixins/generic.styl b/styles/mixins/generic.styl index 444656a57..bb784bf31 100644 --- a/styles/mixins/generic.styl +++ b/styles/mixins/generic.styl @@ -1,5 +1,6 @@ page-width() width 1020px + padding-top 20px margin-left auto margin-right auto @@ -88,7 +89,6 @@ banner(bgcolor, a_color) text-align center background-color bgcolor padding 7px 0 - margin-bottom 20px font-size 90% font-weight 400 @@ -115,4 +115,14 @@ banner(bgcolor, a_color) span font-weight 600 - font-smoothing: antialiased \ No newline at end of file + font-smoothing: antialiased + + .modal-inner + top 150px + .cover + bg-image('challenges/images/world_covers/pixelhack', false, false, no-repeat) + min-height 200px + + .detail + display none + \ No newline at end of file diff --git a/styles/views/auth-modal.styl b/styles/views/auth-modal.styl new file mode 100644 index 000000000..78b213cf1 --- /dev/null +++ b/styles/views/auth-modal.styl @@ -0,0 +1,21 @@ +.auth-modal + text-align center + text-transform none +.auth-modal-inner + @extend .modal-inner + max-width 400px + position relative + margin 50px auto + left auto + top auto + position relative + .close-button + position absolute + top 10px + right 10px + color color-orange + font-size 2rem + font-weight 600 + line-height 0 + &:hover + cursor pointer diff --git a/styles/views/challenge.styl b/styles/views/challenge.styl index b29304295..c134f1032 100644 --- a/styles/views/challenge.styl +++ b/styles/views/challenge.styl @@ -86,4 +86,44 @@ .button color color-white - background color-green \ No newline at end of file + background color-green + + .completion + display(flex) + align-items(center) + justify-content(center) + + .text + flex(75) + + .gallery + flex(35) + + h4 + color color-orange + font-size 18px + text-transform uppercase + margin-bottom 5px + + .remixes + margin-top 0 + + .image + display inline-block + width 80px + height 80px + background-size cover + background-position center center + background-repeat no-repeat + border 2px solid #40444B + border-radius(3px) + margin-right 10px + + &:last-child + margin-right 0 + + .unlocked + background-color color-blue + + &:hover + background-color lighten(color-blue, 5) \ No newline at end of file diff --git a/styles/views/challenges.styl b/styles/views/challenges.styl index 92646dcd4..2f0c9baab 100644 --- a/styles/views/challenges.styl +++ b/styles/views/challenges.styl @@ -1,4 +1,159 @@ + .page-challenges + .weekday + display none + + &.mischiefweek2015 + position relative + overflow hidden + + .image + position absolute + top 10px + width 400px + height 400px + z-index -1 + + &.pull-left + left -200px + &.pull-right + right -200px + + .header + position relative + z-index 0 + margin-bottom 20px + height 180px + width 100% + + &.pixelhack + .image + top -40px + + &.pull-left + bg-image("pixelhack/cubes-left", 400px 400px, false, no-repeat) + + &.pull-right + bg-image("pixelhack/cubes-right", 400px 400px, false, no-repeat) + + &.mischiefweek2015 + .image + &.pull-left + bg-image("mischiefweek/web-left", 400px 400px, false, no-repeat) + + &.pull-right + bg-image("mischiefweek/web-right", 400px 400px, false, no-repeat) + + .header + bg-image("mischiefweek/mischief-header", 100% 160px, false, no-repeat) + + .challenges-list li a + .weekday + display block + position absolute + top 0 + bg-image("mischiefweek/sash-purple", 80px 80px, false, no-repeat) + height 80px + width 80px + + span + display block + transform rotate(-45deg) + transform-origin 67px 30px + text-transform uppercase + font-weight 700 + smooth-font() + font-size 14px + text-align center + color color-white + + &.current .weekday + bg-image("mischiefweek/sash-orange", 80px 80px, false, no-repeat) + + + .page-title + position relative + font-weight 400 + + .quests + position absolute + left 0 + display inline-block + + a + color #888 + + ul.worlds-list + debullet() + clearfix() + width 100% + padding 0 + margin 0 0 30px 0 + + li.world-item + display inline-block + box-sizing: border-box + margin 0 20px 20px 0 + width 48% + + a.world-cover + width 100% + display block + height 240px + background-color #626770 + position relative + border-radius(3px 3px 3px 3px) + + h4 + position absolute + bottom 0 + left 0 + right 0 + background-color color-white + color color-black + padding 10px + font-weight 700 + font-size 16px + smooth-font() + border-radius(0 0 3px 3px) + + &:after + icon() + circle(20px, transparent) + float right + font-size 9px + margin-top 3px + margin-right 3px + color color-white + line-height 22px + margin 0 + + &.current + box-shadow color-blue 0 0 0 4px + border-radius(3px) + + h4:after + content '\e615' + background-color color-blue + + &.completed + h4 + background-color color-green + color color-white + &:after + content '\e61d' + background-color darken(color-green, 5) + + &.locked + filter(grayscale(100%)) + cursor default + + h4 + color darken(color-grey-lighter, 10) + &:after + content '\e621' + margin-top 0 + background darken(color-grey-lighter, 10) ul.challenges-list, ul.shares-list debullet() @@ -21,6 +176,7 @@ display block overflow hidden background color-white + position relative .detail padding 10px @@ -79,6 +235,7 @@ &.locked filter(grayscale(100%)) + cursor default .cover, h5 opacity .3 @@ -103,27 +260,29 @@ .cover background-color #46ddeb -.modal-challenge-info - top 50px - width 480px - margin-left -240px - padding 0 +.certificate + .modal-inner + top 150px + + .cover + background-image url('/assets/pixelhack/cert-modal.png') + background-size 100% + background-position center center + background-repeat no-repeat + min-height 200px + - h3, p - text-transform none +placeholder() + color mix(color-grey-light, color-grey-lighter, 70%) - h3 - smooth-font() - font-weight bold - margin-bottom 5px +::-webkit-input-placeholder + placeholder() - p - font-size 18px +:-moz-placeholder + placeholder() - .cover - min-height 400px - background-size cover - background-position center center +::-moz-placeholder + placeholder() - .detail - padding 30px \ No newline at end of file +:-ms-input-placeholder + placeholder() diff --git a/styles/views/feedbackSplash.styl b/styles/views/feedbackSplash.styl new file mode 100644 index 000000000..dc70a0e19 --- /dev/null +++ b/styles/views/feedbackSplash.styl @@ -0,0 +1,152 @@ +.kano-feedback-container + border-radius 3px + position fixed + bottom 15px + right 15px + height 45px + cursor pointer + transition min-width 0.2s ease-in-out, opacity 1s ease + background #696E77 + overflow hidden + opacity 1 + min-width 45px + + &:hover + min-width 115px + opacity 1 + + span + position absolute + left 45px + top 50% + transform translateY(-50%) + + .kano-feedback + bg-image('layout/feedback-logo', contain) + opacity 0.5 + position absolute + top 50% + left 12px + transform translateY(-50%) + height 20px + width 20px + + @media (max-width: 1160px) + display none + +@keyframes fadeInUp + 0% + transform translate3d(0, 150%, 0) + min-width 115px + + 20% + min-width 115px + transform none + + 80% + min-width 115px + transform none + + 100% + min-width 45px + +.fadeInUp + animation-duration 6s + animation-fill-mode both + animation-name fadeInUp + animation-delay 2s + +.modal-inner.splash.feedback-splash + text-align center + width 550px + margin-left -275px + + form + padding-top 30px + max-width 450px + margin 0 auto + + h1 + color white + + h4 + margin-bottom 0 + + + textarea + width 100% + display inline-block + padding 15px + font-family 'Bariol' + font-size 1em + box-sizing border-box + resize none + + button + background #51555C + + &:hover + background lighten(#51555C, 20%) + + .form-container + margin-bottom 15px + + .form-message + + h2 + color white + + .rating-5 + bg-image('feedback-reactions/rating1', 35px, center, no-repeat) + .rating-4 + bg-image('feedback-reactions/rating2', 35px, center, no-repeat) + .rating-3 + bg-image('feedback-reactions/rating3', 35px, center, no-repeat) + .rating-2 + bg-image('feedback-reactions/rating4', 35px, center, no-repeat) + .rating-1 + bg-image('feedback-reactions/rating5', 35px, center, no-repeat) + + .mood-selector + margin-bottom 25px + + input + margin 0 + padding 0 + appearance none + display inline + + .mood-selector input:checked +.mood-container + background-color orange + + .mood + cursor pointer + display inline-block + + .mood-container + text-align center + display inline-block + background #696E77 + transition background 0.5s ease + border-radius 10px + margin 0 3px + + &:hover + background orange + + label + width 25px + height 25px + padding 15px + margin-bottom -4px + + .feedback-box + margin-bottom 15px + + .feedback-buttons + padding 20px 0 + + button + margin 0 20px +.hide + display none diff --git a/styles/views/partial/challenge-info.styl b/styles/views/partial/challenge-info.styl new file mode 100644 index 000000000..b1f0e32cd --- /dev/null +++ b/styles/views/partial/challenge-info.styl @@ -0,0 +1,24 @@ +.modal-challenge-info + top 50px + width 480px + margin-left -240px + padding 0 + + h3, p + text-transform none + + h3 + smooth-font() + font-weight bold + margin-bottom 5px + + p + font-size 18px + + .cover + min-height 400px + background-size cover + background-position center center + + .detail + padding 30px \ No newline at end of file diff --git a/styles/views/partial/mail-preview.styl b/styles/views/partial/mail-preview.styl new file mode 100644 index 000000000..727214f10 --- /dev/null +++ b/styles/views/partial/mail-preview.styl @@ -0,0 +1,77 @@ +.modal-mail-preview + top 50px + width 500px + margin-left -250px + padding 0 + + .preview + height auto + width 100% + box-sizing border-box + background-color color-grey-lighter + padding-bottom 20px + border-radius(5px) + + .header + padding 20px 0 + background-color color-header + color white + text-transform none + font-weight bold + font-size 24px + smooth-font() + width 100% + + h4 + smooth-font() + font-weight bold + margin 10px 0 + text-transform none + + .content + padding 0 20px + display(flex) + flex-direction(row) + flex-wrap(nowrap) + justify-content(space-between) + + .left-content + flex 60 + input, textarea + display block + margin 0 0 10px + padding 12px 10px + width 100% + background color-white + border 1px solid color-ruler + box-sizing border-box + box-shadow 0 1px 0 0 rgba(#000, .1) inset + border-radius(5px) + font-family font-body + font-size 16px + font-weight bold + smooth-font() + + &:focus + border 1px solid color-primary + outline 0 + + textarea + height 150px + resize none + + .right-content + flex 35 + margin-left 20px + .pic + margin-bottom 65px + img + width 150px + height 150px + .button-success + padding 12px 60px + border-radius(5px) + + .disabled + background-color color-grey-lighter + color color-grey \ No newline at end of file diff --git a/styles/views/partial/next-challenge.styl b/styles/views/partial/next-challenge.styl new file mode 100644 index 000000000..54b591b17 --- /dev/null +++ b/styles/views/partial/next-challenge.styl @@ -0,0 +1,149 @@ +.modal-next-challenge + top 50px + width 480px + margin-left -240px + padding 0 + + h3, p + text-transform none + + h3 + smooth-font() + font-weight bold + margin-bottom 5px + + p + font-size 18px + + .title + text-transform none + display flex + align-items center + font-size 28px + + span + font-weight bold + margin-left 8px + flex 5 + order 1 + text-align left + + a + flex 1 + order 2 + + .cover + min-height 400px + background-size cover + background-position center center + + .detail + padding 20px + + .social-sharing + background-color lighten(color-grey-lighter, 2) + border-top 2px solid color-grey-light + padding 10px + display(flex) + align-items(center) + align-content(center) + justify-content(space-between) + opacity 0.75 + text-transform none + + .image + display inline-block + width 70px + order 1 + padding 0 + margin-right 8px + + img + border-radius(3px) + display block + width 70px + height 70px + + .detail + display(inline-flex) + flex-direction(column) + align-self(flex-start) + order(2) + flex(65) + padding 0 + ellipsis() + text-align left + + .title, .description + display block + ellipsis() + font-size 18px + + .title + font-weight bold + margin 0 + + .buttons + display(inline-flex) + flex-direction(row) + justify-content(space-between) + align-self(center) + flex(35) + order(3) + + a.button + color color-white + padding 10px + border-radius(3px) + + &:last-child + margin-right 0 + + &.button-mail + button-color(color-blue) + padding 11px 8px + + i + position relative + left 0 + right 0 + opacity 1 + font-weight bold + + &.button-facebook + button-color(#31488b) + + &.button-twitter + button-color(#55acee) + + &.button-facebook, &.button-twitter + + img + width 16px + height 16px + + .mail-tab + background-color lighten(color-grey-lighter, 2) + border-top 2px solid color-grey-light + margin 0 + padding 10px 0 20px + + span + font-weight bold + + form + margin-top 10px + + .email + margin-bottom 15px + + input + padding 8px + margin-right 10px + border 2px solid color-grey-lighter + border-radius(3px) + width 240px + font-size 14px + + button + background-color color-blue \ No newline at end of file diff --git a/styles/views/partial/share-creation.styl b/styles/views/partial/share-creation.styl new file mode 100644 index 000000000..eb110bf1a --- /dev/null +++ b/styles/views/partial/share-creation.styl @@ -0,0 +1,100 @@ +.modal-share-creation + top 50px + width 480px + margin-left -240px + padding 0 + + .title + text-transform capitalize + text-align center + font-size 28px + + span + font-weight bold + margin-left 8px + + p + text-transform none + font-size 18px + + .cover + min-height 400px + background-size cover + background-position center center + + .detail + padding 20px + border-top 2px solid color-grey-light + + .buttons + display(inline-flex) + justify-content(space-between) + align-items(center) + margin-bottom 20px + font-weight bold + font-size 18px + + a.button + color color-white + padding 10px + border-radius(3px) + + &:last-child + margin-right 0 + + &.button-mail + button-color(color-blue) + padding 11px 8px + margin-left 10px + + i + position relative + left 0 + right 0 + opacity 1 + font-weight bold + + &.button-facebook + button-color(#31488b) + + &.button-twitter + button-color(#55acee) + + &.button-facebook, &.button-twitter + + img + width 16px + height 16px + + .skip-sharing + margin-bottom 20px + margin-top 20px + + button.button-success + background-color color-grey-light + + &:hover + background-color darken(color-grey-light, 5) + + .mail-tab + margin 15px 0 20px + + span + font-weight bold + + form + margin-top 10px + + .email + margin-bottom 15px + + input + padding 8px + margin-right 10px + border 2px solid color-grey-lighter + border-radius(3px) + width 240px + font-size 14px + + button + background-color color-blue \ No newline at end of file diff --git a/styles/views/splash.styl b/styles/views/splash.styl index 3fd87f684..a619c9dcb 100644 --- a/styles/views/splash.styl +++ b/styles/views/splash.styl @@ -11,6 +11,17 @@ img:last-of-type margin-left 20px + .hour-of-code-logo + illustration-fixed('layout/hour-of-code-logo') + margin 30px auto 20px + + img + vertical-align middle + + img:last-of-type + margin-left 20px + + h3, h4 color color-white @@ -41,4 +52,4 @@ margin 20px 8px .button.secondary - button-color(color-orange) \ No newline at end of file + button-color(color-orange) diff --git a/test/unit/i18n-test.js b/test/unit/i18n-test.js new file mode 100644 index 000000000..5a8466bf6 --- /dev/null +++ b/test/unit/i18n-test.js @@ -0,0 +1,63 @@ +var i18n = require('../../lib/i18n'), + assert = require("chai").assert; + + +describe("i18n", function() { + beforeEach(function() { + // patch window.navigator + global.window = {}; + global.window.navigator = {}; + global.window.location = { href: '' }; + }); + + afterEach(function() { + global.window.navigator = {}; + global.window.location = {}; + }); + + it("should return users language", function() { + global.window.navigator.language = 'en-GB'; + + var lang = i18n.getLanguage(); + assert.equal(lang, 'en'); + }); + + it("should return correct challenge locale path", function() { + global.window.navigator.language = 'en-GB'; + + var challengePath = i18n.getChallengeLocalePath(); + assert.equal(challengePath, ''); + + global.window.navigator.language = 'es'; + + var challengePath = i18n.getChallengeLocalePath(); + assert.equal(challengePath, '/locales/es'); + }); + + it("should return correct html locale path", function() { + global.window.navigator.language = 'en-GB'; + + var challengePath = i18n.getHtmlLocalePath(); + assert.equal(challengePath, '/locales/en'); + + global.window.navigator.language = 'es'; + + var challengePath = i18n.getHtmlLocalePath(); + assert.equal(challengePath, '/locales/es'); + }); + + it("should allow language override from url param", function() { + global.window.navigator.language = 'en-GB'; + global.window.location.href = 'http://example.com?lang=ja'; + + var lang = i18n.getLanguage(); + assert.equal(lang, 'ja'); + }); + + it("should default to en if language is not supported", function() { + global.window.navigator.language = 'fr-FR'; + + var lang = i18n.getLanguage(); + assert.equal(lang, 'en'); + }); +}); diff --git a/test/unit/utils-validator.js b/test/unit/utils-validator.js new file mode 100644 index 000000000..630f536f1 --- /dev/null +++ b/test/unit/utils-validator.js @@ -0,0 +1,300 @@ + +"use strict"; +var getValidator = require('../../lib/challenges/util/validator'), + assert = require("chai").assert; + + +describe("validator", function () { + + + it("should validate empty stuff", function () { + var v = getValidator([]), + r = v.validate(""); + assert.deepEqual(r, { + lastValidStep: null, + steps: [], + complete: true, + firstBrokenLine: null + }); + }); + + + it("should validate a simple string", function () { + var rules = "print a, b", + v = getValidator([{validate: rules}]), + r = v.validate("print a, b"), + r2 = v.validate("print c, d"); + assert.deepEqual(r, + { + lastValidStep: 0, + steps: [ + {valid: true, lines: [0]} + ], + complete: true, + firstBrokenLine: null + }); + //this isn't valid + assert.deepEqual(r2, + { + lastValidStep: null, + firstBrokenLine: 0, + + steps: [ + {valid: false, lines: [0]} + ], + complete: false + }); + }); + + it("should validate an escaped regex", function () { + var rules = "@@b = (x) ->", + v = getValidator([{validate: rules}]), + r = v.validate("b = (x) ->"), + r2 = v.validate("b = (x)) ->"); + assert.deepEqual(r, + { + lastValidStep: 0, + steps: [ + {valid: true, lines: [0]} + ], + complete: true, + firstBrokenLine: null + }); + //this isn't valid + assert.deepEqual(r2, + { + lastValidStep: null, + firstBrokenLine: 0, + + steps: [ + {valid: false, lines: [0]} + ], + complete: false + }); + }); + + it("should validate using a function", function () { + var rules = {type: 'function', fn: "function (line) {return line === 'test';}"}, + v = getValidator([{validate: rules}]), + r = v.validate("test"), + r2 = v.validate("fail"); + + assert.deepEqual(r, + { + lastValidStep: 0, + steps: [ + {valid: true, lines: [0]} + ], + complete: true, + firstBrokenLine: null + }); + //this isn't valid + assert.deepEqual(r2, + { + lastValidStep: null, + firstBrokenLine: 0, + + steps: [ + {valid: false, lines: [0]} + ], + complete: false + }); + + }); + + + it("should validate an array of rules in a single step", function () { + var rules = ["print a, b", "a = c", "b = c"], + v = getValidator([{validate: rules}]), + r = v.validate("print a, b\na = c\nb = c"); + assert.deepEqual(r, + { + lastValidStep: 0, + firstBrokenLine: null, + + steps: [ + {valid: true, lines: [0, 1, 2]} + ], + complete: true + }); + }); + + + it("should validate an array of steps with a single rule each", function () { + var rules = ["print a, b", "a = c", "b = c"], + v = getValidator([ + {validate: rules[0]}, + {validate: rules[1]}, + {validate: rules[2]} + ]), + r = v.validate("print a, b\na = c\nb = c"); + assert.deepEqual(r, + { + lastValidStep: 2, + firstBrokenLine: null, + + steps: [ + {valid: true, lines: [0]}, + {valid: true, lines: [1]}, + {valid: true, lines: [2]} + + ], + complete: true + }); + }); + + + it("should partially validate an array of steps with a single rule", function () { + var rules = ["print a, b", "a = c", "d = c"], + v = getValidator([ + {validate: rules[0]}, + {validate: rules[1]}, + {validate: rules[2]} + ]), + r = v.validate("print a, b\na = c\nb = c"); + assert.deepEqual(r, + { + lastValidStep: 1, + firstBrokenLine: 2, + steps: [ + {valid: true, lines: [0]}, + {valid: true, lines: [1]}, + {valid: false, lines: [2]} + + ], + complete: false + }); + }); + + + it("should partially validate an array of steps with a single rule, with a `hole` ", function () { + var rules = ["print a, b", "a = c", "d = c"], + v = getValidator([ + {validate: rules[0]}, + {validate: rules[1]}, + {validate: rules[2]}, + {validate: rules[2]}, + {validate: rules[2]}, + {validate: rules[2]} + ]), + r = v.validate("print a, b\na = c\nb = c\nd=c\nd=c\np=q"); + assert.deepEqual(r, + { + lastValidStep: 4, + firstBrokenLine: 2, + steps: [ + {valid: true, lines: [0]}, + {valid: true, lines: [1]}, + {valid: false, lines: [2]}, + {valid: true, lines: [3]}, + {valid: true, lines: [4]}, + {valid: false, lines: [5]} + + + ], + complete: false + }); + }); + + it("should partially validate an array of steps with multiple rules, with a `hole` ", function () { + var rules = ["print a, b", "a = c *-20", "d = c"], + v = getValidator([ + {validate: rules[0]}, + {validate: rules[1]}, + {validate: rules[2]}, + {validate: rules}, + {validate: rules[2]}, + {validate: rules[2]}, + {validate: rules[2]} + ]), + r = v.validate("print a, b\na = c -20\nb = c\nprint a, b\na = c -20\nd=c\nd=c\nd=c\np=q"); + assert.deepEqual(r, + { + lastValidStep: 5, + firstBrokenLine: 2, + steps: [ + {valid: true, lines: [0]}, + {valid: true, lines: [1]}, + {valid: false, lines: [2]}, + {valid: true, lines: [3, 4, 5]}, + {valid: true, lines: [6]}, + {valid: true, lines: [7]}, + {valid: false, lines: [8]} + ], + complete: false + }); + }); + + it("should validate an array of steps with multiple rules, with a `hole` ", function () { + var rules = ["print a, b", "a = c", "d = c"], + v = getValidator([ + {validate: rules[0]}, + {validate: rules[1]}, + {validate: rules[2]}, + {validate: rules}, + {validate: rules[2]}, + {validate: rules[2]}, + {validate: rules[2]} + ]), + r = v.validate("print a, b\na = c\nd = c\nprint a, b\na = c\nd=c\nd=c\nd=c\nd=c"); + assert.deepEqual(r, + { + lastValidStep: 6, + firstBrokenLine: null, + steps: [ + {valid: true, lines: [0]}, + {valid: true, lines: [1]}, + {valid: true, lines: [2]}, + {valid: true, lines: [3, 4, 5]}, + {valid: true, lines: [6]}, + {valid: true, lines: [7]}, + {valid: true, lines: [8]} + ], + complete: true + }); + }); + + it("should validate synonyms ", function () { + var rules = ["color blue", "color red", "color rosso"], + v = getValidator([ + {validate: rules[0]}, + {validate: rules[1]}, + {validate: rules[2]} + ], + {'color': ['colour', 'colore']}), + r = v.validate("color blue\ncolour red\ncolore rosso"); + assert.deepEqual(r, + { + lastValidStep: 2, + firstBrokenLine: null, + steps: [ + {valid: true, lines: [0]}, + {valid: true, lines: [1]}, + {valid: true, lines: [2]} + ], + complete: true + }); + }); + describe(" - Internal functions", function () { + var priv = getValidator([]).private; + describe(" - completeRegex ", function () { + it("should replace the first space after the command with a .", function () { + var res = priv.completeRegex("rectangle 500, 50"); + assert.equal(res, "^rectangle +500 *, *50 *$"); + }); + + it("should replace the other spaces with a *", function () { + var res = priv.completeRegex("command 12, 32"); + assert.equal(res, "^command +12 *, *32 *$"); + }); + it("should replace the other spaces with a *", function () { + var res = priv.completeRegex("command 12, ..32"); + + assert.equal(res, "^command +12 *, * *\\.\\. *32 *$"); + }); + }); + + }); + +}); + diff --git a/views/challenge.jade b/views/challenge.jade index 701e737a8..b85d78e13 100644 --- a/views/challenge.jade +++ b/views/challenge.jade @@ -1,12 +1,14 @@ +include ./partial/header + .page-challenge: .page-width .workspace-header(ng-class='(animationClass || "") + (completed ? " success" : "") + (fatherDay ? " father-day" : "")') .inner.center(ng-if='!started') - h3 Challenge {{ id }}: {{ challenges[ id - 1 ].title }} + h3 ${{ challenge.challenge_title }}$ {{ challenges[ id - 1 ].title }} h4 {{ challenges[ id - 1 ].description }} - button.button-success(ng-click='start()') Start + button.button-success(ng-click='start()') ${{ challenge.start }}$ .inner(ng-if='started && !completed') @@ -15,16 +17,26 @@ ng-class='{ active: showSolution, "animate-pulse-highlight": highlightHelp }' ) i.icon-hint - | Hint + | ${{ challenge.hint }}$ progress-circle(value='step', max='content.steps.length') h3 {{ challenges[ id - 1 ].title }} h4.hint(ng-bind-html='hint | markdown', ng-if='hint') .inner.center(ng-if='completed && !fatherDay') - h4 {{ successMessage() }} - a.button.button-success(ng-if='hasNext', ng-href='/challenge/{{id + 1}}') Next › - a.button.button-success(ng-if='!hasNext', ng-click='openFinishedGame()') Done › + .completion + .text + h4(ng-if='offline') ${{ challenge.success_offline }}$ + h4(ng-if='!offline') ${{ challenge.success_online }}$ + a.button.button-success(ng-click='goToNext()') {{ next ? '${{ challenge.next }}$' : '${{ challenge.done }}$' }} › + + .gallery(ng-if='content.gallery') + h4 ${{ challenge.can_you_hack_this_challenge }}$ + .remixes + .image( + ng-repeat='remix in content.gallery.remixes', + ng-style='{"background-image": "url(" + content.gallery.cover_path + remix + ")"}' + ) .inner.center(ng-if='completed && fatherDay') @@ -32,11 +44,10 @@ img(src='/assets/layout/father-day-closed.png') - h4 Make it into a Father's day card! + h4 ${{ challenge.make_it_into_a_fathers_day_card }}$ p. - Now sign-up to Kano World to share your creation and send - a card to your dad! + ${{ challenge.now_sign_up_to_kano_world_to_share_your_creation }}$ a.button.large.button-success(ng-click='login()', href='#') Log In / Sign Up @@ -44,10 +55,10 @@ img(src='/assets/layout/father-day-open.png') - h4 Share your Father's day card! + h4 ${{ challenge.share_your_fathers_day_card }}$ p. - Now you can share the card on Kano World and share it to your dad! + ${{ challenge.now_you_can_share_the_card_on_kano_world }}$ a.button.large.button-success(ng-click='shareFatherDay()', href='#') Share it! @@ -80,17 +91,21 @@ editor.solution( ng-if='showSolution && solution', ng-model='solution', - title='"Solution"' + title='"${{ challenge.solution }}$"' ) {{ solution }} .modal-overlay(ng-if='gameCompleteOpen') - .modal-inner.split-modal.challenge-complete.center + .modal-inner.split-modal.challenge-complete.center(ng-if='selectedWorld.id !== "hourofcode"') //- button.close(ng-click='clocseFinishedGame()'): i.icon-cross - h3 Challenges complete + h3 ${{ challenge.challenges_completed }}$ + + h4(ng-if='!unlockedWorld') ${{ challenge.now_make_something_new }}$ - h4 Now make something new! + h4(ng-if='unlockedWorld') + | ${{ challenge.new_world_unlocked_play_now }}$ + a.button.unlocked(href='/challenges/{{ unlockedWorld.id }}') {{ unlockedWorld.name }} .logo-title @@ -98,8 +113,30 @@ a.button.secondary.large(ng-href='/challenges') i.icon-menu - | Menu + | ${{ challenge.menu }}$ a.button.large(ng-href='/playground') i.icon-game - | Playground + | ${{ challenge.playground }}$ + + + .modal-inner.split-modal.challenge-complete.center(ng-if='selectedWorld.id === "hourofcode"') + + //- button.close(ng-click='clocseFinishedGame()'): i.icon-cross + + h3 ${{ challenge.challenges_completed }}$ + + h4 ${{ challenge.you_did_it_go_back_for_more_coding_fun }}$ + + .hour-of-code-logo + + .center.bottom-section + + a.button.large(href='http://code.org/learn') + i.icon-game + | ${{ challenge.hour_of_code }}$ + +include partial/next-modal +include partial/share-modal +include partial/mail-preview +include partial/dialogs diff --git a/views/challenges.jade b/views/challenges.jade index 358ff8645..52e1994e0 100644 --- a/views/challenges.jade +++ b/views/challenges.jade @@ -1,74 +1,109 @@ -.page-challenges: .page-width - - h3.page-title - i.icon-menu - | Challenges - - ul.challenges-list +include ./partial/header + +.page-challenges(ng-class="[ selectedWorldClass ]") + include ./partial/hero-header + + .page-width + .image.pull-left + .image.pull-right + + social-sharing(type='"world"' ng-if='selectedWorld.socialText && loggedIn && !offline') + + h3.page-title(ng-if='selectedWorld') + span {{ selectedWorld ? selectedWorld.name : '${{ challenges.challenges }}$'}} + .quests + a(ng-if="isWorldInIndex(selectedWorld)" href='/challenges') + i.icon-arrow-left + | ${{ challenges.challenges }}$ + + .header + .updates-form(ng-if='selectedWorld.updateForm && !loggedIn') + h4 ${{ challenges.get_kano_updates }}$ + form(name='updateForm', ng-submit='submit()') + input(placeholder='Enter your email address', ng-model='formData.email', type='email', required) + button(type='submit', ng-disabled='updateForm.$invalid', ng-class='{ "disabled" : updateForm.$invalid }') ${{ challenges.sign_up }}$ + + .error(ng-if='error') {{ error }} + .success(ng-if='success') {{ success }} + + ul.worlds-list(ng-if='!selectedWorld' ) + li.world-item(ng-repeat='world in worlds' ng-if='isWorldInIndex(world)') + a.world-cover( + ng-href='{{!isWorldLocked(world) ? "/challenges/" + world.id : ""}}' + ng-class='{locked: isWorldLocked(world), completed: isWorldCompleted(world), current: isWorldCurrent(world)}' + ng-style='{ "background-image": "url(/assets/challenges/images/" + world.cover + ".png)" }' + ) - li(ng-repeat='challenge in challenges') - a( - ng-click='selectChallenge(challenge)', - ng-class='{ locked: isLocked($index), completed: isCompleted($index), current: isCurrent($index) }' - ) + h4 {{ world.name }} - .cover(ng-style='{ "background-image": "url(/assets/challenges/" + challenge.id + ".png)" }') + ul.challenges-list(ng-if='selectedWorld') - .detail - h5 {{ challenge.title }} + li(ng-repeat='challenge in challenges') + a( + ng-click='selectChallenge(challenge)', + ng-class='{ locked: isLocked(challenge), completed: isCompleted(challenge), current: isCurrent(challenge) }' + ) - li + .cover(ng-style='{ "background-image": "url(/assets/challenges/images/" + challenge.cover + ")" }') - a.highlight(href='/playground', ng-class='{ locked: isLocked(challenges.length) }') + .detail + h5 {{ challenge.short_title || challenge.title }} - .cover(ng-style='{"background-image": "url(/assets/challenges/playground.png)"}') + li(ng-if='selectedWorld.type !== "campaign"') - .detail - h5 Playground + a.highlight(href='/playground', ng-class='{ locked: false}') - div(ng-if='shares') + .cover(ng-style='{"background-image": "url(/assets/challenges/images/playground.png)"}') - h3.page-title - i.icon-share - | Latest Shares + .detail + h5 ${{ challenges.playground }}$ - ul.shares-list + li(ng-if='selectedWorld.certificate_after') - li(ng-repeat='share in shares') - a(href='/share/{{ share.id }}') + a.highlight( + ng-href="{{getCertificateUrl()}}", + target="{{isCertAchieved(selectedWorld) ? '_blank' : '_self'}}", + ng-class='{ locked: !isCertAchieved(selectedWorld)}', + ng-click='checkCertOnPi($event)' + ) - .cover(ng-style='{ "background-image": "url(" + share.cover_url + ")" }') + .cover(ng-style='{"background-image": "url(/assets/challenges/images/cert-icon.png)"}') .detail - h5 - | {{ share.title }} - em by {{ share.user.username }} - - li - a.highlight.browse( - href='http://world.kano.me/shares/make-art', - ng-click='browseMore($event)', - target='_blank' - ) + h5 ${{ challenges.certificate }}$ - .cover(ng-style='{"background-image": "url(/assets/challenges/browse.png)"}') + div(ng-if='shares && selectedWorld.type !== "campaign"') - .detail - h5 Browse more + h3.page-title + i.icon-share + | ${{ challenges.latest_shares }}$ -.modal-overlay(ng-if='selectedChallenge') - .modal-inner.modal-challenge-info.center + ul.shares-list - .cover(ng-style='{ "background-image": "url(/assets/challenges/" + selectedChallenge.id + ".png)" }') + li(ng-repeat='share in shares') + a(href='{{cfg.WORLD_URL}}/shared/{{ share.slug }}') - button.close(ng-click='deselectedChallenge()'): i.icon-cross + .cover(ng-style='{ "background-image": "url(" + share.cover_url + ")" }') - .detail + .detail + h5 + | {{ share.title }} + em ${{ challenges.by }}$ {{ share.user.username }} - h3 {{ selectedChallenge.title }} + li + a.highlight.browse( + href='{{cfg.WORLD_URL}}/shares/make-art', + ng-click='browseMore($event)', + target='_blank' + ) - p.description {{ selectedChallenge.description }} + .cover(ng-style='{"background-image": "url(/assets/challenges/images/browse.png)"}') - a.button.button-success(ng-href='/challenge/{{ selectedChallenge.index + 1 }}') Start + .detail + h5 ${{ challenges.browse_more }}$ -include ./partial/promo-popup \ No newline at end of file +include ./partial/selected-challenge +include ./partial/certificate-modal +include ./partial/promo-popup +include ./partial/dialogs +include ./partial/splash diff --git a/views/directive/auth.jade b/views/directive/auth.jade new file mode 100644 index 000000000..2e03966e7 --- /dev/null +++ b/views/directive/auth.jade @@ -0,0 +1,5 @@ +.close-button(ng-click='close()') × +.auth-form(ng-cloak) + h3 {{mode === 'login' ? '${{ directive.login_to_your_account }}$' : '${{ directive.create_your_account }}$'}} + kano-login-form#kano-login-form(ng-show="mode === 'login'") + kano-signup-form#kano-login-form(ng-show="mode === 'signup'") diff --git a/views/directive/display.jade b/views/directive/display.jade index ddbcf826b..afa2ae8cc 100644 --- a/views/directive/display.jade +++ b/views/directive/display.jade @@ -12,39 +12,38 @@ .error-display(ng-if='error', ng-class='"error-" + error.type') h3 - | {{ error.type | upperfirst }} Error - span(ng-if='error.row !== null') on line {{ error.row + 1 || 0 }} + | ${{ directive.error }}$ + span(ng-if='error.row !== null') ${{ directive.error_line }}$ - p {{ error.text || 0 }} - - .toolbar - .position-indicator - i(ng-class="{'icon-mouse-pointer': mouse, 'icon-plus': !mouse}") - | x: {{ coordsPosition.x }} y: {{ coordsPosition.y }} + p ${{ directive.error_text }}$ .actions + + .position-indicator + i(ng-class="{'icon-mouse-pointer': mouse, 'icon-plus': !mouse}") + | x: {{ coordsPosition.x }} y: {{ coordsPosition.y }} a.action.action-share(ng-if='mode === "playground" || sharing', ng-click='setOpenModal("share")') i.icon-share - | Share + | ${{ directive.share }}$ a.action.action-save(ng-if='mode === "playground"', ng-click='save()') i.icon-save - | Save + | ${{ directive.save }}$ a.action.action-reset(ng-if='mode === "challenge"', ng-click='resetCode()') i.icon-reset - | Reset + | ${{ directive.reset }}$ .action.action-load(ng-show='mode === "playground"') i.icon-arrow-up - | Load + | ${{ directive.load }}$ input.file-load(type='file', accept='.draw') export-modal(display='this', action='"save"') export-modal(display='this', action='"share"') //- span(ng-controller='LoadDialogController' ng-if='offline') - a.button(ng-click='openDialog()') Load + a.button(ng-click='openDialog()') ${{ directive.load }}$ include partial/load diff --git a/views/directive/editor.jade b/views/directive/editor.jade index aba8a5a0d..816edd332 100644 --- a/views/directive/editor.jade +++ b/views/directive/editor.jade @@ -7,6 +7,9 @@ ul.editor-tabs(ng-if='tabbed') li(ng-class='{ active: tab === "code" }', ng-click='switchTab("code")') i.icon-code + li(ng-class='{ active: tab === "guide" }', ng-click='switchTab("guide")', ng-if='guide') + i.icon-guide + li.divide li( @@ -21,9 +24,9 @@ ul.editor-tabs(ng-if='tabbed') h4 {{ category.label }} p.hint - | Click + | ${{ directive.click_plus_to_add_a_shape_1 }}$ span.add-button - | to add a shape to your code + | ${{ directive.click_plus_to_add_a_shape_2 }}$ .command(ng-repeat='command in category.commands') @@ -47,22 +50,38 @@ ul.editor-tabs(ng-if='tabbed') div(ng-show='tab === "code"') - .controls(ng-if='controls') - - a.button.button-editor.button-icon( - href='#', - ng-click='toggleAutocomplete()', - title='Toggle autocomplete', - ng-class='{ active: autocomplete }' - ) - i.icon-autocomplete - - a.button.button-editor.button-icon( - href='#', - ng-click='toggleFullScreen()', - title='Toggle fullscreen', - ng-class='{ active: fullScreen }' - ) - i.icon-full-screen - - .editor-wrap(ng-class='{ "has-title": !!title }'): .editor-area(editor, ng-class='{ disabled: !editable }') \ No newline at end of file + .editor-wrap(ng-class='{ "has-title": !!title }') + + .editor-area(editor, ng-class='{ disabled: !editable }') + + .controls(ng-if='controls' ng-class='{ full: fullScreen }') + + a( + href='#', + ng-click='toggleAutocomplete()', + title='${{ directive.toggle_autocomplete }}$', + ng-class='{ active: autocomplete }' + ) + .autocomplete + .round + span ${{ directive.autocomplete }}$ + + a( + href='#', + ng-click='toggleFullScreen()', + title='${{ directive.toggle_fullscreen }}$', + ng-class='{ active: fullScreen }', + ng-hide='challengeId' + ) + .full-screen-control + .round + span ${{ directive.fullscreen }}$ + +.editor-guide(ng-show='tab === "guide"'): .inner + .teachers-guide(ng-if='teachers_guide') + a.guide(ng-href='{{ "/assets" + teachers_guide }}', target='_blank') + i.icon-zip + span ${{ directive.download_teachers_guide }}$ + + h4(ng-if='guide') ${{ directive.guide }}$ + .guide(ng-bind-html="guide | markdown", ng-if='guide') diff --git a/views/directive/export-modal.jade b/views/directive/export-modal.jade index 957fd8249..3f22fd1b8 100644 --- a/views/directive/export-modal.jade +++ b/views/directive/export-modal.jade @@ -1,7 +1,7 @@ .modal-overlay(ng-if='open'): .modal-inner.export-menu - button.close(ng-click='close()' ng-if='!category') × - h2.center(ng-if='!category') {{ action }} drawing + button.close(ng-click='close()') × + h2.center {{ action === 'share' ? '${{ directive.save_to_gallery }}$' : '${{ directive.save_drawing }}$' }} .row @@ -12,24 +12,17 @@ img.created-image(ng-src='{{ imageURL }}') .col-6 - input.filename(ng-model='meta.title', placeholder='Title', type='text', required) - textarea.description(ng-model='meta.description', placeholder='Description') - //- a.facebook-share(ng-if='category' href='#') - //- i.icon-facebook - //- | Share on Facebook - //- a.email-share(ng-if='category' href='#') - //- i.icon-email - //- | Send as email + input.filename(ng-model='meta.title', placeholder='${{ directive.title }}$', type='text', required) + textarea.description(ng-model='meta.description', placeholder='${{ directive.description }}$') - .buttons - - if offline - button.export-wallpaper(ng-click='exportWallpaper()', ng-disabled='exportForm.$invalid', ng-class='{ "disabled" : exportForm.$invalid }') Save Wallpaper - - button.button-success(type='submit', ng-disabled='exportForm.$invalid', ng-class='{ "disabled" : exportForm.$invalid }' ng-if='!category') + .buttons.center + button.button-success(type='submit', ng-disabled='exportForm.$invalid', ng-class='{ "disabled" : exportForm.$invalid }', ng-if='!loading') i(ng-class='"icon-" + action') - | {{ action }} + | ${{ directive.save }}$ + + button.button-success.skip(ng-if='optional && !loading', ng-click='skipSharing()') ${{ directive.skip }}$ + + .spinner(ng-if='loading') - button.button-success(type='submit', ng-disabled='exportForm.$invalid', ng-class='{ "disabled" : exportForm.$invalid }' ng-if='category') - span Finish & Share - span.xp +5xp + if offline + .center: button.export-wallpaper(style='margin-top: 10px', ng-click='exportWallpaper()', ng-disabled='exportForm.$invalid', ng-class='{ "disabled" : exportForm.$invalid }') ${{ directive.save_wallpaper }}$ diff --git a/views/directive/social.jade b/views/directive/social.jade new file mode 100644 index 000000000..c35be3835 --- /dev/null +++ b/views/directive/social.jade @@ -0,0 +1,30 @@ +.social-sharing + .buttons + a.button.button-facebook(ng-click='facebookShare()') + img(src='/assets/button-icons/facebook-white.png' title='${{ partial.share_on_facebook }}$') + + a.button.button-twitter(ng-click='twitterShare()') + img(src='/assets/button-icons/twitter-white.png' title='${{ partial.share_on_twitter }}$') + + a.button.button-mail(ng-click='open()') + i.icon-mail + +.modal-overlay(ng-if='mailModal') + + .modal-inner.modal-mail-sender.center + button.close(ng-click='close()'): i.icon-cross + + h4 Tell your friends! + + form(ng-submit='sendMail()' name='form') + .box.box-danger(ng-if='error') {{ error }} + + .email + input(ng-model='mailForm.email', placeholder='${{ directive.recipients_email_address }}$', type='email', required) + + .message + textarea(ng-model='mailForm.description', placeholder='${{ directive.your_message }}$', required) + + button.button-success(type='submit', ng-disabled='form.$invalid', ng-class='{ "disabled" : form.$invalid }', ng-if='!loading') ${{ partial.send }}$ + + .spinner(ng-if='loading') diff --git a/views/index.jade b/views/index.jade index f293e07c4..2480948d1 100644 --- a/views/index.jade +++ b/views/index.jade @@ -5,14 +5,30 @@ html(lang='en', xmlns:ng="http://angularjs.org") meta(charset='UTF-8') link(rel="shortcut icon", href="/favicon.ico", type="image/x-icon") + //- SEO + meta(name="google-site-verification" content="OCQroE3v9jKgCFFNBnVeejsgn4Qb5IvNbr_oUyoU-Tw") + //- Mobile options meta(name='apple-mobile-web-app-capable', content='yes') meta(name='apple-mobile-web-app-status-bar-style', content='orange') meta(name='viewport', content='initial-scale=1, maximum-scale=1, user-scalable=no') - + + //- Components + link(rel='import' href='/components/web-components/kano-nav/kano-nav.html') + link(rel='import' href='/components/web-components/kano-primary-links/kano-primary-links.html') + link(rel='import' href='/components/web-components/kano-secondary-links/kano-secondary-links.html') + //- Styles link(href='/css/main.css', rel='stylesheet', type='text/css') + script(type="text/javascript"). + window.dataLayer = []; + window.dataLayer.push({ + originalLocation: document.location.protocol + '//' + + document.location.hostname + + document.location.pathname + + document.location.search + }); (function() { window.XMLHttpRequest = window.XMLHttpRequest || (function() { return new window.ActiveXObject("Microsoft.XMLHTTP"); @@ -20,25 +36,21 @@ html(lang='en', xmlns:ng="http://angularjs.org") })(); title Draw + script(src='/js/vendor/xtag.js') + body(id="ng-app", ng-app='draw', class=offline ? 'offline' : 'online') + + script(src='/js/vendor/console-polyfill.js', type='text/javascript') .loading-overlay(ng-cloak): .spinner - include partial/header ng-view - include partial/splash - - if !offline - a.kano-logo(href='http://www.kano.me', target='_blank') //- Vendor script(src='/js/vendor/angular.min.js', type='text/javascript') script(src='/js/vendor/angular-route.min.js', type='text/javascript') script(src='/js/vendor/ace/ace.js', type='text/javascript') script(src='/js/vendor/ace/ext-language_tools.js', type='text/javascript') - //- Analytics - if segmentioId - script(src='/js/vendor/segmentio.min.js', type='text/javascript') script(type='text/javascript'). window.ENV = '#{env}'; @@ -48,16 +60,28 @@ html(lang='en', xmlns:ng="http://angularjs.org") OFFLINE : #{offline}, SEGMENTIO_ID : '#{segmentioId}', FACEBOOK_APP_ID : '#{facebookAppId}', - MAILSERVER : '#{mailServer}', API_URL : '#{api_url}', WORLD_URL : '#{world_url}', + CHALLENGES_URL : '#{challenges_url}', TEST_MODE : #{testmode}, - ENV : '#{env}' + ENV : '#{env}', + UNKNOWN_USER : '#{unknown_user}' }; //- App script(src='/js/index.js', type='text/javascript') //- Livereload - if !production + if !production && !staging script(src='http://localhost:35729/livereload.js?snipver=1', type='text/javascript') + + //- Google Tag Manager + noscript + iframe(src='//www.googletagmanager.com/ns.html?id=GTM-WMGKFR', height='0', width='0', style='display: none; visibility: hidden;') + script(type='text/javascript'). + (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': + new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], + j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= + '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); + })(window,document,'script','dataLayer','GTM-WMGKFR'); + //- End Google Tag Manager diff --git a/views/partial/auth-modal.jade b/views/partial/auth-modal.jade new file mode 100644 index 000000000..72b8ece2d --- /dev/null +++ b/views/partial/auth-modal.jade @@ -0,0 +1,5 @@ +.modal-overlay(ng-show='auth.showModal', ng-cloak) + .auth-modal + .auth-modal-inner + auth-form(mode='auth.mode') + diff --git a/views/partial/banner.jade b/views/partial/banner.jade new file mode 100644 index 000000000..48a5b70da --- /dev/null +++ b/views/partial/banner.jade @@ -0,0 +1,17 @@ +.banner(ng-if='selectedWorld.id !== "pixelhack"') + a(href="/challenges/pixelhack") + span ${{ partial.pixel_hack }}$ + | ${{ partial.code_your_way_through_the_history }}$ + + .modal-overlay(ng-if='banner.showModal') + .modal-inner.modal-challenge-info.center(ng-style="{'display': banner.showModal ? 'block' : 'none'}") + + .cover + + button.close(ng-click='banner.closeModal()'): i.icon-cross + + .detail + h3 ${{ partial.welcome_to_pixel_hack }}$ + + p ${{ partial.start_your_coding_adventure }}$ + p ${{ partial.happy_hacking }}$ diff --git a/views/partial/certificate-modal.jade b/views/partial/certificate-modal.jade new file mode 100644 index 000000000..e17ddcc3f --- /dev/null +++ b/views/partial/certificate-modal.jade @@ -0,0 +1,13 @@ +.certificate.modal-overlay(ng-if='certModal') + .modal-inner.modal-challenge-info.center + + .cover + + button.close(ng-click='toggleCertModal()'): i.icon-cross + + .detail + h3 ${{ partial.claim_your_pixel_hack_certificate }}$ + + p ${{ partial.visit_this_address_from_a_computer }}$ + + h3 http://certificate.kano.me/pixelhack/ diff --git a/views/partial/dialogs.jade b/views/partial/dialogs.jade new file mode 100644 index 000000000..c9ea996d2 --- /dev/null +++ b/views/partial/dialogs.jade @@ -0,0 +1,8 @@ + +if !offline + .kano-feedback-container(ng-click='feedback.openModal()', ng-init='feedbackLoaded()') + span ${{ partial.feedback }}$ + .kano-feedback + include ./feedback + include ./auth-modal + diff --git a/views/partial/feedback.jade b/views/partial/feedback.jade new file mode 100644 index 000000000..7459183a1 --- /dev/null +++ b/views/partial/feedback.jade @@ -0,0 +1,30 @@ +.modal-overlay(ng-controller='FeedbackController', ng-if='feedback.showModal', ng-cloak) + .modal-inner.split-modal.splash.feedback-splash + button.close(ng-click='closeModal()'): i.icon-cross + form(name='form' ng-submit='sendFeedback()') + h1.center: b ${{ partial.feedback }}$ + + .box.box-danger(ng-if='error') {{ error }} + + .form-container + .mood-selector + input(type='radio', ng-model='feedback.rating', value='rating-1', id='rating_1') + .mood-container: label(class='mood rating-1', for='rating_1') + input(type='radio', ng-model='feedback.rating', value='rating-2', id='rating_2') + .mood-container: label(class='mood rating-2', for='rating_2') + input(type='radio', ng-model='feedback.rating', value='rating-3', id='rating_3') + .mood-container: label(class='mood rating-3', for='rating_3') + input(type='radio', ng-model='feedback.rating', value='rating-4', id='rating_4') + .mood-container: label(class='mood rating-4', for='rating_4') + input(type='radio', ng-model='feedback.rating', value='rating-5', id='rating_5') + .mood-container: label(class='mood rating-5', for='rating_5') + + .feedback-box + textarea(ng-model='feedback.thought', rows="3", placeholder='${{ partial.whats_up }}$', required) + + .form-message.hide + h3 ${{ partial.thank_you }}$ + + .center.bottom-section: div(style='min-height: 88px'): .feedback-buttons + button.button.large(type='submit', ng-disabled='form.$invalid', ng-class='{ "disabled" : form.$invalid }', ng-if='!loading') ${{ partial.send }}$ + .spinner(ng-if='loading') diff --git a/views/partial/header.jade b/views/partial/header.jade index 6426616de..17080c032 100644 --- a/views/partial/header.jade +++ b/views/partial/header.jade @@ -1,30 +1,43 @@ -header: .page-width +include kano-nav + +header: .main-navigation.page-width(ng-if='offline || !selectedWorld || !selectedWorld.display_menu') a.logo(href='/') + //- if !offline + //- a.kano-logo(href='http://www.kano.me', target='_blank') ul.nav.nav-left li: a(href='/challenges', ng-class='{ active: basePath === "challenge" || basePath === "challenges" }') i.icon-menu - | Challenges + | ${{ challenges.challenges }}$ li: a(href='/playground', ng-class='{ active: basePath === "playground" }') i.icon-game - | Playground + | ${{ challenges.playground }}$ ul.nav.nav-right(ng-cloak) + li.discover: a(ng-if="!offline" id='discover-kano', href='http://world.kano.me/start', target='_blank') + i.icon-cpu + | ${{ partial.discover_kano }}$ - li(ng-if='!offline && !loggedIn'): a(href='#', ng-click='login()') + li(ng-if='!offline && !loggedIn'): a(href='', ng-click='auth.openModal("login")') i.icon-login - | Login + | ${{ partial.login }}$ + + li(ng-if='!offline && !loggedIn'): a.signup(href='', ng-click='auth.openModal("signup")') + | ${{ partial.signup }}$ li(ng-if='!offline && loggedIn') a.user-display(ng-href='http://world.kano.me/users/{{ user.username }}', target='_blank') - .avatar: img(ng-src='http://avatar.kano.me/username/{{ user.username }}.png') + .avatar: img(ng-src='{{ user.avatar.urls.circle || cfg.DEFAULT_AVATAR }}') | {{ user.username }} - li(ng-if='!offline && loggedIn'): a(href='#', ng-click='logout()') + li(ng-if='!offline && loggedIn'): a(href='', ng-click='logout()') i.icon-logout - | Logout + | ${{ partial.logout }}$ li: button.close(ng-click='shutdown()', ng-if='offline'): i.icon-cross + +// Uncomment to enable banner +// include banner diff --git a/views/partial/hero-header.jade b/views/partial/hero-header.jade new file mode 100644 index 000000000..01ba8c6d8 --- /dev/null +++ b/views/partial/hero-header.jade @@ -0,0 +1,8 @@ +.hero-header(ng-if='selectedWorld.hero_header && !offline') + .hero-image + .hero-links + a.hero-link(ng-repeat='link in selectedWorld.hero_header.links' ng-href='{{link.location}}' target='_blank' title='{{link.text}}') + .hero-link-thumbnail + img.hero-link-image(ng-src='/assets/{{link.image}}') + .hero-link-text + | {{link.text}} diff --git a/views/partial/kano-nav.jade b/views/partial/kano-nav.jade new file mode 100644 index 000000000..f14fcbc87 --- /dev/null +++ b/views/partial/kano-nav.jade @@ -0,0 +1,32 @@ +.kano-navigation(ng-show='!offline && selectedWorld && selectedWorld.display_menu') + kano-nav(assets-path='/assets/kano-nav/' site-root='{{cfg.WORLD_URL}}') + kano-primary-links(current-site='{{window.location.origin}}' slot='primary') + ul.nav.nav-secondary(slot='secondary') + + li: a(href='/challenges', ng-class='{ active: basePath === "challenge" || basePath === "challenges" }') + i.icon-menu + | ${{ challenges.challenges }}$ + + li: a(href='/playground', ng-class='{ active: basePath === "playground" }') + i.icon-game + | ${{ challenges.playground }}$ + + ul.nav.nav-right(ng-cloak slot='right') + li(ng-if='!offline && !loggedIn'): a(href='', ng-click='auth.openModal("login")') + i.icon-login + | ${{ partial.login }}$ + + li(ng-if='!offline && !loggedIn'): a.signup(href='', ng-click='auth.openModal("signup")') + | ${{ partial.signup }}$ + + li(ng-if='!offline && loggedIn') + a.user-display(ng-href='http://world.kano.me/users/{{ user.username }}', target='_blank') + .avatar: img(ng-src='{{ user.avatar.urls.circle || cfg.DEFAULT_AVATAR }}') + .username + | {{ user.username }} + + li(ng-if='!offline && loggedIn'): a(href='', ng-click='logout()') + i.icon-logout + | ${{ partial.logout }}$ + + li: button.close(ng-click='shutdown()', ng-if='offline'): i.icon-cross diff --git a/views/partial/load.jade b/views/partial/load.jade index fda7ccff3..be9fadda4 100644 --- a/views/partial/load.jade +++ b/views/partial/load.jade @@ -1,11 +1,11 @@ .modal-overlay(ng-show='isOpen'): .modal-inner.split-modal.load-menu button.close(ng-click='isOpen = false') × - h2.center Load - h4.center Load from where + h2.center ${{ partial.load }}$ + h4.center ${{ partial.load_from_where }}$ .bottom-section.center span - button.button.large() Your Kano + button.button.large() ${{ partial.your_kano }}$ input.transparent(type='file' accept='.draw' onChange='angular.element(this).scope().load(this)') - button.button.large(ng-click='load.web()') Internet + button.button.large(ng-click='load.web()') ${{ partial.internet }}$ diff --git a/views/partial/mail-preview.jade b/views/partial/mail-preview.jade index f157e70eb..006d11664 100644 --- a/views/partial/mail-preview.jade +++ b/views/partial/mail-preview.jade @@ -2,16 +2,16 @@ .modal-inner.modal-mail-preview.center button.close(ng-click='closePreview()'): i.icon-cross .preview - .header Share by email + .header ${{ partial.share_by_email }}$ h4 "{{ selectedSummerChallengeObj.shareTitle }}" .content .left-content - input(type='email' ng-model='selectedSummerChallengeObj.email' placeholder='Enter an email address') - textarea(ng-model='selectedSummerChallengeObj.message' placeholder="I just made this with code! Want to try your own? It's easy, fun and for everyone") - input(type='text' ng-model='selectedSummerChallengeObj.name' placeholder='Your name...') + input(type='email' ng-model='selectedSummerChallengeObj.email' placeholder='${{ partial.enter_an_email_address }}$') + textarea(ng-model='selectedSummerChallengeObj.message' placeholder="${{ partial.i_just_made_this_with_code }}$") + input(type='text' ng-model='selectedSummerChallengeObj.name' placeholder='${{ partial.your_name }}$') .right-content .pic img(ng-src='{{selectedSummerChallengeObj.img}}' ng-if='!selectedSummerChallengeObj.cover_url') img(ng-src='{{selectedSummerChallengeObj.cover_url}}' ng-if='selectedSummerChallengeObj.cover_url') - a.button.button-success(ng-click='sendMail(selectedSummerChallengeObj)') Send \ No newline at end of file + a.button.button-success(ng-click='sendMail(selectedSummerChallengeObj)') ${{ partial.send }}$ diff --git a/views/partial/next-modal.jade b/views/partial/next-modal.jade new file mode 100644 index 000000000..0e8c5e507 --- /dev/null +++ b/views/partial/next-modal.jade @@ -0,0 +1,52 @@ +.modal-overlay(ng-if='nextModal') + .modal-inner.modal-next-challenge.center + + .cover(ng-style='{ "background-image": "url(/assets/challenges/images/" + next.cover +")" }') + + button.close(ng-click='closeNextModal()'): i.icon-cross + + .detail + + .title + | ${{ partial.next_up }}$ + span {{ next.title }} + + a.button.button-success(ng-href='/challenges/{{selectedWorld.id}}' ng-if='next.locked') {{ selectedWorld ? ${{ partial.back_to_world }}$ : '${{ challenge.menu }}$' }} + + a.button.button-success(ng-href='/challenge/{{selectedWorld.id}}/{{next.id}}' ng-if='!next.locked') ${{ challenge.start }}$ + + p.description {{ next.description }} + + p.description.small(ng-if='next.locked') ${{ partial.come_back_tomorrow_to_continue }}$ + + + .social-sharing(ng-if='creation && !mailTab') + .image + img(ng-src='{{ creation.cover_url }}') + + .detail + span.title {{ creation.title }} + .description {{ creation.description }} + + .buttons + a.button.button-mail(ng-click='openMailTab()') + i.icon-mail + + a.button.button-facebook(ng-click='facebookShare(creation)') + img(src='/assets/button-icons/facebook-white.png' title='${{ partial.share_on_facebook }}$') + + a.button.button-twitter(target='_new', ng-href='{{ buildURL(creation) }}') + img(src='/assets/button-icons/twitter-white.png' title='${{ partial.share_on_twitter }}$') + + .mail-tab.center(ng-if='mailTab') + span ${{ partial.share_by_email }}$ + + form(ng-submit='sendMail(creation)' name='mailForm') + .box.box-danger(ng-if='error') {{ error }} + + .email + input(ng-model='creation.email', placeholder='Email address', type='email', required) + + button.button-success(type='submit', ng-disabled='mailForm.$invalid', ng-class='{ "disabled" : mailForm.$invalid }', ng-if='!loading') ${{ partial.send }}$ + + .spinner(ng-if='loading') diff --git a/views/partial/selected-challenge.jade b/views/partial/selected-challenge.jade new file mode 100644 index 000000000..f60f0f2e1 --- /dev/null +++ b/views/partial/selected-challenge.jade @@ -0,0 +1,14 @@ +.modal-overlay(ng-if='selectedChallenge') + .modal-inner.modal-challenge-info.center + + .cover(ng-style='{ "background-image": "url(/assets/challenges/images/" + selectedChallenge.cover +")" }') + + button.close(ng-click='deselectedChallenge()'): i.icon-cross + + .detail + + h3 {{ selectedChallenge.title }} + + p.description {{ selectedChallenge.description }} + + a.button.button-success(ng-href='/challenge/{{selectedWorld.id}}/{{selectedChallenge.id}}') ${{ challenge.start }}$ diff --git a/views/partial/share-modal.jade b/views/partial/share-modal.jade new file mode 100644 index 000000000..a184dd04d --- /dev/null +++ b/views/partial/share-modal.jade @@ -0,0 +1,40 @@ +.modal-overlay(ng-if='shareModal && creation') + .modal-inner.modal-share-creation.center + + .cover(ng-style='{ "background-image": "url(" + creation.cover_url + ")" }') + + //- button.close(ng-click='closeShareModal()'): i.icon-cross + + .detail(ng-if='!mailTab') + + .title + span {{ creation.title }} + + p.description {{ creation.description }} + + .buttons(ng-if='!mailTab') + | ${{ partial.share_with_friends }}$ + a.button.button-mail(ng-click='openMailTab()') + i.icon-mail + + a.button.button-facebook(ng-click='facebookShare(creation)') + img(src='/assets/button-icons/facebook-white.png' title='${{ partial.share_on_facebook }}$') + + a.button.button-twitter(ng-click='twitterShare(creation)') + img(src='/assets/button-icons/twitter-white.png' title='${{ partial.share_on_twitter }}$') + + .skip-sharing(ng-if='selectedWorld.share_strategy === "optional"') + button.button-success(ng-click='skipSocialSharing()') ${{ partial.skip_sharing }}$ + + .mail-tab.center(ng-if='mailTab') + span ${{ partial.share_by_email }}$ + + form(ng-submit='sendMail(creation)' name='mailForm') + .box.box-danger(ng-if='error') {{ error }} + + .email + input(ng-model='creation.email', placeholder='${{ partial.email_address }}$', type='email', required) + + button.button-success(type='submit', ng-disabled='mailForm.$invalid', ng-class='{ "disabled" : mailForm.$invalid }', ng-if='!loading') ${{ partial.send }}$ + + .spinner(ng-if='loading') diff --git a/views/partial/splash.jade b/views/partial/splash.jade index 4ba8920ee..245aaf0f0 100644 --- a/views/partial/splash.jade +++ b/views/partial/splash.jade @@ -1,12 +1,12 @@ -.modal-overlay(ng-controller='SplashController', ng-show='isSplashOpen') +.modal-overlay(ng-controller='SplashController', ng-show='splash.display && !splash.hasDisplayed') .modal-inner.split-modal.splash //- Logo .logo-title - h4.center Draw with code + h4.center ${{ partial.draw_with_code }}$ //- Start button .center.bottom-section - button.button.large(ng-click='isSplashOpen = false') Start \ No newline at end of file + button.button.large(ng-click='splash.close()') ${{ partial.start }}$ diff --git a/views/playground.jade b/views/playground.jade index 1a680db2f..ae953f00d 100644 --- a/views/playground.jade +++ b/views/playground.jade @@ -1,8 +1,6 @@ -.page-width: .workspace - h3.page-title - i.icon-game - | Playground +include ./partial/header +.page-width: .workspace .workspace-body: .row .col-6 @@ -22,4 +20,4 @@ source='playground.code', workspace, mode='"playground"' - ) \ No newline at end of file + ) diff --git a/views/share.jade b/views/share.jade index a165e5cb5..006cca6c9 100644 --- a/views/share.jade +++ b/views/share.jade @@ -1,5 +1,7 @@ +include ./partial/header + section: .page-width .box.center(ng-if='!error') Loading share… .box.box-danger.center(ng-if='error') strong Error: - | {{ error }} \ No newline at end of file + | {{ error }} diff --git a/views/summer-camp-calendar.jade b/views/summer-camp-calendar.jade deleted file mode 100644 index 60d13dc80..000000000 --- a/views/summer-camp-calendar.jade +++ /dev/null @@ -1,77 +0,0 @@ -.kit-banner - a(href="http://www.kano.me/kit", target='_blank') - img(src="/assets/summercamp/logo.png") - span Want to play more? Do it with the computer you can make yourself! - -.summer-camp.top: .page-width - .challenge-info(ng-if='selectedSummerChallenge !== null') - .pic - img(src='{{selectedSummerChallengeObj.img}}' ng-if='!selectedSummerChallengeObj.cover_url') - img(ng-src='{{selectedSummerChallengeObj.cover_url}}' ng-if='selectedSummerChallengeObj.cover_url') - .detail - - h4 August {{selectedSummerChallengeDay| ordinal}} - h3 {{ selectedSummerChallengeObj.title }} - span(ng-class='{ done : isCompleted(selectedSummerChallengeDay - 10)}') {{ isCompleted(selectedSummerChallengeDay - 10) ? ' - Completed' : '' }} - - div.description(ng-bind-html='selectedSummerChallengeObj.description | markdown ') - .diff-container(ng-if='isCompleted(selectedSummerChallengeDay - 10)') - span.cont-label SHARE IT: - .share-buttons - a.btn-facebook(ng-click='facebookShare(selectedSummerChallengeObj)') - a.btn-mail(ng-click='openPreview()') - - .diff-container(ng-if='!isCompleted(selectedSummerChallengeDay - 10)') - span.cont-label DIFFICULTY - .difficulty-level(data-level='{{ "l-" + selectedSummerChallengeObj.difficulty }}') - - span(title='Easy').l-easy - span(title='Medium').l-medium - span(title='Hard').l-hard - .rewards-container(ng-if='!isCompleted(selectedSummerChallengeDay - 10)') - span.cont-label(ng-if='selectedSummerChallengeObj.rewards') REWARDS - .rewards-icons(ng-if='selectedSummerChallengeObj.rewards') - a(class='rew-wallpaper', ng-if='selectedSummerChallengeObj.rewards.wallpaper', href='http://www.kano.me/summercamp-faq#extracontent', title='This special content is exclusive to Kano Kit owners. To access, turn on your kit and make sure it is connected to WiFi.') - a(class='rew-outfit', ng-if='selectedSummerChallengeObj.rewards.outfit', href='http://www.kano.me/summercamp-faq#extracontent', title='This special content is exclusive to Kano Kit owners. To access, turn on your kit and make sure it is connected to WiFi.') - - .btn-container.right(ng-if="!isFutureChallenge || timeToNext") - .countdown-next(ng-if="timeToNext") - i.icon-locked - span - {{timeToNext.h | zeropad }} - span.sup H - | {{timeToNext.m | zeropad }} - span.sup M - | {{timeToNext.s | zeropad }} - span.sup S - - a.see-on-world(ng-if="isCompleted(selectedSummerChallengeDay - 10)" ng-href='{{selectedSummerChallengeObj.world_url}}') See On World - a.button(ng-if="isCompleted(selectedSummerChallengeDay - 10) || (!isCompleted(selectedSummerChallengeDay - 10) && !isFutureChallenge) " ng-href='/summercamp/challenge/{{ selectedSummerChallenge + 1 }}') Start Making - -.summer-camp.bottom: .page-width - div.sc-calendar - h2 Camp Calendar - h4 August - ul.weekdays_list - li.weekdays( - ng-repeat='weekday in weekdays', - ng-class='{ current: isCurrentDayIndex($index) }' - ) {{weekday}} - ul.calendar - li.day(ng-repeat='day in range(21)') - a( - ng-dblClick='openChallenge(day)', - ng-click='selectChallenge(day); setActive(day)', - ng-class='{ locked: isLocked(day) && !isCompleted(day), completed: isCompleted(day), current: isCurrent(day), active: getActive(day) }', - ) - div(ng-if="!summerCampChallenges[day].cover_url" class='cover {{additionalBgClass(day)}}') - span {{day + 10}} - h5(ng-if="!summerCampChallenges[day].cover_url") {{summerCampChallenges[day].short_title || summerCampChallenges[day].title || " "}} - .img-cover(ng-if="summerCampChallenges[day].cover_url" ng-style="{ 'background-image': 'url(' + summerCampChallenges[day].cover_url + ')' }") - - .final-call - - include ./partial/summer-camp-leaderboard - include ./partial/promo-popup - include ./partial/summer-camp-feedback - include ./partial/mail-preview \ No newline at end of file diff --git a/views/summer-camp-challenge.jade b/views/summer-camp-challenge.jade deleted file mode 100644 index 8daa4707c..000000000 --- a/views/summer-camp-challenge.jade +++ /dev/null @@ -1,81 +0,0 @@ -.page-challenge: .page-width - .deco-leaves - .workspace-header(ng-class='(animationClass || "") + (completed ? " success" : "") + (fatherDay ? " father-day" : "")') - - .inner.center(ng-if='!started') - - h3 Challenge {{ id }}: {{ challenges[ id - 1 ].title }} - h4 {{ challenges[ id - 1 ].description }} - button.button-success(ng-click='start()') Start - - .inner(ng-if='started && !completed') - - a.button.button-hint.large.right( - ng-click='toggleSolution()', - ng-class='{ active: showSolution, "animate-pulse-highlight": highlightHelp }' - ) - i.icon-hint - | Hint - - progress-circle(value='step', max='content.steps.length') - h3 {{ summerChallenges[ id - 1 ].title }} - h4.hint(ng-bind-html='hint | markdown', ng-if='hint') - - .inner.center(ng-if='completed') - h4 {{ successMessage() }} - - a.action.button.button-success(ng-click='setOpenModal()') - span Finished (+5 XP) - - .row(ng-if='started') - .col-6.editor-wrap - - editor( - workspace, - ng-model='challenge.code', - ng-class='{ completed: completed }', - ng-change='validate()', - editable='started', - start-at-line='content.startAt' - tabbed='true', - controls='true' - ) - - .col-6.tutorial-wrap - - display( - reset-fn='restart' - source='challenge.code', - workspace, - mode='"challenge"', - sharing='completed', - ng-class='{ disabled: !started }', - ng-show='!showSolution' - ) - - editor.solution( - ng-if='showSolution && solution', - ng-model='solution', - title='"Solution"' - ) {{ solution }} - - .modal-overlay(ng-if='gameCompleteOpen') - .modal-inner.split-modal.challenge-complete.center - - //- button.close(ng-click='clocseFinishedGame()'): i.icon-cross - - h3 Challenges complete - - h4 Now make something new! - - .logo-title - - .center.bottom-section - - a.button.secondary.large(ng-href='/challenges') - i.icon-menu - | Menu - - a.button.large(ng-href='/playground') - i.icon-game - | Playground diff --git a/www.zip b/www.zip new file mode 100644 index 000000000..9664a0b09 Binary files /dev/null and b/www.zip differ diff --git a/www/assets/auth/hide-icon.png b/www/assets/auth/hide-icon.png new file mode 100644 index 000000000..20019a841 Binary files /dev/null and b/www/assets/auth/hide-icon.png differ diff --git a/www/assets/auth/hide-icon@2x.png b/www/assets/auth/hide-icon@2x.png new file mode 100644 index 000000000..4efdcd31b Binary files /dev/null and b/www/assets/auth/hide-icon@2x.png differ diff --git a/www/assets/auth/show-icon.png b/www/assets/auth/show-icon.png new file mode 100644 index 000000000..2511e38a0 Binary files /dev/null and b/www/assets/auth/show-icon.png differ diff --git a/www/assets/auth/show-icon@2x.png b/www/assets/auth/show-icon@2x.png new file mode 100644 index 000000000..e99ce0ac2 Binary files /dev/null and b/www/assets/auth/show-icon@2x.png differ diff --git a/www/assets/button-icons/twitter-white.png b/www/assets/button-icons/twitter-white.png new file mode 100644 index 000000000..2472c9129 Binary files /dev/null and b/www/assets/button-icons/twitter-white.png differ diff --git a/www/assets/challenges/blue-baloon.png b/www/assets/challenges/images/blue-baloon.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/blue-baloon.png rename to www/assets/challenges/images/blue-baloon.png diff --git a/www/assets/challenges/browse.png b/www/assets/challenges/images/browse.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/browse.png rename to www/assets/challenges/images/browse.png diff --git a/www/assets/challenges/images/cert-icon.png b/www/assets/challenges/images/cert-icon.png new file mode 100755 index 000000000..f87d645d5 Binary files /dev/null and b/www/assets/challenges/images/cert-icon.png differ diff --git a/www/assets/challenges/dots.png b/www/assets/challenges/images/dots.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/dots.png rename to www/assets/challenges/images/dots.png diff --git a/www/assets/challenges/flag-japan-bw.png b/www/assets/challenges/images/flag-japan-bw.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/flag-japan-bw.png rename to www/assets/challenges/images/flag-japan-bw.png diff --git a/www/assets/challenges/flag-japan.png b/www/assets/challenges/images/flag-japan.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/flag-japan.png rename to www/assets/challenges/images/flag-japan.png diff --git a/www/assets/challenges/flag-sweden.png b/www/assets/challenges/images/flag-sweden.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/flag-sweden.png rename to www/assets/challenges/images/flag-sweden.png diff --git a/www/assets/challenges/gradient.png b/www/assets/challenges/images/gradient.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/gradient.png rename to www/assets/challenges/images/gradient.png diff --git a/www/assets/challenges/house.png b/www/assets/challenges/images/house.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/house.png rename to www/assets/challenges/images/house.png diff --git a/www/assets/challenges/medal.png b/www/assets/challenges/images/medal.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/medal.png rename to www/assets/challenges/images/medal.png diff --git a/www/assets/challenges/images/mischiefweek2015/mw-001-skull.png b/www/assets/challenges/images/mischiefweek2015/mw-001-skull.png new file mode 100755 index 000000000..b0a0ab33a Binary files /dev/null and b/www/assets/challenges/images/mischiefweek2015/mw-001-skull.png differ diff --git a/www/assets/challenges/images/mischiefweek2015/mw-002-cat.png b/www/assets/challenges/images/mischiefweek2015/mw-002-cat.png new file mode 100755 index 000000000..4aca2c93e Binary files /dev/null and b/www/assets/challenges/images/mischiefweek2015/mw-002-cat.png differ diff --git a/www/assets/challenges/images/mischiefweek2015/mw-003-pumpkin.png b/www/assets/challenges/images/mischiefweek2015/mw-003-pumpkin.png new file mode 100755 index 000000000..cd02e5d3a Binary files /dev/null and b/www/assets/challenges/images/mischiefweek2015/mw-003-pumpkin.png differ diff --git a/www/assets/challenges/images/mischiefweek2015/mw-004-potion.png b/www/assets/challenges/images/mischiefweek2015/mw-004-potion.png new file mode 100755 index 000000000..04123d2e7 Binary files /dev/null and b/www/assets/challenges/images/mischiefweek2015/mw-004-potion.png differ diff --git a/www/assets/challenges/images/mischiefweek2015/mw-005-ghost.png b/www/assets/challenges/images/mischiefweek2015/mw-005-ghost.png new file mode 100755 index 000000000..b49f38924 Binary files /dev/null and b/www/assets/challenges/images/mischiefweek2015/mw-005-ghost.png differ diff --git a/www/assets/challenges/images/mischiefweek2015/mw-006-spiderweb.png b/www/assets/challenges/images/mischiefweek2015/mw-006-spiderweb.png new file mode 100755 index 000000000..c9f75047d Binary files /dev/null and b/www/assets/challenges/images/mischiefweek2015/mw-006-spiderweb.png differ diff --git a/www/assets/challenges/images/mischiefweek2015/mw-007-hauntedhouse.png b/www/assets/challenges/images/mischiefweek2015/mw-007-hauntedhouse.png new file mode 100755 index 000000000..cf796acce Binary files /dev/null and b/www/assets/challenges/images/mischiefweek2015/mw-007-hauntedhouse.png differ diff --git a/www/assets/challenges/images/ozwaldboateng/ancientcodes.png b/www/assets/challenges/images/ozwaldboateng/ancientcodes.png new file mode 100755 index 000000000..87532f496 Binary files /dev/null and b/www/assets/challenges/images/ozwaldboateng/ancientcodes.png differ diff --git a/www/assets/challenges/images/ozwaldboateng/bespokedesign.png b/www/assets/challenges/images/ozwaldboateng/bespokedesign.png new file mode 100755 index 000000000..1fcb61d37 Binary files /dev/null and b/www/assets/challenges/images/ozwaldboateng/bespokedesign.png differ diff --git a/www/assets/challenges/images/ozwaldboateng/color.png b/www/assets/challenges/images/ozwaldboateng/color.png new file mode 100755 index 000000000..cda82fd67 Binary files /dev/null and b/www/assets/challenges/images/ozwaldboateng/color.png differ diff --git a/www/assets/challenges/images/ozwaldboateng/cut.png b/www/assets/challenges/images/ozwaldboateng/cut.png new file mode 100755 index 000000000..755f34cdd Binary files /dev/null and b/www/assets/challenges/images/ozwaldboateng/cut.png differ diff --git a/www/assets/challenges/images/ozwaldboateng/inspiration.png b/www/assets/challenges/images/ozwaldboateng/inspiration.png new file mode 100755 index 000000000..f3aee0cb9 Binary files /dev/null and b/www/assets/challenges/images/ozwaldboateng/inspiration.png differ diff --git a/www/assets/challenges/images/ozwaldboateng/masterchallenge.png b/www/assets/challenges/images/ozwaldboateng/masterchallenge.png new file mode 100755 index 000000000..2e4561948 Binary files /dev/null and b/www/assets/challenges/images/ozwaldboateng/masterchallenge.png differ diff --git a/www/assets/challenges/images/ozwaldboateng/material.png b/www/assets/challenges/images/ozwaldboateng/material.png new file mode 100755 index 000000000..ba532651d Binary files /dev/null and b/www/assets/challenges/images/ozwaldboateng/material.png differ diff --git a/www/assets/challenges/images/ozwaldboateng/pattern.png b/www/assets/challenges/images/ozwaldboateng/pattern.png new file mode 100755 index 000000000..e32e0b974 Binary files /dev/null and b/www/assets/challenges/images/ozwaldboateng/pattern.png differ diff --git a/www/assets/challenges/images/pixel-chest.png b/www/assets/challenges/images/pixel-chest.png new file mode 100755 index 000000000..472071c79 Binary files /dev/null and b/www/assets/challenges/images/pixel-chest.png differ diff --git a/www/assets/challenges/images/pixel-colorfrenzy.png b/www/assets/challenges/images/pixel-colorfrenzy.png new file mode 100755 index 000000000..6acef9e56 Binary files /dev/null and b/www/assets/challenges/images/pixel-colorfrenzy.png differ diff --git a/www/assets/challenges/images/pixel-diamondblock.png b/www/assets/challenges/images/pixel-diamondblock.png new file mode 100755 index 000000000..5e9da8ff5 Binary files /dev/null and b/www/assets/challenges/images/pixel-diamondblock.png differ diff --git a/www/assets/challenges/images/pixel-forloop.png b/www/assets/challenges/images/pixel-forloop.png new file mode 100755 index 000000000..8608699b0 Binary files /dev/null and b/www/assets/challenges/images/pixel-forloop.png differ diff --git a/www/assets/challenges/images/pixel-gradient.png b/www/assets/challenges/images/pixel-gradient.png new file mode 100755 index 000000000..e5ac74ad8 Binary files /dev/null and b/www/assets/challenges/images/pixel-gradient.png differ diff --git a/www/assets/challenges/images/pixel-grassblock.png b/www/assets/challenges/images/pixel-grassblock.png new file mode 100755 index 000000000..0d909c742 Binary files /dev/null and b/www/assets/challenges/images/pixel-grassblock.png differ diff --git a/www/assets/challenges/images/pixel-mage.png b/www/assets/challenges/images/pixel-mage.png new file mode 100755 index 000000000..ce3c2a854 Binary files /dev/null and b/www/assets/challenges/images/pixel-mage.png differ diff --git a/www/assets/challenges/images/pixel-pong.png b/www/assets/challenges/images/pixel-pong.png new file mode 100755 index 000000000..9bd74730b Binary files /dev/null and b/www/assets/challenges/images/pixel-pong.png differ diff --git a/www/assets/challenges/images/pixel-ship.png b/www/assets/challenges/images/pixel-ship.png new file mode 100755 index 000000000..c9f1a1e4d Binary files /dev/null and b/www/assets/challenges/images/pixel-ship.png differ diff --git a/www/assets/challenges/images/pixel-steve.png b/www/assets/challenges/images/pixel-steve.png new file mode 100755 index 000000000..462fce2f4 Binary files /dev/null and b/www/assets/challenges/images/pixel-steve.png differ diff --git a/www/assets/challenges/images/pixel-sword.png b/www/assets/challenges/images/pixel-sword.png new file mode 100755 index 000000000..e4510bdb7 Binary files /dev/null and b/www/assets/challenges/images/pixel-sword.png differ diff --git a/www/assets/challenges/images/pixel-tetris.png b/www/assets/challenges/images/pixel-tetris.png new file mode 100755 index 000000000..479ecab53 Binary files /dev/null and b/www/assets/challenges/images/pixel-tetris.png differ diff --git a/www/assets/challenges/images/pixel-variables.png b/www/assets/challenges/images/pixel-variables.png new file mode 100755 index 000000000..227de201e Binary files /dev/null and b/www/assets/challenges/images/pixel-variables.png differ diff --git a/www/assets/challenges/images/pixelremixes/Steve-Alex.png b/www/assets/challenges/images/pixelremixes/Steve-Alex.png new file mode 100755 index 000000000..957ad5b3d Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/Steve-Alex.png differ diff --git a/www/assets/challenges/images/pixelremixes/Steve-beard.png b/www/assets/challenges/images/pixelremixes/Steve-beard.png new file mode 100755 index 000000000..fdcdb7da1 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/Steve-beard.png differ diff --git a/www/assets/challenges/images/pixelremixes/Steve-blue.png b/www/assets/challenges/images/pixelremixes/Steve-blue.png new file mode 100755 index 000000000..8c75c08b4 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/Steve-blue.png differ diff --git a/www/assets/challenges/images/pixelremixes/chest-nether.png b/www/assets/challenges/images/pixelremixes/chest-nether.png new file mode 100755 index 000000000..ff2303d2a Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/chest-nether.png differ diff --git a/www/assets/challenges/images/pixelremixes/chest-open.png b/www/assets/challenges/images/pixelremixes/chest-open.png new file mode 100755 index 000000000..09e415bb3 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/chest-open.png differ diff --git a/www/assets/challenges/images/pixelremixes/chest-sunken.png b/www/assets/challenges/images/pixelremixes/chest-sunken.png new file mode 100755 index 000000000..967773bfa Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/chest-sunken.png differ diff --git a/www/assets/challenges/images/pixelremixes/color-multi.png b/www/assets/challenges/images/pixelremixes/color-multi.png new file mode 100755 index 000000000..c1a0ad066 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/color-multi.png differ diff --git a/www/assets/challenges/images/pixelremixes/color-quint.png b/www/assets/challenges/images/pixelremixes/color-quint.png new file mode 100755 index 000000000..c23c9be8d Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/color-quint.png differ diff --git a/www/assets/challenges/images/pixelremixes/color-random.png b/www/assets/challenges/images/pixelremixes/color-random.png new file mode 100755 index 000000000..90b269100 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/color-random.png differ diff --git a/www/assets/challenges/images/pixelremixes/diamond-lotsof.png b/www/assets/challenges/images/pixelremixes/diamond-lotsof.png new file mode 100755 index 000000000..175a3b9db Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/diamond-lotsof.png differ diff --git a/www/assets/challenges/images/pixelremixes/diamond-obsidian.png b/www/assets/challenges/images/pixelremixes/diamond-obsidian.png new file mode 100755 index 000000000..ded790a14 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/diamond-obsidian.png differ diff --git a/www/assets/challenges/images/pixelremixes/diamond-rainbow.png b/www/assets/challenges/images/pixelremixes/diamond-rainbow.png new file mode 100755 index 000000000..271e85af2 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/diamond-rainbow.png differ diff --git a/www/assets/challenges/images/pixelremixes/ghost-big.png b/www/assets/challenges/images/pixelremixes/ghost-big.png new file mode 100755 index 000000000..ef9d7fa28 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/ghost-big.png differ diff --git a/www/assets/challenges/images/pixelremixes/ghost-scared.png b/www/assets/challenges/images/pixelremixes/ghost-scared.png new file mode 100755 index 000000000..478e17e08 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/ghost-scared.png differ diff --git a/www/assets/challenges/images/pixelremixes/ghost-tired.png b/www/assets/challenges/images/pixelremixes/ghost-tired.png new file mode 100755 index 000000000..0906a8391 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/ghost-tired.png differ diff --git a/www/assets/challenges/images/pixelremixes/grad-mage.png b/www/assets/challenges/images/pixelremixes/grad-mage.png new file mode 100755 index 000000000..be6b7fe93 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/grad-mage.png differ diff --git a/www/assets/challenges/images/pixelremixes/grad-sword.png b/www/assets/challenges/images/pixelremixes/grad-sword.png new file mode 100755 index 000000000..529c57468 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/grad-sword.png differ diff --git a/www/assets/challenges/images/pixelremixes/grad-yello.png b/www/assets/challenges/images/pixelremixes/grad-yello.png new file mode 100755 index 000000000..58429c42a Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/grad-yello.png differ diff --git a/www/assets/challenges/images/pixelremixes/grass-myce.png b/www/assets/challenges/images/pixelremixes/grass-myce.png new file mode 100755 index 000000000..3ce19625c Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/grass-myce.png differ diff --git a/www/assets/challenges/images/pixelremixes/grass-overgrown.png b/www/assets/challenges/images/pixelremixes/grass-overgrown.png new file mode 100755 index 000000000..d5c2957e5 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/grass-overgrown.png differ diff --git a/www/assets/challenges/images/pixelremixes/grass-strawb.png b/www/assets/challenges/images/pixelremixes/grass-strawb.png new file mode 100755 index 000000000..61d214d38 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/grass-strawb.png differ diff --git a/www/assets/challenges/images/pixelremixes/mage-fire.png b/www/assets/challenges/images/pixelremixes/mage-fire.png new file mode 100755 index 000000000..bb3a5245e Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/mage-fire.png differ diff --git a/www/assets/challenges/images/pixelremixes/mage-light.png b/www/assets/challenges/images/pixelremixes/mage-light.png new file mode 100755 index 000000000..161f0dc4e Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/mage-light.png differ diff --git a/www/assets/challenges/images/pixelremixes/mage-warrior.png b/www/assets/challenges/images/pixelremixes/mage-warrior.png new file mode 100755 index 000000000..8f0503ba0 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/mage-warrior.png differ diff --git a/www/assets/challenges/images/pixelremixes/pong-movecolor.png b/www/assets/challenges/images/pixelremixes/pong-movecolor.png new file mode 100755 index 000000000..55c763aff Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/pong-movecolor.png differ diff --git a/www/assets/challenges/images/pixelremixes/pong-movepaddles.png b/www/assets/challenges/images/pixelremixes/pong-movepaddles.png new file mode 100755 index 000000000..1193eaec7 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/pong-movepaddles.png differ diff --git a/www/assets/challenges/images/pixelremixes/pong-white.png b/www/assets/challenges/images/pixelremixes/pong-white.png new file mode 100755 index 000000000..50fcb57c9 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/pong-white.png differ diff --git a/www/assets/challenges/images/pixelremixes/ship-golden.png b/www/assets/challenges/images/pixelremixes/ship-golden.png new file mode 100755 index 000000000..189851458 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/ship-golden.png differ diff --git a/www/assets/challenges/images/pixelremixes/ship-sleek.png b/www/assets/challenges/images/pixelremixes/ship-sleek.png new file mode 100755 index 000000000..c12f44ddd Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/ship-sleek.png differ diff --git a/www/assets/challenges/images/pixelremixes/ship-thrust.png b/www/assets/challenges/images/pixelremixes/ship-thrust.png new file mode 100755 index 000000000..36ba1506d Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/ship-thrust.png differ diff --git a/www/assets/challenges/images/pixelremixes/snake-apple.png b/www/assets/challenges/images/pixelremixes/snake-apple.png new file mode 100755 index 000000000..31c127051 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/snake-apple.png differ diff --git a/www/assets/challenges/images/pixelremixes/snake-corner.png b/www/assets/challenges/images/pixelremixes/snake-corner.png new file mode 100755 index 000000000..6cd743139 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/snake-corner.png differ diff --git a/www/assets/challenges/images/pixelremixes/snake-tiny.png b/www/assets/challenges/images/pixelremixes/snake-tiny.png new file mode 100755 index 000000000..35e686387 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/snake-tiny.png differ diff --git a/www/assets/challenges/images/pixelremixes/sword-golden.png b/www/assets/challenges/images/pixelremixes/sword-golden.png new file mode 100755 index 000000000..5569041ba Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/sword-golden.png differ diff --git a/www/assets/challenges/images/pixelremixes/sword-pickaxe.png b/www/assets/challenges/images/pixelremixes/sword-pickaxe.png new file mode 100755 index 000000000..57b96e0db Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/sword-pickaxe.png differ diff --git a/www/assets/challenges/images/pixelremixes/sword-shovel.png b/www/assets/challenges/images/pixelremixes/sword-shovel.png new file mode 100755 index 000000000..79233a174 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/sword-shovel.png differ diff --git a/www/assets/challenges/images/pixelremixes/tetris-3D.png b/www/assets/challenges/images/pixelremixes/tetris-3D.png new file mode 100755 index 000000000..c09133ff9 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/tetris-3D.png differ diff --git a/www/assets/challenges/images/pixelremixes/tetris-gameboy.png b/www/assets/challenges/images/pixelremixes/tetris-gameboy.png new file mode 100755 index 000000000..52e4decbe Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/tetris-gameboy.png differ diff --git a/www/assets/challenges/images/pixelremixes/tetris-row.png b/www/assets/challenges/images/pixelremixes/tetris-row.png new file mode 100755 index 000000000..eda487610 Binary files /dev/null and b/www/assets/challenges/images/pixelremixes/tetris-row.png differ diff --git a/www/assets/challenges/pizza.png b/www/assets/challenges/images/pizza.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/pizza.png rename to www/assets/challenges/images/pizza.png diff --git a/www/assets/challenges/planet.png b/www/assets/challenges/images/planet.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/planet.png rename to www/assets/challenges/images/planet.png diff --git a/www/assets/challenges/playground.png b/www/assets/challenges/images/playground.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/playground.png rename to www/assets/challenges/images/playground.png diff --git a/www/assets/challenges/rainbow.png b/www/assets/challenges/images/rainbow.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/rainbow.png rename to www/assets/challenges/images/rainbow.png diff --git a/www/assets/challenges/random.png b/www/assets/challenges/images/random.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/random.png rename to www/assets/challenges/images/random.png diff --git a/www/assets/challenges/red-baloon.png b/www/assets/challenges/images/red-baloon.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/red-baloon.png rename to www/assets/challenges/images/red-baloon.png diff --git a/www/assets/challenges/shrinking.png b/www/assets/challenges/images/shrinking.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/shrinking.png rename to www/assets/challenges/images/shrinking.png diff --git a/www/assets/challenges/smiley.png b/www/assets/challenges/images/smiley.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/smiley.png rename to www/assets/challenges/images/smiley.png diff --git a/www/assets/challenges/snowman.png b/www/assets/challenges/images/snowman.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/snowman.png rename to www/assets/challenges/images/snowman.png diff --git a/www/assets/challenges/stare.png b/www/assets/challenges/images/stare.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/stare.png rename to www/assets/challenges/images/stare.png diff --git a/www/assets/challenges/starry-sky.png b/www/assets/challenges/images/starry-sky.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/starry-sky.png rename to www/assets/challenges/images/starry-sky.png diff --git a/www/assets/challenges/stickman.png b/www/assets/challenges/images/stickman.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/challenges/stickman.png rename to www/assets/challenges/images/stickman.png diff --git a/www/assets/summercamp/ch_pics/day_1.png b/www/assets/challenges/images/summercamp/day_1.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_1.png rename to www/assets/challenges/images/summercamp/day_1.png diff --git a/www/assets/summercamp/ch_pics/day_10.png b/www/assets/challenges/images/summercamp/day_10.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_10.png rename to www/assets/challenges/images/summercamp/day_10.png diff --git a/www/assets/summercamp/ch_pics/day_11.png b/www/assets/challenges/images/summercamp/day_11.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_11.png rename to www/assets/challenges/images/summercamp/day_11.png diff --git a/www/assets/summercamp/ch_pics/day_12.png b/www/assets/challenges/images/summercamp/day_12.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_12.png rename to www/assets/challenges/images/summercamp/day_12.png diff --git a/www/assets/summercamp/ch_pics/day_13.png b/www/assets/challenges/images/summercamp/day_13.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_13.png rename to www/assets/challenges/images/summercamp/day_13.png diff --git a/www/assets/summercamp/ch_pics/day_14.png b/www/assets/challenges/images/summercamp/day_14.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_14.png rename to www/assets/challenges/images/summercamp/day_14.png diff --git a/www/assets/summercamp/ch_pics/day_15.png b/www/assets/challenges/images/summercamp/day_15.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_15.png rename to www/assets/challenges/images/summercamp/day_15.png diff --git a/www/assets/summercamp/ch_pics/day_16.png b/www/assets/challenges/images/summercamp/day_16.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_16.png rename to www/assets/challenges/images/summercamp/day_16.png diff --git a/www/assets/summercamp/ch_pics/day_17.png b/www/assets/challenges/images/summercamp/day_17.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_17.png rename to www/assets/challenges/images/summercamp/day_17.png diff --git a/www/assets/summercamp/ch_pics/day_18.png b/www/assets/challenges/images/summercamp/day_18.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_18.png rename to www/assets/challenges/images/summercamp/day_18.png diff --git a/www/assets/summercamp/ch_pics/day_19.png b/www/assets/challenges/images/summercamp/day_19.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_19.png rename to www/assets/challenges/images/summercamp/day_19.png diff --git a/www/assets/summercamp/ch_pics/day_2.png b/www/assets/challenges/images/summercamp/day_2.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_2.png rename to www/assets/challenges/images/summercamp/day_2.png diff --git a/www/assets/summercamp/ch_pics/day_20.png b/www/assets/challenges/images/summercamp/day_20.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_20.png rename to www/assets/challenges/images/summercamp/day_20.png diff --git a/www/assets/summercamp/ch_pics/day_21.png b/www/assets/challenges/images/summercamp/day_21.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_21.png rename to www/assets/challenges/images/summercamp/day_21.png diff --git a/www/assets/summercamp/ch_pics/day_3.png b/www/assets/challenges/images/summercamp/day_3.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_3.png rename to www/assets/challenges/images/summercamp/day_3.png diff --git a/www/assets/summercamp/ch_pics/day_4.png b/www/assets/challenges/images/summercamp/day_4.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_4.png rename to www/assets/challenges/images/summercamp/day_4.png diff --git a/www/assets/summercamp/ch_pics/day_5.png b/www/assets/challenges/images/summercamp/day_5.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_5.png rename to www/assets/challenges/images/summercamp/day_5.png diff --git a/www/assets/summercamp/ch_pics/day_6.png b/www/assets/challenges/images/summercamp/day_6.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_6.png rename to www/assets/challenges/images/summercamp/day_6.png diff --git a/www/assets/summercamp/ch_pics/day_7.png b/www/assets/challenges/images/summercamp/day_7.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_7.png rename to www/assets/challenges/images/summercamp/day_7.png diff --git a/www/assets/summercamp/ch_pics/day_8.png b/www/assets/challenges/images/summercamp/day_8.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_8.png rename to www/assets/challenges/images/summercamp/day_8.png diff --git a/www/assets/summercamp/ch_pics/day_9.png b/www/assets/challenges/images/summercamp/day_9.png old mode 100644 new mode 100755 similarity index 100% rename from www/assets/summercamp/ch_pics/day_9.png rename to www/assets/challenges/images/summercamp/day_9.png diff --git a/www/assets/challenges/images/sunny-day.png b/www/assets/challenges/images/sunny-day.png new file mode 100755 index 000000000..11411753d Binary files /dev/null and b/www/assets/challenges/images/sunny-day.png differ diff --git a/www/assets/challenges/images/swissflag.png b/www/assets/challenges/images/swissflag.png new file mode 100755 index 000000000..149a047fe Binary files /dev/null and b/www/assets/challenges/images/swissflag.png differ diff --git a/www/assets/challenges/images/teachers-guide.png b/www/assets/challenges/images/teachers-guide.png new file mode 100755 index 000000000..b3180a81b Binary files /dev/null and b/www/assets/challenges/images/teachers-guide.png differ diff --git a/www/assets/challenges/images/world_covers/basic.png b/www/assets/challenges/images/world_covers/basic.png new file mode 100755 index 000000000..8c0b9cb87 Binary files /dev/null and b/www/assets/challenges/images/world_covers/basic.png differ diff --git a/www/assets/challenges/images/world_covers/basic@2x.png b/www/assets/challenges/images/world_covers/basic@2x.png new file mode 100755 index 000000000..a03571eb7 Binary files /dev/null and b/www/assets/challenges/images/world_covers/basic@2x.png differ diff --git a/www/assets/challenges/images/world_covers/medium.png b/www/assets/challenges/images/world_covers/medium.png new file mode 100755 index 000000000..a8618f8db Binary files /dev/null and b/www/assets/challenges/images/world_covers/medium.png differ diff --git a/www/assets/challenges/images/world_covers/medium@2x.png b/www/assets/challenges/images/world_covers/medium@2x.png new file mode 100755 index 000000000..d24880087 Binary files /dev/null and b/www/assets/challenges/images/world_covers/medium@2x.png differ diff --git a/www/assets/challenges/images/world_covers/mischiefweek.png b/www/assets/challenges/images/world_covers/mischiefweek.png new file mode 100755 index 000000000..054d303e5 Binary files /dev/null and b/www/assets/challenges/images/world_covers/mischiefweek.png differ diff --git a/www/assets/challenges/images/world_covers/ozwaldboateng.png b/www/assets/challenges/images/world_covers/ozwaldboateng.png new file mode 100755 index 000000000..47f4034d1 Binary files /dev/null and b/www/assets/challenges/images/world_covers/ozwaldboateng.png differ diff --git a/www/assets/challenges/images/world_covers/ozwaldboateng@2x.png b/www/assets/challenges/images/world_covers/ozwaldboateng@2x.png new file mode 100755 index 000000000..fc1d5de7b Binary files /dev/null and b/www/assets/challenges/images/world_covers/ozwaldboateng@2x.png differ diff --git a/www/assets/challenges/images/world_covers/pixelhack.png b/www/assets/challenges/images/world_covers/pixelhack.png new file mode 100755 index 000000000..05da927b2 Binary files /dev/null and b/www/assets/challenges/images/world_covers/pixelhack.png differ diff --git a/www/assets/challenges/images/world_covers/pixelhack@2x.png b/www/assets/challenges/images/world_covers/pixelhack@2x.png new file mode 100755 index 000000000..8eb6a8782 Binary files /dev/null and b/www/assets/challenges/images/world_covers/pixelhack@2x.png differ diff --git a/www/assets/challenges/images/world_covers/summercamp.png b/www/assets/challenges/images/world_covers/summercamp.png new file mode 100755 index 000000000..d2a59df3e Binary files /dev/null and b/www/assets/challenges/images/world_covers/summercamp.png differ diff --git a/www/assets/challenges/images/world_covers/summercamp@2x.png b/www/assets/challenges/images/world_covers/summercamp@2x.png new file mode 100755 index 000000000..1f2bc6e43 Binary files /dev/null and b/www/assets/challenges/images/world_covers/summercamp@2x.png differ diff --git a/www/assets/feedback-reactions/rating1.png b/www/assets/feedback-reactions/rating1.png new file mode 100644 index 000000000..f5aac9a46 Binary files /dev/null and b/www/assets/feedback-reactions/rating1.png differ diff --git a/www/assets/feedback-reactions/rating1@2x.png b/www/assets/feedback-reactions/rating1@2x.png new file mode 100644 index 000000000..1cd60d1d4 Binary files /dev/null and b/www/assets/feedback-reactions/rating1@2x.png differ diff --git a/www/assets/feedback-reactions/rating2.png b/www/assets/feedback-reactions/rating2.png new file mode 100644 index 000000000..ba5defad2 Binary files /dev/null and b/www/assets/feedback-reactions/rating2.png differ diff --git a/www/assets/feedback-reactions/rating2@2x.png b/www/assets/feedback-reactions/rating2@2x.png new file mode 100644 index 000000000..a68d6309f Binary files /dev/null and b/www/assets/feedback-reactions/rating2@2x.png differ diff --git a/www/assets/feedback-reactions/rating3.png b/www/assets/feedback-reactions/rating3.png new file mode 100644 index 000000000..fa03053c8 Binary files /dev/null and b/www/assets/feedback-reactions/rating3.png differ diff --git a/www/assets/feedback-reactions/rating3@2x.png b/www/assets/feedback-reactions/rating3@2x.png new file mode 100644 index 000000000..1e43fe1dc Binary files /dev/null and b/www/assets/feedback-reactions/rating3@2x.png differ diff --git a/www/assets/feedback-reactions/rating4.png b/www/assets/feedback-reactions/rating4.png new file mode 100644 index 000000000..5b2eee980 Binary files /dev/null and b/www/assets/feedback-reactions/rating4.png differ diff --git a/www/assets/feedback-reactions/rating4@2x.png b/www/assets/feedback-reactions/rating4@2x.png new file mode 100644 index 000000000..0f776129b Binary files /dev/null and b/www/assets/feedback-reactions/rating4@2x.png differ diff --git a/www/assets/feedback-reactions/rating5.png b/www/assets/feedback-reactions/rating5.png new file mode 100644 index 000000000..65e38db47 Binary files /dev/null and b/www/assets/feedback-reactions/rating5.png differ diff --git a/www/assets/feedback-reactions/rating5@2x.png b/www/assets/feedback-reactions/rating5@2x.png new file mode 100644 index 000000000..59acc41dc Binary files /dev/null and b/www/assets/feedback-reactions/rating5@2x.png differ diff --git a/www/assets/guides/PixelHackEducatorGuide.zip b/www/assets/guides/PixelHackEducatorGuide.zip new file mode 100644 index 000000000..86ef2e7ba Binary files /dev/null and b/www/assets/guides/PixelHackEducatorGuide.zip differ diff --git a/www/assets/kano-nav/hamburger.svg b/www/assets/kano-nav/hamburger.svg new file mode 100644 index 000000000..882bbc043 --- /dev/null +++ b/www/assets/kano-nav/hamburger.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + diff --git a/www/assets/kano-nav/kano_logo.svg b/www/assets/kano-nav/kano_logo.svg new file mode 100644 index 000000000..712924919 --- /dev/null +++ b/www/assets/kano-nav/kano_logo.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/www/assets/layout/feedback-logo.png b/www/assets/layout/feedback-logo.png new file mode 100644 index 000000000..d98ef30fc Binary files /dev/null and b/www/assets/layout/feedback-logo.png differ diff --git a/www/assets/layout/feedback-logo@2x.png b/www/assets/layout/feedback-logo@2x.png new file mode 100644 index 000000000..046b27b12 Binary files /dev/null and b/www/assets/layout/feedback-logo@2x.png differ diff --git a/www/assets/layout/hour-of-code-logo.png b/www/assets/layout/hour-of-code-logo.png new file mode 100644 index 000000000..cecad4740 Binary files /dev/null and b/www/assets/layout/hour-of-code-logo.png differ diff --git a/www/assets/layout/hour-of-code-logo@2x.png b/www/assets/layout/hour-of-code-logo@2x.png new file mode 100644 index 000000000..cecad4740 Binary files /dev/null and b/www/assets/layout/hour-of-code-logo@2x.png differ diff --git a/www/assets/layout/mischiefweek-logo.png b/www/assets/layout/mischiefweek-logo.png new file mode 100644 index 000000000..aee40eb29 Binary files /dev/null and b/www/assets/layout/mischiefweek-logo.png differ diff --git a/www/assets/layout/with-kano.png b/www/assets/layout/with-kano.png new file mode 100644 index 000000000..7ee1c2fb4 Binary files /dev/null and b/www/assets/layout/with-kano.png differ diff --git a/www/assets/layout/with-kano@2x.png b/www/assets/layout/with-kano@2x.png new file mode 100644 index 000000000..1d1a8b31a Binary files /dev/null and b/www/assets/layout/with-kano@2x.png differ diff --git a/www/assets/mischiefweek/mischief-header.png b/www/assets/mischiefweek/mischief-header.png new file mode 100644 index 000000000..3cda603cc Binary files /dev/null and b/www/assets/mischiefweek/mischief-header.png differ diff --git a/www/assets/mischiefweek/mischief-header@2x.png b/www/assets/mischiefweek/mischief-header@2x.png new file mode 100644 index 000000000..bcf3ad414 Binary files /dev/null and b/www/assets/mischiefweek/mischief-header@2x.png differ diff --git a/www/assets/mischiefweek/sash-orange.png b/www/assets/mischiefweek/sash-orange.png new file mode 100644 index 000000000..cc774cf44 Binary files /dev/null and b/www/assets/mischiefweek/sash-orange.png differ diff --git a/www/assets/mischiefweek/sash-orange@2x.png b/www/assets/mischiefweek/sash-orange@2x.png new file mode 100644 index 000000000..52832627b Binary files /dev/null and b/www/assets/mischiefweek/sash-orange@2x.png differ diff --git a/www/assets/mischiefweek/sash-purple.png b/www/assets/mischiefweek/sash-purple.png new file mode 100644 index 000000000..29522b464 Binary files /dev/null and b/www/assets/mischiefweek/sash-purple.png differ diff --git a/www/assets/mischiefweek/sash-purple@2x.png b/www/assets/mischiefweek/sash-purple@2x.png new file mode 100644 index 000000000..0e5b409c8 Binary files /dev/null and b/www/assets/mischiefweek/sash-purple@2x.png differ diff --git a/www/assets/mischiefweek/web-left.png b/www/assets/mischiefweek/web-left.png new file mode 100644 index 000000000..d04ab833c Binary files /dev/null and b/www/assets/mischiefweek/web-left.png differ diff --git a/www/assets/mischiefweek/web-left@2x.png b/www/assets/mischiefweek/web-left@2x.png new file mode 100644 index 000000000..94b917cae Binary files /dev/null and b/www/assets/mischiefweek/web-left@2x.png differ diff --git a/www/assets/mischiefweek/web-right.png b/www/assets/mischiefweek/web-right.png new file mode 100644 index 000000000..08c0bdb25 Binary files /dev/null and b/www/assets/mischiefweek/web-right.png differ diff --git a/www/assets/mischiefweek/web-right@2x.png b/www/assets/mischiefweek/web-right@2x.png new file mode 100644 index 000000000..3aa627dd5 Binary files /dev/null and b/www/assets/mischiefweek/web-right@2x.png differ diff --git a/www/assets/pixelhack/about-kano.svg b/www/assets/pixelhack/about-kano.svg new file mode 100644 index 000000000..c4a6fd958 --- /dev/null +++ b/www/assets/pixelhack/about-kano.svg @@ -0,0 +1 @@ +Artboard 1 \ No newline at end of file diff --git a/www/assets/pixelhack/cert-modal.png b/www/assets/pixelhack/cert-modal.png new file mode 100644 index 000000000..938509456 Binary files /dev/null and b/www/assets/pixelhack/cert-modal.png differ diff --git a/www/assets/pixelhack/cubes-left.png b/www/assets/pixelhack/cubes-left.png new file mode 100755 index 000000000..cc5119662 Binary files /dev/null and b/www/assets/pixelhack/cubes-left.png differ diff --git a/www/assets/pixelhack/cubes-left@2x.png b/www/assets/pixelhack/cubes-left@2x.png new file mode 100755 index 000000000..73419f028 Binary files /dev/null and b/www/assets/pixelhack/cubes-left@2x.png differ diff --git a/www/assets/pixelhack/cubes-right.png b/www/assets/pixelhack/cubes-right.png new file mode 100755 index 000000000..e4e944e79 Binary files /dev/null and b/www/assets/pixelhack/cubes-right.png differ diff --git a/www/assets/pixelhack/cubes-right@2x.png b/www/assets/pixelhack/cubes-right@2x.png new file mode 100755 index 000000000..6ba8290fe Binary files /dev/null and b/www/assets/pixelhack/cubes-right@2x.png differ diff --git a/www/assets/pixelhack/pixelhack-header.png b/www/assets/pixelhack/pixelhack-header.png new file mode 100755 index 000000000..e5f35d106 Binary files /dev/null and b/www/assets/pixelhack/pixelhack-header.png differ diff --git a/www/assets/pixelhack/pixelhack-header@2x.png b/www/assets/pixelhack/pixelhack-header@2x.png new file mode 100755 index 000000000..e546d9dbf Binary files /dev/null and b/www/assets/pixelhack/pixelhack-header@2x.png differ diff --git a/www/assets/pixelhack/pixelhack-hero.jpg b/www/assets/pixelhack/pixelhack-hero.jpg new file mode 100644 index 000000000..377f5412a Binary files /dev/null and b/www/assets/pixelhack/pixelhack-hero.jpg differ diff --git a/www/assets/pixelhack/pixelhack-hero@2x.jpg b/www/assets/pixelhack/pixelhack-hero@2x.jpg new file mode 100644 index 000000000..377f5412a Binary files /dev/null and b/www/assets/pixelhack/pixelhack-hero@2x.jpg differ diff --git a/www/assets/pixelhack/teacher-pack.svg b/www/assets/pixelhack/teacher-pack.svg new file mode 100644 index 000000000..c654cd4bb --- /dev/null +++ b/www/assets/pixelhack/teacher-pack.svg @@ -0,0 +1 @@ +Artboard 1 \ No newline at end of file diff --git a/www/fonts/icomoon.eot b/www/fonts/icomoon.eot index 4ec3187f0..eeb3c764a 100755 Binary files a/www/fonts/icomoon.eot and b/www/fonts/icomoon.eot differ diff --git a/www/fonts/icomoon.svg b/www/fonts/icomoon.svg index 2411948e4..76d3a4014 100755 --- a/www/fonts/icomoon.svg +++ b/www/fonts/icomoon.svg @@ -44,4 +44,9 @@ + + + + + \ No newline at end of file diff --git a/www/fonts/icomoon.ttf b/www/fonts/icomoon.ttf index eeecc5e95..600184ea6 100755 Binary files a/www/fonts/icomoon.ttf and b/www/fonts/icomoon.ttf differ diff --git a/www/fonts/icomoon.woff b/www/fonts/icomoon.woff index 3822ecbb4..56dbdabfc 100755 Binary files a/www/fonts/icomoon.woff and b/www/fonts/icomoon.woff differ diff --git a/www/js/vendor/ace/ace.js b/www/js/vendor/ace/ace.js index e0aad9826..ab44bdb6c 100755 --- a/www/js/vendor/ace/ace.js +++ b/www/js/vendor/ace/ace.js @@ -1,18298 +1,11 @@ -/* ***** BEGIN LICENSE BLOCK ***** - * Distributed under the BSD license: - * - * Copyright (c) 2010, Ajax.org B.V. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Ajax.org B.V. nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * ***** END LICENSE BLOCK ***** */ - -/** - * Define a module along with a payload - * @param module a name for the payload - * @param payload a function to call with (require, exports, module) params - */ - -(function() { - -var ACE_NAMESPACE = ""; - -var global = (function() { - return this; -})(); - - -if (!ACE_NAMESPACE && typeof requirejs !== "undefined") - return; - - -var _define = function(module, deps, payload) { - if (typeof module !== 'string') { - if (_define.original) - _define.original.apply(window, arguments); - else { - console.error('dropping module because define wasn\'t a string.'); - console.trace(); - } - return; - } - - if (arguments.length == 2) - payload = deps; - - if (!_define.modules) { - _define.modules = {}; - _define.payloads = {}; - } - - _define.payloads[module] = payload; - _define.modules[module] = null; -}; - -/** - * Get at functionality define()ed using the function above - */ -var _require = function(parentId, module, callback) { - if (Object.prototype.toString.call(module) === "[object Array]") { - var params = []; - for (var i = 0, l = module.length; i < l; ++i) { - var dep = lookup(parentId, module[i]); - if (!dep && _require.original) - return _require.original.apply(window, arguments); - params.push(dep); - } - if (callback) { - callback.apply(null, params); - } - } - else if (typeof module === 'string') { - var payload = lookup(parentId, module); - if (!payload && _require.original) - return _require.original.apply(window, arguments); - - if (callback) { - callback(); - } - - return payload; - } - else { - if (_require.original) - return _require.original.apply(window, arguments); - } -}; - -var normalizeModule = function(parentId, moduleName) { - // normalize plugin requires - if (moduleName.indexOf("!") !== -1) { - var chunks = moduleName.split("!"); - return normalizeModule(parentId, chunks[0]) + "!" + normalizeModule(parentId, chunks[1]); - } - // normalize relative requires - if (moduleName.charAt(0) == ".") { - var base = parentId.split("/").slice(0, -1).join("/"); - moduleName = base + "/" + moduleName; - - while(moduleName.indexOf(".") !== -1 && previous != moduleName) { - var previous = moduleName; - moduleName = moduleName.replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); - } - } - - return moduleName; -}; - -/** - * Internal function to lookup moduleNames and resolve them by calling the - * definition function if needed. - */ -var lookup = function(parentId, moduleName) { - - moduleName = normalizeModule(parentId, moduleName); - - var module = _define.modules[moduleName]; - if (!module) { - module = _define.payloads[moduleName]; - if (typeof module === 'function') { - var exports = {}; - var mod = { - id: moduleName, - uri: '', - exports: exports, - packaged: true - }; - - var req = function(module, callback) { - return _require(moduleName, module, callback); - }; - - var returnValue = module(req, exports, mod); - exports = returnValue || mod.exports; - _define.modules[moduleName] = exports; - delete _define.payloads[moduleName]; - } - module = _define.modules[moduleName] = exports || module; - } - return module; -}; - -function exportAce(ns) { - var require = function(module, callback) { - return _require("", module, callback); - }; - - var root = global; - if (ns) { - if (!global[ns]) - global[ns] = {}; - root = global[ns]; - } - - if (!root.define || !root.define.packaged) { - _define.original = root.define; - root.define = _define; - root.define.packaged = true; - } - - if (!root.require || !root.require.packaged) { - _require.original = root.require; - root.require = require; - root.require.packaged = true; - } -} - -exportAce(ACE_NAMESPACE); - -})(); - -define("ace/lib/regexp",["require","exports","module"], function(require, exports, module) { -"use strict"; - - var real = { - exec: RegExp.prototype.exec, - test: RegExp.prototype.test, - match: String.prototype.match, - replace: String.prototype.replace, - split: String.prototype.split - }, - compliantExecNpcg = real.exec.call(/()??/, "")[1] === undefined, // check `exec` handling of nonparticipating capturing groups - compliantLastIndexIncrement = function () { - var x = /^/g; - real.test.call(x, ""); - return !x.lastIndex; - }(); - - if (compliantLastIndexIncrement && compliantExecNpcg) - return; - RegExp.prototype.exec = function (str) { - var match = real.exec.apply(this, arguments), - name, r2; - if ( typeof(str) == 'string' && match) { - if (!compliantExecNpcg && match.length > 1 && indexOf(match, "") > -1) { - r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), "g", "")); - real.replace.call(str.slice(match.index), r2, function () { - for (var i = 1; i < arguments.length - 2; i++) { - if (arguments[i] === undefined) - match[i] = undefined; - } - }); - } - if (this._xregexp && this._xregexp.captureNames) { - for (var i = 1; i < match.length; i++) { - name = this._xregexp.captureNames[i - 1]; - if (name) - match[name] = match[i]; - } - } - if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index)) - this.lastIndex--; - } - return match; - }; - if (!compliantLastIndexIncrement) { - RegExp.prototype.test = function (str) { - var match = real.exec.call(this, str); - if (match && this.global && !match[0].length && (this.lastIndex > match.index)) - this.lastIndex--; - return !!match; - }; - } - - function getNativeFlags (regex) { - return (regex.global ? "g" : "") + - (regex.ignoreCase ? "i" : "") + - (regex.multiline ? "m" : "") + - (regex.extended ? "x" : "") + // Proposed for ES4; included in AS3 - (regex.sticky ? "y" : ""); - } - - function indexOf (array, item, from) { - if (Array.prototype.indexOf) // Use the native array method if available - return array.indexOf(item, from); - for (var i = from || 0; i < array.length; i++) { - if (array[i] === item) - return i; - } - return -1; - } - -}); - -define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) { - -function Empty() {} - -if (!Function.prototype.bind) { - Function.prototype.bind = function bind(that) { // .length is 1 - var target = this; - if (typeof target != "function") { - throw new TypeError("Function.prototype.bind called on incompatible " + target); - } - var args = slice.call(arguments, 1); // for normal call - var bound = function () { - - if (this instanceof bound) { - - var result = target.apply( - this, - args.concat(slice.call(arguments)) - ); - if (Object(result) === result) { - return result; - } - return this; - - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); - - } - - }; - if(target.prototype) { - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - return bound; - }; -} -var call = Function.prototype.call; -var prototypeOfArray = Array.prototype; -var prototypeOfObject = Object.prototype; -var slice = prototypeOfArray.slice; -var _toString = call.bind(prototypeOfObject.toString); -var owns = call.bind(prototypeOfObject.hasOwnProperty); -var defineGetter; -var defineSetter; -var lookupGetter; -var lookupSetter; -var supportsAccessors; -if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) { - defineGetter = call.bind(prototypeOfObject.__defineGetter__); - defineSetter = call.bind(prototypeOfObject.__defineSetter__); - lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); - lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); -} -if ([1,2].splice(0).length != 2) { - if(function() { // test IE < 9 to splice bug - see issue #138 - function makeArray(l) { - var a = new Array(l+2); - a[0] = a[1] = 0; - return a; - } - var array = [], lengthBefore; - - array.splice.apply(array, makeArray(20)); - array.splice.apply(array, makeArray(26)); - - lengthBefore = array.length; //46 - array.splice(5, 0, "XXX"); // add one element - - lengthBefore + 1 == array.length - - if (lengthBefore + 1 == array.length) { - return true;// has right splice implementation without bugs - } - }()) {//IE 6/7 - var array_splice = Array.prototype.splice; - Array.prototype.splice = function(start, deleteCount) { - if (!arguments.length) { - return []; - } else { - return array_splice.apply(this, [ - start === void 0 ? 0 : start, - deleteCount === void 0 ? (this.length - start) : deleteCount - ].concat(slice.call(arguments, 2))) - } - }; - } else {//IE8 - Array.prototype.splice = function(pos, removeCount){ - var length = this.length; - if (pos > 0) { - if (pos > length) - pos = length; - } else if (pos == void 0) { - pos = 0; - } else if (pos < 0) { - pos = Math.max(length + pos, 0); - } - - if (!(pos+removeCount < length)) - removeCount = length - pos; - - var removed = this.slice(pos, pos+removeCount); - var insert = slice.call(arguments, 2); - var add = insert.length; - if (pos === length) { - if (add) { - this.push.apply(this, insert); - } - } else { - var remove = Math.min(removeCount, length - pos); - var tailOldPos = pos + remove; - var tailNewPos = tailOldPos + add - remove; - var tailCount = length - tailOldPos; - var lengthAfterRemove = length - remove; - - if (tailNewPos < tailOldPos) { // case A - for (var i = 0; i < tailCount; ++i) { - this[tailNewPos+i] = this[tailOldPos+i]; - } - } else if (tailNewPos > tailOldPos) { // case B - for (i = tailCount; i--; ) { - this[tailNewPos+i] = this[tailOldPos+i]; - } - } // else, add == remove (nothing to do) - - if (add && pos === lengthAfterRemove) { - this.length = lengthAfterRemove; // truncate array - this.push.apply(this, insert); - } else { - this.length = lengthAfterRemove + add; // reserves space - for (i = 0; i < add; ++i) { - this[pos+i] = insert[i]; - } - } - } - return removed; - }; - } -} -if (!Array.isArray) { - Array.isArray = function isArray(obj) { - return _toString(obj) == "[object Array]"; - }; -} -var boxedString = Object("a"), - splitString = boxedString[0] != "a" || !(0 in boxedString); - -if (!Array.prototype.forEach) { - Array.prototype.forEach = function forEach(fun /*, thisp*/) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - thisp = arguments[1], - i = -1, - length = self.length >>> 0; - if (_toString(fun) != "[object Function]") { - throw new TypeError(); // TODO message - } - - while (++i < length) { - if (i in self) { - fun.call(thisp, self[i], i, object); - } - } - }; -} -if (!Array.prototype.map) { - Array.prototype.map = function map(fun /*, thisp*/) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - length = self.length >>> 0, - result = Array(length), - thisp = arguments[1]; - if (_toString(fun) != "[object Function]") { - throw new TypeError(fun + " is not a function"); - } - - for (var i = 0; i < length; i++) { - if (i in self) - result[i] = fun.call(thisp, self[i], i, object); - } - return result; - }; -} -if (!Array.prototype.filter) { - Array.prototype.filter = function filter(fun /*, thisp */) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - length = self.length >>> 0, - result = [], - value, - thisp = arguments[1]; - if (_toString(fun) != "[object Function]") { - throw new TypeError(fun + " is not a function"); - } - - for (var i = 0; i < length; i++) { - if (i in self) { - value = self[i]; - if (fun.call(thisp, value, i, object)) { - result.push(value); - } - } - } - return result; - }; -} -if (!Array.prototype.every) { - Array.prototype.every = function every(fun /*, thisp */) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - length = self.length >>> 0, - thisp = arguments[1]; - if (_toString(fun) != "[object Function]") { - throw new TypeError(fun + " is not a function"); - } - - for (var i = 0; i < length; i++) { - if (i in self && !fun.call(thisp, self[i], i, object)) { - return false; - } - } - return true; - }; -} -if (!Array.prototype.some) { - Array.prototype.some = function some(fun /*, thisp */) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - length = self.length >>> 0, - thisp = arguments[1]; - if (_toString(fun) != "[object Function]") { - throw new TypeError(fun + " is not a function"); - } - - for (var i = 0; i < length; i++) { - if (i in self && fun.call(thisp, self[i], i, object)) { - return true; - } - } - return false; - }; -} -if (!Array.prototype.reduce) { - Array.prototype.reduce = function reduce(fun /*, initial*/) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - length = self.length >>> 0; - if (_toString(fun) != "[object Function]") { - throw new TypeError(fun + " is not a function"); - } - if (!length && arguments.length == 1) { - throw new TypeError("reduce of empty array with no initial value"); - } - - var i = 0; - var result; - if (arguments.length >= 2) { - result = arguments[1]; - } else { - do { - if (i in self) { - result = self[i++]; - break; - } - if (++i >= length) { - throw new TypeError("reduce of empty array with no initial value"); - } - } while (true); - } - - for (; i < length; i++) { - if (i in self) { - result = fun.call(void 0, result, self[i], i, object); - } - } - - return result; - }; -} -if (!Array.prototype.reduceRight) { - Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - length = self.length >>> 0; - if (_toString(fun) != "[object Function]") { - throw new TypeError(fun + " is not a function"); - } - if (!length && arguments.length == 1) { - throw new TypeError("reduceRight of empty array with no initial value"); - } - - var result, i = length - 1; - if (arguments.length >= 2) { - result = arguments[1]; - } else { - do { - if (i in self) { - result = self[i--]; - break; - } - if (--i < 0) { - throw new TypeError("reduceRight of empty array with no initial value"); - } - } while (true); - } - - do { - if (i in this) { - result = fun.call(void 0, result, self[i], i, object); - } - } while (i--); - - return result; - }; -} -if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) { - Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) { - var self = splitString && _toString(this) == "[object String]" ? - this.split("") : - toObject(this), - length = self.length >>> 0; - - if (!length) { - return -1; - } - - var i = 0; - if (arguments.length > 1) { - i = toInteger(arguments[1]); - } - i = i >= 0 ? i : Math.max(0, length + i); - for (; i < length; i++) { - if (i in self && self[i] === sought) { - return i; - } - } - return -1; - }; -} -if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) { - Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) { - var self = splitString && _toString(this) == "[object String]" ? - this.split("") : - toObject(this), - length = self.length >>> 0; - - if (!length) { - return -1; - } - var i = length - 1; - if (arguments.length > 1) { - i = Math.min(i, toInteger(arguments[1])); - } - i = i >= 0 ? i : length - Math.abs(i); - for (; i >= 0; i--) { - if (i in self && sought === self[i]) { - return i; - } - } - return -1; - }; -} -if (!Object.getPrototypeOf) { - Object.getPrototypeOf = function getPrototypeOf(object) { - return object.__proto__ || ( - object.constructor ? - object.constructor.prototype : - prototypeOfObject - ); - }; -} -if (!Object.getOwnPropertyDescriptor) { - var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " + - "non-object: "; - Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { - if ((typeof object != "object" && typeof object != "function") || object === null) - throw new TypeError(ERR_NON_OBJECT + object); - if (!owns(object, property)) - return; - - var descriptor, getter, setter; - descriptor = { enumerable: true, configurable: true }; - if (supportsAccessors) { - var prototype = object.__proto__; - object.__proto__ = prototypeOfObject; - - var getter = lookupGetter(object, property); - var setter = lookupSetter(object, property); - object.__proto__ = prototype; - - if (getter || setter) { - if (getter) descriptor.get = getter; - if (setter) descriptor.set = setter; - return descriptor; - } - } - descriptor.value = object[property]; - return descriptor; - }; -} -if (!Object.getOwnPropertyNames) { - Object.getOwnPropertyNames = function getOwnPropertyNames(object) { - return Object.keys(object); - }; -} -if (!Object.create) { - var createEmpty; - if (Object.prototype.__proto__ === null) { - createEmpty = function () { - return { "__proto__": null }; - }; - } else { - createEmpty = function () { - var empty = {}; - for (var i in empty) - empty[i] = null; - empty.constructor = - empty.hasOwnProperty = - empty.propertyIsEnumerable = - empty.isPrototypeOf = - empty.toLocaleString = - empty.toString = - empty.valueOf = - empty.__proto__ = null; - return empty; - } - } - - Object.create = function create(prototype, properties) { - var object; - if (prototype === null) { - object = createEmpty(); - } else { - if (typeof prototype != "object") - throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'"); - var Type = function () {}; - Type.prototype = prototype; - object = new Type(); - object.__proto__ = prototype; - } - if (properties !== void 0) - Object.defineProperties(object, properties); - return object; - }; -} - -function doesDefinePropertyWork(object) { - try { - Object.defineProperty(object, "sentinel", {}); - return "sentinel" in object; - } catch (exception) { - } -} -if (Object.defineProperty) { - var definePropertyWorksOnObject = doesDefinePropertyWork({}); - var definePropertyWorksOnDom = typeof document == "undefined" || - doesDefinePropertyWork(document.createElement("div")); - if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) { - var definePropertyFallback = Object.defineProperty; - } -} - -if (!Object.defineProperty || definePropertyFallback) { - var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; - var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: " - var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + - "on this javascript engine"; - - Object.defineProperty = function defineProperty(object, property, descriptor) { - if ((typeof object != "object" && typeof object != "function") || object === null) - throw new TypeError(ERR_NON_OBJECT_TARGET + object); - if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null) - throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor); - if (definePropertyFallback) { - try { - return definePropertyFallback.call(Object, object, property, descriptor); - } catch (exception) { - } - } - if (owns(descriptor, "value")) { - - if (supportsAccessors && (lookupGetter(object, property) || - lookupSetter(object, property))) - { - var prototype = object.__proto__; - object.__proto__ = prototypeOfObject; - delete object[property]; - object[property] = descriptor.value; - object.__proto__ = prototype; - } else { - object[property] = descriptor.value; - } - } else { - if (!supportsAccessors) - throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); - if (owns(descriptor, "get")) - defineGetter(object, property, descriptor.get); - if (owns(descriptor, "set")) - defineSetter(object, property, descriptor.set); - } - - return object; - }; -} -if (!Object.defineProperties) { - Object.defineProperties = function defineProperties(object, properties) { - for (var property in properties) { - if (owns(properties, property)) - Object.defineProperty(object, property, properties[property]); - } - return object; - }; -} -if (!Object.seal) { - Object.seal = function seal(object) { - return object; - }; -} -if (!Object.freeze) { - Object.freeze = function freeze(object) { - return object; - }; -} -try { - Object.freeze(function () {}); -} catch (exception) { - Object.freeze = (function freeze(freezeObject) { - return function freeze(object) { - if (typeof object == "function") { - return object; - } else { - return freezeObject(object); - } - }; - })(Object.freeze); -} -if (!Object.preventExtensions) { - Object.preventExtensions = function preventExtensions(object) { - return object; - }; -} -if (!Object.isSealed) { - Object.isSealed = function isSealed(object) { - return false; - }; -} -if (!Object.isFrozen) { - Object.isFrozen = function isFrozen(object) { - return false; - }; -} -if (!Object.isExtensible) { - Object.isExtensible = function isExtensible(object) { - if (Object(object) === object) { - throw new TypeError(); // TODO message - } - var name = ''; - while (owns(object, name)) { - name += '?'; - } - object[name] = true; - var returnValue = owns(object, name); - delete object[name]; - return returnValue; - }; -} -if (!Object.keys) { - var hasDontEnumBug = true, - dontEnums = [ - "toString", - "toLocaleString", - "valueOf", - "hasOwnProperty", - "isPrototypeOf", - "propertyIsEnumerable", - "constructor" - ], - dontEnumsLength = dontEnums.length; - - for (var key in {"toString": null}) { - hasDontEnumBug = false; - } - - Object.keys = function keys(object) { - - if ( - (typeof object != "object" && typeof object != "function") || - object === null - ) { - throw new TypeError("Object.keys called on a non-object"); - } - - var keys = []; - for (var name in object) { - if (owns(object, name)) { - keys.push(name); - } - } - - if (hasDontEnumBug) { - for (var i = 0, ii = dontEnumsLength; i < ii; i++) { - var dontEnum = dontEnums[i]; - if (owns(object, dontEnum)) { - keys.push(dontEnum); - } - } - } - return keys; - }; - -} -if (!Date.now) { - Date.now = function now() { - return new Date().getTime(); - }; -} -var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + - "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + - "\u2029\uFEFF"; -if (!String.prototype.trim || ws.trim()) { - ws = "[" + ws + "]"; - var trimBeginRegexp = new RegExp("^" + ws + ws + "*"), - trimEndRegexp = new RegExp(ws + ws + "*$"); - String.prototype.trim = function trim() { - return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, ""); - }; -} - -function toInteger(n) { - n = +n; - if (n !== n) { // isNaN - n = 0; - } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) { - n = (n > 0 || -1) * Math.floor(Math.abs(n)); - } - return n; -} - -function isPrimitive(input) { - var type = typeof input; - return ( - input === null || - type === "undefined" || - type === "boolean" || - type === "number" || - type === "string" - ); -} - -function toPrimitive(input) { - var val, valueOf, toString; - if (isPrimitive(input)) { - return input; - } - valueOf = input.valueOf; - if (typeof valueOf === "function") { - val = valueOf.call(input); - if (isPrimitive(val)) { - return val; - } - } - toString = input.toString; - if (typeof toString === "function") { - val = toString.call(input); - if (isPrimitive(val)) { - return val; - } - } - throw new TypeError(); -} -var toObject = function (o) { - if (o == null) { // this matches both null and undefined - throw new TypeError("can't convert "+o+" to object"); - } - return Object(o); -}; - -}); - -define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"], function(require, exports, module) { -"use strict"; - -require("./regexp"); -require("./es5-shim"); - -}); - -define("ace/lib/dom",["require","exports","module"], function(require, exports, module) { -"use strict"; - -var XHTML_NS = "http://www.w3.org/1999/xhtml"; - -exports.getDocumentHead = function(doc) { - if (!doc) - doc = document; - return doc.head || doc.getElementsByTagName("head")[0] || doc.documentElement; -} - -exports.createElement = function(tag, ns) { - return document.createElementNS ? - document.createElementNS(ns || XHTML_NS, tag) : - document.createElement(tag); -}; - -exports.hasCssClass = function(el, name) { - var classes = (el.className || "").split(/\s+/g); - return classes.indexOf(name) !== -1; -}; -exports.addCssClass = function(el, name) { - if (!exports.hasCssClass(el, name)) { - el.className += " " + name; - } -}; -exports.removeCssClass = function(el, name) { - var classes = el.className.split(/\s+/g); - while (true) { - var index = classes.indexOf(name); - if (index == -1) { - break; - } - classes.splice(index, 1); - } - el.className = classes.join(" "); -}; - -exports.toggleCssClass = function(el, name) { - var classes = el.className.split(/\s+/g), add = true; - while (true) { - var index = classes.indexOf(name); - if (index == -1) { - break; - } - add = false; - classes.splice(index, 1); - } - if(add) - classes.push(name); - - el.className = classes.join(" "); - return add; -}; -exports.setCssClass = function(node, className, include) { - if (include) { - exports.addCssClass(node, className); - } else { - exports.removeCssClass(node, className); - } -}; - -exports.hasCssString = function(id, doc) { - var index = 0, sheets; - doc = doc || document; - - if (doc.createStyleSheet && (sheets = doc.styleSheets)) { - while (index < sheets.length) - if (sheets[index++].owningElement.id === id) return true; - } else if ((sheets = doc.getElementsByTagName("style"))) { - while (index < sheets.length) - if (sheets[index++].id === id) return true; - } - - return false; -}; - -exports.importCssString = function importCssString(cssText, id, doc) { - doc = doc || document; - if (id && exports.hasCssString(id, doc)) - return null; - - var style; - - if (doc.createStyleSheet) { - style = doc.createStyleSheet(); - style.cssText = cssText; - if (id) - style.owningElement.id = id; - } else { - style = doc.createElementNS - ? doc.createElementNS(XHTML_NS, "style") - : doc.createElement("style"); - - style.appendChild(doc.createTextNode(cssText)); - if (id) - style.id = id; - - exports.getDocumentHead(doc).appendChild(style); - } -}; - -exports.importCssStylsheet = function(uri, doc) { - if (doc.createStyleSheet) { - doc.createStyleSheet(uri); - } else { - var link = exports.createElement('link'); - link.rel = 'stylesheet'; - link.href = uri; - - exports.getDocumentHead(doc).appendChild(link); - } -}; - -exports.getInnerWidth = function(element) { - return ( - parseInt(exports.computedStyle(element, "paddingLeft"), 10) + - parseInt(exports.computedStyle(element, "paddingRight"), 10) + - element.clientWidth - ); -}; - -exports.getInnerHeight = function(element) { - return ( - parseInt(exports.computedStyle(element, "paddingTop"), 10) + - parseInt(exports.computedStyle(element, "paddingBottom"), 10) + - element.clientHeight - ); -}; - - -if (typeof document == "undefined") - return; - -if (window.pageYOffset !== undefined) { - exports.getPageScrollTop = function() { - return window.pageYOffset; - }; - - exports.getPageScrollLeft = function() { - return window.pageXOffset; - }; -} -else { - exports.getPageScrollTop = function() { - return document.body.scrollTop; - }; - - exports.getPageScrollLeft = function() { - return document.body.scrollLeft; - }; -} - -if (window.getComputedStyle) - exports.computedStyle = function(element, style) { - if (style) - return (window.getComputedStyle(element, "") || {})[style] || ""; - return window.getComputedStyle(element, "") || {}; - }; -else - exports.computedStyle = function(element, style) { - if (style) - return element.currentStyle[style]; - return element.currentStyle; - }; - -exports.scrollbarWidth = function(document) { - var inner = exports.createElement("ace_inner"); - inner.style.width = "100%"; - inner.style.minWidth = "0px"; - inner.style.height = "200px"; - inner.style.display = "block"; - - var outer = exports.createElement("ace_outer"); - var style = outer.style; - - style.position = "absolute"; - style.left = "-10000px"; - style.overflow = "hidden"; - style.width = "200px"; - style.minWidth = "0px"; - style.height = "150px"; - style.display = "block"; - - outer.appendChild(inner); - - var body = document.documentElement; - body.appendChild(outer); - - var noScrollbar = inner.offsetWidth; - - style.overflow = "scroll"; - var withScrollbar = inner.offsetWidth; - - if (noScrollbar == withScrollbar) { - withScrollbar = outer.clientWidth; - } - - body.removeChild(outer); - - return noScrollbar-withScrollbar; -}; -exports.setInnerHtml = function(el, innerHtml) { - var element = el.cloneNode(false);//document.createElement("div"); - element.innerHTML = innerHtml; - el.parentNode.replaceChild(element, el); - return element; -}; - -if ("textContent" in document.documentElement) { - exports.setInnerText = function(el, innerText) { - el.textContent = innerText; - }; - - exports.getInnerText = function(el) { - return el.textContent; - }; -} -else { - exports.setInnerText = function(el, innerText) { - el.innerText = innerText; - }; - - exports.getInnerText = function(el) { - return el.innerText; - }; -} - -exports.getParentWindow = function(document) { - return document.defaultView || document.parentWindow; -}; - -}); - -define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.inherits = function(ctor, superCtor) { - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); -}; - -exports.mixin = function(obj, mixin) { - for (var key in mixin) { - obj[key] = mixin[key]; - } - return obj; -}; - -exports.implement = function(proto, mixin) { - exports.mixin(proto, mixin); -}; - -}); - -define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"], function(require, exports, module) { -"use strict"; - -require("./fixoldbrowsers"); - -var oop = require("./oop"); -var Keys = (function() { - var ret = { - MODIFIER_KEYS: { - 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta' - }, - - KEY_MODS: { - "ctrl": 1, "alt": 2, "option" : 2, "shift": 4, - "super": 8, "meta": 8, "command": 8, "cmd": 8 - }, - - FUNCTION_KEYS : { - 8 : "Backspace", - 9 : "Tab", - 13 : "Return", - 19 : "Pause", - 27 : "Esc", - 32 : "Space", - 33 : "PageUp", - 34 : "PageDown", - 35 : "End", - 36 : "Home", - 37 : "Left", - 38 : "Up", - 39 : "Right", - 40 : "Down", - 44 : "Print", - 45 : "Insert", - 46 : "Delete", - 96 : "Numpad0", - 97 : "Numpad1", - 98 : "Numpad2", - 99 : "Numpad3", - 100: "Numpad4", - 101: "Numpad5", - 102: "Numpad6", - 103: "Numpad7", - 104: "Numpad8", - 105: "Numpad9", - '-13': "NumpadEnter", - 112: "F1", - 113: "F2", - 114: "F3", - 115: "F4", - 116: "F5", - 117: "F6", - 118: "F7", - 119: "F8", - 120: "F9", - 121: "F10", - 122: "F11", - 123: "F12", - 144: "Numlock", - 145: "Scrolllock" - }, - - PRINTABLE_KEYS: { - 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5', - 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a', - 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h', - 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o', - 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v', - 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.', - 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`', 219: '[', - 220: '\\',221: ']', 222: '\'' - } - }; - var name, i; - for (i in ret.FUNCTION_KEYS) { - name = ret.FUNCTION_KEYS[i].toLowerCase(); - ret[name] = parseInt(i, 10); - } - for (i in ret.PRINTABLE_KEYS) { - name = ret.PRINTABLE_KEYS[i].toLowerCase(); - ret[name] = parseInt(i, 10); - } - oop.mixin(ret, ret.MODIFIER_KEYS); - oop.mixin(ret, ret.PRINTABLE_KEYS); - oop.mixin(ret, ret.FUNCTION_KEYS); - ret.enter = ret["return"]; - ret.escape = ret.esc; - ret.del = ret["delete"]; - ret[173] = '-'; - - (function() { - var mods = ["cmd", "ctrl", "alt", "shift"]; - for (var i = Math.pow(2, mods.length); i--;) { - ret.KEY_MODS[i] = mods.filter(function(x) { - return i & ret.KEY_MODS[x]; - }).join("-") + "-"; - } - })(); - - ret.KEY_MODS[0] = ""; - ret.KEY_MODS[-1] = "input"; - - return ret; -})(); -oop.mixin(exports, Keys); - -exports.keyCodeToString = function(keyCode) { - var keyString = Keys[keyCode]; - if (typeof keyString != "string") - keyString = String.fromCharCode(keyCode); - return keyString.toLowerCase(); -}; - -}); - -define("ace/lib/useragent",["require","exports","module"], function(require, exports, module) { -"use strict"; -exports.OS = { - LINUX: "LINUX", - MAC: "MAC", - WINDOWS: "WINDOWS" -}; -exports.getOS = function() { - if (exports.isMac) { - return exports.OS.MAC; - } else if (exports.isLinux) { - return exports.OS.LINUX; - } else { - return exports.OS.WINDOWS; - } -}; -if (typeof navigator != "object") - return; - -var os = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase(); -var ua = navigator.userAgent; -exports.isWin = (os == "win"); -exports.isMac = (os == "mac"); -exports.isLinux = (os == "linux"); -exports.isIE = - (navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0) - ? parseFloat((ua.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]) - : parseFloat((ua.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]); // for ie - -exports.isOldIE = exports.isIE && exports.isIE < 9; -exports.isGecko = exports.isMozilla = (window.Controllers || window.controllers) && window.navigator.product === "Gecko"; -exports.isOldGecko = exports.isGecko && parseInt((ua.match(/rv\:(\d+)/)||[])[1], 10) < 4; -exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]"; -exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined; - -exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined; - -exports.isAIR = ua.indexOf("AdobeAIR") >= 0; - -exports.isIPad = ua.indexOf("iPad") >= 0; - -exports.isTouchPad = ua.indexOf("TouchPad") >= 0; - -exports.isChromeOS = ua.indexOf(" CrOS ") >= 0; - -}); - -define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module) { -"use strict"; - -var keys = require("./keys"); -var useragent = require("./useragent"); - -exports.addListener = function(elem, type, callback) { - if (elem.addEventListener) { - return elem.addEventListener(type, callback, false); - } - if (elem.attachEvent) { - var wrapper = function() { - callback.call(elem, window.event); - }; - callback._wrapper = wrapper; - elem.attachEvent("on" + type, wrapper); - } -}; - -exports.removeListener = function(elem, type, callback) { - if (elem.removeEventListener) { - return elem.removeEventListener(type, callback, false); - } - if (elem.detachEvent) { - elem.detachEvent("on" + type, callback._wrapper || callback); - } -}; -exports.stopEvent = function(e) { - exports.stopPropagation(e); - exports.preventDefault(e); - return false; -}; - -exports.stopPropagation = function(e) { - if (e.stopPropagation) - e.stopPropagation(); - else - e.cancelBubble = true; -}; - -exports.preventDefault = function(e) { - if (e.preventDefault) - e.preventDefault(); - else - e.returnValue = false; -}; -exports.getButton = function(e) { - if (e.type == "dblclick") - return 0; - if (e.type == "contextmenu" || (useragent.isMac && (e.ctrlKey && !e.altKey && !e.shiftKey))) - return 2; - if (e.preventDefault) { - return e.button; - } - else { - return {1:0, 2:2, 4:1}[e.button]; - } -}; - -exports.capture = function(el, eventHandler, releaseCaptureHandler) { - function onMouseUp(e) { - eventHandler && eventHandler(e); - releaseCaptureHandler && releaseCaptureHandler(e); - - exports.removeListener(document, "mousemove", eventHandler, true); - exports.removeListener(document, "mouseup", onMouseUp, true); - exports.removeListener(document, "dragstart", onMouseUp, true); - } - - exports.addListener(document, "mousemove", eventHandler, true); - exports.addListener(document, "mouseup", onMouseUp, true); - exports.addListener(document, "dragstart", onMouseUp, true); - - return onMouseUp; -}; - -exports.addMouseWheelListener = function(el, callback) { - if ("onmousewheel" in el) { - exports.addListener(el, "mousewheel", function(e) { - var factor = 8; - if (e.wheelDeltaX !== undefined) { - e.wheelX = -e.wheelDeltaX / factor; - e.wheelY = -e.wheelDeltaY / factor; - } else { - e.wheelX = 0; - e.wheelY = -e.wheelDelta / factor; - } - callback(e); - }); - } else if ("onwheel" in el) { - exports.addListener(el, "wheel", function(e) { - var factor = 0.35; - switch (e.deltaMode) { - case e.DOM_DELTA_PIXEL: - e.wheelX = e.deltaX * factor || 0; - e.wheelY = e.deltaY * factor || 0; - break; - case e.DOM_DELTA_LINE: - case e.DOM_DELTA_PAGE: - e.wheelX = (e.deltaX || 0) * 5; - e.wheelY = (e.deltaY || 0) * 5; - break; - } - - callback(e); - }); - } else { - exports.addListener(el, "DOMMouseScroll", function(e) { - if (e.axis && e.axis == e.HORIZONTAL_AXIS) { - e.wheelX = (e.detail || 0) * 5; - e.wheelY = 0; - } else { - e.wheelX = 0; - e.wheelY = (e.detail || 0) * 5; - } - callback(e); - }); - } -}; - -exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbackName) { - var clicks = 0; - var startX, startY, timer; - var eventNames = { - 2: "dblclick", - 3: "tripleclick", - 4: "quadclick" - }; - - exports.addListener(el, "mousedown", function(e) { - if (exports.getButton(e) !== 0) { - clicks = 0; - } else if (e.detail > 1) { - clicks++; - if (clicks > 4) - clicks = 1; - } else { - clicks = 1; - } - if (useragent.isIE) { - var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5; - if (!timer || isNewClick) - clicks = 1; - if (timer) - clearTimeout(timer); - timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600); - - if (clicks == 1) { - startX = e.clientX; - startY = e.clientY; - } - } - - e._clicks = clicks; - - eventHandler[callbackName]("mousedown", e); - - if (clicks > 4) - clicks = 0; - else if (clicks > 1) - return eventHandler[callbackName](eventNames[clicks], e); - }); - - if (useragent.isOldIE) { - exports.addListener(el, "dblclick", function(e) { - clicks = 2; - if (timer) - clearTimeout(timer); - timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600); - eventHandler[callbackName]("mousedown", e); - eventHandler[callbackName](eventNames[clicks], e); - }); - } -}; - -var getModifierHash = useragent.isMac && useragent.isOpera && !("KeyboardEvent" in window) - ? function(e) { - return 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0); - } - : function(e) { - return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0); - }; - -exports.getModifierString = function(e) { - return keys.KEY_MODS[getModifierHash(e)]; -}; - -function normalizeCommandKeys(callback, e, keyCode) { - var hashId = getModifierHash(e); - - if (!useragent.isMac && pressedKeys) { - if (pressedKeys[91] || pressedKeys[92]) - hashId |= 8; - if (pressedKeys.altGr) { - if ((3 & hashId) != 3) - pressedKeys.altGr = 0; - else - return; - } - if (keyCode === 18 || keyCode === 17) { - var location = "location" in e ? e.location : e.keyLocation; - if (keyCode === 17 && location === 1) { - ts = e.timeStamp; - } else if (keyCode === 18 && hashId === 3 && location === 2) { - var dt = -ts; - ts = e.timeStamp; - dt += ts; - if (dt < 3) - pressedKeys.altGr = true; - } - } - } - - if (keyCode in keys.MODIFIER_KEYS) { - switch (keys.MODIFIER_KEYS[keyCode]) { - case "Alt": - hashId = 2; - break; - case "Shift": - hashId = 4; - break; - case "Ctrl": - hashId = 1; - break; - default: - hashId = 8; - break; - } - keyCode = -1; - } - - if (hashId & 8 && (keyCode === 91 || keyCode === 93)) { - keyCode = -1; - } - - if (!hashId && keyCode === 13) { - var location = "location" in e ? e.location : e.keyLocation; - if (location === 3) { - callback(e, hashId, -keyCode); - if (e.defaultPrevented) - return; - } - } - - if (useragent.isChromeOS && hashId & 8) { - callback(e, hashId, keyCode); - if (e.defaultPrevented) - return; - else - hashId &= ~8; - } - if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) { - return false; - } - - return callback(e, hashId, keyCode); -} - -var pressedKeys = null; -var ts = 0; -exports.addCommandKeyListener = function(el, callback) { - var addListener = exports.addListener; - if (useragent.isOldGecko || (useragent.isOpera && !("KeyboardEvent" in window))) { - var lastKeyDownKeyCode = null; - addListener(el, "keydown", function(e) { - lastKeyDownKeyCode = e.keyCode; - }); - addListener(el, "keypress", function(e) { - return normalizeCommandKeys(callback, e, lastKeyDownKeyCode); - }); - } else { - var lastDefaultPrevented = null; - - addListener(el, "keydown", function(e) { - pressedKeys[e.keyCode] = true; - var result = normalizeCommandKeys(callback, e, e.keyCode); - lastDefaultPrevented = e.defaultPrevented; - return result; - }); - - addListener(el, "keypress", function(e) { - if (lastDefaultPrevented && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey)) { - exports.stopEvent(e); - lastDefaultPrevented = null; - } - }); - - addListener(el, "keyup", function(e) { - pressedKeys[e.keyCode] = null; - }); - - if (!pressedKeys) { - pressedKeys = Object.create(null); - addListener(window, "focus", function(e) { - pressedKeys = Object.create(null); - }); - } - } -}; - -if (window.postMessage && !useragent.isOldIE) { - var postMessageId = 1; - exports.nextTick = function(callback, win) { - win = win || window; - var messageName = "zero-timeout-message-" + postMessageId; - exports.addListener(win, "message", function listener(e) { - if (e.data == messageName) { - exports.stopPropagation(e); - exports.removeListener(win, "message", listener); - callback(); - } - }); - win.postMessage(messageName, "*"); - }; -} - - -exports.nextFrame = window.requestAnimationFrame || - window.mozRequestAnimationFrame || - window.webkitRequestAnimationFrame || - window.msRequestAnimationFrame || - window.oRequestAnimationFrame; - -if (exports.nextFrame) - exports.nextFrame = exports.nextFrame.bind(window); -else - exports.nextFrame = function(callback) { - setTimeout(callback, 17); - }; -}); - -define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.last = function(a) { - return a[a.length - 1]; -}; - -exports.stringReverse = function(string) { - return string.split("").reverse().join(""); -}; - -exports.stringRepeat = function (string, count) { - var result = ''; - while (count > 0) { - if (count & 1) - result += string; - - if (count >>= 1) - string += string; - } - return result; -}; - -var trimBeginRegexp = /^\s\s*/; -var trimEndRegexp = /\s\s*$/; - -exports.stringTrimLeft = function (string) { - return string.replace(trimBeginRegexp, ''); -}; - -exports.stringTrimRight = function (string) { - return string.replace(trimEndRegexp, ''); -}; - -exports.copyObject = function(obj) { - var copy = {}; - for (var key in obj) { - copy[key] = obj[key]; - } - return copy; -}; - -exports.copyArray = function(array){ - var copy = []; - for (var i=0, l=array.length; i 1); - return ev.preventDefault(); - }; - - this.startSelect = function(pos, waitForClickSelection) { - pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y); - var editor = this.editor; - editor.$blockScrolling++; - if (this.mousedownEvent.getShiftKey()) - editor.selection.selectToPosition(pos); - else if (!waitForClickSelection) - editor.selection.moveToPosition(pos); - if (!waitForClickSelection) - this.select(); - if (editor.renderer.scroller.setCapture) { - editor.renderer.scroller.setCapture(); - } - editor.setStyle("ace_selecting"); - this.setState("select"); - editor.$blockScrolling--; - }; - - this.select = function() { - var anchor, editor = this.editor; - var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y); - editor.$blockScrolling++; - if (this.$clickSelection) { - var cmp = this.$clickSelection.comparePoint(cursor); - - if (cmp == -1) { - anchor = this.$clickSelection.end; - } else if (cmp == 1) { - anchor = this.$clickSelection.start; - } else { - var orientedRange = calcRangeOrientation(this.$clickSelection, cursor); - cursor = orientedRange.cursor; - anchor = orientedRange.anchor; - } - editor.selection.setSelectionAnchor(anchor.row, anchor.column); - } - editor.selection.selectToPosition(cursor); - editor.$blockScrolling--; - editor.renderer.scrollCursorIntoView(); - }; - - this.extendSelectionBy = function(unitName) { - var anchor, editor = this.editor; - var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y); - var range = editor.selection[unitName](cursor.row, cursor.column); - editor.$blockScrolling++; - if (this.$clickSelection) { - var cmpStart = this.$clickSelection.comparePoint(range.start); - var cmpEnd = this.$clickSelection.comparePoint(range.end); - - if (cmpStart == -1 && cmpEnd <= 0) { - anchor = this.$clickSelection.end; - if (range.end.row != cursor.row || range.end.column != cursor.column) - cursor = range.start; - } else if (cmpEnd == 1 && cmpStart >= 0) { - anchor = this.$clickSelection.start; - if (range.start.row != cursor.row || range.start.column != cursor.column) - cursor = range.end; - } else if (cmpStart == -1 && cmpEnd == 1) { - cursor = range.end; - anchor = range.start; - } else { - var orientedRange = calcRangeOrientation(this.$clickSelection, cursor); - cursor = orientedRange.cursor; - anchor = orientedRange.anchor; - } - editor.selection.setSelectionAnchor(anchor.row, anchor.column); - } - editor.selection.selectToPosition(cursor); - editor.$blockScrolling--; - editor.renderer.scrollCursorIntoView(); - }; - - this.selectEnd = - this.selectAllEnd = - this.selectByWordsEnd = - this.selectByLinesEnd = function() { - this.$clickSelection = null; - this.editor.unsetStyle("ace_selecting"); - if (this.editor.renderer.scroller.releaseCapture) { - this.editor.renderer.scroller.releaseCapture(); - } - }; - - this.focusWait = function() { - var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); - var time = Date.now(); - - if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimout) - this.startSelect(this.mousedownEvent.getDocumentPosition()); - }; - - this.onDoubleClick = function(ev) { - var pos = ev.getDocumentPosition(); - var editor = this.editor; - var session = editor.session; - - var range = session.getBracketRange(pos); - if (range) { - if (range.isEmpty()) { - range.start.column--; - range.end.column++; - } - this.setState("select"); - } else { - range = editor.selection.getWordRange(pos.row, pos.column); - this.setState("selectByWords"); - } - this.$clickSelection = range; - this.select(); - }; - - this.onTripleClick = function(ev) { - var pos = ev.getDocumentPosition(); - var editor = this.editor; - - this.setState("selectByLines"); - var range = editor.getSelectionRange(); - if (range.isMultiLine() && range.contains(pos.row, pos.column)) { - this.$clickSelection = editor.selection.getLineRange(range.start.row); - this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end; - } else { - this.$clickSelection = editor.selection.getLineRange(pos.row); - } - this.select(); - }; - - this.onQuadClick = function(ev) { - var editor = this.editor; - - editor.selectAll(); - this.$clickSelection = editor.getSelectionRange(); - this.setState("selectAll"); - }; - - this.onMouseWheel = function(ev) { - if (ev.getAccelKey()) - return; - if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) { - ev.wheelX = ev.wheelY; - ev.wheelY = 0; - } - - var t = ev.domEvent.timeStamp; - var dt = t - (this.$lastScrollTime||0); - - var editor = this.editor; - var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); - if (isScrolable || dt < 200) { - this.$lastScrollTime = t; - editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); - return ev.stop(); - } - }; - -}).call(DefaultHandlers.prototype); - -exports.DefaultHandlers = DefaultHandlers; - -function calcDistance(ax, ay, bx, by) { - return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); -} - -function calcRangeOrientation(range, cursor) { - if (range.start.row == range.end.row) - var cmp = 2 * cursor.column - range.start.column - range.end.column; - else if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column) - var cmp = cursor.column - 4; - else - var cmp = 2 * cursor.row - range.start.row - range.end.row; - - if (cmp < 0) - return {cursor: range.start, anchor: range.end}; - else - return {cursor: range.end, anchor: range.start}; -} - -}); - -define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"], function(require, exports, module) { -"use strict"; - -var oop = require("./lib/oop"); -var dom = require("./lib/dom"); -function Tooltip (parentNode) { - this.isOpen = false; - this.$element = null; - this.$parentNode = parentNode; -} - -(function() { - this.$init = function() { - this.$element = dom.createElement("div"); - this.$element.className = "ace_tooltip"; - this.$element.style.display = "none"; - this.$parentNode.appendChild(this.$element); - return this.$element; - }; - this.getElement = function() { - return this.$element || this.$init(); - }; - this.setText = function(text) { - dom.setInnerText(this.getElement(), text); - }; - this.setHtml = function(html) { - this.getElement().innerHTML = html; - }; - this.setPosition = function(x, y) { - this.getElement().style.left = x + "px"; - this.getElement().style.top = y + "px"; - }; - this.setClassName = function(className) { - dom.addCssClass(this.getElement(), className); - }; - this.show = function(text, x, y) { - if (text != null) - this.setText(text); - if (x != null && y != null) - this.setPosition(x, y); - if (!this.isOpen) { - this.getElement().style.display = "block"; - this.isOpen = true; - } - }; - - this.hide = function() { - if (this.isOpen) { - this.getElement().style.display = "none"; - this.isOpen = false; - } - }; - this.getHeight = function() { - return this.getElement().offsetHeight; - }; - this.getWidth = function() { - return this.getElement().offsetWidth; - }; - -}).call(Tooltip.prototype); - -exports.Tooltip = Tooltip; -}); - -define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"], function(require, exports, module) { -"use strict"; -var dom = require("../lib/dom"); -var oop = require("../lib/oop"); -var event = require("../lib/event"); -var Tooltip = require("../tooltip").Tooltip; - -function GutterHandler(mouseHandler) { - var editor = mouseHandler.editor; - var gutter = editor.renderer.$gutterLayer; - var tooltip = new GutterTooltip(editor.container); - - mouseHandler.editor.setDefaultHandler("guttermousedown", function(e) { - if (!editor.isFocused() || e.getButton() != 0) - return; - var gutterRegion = gutter.getRegion(e); - - if (gutterRegion == "foldWidgets") - return; - - var row = e.getDocumentPosition().row; - var selection = editor.session.selection; - - if (e.getShiftKey()) - selection.selectTo(row, 0); - else { - if (e.domEvent.detail == 2) { - editor.selectAll(); - return e.preventDefault(); - } - mouseHandler.$clickSelection = editor.selection.getLineRange(row); - } - mouseHandler.setState("selectByLines"); - mouseHandler.captureMouse(e); - return e.preventDefault(); - }); - - - var tooltipTimeout, mouseEvent, tooltipAnnotation; - - function showTooltip() { - var row = mouseEvent.getDocumentPosition().row; - var annotation = gutter.$annotations[row]; - if (!annotation) - return hideTooltip(); - - var maxRow = editor.session.getLength(); - if (row == maxRow) { - var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row; - var pos = mouseEvent.$pos; - if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column)) - return hideTooltip(); - } - - if (tooltipAnnotation == annotation) - return; - tooltipAnnotation = annotation.text.join("
"); - - tooltip.setHtml(tooltipAnnotation); - tooltip.show(); - editor.on("mousewheel", hideTooltip); - - if (mouseHandler.$tooltipFollowsMouse) { - moveTooltip(mouseEvent); - } else { - var gutterElement = gutter.$cells[editor.session.documentToScreenRow(row, 0)].element; - var rect = gutterElement.getBoundingClientRect(); - var style = tooltip.getElement().style; - style.left = rect.right + "px"; - style.top = rect.bottom + "px"; - } - } - - function hideTooltip() { - if (tooltipTimeout) - tooltipTimeout = clearTimeout(tooltipTimeout); - if (tooltipAnnotation) { - tooltip.hide(); - tooltipAnnotation = null; - editor.removeEventListener("mousewheel", hideTooltip); - } - } - - function moveTooltip(e) { - tooltip.setPosition(e.x, e.y); - } - - mouseHandler.editor.setDefaultHandler("guttermousemove", function(e) { - var target = e.domEvent.target || e.domEvent.srcElement; - if (dom.hasCssClass(target, "ace_fold-widget")) - return hideTooltip(); - - if (tooltipAnnotation && mouseHandler.$tooltipFollowsMouse) - moveTooltip(e); - - mouseEvent = e; - if (tooltipTimeout) - return; - tooltipTimeout = setTimeout(function() { - tooltipTimeout = null; - if (mouseEvent && !mouseHandler.isMousePressed) - showTooltip(); - else - hideTooltip(); - }, 50); - }); - - event.addListener(editor.renderer.$gutter, "mouseout", function(e) { - mouseEvent = null; - if (!tooltipAnnotation || tooltipTimeout) - return; - - tooltipTimeout = setTimeout(function() { - tooltipTimeout = null; - hideTooltip(); - }, 50); - }); - - editor.on("changeSession", hideTooltip); -} - -function GutterTooltip(parentNode) { - Tooltip.call(this, parentNode); -} - -oop.inherits(GutterTooltip, Tooltip); - -(function(){ - this.setPosition = function(x, y) { - var windowWidth = window.innerWidth || document.documentElement.clientWidth; - var windowHeight = window.innerHeight || document.documentElement.clientHeight; - var width = this.getWidth(); - var height = this.getHeight(); - x += 15; - y += 15; - if (x + width > windowWidth) { - x -= (x + width) - windowWidth; - } - if (y + height > windowHeight) { - y -= 20 + height; - } - Tooltip.prototype.setPosition.call(this, x, y); - }; - -}).call(GutterTooltip.prototype); - - - -exports.GutterHandler = GutterHandler; - -}); - -define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { -"use strict"; - -var event = require("../lib/event"); -var useragent = require("../lib/useragent"); -var MouseEvent = exports.MouseEvent = function(domEvent, editor) { - this.domEvent = domEvent; - this.editor = editor; - - this.x = this.clientX = domEvent.clientX; - this.y = this.clientY = domEvent.clientY; - - this.$pos = null; - this.$inSelection = null; - - this.propagationStopped = false; - this.defaultPrevented = false; -}; - -(function() { - - this.stopPropagation = function() { - event.stopPropagation(this.domEvent); - this.propagationStopped = true; - }; - - this.preventDefault = function() { - event.preventDefault(this.domEvent); - this.defaultPrevented = true; - }; - - this.stop = function() { - this.stopPropagation(); - this.preventDefault(); - }; - this.getDocumentPosition = function() { - if (this.$pos) - return this.$pos; - - this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY); - return this.$pos; - }; - this.inSelection = function() { - if (this.$inSelection !== null) - return this.$inSelection; - - var editor = this.editor; - - - var selectionRange = editor.getSelectionRange(); - if (selectionRange.isEmpty()) - this.$inSelection = false; - else { - var pos = this.getDocumentPosition(); - this.$inSelection = selectionRange.contains(pos.row, pos.column); - } - - return this.$inSelection; - }; - this.getButton = function() { - return event.getButton(this.domEvent); - }; - this.getShiftKey = function() { - return this.domEvent.shiftKey; - }; - - this.getAccelKey = useragent.isMac - ? function() { return this.domEvent.metaKey; } - : function() { return this.domEvent.ctrlKey; }; - -}).call(MouseEvent.prototype); - -}); - -define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { -"use strict"; - -var dom = require("../lib/dom"); -var event = require("../lib/event"); -var useragent = require("../lib/useragent"); - -var AUTOSCROLL_DELAY = 200; -var SCROLL_CURSOR_DELAY = 200; -var SCROLL_CURSOR_HYSTERESIS = 5; - -function DragdropHandler(mouseHandler) { - - var editor = mouseHandler.editor; - - var blankImage = dom.createElement("img"); - blankImage.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; - if (useragent.isOpera) - blankImage.style.cssText = "width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"; - - var exports = ["dragWait", "dragWaitEnd", "startDrag", "dragReadyEnd", "onMouseDrag"]; - - exports.forEach(function(x) { - mouseHandler[x] = this[x]; - }, this); - editor.addEventListener("mousedown", this.onMouseDown.bind(mouseHandler)); - - - var mouseTarget = editor.container; - var dragSelectionMarker, x, y; - var timerId, range; - var dragCursor, counter = 0; - var dragOperation; - var isInternal; - var autoScrollStartTime; - var cursorMovedTime; - var cursorPointOnCaretMoved; - - this.onDragStart = function(e) { - if (this.cancelDrag || !mouseTarget.draggable) { - var self = this; - setTimeout(function(){ - self.startSelect(); - self.captureMouse(e); - }, 0); - return e.preventDefault(); - } - range = editor.getSelectionRange(); - - var dataTransfer = e.dataTransfer; - dataTransfer.effectAllowed = editor.getReadOnly() ? "copy" : "copyMove"; - if (useragent.isOpera) { - editor.container.appendChild(blankImage); - blankImage.scrollTop = 0; - } - dataTransfer.setDragImage && dataTransfer.setDragImage(blankImage, 0, 0); - if (useragent.isOpera) { - editor.container.removeChild(blankImage); - } - dataTransfer.clearData(); - dataTransfer.setData("Text", editor.session.getTextRange()); - - isInternal = true; - this.setState("drag"); - }; - - this.onDragEnd = function(e) { - mouseTarget.draggable = false; - isInternal = false; - this.setState(null); - if (!editor.getReadOnly()) { - var dropEffect = e.dataTransfer.dropEffect; - if (!dragOperation && dropEffect == "move") - editor.session.remove(editor.getSelectionRange()); - editor.renderer.$cursorLayer.setBlinking(true); - } - this.editor.unsetStyle("ace_dragging"); - this.editor.renderer.setCursorStyle(""); - }; - - this.onDragEnter = function(e) { - if (editor.getReadOnly() || !canAccept(e.dataTransfer)) - return; - x = e.clientX; - y = e.clientY; - if (!dragSelectionMarker) - addDragMarker(); - counter++; - e.dataTransfer.dropEffect = dragOperation = getDropEffect(e); - return event.preventDefault(e); - }; - - this.onDragOver = function(e) { - if (editor.getReadOnly() || !canAccept(e.dataTransfer)) - return; - x = e.clientX; - y = e.clientY; - if (!dragSelectionMarker) { - addDragMarker(); - counter++; - } - if (onMouseMoveTimer !== null) - onMouseMoveTimer = null; - - e.dataTransfer.dropEffect = dragOperation = getDropEffect(e); - return event.preventDefault(e); - }; - - this.onDragLeave = function(e) { - counter--; - if (counter <= 0 && dragSelectionMarker) { - clearDragMarker(); - dragOperation = null; - return event.preventDefault(e); - } - }; - - this.onDrop = function(e) { - if (!dragCursor) - return; - var dataTransfer = e.dataTransfer; - if (isInternal) { - switch (dragOperation) { - case "move": - if (range.contains(dragCursor.row, dragCursor.column)) { - range = { - start: dragCursor, - end: dragCursor - }; - } else { - range = editor.moveText(range, dragCursor); - } - break; - case "copy": - range = editor.moveText(range, dragCursor, true); - break; - } - } else { - var dropData = dataTransfer.getData('Text'); - range = { - start: dragCursor, - end: editor.session.insert(dragCursor, dropData) - }; - editor.focus(); - dragOperation = null; - } - clearDragMarker(); - return event.preventDefault(e); - }; - - event.addListener(mouseTarget, "dragstart", this.onDragStart.bind(mouseHandler)); - event.addListener(mouseTarget, "dragend", this.onDragEnd.bind(mouseHandler)); - event.addListener(mouseTarget, "dragenter", this.onDragEnter.bind(mouseHandler)); - event.addListener(mouseTarget, "dragover", this.onDragOver.bind(mouseHandler)); - event.addListener(mouseTarget, "dragleave", this.onDragLeave.bind(mouseHandler)); - event.addListener(mouseTarget, "drop", this.onDrop.bind(mouseHandler)); - - function scrollCursorIntoView(cursor, prevCursor) { - var now = Date.now(); - var vMovement = !prevCursor || cursor.row != prevCursor.row; - var hMovement = !prevCursor || cursor.column != prevCursor.column; - if (!cursorMovedTime || vMovement || hMovement) { - editor.$blockScrolling += 1; - editor.moveCursorToPosition(cursor); - editor.$blockScrolling -= 1; - cursorMovedTime = now; - cursorPointOnCaretMoved = {x: x, y: y}; - } else { - var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y); - if (distance > SCROLL_CURSOR_HYSTERESIS) { - cursorMovedTime = null; - } else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) { - editor.renderer.scrollCursorIntoView(); - cursorMovedTime = null; - } - } - } - - function autoScroll(cursor, prevCursor) { - var now = Date.now(); - var lineHeight = editor.renderer.layerConfig.lineHeight; - var characterWidth = editor.renderer.layerConfig.characterWidth; - var editorRect = editor.renderer.scroller.getBoundingClientRect(); - var offsets = { - x: { - left: x - editorRect.left, - right: editorRect.right - x - }, - y: { - top: y - editorRect.top, - bottom: editorRect.bottom - y - } - }; - var nearestXOffset = Math.min(offsets.x.left, offsets.x.right); - var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom); - var scrollCursor = {row: cursor.row, column: cursor.column}; - if (nearestXOffset / characterWidth <= 2) { - scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2); - } - if (nearestYOffset / lineHeight <= 1) { - scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1); - } - var vScroll = cursor.row != scrollCursor.row; - var hScroll = cursor.column != scrollCursor.column; - var vMovement = !prevCursor || cursor.row != prevCursor.row; - if (vScroll || (hScroll && !vMovement)) { - if (!autoScrollStartTime) - autoScrollStartTime = now; - else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY) - editor.renderer.scrollCursorIntoView(scrollCursor); - } else { - autoScrollStartTime = null; - } - } - - function onDragInterval() { - var prevCursor = dragCursor; - dragCursor = editor.renderer.screenToTextCoordinates(x, y); - scrollCursorIntoView(dragCursor, prevCursor); - autoScroll(dragCursor, prevCursor); - } - - function addDragMarker() { - range = editor.selection.toOrientedRange(); - dragSelectionMarker = editor.session.addMarker(range, "ace_selection", editor.getSelectionStyle()); - editor.clearSelection(); - if (editor.isFocused()) - editor.renderer.$cursorLayer.setBlinking(false); - clearInterval(timerId); - onDragInterval(); - timerId = setInterval(onDragInterval, 20); - counter = 0; - event.addListener(document, "mousemove", onMouseMove); - } - - function clearDragMarker() { - clearInterval(timerId); - editor.session.removeMarker(dragSelectionMarker); - dragSelectionMarker = null; - editor.$blockScrolling += 1; - editor.selection.fromOrientedRange(range); - editor.$blockScrolling -= 1; - if (editor.isFocused() && !isInternal) - editor.renderer.$cursorLayer.setBlinking(!editor.getReadOnly()); - range = null; - dragCursor = null; - counter = 0; - autoScrollStartTime = null; - cursorMovedTime = null; - event.removeListener(document, "mousemove", onMouseMove); - } - var onMouseMoveTimer = null; - function onMouseMove() { - if (onMouseMoveTimer == null) { - onMouseMoveTimer = setTimeout(function() { - if (onMouseMoveTimer != null && dragSelectionMarker) - clearDragMarker(); - }, 20); - } - } - - function canAccept(dataTransfer) { - var types = dataTransfer.types; - return !types || Array.prototype.some.call(types, function(type) { - return type == 'text/plain' || type == 'Text'; - }); - } - - function getDropEffect(e) { - var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized']; - var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized']; - - var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey; - var effectAllowed = "uninitialized"; - try { - effectAllowed = e.dataTransfer.effectAllowed.toLowerCase(); - } catch (e) {} - var dropEffect = "none"; - - if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0) - dropEffect = "copy"; - else if (moveAllowed.indexOf(effectAllowed) >= 0) - dropEffect = "move"; - else if (copyAllowed.indexOf(effectAllowed) >= 0) - dropEffect = "copy"; - - return dropEffect; - } -} - -(function() { - - this.dragWait = function() { - var interval = Date.now() - this.mousedownEvent.time; - if (interval > this.editor.getDragDelay()) - this.startDrag(); - }; - - this.dragWaitEnd = function() { - var target = this.editor.container; - target.draggable = false; - this.startSelect(this.mousedownEvent.getDocumentPosition()); - this.selectEnd(); - }; - - this.dragReadyEnd = function(e) { - this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()); - this.editor.unsetStyle("ace_dragging"); - this.editor.renderer.setCursorStyle(""); - this.dragWaitEnd(); - }; - - this.startDrag = function(){ - this.cancelDrag = false; - var editor = this.editor; - var target = editor.container; - target.draggable = true; - editor.renderer.$cursorLayer.setBlinking(false); - editor.setStyle("ace_dragging"); - var cursorStyle = useragent.isWin ? "default" : "move"; - editor.renderer.setCursorStyle(cursorStyle); - this.setState("dragReady"); - }; - - this.onMouseDrag = function(e) { - var target = this.editor.container; - if (useragent.isIE && this.state == "dragReady") { - var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); - if (distance > 3) - target.dragDrop(); - } - if (this.state === "dragWait") { - var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); - if (distance > 0) { - target.draggable = false; - this.startSelect(this.mousedownEvent.getDocumentPosition()); - } - } - }; - - this.onMouseDown = function(e) { - if (!this.$dragEnabled) - return; - this.mousedownEvent = e; - var editor = this.editor; - - var inSelection = e.inSelection(); - var button = e.getButton(); - var clickCount = e.domEvent.detail || 1; - if (clickCount === 1 && button === 0 && inSelection) { - if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey())) - return; - this.mousedownEvent.time = Date.now(); - var eventTarget = e.domEvent.target || e.domEvent.srcElement; - if ("unselectable" in eventTarget) - eventTarget.unselectable = "on"; - if (editor.getDragDelay()) { - if (useragent.isWebKit) { - this.cancelDrag = true; - var mouseTarget = editor.container; - mouseTarget.draggable = true; - } - this.setState("dragWait"); - } else { - this.startDrag(); - } - this.captureMouse(e, this.onMouseDrag.bind(this)); - e.defaultPrevented = true; - } - }; - -}).call(DragdropHandler.prototype); - - -function calcDistance(ax, ay, bx, by) { - return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); -} - -exports.DragdropHandler = DragdropHandler; - -}); - -define("ace/lib/net",["require","exports","module","ace/lib/dom"], function(require, exports, module) { -"use strict"; -var dom = require("./dom"); - -exports.get = function (url, callback) { - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, true); - xhr.onreadystatechange = function () { - if (xhr.readyState === 4) { - callback(xhr.responseText); - } - }; - xhr.send(null); -}; - -exports.loadScript = function(path, callback) { - var head = dom.getDocumentHead(); - var s = document.createElement('script'); - - s.src = path; - head.appendChild(s); - - s.onload = s.onreadystatechange = function(_, isAbort) { - if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") { - s = s.onload = s.onreadystatechange = null; - if (!isAbort) - callback(); - } - }; -}; -exports.qualifyURL = function(url) { - var a = document.createElement('a'); - a.href = url; - return a.href; -} - -}); - -define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) { -"use strict"; - -var EventEmitter = {}; -var stopPropagation = function() { this.propagationStopped = true; }; -var preventDefault = function() { this.defaultPrevented = true; }; - -EventEmitter._emit = -EventEmitter._dispatchEvent = function(eventName, e) { - this._eventRegistry || (this._eventRegistry = {}); - this._defaultHandlers || (this._defaultHandlers = {}); - - var listeners = this._eventRegistry[eventName] || []; - var defaultHandler = this._defaultHandlers[eventName]; - if (!listeners.length && !defaultHandler) - return; - - if (typeof e != "object" || !e) - e = {}; - - if (!e.type) - e.type = eventName; - if (!e.stopPropagation) - e.stopPropagation = stopPropagation; - if (!e.preventDefault) - e.preventDefault = preventDefault; - - listeners = listeners.slice(); - for (var i=0; i 1) - base = parts[parts.length - 2]; - var path = options[component + "Path"]; - if (path == null) { - path = options.basePath; - } else if (sep == "/") { - component = sep = ""; - } - if (path && path.slice(-1) != "/") - path += "/"; - return path + component + sep + base + this.get("suffix"); -}; - -exports.setModuleUrl = function(name, subst) { - return options.$moduleUrls[name] = subst; -}; - -exports.$loading = {}; -exports.loadModule = function(moduleName, onLoad) { - var module, moduleType; - if (Array.isArray(moduleName)) { - moduleType = moduleName[0]; - moduleName = moduleName[1]; - } - - try { - module = require(moduleName); - } catch (e) {} - if (module && !exports.$loading[moduleName]) - return onLoad && onLoad(module); - - if (!exports.$loading[moduleName]) - exports.$loading[moduleName] = []; - - exports.$loading[moduleName].push(onLoad); - - if (exports.$loading[moduleName].length > 1) - return; - - var afterLoad = function() { - require([moduleName], function(module) { - exports._emit("load.module", {name: moduleName, module: module}); - var listeners = exports.$loading[moduleName]; - exports.$loading[moduleName] = null; - listeners.forEach(function(onLoad) { - onLoad && onLoad(module); - }); - }); - }; - - if (!exports.get("packaged")) - return afterLoad(); - net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad); -}; -init(true);function init(packaged) { - - options.packaged = packaged || require.packaged || module.packaged || (global.define && define.packaged); - - if (!global.document) - return ""; - - var scriptOptions = {}; - var scriptUrl = ""; - var currentScript = (document.currentScript || document._currentScript ); // native or polyfill - var currentDocument = currentScript && currentScript.ownerDocument || document; - - var scripts = currentDocument.getElementsByTagName("script"); - for (var i=0; i [" + this.end.row + "/" + this.end.column + "]"); - }; - - this.contains = function(row, column) { - return this.compare(row, column) == 0; - }; - this.compareRange = function(range) { - var cmp, - end = range.end, - start = range.start; - - cmp = this.compare(end.row, end.column); - if (cmp == 1) { - cmp = this.compare(start.row, start.column); - if (cmp == 1) { - return 2; - } else if (cmp == 0) { - return 1; - } else { - return 0; - } - } else if (cmp == -1) { - return -2; - } else { - cmp = this.compare(start.row, start.column); - if (cmp == -1) { - return -1; - } else if (cmp == 1) { - return 42; - } else { - return 0; - } - } - }; - this.comparePoint = function(p) { - return this.compare(p.row, p.column); - }; - this.containsRange = function(range) { - return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; - }; - this.intersects = function(range) { - var cmp = this.compareRange(range); - return (cmp == -1 || cmp == 0 || cmp == 1); - }; - this.isEnd = function(row, column) { - return this.end.row == row && this.end.column == column; - }; - this.isStart = function(row, column) { - return this.start.row == row && this.start.column == column; - }; - this.setStart = function(row, column) { - if (typeof row == "object") { - this.start.column = row.column; - this.start.row = row.row; - } else { - this.start.row = row; - this.start.column = column; - } - }; - this.setEnd = function(row, column) { - if (typeof row == "object") { - this.end.column = row.column; - this.end.row = row.row; - } else { - this.end.row = row; - this.end.column = column; - } - }; - this.inside = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isEnd(row, column) || this.isStart(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.insideStart = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isEnd(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.insideEnd = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isStart(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.compare = function(row, column) { - if (!this.isMultiLine()) { - if (row === this.start.row) { - return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); - }; - } - - if (row < this.start.row) - return -1; - - if (row > this.end.row) - return 1; - - if (this.start.row === row) - return column >= this.start.column ? 0 : -1; - - if (this.end.row === row) - return column <= this.end.column ? 0 : 1; - - return 0; - }; - this.compareStart = function(row, column) { - if (this.start.row == row && this.start.column == column) { - return -1; - } else { - return this.compare(row, column); - } - }; - this.compareEnd = function(row, column) { - if (this.end.row == row && this.end.column == column) { - return 1; - } else { - return this.compare(row, column); - } - }; - this.compareInside = function(row, column) { - if (this.end.row == row && this.end.column == column) { - return 1; - } else if (this.start.row == row && this.start.column == column) { - return -1; - } else { - return this.compare(row, column); - } - }; - this.clipRows = function(firstRow, lastRow) { - if (this.end.row > lastRow) - var end = {row: lastRow + 1, column: 0}; - else if (this.end.row < firstRow) - var end = {row: firstRow, column: 0}; - - if (this.start.row > lastRow) - var start = {row: lastRow + 1, column: 0}; - else if (this.start.row < firstRow) - var start = {row: firstRow, column: 0}; - - return Range.fromPoints(start || this.start, end || this.end); - }; - this.extend = function(row, column) { - var cmp = this.compare(row, column); - - if (cmp == 0) - return this; - else if (cmp == -1) - var start = {row: row, column: column}; - else - var end = {row: row, column: column}; - - return Range.fromPoints(start || this.start, end || this.end); - }; - - this.isEmpty = function() { - return (this.start.row === this.end.row && this.start.column === this.end.column); - }; - this.isMultiLine = function() { - return (this.start.row !== this.end.row); - }; - this.clone = function() { - return Range.fromPoints(this.start, this.end); - }; - this.collapseRows = function() { - if (this.end.column == 0) - return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) - else - return new Range(this.start.row, 0, this.end.row, 0) - }; - this.toScreenRange = function(session) { - var screenPosStart = session.documentToScreenPosition(this.start); - var screenPosEnd = session.documentToScreenPosition(this.end); - - return new Range( - screenPosStart.row, screenPosStart.column, - screenPosEnd.row, screenPosEnd.column - ); - }; - this.moveBy = function(row, column) { - this.start.row += row; - this.start.column += column; - this.end.row += row; - this.end.column += column; - }; - -}).call(Range.prototype); -Range.fromPoints = function(start, end) { - return new Range(start.row, start.column, end.row, end.column); -}; -Range.comparePoints = comparePoints; - -Range.comparePoints = function(p1, p2) { - return p1.row - p2.row || p1.column - p2.column; -}; - - -exports.Range = Range; -}); - -define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("./lib/oop"); -var lang = require("./lib/lang"); -var EventEmitter = require("./lib/event_emitter").EventEmitter; -var Range = require("./range").Range; -var Selection = function(session) { - this.session = session; - this.doc = session.getDocument(); - - this.clearSelection(); - this.lead = this.selectionLead = this.doc.createAnchor(0, 0); - this.anchor = this.selectionAnchor = this.doc.createAnchor(0, 0); - - var self = this; - this.lead.on("change", function(e) { - self._emit("changeCursor"); - if (!self.$isEmpty) - self._emit("changeSelection"); - if (!self.$keepDesiredColumnOnChange && e.old.column != e.value.column) - self.$desiredColumn = null; - }); - - this.selectionAnchor.on("change", function() { - if (!self.$isEmpty) - self._emit("changeSelection"); - }); -}; - -(function() { - - oop.implement(this, EventEmitter); - this.isEmpty = function() { - return (this.$isEmpty || ( - this.anchor.row == this.lead.row && - this.anchor.column == this.lead.column - )); - }; - this.isMultiLine = function() { - if (this.isEmpty()) { - return false; - } - - return this.getRange().isMultiLine(); - }; - this.getCursor = function() { - return this.lead.getPosition(); - }; - this.setSelectionAnchor = function(row, column) { - this.anchor.setPosition(row, column); - - if (this.$isEmpty) { - this.$isEmpty = false; - this._emit("changeSelection"); - } - }; - this.getSelectionAnchor = function() { - if (this.$isEmpty) - return this.getSelectionLead(); - else - return this.anchor.getPosition(); - }; - this.getSelectionLead = function() { - return this.lead.getPosition(); - }; - this.shiftSelection = function(columns) { - if (this.$isEmpty) { - this.moveCursorTo(this.lead.row, this.lead.column + columns); - return; - } - - var anchor = this.getSelectionAnchor(); - var lead = this.getSelectionLead(); - - var isBackwards = this.isBackwards(); - - if (!isBackwards || anchor.column !== 0) - this.setSelectionAnchor(anchor.row, anchor.column + columns); - - if (isBackwards || lead.column !== 0) { - this.$moveSelection(function() { - this.moveCursorTo(lead.row, lead.column + columns); - }); - } - }; - this.isBackwards = function() { - var anchor = this.anchor; - var lead = this.lead; - return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column)); - }; - this.getRange = function() { - var anchor = this.anchor; - var lead = this.lead; - - if (this.isEmpty()) - return Range.fromPoints(lead, lead); - - if (this.isBackwards()) { - return Range.fromPoints(lead, anchor); - } - else { - return Range.fromPoints(anchor, lead); - } - }; - this.clearSelection = function() { - if (!this.$isEmpty) { - this.$isEmpty = true; - this._emit("changeSelection"); - } - }; - this.selectAll = function() { - var lastRow = this.doc.getLength() - 1; - this.setSelectionAnchor(0, 0); - this.moveCursorTo(lastRow, this.doc.getLine(lastRow).length); - }; - this.setRange = - this.setSelectionRange = function(range, reverse) { - if (reverse) { - this.setSelectionAnchor(range.end.row, range.end.column); - this.selectTo(range.start.row, range.start.column); - } else { - this.setSelectionAnchor(range.start.row, range.start.column); - this.selectTo(range.end.row, range.end.column); - } - if (this.getRange().isEmpty()) - this.$isEmpty = true; - this.$desiredColumn = null; - }; - - this.$moveSelection = function(mover) { - var lead = this.lead; - if (this.$isEmpty) - this.setSelectionAnchor(lead.row, lead.column); - - mover.call(this); - }; - this.selectTo = function(row, column) { - this.$moveSelection(function() { - this.moveCursorTo(row, column); - }); - }; - this.selectToPosition = function(pos) { - this.$moveSelection(function() { - this.moveCursorToPosition(pos); - }); - }; - this.moveTo = function(row, column) { - this.clearSelection(); - this.moveCursorTo(row, column); - }; - this.moveToPosition = function(pos) { - this.clearSelection(); - this.moveCursorToPosition(pos); - }; - this.selectUp = function() { - this.$moveSelection(this.moveCursorUp); - }; - this.selectDown = function() { - this.$moveSelection(this.moveCursorDown); - }; - this.selectRight = function() { - this.$moveSelection(this.moveCursorRight); - }; - this.selectLeft = function() { - this.$moveSelection(this.moveCursorLeft); - }; - this.selectLineStart = function() { - this.$moveSelection(this.moveCursorLineStart); - }; - this.selectLineEnd = function() { - this.$moveSelection(this.moveCursorLineEnd); - }; - this.selectFileEnd = function() { - this.$moveSelection(this.moveCursorFileEnd); - }; - this.selectFileStart = function() { - this.$moveSelection(this.moveCursorFileStart); - }; - this.selectWordRight = function() { - this.$moveSelection(this.moveCursorWordRight); - }; - this.selectWordLeft = function() { - this.$moveSelection(this.moveCursorWordLeft); - }; - this.getWordRange = function(row, column) { - if (typeof column == "undefined") { - var cursor = row || this.lead; - row = cursor.row; - column = cursor.column; - } - return this.session.getWordRange(row, column); - }; - this.selectWord = function() { - this.setSelectionRange(this.getWordRange()); - }; - this.selectAWord = function() { - var cursor = this.getCursor(); - var range = this.session.getAWordRange(cursor.row, cursor.column); - this.setSelectionRange(range); - }; - - this.getLineRange = function(row, excludeLastChar) { - var rowStart = typeof row == "number" ? row : this.lead.row; - var rowEnd; - - var foldLine = this.session.getFoldLine(rowStart); - if (foldLine) { - rowStart = foldLine.start.row; - rowEnd = foldLine.end.row; - } else { - rowEnd = rowStart; - } - if (excludeLastChar === true) - return new Range(rowStart, 0, rowEnd, this.session.getLine(rowEnd).length); - else - return new Range(rowStart, 0, rowEnd + 1, 0); - }; - this.selectLine = function() { - this.setSelectionRange(this.getLineRange()); - }; - this.moveCursorUp = function() { - this.moveCursorBy(-1, 0); - }; - this.moveCursorDown = function() { - this.moveCursorBy(1, 0); - }; - this.moveCursorLeft = function() { - var cursor = this.lead.getPosition(), - fold; - - if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) { - this.moveCursorTo(fold.start.row, fold.start.column); - } else if (cursor.column === 0) { - if (cursor.row > 0) { - this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length); - } - } - else { - var tabSize = this.session.getTabSize(); - if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column-tabSize, cursor.column).split(" ").length-1 == tabSize) - this.moveCursorBy(0, -tabSize); - else - this.moveCursorBy(0, -1); - } - }; - this.moveCursorRight = function() { - var cursor = this.lead.getPosition(), - fold; - if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) { - this.moveCursorTo(fold.end.row, fold.end.column); - } - else if (this.lead.column == this.doc.getLine(this.lead.row).length) { - if (this.lead.row < this.doc.getLength() - 1) { - this.moveCursorTo(this.lead.row + 1, 0); - } - } - else { - var tabSize = this.session.getTabSize(); - var cursor = this.lead; - if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column, cursor.column+tabSize).split(" ").length-1 == tabSize) - this.moveCursorBy(0, tabSize); - else - this.moveCursorBy(0, 1); - } - }; - this.moveCursorLineStart = function() { - var row = this.lead.row; - var column = this.lead.column; - var screenRow = this.session.documentToScreenRow(row, column); - var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0); - var beforeCursor = this.session.getDisplayLine( - row, null, firstColumnPosition.row, - firstColumnPosition.column - ); - - var leadingSpace = beforeCursor.match(/^\s*/); - if (leadingSpace[0].length != column && !this.session.$useEmacsStyleLineStart) - firstColumnPosition.column += leadingSpace[0].length; - this.moveCursorToPosition(firstColumnPosition); - }; - this.moveCursorLineEnd = function() { - var lead = this.lead; - var lineEnd = this.session.getDocumentLastRowColumnPosition(lead.row, lead.column); - if (this.lead.column == lineEnd.column) { - var line = this.session.getLine(lineEnd.row); - if (lineEnd.column == line.length) { - var textEnd = line.search(/\s+$/); - if (textEnd > 0) - lineEnd.column = textEnd; - } - } - - this.moveCursorTo(lineEnd.row, lineEnd.column); - }; - this.moveCursorFileEnd = function() { - var row = this.doc.getLength() - 1; - var column = this.doc.getLine(row).length; - this.moveCursorTo(row, column); - }; - this.moveCursorFileStart = function() { - this.moveCursorTo(0, 0); - }; - this.moveCursorLongWordRight = function() { - var row = this.lead.row; - var column = this.lead.column; - var line = this.doc.getLine(row); - var rightOfCursor = line.substring(column); - - var match; - this.session.nonTokenRe.lastIndex = 0; - this.session.tokenRe.lastIndex = 0; - var fold = this.session.getFoldAt(row, column, 1); - if (fold) { - this.moveCursorTo(fold.end.row, fold.end.column); - return; - } - if (match = this.session.nonTokenRe.exec(rightOfCursor)) { - column += this.session.nonTokenRe.lastIndex; - this.session.nonTokenRe.lastIndex = 0; - rightOfCursor = line.substring(column); - } - if (column >= line.length) { - this.moveCursorTo(row, line.length); - this.moveCursorRight(); - if (row < this.doc.getLength() - 1) - this.moveCursorWordRight(); - return; - } - if (match = this.session.tokenRe.exec(rightOfCursor)) { - column += this.session.tokenRe.lastIndex; - this.session.tokenRe.lastIndex = 0; - } - - this.moveCursorTo(row, column); - }; - this.moveCursorLongWordLeft = function() { - var row = this.lead.row; - var column = this.lead.column; - var fold; - if (fold = this.session.getFoldAt(row, column, -1)) { - this.moveCursorTo(fold.start.row, fold.start.column); - return; - } - - var str = this.session.getFoldStringAt(row, column, -1); - if (str == null) { - str = this.doc.getLine(row).substring(0, column); - } - - var leftOfCursor = lang.stringReverse(str); - var match; - this.session.nonTokenRe.lastIndex = 0; - this.session.tokenRe.lastIndex = 0; - if (match = this.session.nonTokenRe.exec(leftOfCursor)) { - column -= this.session.nonTokenRe.lastIndex; - leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex); - this.session.nonTokenRe.lastIndex = 0; - } - if (column <= 0) { - this.moveCursorTo(row, 0); - this.moveCursorLeft(); - if (row > 0) - this.moveCursorWordLeft(); - return; - } - if (match = this.session.tokenRe.exec(leftOfCursor)) { - column -= this.session.tokenRe.lastIndex; - this.session.tokenRe.lastIndex = 0; - } - - this.moveCursorTo(row, column); - }; - - this.$shortWordEndIndex = function(rightOfCursor) { - var match, index = 0, ch; - var whitespaceRe = /\s/; - var tokenRe = this.session.tokenRe; - - tokenRe.lastIndex = 0; - if (match = this.session.tokenRe.exec(rightOfCursor)) { - index = this.session.tokenRe.lastIndex; - } else { - while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch)) - index ++; - - if (index < 1) { - tokenRe.lastIndex = 0; - while ((ch = rightOfCursor[index]) && !tokenRe.test(ch)) { - tokenRe.lastIndex = 0; - index ++; - if (whitespaceRe.test(ch)) { - if (index > 2) { - index--; - break; - } else { - while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch)) - index ++; - if (index > 2) - break; - } - } - } - } - } - tokenRe.lastIndex = 0; - - return index; - }; - - this.moveCursorShortWordRight = function() { - var row = this.lead.row; - var column = this.lead.column; - var line = this.doc.getLine(row); - var rightOfCursor = line.substring(column); - - var fold = this.session.getFoldAt(row, column, 1); - if (fold) - return this.moveCursorTo(fold.end.row, fold.end.column); - - if (column == line.length) { - var l = this.doc.getLength(); - do { - row++; - rightOfCursor = this.doc.getLine(row); - } while (row < l && /^\s*$/.test(rightOfCursor)); - - if (!/^\s+/.test(rightOfCursor)) - rightOfCursor = ""; - column = 0; - } - - var index = this.$shortWordEndIndex(rightOfCursor); - - this.moveCursorTo(row, column + index); - }; - - this.moveCursorShortWordLeft = function() { - var row = this.lead.row; - var column = this.lead.column; - - var fold; - if (fold = this.session.getFoldAt(row, column, -1)) - return this.moveCursorTo(fold.start.row, fold.start.column); - - var line = this.session.getLine(row).substring(0, column); - if (column === 0) { - do { - row--; - line = this.doc.getLine(row); - } while (row > 0 && /^\s*$/.test(line)); - - column = line.length; - if (!/\s+$/.test(line)) - line = ""; - } - - var leftOfCursor = lang.stringReverse(line); - var index = this.$shortWordEndIndex(leftOfCursor); - - return this.moveCursorTo(row, column - index); - }; - - this.moveCursorWordRight = function() { - if (this.session.$selectLongWords) - this.moveCursorLongWordRight(); - else - this.moveCursorShortWordRight(); - }; - - this.moveCursorWordLeft = function() { - if (this.session.$selectLongWords) - this.moveCursorLongWordLeft(); - else - this.moveCursorShortWordLeft(); - }; - this.moveCursorBy = function(rows, chars) { - var screenPos = this.session.documentToScreenPosition( - this.lead.row, - this.lead.column - ); - - if (chars === 0) { - if (this.$desiredColumn) - screenPos.column = this.$desiredColumn; - else - this.$desiredColumn = screenPos.column; - } - - var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column); - - if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) { - if (this.session.lineWidgets && this.session.lineWidgets[docPos.row]) - docPos.row++; - } - this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0); - }; - this.moveCursorToPosition = function(position) { - this.moveCursorTo(position.row, position.column); - }; - this.moveCursorTo = function(row, column, keepDesiredColumn) { - var fold = this.session.getFoldAt(row, column, 1); - if (fold) { - row = fold.start.row; - column = fold.start.column; - } - - this.$keepDesiredColumnOnChange = true; - this.lead.setPosition(row, column); - this.$keepDesiredColumnOnChange = false; - - if (!keepDesiredColumn) - this.$desiredColumn = null; - }; - this.moveCursorToScreen = function(row, column, keepDesiredColumn) { - var pos = this.session.screenToDocumentPosition(row, column); - this.moveCursorTo(pos.row, pos.column, keepDesiredColumn); - }; - this.detach = function() { - this.lead.detach(); - this.anchor.detach(); - this.session = this.doc = null; - }; - - this.fromOrientedRange = function(range) { - this.setSelectionRange(range, range.cursor == range.start); - this.$desiredColumn = range.desiredColumn || this.$desiredColumn; - }; - - this.toOrientedRange = function(range) { - var r = this.getRange(); - if (range) { - range.start.column = r.start.column; - range.start.row = r.start.row; - range.end.column = r.end.column; - range.end.row = r.end.row; - } else { - range = r; - } - - range.cursor = this.isBackwards() ? range.start : range.end; - range.desiredColumn = this.$desiredColumn; - return range; - }; - this.getRangeOfMovements = function(func) { - var start = this.getCursor(); - try { - func.call(null, this); - var end = this.getCursor(); - return Range.fromPoints(start,end); - } catch(e) { - return Range.fromPoints(start,start); - } finally { - this.moveCursorToPosition(start); - } - }; - - this.toJSON = function() { - if (this.rangeCount) { - var data = this.ranges.map(function(r) { - var r1 = r.clone(); - r1.isBackwards = r.cursor == r.start; - return r1; - }); - } else { - var data = this.getRange(); - data.isBackwards = this.isBackwards(); - } - return data; - }; - - this.fromJSON = function(data) { - if (data.start == undefined) { - if (this.rangeList) { - this.toSingleRange(data[0]); - for (var i = data.length; i--; ) { - var r = Range.fromPoints(data[i].start, data[i].end); - if (data.isBackwards) - r.cursor = r.start; - this.addRange(r, true); - } - return; - } else - data = data[0]; - } - if (this.rangeList) - this.toSingleRange(data); - this.setSelectionRange(data, data.isBackwards); - }; - - this.isEqual = function(data) { - if ((data.length || this.rangeCount) && data.length != this.rangeCount) - return false; - if (!data.length || !this.ranges) - return this.getRange().isEqual(data); - - for (var i = this.ranges.length; i--; ) { - if (!this.ranges[i].isEqual(data[i])) - return false; - } - return true; - }; - -}).call(Selection.prototype); - -exports.Selection = Selection; -}); - -define("ace/tokenizer",["require","exports","module","ace/config"], function(require, exports, module) { -"use strict"; - -var config = require("./config"); -var MAX_TOKEN_COUNT = 2000; -var Tokenizer = function(rules) { - this.states = rules; - - this.regExps = {}; - this.matchMappings = {}; - for (var key in this.states) { - var state = this.states[key]; - var ruleRegExps = []; - var matchTotal = 0; - var mapping = this.matchMappings[key] = {defaultToken: "text"}; - var flag = "g"; - - var splitterRurles = []; - for (var i = 0; i < state.length; i++) { - var rule = state[i]; - if (rule.defaultToken) - mapping.defaultToken = rule.defaultToken; - if (rule.caseInsensitive) - flag = "gi"; - if (rule.regex == null) - continue; - - if (rule.regex instanceof RegExp) - rule.regex = rule.regex.toString().slice(1, -1); - var adjustedregex = rule.regex; - var matchcount = new RegExp("(?:(" + adjustedregex + ")|(.))").exec("a").length - 2; - if (Array.isArray(rule.token)) { - if (rule.token.length == 1 || matchcount == 1) { - rule.token = rule.token[0]; - } else if (matchcount - 1 != rule.token.length) { - this.reportError("number of classes and regexp groups doesn't match", { - rule: rule, - groupCount: matchcount - 1 - }); - rule.token = rule.token[0]; - } else { - rule.tokenArray = rule.token; - rule.token = null; - rule.onMatch = this.$arrayTokens; - } - } else if (typeof rule.token == "function" && !rule.onMatch) { - if (matchcount > 1) - rule.onMatch = this.$applyToken; - else - rule.onMatch = rule.token; - } - - if (matchcount > 1) { - if (/\\\d/.test(rule.regex)) { - adjustedregex = rule.regex.replace(/\\([0-9]+)/g, function(match, digit) { - return "\\" + (parseInt(digit, 10) + matchTotal + 1); - }); - } else { - matchcount = 1; - adjustedregex = this.removeCapturingGroups(rule.regex); - } - if (!rule.splitRegex && typeof rule.token != "string") - splitterRurles.push(rule); // flag will be known only at the very end - } - - mapping[matchTotal] = i; - matchTotal += matchcount; - - ruleRegExps.push(adjustedregex); - if (!rule.onMatch) - rule.onMatch = null; - } - - if (!ruleRegExps.length) { - mapping[0] = 0; - ruleRegExps.push("$"); - } - - splitterRurles.forEach(function(rule) { - rule.splitRegex = this.createSplitterRegexp(rule.regex, flag); - }, this); - - this.regExps[key] = new RegExp("(" + ruleRegExps.join(")|(") + ")|($)", flag); - } -}; - -(function() { - this.$setMaxTokenCount = function(m) { - MAX_TOKEN_COUNT = m | 0; - }; - - this.$applyToken = function(str) { - var values = this.splitRegex.exec(str).slice(1); - var types = this.token.apply(this, values); - if (typeof types === "string") - return [{type: types, value: str}]; - - var tokens = []; - for (var i = 0, l = types.length; i < l; i++) { - if (values[i]) - tokens[tokens.length] = { - type: types[i], - value: values[i] - }; - } - return tokens; - }, - - this.$arrayTokens = function(str) { - if (!str) - return []; - var values = this.splitRegex.exec(str); - if (!values) - return "text"; - var tokens = []; - var types = this.tokenArray; - for (var i = 0, l = types.length; i < l; i++) { - if (values[i + 1]) - tokens[tokens.length] = { - type: types[i], - value: values[i + 1] - }; - } - return tokens; - }; - - this.removeCapturingGroups = function(src) { - var r = src.replace( - /\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g, - function(x, y) {return y ? "(?:" : x;} - ); - return r; - }; - - this.createSplitterRegexp = function(src, flag) { - if (src.indexOf("(?=") != -1) { - var stack = 0; - var inChClass = false; - var lastCapture = {}; - src.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g, function( - m, esc, parenOpen, parenClose, square, index - ) { - if (inChClass) { - inChClass = square != "]"; - } else if (square) { - inChClass = true; - } else if (parenClose) { - if (stack == lastCapture.stack) { - lastCapture.end = index+1; - lastCapture.stack = -1; - } - stack--; - } else if (parenOpen) { - stack++; - if (parenOpen.length != 1) { - lastCapture.stack = stack - lastCapture.start = index; - } - } - return m; - }); - - if (lastCapture.end != null && /^\)*$/.test(src.substr(lastCapture.end))) - src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end); - } - return new RegExp(src, (flag||"").replace("g", "")); - }; - this.getLineTokens = function(line, startState) { - if (startState && typeof startState != "string") { - var stack = startState.slice(0); - startState = stack[0]; - if (startState === "#tmp") { - stack.shift() - startState = stack.shift() - } - } else - var stack = []; - - var currentState = startState || "start"; - var state = this.states[currentState]; - if (!state) { - currentState = "start"; - state = this.states[currentState]; - } - var mapping = this.matchMappings[currentState]; - var re = this.regExps[currentState]; - re.lastIndex = 0; - - var match, tokens = []; - var lastIndex = 0; - var matchAttempts = 0; - - var token = {type: null, value: ""}; - - while (match = re.exec(line)) { - var type = mapping.defaultToken; - var rule = null; - var value = match[0]; - var index = re.lastIndex; - - if (index - value.length > lastIndex) { - var skipped = line.substring(lastIndex, index - value.length); - if (token.type == type) { - token.value += skipped; - } else { - if (token.type) - tokens.push(token); - token = {type: type, value: skipped}; - } - } - - for (var i = 0; i < match.length-2; i++) { - if (match[i + 1] === undefined) - continue; - - rule = state[mapping[i]]; - - if (rule.onMatch) - type = rule.onMatch(value, currentState, stack); - else - type = rule.token; - - if (rule.next) { - if (typeof rule.next == "string") { - currentState = rule.next; - } else { - currentState = rule.next(currentState, stack); - } - - state = this.states[currentState]; - if (!state) { - this.reportError("state doesn't exist", currentState); - currentState = "start"; - state = this.states[currentState]; - } - mapping = this.matchMappings[currentState]; - lastIndex = index; - re = this.regExps[currentState]; - re.lastIndex = index; - } - break; - } - - if (value) { - if (typeof type === "string") { - if ((!rule || rule.merge !== false) && token.type === type) { - token.value += value; - } else { - if (token.type) - tokens.push(token); - token = {type: type, value: value}; - } - } else if (type) { - if (token.type) - tokens.push(token); - token = {type: null, value: ""}; - for (var i = 0; i < type.length; i++) - tokens.push(type[i]); - } - } - - if (lastIndex == line.length) - break; - - lastIndex = index; - - if (matchAttempts++ > MAX_TOKEN_COUNT) { - if (matchAttempts > 2 * line.length) { - this.reportError("infinite loop with in ace tokenizer", { - startState: startState, - line: line - }); - } - while (lastIndex < line.length) { - if (token.type) - tokens.push(token); - token = { - value: line.substring(lastIndex, lastIndex += 2000), - type: "overflow" - }; - } - currentState = "start"; - stack = []; - break; - } - } - - if (token.type) - tokens.push(token); - - if (stack.length > 1) { - if (stack[0] !== currentState) - stack.unshift("#tmp", currentState); - } - return { - tokens : tokens, - state : stack.length ? stack : currentState - }; - }; - - this.reportError = config.reportError; - -}).call(Tokenizer.prototype); - -exports.Tokenizer = Tokenizer; -}); - -define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var lang = require("../lib/lang"); - -var TextHighlightRules = function() { - - this.$rules = { - "start" : [{ - token : "empty_line", - regex : '^$' - }, { - defaultToken : "text" - }] - }; -}; - -(function() { - - this.addRules = function(rules, prefix) { - if (!prefix) { - for (var key in rules) - this.$rules[key] = rules[key]; - return; - } - for (var key in rules) { - var state = rules[key]; - for (var i = 0; i < state.length; i++) { - var rule = state[i]; - if (rule.next || rule.onMatch) { - if (typeof rule.next != "string") { - if (rule.nextState && rule.nextState.indexOf(prefix) !== 0) - rule.nextState = prefix + rule.nextState; - } else { - if (rule.next.indexOf(prefix) !== 0) - rule.next = prefix + rule.next; - } - } - } - this.$rules[prefix + key] = state; - } - }; - - this.getRules = function() { - return this.$rules; - }; - - this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) { - var embedRules = typeof HighlightRules == "function" - ? new HighlightRules().getRules() - : HighlightRules; - if (states) { - for (var i = 0; i < states.length; i++) - states[i] = prefix + states[i]; - } else { - states = []; - for (var key in embedRules) - states.push(prefix + key); - } - - this.addRules(embedRules, prefix); - - if (escapeRules) { - var addRules = Array.prototype[append ? "push" : "unshift"]; - for (var i = 0; i < states.length; i++) - addRules.apply(this.$rules[states[i]], lang.deepCopy(escapeRules)); - } - - if (!this.$embeds) - this.$embeds = []; - this.$embeds.push(prefix); - }; - - this.getEmbeds = function() { - return this.$embeds; - }; - - var pushState = function(currentState, stack) { - if (currentState != "start" || stack.length) - stack.unshift(this.nextState, currentState); - return this.nextState; - }; - var popState = function(currentState, stack) { - stack.shift(); - return stack.shift() || "start"; - }; - - this.normalizeRules = function() { - var id = 0; - var rules = this.$rules; - function processState(key) { - var state = rules[key]; - state.processed = true; - for (var i = 0; i < state.length; i++) { - var rule = state[i]; - if (!rule.regex && rule.start) { - rule.regex = rule.start; - if (!rule.next) - rule.next = []; - rule.next.push({ - defaultToken: rule.token - }, { - token: rule.token + ".end", - regex: rule.end || rule.start, - next: "pop" - }); - rule.token = rule.token + ".start"; - rule.push = true; - } - var next = rule.next || rule.push; - if (next && Array.isArray(next)) { - var stateName = rule.stateName; - if (!stateName) { - stateName = rule.token; - if (typeof stateName != "string") - stateName = stateName[0] || ""; - if (rules[stateName]) - stateName += id++; - } - rules[stateName] = next; - rule.next = stateName; - processState(stateName); - } else if (next == "pop") { - rule.next = popState; - } - - if (rule.push) { - rule.nextState = rule.next || rule.push; - rule.next = pushState; - delete rule.push; - } - - if (rule.rules) { - for (var r in rule.rules) { - if (rules[r]) { - if (rules[r].push) - rules[r].push.apply(rules[r], rule.rules[r]); - } else { - rules[r] = rule.rules[r]; - } - } - } - if (rule.include || typeof rule == "string") { - var includeName = rule.include || rule; - var toInsert = rules[includeName]; - } else if (Array.isArray(rule)) - toInsert = rule; - - if (toInsert) { - var args = [i, 1].concat(toInsert); - if (rule.noEscape) - args = args.filter(function(x) {return !x.next;}); - state.splice.apply(state, args); - i--; - toInsert = null; - } - - if (rule.keywordMap) { - rule.token = this.createKeywordMapper( - rule.keywordMap, rule.defaultToken || "text", rule.caseInsensitive - ); - delete rule.defaultToken; - } - } - } - Object.keys(rules).forEach(processState, this); - }; - - this.createKeywordMapper = function(map, defaultToken, ignoreCase, splitChar) { - var keywords = Object.create(null); - Object.keys(map).forEach(function(className) { - var a = map[className]; - if (ignoreCase) - a = a.toLowerCase(); - var list = a.split(splitChar || "|"); - for (var i = list.length; i--; ) - keywords[list[i]] = className; - }); - if (Object.getPrototypeOf(keywords)) { - keywords.__proto__ = null; - } - this.$keywordList = Object.keys(keywords); - map = null; - return ignoreCase - ? function(value) {return keywords[value.toLowerCase()] || defaultToken } - : function(value) {return keywords[value] || defaultToken }; - }; - - this.getKeywords = function() { - return this.$keywords; - }; - -}).call(TextHighlightRules.prototype); - -exports.TextHighlightRules = TextHighlightRules; -}); - -define("ace/mode/behaviour",["require","exports","module"], function(require, exports, module) { -"use strict"; - -var Behaviour = function() { - this.$behaviours = {}; -}; - -(function () { - - this.add = function (name, action, callback) { - switch (undefined) { - case this.$behaviours: - this.$behaviours = {}; - case this.$behaviours[name]: - this.$behaviours[name] = {}; - } - this.$behaviours[name][action] = callback; - } - - this.addBehaviours = function (behaviours) { - for (var key in behaviours) { - for (var action in behaviours[key]) { - this.add(key, action, behaviours[key][action]); - } - } - } - - this.remove = function (name) { - if (this.$behaviours && this.$behaviours[name]) { - delete this.$behaviours[name]; - } - } - - this.inherit = function (mode, filter) { - if (typeof mode === "function") { - var behaviours = new mode().getBehaviours(filter); - } else { - var behaviours = mode.getBehaviours(filter); - } - this.addBehaviours(behaviours); - } - - this.getBehaviours = function (filter) { - if (!filter) { - return this.$behaviours; - } else { - var ret = {} - for (var i = 0; i < filter.length; i++) { - if (this.$behaviours[filter[i]]) { - ret[filter[i]] = this.$behaviours[filter[i]]; - } - } - return ret; - } - } - -}).call(Behaviour.prototype); - -exports.Behaviour = Behaviour; -}); - -define("ace/unicode",["require","exports","module"], function(require, exports, module) { -"use strict"; -exports.packages = {}; - -addUnicodePackage({ - L: "0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC", - Ll: "0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A", - Lu: "0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A", - Lt: "01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC", - Lm: "02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F", - Lo: "01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC", - M: "0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26", - Mn: "0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26", - Mc: "0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC", - Me: "0488048906DE20DD-20E020E2-20E4A670-A672", - N: "0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19", - Nd: "0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19", - Nl: "16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF", - No: "00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835", - P: "0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65", - Pd: "002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D", - Ps: "0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62", - Pe: "0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63", - Pi: "00AB2018201B201C201F20392E022E042E092E0C2E1C2E20", - Pf: "00BB2019201D203A2E032E052E0A2E0D2E1D2E21", - Pc: "005F203F20402054FE33FE34FE4D-FE4FFF3F", - Po: "0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65", - S: "0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD", - Sm: "002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC", - Sc: "002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6", - Sk: "005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3", - So: "00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD", - Z: "002000A01680180E2000-200A20282029202F205F3000", - Zs: "002000A01680180E2000-200A202F205F3000", - Zl: "2028", - Zp: "2029", - C: "0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF", - Cc: "0000-001F007F-009F", - Cf: "00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB", - Co: "E000-F8FF", - Cs: "D800-DFFF", - Cn: "03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF" -}); - -function addUnicodePackage (pack) { - var codePoint = /\w{4}/g; - for (var name in pack) - exports.packages[name] = pack[name].replace(codePoint, "\\u$&"); -}; - -}); - -define("ace/token_iterator",["require","exports","module"], function(require, exports, module) { -"use strict"; -var TokenIterator = function(session, initialRow, initialColumn) { - this.$session = session; - this.$row = initialRow; - this.$rowTokens = session.getTokens(initialRow); - - var token = session.getTokenAt(initialRow, initialColumn); - this.$tokenIndex = token ? token.index : -1; -}; - -(function() { - this.stepBackward = function() { - this.$tokenIndex -= 1; - - while (this.$tokenIndex < 0) { - this.$row -= 1; - if (this.$row < 0) { - this.$row = 0; - return null; - } - - this.$rowTokens = this.$session.getTokens(this.$row); - this.$tokenIndex = this.$rowTokens.length - 1; - } - - return this.$rowTokens[this.$tokenIndex]; - }; - this.stepForward = function() { - this.$tokenIndex += 1; - var rowCount; - while (this.$tokenIndex >= this.$rowTokens.length) { - this.$row += 1; - if (!rowCount) - rowCount = this.$session.getLength(); - if (this.$row >= rowCount) { - this.$row = rowCount - 1; - return null; - } - - this.$rowTokens = this.$session.getTokens(this.$row); - this.$tokenIndex = 0; - } - - return this.$rowTokens[this.$tokenIndex]; - }; - this.getCurrentToken = function () { - return this.$rowTokens[this.$tokenIndex]; - }; - this.getCurrentTokenRow = function () { - return this.$row; - }; - this.getCurrentTokenColumn = function() { - var rowTokens = this.$rowTokens; - var tokenIndex = this.$tokenIndex; - var column = rowTokens[tokenIndex].start; - if (column !== undefined) - return column; - - column = 0; - while (tokenIndex > 0) { - tokenIndex -= 1; - column += rowTokens[tokenIndex].value.length; - } - - return column; - }; - -}).call(TokenIterator.prototype); - -exports.TokenIterator = TokenIterator; -}); - -define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"], function(require, exports, module) { -"use strict"; - -var Tokenizer = require("../tokenizer").Tokenizer; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var Behaviour = require("./behaviour").Behaviour; -var unicode = require("../unicode"); -var lang = require("../lib/lang"); -var TokenIterator = require("../token_iterator").TokenIterator; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = TextHighlightRules; - this.$behaviour = new Behaviour(); -}; - -(function() { - - this.tokenRe = new RegExp("^[" - + unicode.packages.L - + unicode.packages.Mn + unicode.packages.Mc - + unicode.packages.Nd - + unicode.packages.Pc + "\\$_]+", "g" - ); - - this.nonTokenRe = new RegExp("^(?:[^" - + unicode.packages.L - + unicode.packages.Mn + unicode.packages.Mc - + unicode.packages.Nd - + unicode.packages.Pc + "\\$_]|\\s])+", "g" - ); - - this.getTokenizer = function() { - if (!this.$tokenizer) { - this.$highlightRules = this.$highlightRules || new this.HighlightRules(); - this.$tokenizer = new Tokenizer(this.$highlightRules.getRules()); - } - return this.$tokenizer; - }; - - this.lineCommentStart = ""; - this.blockComment = ""; - - this.toggleCommentLines = function(state, session, startRow, endRow) { - var doc = session.doc; - - var ignoreBlankLines = true; - var shouldRemove = true; - var minIndent = Infinity; - var tabSize = session.getTabSize(); - var insertAtTabStop = false; - - if (!this.lineCommentStart) { - if (!this.blockComment) - return false; - var lineCommentStart = this.blockComment.start; - var lineCommentEnd = this.blockComment.end; - var regexpStart = new RegExp("^(\\s*)(?:" + lang.escapeRegExp(lineCommentStart) + ")"); - var regexpEnd = new RegExp("(?:" + lang.escapeRegExp(lineCommentEnd) + ")\\s*$"); - - var comment = function(line, i) { - if (testRemove(line, i)) - return; - if (!ignoreBlankLines || /\S/.test(line)) { - doc.insertInLine({row: i, column: line.length}, lineCommentEnd); - doc.insertInLine({row: i, column: minIndent}, lineCommentStart); - } - }; - - var uncomment = function(line, i) { - var m; - if (m = line.match(regexpEnd)) - doc.removeInLine(i, line.length - m[0].length, line.length); - if (m = line.match(regexpStart)) - doc.removeInLine(i, m[1].length, m[0].length); - }; - - var testRemove = function(line, row) { - if (regexpStart.test(line)) - return true; - var tokens = session.getTokens(row); - for (var i = 0; i < tokens.length; i++) { - if (tokens[i].type === 'comment') - return true; - } - }; - } else { - if (Array.isArray(this.lineCommentStart)) { - var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join("|"); - var lineCommentStart = this.lineCommentStart[0]; - } else { - var regexpStart = lang.escapeRegExp(this.lineCommentStart); - var lineCommentStart = this.lineCommentStart; - } - regexpStart = new RegExp("^(\\s*)(?:" + regexpStart + ") ?"); - - insertAtTabStop = session.getUseSoftTabs(); - - var uncomment = function(line, i) { - var m = line.match(regexpStart); - if (!m) return; - var start = m[1].length, end = m[0].length; - if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == " ") - end--; - doc.removeInLine(i, start, end); - }; - var commentWithSpace = lineCommentStart + " "; - var comment = function(line, i) { - if (!ignoreBlankLines || /\S/.test(line)) { - if (shouldInsertSpace(line, minIndent, minIndent)) - doc.insertInLine({row: i, column: minIndent}, commentWithSpace); - else - doc.insertInLine({row: i, column: minIndent}, lineCommentStart); - } - }; - var testRemove = function(line, i) { - return regexpStart.test(line); - }; - - var shouldInsertSpace = function(line, before, after) { - var spaces = 0; - while (before-- && line.charAt(before) == " ") - spaces++; - if (spaces % tabSize != 0) - return false; - var spaces = 0; - while (line.charAt(after++) == " ") - spaces++; - if (tabSize > 2) - return spaces % tabSize != tabSize - 1; - else - return spaces % tabSize == 0; - return true; - }; - } - - function iter(fun) { - for (var i = startRow; i <= endRow; i++) - fun(doc.getLine(i), i); - } - - - var minEmptyLength = Infinity; - iter(function(line, i) { - var indent = line.search(/\S/); - if (indent !== -1) { - if (indent < minIndent) - minIndent = indent; - if (shouldRemove && !testRemove(line, i)) - shouldRemove = false; - } else if (minEmptyLength > line.length) { - minEmptyLength = line.length; - } - }); - - if (minIndent == Infinity) { - minIndent = minEmptyLength; - ignoreBlankLines = false; - shouldRemove = false; - } - - if (insertAtTabStop && minIndent % tabSize != 0) - minIndent = Math.floor(minIndent / tabSize) * tabSize; - - iter(shouldRemove ? uncomment : comment); - }; - - this.toggleBlockComment = function(state, session, range, cursor) { - var comment = this.blockComment; - if (!comment) - return; - if (!comment.start && comment[0]) - comment = comment[0]; - - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - var sel = session.selection; - var initialRange = session.selection.toOrientedRange(); - var startRow, colDiff; - - if (token && /comment/.test(token.type)) { - var startRange, endRange; - while (token && /comment/.test(token.type)) { - var i = token.value.indexOf(comment.start); - if (i != -1) { - var row = iterator.getCurrentTokenRow(); - var column = iterator.getCurrentTokenColumn() + i; - startRange = new Range(row, column, row, column + comment.start.length); - break; - } - token = iterator.stepBackward(); - } - - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - while (token && /comment/.test(token.type)) { - var i = token.value.indexOf(comment.end); - if (i != -1) { - var row = iterator.getCurrentTokenRow(); - var column = iterator.getCurrentTokenColumn() + i; - endRange = new Range(row, column, row, column + comment.end.length); - break; - } - token = iterator.stepForward(); - } - if (endRange) - session.remove(endRange); - if (startRange) { - session.remove(startRange); - startRow = startRange.start.row; - colDiff = -comment.start.length; - } - } else { - colDiff = comment.start.length; - startRow = range.start.row; - session.insert(range.end, comment.end); - session.insert(range.start, comment.start); - } - if (initialRange.start.row == startRow) - initialRange.start.column += colDiff; - if (initialRange.end.row == startRow) - initialRange.end.column += colDiff; - session.selection.fromOrientedRange(initialRange); - }; - - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - this.checkOutdent = function(state, line, input) { - return false; - }; - - this.autoOutdent = function(state, doc, row) { - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - - this.createWorker = function(session) { - return null; - }; - - this.createModeDelegates = function (mapping) { - this.$embeds = []; - this.$modes = {}; - for (var i in mapping) { - if (mapping[i]) { - this.$embeds.push(i); - this.$modes[i] = new mapping[i](); - } - } - - var delegations = ['toggleBlockComment', 'toggleCommentLines', 'getNextLineIndent', - 'checkOutdent', 'autoOutdent', 'transformAction', 'getCompletions']; - - for (var i = 0; i < delegations.length; i++) { - (function(scope) { - var functionName = delegations[i]; - var defaultHandler = scope[functionName]; - scope[delegations[i]] = function() { - return this.$delegator(functionName, arguments, defaultHandler); - }; - } (this)); - } - }; - - this.$delegator = function(method, args, defaultHandler) { - var state = args[0]; - if (typeof state != "string") - state = state[0]; - for (var i = 0; i < this.$embeds.length; i++) { - if (!this.$modes[this.$embeds[i]]) continue; - - var split = state.split(this.$embeds[i]); - if (!split[0] && split[1]) { - args[0] = split[1]; - var mode = this.$modes[this.$embeds[i]]; - return mode[method].apply(mode, args); - } - } - var ret = defaultHandler.apply(this, args); - return defaultHandler ? ret : undefined; - }; - - this.transformAction = function(state, action, editor, session, param) { - if (this.$behaviour) { - var behaviours = this.$behaviour.getBehaviours(); - for (var key in behaviours) { - if (behaviours[key][action]) { - var ret = behaviours[key][action].apply(this, arguments); - if (ret) { - return ret; - } - } - } - } - }; - - this.getKeywords = function(append) { - if (!this.completionKeywords) { - var rules = this.$tokenizer.rules; - var completionKeywords = []; - for (var rule in rules) { - var ruleItr = rules[rule]; - for (var r = 0, l = ruleItr.length; r < l; r++) { - if (typeof ruleItr[r].token === "string") { - if (/keyword|support|storage/.test(ruleItr[r].token)) - completionKeywords.push(ruleItr[r].regex); - } - else if (typeof ruleItr[r].token === "object") { - for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) { - if (/keyword|support|storage/.test(ruleItr[r].token[a])) { - var rule = ruleItr[r].regex.match(/\(.+?\)/g)[a]; - completionKeywords.push(rule.substr(1, rule.length - 2)); - } - } - } - } - } - this.completionKeywords = completionKeywords; - } - if (!append) - return this.$keywordList; - return completionKeywords.concat(this.$keywordList || []); - }; - - this.$createKeywordList = function() { - if (!this.$highlightRules) - this.getTokenizer(); - return this.$keywordList = this.$highlightRules.$keywordList || []; - }; - - this.getCompletions = function(state, session, pos, prefix) { - var keywords = this.$keywordList || this.$createKeywordList(); - return keywords.map(function(word) { - return { - name: word, - value: word, - score: 0, - meta: "keyword" - }; - }); - }; - - this.$id = "ace/mode/text"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { -"use strict"; - -var oop = require("./lib/oop"); -var EventEmitter = require("./lib/event_emitter").EventEmitter; - -var Anchor = exports.Anchor = function(doc, row, column) { - this.$onChange = this.onChange.bind(this); - this.attach(doc); - - if (typeof column == "undefined") - this.setPosition(row.row, row.column); - else - this.setPosition(row, column); -}; - -(function() { - - oop.implement(this, EventEmitter); - this.getPosition = function() { - return this.$clipPositionToDocument(this.row, this.column); - }; - this.getDocument = function() { - return this.document; - }; - this.$insertRight = false; - this.onChange = function(e) { - var delta = e.data; - var range = delta.range; - - if (range.start.row == range.end.row && range.start.row != this.row) - return; - - if (range.start.row > this.row) - return; - - if (range.start.row == this.row && range.start.column > this.column) - return; - - var row = this.row; - var column = this.column; - var start = range.start; - var end = range.end; - - if (delta.action === "insertText") { - if (start.row === row && start.column <= column) { - if (start.column === column && this.$insertRight) { - } else if (start.row === end.row) { - column += end.column - start.column; - } else { - column -= start.column; - row += end.row - start.row; - } - } else if (start.row !== end.row && start.row < row) { - row += end.row - start.row; - } - } else if (delta.action === "insertLines") { - if (start.row === row && column === 0 && this.$insertRight) { - } - else if (start.row <= row) { - row += end.row - start.row; - } - } else if (delta.action === "removeText") { - if (start.row === row && start.column < column) { - if (end.column >= column) - column = start.column; - else - column = Math.max(0, column - (end.column - start.column)); - - } else if (start.row !== end.row && start.row < row) { - if (end.row === row) - column = Math.max(0, column - end.column) + start.column; - row -= (end.row - start.row); - } else if (end.row === row) { - row -= end.row - start.row; - column = Math.max(0, column - end.column) + start.column; - } - } else if (delta.action == "removeLines") { - if (start.row <= row) { - if (end.row <= row) - row -= end.row - start.row; - else { - row = start.row; - column = 0; - } - } - } - - this.setPosition(row, column, true); - }; - this.setPosition = function(row, column, noClip) { - var pos; - if (noClip) { - pos = { - row: row, - column: column - }; - } else { - pos = this.$clipPositionToDocument(row, column); - } - - if (this.row == pos.row && this.column == pos.column) - return; - - var old = { - row: this.row, - column: this.column - }; - - this.row = pos.row; - this.column = pos.column; - this._signal("change", { - old: old, - value: pos - }); - }; - this.detach = function() { - this.document.removeEventListener("change", this.$onChange); - }; - this.attach = function(doc) { - this.document = doc || this.document; - this.document.on("change", this.$onChange); - }; - this.$clipPositionToDocument = function(row, column) { - var pos = {}; - - if (row >= this.document.getLength()) { - pos.row = Math.max(0, this.document.getLength() - 1); - pos.column = this.document.getLine(pos.row).length; - } - else if (row < 0) { - pos.row = 0; - pos.column = 0; - } - else { - pos.row = row; - pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); - } - - if (column < 0) - pos.column = 0; - - return pos; - }; - -}).call(Anchor.prototype); - -}); - -define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { -"use strict"; - -var oop = require("./lib/oop"); -var EventEmitter = require("./lib/event_emitter").EventEmitter; -var Range = require("./range").Range; -var Anchor = require("./anchor").Anchor; - -var Document = function(text) { - this.$lines = []; - if (text.length === 0) { - this.$lines = [""]; - } else if (Array.isArray(text)) { - this._insertLines(0, text); - } else { - this.insert({row: 0, column:0}, text); - } -}; - -(function() { - - oop.implement(this, EventEmitter); - this.setValue = function(text) { - var len = this.getLength(); - this.remove(new Range(0, 0, len, this.getLine(len-1).length)); - this.insert({row: 0, column:0}, text); - }; - this.getValue = function() { - return this.getAllLines().join(this.getNewLineCharacter()); - }; - this.createAnchor = function(row, column) { - return new Anchor(this, row, column); - }; - if ("aaa".split(/a/).length === 0) - this.$split = function(text) { - return text.replace(/\r\n|\r/g, "\n").split("\n"); - }; - else - this.$split = function(text) { - return text.split(/\r\n|\r|\n/); - }; - - - this.$detectNewLine = function(text) { - var match = text.match(/^.*?(\r\n|\r|\n)/m); - this.$autoNewLine = match ? match[1] : "\n"; - this._signal("changeNewLineMode"); - }; - this.getNewLineCharacter = function() { - switch (this.$newLineMode) { - case "windows": - return "\r\n"; - case "unix": - return "\n"; - default: - return this.$autoNewLine || "\n"; - } - }; - - this.$autoNewLine = ""; - this.$newLineMode = "auto"; - this.setNewLineMode = function(newLineMode) { - if (this.$newLineMode === newLineMode) - return; - - this.$newLineMode = newLineMode; - this._signal("changeNewLineMode"); - }; - this.getNewLineMode = function() { - return this.$newLineMode; - }; - this.isNewLine = function(text) { - return (text == "\r\n" || text == "\r" || text == "\n"); - }; - this.getLine = function(row) { - return this.$lines[row] || ""; - }; - this.getLines = function(firstRow, lastRow) { - return this.$lines.slice(firstRow, lastRow + 1); - }; - this.getAllLines = function() { - return this.getLines(0, this.getLength()); - }; - this.getLength = function() { - return this.$lines.length; - }; - this.getTextRange = function(range) { - if (range.start.row == range.end.row) { - return this.getLine(range.start.row) - .substring(range.start.column, range.end.column); - } - var lines = this.getLines(range.start.row, range.end.row); - lines[0] = (lines[0] || "").substring(range.start.column); - var l = lines.length - 1; - if (range.end.row - range.start.row == l) - lines[l] = lines[l].substring(0, range.end.column); - return lines.join(this.getNewLineCharacter()); - }; - - this.$clipPosition = function(position) { - var length = this.getLength(); - if (position.row >= length) { - position.row = Math.max(0, length - 1); - position.column = this.getLine(length-1).length; - } else if (position.row < 0) - position.row = 0; - return position; - }; - this.insert = function(position, text) { - if (!text || text.length === 0) - return position; - - position = this.$clipPosition(position); - if (this.getLength() <= 1) - this.$detectNewLine(text); - - var lines = this.$split(text); - var firstLine = lines.splice(0, 1)[0]; - var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0]; - - position = this.insertInLine(position, firstLine); - if (lastLine !== null) { - position = this.insertNewLine(position); // terminate first line - position = this._insertLines(position.row, lines); - position = this.insertInLine(position, lastLine || ""); - } - return position; - }; - this.insertLines = function(row, lines) { - if (row >= this.getLength()) - return this.insert({row: row, column: 0}, "\n" + lines.join("\n")); - return this._insertLines(Math.max(row, 0), lines); - }; - this._insertLines = function(row, lines) { - if (lines.length == 0) - return {row: row, column: 0}; - while (lines.length > 0xF000) { - var end = this._insertLines(row, lines.slice(0, 0xF000)); - lines = lines.slice(0xF000); - row = end.row; - } - - var args = [row, 0]; - args.push.apply(args, lines); - this.$lines.splice.apply(this.$lines, args); - - var range = new Range(row, 0, row + lines.length, 0); - var delta = { - action: "insertLines", - range: range, - lines: lines - }; - this._signal("change", { data: delta }); - return range.end; - }; - this.insertNewLine = function(position) { - position = this.$clipPosition(position); - var line = this.$lines[position.row] || ""; - - this.$lines[position.row] = line.substring(0, position.column); - this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length)); - - var end = { - row : position.row + 1, - column : 0 - }; - - var delta = { - action: "insertText", - range: Range.fromPoints(position, end), - text: this.getNewLineCharacter() - }; - this._signal("change", { data: delta }); - - return end; - }; - this.insertInLine = function(position, text) { - if (text.length == 0) - return position; - - var line = this.$lines[position.row] || ""; - - this.$lines[position.row] = line.substring(0, position.column) + text - + line.substring(position.column); - - var end = { - row : position.row, - column : position.column + text.length - }; - - var delta = { - action: "insertText", - range: Range.fromPoints(position, end), - text: text - }; - this._signal("change", { data: delta }); - - return end; - }; - this.remove = function(range) { - if (!(range instanceof Range)) - range = Range.fromPoints(range.start, range.end); - range.start = this.$clipPosition(range.start); - range.end = this.$clipPosition(range.end); - - if (range.isEmpty()) - return range.start; - - var firstRow = range.start.row; - var lastRow = range.end.row; - - if (range.isMultiLine()) { - var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1; - var lastFullRow = lastRow - 1; - - if (range.end.column > 0) - this.removeInLine(lastRow, 0, range.end.column); - - if (lastFullRow >= firstFullRow) - this._removeLines(firstFullRow, lastFullRow); - - if (firstFullRow != firstRow) { - this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length); - this.removeNewLine(range.start.row); - } - } - else { - this.removeInLine(firstRow, range.start.column, range.end.column); - } - return range.start; - }; - this.removeInLine = function(row, startColumn, endColumn) { - if (startColumn == endColumn) - return; - - var range = new Range(row, startColumn, row, endColumn); - var line = this.getLine(row); - var removed = line.substring(startColumn, endColumn); - var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length); - this.$lines.splice(row, 1, newLine); - - var delta = { - action: "removeText", - range: range, - text: removed - }; - this._signal("change", { data: delta }); - return range.start; - }; - this.removeLines = function(firstRow, lastRow) { - if (firstRow < 0 || lastRow >= this.getLength()) - return this.remove(new Range(firstRow, 0, lastRow + 1, 0)); - return this._removeLines(firstRow, lastRow); - }; - - this._removeLines = function(firstRow, lastRow) { - var range = new Range(firstRow, 0, lastRow + 1, 0); - var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1); - - var delta = { - action: "removeLines", - range: range, - nl: this.getNewLineCharacter(), - lines: removed - }; - this._signal("change", { data: delta }); - return removed; - }; - this.removeNewLine = function(row) { - var firstLine = this.getLine(row); - var secondLine = this.getLine(row+1); - - var range = new Range(row, firstLine.length, row+1, 0); - var line = firstLine + secondLine; - - this.$lines.splice(row, 2, line); - - var delta = { - action: "removeText", - range: range, - text: this.getNewLineCharacter() - }; - this._signal("change", { data: delta }); - }; - this.replace = function(range, text) { - if (!(range instanceof Range)) - range = Range.fromPoints(range.start, range.end); - if (text.length == 0 && range.isEmpty()) - return range.start; - if (text == this.getTextRange(range)) - return range.end; - - this.remove(range); - if (text) { - var end = this.insert(range.start, text); - } - else { - end = range.start; - } - - return end; - }; - this.applyDeltas = function(deltas) { - for (var i=0; i=0; i--) { - var delta = deltas[i]; - - var range = Range.fromPoints(delta.range.start, delta.range.end); - - if (delta.action == "insertLines") - this._removeLines(range.start.row, range.end.row - 1); - else if (delta.action == "insertText") - this.remove(range); - else if (delta.action == "removeLines") - this._insertLines(range.start.row, delta.lines); - else if (delta.action == "removeText") - this.insert(range.start, delta.text); - } - }; - this.indexToPosition = function(index, startRow) { - var lines = this.$lines || this.getAllLines(); - var newlineLength = this.getNewLineCharacter().length; - for (var i = startRow || 0, l = lines.length; i < l; i++) { - index -= lines[i].length + newlineLength; - if (index < 0) - return {row: i, column: index + lines[i].length + newlineLength}; - } - return {row: l-1, column: lines[l-1].length}; - }; - this.positionToIndex = function(pos, startRow) { - var lines = this.$lines || this.getAllLines(); - var newlineLength = this.getNewLineCharacter().length; - var index = 0; - var row = Math.min(pos.row, lines.length); - for (var i = startRow || 0; i < row; ++i) - index += lines[i].length + newlineLength; - - return index + pos.column; - }; - -}).call(Document.prototype); - -exports.Document = Document; -}); - -define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { -"use strict"; - -var oop = require("./lib/oop"); -var EventEmitter = require("./lib/event_emitter").EventEmitter; - -var BackgroundTokenizer = function(tokenizer, editor) { - this.running = false; - this.lines = []; - this.states = []; - this.currentLine = 0; - this.tokenizer = tokenizer; - - var self = this; - - this.$worker = function() { - if (!self.running) { return; } - - var workerStart = new Date(); - var currentLine = self.currentLine; - var endLine = -1; - var doc = self.doc; - - while (self.lines[currentLine]) - currentLine++; - - var startLine = currentLine; - - var len = doc.getLength(); - var processedLines = 0; - self.running = false; - while (currentLine < len) { - self.$tokenizeRow(currentLine); - endLine = currentLine; - do { - currentLine++; - } while (self.lines[currentLine]); - processedLines ++; - if ((processedLines % 5 === 0) && (new Date() - workerStart) > 20) { - self.running = setTimeout(self.$worker, 20); - break; - } - } - self.currentLine = currentLine; - - if (startLine <= endLine) - self.fireUpdateEvent(startLine, endLine); - }; -}; - -(function(){ - - oop.implement(this, EventEmitter); - this.setTokenizer = function(tokenizer) { - this.tokenizer = tokenizer; - this.lines = []; - this.states = []; - - this.start(0); - }; - this.setDocument = function(doc) { - this.doc = doc; - this.lines = []; - this.states = []; - - this.stop(); - }; - this.fireUpdateEvent = function(firstRow, lastRow) { - var data = { - first: firstRow, - last: lastRow - }; - this._signal("update", {data: data}); - }; - this.start = function(startRow) { - this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength()); - this.lines.splice(this.currentLine, this.lines.length); - this.states.splice(this.currentLine, this.states.length); - - this.stop(); - this.running = setTimeout(this.$worker, 700); - }; - - this.scheduleStart = function() { - if (!this.running) - this.running = setTimeout(this.$worker, 700); - } - - this.$updateOnChange = function(delta) { - var range = delta.range; - var startRow = range.start.row; - var len = range.end.row - startRow; - - if (len === 0) { - this.lines[startRow] = null; - } else if (delta.action == "removeText" || delta.action == "removeLines") { - this.lines.splice(startRow, len + 1, null); - this.states.splice(startRow, len + 1, null); - } else { - var args = Array(len + 1); - args.unshift(startRow, 1); - this.lines.splice.apply(this.lines, args); - this.states.splice.apply(this.states, args); - } - - this.currentLine = Math.min(startRow, this.currentLine, this.doc.getLength()); - - this.stop(); - }; - this.stop = function() { - if (this.running) - clearTimeout(this.running); - this.running = false; - }; - this.getTokens = function(row) { - return this.lines[row] || this.$tokenizeRow(row); - }; - this.getState = function(row) { - if (this.currentLine == row) - this.$tokenizeRow(row); - return this.states[row] || "start"; - }; - - this.$tokenizeRow = function(row) { - var line = this.doc.getLine(row); - var state = this.states[row - 1]; - - var data = this.tokenizer.getLineTokens(line, state, row); - - if (this.states[row] + "" !== data.state + "") { - this.states[row] = data.state; - this.lines[row + 1] = null; - if (this.currentLine > row + 1) - this.currentLine = row + 1; - } else if (this.currentLine == row) { - this.currentLine = row + 1; - } - - return this.lines[row] = data.tokens; - }; - -}).call(BackgroundTokenizer.prototype); - -exports.BackgroundTokenizer = BackgroundTokenizer; -}); - -define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(require, exports, module) { -"use strict"; - -var lang = require("./lib/lang"); -var oop = require("./lib/oop"); -var Range = require("./range").Range; - -var SearchHighlight = function(regExp, clazz, type) { - this.setRegexp(regExp); - this.clazz = clazz; - this.type = type || "text"; -}; - -(function() { - this.MAX_RANGES = 500; - - this.setRegexp = function(regExp) { - if (this.regExp+"" == regExp+"") - return; - this.regExp = regExp; - this.cache = []; - }; - - this.update = function(html, markerLayer, session, config) { - if (!this.regExp) - return; - var start = config.firstRow, end = config.lastRow; - - for (var i = start; i <= end; i++) { - var ranges = this.cache[i]; - if (ranges == null) { - ranges = lang.getMatchOffsets(session.getLine(i), this.regExp); - if (ranges.length > this.MAX_RANGES) - ranges = ranges.slice(0, this.MAX_RANGES); - ranges = ranges.map(function(match) { - return new Range(i, match.offset, i, match.offset + match.length); - }); - this.cache[i] = ranges.length ? ranges : ""; - } - - for (var j = ranges.length; j --; ) { - markerLayer.drawSingleLineMarker( - html, ranges[j].toScreenRange(session), this.clazz, config); - } - } - }; - -}).call(SearchHighlight.prototype); - -exports.SearchHighlight = SearchHighlight; -}); - -define("ace/edit_session/fold_line",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; -function FoldLine(foldData, folds) { - this.foldData = foldData; - if (Array.isArray(folds)) { - this.folds = folds; - } else { - folds = this.folds = [ folds ]; - } - - var last = folds[folds.length - 1]; - this.range = new Range(folds[0].start.row, folds[0].start.column, - last.end.row, last.end.column); - this.start = this.range.start; - this.end = this.range.end; - - this.folds.forEach(function(fold) { - fold.setFoldLine(this); - }, this); -} - -(function() { - this.shiftRow = function(shift) { - this.start.row += shift; - this.end.row += shift; - this.folds.forEach(function(fold) { - fold.start.row += shift; - fold.end.row += shift; - }); - }; - - this.addFold = function(fold) { - if (fold.sameRow) { - if (fold.start.row < this.startRow || fold.endRow > this.endRow) { - throw new Error("Can't add a fold to this FoldLine as it has no connection"); - } - this.folds.push(fold); - this.folds.sort(function(a, b) { - return -a.range.compareEnd(b.start.row, b.start.column); - }); - if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) { - this.end.row = fold.end.row; - this.end.column = fold.end.column; - } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) { - this.start.row = fold.start.row; - this.start.column = fold.start.column; - } - } else if (fold.start.row == this.end.row) { - this.folds.push(fold); - this.end.row = fold.end.row; - this.end.column = fold.end.column; - } else if (fold.end.row == this.start.row) { - this.folds.unshift(fold); - this.start.row = fold.start.row; - this.start.column = fold.start.column; - } else { - throw new Error("Trying to add fold to FoldRow that doesn't have a matching row"); - } - fold.foldLine = this; - }; - - this.containsRow = function(row) { - return row >= this.start.row && row <= this.end.row; - }; - - this.walk = function(callback, endRow, endColumn) { - var lastEnd = 0, - folds = this.folds, - fold, - cmp, stop, isNewRow = true; - - if (endRow == null) { - endRow = this.end.row; - endColumn = this.end.column; - } - - for (var i = 0; i < folds.length; i++) { - fold = folds[i]; - - cmp = fold.range.compareStart(endRow, endColumn); - if (cmp == -1) { - callback(null, endRow, endColumn, lastEnd, isNewRow); - return; - } - - stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow); - stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd); - if (stop || cmp === 0) { - return; - } - isNewRow = !fold.sameRow; - lastEnd = fold.end.column; - } - callback(null, endRow, endColumn, lastEnd, isNewRow); - }; - - this.getNextFoldTo = function(row, column) { - var fold, cmp; - for (var i = 0; i < this.folds.length; i++) { - fold = this.folds[i]; - cmp = fold.range.compareEnd(row, column); - if (cmp == -1) { - return { - fold: fold, - kind: "after" - }; - } else if (cmp === 0) { - return { - fold: fold, - kind: "inside" - }; - } - } - return null; - }; - - this.addRemoveChars = function(row, column, len) { - var ret = this.getNextFoldTo(row, column), - fold, folds; - if (ret) { - fold = ret.fold; - if (ret.kind == "inside" - && fold.start.column != column - && fold.start.row != row) - { - window.console && window.console.log(row, column, fold); - } else if (fold.start.row == row) { - folds = this.folds; - var i = folds.indexOf(fold); - if (i === 0) { - this.start.column += len; - } - for (i; i < folds.length; i++) { - fold = folds[i]; - fold.start.column += len; - if (!fold.sameRow) { - return; - } - fold.end.column += len; - } - this.end.column += len; - } - } - }; - - this.split = function(row, column) { - var pos = this.getNextFoldTo(row, column); - - if (!pos || pos.kind == "inside") - return null; - - var fold = pos.fold; - var folds = this.folds; - var foldData = this.foldData; - - var i = folds.indexOf(fold); - var foldBefore = folds[i - 1]; - this.end.row = foldBefore.end.row; - this.end.column = foldBefore.end.column; - folds = folds.splice(i, folds.length - i); - - var newFoldLine = new FoldLine(foldData, folds); - foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine); - return newFoldLine; - }; - - this.merge = function(foldLineNext) { - var folds = foldLineNext.folds; - for (var i = 0; i < folds.length; i++) { - this.addFold(folds[i]); - } - var foldData = this.foldData; - foldData.splice(foldData.indexOf(foldLineNext), 1); - }; - - this.toString = function() { - var ret = [this.range.toString() + ": [" ]; - - this.folds.forEach(function(fold) { - ret.push(" " + fold.toString()); - }); - ret.push("]"); - return ret.join("\n"); - }; - - this.idxToPosition = function(idx) { - var lastFoldEndColumn = 0; - - for (var i = 0; i < this.folds.length; i++) { - var fold = this.folds[i]; - - idx -= fold.start.column - lastFoldEndColumn; - if (idx < 0) { - return { - row: fold.start.row, - column: fold.start.column + idx - }; - } - - idx -= fold.placeholder.length; - if (idx < 0) { - return fold.start; - } - - lastFoldEndColumn = fold.end.column; - } - - return { - row: this.end.row, - column: this.end.column + idx - }; - }; -}).call(FoldLine.prototype); - -exports.FoldLine = FoldLine; -}); - -define("ace/range_list",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; -var Range = require("./range").Range; -var comparePoints = Range.comparePoints; - -var RangeList = function() { - this.ranges = []; -}; - -(function() { - this.comparePoints = comparePoints; - - this.pointIndex = function(pos, excludeEdges, startIndex) { - var list = this.ranges; - - for (var i = startIndex || 0; i < list.length; i++) { - var range = list[i]; - var cmpEnd = comparePoints(pos, range.end); - if (cmpEnd > 0) - continue; - var cmpStart = comparePoints(pos, range.start); - if (cmpEnd === 0) - return excludeEdges && cmpStart !== 0 ? -i-2 : i; - if (cmpStart > 0 || (cmpStart === 0 && !excludeEdges)) - return i; - - return -i-1; - } - return -i - 1; - }; - - this.add = function(range) { - var excludeEdges = !range.isEmpty(); - var startIndex = this.pointIndex(range.start, excludeEdges); - if (startIndex < 0) - startIndex = -startIndex - 1; - - var endIndex = this.pointIndex(range.end, excludeEdges, startIndex); - - if (endIndex < 0) - endIndex = -endIndex - 1; - else - endIndex++; - return this.ranges.splice(startIndex, endIndex - startIndex, range); - }; - - this.addList = function(list) { - var removed = []; - for (var i = list.length; i--; ) { - removed.push.call(removed, this.add(list[i])); - } - return removed; - }; - - this.substractPoint = function(pos) { - var i = this.pointIndex(pos); - - if (i >= 0) - return this.ranges.splice(i, 1); - }; - this.merge = function() { - var removed = []; - var list = this.ranges; - - list = list.sort(function(a, b) { - return comparePoints(a.start, b.start); - }); - - var next = list[0], range; - for (var i = 1; i < list.length; i++) { - range = next; - next = list[i]; - var cmp = comparePoints(range.end, next.start); - if (cmp < 0) - continue; - - if (cmp == 0 && !range.isEmpty() && !next.isEmpty()) - continue; - - if (comparePoints(range.end, next.end) < 0) { - range.end.row = next.end.row; - range.end.column = next.end.column; - } - - list.splice(i, 1); - removed.push(next); - next = range; - i--; - } - - this.ranges = list; - - return removed; - }; - - this.contains = function(row, column) { - return this.pointIndex({row: row, column: column}) >= 0; - }; - - this.containsPoint = function(pos) { - return this.pointIndex(pos) >= 0; - }; - - this.rangeAtPoint = function(pos) { - var i = this.pointIndex(pos); - if (i >= 0) - return this.ranges[i]; - }; - - - this.clipRows = function(startRow, endRow) { - var list = this.ranges; - if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow) - return []; - - var startIndex = this.pointIndex({row: startRow, column: 0}); - if (startIndex < 0) - startIndex = -startIndex - 1; - var endIndex = this.pointIndex({row: endRow, column: 0}, startIndex); - if (endIndex < 0) - endIndex = -endIndex - 1; - - var clipped = []; - for (var i = startIndex; i < endIndex; i++) { - clipped.push(list[i]); - } - return clipped; - }; - - this.removeAll = function() { - return this.ranges.splice(0, this.ranges.length); - }; - - this.attach = function(session) { - if (this.session) - this.detach(); - - this.session = session; - this.onChange = this.$onChange.bind(this); - - this.session.on('change', this.onChange); - }; - - this.detach = function() { - if (!this.session) - return; - this.session.removeListener('change', this.onChange); - this.session = null; - }; - - this.$onChange = function(e) { - var changeRange = e.data.range; - if (e.data.action[0] == "i"){ - var start = changeRange.start; - var end = changeRange.end; - } else { - var end = changeRange.start; - var start = changeRange.end; - } - var startRow = start.row; - var endRow = end.row; - var lineDif = endRow - startRow; - - var colDiff = -start.column + end.column; - var ranges = this.ranges; - - for (var i = 0, n = ranges.length; i < n; i++) { - var r = ranges[i]; - if (r.end.row < startRow) - continue; - if (r.start.row > startRow) - break; - - if (r.start.row == startRow && r.start.column >= start.column ) { - if (r.start.column == start.column && this.$insertRight) { - } else { - r.start.column += colDiff; - r.start.row += lineDif; - } - } - if (r.end.row == startRow && r.end.column >= start.column) { - if (r.end.column == start.column && this.$insertRight) { - continue; - } - if (r.end.column == start.column && colDiff > 0 && i < n - 1) { - if (r.end.column > r.start.column && r.end.column == ranges[i+1].start.column) - r.end.column -= colDiff; - } - r.end.column += colDiff; - r.end.row += lineDif; - } - } - - if (lineDif != 0 && i < n) { - for (; i < n; i++) { - var r = ranges[i]; - r.start.row += lineDif; - r.end.row += lineDif; - } - } - }; - -}).call(RangeList.prototype); - -exports.RangeList = RangeList; -}); - -define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; -var RangeList = require("../range_list").RangeList; -var oop = require("../lib/oop") -var Fold = exports.Fold = function(range, placeholder) { - this.foldLine = null; - this.placeholder = placeholder; - this.range = range; - this.start = range.start; - this.end = range.end; - - this.sameRow = range.start.row == range.end.row; - this.subFolds = this.ranges = []; -}; - -oop.inherits(Fold, RangeList); - -(function() { - - this.toString = function() { - return '"' + this.placeholder + '" ' + this.range.toString(); - }; - - this.setFoldLine = function(foldLine) { - this.foldLine = foldLine; - this.subFolds.forEach(function(fold) { - fold.setFoldLine(foldLine); - }); - }; - - this.clone = function() { - var range = this.range.clone(); - var fold = new Fold(range, this.placeholder); - this.subFolds.forEach(function(subFold) { - fold.subFolds.push(subFold.clone()); - }); - fold.collapseChildren = this.collapseChildren; - return fold; - }; - - this.addSubFold = function(fold) { - if (this.range.isEqual(fold)) - return; - - if (!this.range.containsRange(fold)) - throw new Error("A fold can't intersect already existing fold" + fold.range + this.range); - consumeRange(fold, this.start); - - var row = fold.start.row, column = fold.start.column; - for (var i = 0, cmp = -1; i < this.subFolds.length; i++) { - cmp = this.subFolds[i].range.compare(row, column); - if (cmp != 1) - break; - } - var afterStart = this.subFolds[i]; - - if (cmp == 0) - return afterStart.addSubFold(fold); - var row = fold.range.end.row, column = fold.range.end.column; - for (var j = i, cmp = -1; j < this.subFolds.length; j++) { - cmp = this.subFolds[j].range.compare(row, column); - if (cmp != 1) - break; - } - var afterEnd = this.subFolds[j]; - - if (cmp == 0) - throw new Error("A fold can't intersect already existing fold" + fold.range + this.range); - - var consumedFolds = this.subFolds.splice(i, j - i, fold); - fold.setFoldLine(this.foldLine); - - return fold; - }; - - this.restoreRange = function(range) { - return restoreRange(range, this.start); - }; - -}).call(Fold.prototype); - -function consumePoint(point, anchor) { - point.row -= anchor.row; - if (point.row == 0) - point.column -= anchor.column; -} -function consumeRange(range, anchor) { - consumePoint(range.start, anchor); - consumePoint(range.end, anchor); -} -function restorePoint(point, anchor) { - if (point.row == 0) - point.column += anchor.column; - point.row += anchor.row; -} -function restoreRange(range, anchor) { - restorePoint(range.start, anchor); - restorePoint(range.end, anchor); -} - -}); - -define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; -var FoldLine = require("./fold_line").FoldLine; -var Fold = require("./fold").Fold; -var TokenIterator = require("../token_iterator").TokenIterator; - -function Folding() { - this.getFoldAt = function(row, column, side) { - var foldLine = this.getFoldLine(row); - if (!foldLine) - return null; - - var folds = foldLine.folds; - for (var i = 0; i < folds.length; i++) { - var fold = folds[i]; - if (fold.range.contains(row, column)) { - if (side == 1 && fold.range.isEnd(row, column)) { - continue; - } else if (side == -1 && fold.range.isStart(row, column)) { - continue; - } - return fold; - } - } - }; - this.getFoldsInRange = function(range) { - var start = range.start; - var end = range.end; - var foldLines = this.$foldData; - var foundFolds = []; - - start.column += 1; - end.column -= 1; - - for (var i = 0; i < foldLines.length; i++) { - var cmp = foldLines[i].range.compareRange(range); - if (cmp == 2) { - continue; - } - else if (cmp == -2) { - break; - } - - var folds = foldLines[i].folds; - for (var j = 0; j < folds.length; j++) { - var fold = folds[j]; - cmp = fold.range.compareRange(range); - if (cmp == -2) { - break; - } else if (cmp == 2) { - continue; - } else - if (cmp == 42) { - break; - } - foundFolds.push(fold); - } - } - start.column -= 1; - end.column += 1; - - return foundFolds; - }; - - this.getFoldsInRangeList = function(ranges) { - if (Array.isArray(ranges)) { - var folds = []; - ranges.forEach(function(range) { - folds = folds.concat(this.getFoldsInRange(range)); - }, this); - } else { - var folds = this.getFoldsInRange(ranges); - } - return folds; - } - this.getAllFolds = function() { - var folds = []; - var foldLines = this.$foldData; - - for (var i = 0; i < foldLines.length; i++) - for (var j = 0; j < foldLines[i].folds.length; j++) - folds.push(foldLines[i].folds[j]); - - return folds; - }; - this.getFoldStringAt = function(row, column, trim, foldLine) { - foldLine = foldLine || this.getFoldLine(row); - if (!foldLine) - return null; - - var lastFold = { - end: { column: 0 } - }; - var str, fold; - for (var i = 0; i < foldLine.folds.length; i++) { - fold = foldLine.folds[i]; - var cmp = fold.range.compareEnd(row, column); - if (cmp == -1) { - str = this - .getLine(fold.start.row) - .substring(lastFold.end.column, fold.start.column); - break; - } - else if (cmp === 0) { - return null; - } - lastFold = fold; - } - if (!str) - str = this.getLine(fold.start.row).substring(lastFold.end.column); - - if (trim == -1) - return str.substring(0, column - lastFold.end.column); - else if (trim == 1) - return str.substring(column - lastFold.end.column); - else - return str; - }; - - this.getFoldLine = function(docRow, startFoldLine) { - var foldData = this.$foldData; - var i = 0; - if (startFoldLine) - i = foldData.indexOf(startFoldLine); - if (i == -1) - i = 0; - for (i; i < foldData.length; i++) { - var foldLine = foldData[i]; - if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) { - return foldLine; - } else if (foldLine.end.row > docRow) { - return null; - } - } - return null; - }; - this.getNextFoldLine = function(docRow, startFoldLine) { - var foldData = this.$foldData; - var i = 0; - if (startFoldLine) - i = foldData.indexOf(startFoldLine); - if (i == -1) - i = 0; - for (i; i < foldData.length; i++) { - var foldLine = foldData[i]; - if (foldLine.end.row >= docRow) { - return foldLine; - } - } - return null; - }; - - this.getFoldedRowCount = function(first, last) { - var foldData = this.$foldData, rowCount = last-first+1; - for (var i = 0; i < foldData.length; i++) { - var foldLine = foldData[i], - end = foldLine.end.row, - start = foldLine.start.row; - if (end >= last) { - if(start < last) { - if(start >= first) - rowCount -= last-start; - else - rowCount = 0;//in one fold - } - break; - } else if(end >= first){ - if (start >= first) //fold inside range - rowCount -= end-start; - else - rowCount -= end-first+1; - } - } - return rowCount; - }; - - this.$addFoldLine = function(foldLine) { - this.$foldData.push(foldLine); - this.$foldData.sort(function(a, b) { - return a.start.row - b.start.row; - }); - return foldLine; - }; - this.addFold = function(placeholder, range) { - var foldData = this.$foldData; - var added = false; - var fold; - - if (placeholder instanceof Fold) - fold = placeholder; - else { - fold = new Fold(range, placeholder); - fold.collapseChildren = range.collapseChildren; - } - this.$clipRangeToDocument(fold.range); - - var startRow = fold.start.row; - var startColumn = fold.start.column; - var endRow = fold.end.row; - var endColumn = fold.end.column; - if (!(startRow < endRow || - startRow == endRow && startColumn <= endColumn - 2)) - throw new Error("The range has to be at least 2 characters width"); - - var startFold = this.getFoldAt(startRow, startColumn, 1); - var endFold = this.getFoldAt(endRow, endColumn, -1); - if (startFold && endFold == startFold) - return startFold.addSubFold(fold); - - if (startFold && !startFold.range.isStart(startRow, startColumn)) - this.removeFold(startFold); - - if (endFold && !endFold.range.isEnd(endRow, endColumn)) - this.removeFold(endFold); - var folds = this.getFoldsInRange(fold.range); - if (folds.length > 0) { - this.removeFolds(folds); - folds.forEach(function(subFold) { - fold.addSubFold(subFold); - }); - } - - for (var i = 0; i < foldData.length; i++) { - var foldLine = foldData[i]; - if (endRow == foldLine.start.row) { - foldLine.addFold(fold); - added = true; - break; - } else if (startRow == foldLine.end.row) { - foldLine.addFold(fold); - added = true; - if (!fold.sameRow) { - var foldLineNext = foldData[i + 1]; - if (foldLineNext && foldLineNext.start.row == endRow) { - foldLine.merge(foldLineNext); - break; - } - } - break; - } else if (endRow <= foldLine.start.row) { - break; - } - } - - if (!added) - foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold)); - - if (this.$useWrapMode) - this.$updateWrapData(foldLine.start.row, foldLine.start.row); - else - this.$updateRowLengthCache(foldLine.start.row, foldLine.start.row); - this.$modified = true; - this._emit("changeFold", { data: fold, action: "add" }); - - return fold; - }; - - this.addFolds = function(folds) { - folds.forEach(function(fold) { - this.addFold(fold); - }, this); - }; - - this.removeFold = function(fold) { - var foldLine = fold.foldLine; - var startRow = foldLine.start.row; - var endRow = foldLine.end.row; - - var foldLines = this.$foldData; - var folds = foldLine.folds; - if (folds.length == 1) { - foldLines.splice(foldLines.indexOf(foldLine), 1); - } else - if (foldLine.range.isEnd(fold.end.row, fold.end.column)) { - folds.pop(); - foldLine.end.row = folds[folds.length - 1].end.row; - foldLine.end.column = folds[folds.length - 1].end.column; - } else - if (foldLine.range.isStart(fold.start.row, fold.start.column)) { - folds.shift(); - foldLine.start.row = folds[0].start.row; - foldLine.start.column = folds[0].start.column; - } else - if (fold.sameRow) { - folds.splice(folds.indexOf(fold), 1); - } else - { - var newFoldLine = foldLine.split(fold.start.row, fold.start.column); - folds = newFoldLine.folds; - folds.shift(); - newFoldLine.start.row = folds[0].start.row; - newFoldLine.start.column = folds[0].start.column; - } - - if (!this.$updating) { - if (this.$useWrapMode) - this.$updateWrapData(startRow, endRow); - else - this.$updateRowLengthCache(startRow, endRow); - } - this.$modified = true; - this._emit("changeFold", { data: fold, action: "remove" }); - }; - - this.removeFolds = function(folds) { - var cloneFolds = []; - for (var i = 0; i < folds.length; i++) { - cloneFolds.push(folds[i]); - } - - cloneFolds.forEach(function(fold) { - this.removeFold(fold); - }, this); - this.$modified = true; - }; - - this.expandFold = function(fold) { - this.removeFold(fold); - fold.subFolds.forEach(function(subFold) { - fold.restoreRange(subFold); - this.addFold(subFold); - }, this); - if (fold.collapseChildren > 0) { - this.foldAll(fold.start.row+1, fold.end.row, fold.collapseChildren-1); - } - fold.subFolds = []; - }; - - this.expandFolds = function(folds) { - folds.forEach(function(fold) { - this.expandFold(fold); - }, this); - }; - - this.unfold = function(location, expandInner) { - var range, folds; - if (location == null) { - range = new Range(0, 0, this.getLength(), 0); - expandInner = true; - } else if (typeof location == "number") - range = new Range(location, 0, location, this.getLine(location).length); - else if ("row" in location) - range = Range.fromPoints(location, location); - else - range = location; - - folds = this.getFoldsInRangeList(range); - if (expandInner) { - this.removeFolds(folds); - } else { - var subFolds = folds; - while (subFolds.length) { - this.expandFolds(subFolds); - subFolds = this.getFoldsInRangeList(range); - } - } - if (folds.length) - return folds; - }; - this.isRowFolded = function(docRow, startFoldRow) { - return !!this.getFoldLine(docRow, startFoldRow); - }; - - this.getRowFoldEnd = function(docRow, startFoldRow) { - var foldLine = this.getFoldLine(docRow, startFoldRow); - return foldLine ? foldLine.end.row : docRow; - }; - - this.getRowFoldStart = function(docRow, startFoldRow) { - var foldLine = this.getFoldLine(docRow, startFoldRow); - return foldLine ? foldLine.start.row : docRow; - }; - - this.getFoldDisplayLine = function(foldLine, endRow, endColumn, startRow, startColumn) { - if (startRow == null) - startRow = foldLine.start.row; - if (startColumn == null) - startColumn = 0; - if (endRow == null) - endRow = foldLine.end.row; - if (endColumn == null) - endColumn = this.getLine(endRow).length; - var doc = this.doc; - var textLine = ""; - - foldLine.walk(function(placeholder, row, column, lastColumn) { - if (row < startRow) - return; - if (row == startRow) { - if (column < startColumn) - return; - lastColumn = Math.max(startColumn, lastColumn); - } - - if (placeholder != null) { - textLine += placeholder; - } else { - textLine += doc.getLine(row).substring(lastColumn, column); - } - }, endRow, endColumn); - return textLine; - }; - - this.getDisplayLine = function(row, endColumn, startRow, startColumn) { - var foldLine = this.getFoldLine(row); - - if (!foldLine) { - var line; - line = this.doc.getLine(row); - return line.substring(startColumn || 0, endColumn || line.length); - } else { - return this.getFoldDisplayLine( - foldLine, row, endColumn, startRow, startColumn); - } - }; - - this.$cloneFoldData = function() { - var fd = []; - fd = this.$foldData.map(function(foldLine) { - var folds = foldLine.folds.map(function(fold) { - return fold.clone(); - }); - return new FoldLine(fd, folds); - }); - - return fd; - }; - - this.toggleFold = function(tryToUnfold) { - var selection = this.selection; - var range = selection.getRange(); - var fold; - var bracketPos; - - if (range.isEmpty()) { - var cursor = range.start; - fold = this.getFoldAt(cursor.row, cursor.column); - - if (fold) { - this.expandFold(fold); - return; - } else if (bracketPos = this.findMatchingBracket(cursor)) { - if (range.comparePoint(bracketPos) == 1) { - range.end = bracketPos; - } else { - range.start = bracketPos; - range.start.column++; - range.end.column--; - } - } else if (bracketPos = this.findMatchingBracket({row: cursor.row, column: cursor.column + 1})) { - if (range.comparePoint(bracketPos) == 1) - range.end = bracketPos; - else - range.start = bracketPos; - - range.start.column++; - } else { - range = this.getCommentFoldRange(cursor.row, cursor.column) || range; - } - } else { - var folds = this.getFoldsInRange(range); - if (tryToUnfold && folds.length) { - this.expandFolds(folds); - return; - } else if (folds.length == 1 ) { - fold = folds[0]; - } - } - - if (!fold) - fold = this.getFoldAt(range.start.row, range.start.column); - - if (fold && fold.range.toString() == range.toString()) { - this.expandFold(fold); - return; - } - - var placeholder = "..."; - if (!range.isMultiLine()) { - placeholder = this.getTextRange(range); - if(placeholder.length < 4) - return; - placeholder = placeholder.trim().substring(0, 2) + ".."; - } - - this.addFold(placeholder, range); - }; - - this.getCommentFoldRange = function(row, column, dir) { - var iterator = new TokenIterator(this, row, column); - var token = iterator.getCurrentToken(); - if (token && /^comment|string/.test(token.type)) { - var range = new Range(); - var re = new RegExp(token.type.replace(/\..*/, "\\.")); - if (dir != 1) { - do { - token = iterator.stepBackward(); - } while(token && re.test(token.type)); - iterator.stepForward(); - } - - range.start.row = iterator.getCurrentTokenRow(); - range.start.column = iterator.getCurrentTokenColumn() + 2; - - iterator = new TokenIterator(this, row, column); - - if (dir != -1) { - do { - token = iterator.stepForward(); - } while(token && re.test(token.type)); - token = iterator.stepBackward(); - } else - token = iterator.getCurrentToken(); - - range.end.row = iterator.getCurrentTokenRow(); - range.end.column = iterator.getCurrentTokenColumn() + token.value.length - 2; - return range; - } - }; - - this.foldAll = function(startRow, endRow, depth) { - if (depth == undefined) - depth = 100000; // JSON.stringify doesn't hanle Infinity - var foldWidgets = this.foldWidgets; - if (!foldWidgets) - return; // mode doesn't support folding - endRow = endRow || this.getLength(); - startRow = startRow || 0; - for (var row = startRow; row < endRow; row++) { - if (foldWidgets[row] == null) - foldWidgets[row] = this.getFoldWidget(row); - if (foldWidgets[row] != "start") - continue; - - var range = this.getFoldWidgetRange(row); - if (range && range.isMultiLine() - && range.end.row <= endRow - && range.start.row >= startRow - ) { - row = range.end.row; - try { - var fold = this.addFold("...", range); - if (fold) - fold.collapseChildren = depth; - } catch(e) {} - } - } - }; - this.$foldStyles = { - "manual": 1, - "markbegin": 1, - "markbeginend": 1 - }; - this.$foldStyle = "markbegin"; - this.setFoldStyle = function(style) { - if (!this.$foldStyles[style]) - throw new Error("invalid fold style: " + style + "[" + Object.keys(this.$foldStyles).join(", ") + "]"); - - if (this.$foldStyle == style) - return; - - this.$foldStyle = style; - - if (style == "manual") - this.unfold(); - var mode = this.$foldMode; - this.$setFolding(null); - this.$setFolding(mode); - }; - - this.$setFolding = function(foldMode) { - if (this.$foldMode == foldMode) - return; - - this.$foldMode = foldMode; - - this.off('change', this.$updateFoldWidgets); - this.off('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets); - this._emit("changeAnnotation"); - - if (!foldMode || this.$foldStyle == "manual") { - this.foldWidgets = null; - return; - } - - this.foldWidgets = []; - this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle); - this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle); - - this.$updateFoldWidgets = this.updateFoldWidgets.bind(this); - this.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(this); - this.on('change', this.$updateFoldWidgets); - this.on('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets); - }; - - this.getParentFoldRangeData = function (row, ignoreCurrent) { - var fw = this.foldWidgets; - if (!fw || (ignoreCurrent && fw[row])) - return {}; - - var i = row - 1, firstRange; - while (i >= 0) { - var c = fw[i]; - if (c == null) - c = fw[i] = this.getFoldWidget(i); - - if (c == "start") { - var range = this.getFoldWidgetRange(i); - if (!firstRange) - firstRange = range; - if (range && range.end.row >= row) - break; - } - i--; - } - - return { - range: i !== -1 && range, - firstRange: firstRange - }; - } - - this.onFoldWidgetClick = function(row, e) { - e = e.domEvent; - var options = { - children: e.shiftKey, - all: e.ctrlKey || e.metaKey, - siblings: e.altKey - }; - - var range = this.$toggleFoldWidget(row, options); - if (!range) { - var el = (e.target || e.srcElement) - if (el && /ace_fold-widget/.test(el.className)) - el.className += " ace_invalid"; - } - }; - - this.$toggleFoldWidget = function(row, options) { - if (!this.getFoldWidget) - return; - var type = this.getFoldWidget(row); - var line = this.getLine(row); - - var dir = type === "end" ? -1 : 1; - var fold = this.getFoldAt(row, dir === -1 ? 0 : line.length, dir); - - if (fold) { - if (options.children || options.all) - this.removeFold(fold); - else - this.expandFold(fold); - return; - } - - var range = this.getFoldWidgetRange(row, true); - if (range && !range.isMultiLine()) { - fold = this.getFoldAt(range.start.row, range.start.column, 1); - if (fold && range.isEqual(fold.range)) { - this.removeFold(fold); - return; - } - } - - if (options.siblings) { - var data = this.getParentFoldRangeData(row); - if (data.range) { - var startRow = data.range.start.row + 1; - var endRow = data.range.end.row; - } - this.foldAll(startRow, endRow, options.all ? 10000 : 0); - } else if (options.children) { - endRow = range ? range.end.row : this.getLength(); - this.foldAll(row + 1, range.end.row, options.all ? 10000 : 0); - } else if (range) { - if (options.all) - range.collapseChildren = 10000; - this.addFold("...", range); - } - - return range; - }; - - - - this.toggleFoldWidget = function(toggleParent) { - var row = this.selection.getCursor().row; - row = this.getRowFoldStart(row); - var range = this.$toggleFoldWidget(row, {}); - - if (range) - return; - var data = this.getParentFoldRangeData(row, true); - range = data.range || data.firstRange; - - if (range) { - row = range.start.row; - var fold = this.getFoldAt(row, this.getLine(row).length, 1); - - if (fold) { - this.removeFold(fold); - } else { - this.addFold("...", range); - } - } - }; - - this.updateFoldWidgets = function(e) { - var delta = e.data; - var range = delta.range; - var firstRow = range.start.row; - var len = range.end.row - firstRow; - - if (len === 0) { - this.foldWidgets[firstRow] = null; - } else if (delta.action == "removeText" || delta.action == "removeLines") { - this.foldWidgets.splice(firstRow, len + 1, null); - } else { - var args = Array(len + 1); - args.unshift(firstRow, 1); - this.foldWidgets.splice.apply(this.foldWidgets, args); - } - }; - this.tokenizerUpdateFoldWidgets = function(e) { - var rows = e.data; - if (rows.first != rows.last) { - if (this.foldWidgets.length > rows.first) - this.foldWidgets.splice(rows.first, this.foldWidgets.length); - } - } -} - -exports.Folding = Folding; - -}); - -define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"], function(require, exports, module) { -"use strict"; - -var TokenIterator = require("../token_iterator").TokenIterator; -var Range = require("../range").Range; - - -function BracketMatch() { - - this.findMatchingBracket = function(position, chr) { - if (position.column == 0) return null; - - var charBeforeCursor = chr || this.getLine(position.row).charAt(position.column-1); - if (charBeforeCursor == "") return null; - - var match = charBeforeCursor.match(/([\(\[\{])|([\)\]\}])/); - if (!match) - return null; - - if (match[1]) - return this.$findClosingBracket(match[1], position); - else - return this.$findOpeningBracket(match[2], position); - }; - - this.getBracketRange = function(pos) { - var line = this.getLine(pos.row); - var before = true, range; - - var chr = line.charAt(pos.column-1); - var match = chr && chr.match(/([\(\[\{])|([\)\]\}])/); - if (!match) { - chr = line.charAt(pos.column); - pos = {row: pos.row, column: pos.column + 1}; - match = chr && chr.match(/([\(\[\{])|([\)\]\}])/); - before = false; - } - if (!match) - return null; - - if (match[1]) { - var bracketPos = this.$findClosingBracket(match[1], pos); - if (!bracketPos) - return null; - range = Range.fromPoints(pos, bracketPos); - if (!before) { - range.end.column++; - range.start.column--; - } - range.cursor = range.end; - } else { - var bracketPos = this.$findOpeningBracket(match[2], pos); - if (!bracketPos) - return null; - range = Range.fromPoints(bracketPos, pos); - if (!before) { - range.start.column++; - range.end.column--; - } - range.cursor = range.start; - } - - return range; - }; - - this.$brackets = { - ")": "(", - "(": ")", - "]": "[", - "[": "]", - "{": "}", - "}": "{" - }; - - this.$findOpeningBracket = function(bracket, position, typeRe) { - var openBracket = this.$brackets[bracket]; - var depth = 1; - - var iterator = new TokenIterator(this, position.row, position.column); - var token = iterator.getCurrentToken(); - if (!token) - token = iterator.stepForward(); - if (!token) - return; - - if (!typeRe){ - typeRe = new RegExp( - "(\\.?" + - token.type.replace(".", "\\.").replace("rparen", ".paren") - .replace(/\b(?:end|start|begin)\b/, "") - + ")+" - ); - } - var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2; - var value = token.value; - - while (true) { - - while (valueIndex >= 0) { - var chr = value.charAt(valueIndex); - if (chr == openBracket) { - depth -= 1; - if (depth == 0) { - return {row: iterator.getCurrentTokenRow(), - column: valueIndex + iterator.getCurrentTokenColumn()}; - } - } - else if (chr == bracket) { - depth += 1; - } - valueIndex -= 1; - } - do { - token = iterator.stepBackward(); - } while (token && !typeRe.test(token.type)); - - if (token == null) - break; - - value = token.value; - valueIndex = value.length - 1; - } - - return null; - }; - - this.$findClosingBracket = function(bracket, position, typeRe) { - var closingBracket = this.$brackets[bracket]; - var depth = 1; - - var iterator = new TokenIterator(this, position.row, position.column); - var token = iterator.getCurrentToken(); - if (!token) - token = iterator.stepForward(); - if (!token) - return; - - if (!typeRe){ - typeRe = new RegExp( - "(\\.?" + - token.type.replace(".", "\\.").replace("lparen", ".paren") - .replace(/\b(?:end|start|begin)\b/, "") - + ")+" - ); - } - var valueIndex = position.column - iterator.getCurrentTokenColumn(); - - while (true) { - - var value = token.value; - var valueLength = value.length; - while (valueIndex < valueLength) { - var chr = value.charAt(valueIndex); - if (chr == closingBracket) { - depth -= 1; - if (depth == 0) { - return {row: iterator.getCurrentTokenRow(), - column: valueIndex + iterator.getCurrentTokenColumn()}; - } - } - else if (chr == bracket) { - depth += 1; - } - valueIndex += 1; - } - do { - token = iterator.stepForward(); - } while (token && !typeRe.test(token.type)); - - if (token == null) - break; - - valueIndex = 0; - } - - return null; - }; -} -exports.BracketMatch = BracketMatch; - -}); - -define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"], function(require, exports, module) { -"use strict"; - -var oop = require("./lib/oop"); -var lang = require("./lib/lang"); -var config = require("./config"); -var EventEmitter = require("./lib/event_emitter").EventEmitter; -var Selection = require("./selection").Selection; -var TextMode = require("./mode/text").Mode; -var Range = require("./range").Range; -var Document = require("./document").Document; -var BackgroundTokenizer = require("./background_tokenizer").BackgroundTokenizer; -var SearchHighlight = require("./search_highlight").SearchHighlight; - -var EditSession = function(text, mode) { - this.$breakpoints = []; - this.$decorations = []; - this.$frontMarkers = {}; - this.$backMarkers = {}; - this.$markerId = 1; - this.$undoSelect = true; - - this.$foldData = []; - this.$foldData.toString = function() { - return this.join("\n"); - } - this.on("changeFold", this.onChangeFold.bind(this)); - this.$onChange = this.onChange.bind(this); - - if (typeof text != "object" || !text.getLine) - text = new Document(text); - - this.setDocument(text); - this.selection = new Selection(this); - - config.resetOptions(this); - this.setMode(mode); - config._signal("session", this); -}; - - -(function() { - - oop.implement(this, EventEmitter); - this.setDocument = function(doc) { - if (this.doc) - this.doc.removeListener("change", this.$onChange); - - this.doc = doc; - doc.on("change", this.$onChange); - - if (this.bgTokenizer) - this.bgTokenizer.setDocument(this.getDocument()); - - this.resetCaches(); - }; - this.getDocument = function() { - return this.doc; - }; - this.$resetRowCache = function(docRow) { - if (!docRow) { - this.$docRowCache = []; - this.$screenRowCache = []; - return; - } - var l = this.$docRowCache.length; - var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1; - if (l > i) { - this.$docRowCache.splice(i, l); - this.$screenRowCache.splice(i, l); - } - }; - - this.$getRowCacheIndex = function(cacheArray, val) { - var low = 0; - var hi = cacheArray.length - 1; - - while (low <= hi) { - var mid = (low + hi) >> 1; - var c = cacheArray[mid]; - - if (val > c) - low = mid + 1; - else if (val < c) - hi = mid - 1; - else - return mid; - } - - return low -1; - }; - - this.resetCaches = function() { - this.$modified = true; - this.$wrapData = []; - this.$rowLengthCache = []; - this.$resetRowCache(0); - if (this.bgTokenizer) - this.bgTokenizer.start(0); - }; - - this.onChangeFold = function(e) { - var fold = e.data; - this.$resetRowCache(fold.start.row); - }; - - this.onChange = function(e) { - var delta = e.data; - this.$modified = true; - - this.$resetRowCache(delta.range.start.row); - - var removedFolds = this.$updateInternalDataOnChange(e); - if (!this.$fromUndo && this.$undoManager && !delta.ignore) { - this.$deltasDoc.push(delta); - if (removedFolds && removedFolds.length != 0) { - this.$deltasFold.push({ - action: "removeFolds", - folds: removedFolds - }); - } - - this.$informUndoManager.schedule(); - } - - this.bgTokenizer && this.bgTokenizer.$updateOnChange(delta); - this._signal("change", e); - }; - this.setValue = function(text) { - this.doc.setValue(text); - this.selection.moveTo(0, 0); - - this.$resetRowCache(0); - this.$deltas = []; - this.$deltasDoc = []; - this.$deltasFold = []; - this.setUndoManager(this.$undoManager); - this.getUndoManager().reset(); - }; - this.getValue = - this.toString = function() { - return this.doc.getValue(); - }; - this.getSelection = function() { - return this.selection; - }; - this.getState = function(row) { - return this.bgTokenizer.getState(row); - }; - this.getTokens = function(row) { - return this.bgTokenizer.getTokens(row); - }; - this.getTokenAt = function(row, column) { - var tokens = this.bgTokenizer.getTokens(row); - var token, c = 0; - if (column == null) { - i = tokens.length - 1; - c = this.getLine(row).length; - } else { - for (var i = 0; i < tokens.length; i++) { - c += tokens[i].value.length; - if (c >= column) - break; - } - } - token = tokens[i]; - if (!token) - return null; - token.index = i; - token.start = c - token.value.length; - return token; - }; - this.setUndoManager = function(undoManager) { - this.$undoManager = undoManager; - this.$deltas = []; - this.$deltasDoc = []; - this.$deltasFold = []; - - if (this.$informUndoManager) - this.$informUndoManager.cancel(); - - if (undoManager) { - var self = this; - - this.$syncInformUndoManager = function() { - self.$informUndoManager.cancel(); - - if (self.$deltasFold.length) { - self.$deltas.push({ - group: "fold", - deltas: self.$deltasFold - }); - self.$deltasFold = []; - } - - if (self.$deltasDoc.length) { - self.$deltas.push({ - group: "doc", - deltas: self.$deltasDoc - }); - self.$deltasDoc = []; - } - - if (self.$deltas.length > 0) { - undoManager.execute({ - action: "aceupdate", - args: [self.$deltas, self], - merge: self.mergeUndoDeltas - }); - } - self.mergeUndoDeltas = false; - self.$deltas = []; - }; - this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager); - } - }; - this.markUndoGroup = function() { - if (this.$syncInformUndoManager) - this.$syncInformUndoManager(); - }; - - this.$defaultUndoManager = { - undo: function() {}, - redo: function() {}, - reset: function() {} - }; - this.getUndoManager = function() { - return this.$undoManager || this.$defaultUndoManager; - }; - this.getTabString = function() { - if (this.getUseSoftTabs()) { - return lang.stringRepeat(" ", this.getTabSize()); - } else { - return "\t"; - } - }; - this.setUseSoftTabs = function(val) { - this.setOption("useSoftTabs", val); - }; - this.getUseSoftTabs = function() { - return this.$useSoftTabs && !this.$mode.$indentWithTabs; - }; - this.setTabSize = function(tabSize) { - this.setOption("tabSize", tabSize); - }; - this.getTabSize = function() { - return this.$tabSize; - }; - this.isTabStop = function(position) { - return this.$useSoftTabs && (position.column % this.$tabSize === 0); - }; - - this.$overwrite = false; - this.setOverwrite = function(overwrite) { - this.setOption("overwrite", overwrite); - }; - this.getOverwrite = function() { - return this.$overwrite; - }; - this.toggleOverwrite = function() { - this.setOverwrite(!this.$overwrite); - }; - this.addGutterDecoration = function(row, className) { - if (!this.$decorations[row]) - this.$decorations[row] = ""; - this.$decorations[row] += " " + className; - this._signal("changeBreakpoint", {}); - }; - this.removeGutterDecoration = function(row, className) { - this.$decorations[row] = (this.$decorations[row] || "").replace(" " + className, ""); - this._signal("changeBreakpoint", {}); - }; - this.getBreakpoints = function() { - return this.$breakpoints; - }; - this.setBreakpoints = function(rows) { - this.$breakpoints = []; - for (var i=0; i 0) - inToken = !!line.charAt(column - 1).match(this.tokenRe); - - if (!inToken) - inToken = !!line.charAt(column).match(this.tokenRe); - - if (inToken) - var re = this.tokenRe; - else if (/^\s+$/.test(line.slice(column-1, column+1))) - var re = /\s/; - else - var re = this.nonTokenRe; - - var start = column; - if (start > 0) { - do { - start--; - } - while (start >= 0 && line.charAt(start).match(re)); - start++; - } - - var end = column; - while (end < line.length && line.charAt(end).match(re)) { - end++; - } - - return new Range(row, start, row, end); - }; - this.getAWordRange = function(row, column) { - var wordRange = this.getWordRange(row, column); - var line = this.getLine(wordRange.end.row); - - while (line.charAt(wordRange.end.column).match(/[ \t]/)) { - wordRange.end.column += 1; - } - return wordRange; - }; - this.setNewLineMode = function(newLineMode) { - this.doc.setNewLineMode(newLineMode); - }; - this.getNewLineMode = function() { - return this.doc.getNewLineMode(); - }; - this.setUseWorker = function(useWorker) { this.setOption("useWorker", useWorker); }; - this.getUseWorker = function() { return this.$useWorker; }; - this.onReloadTokenizer = function(e) { - var rows = e.data; - this.bgTokenizer.start(rows.first); - this._signal("tokenizerUpdate", e); - }; - - this.$modes = {}; - this.$mode = null; - this.$modeId = null; - this.setMode = function(mode, cb) { - if (mode && typeof mode === "object") { - if (mode.getTokenizer) - return this.$onChangeMode(mode); - var options = mode; - var path = options.path; - } else { - path = mode || "ace/mode/text"; - } - if (!this.$modes["ace/mode/text"]) - this.$modes["ace/mode/text"] = new TextMode(); - - if (this.$modes[path] && !options) { - this.$onChangeMode(this.$modes[path]); - cb && cb(); - return; - } - this.$modeId = path; - config.loadModule(["mode", path], function(m) { - if (this.$modeId !== path) - return cb && cb(); - if (this.$modes[path] && !options) - return this.$onChangeMode(this.$modes[path]); - if (m && m.Mode) { - m = new m.Mode(options); - if (!options) { - this.$modes[path] = m; - m.$id = path; - } - this.$onChangeMode(m); - cb && cb(); - } - }.bind(this)); - if (!this.$mode) - this.$onChangeMode(this.$modes["ace/mode/text"], true); - }; - - this.$onChangeMode = function(mode, $isPlaceholder) { - if (!$isPlaceholder) - this.$modeId = mode.$id; - if (this.$mode === mode) - return; - - this.$mode = mode; - - this.$stopWorker(); - - if (this.$useWorker) - this.$startWorker(); - - var tokenizer = mode.getTokenizer(); - - if(tokenizer.addEventListener !== undefined) { - var onReloadTokenizer = this.onReloadTokenizer.bind(this); - tokenizer.addEventListener("update", onReloadTokenizer); - } - - if (!this.bgTokenizer) { - this.bgTokenizer = new BackgroundTokenizer(tokenizer); - var _self = this; - this.bgTokenizer.addEventListener("update", function(e) { - _self._signal("tokenizerUpdate", e); - }); - } else { - this.bgTokenizer.setTokenizer(tokenizer); - } - - this.bgTokenizer.setDocument(this.getDocument()); - - this.tokenRe = mode.tokenRe; - this.nonTokenRe = mode.nonTokenRe; - - - if (!$isPlaceholder) { - if (mode.attachToSession) - mode.attachToSession(this); - this.$options.wrapMethod.set.call(this, this.$wrapMethod); - this.$setFolding(mode.foldingRules); - this.bgTokenizer.start(0); - this._emit("changeMode"); - } - }; - - this.$stopWorker = function() { - if (this.$worker) { - this.$worker.terminate(); - this.$worker = null; - } - }; - - this.$startWorker = function() { - try { - this.$worker = this.$mode.createWorker(this); - } catch (e) { - config.warn("Could not load worker", e); - this.$worker = null; - } - }; - this.getMode = function() { - return this.$mode; - }; - - this.$scrollTop = 0; - this.setScrollTop = function(scrollTop) { - if (this.$scrollTop === scrollTop || isNaN(scrollTop)) - return; - - this.$scrollTop = scrollTop; - this._signal("changeScrollTop", scrollTop); - }; - this.getScrollTop = function() { - return this.$scrollTop; - }; - - this.$scrollLeft = 0; - this.setScrollLeft = function(scrollLeft) { - if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft)) - return; - - this.$scrollLeft = scrollLeft; - this._signal("changeScrollLeft", scrollLeft); - }; - this.getScrollLeft = function() { - return this.$scrollLeft; - }; - this.getScreenWidth = function() { - this.$computeWidth(); - if (this.lineWidgets) - return Math.max(this.getLineWidgetMaxWidth(), this.screenWidth); - return this.screenWidth; - }; - - this.getLineWidgetMaxWidth = function() { - if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth; - var width = 0; - this.lineWidgets.forEach(function(w) { - if (w && w.screenWidth > width) - width = w.screenWidth; - }); - return this.lineWidgetWidth = width; - }; - - this.$computeWidth = function(force) { - if (this.$modified || force) { - this.$modified = false; - - if (this.$useWrapMode) - return this.screenWidth = this.$wrapLimit; - - var lines = this.doc.getAllLines(); - var cache = this.$rowLengthCache; - var longestScreenLine = 0; - var foldIndex = 0; - var foldLine = this.$foldData[foldIndex]; - var foldStart = foldLine ? foldLine.start.row : Infinity; - var len = lines.length; - - for (var i = 0; i < len; i++) { - if (i > foldStart) { - i = foldLine.end.row + 1; - if (i >= len) - break; - foldLine = this.$foldData[foldIndex++]; - foldStart = foldLine ? foldLine.start.row : Infinity; - } - - if (cache[i] == null) - cache[i] = this.$getStringScreenWidth(lines[i])[0]; - - if (cache[i] > longestScreenLine) - longestScreenLine = cache[i]; - } - this.screenWidth = longestScreenLine; - } - }; - this.getLine = function(row) { - return this.doc.getLine(row); - }; - this.getLines = function(firstRow, lastRow) { - return this.doc.getLines(firstRow, lastRow); - }; - this.getLength = function() { - return this.doc.getLength(); - }; - this.getTextRange = function(range) { - return this.doc.getTextRange(range || this.selection.getRange()); - }; - this.insert = function(position, text) { - return this.doc.insert(position, text); - }; - this.remove = function(range) { - return this.doc.remove(range); - }; - this.undoChanges = function(deltas, dontSelect) { - if (!deltas.length) - return; - - this.$fromUndo = true; - var lastUndoRange = null; - for (var i = deltas.length - 1; i != -1; i--) { - var delta = deltas[i]; - if (delta.group == "doc") { - this.doc.revertDeltas(delta.deltas); - lastUndoRange = - this.$getUndoSelection(delta.deltas, true, lastUndoRange); - } else { - delta.deltas.forEach(function(foldDelta) { - this.addFolds(foldDelta.folds); - }, this); - } - } - this.$fromUndo = false; - lastUndoRange && - this.$undoSelect && - !dontSelect && - this.selection.setSelectionRange(lastUndoRange); - return lastUndoRange; - }; - this.redoChanges = function(deltas, dontSelect) { - if (!deltas.length) - return; - - this.$fromUndo = true; - var lastUndoRange = null; - for (var i = 0; i < deltas.length; i++) { - var delta = deltas[i]; - if (delta.group == "doc") { - this.doc.applyDeltas(delta.deltas); - lastUndoRange = - this.$getUndoSelection(delta.deltas, false, lastUndoRange); - } - } - this.$fromUndo = false; - lastUndoRange && - this.$undoSelect && - !dontSelect && - this.selection.setSelectionRange(lastUndoRange); - return lastUndoRange; - }; - this.setUndoSelect = function(enable) { - this.$undoSelect = enable; - }; - - this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) { - function isInsert(delta) { - var insert = - delta.action === "insertText" || delta.action === "insertLines"; - return isUndo ? !insert : insert; - } - - var delta = deltas[0]; - var range, point; - var lastDeltaIsInsert = false; - if (isInsert(delta)) { - range = Range.fromPoints(delta.range.start, delta.range.end); - lastDeltaIsInsert = true; - } else { - range = Range.fromPoints(delta.range.start, delta.range.start); - lastDeltaIsInsert = false; - } - - for (var i = 1; i < deltas.length; i++) { - delta = deltas[i]; - if (isInsert(delta)) { - point = delta.range.start; - if (range.compare(point.row, point.column) == -1) { - range.setStart(delta.range.start); - } - point = delta.range.end; - if (range.compare(point.row, point.column) == 1) { - range.setEnd(delta.range.end); - } - lastDeltaIsInsert = true; - } else { - point = delta.range.start; - if (range.compare(point.row, point.column) == -1) { - range = - Range.fromPoints(delta.range.start, delta.range.start); - } - lastDeltaIsInsert = false; - } - } - if (lastUndoRange != null) { - if (Range.comparePoints(lastUndoRange.start, range.start) === 0) { - lastUndoRange.start.column += range.end.column - range.start.column; - lastUndoRange.end.column += range.end.column - range.start.column; - } - - var cmp = lastUndoRange.compareRange(range); - if (cmp == 1) { - range.setStart(lastUndoRange.start); - } else if (cmp == -1) { - range.setEnd(lastUndoRange.end); - } - } - - return range; - }; - this.replace = function(range, text) { - return this.doc.replace(range, text); - }; - this.moveText = function(fromRange, toPosition, copy) { - var text = this.getTextRange(fromRange); - var folds = this.getFoldsInRange(fromRange); - - var toRange = Range.fromPoints(toPosition, toPosition); - if (!copy) { - this.remove(fromRange); - var rowDiff = fromRange.start.row - fromRange.end.row; - var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column; - if (collDiff) { - if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column) - toRange.start.column += collDiff; - if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column) - toRange.end.column += collDiff; - } - if (rowDiff && toRange.start.row >= fromRange.end.row) { - toRange.start.row += rowDiff; - toRange.end.row += rowDiff; - } - } - - toRange.end = this.insert(toRange.start, text); - if (folds.length) { - var oldStart = fromRange.start; - var newStart = toRange.start; - var rowDiff = newStart.row - oldStart.row; - var collDiff = newStart.column - oldStart.column; - this.addFolds(folds.map(function(x) { - x = x.clone(); - if (x.start.row == oldStart.row) - x.start.column += collDiff; - if (x.end.row == oldStart.row) - x.end.column += collDiff; - x.start.row += rowDiff; - x.end.row += rowDiff; - return x; - })); - } - - return toRange; - }; - this.indentRows = function(startRow, endRow, indentString) { - indentString = indentString.replace(/\t/g, this.getTabString()); - for (var row=startRow; row<=endRow; row++) - this.insert({row: row, column:0}, indentString); - }; - this.outdentRows = function (range) { - var rowRange = range.collapseRows(); - var deleteRange = new Range(0, 0, 0, 0); - var size = this.getTabSize(); - - for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) { - var line = this.getLine(i); - - deleteRange.start.row = i; - deleteRange.end.row = i; - for (var j = 0; j < size; ++j) - if (line.charAt(j) != ' ') - break; - if (j < size && line.charAt(j) == '\t') { - deleteRange.start.column = j; - deleteRange.end.column = j + 1; - } else { - deleteRange.start.column = 0; - deleteRange.end.column = j; - } - this.remove(deleteRange); - } - }; - - this.$moveLines = function(firstRow, lastRow, dir) { - firstRow = this.getRowFoldStart(firstRow); - lastRow = this.getRowFoldEnd(lastRow); - if (dir < 0) { - var row = this.getRowFoldStart(firstRow + dir); - if (row < 0) return 0; - var diff = row-firstRow; - } else if (dir > 0) { - var row = this.getRowFoldEnd(lastRow + dir); - if (row > this.doc.getLength()-1) return 0; - var diff = row-lastRow; - } else { - firstRow = this.$clipRowToDocument(firstRow); - lastRow = this.$clipRowToDocument(lastRow); - var diff = lastRow - firstRow + 1; - } - - var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE); - var folds = this.getFoldsInRange(range).map(function(x){ - x = x.clone(); - x.start.row += diff; - x.end.row += diff; - return x; - }); - - var lines = dir == 0 - ? this.doc.getLines(firstRow, lastRow) - : this.doc.removeLines(firstRow, lastRow); - this.doc.insertLines(firstRow+diff, lines); - folds.length && this.addFolds(folds); - return diff; - }; - this.moveLinesUp = function(firstRow, lastRow) { - return this.$moveLines(firstRow, lastRow, -1); - }; - this.moveLinesDown = function(firstRow, lastRow) { - return this.$moveLines(firstRow, lastRow, 1); - }; - this.duplicateLines = function(firstRow, lastRow) { - return this.$moveLines(firstRow, lastRow, 0); - }; - - - this.$clipRowToDocument = function(row) { - return Math.max(0, Math.min(row, this.doc.getLength()-1)); - }; - - this.$clipColumnToRow = function(row, column) { - if (column < 0) - return 0; - return Math.min(this.doc.getLine(row).length, column); - }; - - - this.$clipPositionToDocument = function(row, column) { - column = Math.max(0, column); - - if (row < 0) { - row = 0; - column = 0; - } else { - var len = this.doc.getLength(); - if (row >= len) { - row = len - 1; - column = this.doc.getLine(len-1).length; - } else { - column = Math.min(this.doc.getLine(row).length, column); - } - } - - return { - row: row, - column: column - }; - }; - - this.$clipRangeToDocument = function(range) { - if (range.start.row < 0) { - range.start.row = 0; - range.start.column = 0; - } else { - range.start.column = this.$clipColumnToRow( - range.start.row, - range.start.column - ); - } - - var len = this.doc.getLength() - 1; - if (range.end.row > len) { - range.end.row = len; - range.end.column = this.doc.getLine(len).length; - } else { - range.end.column = this.$clipColumnToRow( - range.end.row, - range.end.column - ); - } - return range; - }; - this.$wrapLimit = 80; - this.$useWrapMode = false; - this.$wrapLimitRange = { - min : null, - max : null - }; - this.setUseWrapMode = function(useWrapMode) { - if (useWrapMode != this.$useWrapMode) { - this.$useWrapMode = useWrapMode; - this.$modified = true; - this.$resetRowCache(0); - if (useWrapMode) { - var len = this.getLength(); - this.$wrapData = Array(len); - this.$updateWrapData(0, len - 1); - } - - this._signal("changeWrapMode"); - } - }; - this.getUseWrapMode = function() { - return this.$useWrapMode; - }; - this.setWrapLimitRange = function(min, max) { - if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) { - this.$wrapLimitRange = { - min: min, - max: max - }; - this.$modified = true; - this._signal("changeWrapMode"); - } - }; - this.adjustWrapLimit = function(desiredLimit, $printMargin) { - var limits = this.$wrapLimitRange; - if (limits.max < 0) - limits = {min: $printMargin, max: $printMargin}; - var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max); - if (wrapLimit != this.$wrapLimit && wrapLimit > 1) { - this.$wrapLimit = wrapLimit; - this.$modified = true; - if (this.$useWrapMode) { - this.$updateWrapData(0, this.getLength() - 1); - this.$resetRowCache(0); - this._signal("changeWrapLimit"); - } - return true; - } - return false; - }; - - this.$constrainWrapLimit = function(wrapLimit, min, max) { - if (min) - wrapLimit = Math.max(min, wrapLimit); - - if (max) - wrapLimit = Math.min(max, wrapLimit); - - return wrapLimit; - }; - this.getWrapLimit = function() { - return this.$wrapLimit; - }; - this.setWrapLimit = function (limit) { - this.setWrapLimitRange(limit, limit); - }; - this.getWrapLimitRange = function() { - return { - min : this.$wrapLimitRange.min, - max : this.$wrapLimitRange.max - }; - }; - - this.$updateInternalDataOnChange = function(e) { - var useWrapMode = this.$useWrapMode; - var len; - var action = e.data.action; - var firstRow = e.data.range.start.row; - var lastRow = e.data.range.end.row; - var start = e.data.range.start; - var end = e.data.range.end; - var removedFolds = null; - - if (action.indexOf("Lines") != -1) { - if (action == "insertLines") { - lastRow = firstRow + (e.data.lines.length); - } else { - lastRow = firstRow; - } - len = e.data.lines ? e.data.lines.length : lastRow - firstRow; - } else { - len = lastRow - firstRow; - } - - this.$updating = true; - if (len != 0) { - if (action.indexOf("remove") != -1) { - this[useWrapMode ? "$wrapData" : "$rowLengthCache"].splice(firstRow, len); - - var foldLines = this.$foldData; - removedFolds = this.getFoldsInRange(e.data.range); - this.removeFolds(removedFolds); - - var foldLine = this.getFoldLine(end.row); - var idx = 0; - if (foldLine) { - foldLine.addRemoveChars(end.row, end.column, start.column - end.column); - foldLine.shiftRow(-len); - - var foldLineBefore = this.getFoldLine(firstRow); - if (foldLineBefore && foldLineBefore !== foldLine) { - foldLineBefore.merge(foldLine); - foldLine = foldLineBefore; - } - idx = foldLines.indexOf(foldLine) + 1; - } - - for (idx; idx < foldLines.length; idx++) { - var foldLine = foldLines[idx]; - if (foldLine.start.row >= end.row) { - foldLine.shiftRow(-len); - } - } - - lastRow = firstRow; - } else { - var args = Array(len); - args.unshift(firstRow, 0); - var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache - arr.splice.apply(arr, args); - var foldLines = this.$foldData; - var foldLine = this.getFoldLine(firstRow); - var idx = 0; - if (foldLine) { - var cmp = foldLine.range.compareInside(start.row, start.column); - if (cmp == 0) { - foldLine = foldLine.split(start.row, start.column); - if (foldLine) { - foldLine.shiftRow(len); - foldLine.addRemoveChars(lastRow, 0, end.column - start.column); - } - } else - if (cmp == -1) { - foldLine.addRemoveChars(firstRow, 0, end.column - start.column); - foldLine.shiftRow(len); - } - idx = foldLines.indexOf(foldLine) + 1; - } - - for (idx; idx < foldLines.length; idx++) { - var foldLine = foldLines[idx]; - if (foldLine.start.row >= firstRow) { - foldLine.shiftRow(len); - } - } - } - } else { - len = Math.abs(e.data.range.start.column - e.data.range.end.column); - if (action.indexOf("remove") != -1) { - removedFolds = this.getFoldsInRange(e.data.range); - this.removeFolds(removedFolds); - - len = -len; - } - var foldLine = this.getFoldLine(firstRow); - if (foldLine) { - foldLine.addRemoveChars(firstRow, start.column, len); - } - } - - if (useWrapMode && this.$wrapData.length != this.doc.getLength()) { - console.error("doc.getLength() and $wrapData.length have to be the same!"); - } - this.$updating = false; - - if (useWrapMode) - this.$updateWrapData(firstRow, lastRow); - else - this.$updateRowLengthCache(firstRow, lastRow); - - return removedFolds; - }; - - this.$updateRowLengthCache = function(firstRow, lastRow, b) { - this.$rowLengthCache[firstRow] = null; - this.$rowLengthCache[lastRow] = null; - }; - - this.$updateWrapData = function(firstRow, lastRow) { - var lines = this.doc.getAllLines(); - var tabSize = this.getTabSize(); - var wrapData = this.$wrapData; - var wrapLimit = this.$wrapLimit; - var tokens; - var foldLine; - - var row = firstRow; - lastRow = Math.min(lastRow, lines.length - 1); - while (row <= lastRow) { - foldLine = this.getFoldLine(row, foldLine); - if (!foldLine) { - tokens = this.$getDisplayTokens(lines[row]); - wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize); - row ++; - } else { - tokens = []; - foldLine.walk(function(placeholder, row, column, lastColumn) { - var walkTokens; - if (placeholder != null) { - walkTokens = this.$getDisplayTokens( - placeholder, tokens.length); - walkTokens[0] = PLACEHOLDER_START; - for (var i = 1; i < walkTokens.length; i++) { - walkTokens[i] = PLACEHOLDER_BODY; - } - } else { - walkTokens = this.$getDisplayTokens( - lines[row].substring(lastColumn, column), - tokens.length); - } - tokens = tokens.concat(walkTokens); - }.bind(this), - foldLine.end.row, - lines[foldLine.end.row].length + 1 - ); - - wrapData[foldLine.start.row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize); - row = foldLine.end.row + 1; - } - } - }; - var CHAR = 1, - CHAR_EXT = 2, - PLACEHOLDER_START = 3, - PLACEHOLDER_BODY = 4, - PUNCTUATION = 9, - SPACE = 10, - TAB = 11, - TAB_SPACE = 12; - - - this.$computeWrapSplits = function(tokens, wrapLimit) { - if (tokens.length == 0) { - return []; - } - - var splits = []; - var displayLength = tokens.length; - var lastSplit = 0, lastDocSplit = 0; - - var isCode = this.$wrapAsCode; - - function addSplit(screenPos) { - var displayed = tokens.slice(lastSplit, screenPos); - var len = displayed.length; - displayed.join(""). - replace(/12/g, function() { - len -= 1; - }). - replace(/2/g, function() { - len -= 1; - }); - - lastDocSplit += len; - splits.push(lastDocSplit); - lastSplit = screenPos; - } - - while (displayLength - lastSplit > wrapLimit) { - var split = lastSplit + wrapLimit; - if (tokens[split - 1] >= SPACE && tokens[split] >= SPACE) { - addSplit(split); - continue; - } - if (tokens[split] == PLACEHOLDER_START || tokens[split] == PLACEHOLDER_BODY) { - for (split; split != lastSplit - 1; split--) { - if (tokens[split] == PLACEHOLDER_START) { - break; - } - } - if (split > lastSplit) { - addSplit(split); - continue; - } - split = lastSplit + wrapLimit; - for (split; split < tokens.length; split++) { - if (tokens[split] != PLACEHOLDER_BODY) { - break; - } - } - if (split == tokens.length) { - break; // Breaks the while-loop. - } - addSplit(split); - continue; - } - var minSplit = Math.max(split - (isCode ? 10 : wrapLimit-(wrapLimit>>2)), lastSplit - 1); - while (split > minSplit && tokens[split] < PLACEHOLDER_START) { - split --; - } - if (isCode) { - while (split > minSplit && tokens[split] < PLACEHOLDER_START) { - split --; - } - while (split > minSplit && tokens[split] == PUNCTUATION) { - split --; - } - } else { - while (split > minSplit && tokens[split] < SPACE) { - split --; - } - } - if (split > minSplit) { - addSplit(++split); - continue; - } - split = lastSplit + wrapLimit; - if (tokens[split] == CHAR_EXT) - split--; - addSplit(split); - } - return splits; - }; - this.$getDisplayTokens = function(str, offset) { - var arr = []; - var tabSize; - offset = offset || 0; - - for (var i = 0; i < str.length; i++) { - var c = str.charCodeAt(i); - if (c == 9) { - tabSize = this.getScreenTabSize(arr.length + offset); - arr.push(TAB); - for (var n = 1; n < tabSize; n++) { - arr.push(TAB_SPACE); - } - } - else if (c == 32) { - arr.push(SPACE); - } else if((c > 39 && c < 48) || (c > 57 && c < 64)) { - arr.push(PUNCTUATION); - } - else if (c >= 0x1100 && isFullWidth(c)) { - arr.push(CHAR, CHAR_EXT); - } else { - arr.push(CHAR); - } - } - return arr; - }; - this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) { - if (maxScreenColumn == 0) - return [0, 0]; - if (maxScreenColumn == null) - maxScreenColumn = Infinity; - screenColumn = screenColumn || 0; - - var c, column; - for (column = 0; column < str.length; column++) { - c = str.charCodeAt(column); - if (c == 9) { - screenColumn += this.getScreenTabSize(screenColumn); - } - else if (c >= 0x1100 && isFullWidth(c)) { - screenColumn += 2; - } else { - screenColumn += 1; - } - if (screenColumn > maxScreenColumn) { - break; - } - } - - return [screenColumn, column]; - }; - - this.lineWidgets = null; - this.getRowLength = function(row) { - if (this.lineWidgets) - var h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0; - else - h = 0 - if (!this.$useWrapMode || !this.$wrapData[row]) { - return 1 + h; - } else { - return this.$wrapData[row].length + 1 + h; - } - }; - this.getRowLineCount = function(row) { - if (!this.$useWrapMode || !this.$wrapData[row]) { - return 1; - } else { - return this.$wrapData[row].length + 1; - } - }; - this.getScreenLastRowColumn = function(screenRow) { - var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE); - return this.documentToScreenColumn(pos.row, pos.column); - }; - this.getDocumentLastRowColumn = function(docRow, docColumn) { - var screenRow = this.documentToScreenRow(docRow, docColumn); - return this.getScreenLastRowColumn(screenRow); - }; - this.getDocumentLastRowColumnPosition = function(docRow, docColumn) { - var screenRow = this.documentToScreenRow(docRow, docColumn); - return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10); - }; - this.getRowSplitData = function(row) { - if (!this.$useWrapMode) { - return undefined; - } else { - return this.$wrapData[row]; - } - }; - this.getScreenTabSize = function(screenColumn) { - return this.$tabSize - screenColumn % this.$tabSize; - }; - - - this.screenToDocumentRow = function(screenRow, screenColumn) { - return this.screenToDocumentPosition(screenRow, screenColumn).row; - }; - - - this.screenToDocumentColumn = function(screenRow, screenColumn) { - return this.screenToDocumentPosition(screenRow, screenColumn).column; - }; - this.screenToDocumentPosition = function(screenRow, screenColumn) { - if (screenRow < 0) - return {row: 0, column: 0}; - - var line; - var docRow = 0; - var docColumn = 0; - var column; - var row = 0; - var rowLength = 0; - - var rowCache = this.$screenRowCache; - var i = this.$getRowCacheIndex(rowCache, screenRow); - var l = rowCache.length; - if (l && i >= 0) { - var row = rowCache[i]; - var docRow = this.$docRowCache[i]; - var doCache = screenRow > rowCache[l - 1]; - } else { - var doCache = !l; - } - - var maxRow = this.getLength() - 1; - var foldLine = this.getNextFoldLine(docRow); - var foldStart = foldLine ? foldLine.start.row : Infinity; - - while (row <= screenRow) { - rowLength = this.getRowLength(docRow); - if (row + rowLength > screenRow || docRow >= maxRow) { - break; - } else { - row += rowLength; - docRow++; - if (docRow > foldStart) { - docRow = foldLine.end.row+1; - foldLine = this.getNextFoldLine(docRow, foldLine); - foldStart = foldLine ? foldLine.start.row : Infinity; - } - } - - if (doCache) { - this.$docRowCache.push(docRow); - this.$screenRowCache.push(row); - } - } - - if (foldLine && foldLine.start.row <= docRow) { - line = this.getFoldDisplayLine(foldLine); - docRow = foldLine.start.row; - } else if (row + rowLength <= screenRow || docRow > maxRow) { - return { - row: maxRow, - column: this.getLine(maxRow).length - }; - } else { - line = this.getLine(docRow); - foldLine = null; - } - - if (this.$useWrapMode) { - var splits = this.$wrapData[docRow]; - if (splits) { - var splitIndex = Math.floor(screenRow - row); - column = splits[splitIndex]; - if(splitIndex > 0 && splits.length) { - docColumn = splits[splitIndex - 1] || splits[splits.length - 1]; - line = line.substring(docColumn); - } - } - } - - docColumn += this.$getStringScreenWidth(line, screenColumn)[1]; - if (this.$useWrapMode && docColumn >= column) - docColumn = column - 1; - - if (foldLine) - return foldLine.idxToPosition(docColumn); - - return {row: docRow, column: docColumn}; - }; - this.documentToScreenPosition = function(docRow, docColumn) { - if (typeof docColumn === "undefined") - var pos = this.$clipPositionToDocument(docRow.row, docRow.column); - else - pos = this.$clipPositionToDocument(docRow, docColumn); - - docRow = pos.row; - docColumn = pos.column; - - var screenRow = 0; - var foldStartRow = null; - var fold = null; - fold = this.getFoldAt(docRow, docColumn, 1); - if (fold) { - docRow = fold.start.row; - docColumn = fold.start.column; - } - - var rowEnd, row = 0; - - - var rowCache = this.$docRowCache; - var i = this.$getRowCacheIndex(rowCache, docRow); - var l = rowCache.length; - if (l && i >= 0) { - var row = rowCache[i]; - var screenRow = this.$screenRowCache[i]; - var doCache = docRow > rowCache[l - 1]; - } else { - var doCache = !l; - } - - var foldLine = this.getNextFoldLine(row); - var foldStart = foldLine ?foldLine.start.row :Infinity; - - while (row < docRow) { - if (row >= foldStart) { - rowEnd = foldLine.end.row + 1; - if (rowEnd > docRow) - break; - foldLine = this.getNextFoldLine(rowEnd, foldLine); - foldStart = foldLine ?foldLine.start.row :Infinity; - } - else { - rowEnd = row + 1; - } - - screenRow += this.getRowLength(row); - row = rowEnd; - - if (doCache) { - this.$docRowCache.push(row); - this.$screenRowCache.push(screenRow); - } - } - var textLine = ""; - if (foldLine && row >= foldStart) { - textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn); - foldStartRow = foldLine.start.row; - } else { - textLine = this.getLine(docRow).substring(0, docColumn); - foldStartRow = docRow; - } - if (this.$useWrapMode) { - var wrapRow = this.$wrapData[foldStartRow]; - if (wrapRow) { - var screenRowOffset = 0; - while (textLine.length >= wrapRow[screenRowOffset]) { - screenRow ++; - screenRowOffset++; - } - textLine = textLine.substring( - wrapRow[screenRowOffset - 1] || 0, textLine.length - ); - } - } - - return { - row: screenRow, - column: this.$getStringScreenWidth(textLine)[0] - }; - }; - this.documentToScreenColumn = function(row, docColumn) { - return this.documentToScreenPosition(row, docColumn).column; - }; - this.documentToScreenRow = function(docRow, docColumn) { - return this.documentToScreenPosition(docRow, docColumn).row; - }; - this.getScreenLength = function() { - var screenRows = 0; - var fold = null; - if (!this.$useWrapMode) { - screenRows = this.getLength(); - var foldData = this.$foldData; - for (var i = 0; i < foldData.length; i++) { - fold = foldData[i]; - screenRows -= fold.end.row - fold.start.row; - } - } else { - var lastRow = this.$wrapData.length; - var row = 0, i = 0; - var fold = this.$foldData[i++]; - var foldStart = fold ? fold.start.row :Infinity; - - while (row < lastRow) { - var splits = this.$wrapData[row]; - screenRows += splits ? splits.length + 1 : 1; - row ++; - if (row > foldStart) { - row = fold.end.row+1; - fold = this.$foldData[i++]; - foldStart = fold ?fold.start.row :Infinity; - } - } - } - if (this.lineWidgets) - screenRows += this.$getWidgetScreenLength(); - - return screenRows; - }; - this.$setFontMetrics = function(fm) { - }; - - this.destroy = function() { - if (this.bgTokenizer) { - this.bgTokenizer.setDocument(null); - this.bgTokenizer = null; - } - this.$stopWorker(); - }; - function isFullWidth(c) { - if (c < 0x1100) - return false; - return c >= 0x1100 && c <= 0x115F || - c >= 0x11A3 && c <= 0x11A7 || - c >= 0x11FA && c <= 0x11FF || - c >= 0x2329 && c <= 0x232A || - c >= 0x2E80 && c <= 0x2E99 || - c >= 0x2E9B && c <= 0x2EF3 || - c >= 0x2F00 && c <= 0x2FD5 || - c >= 0x2FF0 && c <= 0x2FFB || - c >= 0x3000 && c <= 0x303E || - c >= 0x3041 && c <= 0x3096 || - c >= 0x3099 && c <= 0x30FF || - c >= 0x3105 && c <= 0x312D || - c >= 0x3131 && c <= 0x318E || - c >= 0x3190 && c <= 0x31BA || - c >= 0x31C0 && c <= 0x31E3 || - c >= 0x31F0 && c <= 0x321E || - c >= 0x3220 && c <= 0x3247 || - c >= 0x3250 && c <= 0x32FE || - c >= 0x3300 && c <= 0x4DBF || - c >= 0x4E00 && c <= 0xA48C || - c >= 0xA490 && c <= 0xA4C6 || - c >= 0xA960 && c <= 0xA97C || - c >= 0xAC00 && c <= 0xD7A3 || - c >= 0xD7B0 && c <= 0xD7C6 || - c >= 0xD7CB && c <= 0xD7FB || - c >= 0xF900 && c <= 0xFAFF || - c >= 0xFE10 && c <= 0xFE19 || - c >= 0xFE30 && c <= 0xFE52 || - c >= 0xFE54 && c <= 0xFE66 || - c >= 0xFE68 && c <= 0xFE6B || - c >= 0xFF01 && c <= 0xFF60 || - c >= 0xFFE0 && c <= 0xFFE6; - }; - -}).call(EditSession.prototype); - -require("./edit_session/folding").Folding.call(EditSession.prototype); -require("./edit_session/bracket_match").BracketMatch.call(EditSession.prototype); - - -config.defineOptions(EditSession.prototype, "session", { - wrap: { - set: function(value) { - if (!value || value == "off") - value = false; - else if (value == "free") - value = true; - else if (value == "printMargin") - value = -1; - else if (typeof value == "string") - value = parseInt(value, 10) || false; - - if (this.$wrap == value) - return; - if (!value) { - this.setUseWrapMode(false); - } else { - var col = typeof value == "number" ? value : null; - this.setWrapLimitRange(col, col); - this.setUseWrapMode(true); - } - this.$wrap = value; - }, - get: function() { - if (this.getUseWrapMode()) { - if (this.$wrap == -1) - return "printMargin"; - if (!this.getWrapLimitRange().min) - return "free"; - return this.$wrap; - } - return "off"; - }, - handlesSet: true - }, - wrapMethod: { - set: function(val) { - val = val == "auto" - ? this.$mode.type != "text" - : val != "text"; - if (val != this.$wrapAsCode) { - this.$wrapAsCode = val; - if (this.$useWrapMode) { - this.$modified = true; - this.$resetRowCache(0); - this.$updateWrapData(0, this.getLength() - 1); - } - } - }, - initialValue: "auto" - }, - firstLineNumber: { - set: function() {this._signal("changeBreakpoint");}, - initialValue: 1 - }, - useWorker: { - set: function(useWorker) { - this.$useWorker = useWorker; - - this.$stopWorker(); - if (useWorker) - this.$startWorker(); - }, - initialValue: true - }, - useSoftTabs: {initialValue: true}, - tabSize: { - set: function(tabSize) { - if (isNaN(tabSize) || this.$tabSize === tabSize) return; - - this.$modified = true; - this.$rowLengthCache = []; - this.$tabSize = tabSize; - this._signal("changeTabSize"); - }, - initialValue: 4, - handlesSet: true - }, - overwrite: { - set: function(val) {this._signal("changeOverwrite");}, - initialValue: false - }, - newLineMode: { - set: function(val) {this.doc.setNewLineMode(val)}, - get: function() {return this.doc.getNewLineMode()}, - handlesSet: true - }, - mode: { - set: function(val) { this.setMode(val) }, - get: function() { return this.$modeId } - } -}); - -exports.EditSession = EditSession; -}); - -define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(require, exports, module) { -"use strict"; - -var lang = require("./lib/lang"); -var oop = require("./lib/oop"); -var Range = require("./range").Range; - -var Search = function() { - this.$options = {}; -}; - -(function() { - this.set = function(options) { - oop.mixin(this.$options, options); - return this; - }; - this.getOptions = function() { - return lang.copyObject(this.$options); - }; - this.setOptions = function(options) { - this.$options = options; - }; - this.find = function(session) { - var options = this.$options; - var iterator = this.$matchIterator(session, options); - if (!iterator) - return false; - - var firstRange = null; - iterator.forEach(function(range, row, offset) { - if (!range.start) { - var column = range.offset + (offset || 0); - firstRange = new Range(row, column, row, column + range.length); - if (!range.length && options.start && options.start.start - && options.skipCurrent != false && firstRange.isEqual(options.start) - ) { - firstRange = null; - return false; - } - } else - firstRange = range; - return true; - }); - - return firstRange; - }; - this.findAll = function(session) { - var options = this.$options; - if (!options.needle) - return []; - this.$assembleRegExp(options); - - var range = options.range; - var lines = range - ? session.getLines(range.start.row, range.end.row) - : session.doc.getAllLines(); - - var ranges = []; - var re = options.re; - if (options.$isMultiLine) { - var len = re.length; - var maxRow = lines.length - len; - var prevRange; - outer: for (var row = re.offset || 0; row <= maxRow; row++) { - for (var j = 0; j < len; j++) - if (lines[row + j].search(re[j]) == -1) - continue outer; - - var startLine = lines[row]; - var line = lines[row + len - 1]; - var startIndex = startLine.length - startLine.match(re[0])[0].length; - var endIndex = line.match(re[len - 1])[0].length; - - if (prevRange && prevRange.end.row === row && - prevRange.end.column > startIndex - ) { - continue; - } - ranges.push(prevRange = new Range( - row, startIndex, row + len - 1, endIndex - )); - if (len > 2) - row = row + len - 2; - } - } else { - for (var i = 0; i < lines.length; i++) { - var matches = lang.getMatchOffsets(lines[i], re); - for (var j = 0; j < matches.length; j++) { - var match = matches[j]; - ranges.push(new Range(i, match.offset, i, match.offset + match.length)); - } - } - } - - if (range) { - var startColumn = range.start.column; - var endColumn = range.start.column; - var i = 0, j = ranges.length - 1; - while (i < j && ranges[i].start.column < startColumn && ranges[i].start.row == range.start.row) - i++; - - while (i < j && ranges[j].end.column > endColumn && ranges[j].end.row == range.end.row) - j--; - - ranges = ranges.slice(i, j + 1); - for (i = 0, j = ranges.length; i < j; i++) { - ranges[i].start.row += range.start.row; - ranges[i].end.row += range.start.row; - } - } - - return ranges; - }; - this.replace = function(input, replacement) { - var options = this.$options; - - var re = this.$assembleRegExp(options); - if (options.$isMultiLine) - return replacement; - - if (!re) - return; - - var match = re.exec(input); - if (!match || match[0].length != input.length) - return null; - - replacement = input.replace(re, replacement); - if (options.preserveCase) { - replacement = replacement.split(""); - for (var i = Math.min(input.length, input.length); i--; ) { - var ch = input[i]; - if (ch && ch.toLowerCase() != ch) - replacement[i] = replacement[i].toUpperCase(); - else - replacement[i] = replacement[i].toLowerCase(); - } - replacement = replacement.join(""); - } - - return replacement; - }; - - this.$matchIterator = function(session, options) { - var re = this.$assembleRegExp(options); - if (!re) - return false; - - var callback; - if (options.$isMultiLine) { - var len = re.length; - var matchIterator = function(line, row, offset) { - var startIndex = line.search(re[0]); - if (startIndex == -1) - return; - for (var i = 1; i < len; i++) { - line = session.getLine(row + i); - if (line.search(re[i]) == -1) - return; - } - - var endIndex = line.match(re[len - 1])[0].length; - - var range = new Range(row, startIndex, row + len - 1, endIndex); - if (re.offset == 1) { - range.start.row--; - range.start.column = Number.MAX_VALUE; - } else if (offset) - range.start.column += offset; - - if (callback(range)) - return true; - }; - } else if (options.backwards) { - var matchIterator = function(line, row, startIndex) { - var matches = lang.getMatchOffsets(line, re); - for (var i = matches.length-1; i >= 0; i--) - if (callback(matches[i], row, startIndex)) - return true; - }; - } else { - var matchIterator = function(line, row, startIndex) { - var matches = lang.getMatchOffsets(line, re); - for (var i = 0; i < matches.length; i++) - if (callback(matches[i], row, startIndex)) - return true; - }; - } - - var lineIterator = this.$lineIterator(session, options); - - return { - forEach: function(_callback) { - callback = _callback; - lineIterator.forEach(matchIterator); - } - }; - }; - - this.$assembleRegExp = function(options, $disableFakeMultiline) { - if (options.needle instanceof RegExp) - return options.re = options.needle; - - var needle = options.needle; - - if (!options.needle) - return options.re = false; - - if (!options.regExp) - needle = lang.escapeRegExp(needle); - - if (options.wholeWord) - needle = "\\b" + needle + "\\b"; - - var modifier = options.caseSensitive ? "gm" : "gmi"; - - options.$isMultiLine = !$disableFakeMultiline && /[\n\r]/.test(needle); - if (options.$isMultiLine) - return options.re = this.$assembleMultilineRegExp(needle, modifier); - - try { - var re = new RegExp(needle, modifier); - } catch(e) { - re = false; - } - return options.re = re; - }; - - this.$assembleMultilineRegExp = function(needle, modifier) { - var parts = needle.replace(/\r\n|\r|\n/g, "$\n^").split("\n"); - var re = []; - for (var i = 0; i < parts.length; i++) try { - re.push(new RegExp(parts[i], modifier)); - } catch(e) { - return false; - } - if (parts[0] == "") { - re.shift(); - re.offset = 1; - } else { - re.offset = 0; - } - return re; - }; - - this.$lineIterator = function(session, options) { - var backwards = options.backwards == true; - var skipCurrent = options.skipCurrent != false; - - var range = options.range; - var start = options.start; - if (!start) - start = range ? range[backwards ? "end" : "start"] : session.selection.getRange(); - - if (start.start) - start = start[skipCurrent != backwards ? "end" : "start"]; - - var firstRow = range ? range.start.row : 0; - var lastRow = range ? range.end.row : session.getLength() - 1; - - var forEach = backwards ? function(callback) { - var row = start.row; - - var line = session.getLine(row).substring(0, start.column); - if (callback(line, row)) - return; - - for (row--; row >= firstRow; row--) - if (callback(session.getLine(row), row)) - return; - - if (options.wrap == false) - return; - - for (row = lastRow, firstRow = start.row; row >= firstRow; row--) - if (callback(session.getLine(row), row)) - return; - } : function(callback) { - var row = start.row; - - var line = session.getLine(row).substr(start.column); - if (callback(line, row, start.column)) - return; - - for (row = row+1; row <= lastRow; row++) - if (callback(session.getLine(row), row)) - return; - - if (options.wrap == false) - return; - - for (row = firstRow, lastRow = start.row; row <= lastRow; row++) - if (callback(session.getLine(row), row)) - return; - }; - - return {forEach: forEach}; - }; - -}).call(Search.prototype); - -exports.Search = Search; -}); - -define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module) { -"use strict"; - -var keyUtil = require("../lib/keys"); -var useragent = require("../lib/useragent"); -var KEY_MODS = keyUtil.KEY_MODS; - -function HashHandler(config, platform) { - this.platform = platform || (useragent.isMac ? "mac" : "win"); - this.commands = {}; - this.commandKeyBinding = {}; - this.addCommands(config); - this.$singleCommand = true; -} - -function MultiHashHandler(config, platform) { - HashHandler.call(this, config, platform); - this.$singleCommand = false; -} - -MultiHashHandler.prototype = HashHandler.prototype; - -(function() { - - - this.addCommand = function(command) { - if (this.commands[command.name]) - this.removeCommand(command); - - this.commands[command.name] = command; - - if (command.bindKey) - this._buildKeyHash(command); - }; - - this.removeCommand = function(command, keepCommand) { - var name = command && (typeof command === 'string' ? command : command.name); - command = this.commands[name]; - if (!keepCommand) - delete this.commands[name]; - var ckb = this.commandKeyBinding; - for (var keyId in ckb) { - var cmdGroup = ckb[keyId]; - if (cmdGroup == command) { - delete ckb[keyId]; - } else if (Array.isArray(cmdGroup)) { - var i = cmdGroup.indexOf(command); - if (i != -1) { - cmdGroup.splice(i, 1); - if (cmdGroup.length == 1) - ckb[keyId] = cmdGroup[0]; - } - } - } - }; - - this.bindKey = function(key, command, asDefault) { - if (typeof key == "object") - key = key[this.platform]; - if (!key) - return; - if (typeof command == "function") - return this.addCommand({exec: command, bindKey: key, name: command.name || key}); - - key.split("|").forEach(function(keyPart) { - var chain = ""; - if (keyPart.indexOf(" ") != -1) { - var parts = keyPart.split(/\s+/); - keyPart = parts.pop(); - parts.forEach(function(keyPart) { - var binding = this.parseKeys(keyPart); - var id = KEY_MODS[binding.hashId] + binding.key; - chain += (chain ? " " : "") + id; - this._addCommandToBinding(chain, "chainKeys"); - }, this); - chain += " "; - } - var binding = this.parseKeys(keyPart); - var id = KEY_MODS[binding.hashId] + binding.key; - this._addCommandToBinding(chain + id, command, asDefault); - }, this); - }; - - this._addCommandToBinding = function(keyId, command, asDefault) { - var ckb = this.commandKeyBinding, i; - if (!command) { - delete ckb[keyId]; - } else if (!ckb[keyId] || this.$singleCommand) { - ckb[keyId] = command; - } else { - if (!Array.isArray(ckb[keyId])) { - ckb[keyId] = [ckb[keyId]]; - } else if ((i = ckb[keyId].indexOf(command)) != -1) { - ckb[keyId].splice(i, 1); - } - - if (asDefault || command.isDefault) - ckb[keyId].unshift(command); - else - ckb[keyId].push(command); - } - }; - - this.addCommands = function(commands) { - commands && Object.keys(commands).forEach(function(name) { - var command = commands[name]; - if (!command) - return; - - if (typeof command === "string") - return this.bindKey(command, name); - - if (typeof command === "function") - command = { exec: command }; - - if (typeof command !== "object") - return; - - if (!command.name) - command.name = name; - - this.addCommand(command); - }, this); - }; - - this.removeCommands = function(commands) { - Object.keys(commands).forEach(function(name) { - this.removeCommand(commands[name]); - }, this); - }; - - this.bindKeys = function(keyList) { - Object.keys(keyList).forEach(function(key) { - this.bindKey(key, keyList[key]); - }, this); - }; - - this._buildKeyHash = function(command) { - this.bindKey(command.bindKey, command); - }; - this.parseKeys = function(keys) { - var parts = keys.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(x){return x}); - var key = parts.pop(); - - var keyCode = keyUtil[key]; - if (keyUtil.FUNCTION_KEYS[keyCode]) - key = keyUtil.FUNCTION_KEYS[keyCode].toLowerCase(); - else if (!parts.length) - return {key: key, hashId: -1}; - else if (parts.length == 1 && parts[0] == "shift") - return {key: key.toUpperCase(), hashId: -1}; - - var hashId = 0; - for (var i = parts.length; i--;) { - var modifier = keyUtil.KEY_MODS[parts[i]]; - if (modifier == null) { - if (typeof console != "undefined") - console.error("invalid modifier " + parts[i] + " in " + keys); - return false; - } - hashId |= modifier; - } - return {key: key, hashId: hashId}; - }; - - this.findKeyCommand = function findKeyCommand(hashId, keyString) { - var key = KEY_MODS[hashId] + keyString; - return this.commandKeyBinding[key]; - }; - - this.handleKeyboard = function(data, hashId, keyString, keyCode) { - var key = KEY_MODS[hashId] + keyString; - var command = this.commandKeyBinding[key]; - if (data.$keyChain) { - data.$keyChain += " " + key; - command = this.commandKeyBinding[data.$keyChain] || command; - } - - if (command) { - if (command == "chainKeys" || command[command.length - 1] == "chainKeys") { - data.$keyChain = data.$keyChain || key; - return {command: "null"}; - } - } - - if (data.$keyChain && keyCode > 0) - data.$keyChain = ""; - return {command: command}; - }; - -}).call(HashHandler.prototype); - -exports.HashHandler = HashHandler; -exports.MultiHashHandler = MultiHashHandler; -}); - -define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var MultiHashHandler = require("../keyboard/hash_handler").MultiHashHandler; -var EventEmitter = require("../lib/event_emitter").EventEmitter; - -var CommandManager = function(platform, commands) { - MultiHashHandler.call(this, commands, platform); - this.byName = this.commands; - this.setDefaultHandler("exec", function(e) { - return e.command.exec(e.editor, e.args || {}); - }); -}; - -oop.inherits(CommandManager, MultiHashHandler); - -(function() { - - oop.implement(this, EventEmitter); - - this.exec = function(command, editor, args) { - if (Array.isArray(command)) { - for (var i = command.length; i--; ) { - if (this.exec(command[i], editor, args)) return true; - } - return false; - } - - if (typeof command === "string") - command = this.commands[command]; - - if (!command) - return false; - - if (editor && editor.$readOnly && !command.readOnly) - return false; - - var e = {editor: editor, command: command, args: args}; - e.returnValue = this._emit("exec", e); - this._signal("afterExec", e); - - return e.returnValue === false ? false : true; - }; - - this.toggleRecording = function(editor) { - if (this.$inReplay) - return; - - editor && editor._emit("changeStatus"); - if (this.recording) { - this.macro.pop(); - this.removeEventListener("exec", this.$addCommandToMacro); - - if (!this.macro.length) - this.macro = this.oldMacro; - - return this.recording = false; - } - if (!this.$addCommandToMacro) { - this.$addCommandToMacro = function(e) { - this.macro.push([e.command, e.args]); - }.bind(this); - } - - this.oldMacro = this.macro; - this.macro = []; - this.on("exec", this.$addCommandToMacro); - return this.recording = true; - }; - - this.replay = function(editor) { - if (this.$inReplay || !this.macro) - return; - - if (this.recording) - return this.toggleRecording(editor); - - try { - this.$inReplay = true; - this.macro.forEach(function(x) { - if (typeof x == "string") - this.exec(x, editor); - else - this.exec(x[0], editor, x[1]); - }, this); - } finally { - this.$inReplay = false; - } - }; - - this.trimMacro = function(m) { - return m.map(function(x){ - if (typeof x[0] != "string") - x[0] = x[0].name; - if (!x[1]) - x = x[0]; - return x; - }); - }; - -}).call(CommandManager.prototype); - -exports.CommandManager = CommandManager; - -}); - -define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"], function(require, exports, module) { -"use strict"; - -var lang = require("../lib/lang"); -var config = require("../config"); -var Range = require("../range").Range; - -function bindKey(win, mac) { - return {win: win, mac: mac}; -} -exports.commands = [{ - name: "showSettingsMenu", - bindKey: bindKey("Ctrl-,", "Command-,"), - exec: function(editor) { - config.loadModule("ace/ext/settings_menu", function(module) { - module.init(editor); - editor.showSettingsMenu(); - }); - }, - readOnly: true -}, { - name: "goToNextError", - bindKey: bindKey("Alt-E", "Ctrl-E"), - exec: function(editor) { - config.loadModule("ace/ext/error_marker", function(module) { - module.showErrorMarker(editor, 1); - }); - }, - scrollIntoView: "animate", - readOnly: true -}, { - name: "goToPreviousError", - bindKey: bindKey("Alt-Shift-E", "Ctrl-Shift-E"), - exec: function(editor) { - config.loadModule("ace/ext/error_marker", function(module) { - module.showErrorMarker(editor, -1); - }); - }, - scrollIntoView: "animate", - readOnly: true -}, { - name: "selectall", - bindKey: bindKey("Ctrl-A", "Command-A"), - exec: function(editor) { editor.selectAll(); }, - readOnly: true -}, { - name: "centerselection", - bindKey: bindKey(null, "Ctrl-L"), - exec: function(editor) { editor.centerSelection(); }, - readOnly: true -}, { - name: "gotoline", - bindKey: bindKey("Ctrl-L", "Command-L"), - exec: function(editor) { - var line = parseInt(prompt("Enter line number:"), 10); - if (!isNaN(line)) { - editor.gotoLine(line); - } - }, - readOnly: true -}, { - name: "fold", - bindKey: bindKey("Alt-L|Ctrl-F1", "Command-Alt-L|Command-F1"), - exec: function(editor) { editor.session.toggleFold(false); }, - scrollIntoView: "center", - readOnly: true -}, { - name: "unfold", - bindKey: bindKey("Alt-Shift-L|Ctrl-Shift-F1", "Command-Alt-Shift-L|Command-Shift-F1"), - exec: function(editor) { editor.session.toggleFold(true); }, - scrollIntoView: "center", - readOnly: true -}, { - name: "toggleFoldWidget", - bindKey: bindKey("F2", "F2"), - exec: function(editor) { editor.session.toggleFoldWidget(); }, - scrollIntoView: "center", - readOnly: true -}, { - name: "toggleParentFoldWidget", - bindKey: bindKey("Alt-F2", "Alt-F2"), - exec: function(editor) { editor.session.toggleFoldWidget(true); }, - scrollIntoView: "center", - readOnly: true -}, { - name: "foldall", - bindKey: bindKey("Ctrl-Alt-0", "Ctrl-Command-Option-0"), - exec: function(editor) { editor.session.foldAll(); }, - scrollIntoView: "center", - readOnly: true -}, { - name: "foldOther", - bindKey: bindKey("Alt-0", "Command-Option-0"), - exec: function(editor) { - editor.session.foldAll(); - editor.session.unfold(editor.selection.getAllRanges()); - }, - scrollIntoView: "center", - readOnly: true -}, { - name: "unfoldall", - bindKey: bindKey("Alt-Shift-0", "Command-Option-Shift-0"), - exec: function(editor) { editor.session.unfold(); }, - scrollIntoView: "center", - readOnly: true -}, { - name: "findnext", - bindKey: bindKey("Ctrl-K", "Command-G"), - exec: function(editor) { editor.findNext(); }, - multiSelectAction: "forEach", - scrollIntoView: "center", - readOnly: true -}, { - name: "findprevious", - bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"), - exec: function(editor) { editor.findPrevious(); }, - multiSelectAction: "forEach", - scrollIntoView: "center", - readOnly: true -}, { - name: "selectOrFindNext", - bindKey: bindKey("Alt-K", "Ctrl-G"), - exec: function(editor) { - if (editor.selection.isEmpty()) - editor.selection.selectWord(); - else - editor.findNext(); - }, - readOnly: true -}, { - name: "selectOrFindPrevious", - bindKey: bindKey("Alt-Shift-K", "Ctrl-Shift-G"), - exec: function(editor) { - if (editor.selection.isEmpty()) - editor.selection.selectWord(); - else - editor.findPrevious(); - }, - readOnly: true -}, { - name: "find", - bindKey: bindKey("Ctrl-F", "Command-F"), - exec: function(editor) { - config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor)}); - }, - readOnly: true -}, { - name: "overwrite", - bindKey: "Insert", - exec: function(editor) { editor.toggleOverwrite(); }, - readOnly: true -}, { - name: "selecttostart", - bindKey: bindKey("Ctrl-Shift-Home", "Command-Shift-Up"), - exec: function(editor) { editor.getSelection().selectFileStart(); }, - multiSelectAction: "forEach", - readOnly: true, - scrollIntoView: "animate", - aceCommandGroup: "fileJump" -}, { - name: "gotostart", - bindKey: bindKey("Ctrl-Home", "Command-Home|Command-Up"), - exec: function(editor) { editor.navigateFileStart(); }, - multiSelectAction: "forEach", - readOnly: true, - scrollIntoView: "animate", - aceCommandGroup: "fileJump" -}, { - name: "selectup", - bindKey: bindKey("Shift-Up", "Shift-Up"), - exec: function(editor) { editor.getSelection().selectUp(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "golineup", - bindKey: bindKey("Up", "Up|Ctrl-P"), - exec: function(editor, args) { editor.navigateUp(args.times); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "selecttoend", - bindKey: bindKey("Ctrl-Shift-End", "Command-Shift-Down"), - exec: function(editor) { editor.getSelection().selectFileEnd(); }, - multiSelectAction: "forEach", - readOnly: true, - scrollIntoView: "animate", - aceCommandGroup: "fileJump" -}, { - name: "gotoend", - bindKey: bindKey("Ctrl-End", "Command-End|Command-Down"), - exec: function(editor) { editor.navigateFileEnd(); }, - multiSelectAction: "forEach", - readOnly: true, - scrollIntoView: "animate", - aceCommandGroup: "fileJump" -}, { - name: "selectdown", - bindKey: bindKey("Shift-Down", "Shift-Down"), - exec: function(editor) { editor.getSelection().selectDown(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "golinedown", - bindKey: bindKey("Down", "Down|Ctrl-N"), - exec: function(editor, args) { editor.navigateDown(args.times); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "selectwordleft", - bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"), - exec: function(editor) { editor.getSelection().selectWordLeft(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "gotowordleft", - bindKey: bindKey("Ctrl-Left", "Option-Left"), - exec: function(editor) { editor.navigateWordLeft(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "selecttolinestart", - bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left"), - exec: function(editor) { editor.getSelection().selectLineStart(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "gotolinestart", - bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"), - exec: function(editor) { editor.navigateLineStart(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "selectleft", - bindKey: bindKey("Shift-Left", "Shift-Left"), - exec: function(editor) { editor.getSelection().selectLeft(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "gotoleft", - bindKey: bindKey("Left", "Left|Ctrl-B"), - exec: function(editor, args) { editor.navigateLeft(args.times); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "selectwordright", - bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"), - exec: function(editor) { editor.getSelection().selectWordRight(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "gotowordright", - bindKey: bindKey("Ctrl-Right", "Option-Right"), - exec: function(editor) { editor.navigateWordRight(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "selecttolineend", - bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right"), - exec: function(editor) { editor.getSelection().selectLineEnd(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "gotolineend", - bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"), - exec: function(editor) { editor.navigateLineEnd(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "selectright", - bindKey: bindKey("Shift-Right", "Shift-Right"), - exec: function(editor) { editor.getSelection().selectRight(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "gotoright", - bindKey: bindKey("Right", "Right|Ctrl-F"), - exec: function(editor, args) { editor.navigateRight(args.times); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "selectpagedown", - bindKey: "Shift-PageDown", - exec: function(editor) { editor.selectPageDown(); }, - readOnly: true -}, { - name: "pagedown", - bindKey: bindKey(null, "Option-PageDown"), - exec: function(editor) { editor.scrollPageDown(); }, - readOnly: true -}, { - name: "gotopagedown", - bindKey: bindKey("PageDown", "PageDown|Ctrl-V"), - exec: function(editor) { editor.gotoPageDown(); }, - readOnly: true -}, { - name: "selectpageup", - bindKey: "Shift-PageUp", - exec: function(editor) { editor.selectPageUp(); }, - readOnly: true -}, { - name: "pageup", - bindKey: bindKey(null, "Option-PageUp"), - exec: function(editor) { editor.scrollPageUp(); }, - readOnly: true -}, { - name: "gotopageup", - bindKey: "PageUp", - exec: function(editor) { editor.gotoPageUp(); }, - readOnly: true -}, { - name: "scrollup", - bindKey: bindKey("Ctrl-Up", null), - exec: function(e) { e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); }, - readOnly: true -}, { - name: "scrolldown", - bindKey: bindKey("Ctrl-Down", null), - exec: function(e) { e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); }, - readOnly: true -}, { - name: "selectlinestart", - bindKey: "Shift-Home", - exec: function(editor) { editor.getSelection().selectLineStart(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "selectlineend", - bindKey: "Shift-End", - exec: function(editor) { editor.getSelection().selectLineEnd(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "togglerecording", - bindKey: bindKey("Ctrl-Alt-E", "Command-Option-E"), - exec: function(editor) { editor.commands.toggleRecording(editor); }, - readOnly: true -}, { - name: "replaymacro", - bindKey: bindKey("Ctrl-Shift-E", "Command-Shift-E"), - exec: function(editor) { editor.commands.replay(editor); }, - readOnly: true -}, { - name: "jumptomatching", - bindKey: bindKey("Ctrl-P", "Ctrl-P"), - exec: function(editor) { editor.jumpToMatching(); }, - multiSelectAction: "forEach", - scrollIntoView: "animate", - readOnly: true -}, { - name: "selecttomatching", - bindKey: bindKey("Ctrl-Shift-P", "Ctrl-Shift-P"), - exec: function(editor) { editor.jumpToMatching(true); }, - multiSelectAction: "forEach", - scrollIntoView: "animate", - readOnly: true -}, { - name: "expandToMatching", - bindKey: bindKey("Ctrl-Shift-M", "Ctrl-Shift-M"), - exec: function(editor) { editor.jumpToMatching(true, true); }, - multiSelectAction: "forEach", - scrollIntoView: "animate", - readOnly: true -}, { - name: "passKeysToBrowser", - bindKey: bindKey("null", "null"), - exec: function() {}, - passEvent: true, - readOnly: true -}, -{ - name: "cut", - exec: function(editor) { - var range = editor.getSelectionRange(); - editor._emit("cut", range); - - if (!editor.selection.isEmpty()) { - editor.session.remove(range); - editor.clearSelection(); - } - }, - scrollIntoView: "cursor", - multiSelectAction: "forEach" -}, { - name: "removeline", - bindKey: bindKey("Ctrl-D", "Command-D"), - exec: function(editor) { editor.removeLines(); }, - scrollIntoView: "cursor", - multiSelectAction: "forEachLine" -}, { - name: "duplicateSelection", - bindKey: bindKey("Ctrl-Shift-D", "Command-Shift-D"), - exec: function(editor) { editor.duplicateSelection(); }, - scrollIntoView: "cursor", - multiSelectAction: "forEach" -}, { - name: "sortlines", - bindKey: bindKey("Ctrl-Alt-S", "Command-Alt-S"), - exec: function(editor) { editor.sortLines(); }, - scrollIntoView: "selection", - multiSelectAction: "forEachLine" -}, { - name: "togglecomment", - bindKey: bindKey("Ctrl-/", "Command-/"), - exec: function(editor) { editor.toggleCommentLines(); }, - multiSelectAction: "forEachLine", - scrollIntoView: "selectionPart" -}, { - name: "toggleBlockComment", - bindKey: bindKey("Ctrl-Shift-/", "Command-Shift-/"), - exec: function(editor) { editor.toggleBlockComment(); }, - multiSelectAction: "forEach", - scrollIntoView: "selectionPart" -}, { - name: "modifyNumberUp", - bindKey: bindKey("Ctrl-Shift-Up", "Alt-Shift-Up"), - exec: function(editor) { editor.modifyNumber(1); }, - scrollIntoView: "cursor", - multiSelectAction: "forEach" -}, { - name: "modifyNumberDown", - bindKey: bindKey("Ctrl-Shift-Down", "Alt-Shift-Down"), - exec: function(editor) { editor.modifyNumber(-1); }, - scrollIntoView: "cursor", - multiSelectAction: "forEach" -}, { - name: "replace", - bindKey: bindKey("Ctrl-H", "Command-Option-F"), - exec: function(editor) { - config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor, true)}); - } -}, { - name: "undo", - bindKey: bindKey("Ctrl-Z", "Command-Z"), - exec: function(editor) { editor.undo(); } -}, { - name: "redo", - bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"), - exec: function(editor) { editor.redo(); } -}, { - name: "copylinesup", - bindKey: bindKey("Alt-Shift-Up", "Command-Option-Up"), - exec: function(editor) { editor.copyLinesUp(); }, - scrollIntoView: "cursor" -}, { - name: "movelinesup", - bindKey: bindKey("Alt-Up", "Option-Up"), - exec: function(editor) { editor.moveLinesUp(); }, - scrollIntoView: "cursor" -}, { - name: "copylinesdown", - bindKey: bindKey("Alt-Shift-Down", "Command-Option-Down"), - exec: function(editor) { editor.copyLinesDown(); }, - scrollIntoView: "cursor" -}, { - name: "movelinesdown", - bindKey: bindKey("Alt-Down", "Option-Down"), - exec: function(editor) { editor.moveLinesDown(); }, - scrollIntoView: "cursor" -}, { - name: "del", - bindKey: bindKey("Delete", "Delete|Ctrl-D|Shift-Delete"), - exec: function(editor) { editor.remove("right"); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor" -}, { - name: "backspace", - bindKey: bindKey( - "Shift-Backspace|Backspace", - "Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H" - ), - exec: function(editor) { editor.remove("left"); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor" -}, { - name: "cut_or_delete", - bindKey: bindKey("Shift-Delete", null), - exec: function(editor) { - if (editor.selection.isEmpty()) { - editor.remove("left"); - } else { - return false; - } - }, - multiSelectAction: "forEach", - scrollIntoView: "cursor" -}, { - name: "removetolinestart", - bindKey: bindKey("Alt-Backspace", "Command-Backspace"), - exec: function(editor) { editor.removeToLineStart(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor" -}, { - name: "removetolineend", - bindKey: bindKey("Alt-Delete", "Ctrl-K"), - exec: function(editor) { editor.removeToLineEnd(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor" -}, { - name: "removewordleft", - bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"), - exec: function(editor) { editor.removeWordLeft(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor" -}, { - name: "removewordright", - bindKey: bindKey("Ctrl-Delete", "Alt-Delete"), - exec: function(editor) { editor.removeWordRight(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor" -}, { - name: "outdent", - bindKey: bindKey("Shift-Tab", "Shift-Tab"), - exec: function(editor) { editor.blockOutdent(); }, - multiSelectAction: "forEach", - scrollIntoView: "selectionPart" -}, { - name: "indent", - bindKey: bindKey("Tab", "Tab"), - exec: function(editor) { editor.indent(); }, - multiSelectAction: "forEach", - scrollIntoView: "selectionPart" -}, { - name: "blockoutdent", - bindKey: bindKey("Ctrl-[", "Ctrl-["), - exec: function(editor) { editor.blockOutdent(); }, - multiSelectAction: "forEachLine", - scrollIntoView: "selectionPart" -}, { - name: "blockindent", - bindKey: bindKey("Ctrl-]", "Ctrl-]"), - exec: function(editor) { editor.blockIndent(); }, - multiSelectAction: "forEachLine", - scrollIntoView: "selectionPart" -}, { - name: "insertstring", - exec: function(editor, str) { editor.insert(str); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor" -}, { - name: "inserttext", - exec: function(editor, args) { - editor.insert(lang.stringRepeat(args.text || "", args.times || 1)); - }, - multiSelectAction: "forEach", - scrollIntoView: "cursor" -}, { - name: "splitline", - bindKey: bindKey(null, "Ctrl-O"), - exec: function(editor) { editor.splitLine(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor" -}, { - name: "transposeletters", - bindKey: bindKey("Ctrl-T", "Ctrl-T"), - exec: function(editor) { editor.transposeLetters(); }, - multiSelectAction: function(editor) {editor.transposeSelections(1); }, - scrollIntoView: "cursor" -}, { - name: "touppercase", - bindKey: bindKey("Ctrl-U", "Ctrl-U"), - exec: function(editor) { editor.toUpperCase(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor" -}, { - name: "tolowercase", - bindKey: bindKey("Ctrl-Shift-U", "Ctrl-Shift-U"), - exec: function(editor) { editor.toLowerCase(); }, - multiSelectAction: "forEach", - scrollIntoView: "cursor" -}, { - name: "expandtoline", - bindKey: bindKey("Ctrl-Shift-L", "Command-Shift-L"), - exec: function(editor) { - var range = editor.selection.getRange(); - - range.start.column = range.end.column = 0; - range.end.row++; - editor.selection.setRange(range, false); - }, - multiSelectAction: "forEach", - scrollIntoView: "cursor", - readOnly: true -}, { - name: "joinlines", - bindKey: bindKey(null, null), - exec: function(editor) { - var isBackwards = editor.selection.isBackwards(); - var selectionStart = isBackwards ? editor.selection.getSelectionLead() : editor.selection.getSelectionAnchor(); - var selectionEnd = isBackwards ? editor.selection.getSelectionAnchor() : editor.selection.getSelectionLead(); - var firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length; - var selectedText = editor.session.doc.getTextRange(editor.selection.getRange()); - var selectedCount = selectedText.replace(/\n\s*/, " ").length; - var insertLine = editor.session.doc.getLine(selectionStart.row); - - for (var i = selectionStart.row + 1; i <= selectionEnd.row + 1; i++) { - var curLine = lang.stringTrimLeft(lang.stringTrimRight(editor.session.doc.getLine(i))); - if (curLine.length !== 0) { - curLine = " " + curLine; - } - insertLine += curLine; - } - - if (selectionEnd.row + 1 < (editor.session.doc.getLength() - 1)) { - insertLine += editor.session.doc.getNewLineCharacter(); - } - - editor.clearSelection(); - editor.session.doc.replace(new Range(selectionStart.row, 0, selectionEnd.row + 2, 0), insertLine); - - if (selectedCount > 0) { - editor.selection.moveCursorTo(selectionStart.row, selectionStart.column); - editor.selection.selectTo(selectionStart.row, selectionStart.column + selectedCount); - } else { - firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length > firstLineEndCol ? (firstLineEndCol + 1) : firstLineEndCol; - editor.selection.moveCursorTo(selectionStart.row, firstLineEndCol); - } - }, - multiSelectAction: "forEach", - readOnly: true -}, { - name: "invertSelection", - bindKey: bindKey(null, null), - exec: function(editor) { - var endRow = editor.session.doc.getLength() - 1; - var endCol = editor.session.doc.getLine(endRow).length; - var ranges = editor.selection.rangeList.ranges; - var newRanges = []; - if (ranges.length < 1) { - ranges = [editor.selection.getRange()]; - } - - for (var i = 0; i < ranges.length; i++) { - if (i == (ranges.length - 1)) { - if (!(ranges[i].end.row === endRow && ranges[i].end.column === endCol)) { - newRanges.push(new Range(ranges[i].end.row, ranges[i].end.column, endRow, endCol)); - } - } - - if (i === 0) { - if (!(ranges[i].start.row === 0 && ranges[i].start.column === 0)) { - newRanges.push(new Range(0, 0, ranges[i].start.row, ranges[i].start.column)); - } - } else { - newRanges.push(new Range(ranges[i-1].end.row, ranges[i-1].end.column, ranges[i].start.row, ranges[i].start.column)); - } - } - - editor.exitMultiSelectMode(); - editor.clearSelection(); - - for(var i = 0; i < newRanges.length; i++) { - editor.selection.addRange(newRanges[i], false); - } - }, - readOnly: true, - scrollIntoView: "none" -}]; - -}); - -define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -require("./lib/fixoldbrowsers"); - -var oop = require("./lib/oop"); -var dom = require("./lib/dom"); -var lang = require("./lib/lang"); -var useragent = require("./lib/useragent"); -var TextInput = require("./keyboard/textinput").TextInput; -var MouseHandler = require("./mouse/mouse_handler").MouseHandler; -var FoldHandler = require("./mouse/fold_handler").FoldHandler; -var KeyBinding = require("./keyboard/keybinding").KeyBinding; -var EditSession = require("./edit_session").EditSession; -var Search = require("./search").Search; -var Range = require("./range").Range; -var EventEmitter = require("./lib/event_emitter").EventEmitter; -var CommandManager = require("./commands/command_manager").CommandManager; -var defaultCommands = require("./commands/default_commands").commands; -var config = require("./config"); -var TokenIterator = require("./token_iterator").TokenIterator; -var Editor = function(renderer, session) { - var container = renderer.getContainerElement(); - this.container = container; - this.renderer = renderer; - - this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands); - this.textInput = new TextInput(renderer.getTextAreaContainer(), this); - this.renderer.textarea = this.textInput.getElement(); - this.keyBinding = new KeyBinding(this); - this.$mouseHandler = new MouseHandler(this); - new FoldHandler(this); - - this.$blockScrolling = 0; - this.$search = new Search().set({ - wrap: true - }); - - this.$historyTracker = this.$historyTracker.bind(this); - this.commands.on("exec", this.$historyTracker); - - this.$initOperationListeners(); - - this._$emitInputEvent = lang.delayedCall(function() { - this._signal("input", {}); - if (this.session && this.session.bgTokenizer) - this.session.bgTokenizer.scheduleStart(); - }.bind(this)); - - this.on("change", function(_, _self) { - _self._$emitInputEvent.schedule(31); - }); - - this.setSession(session || new EditSession("")); - config.resetOptions(this); - config._signal("editor", this); -}; - -(function(){ - - oop.implement(this, EventEmitter); - - this.$initOperationListeners = function() { - function last(a) {return a[a.length - 1]} - - this.selections = []; - this.commands.on("exec", this.startOperation.bind(this), true); - this.commands.on("afterExec", this.endOperation.bind(this), true); - - this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this)); - - this.on("change", function() { - this.curOp || this.startOperation(); - this.curOp.docChanged = true; - }.bind(this), true); - - this.on("changeSelection", function() { - this.curOp || this.startOperation(); - this.curOp.selectionChanged = true; - }.bind(this), true); - }; - - this.curOp = null; - this.prevOp = {}; - this.startOperation = function(commadEvent) { - if (this.curOp) { - if (!commadEvent || this.curOp.command) - return; - this.prevOp = this.curOp; - } - if (!commadEvent) { - this.previousCommand = null; - commadEvent = {}; - } - - this.$opResetTimer.schedule(); - this.curOp = { - command: commadEvent.command || {}, - args: commadEvent.args, - scrollTop: this.renderer.scrollTop - }; - if (this.curOp.command.name) - this.$blockScrolling++; - }; - - this.endOperation = function(e) { - if (this.curOp) { - if (e && e.returnValue === false) - return this.curOp = null; - this._signal("beforeEndOperation"); - var command = this.curOp.command; - if (command.name && this.$blockScrolling) - this.$blockScrolling--; - if (command && command.scrollIntoView) { - switch (command.scrollIntoView) { - case "center": - this.renderer.scrollCursorIntoView(null, 0.5); - break; - case "animate": - case "cursor": - this.renderer.scrollCursorIntoView(); - break; - case "selectionPart": - var range = this.selection.getRange(); - var config = this.renderer.layerConfig; - if (range.start.row >= config.lastRow || range.end.row <= config.firstRow) { - this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead); - } - break; - default: - break; - } - if (command.scrollIntoView == "animate") - this.renderer.animateScrolling(this.curOp.scrollTop); - } - - this.prevOp = this.curOp; - this.curOp = null; - } - }; - this.$mergeableCommands = ["backspace", "del", "insertstring"]; - this.$historyTracker = function(e) { - if (!this.$mergeUndoDeltas) - return; - - var prev = this.prevOp; - var mergeableCommands = this.$mergeableCommands; - var shouldMerge = prev.command && (e.command.name == prev.command.name); - if (e.command.name == "insertstring") { - var text = e.args; - if (this.mergeNextCommand === undefined) - this.mergeNextCommand = true; - - shouldMerge = shouldMerge - && this.mergeNextCommand // previous command allows to coalesce with - && (!/\s/.test(text) || /\s/.test(prev.args)); // previous insertion was of same type - - this.mergeNextCommand = true; - } else { - shouldMerge = shouldMerge - && mergeableCommands.indexOf(e.command.name) !== -1; // the command is mergeable - } - - if ( - this.$mergeUndoDeltas != "always" - && Date.now() - this.sequenceStartTime > 2000 - ) { - shouldMerge = false; // the sequence is too long - } - - if (shouldMerge) - this.session.mergeUndoDeltas = true; - else if (mergeableCommands.indexOf(e.command.name) !== -1) - this.sequenceStartTime = Date.now(); - }; - this.setKeyboardHandler = function(keyboardHandler, cb) { - if (keyboardHandler && typeof keyboardHandler === "string") { - this.$keybindingId = keyboardHandler; - var _self = this; - config.loadModule(["keybinding", keyboardHandler], function(module) { - if (_self.$keybindingId == keyboardHandler) - _self.keyBinding.setKeyboardHandler(module && module.handler); - cb && cb(); - }); - } else { - this.$keybindingId = null; - this.keyBinding.setKeyboardHandler(keyboardHandler); - cb && cb(); - } - }; - this.getKeyboardHandler = function() { - return this.keyBinding.getKeyboardHandler(); - }; - this.setSession = function(session) { - if (this.session == session) - return; - - var oldSession = this.session; - if (oldSession) { - this.session.removeEventListener("change", this.$onDocumentChange); - this.session.removeEventListener("changeMode", this.$onChangeMode); - this.session.removeEventListener("tokenizerUpdate", this.$onTokenizerUpdate); - this.session.removeEventListener("changeTabSize", this.$onChangeTabSize); - this.session.removeEventListener("changeWrapLimit", this.$onChangeWrapLimit); - this.session.removeEventListener("changeWrapMode", this.$onChangeWrapMode); - this.session.removeEventListener("onChangeFold", this.$onChangeFold); - this.session.removeEventListener("changeFrontMarker", this.$onChangeFrontMarker); - this.session.removeEventListener("changeBackMarker", this.$onChangeBackMarker); - this.session.removeEventListener("changeBreakpoint", this.$onChangeBreakpoint); - this.session.removeEventListener("changeAnnotation", this.$onChangeAnnotation); - this.session.removeEventListener("changeOverwrite", this.$onCursorChange); - this.session.removeEventListener("changeScrollTop", this.$onScrollTopChange); - this.session.removeEventListener("changeScrollLeft", this.$onScrollLeftChange); - - var selection = this.session.getSelection(); - selection.removeEventListener("changeCursor", this.$onCursorChange); - selection.removeEventListener("changeSelection", this.$onSelectionChange); - } - - this.session = session; - if (session) { - this.$onDocumentChange = this.onDocumentChange.bind(this); - session.addEventListener("change", this.$onDocumentChange); - this.renderer.setSession(session); - - this.$onChangeMode = this.onChangeMode.bind(this); - session.addEventListener("changeMode", this.$onChangeMode); - - this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this); - session.addEventListener("tokenizerUpdate", this.$onTokenizerUpdate); - - this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer); - session.addEventListener("changeTabSize", this.$onChangeTabSize); - - this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this); - session.addEventListener("changeWrapLimit", this.$onChangeWrapLimit); - - this.$onChangeWrapMode = this.onChangeWrapMode.bind(this); - session.addEventListener("changeWrapMode", this.$onChangeWrapMode); - - this.$onChangeFold = this.onChangeFold.bind(this); - session.addEventListener("changeFold", this.$onChangeFold); - - this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this); - this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker); - - this.$onChangeBackMarker = this.onChangeBackMarker.bind(this); - this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker); - - this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this); - this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint); - - this.$onChangeAnnotation = this.onChangeAnnotation.bind(this); - this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation); - - this.$onCursorChange = this.onCursorChange.bind(this); - this.session.addEventListener("changeOverwrite", this.$onCursorChange); - - this.$onScrollTopChange = this.onScrollTopChange.bind(this); - this.session.addEventListener("changeScrollTop", this.$onScrollTopChange); - - this.$onScrollLeftChange = this.onScrollLeftChange.bind(this); - this.session.addEventListener("changeScrollLeft", this.$onScrollLeftChange); - - this.selection = session.getSelection(); - this.selection.addEventListener("changeCursor", this.$onCursorChange); - - this.$onSelectionChange = this.onSelectionChange.bind(this); - this.selection.addEventListener("changeSelection", this.$onSelectionChange); - - this.onChangeMode(); - - this.$blockScrolling += 1; - this.onCursorChange(); - this.$blockScrolling -= 1; - - this.onScrollTopChange(); - this.onScrollLeftChange(); - this.onSelectionChange(); - this.onChangeFrontMarker(); - this.onChangeBackMarker(); - this.onChangeBreakpoint(); - this.onChangeAnnotation(); - this.session.getUseWrapMode() && this.renderer.adjustWrapLimit(); - this.renderer.updateFull(); - } else { - this.selection = null; - this.renderer.setSession(session); - } - - this._signal("changeSession", { - session: session, - oldSession: oldSession - }); - - oldSession && oldSession._signal("changeEditor", {oldEditor: this}); - session && session._signal("changeEditor", {editor: this}); - }; - this.getSession = function() { - return this.session; - }; - this.setValue = function(val, cursorPos) { - this.session.doc.setValue(val); - - if (!cursorPos) - this.selectAll(); - else if (cursorPos == 1) - this.navigateFileEnd(); - else if (cursorPos == -1) - this.navigateFileStart(); - - return val; - }; - this.getValue = function() { - return this.session.getValue(); - }; - this.getSelection = function() { - return this.selection; - }; - this.resize = function(force) { - this.renderer.onResize(force); - }; - this.setTheme = function(theme, cb) { - this.renderer.setTheme(theme, cb); - }; - this.getTheme = function() { - return this.renderer.getTheme(); - }; - this.setStyle = function(style) { - this.renderer.setStyle(style); - }; - this.unsetStyle = function(style) { - this.renderer.unsetStyle(style); - }; - this.getFontSize = function () { - return this.getOption("fontSize") || - dom.computedStyle(this.container, "fontSize"); - }; - this.setFontSize = function(size) { - this.setOption("fontSize", size); - }; - - this.$highlightBrackets = function() { - if (this.session.$bracketHighlight) { - this.session.removeMarker(this.session.$bracketHighlight); - this.session.$bracketHighlight = null; - } - - if (this.$highlightPending) { - return; - } - var self = this; - this.$highlightPending = true; - setTimeout(function() { - self.$highlightPending = false; - var session = self.session; - if (!session || !session.bgTokenizer) return; - var pos = session.findMatchingBracket(self.getCursorPosition()); - if (pos) { - var range = new Range(pos.row, pos.column, pos.row, pos.column + 1); - } else if (session.$mode.getMatching) { - var range = session.$mode.getMatching(self.session); - } - if (range) - session.$bracketHighlight = session.addMarker(range, "ace_bracket", "text"); - }, 50); - }; - this.$highlightTags = function() { - if (this.$highlightTagPending) - return; - var self = this; - this.$highlightTagPending = true; - setTimeout(function() { - self.$highlightTagPending = false; - - var session = self.session; - if (!session || !session.bgTokenizer) return; - - var pos = self.getCursorPosition(); - var iterator = new TokenIterator(self.session, pos.row, pos.column); - var token = iterator.getCurrentToken(); - - if (!token || !/\b(?:tag-open|tag-name)/.test(token.type)) { - session.removeMarker(session.$tagHighlight); - session.$tagHighlight = null; - return; - } - - if (token.type.indexOf("tag-open") != -1) - token = iterator.stepForward(); - - var tag = token.value; - var depth = 0; - var prevToken = iterator.stepBackward(); - - if (prevToken.value == '<'){ - do { - prevToken = token; - token = iterator.stepForward(); - - if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) { - if (prevToken.value === '<'){ - depth++; - } else if (prevToken.value === '= 0); - } else { - do { - token = prevToken; - prevToken = iterator.stepBackward(); - - if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) { - if (prevToken.value === '<') { - depth++; - } else if (prevToken.value === ' 1)) - highlight = false; - } - - if (session.$highlightLineMarker && !highlight) { - session.removeMarker(session.$highlightLineMarker.id); - session.$highlightLineMarker = null; - } else if (!session.$highlightLineMarker && highlight) { - var range = new Range(highlight.row, highlight.column, highlight.row, Infinity); - range.id = session.addMarker(range, "ace_active-line", "screenLine"); - session.$highlightLineMarker = range; - } else if (highlight) { - session.$highlightLineMarker.start.row = highlight.row; - session.$highlightLineMarker.end.row = highlight.row; - session.$highlightLineMarker.start.column = highlight.column; - session._signal("changeBackMarker"); - } - }; - - this.onSelectionChange = function(e) { - var session = this.session; - - if (session.$selectionMarker) { - session.removeMarker(session.$selectionMarker); - } - session.$selectionMarker = null; - - if (!this.selection.isEmpty()) { - var range = this.selection.getRange(); - var style = this.getSelectionStyle(); - session.$selectionMarker = session.addMarker(range, "ace_selection", style); - } else { - this.$updateHighlightActiveLine(); - } - - var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp(); - this.session.highlight(re); - - this._signal("changeSelection"); - }; - - this.$getSelectionHighLightRegexp = function() { - var session = this.session; - - var selection = this.getSelectionRange(); - if (selection.isEmpty() || selection.isMultiLine()) - return; - - var startOuter = selection.start.column - 1; - var endOuter = selection.end.column + 1; - var line = session.getLine(selection.start.row); - var lineCols = line.length; - var needle = line.substring(Math.max(startOuter, 0), - Math.min(endOuter, lineCols)); - if ((startOuter >= 0 && /^[\w\d]/.test(needle)) || - (endOuter <= lineCols && /[\w\d]$/.test(needle))) - return; - - needle = line.substring(selection.start.column, selection.end.column); - if (!/^[\w\d]+$/.test(needle)) - return; - - var re = this.$search.$assembleRegExp({ - wholeWord: true, - caseSensitive: true, - needle: needle - }); - - return re; - }; - - - this.onChangeFrontMarker = function() { - this.renderer.updateFrontMarkers(); - }; - - this.onChangeBackMarker = function() { - this.renderer.updateBackMarkers(); - }; - - - this.onChangeBreakpoint = function() { - this.renderer.updateBreakpoints(); - }; - - this.onChangeAnnotation = function() { - this.renderer.setAnnotations(this.session.getAnnotations()); - }; - - - this.onChangeMode = function(e) { - this.renderer.updateText(); - this._emit("changeMode", e); - }; - - - this.onChangeWrapLimit = function() { - this.renderer.updateFull(); - }; - - this.onChangeWrapMode = function() { - this.renderer.onResize(true); - }; - - - this.onChangeFold = function() { - this.$updateHighlightActiveLine(); - this.renderer.updateFull(); - }; - this.getSelectedText = function() { - return this.session.getTextRange(this.getSelectionRange()); - }; - this.getCopyText = function() { - var text = this.getSelectedText(); - this._signal("copy", text); - return text; - }; - this.onCopy = function() { - this.commands.exec("copy", this); - }; - this.onCut = function() { - this.commands.exec("cut", this); - }; - this.onPaste = function(text) { - if (this.$readOnly) - return; - - var e = {text: text}; - this._signal("paste", e); - text = e.text; - if (!this.inMultiSelectMode || this.inVirtualSelectionMode) { - this.insert(text); - } else { - var lines = text.split(/\r\n|\r|\n/); - var ranges = this.selection.rangeList.ranges; - - if (lines.length > ranges.length || lines.length < 2 || !lines[1]) - return this.commands.exec("insertstring", this, text); - - for (var i = ranges.length; i--;) { - var range = ranges[i]; - if (!range.isEmpty()) - this.session.remove(range); - - this.session.insert(range.start, lines[i]); - } - } - this.renderer.scrollCursorIntoView(); - }; - - this.execCommand = function(command, args) { - return this.commands.exec(command, this, args); - }; - this.insert = function(text, pasted) { - var session = this.session; - var mode = session.getMode(); - var cursor = this.getCursorPosition(); - - if (this.getBehavioursEnabled() && !pasted) { - var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text); - if (transform) { - if (text !== transform.text) { - this.session.mergeUndoDeltas = false; - this.$mergeNextCommand = false; - } - text = transform.text; - - } - } - - if (text == "\t") - text = this.session.getTabString(); - if (!this.selection.isEmpty()) { - var range = this.getSelectionRange(); - cursor = this.session.remove(range); - this.clearSelection(); - } - else if (this.session.getOverwrite()) { - var range = new Range.fromPoints(cursor, cursor); - range.end.column += text.length; - this.session.remove(range); - } - - if (text == "\n" || text == "\r\n") { - var line = session.getLine(cursor.row); - if (cursor.column > line.search(/\S|$/)) { - var d = line.substr(cursor.column).search(/\S|$/); - session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d); - } - } - this.clearSelection(); - - var start = cursor.column; - var lineState = session.getState(cursor.row); - var line = session.getLine(cursor.row); - var shouldOutdent = mode.checkOutdent(lineState, line, text); - var end = session.insert(cursor, text); - - if (transform && transform.selection) { - if (transform.selection.length == 2) { // Transform relative to the current column - this.selection.setSelectionRange( - new Range(cursor.row, start + transform.selection[0], - cursor.row, start + transform.selection[1])); - } else { // Transform relative to the current row. - this.selection.setSelectionRange( - new Range(cursor.row + transform.selection[0], - transform.selection[1], - cursor.row + transform.selection[2], - transform.selection[3])); - } - } - - if (session.getDocument().isNewLine(text)) { - var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString()); - - session.insert({row: cursor.row+1, column: 0}, lineIndent); - } - if (shouldOutdent) - mode.autoOutdent(lineState, session, cursor.row); - }; - - this.onTextInput = function(text) { - this.keyBinding.onTextInput(text); - }; - - this.onCommandKey = function(e, hashId, keyCode) { - this.keyBinding.onCommandKey(e, hashId, keyCode); - }; - this.setOverwrite = function(overwrite) { - this.session.setOverwrite(overwrite); - }; - this.getOverwrite = function() { - return this.session.getOverwrite(); - }; - this.toggleOverwrite = function() { - this.session.toggleOverwrite(); - }; - this.setScrollSpeed = function(speed) { - this.setOption("scrollSpeed", speed); - }; - this.getScrollSpeed = function() { - return this.getOption("scrollSpeed"); - }; - this.setDragDelay = function(dragDelay) { - this.setOption("dragDelay", dragDelay); - }; - this.getDragDelay = function() { - return this.getOption("dragDelay"); - }; - this.setSelectionStyle = function(val) { - this.setOption("selectionStyle", val); - }; - this.getSelectionStyle = function() { - return this.getOption("selectionStyle"); - }; - this.setHighlightActiveLine = function(shouldHighlight) { - this.setOption("highlightActiveLine", shouldHighlight); - }; - this.getHighlightActiveLine = function() { - return this.getOption("highlightActiveLine"); - }; - this.setHighlightGutterLine = function(shouldHighlight) { - this.setOption("highlightGutterLine", shouldHighlight); - }; - - this.getHighlightGutterLine = function() { - return this.getOption("highlightGutterLine"); - }; - this.setHighlightSelectedWord = function(shouldHighlight) { - this.setOption("highlightSelectedWord", shouldHighlight); - }; - this.getHighlightSelectedWord = function() { - return this.$highlightSelectedWord; - }; - - this.setAnimatedScroll = function(shouldAnimate){ - this.renderer.setAnimatedScroll(shouldAnimate); - }; - - this.getAnimatedScroll = function(){ - return this.renderer.getAnimatedScroll(); - }; - this.setShowInvisibles = function(showInvisibles) { - this.renderer.setShowInvisibles(showInvisibles); - }; - this.getShowInvisibles = function() { - return this.renderer.getShowInvisibles(); - }; - - this.setDisplayIndentGuides = function(display) { - this.renderer.setDisplayIndentGuides(display); - }; - - this.getDisplayIndentGuides = function() { - return this.renderer.getDisplayIndentGuides(); - }; - this.setShowPrintMargin = function(showPrintMargin) { - this.renderer.setShowPrintMargin(showPrintMargin); - }; - this.getShowPrintMargin = function() { - return this.renderer.getShowPrintMargin(); - }; - this.setPrintMarginColumn = function(showPrintMargin) { - this.renderer.setPrintMarginColumn(showPrintMargin); - }; - this.getPrintMarginColumn = function() { - return this.renderer.getPrintMarginColumn(); - }; - this.setReadOnly = function(readOnly) { - this.setOption("readOnly", readOnly); - }; - this.getReadOnly = function() { - return this.getOption("readOnly"); - }; - this.setBehavioursEnabled = function (enabled) { - this.setOption("behavioursEnabled", enabled); - }; - this.getBehavioursEnabled = function () { - return this.getOption("behavioursEnabled"); - }; - this.setWrapBehavioursEnabled = function (enabled) { - this.setOption("wrapBehavioursEnabled", enabled); - }; - this.getWrapBehavioursEnabled = function () { - return this.getOption("wrapBehavioursEnabled"); - }; - this.setShowFoldWidgets = function(show) { - this.setOption("showFoldWidgets", show); - - }; - this.getShowFoldWidgets = function() { - return this.getOption("showFoldWidgets"); - }; - - this.setFadeFoldWidgets = function(fade) { - this.setOption("fadeFoldWidgets", fade); - }; - - this.getFadeFoldWidgets = function() { - return this.getOption("fadeFoldWidgets"); - }; - this.remove = function(dir) { - if (this.selection.isEmpty()){ - if (dir == "left") - this.selection.selectLeft(); - else - this.selection.selectRight(); - } - - var range = this.getSelectionRange(); - if (this.getBehavioursEnabled()) { - var session = this.session; - var state = session.getState(range.start.row); - var new_range = session.getMode().transformAction(state, 'deletion', this, session, range); - - if (range.end.column === 0) { - var text = session.getTextRange(range); - if (text[text.length - 1] == "\n") { - var line = session.getLine(range.end.row); - if (/^\s+$/.test(line)) { - range.end.column = line.length; - } - } - } - if (new_range) - range = new_range; - } - - this.session.remove(range); - this.clearSelection(); - }; - this.removeWordRight = function() { - if (this.selection.isEmpty()) - this.selection.selectWordRight(); - - this.session.remove(this.getSelectionRange()); - this.clearSelection(); - }; - this.removeWordLeft = function() { - if (this.selection.isEmpty()) - this.selection.selectWordLeft(); - - this.session.remove(this.getSelectionRange()); - this.clearSelection(); - }; - this.removeToLineStart = function() { - if (this.selection.isEmpty()) - this.selection.selectLineStart(); - - this.session.remove(this.getSelectionRange()); - this.clearSelection(); - }; - this.removeToLineEnd = function() { - if (this.selection.isEmpty()) - this.selection.selectLineEnd(); - - var range = this.getSelectionRange(); - if (range.start.column == range.end.column && range.start.row == range.end.row) { - range.end.column = 0; - range.end.row++; - } - - this.session.remove(range); - this.clearSelection(); - }; - this.splitLine = function() { - if (!this.selection.isEmpty()) { - this.session.remove(this.getSelectionRange()); - this.clearSelection(); - } - - var cursor = this.getCursorPosition(); - this.insert("\n"); - this.moveCursorToPosition(cursor); - }; - this.transposeLetters = function() { - if (!this.selection.isEmpty()) { - return; - } - - var cursor = this.getCursorPosition(); - var column = cursor.column; - if (column === 0) - return; - - var line = this.session.getLine(cursor.row); - var swap, range; - if (column < line.length) { - swap = line.charAt(column) + line.charAt(column-1); - range = new Range(cursor.row, column-1, cursor.row, column+1); - } - else { - swap = line.charAt(column-1) + line.charAt(column-2); - range = new Range(cursor.row, column-2, cursor.row, column); - } - this.session.replace(range, swap); - }; - this.toLowerCase = function() { - var originalRange = this.getSelectionRange(); - if (this.selection.isEmpty()) { - this.selection.selectWord(); - } - - var range = this.getSelectionRange(); - var text = this.session.getTextRange(range); - this.session.replace(range, text.toLowerCase()); - this.selection.setSelectionRange(originalRange); - }; - this.toUpperCase = function() { - var originalRange = this.getSelectionRange(); - if (this.selection.isEmpty()) { - this.selection.selectWord(); - } - - var range = this.getSelectionRange(); - var text = this.session.getTextRange(range); - this.session.replace(range, text.toUpperCase()); - this.selection.setSelectionRange(originalRange); - }; - this.indent = function() { - var session = this.session; - var range = this.getSelectionRange(); - - if (range.start.row < range.end.row) { - var rows = this.$getSelectedRows(); - session.indentRows(rows.first, rows.last, "\t"); - return; - } else if (range.start.column < range.end.column) { - var text = session.getTextRange(range); - if (!/^\s+$/.test(text)) { - var rows = this.$getSelectedRows(); - session.indentRows(rows.first, rows.last, "\t"); - return; - } - } - - var line = session.getLine(range.start.row); - var position = range.start; - var size = session.getTabSize(); - var column = session.documentToScreenColumn(position.row, position.column); - - if (this.session.getUseSoftTabs()) { - var count = (size - column % size); - var indentString = lang.stringRepeat(" ", count); - } else { - var count = column % size; - while (line[range.start.column] == " " && count) { - range.start.column--; - count--; - } - this.selection.setSelectionRange(range); - indentString = "\t"; - } - return this.insert(indentString); - }; - this.blockIndent = function() { - var rows = this.$getSelectedRows(); - this.session.indentRows(rows.first, rows.last, "\t"); - }; - this.blockOutdent = function() { - var selection = this.session.getSelection(); - this.session.outdentRows(selection.getRange()); - }; - this.sortLines = function() { - var rows = this.$getSelectedRows(); - var session = this.session; - - var lines = []; - for (i = rows.first; i <= rows.last; i++) - lines.push(session.getLine(i)); - - lines.sort(function(a, b) { - if (a.toLowerCase() < b.toLowerCase()) return -1; - if (a.toLowerCase() > b.toLowerCase()) return 1; - return 0; - }); - - var deleteRange = new Range(0, 0, 0, 0); - for (var i = rows.first; i <= rows.last; i++) { - var line = session.getLine(i); - deleteRange.start.row = i; - deleteRange.end.row = i; - deleteRange.end.column = line.length; - session.replace(deleteRange, lines[i-rows.first]); - } - }; - this.toggleCommentLines = function() { - var state = this.session.getState(this.getCursorPosition().row); - var rows = this.$getSelectedRows(); - this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last); - }; - - this.toggleBlockComment = function() { - var cursor = this.getCursorPosition(); - var state = this.session.getState(cursor.row); - var range = this.getSelectionRange(); - this.session.getMode().toggleBlockComment(state, this.session, range, cursor); - }; - this.getNumberAt = function(row, column) { - var _numberRx = /[\-]?[0-9]+(?:\.[0-9]+)?/g; - _numberRx.lastIndex = 0; - - var s = this.session.getLine(row); - while (_numberRx.lastIndex < column) { - var m = _numberRx.exec(s); - if(m.index <= column && m.index+m[0].length >= column){ - var number = { - value: m[0], - start: m.index, - end: m.index+m[0].length - }; - return number; - } - } - return null; - }; - this.modifyNumber = function(amount) { - var row = this.selection.getCursor().row; - var column = this.selection.getCursor().column; - var charRange = new Range(row, column-1, row, column); - - var c = this.session.getTextRange(charRange); - if (!isNaN(parseFloat(c)) && isFinite(c)) { - var nr = this.getNumberAt(row, column); - if (nr) { - var fp = nr.value.indexOf(".") >= 0 ? nr.start + nr.value.indexOf(".") + 1 : nr.end; - var decimals = nr.start + nr.value.length - fp; - - var t = parseFloat(nr.value); - t *= Math.pow(10, decimals); - - - if(fp !== nr.end && column < fp){ - amount *= Math.pow(10, nr.end - column - 1); - } else { - amount *= Math.pow(10, nr.end - column); - } - - t += amount; - t /= Math.pow(10, decimals); - var nnr = t.toFixed(decimals); - var replaceRange = new Range(row, nr.start, row, nr.end); - this.session.replace(replaceRange, nnr); - this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length)); - - } - } - }; - this.removeLines = function() { - var rows = this.$getSelectedRows(); - var range; - if (rows.first === 0 || rows.last+1 < this.session.getLength()) - range = new Range(rows.first, 0, rows.last+1, 0); - else - range = new Range( - rows.first-1, this.session.getLine(rows.first-1).length, - rows.last, this.session.getLine(rows.last).length - ); - this.session.remove(range); - this.clearSelection(); - }; - - this.duplicateSelection = function() { - var sel = this.selection; - var doc = this.session; - var range = sel.getRange(); - var reverse = sel.isBackwards(); - if (range.isEmpty()) { - var row = range.start.row; - doc.duplicateLines(row, row); - } else { - var point = reverse ? range.start : range.end; - var endPoint = doc.insert(point, doc.getTextRange(range), false); - range.start = point; - range.end = endPoint; - - sel.setSelectionRange(range, reverse); - } - }; - this.moveLinesDown = function() { - this.$moveLines(1, false); - }; - this.moveLinesUp = function() { - this.$moveLines(-1, false); - }; - this.moveText = function(range, toPosition, copy) { - return this.session.moveText(range, toPosition, copy); - }; - this.copyLinesUp = function() { - this.$moveLines(-1, true); - }; - this.copyLinesDown = function() { - this.$moveLines(1, true); - }; - this.$moveLines = function(dir, copy) { - var rows, moved; - var selection = this.selection; - if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) { - var range = selection.toOrientedRange(); - rows = this.$getSelectedRows(range); - moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir); - if (copy && dir == -1) moved = 0; - range.moveBy(moved, 0); - selection.fromOrientedRange(range); - } else { - var ranges = selection.rangeList.ranges; - selection.rangeList.detach(this.session); - this.inVirtualSelectionMode = true; - - var diff = 0; - var totalDiff = 0; - var l = ranges.length; - for (var i = 0; i < l; i++) { - var rangeIndex = i; - ranges[i].moveBy(diff, 0); - rows = this.$getSelectedRows(ranges[i]); - var first = rows.first; - var last = rows.last; - while (++i < l) { - if (totalDiff) ranges[i].moveBy(totalDiff, 0); - var subRows = this.$getSelectedRows(ranges[i]); - if (copy && subRows.first != last) - break; - else if (!copy && subRows.first > last + 1) - break; - last = subRows.last; - } - i--; - diff = this.session.$moveLines(first, last, copy ? 0 : dir); - if (copy && dir == -1) rangeIndex = i + 1; - while (rangeIndex <= i) { - ranges[rangeIndex].moveBy(diff, 0); - rangeIndex++; - } - if (!copy) diff = 0; - totalDiff += diff; - } - - selection.fromOrientedRange(selection.ranges[0]); - selection.rangeList.attach(this.session); - this.inVirtualSelectionMode = false; - } - }; - this.$getSelectedRows = function(range) { - range = (range || this.getSelectionRange()).collapseRows(); - - return { - first: this.session.getRowFoldStart(range.start.row), - last: this.session.getRowFoldEnd(range.end.row) - }; - }; - - this.onCompositionStart = function(text) { - this.renderer.showComposition(this.getCursorPosition()); - }; - - this.onCompositionUpdate = function(text) { - this.renderer.setCompositionText(text); - }; - - this.onCompositionEnd = function() { - this.renderer.hideComposition(); - }; - this.getFirstVisibleRow = function() { - return this.renderer.getFirstVisibleRow(); - }; - this.getLastVisibleRow = function() { - return this.renderer.getLastVisibleRow(); - }; - this.isRowVisible = function(row) { - return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow()); - }; - this.isRowFullyVisible = function(row) { - return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow()); - }; - this.$getVisibleRowCount = function() { - return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1; - }; - - this.$moveByPage = function(dir, select) { - var renderer = this.renderer; - var config = this.renderer.layerConfig; - var rows = dir * Math.floor(config.height / config.lineHeight); - - this.$blockScrolling++; - if (select === true) { - this.selection.$moveSelection(function(){ - this.moveCursorBy(rows, 0); - }); - } else if (select === false) { - this.selection.moveCursorBy(rows, 0); - this.selection.clearSelection(); - } - this.$blockScrolling--; - - var scrollTop = renderer.scrollTop; - - renderer.scrollBy(0, rows * config.lineHeight); - if (select != null) - renderer.scrollCursorIntoView(null, 0.5); - - renderer.animateScrolling(scrollTop); - }; - this.selectPageDown = function() { - this.$moveByPage(1, true); - }; - this.selectPageUp = function() { - this.$moveByPage(-1, true); - }; - this.gotoPageDown = function() { - this.$moveByPage(1, false); - }; - this.gotoPageUp = function() { - this.$moveByPage(-1, false); - }; - this.scrollPageDown = function() { - this.$moveByPage(1); - }; - this.scrollPageUp = function() { - this.$moveByPage(-1); - }; - this.scrollToRow = function(row) { - this.renderer.scrollToRow(row); - }; - this.scrollToLine = function(line, center, animate, callback) { - this.renderer.scrollToLine(line, center, animate, callback); - }; - this.centerSelection = function() { - var range = this.getSelectionRange(); - var pos = { - row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2), - column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2) - }; - this.renderer.alignCursor(pos, 0.5); - }; - this.getCursorPosition = function() { - return this.selection.getCursor(); - }; - this.getCursorPositionScreen = function() { - return this.session.documentToScreenPosition(this.getCursorPosition()); - }; - this.getSelectionRange = function() { - return this.selection.getRange(); - }; - this.selectAll = function() { - this.$blockScrolling += 1; - this.selection.selectAll(); - this.$blockScrolling -= 1; - }; - this.clearSelection = function() { - this.selection.clearSelection(); - }; - this.moveCursorTo = function(row, column) { - this.selection.moveCursorTo(row, column); - }; - this.moveCursorToPosition = function(pos) { - this.selection.moveCursorToPosition(pos); - }; - this.jumpToMatching = function(select, expand) { - var cursor = this.getCursorPosition(); - var iterator = new TokenIterator(this.session, cursor.row, cursor.column); - var prevToken = iterator.getCurrentToken(); - var token = prevToken || iterator.stepForward(); - - if (!token) return; - var matchType; - var found = false; - var depth = {}; - var i = cursor.column - token.start; - var bracketType; - var brackets = { - ")": "(", - "(": "(", - "]": "[", - "[": "[", - "{": "{", - "}": "{" - }; - - do { - if (token.value.match(/[{}()\[\]]/g)) { - for (; i < token.value.length && !found; i++) { - if (!brackets[token.value[i]]) { - continue; - } - - bracketType = brackets[token.value[i]] + '.' + token.type.replace("rparen", "lparen"); - - if (isNaN(depth[bracketType])) { - depth[bracketType] = 0; - } - - switch (token.value[i]) { - case '(': - case '[': - case '{': - depth[bracketType]++; - break; - case ')': - case ']': - case '}': - depth[bracketType]--; - - if (depth[bracketType] === -1) { - matchType = 'bracket'; - found = true; - } - break; - } - } - } - else if (token && token.type.indexOf('tag-name') !== -1) { - if (isNaN(depth[token.value])) { - depth[token.value] = 0; - } - - if (prevToken.value === '<') { - depth[token.value]++; - } - else if (prevToken.value === '= 0; --i) { - if(this.$tryReplace(ranges[i], replacement)) { - replaced++; - } - } - - this.selection.setSelectionRange(selection); - this.$blockScrolling -= 1; - - return replaced; - }; - - this.$tryReplace = function(range, replacement) { - var input = this.session.getTextRange(range); - replacement = this.$search.replace(input, replacement); - if (replacement !== null) { - range.end = this.session.replace(range, replacement); - return range; - } else { - return null; - } - }; - this.getLastSearchOptions = function() { - return this.$search.getOptions(); - }; - this.find = function(needle, options, animate) { - if (!options) - options = {}; - - if (typeof needle == "string" || needle instanceof RegExp) - options.needle = needle; - else if (typeof needle == "object") - oop.mixin(options, needle); - - var range = this.selection.getRange(); - if (options.needle == null) { - needle = this.session.getTextRange(range) - || this.$search.$options.needle; - if (!needle) { - range = this.session.getWordRange(range.start.row, range.start.column); - needle = this.session.getTextRange(range); - } - this.$search.set({needle: needle}); - } - - this.$search.set(options); - if (!options.start) - this.$search.set({start: range}); - - var newRange = this.$search.find(this.session); - if (options.preventScroll) - return newRange; - if (newRange) { - this.revealRange(newRange, animate); - return newRange; - } - if (options.backwards) - range.start = range.end; - else - range.end = range.start; - this.selection.setRange(range); - }; - this.findNext = function(options, animate) { - this.find({skipCurrent: true, backwards: false}, options, animate); - }; - this.findPrevious = function(options, animate) { - this.find(options, {skipCurrent: true, backwards: true}, animate); - }; - - this.revealRange = function(range, animate) { - this.$blockScrolling += 1; - this.session.unfold(range); - this.selection.setSelectionRange(range); - this.$blockScrolling -= 1; - - var scrollTop = this.renderer.scrollTop; - this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5); - if (animate !== false) - this.renderer.animateScrolling(scrollTop); - }; - this.undo = function() { - this.$blockScrolling++; - this.session.getUndoManager().undo(); - this.$blockScrolling--; - this.renderer.scrollCursorIntoView(null, 0.5); - }; - this.redo = function() { - this.$blockScrolling++; - this.session.getUndoManager().redo(); - this.$blockScrolling--; - this.renderer.scrollCursorIntoView(null, 0.5); - }; - this.destroy = function() { - this.renderer.destroy(); - this._signal("destroy", this); - if (this.session) { - this.session.destroy(); - } - }; - this.setAutoScrollEditorIntoView = function(enable) { - if (!enable) - return; - var rect; - var self = this; - var shouldScroll = false; - if (!this.$scrollAnchor) - this.$scrollAnchor = document.createElement("div"); - var scrollAnchor = this.$scrollAnchor; - scrollAnchor.style.cssText = "position:absolute"; - this.container.insertBefore(scrollAnchor, this.container.firstChild); - var onChangeSelection = this.on("changeSelection", function() { - shouldScroll = true; - }); - var onBeforeRender = this.renderer.on("beforeRender", function() { - if (shouldScroll) - rect = self.renderer.container.getBoundingClientRect(); - }); - var onAfterRender = this.renderer.on("afterRender", function() { - if (shouldScroll && rect && (self.isFocused() - || self.searchBox && self.searchBox.isFocused()) - ) { - var renderer = self.renderer; - var pos = renderer.$cursorLayer.$pixelPos; - var config = renderer.layerConfig; - var top = pos.top - config.offset; - if (pos.top >= 0 && top + rect.top < 0) { - shouldScroll = true; - } else if (pos.top < config.height && - pos.top + rect.top + config.lineHeight > window.innerHeight) { - shouldScroll = false; - } else { - shouldScroll = null; - } - if (shouldScroll != null) { - scrollAnchor.style.top = top + "px"; - scrollAnchor.style.left = pos.left + "px"; - scrollAnchor.style.height = config.lineHeight + "px"; - scrollAnchor.scrollIntoView(shouldScroll); - } - shouldScroll = rect = null; - } - }); - this.setAutoScrollEditorIntoView = function(enable) { - if (enable) - return; - delete this.setAutoScrollEditorIntoView; - this.removeEventListener("changeSelection", onChangeSelection); - this.renderer.removeEventListener("afterRender", onAfterRender); - this.renderer.removeEventListener("beforeRender", onBeforeRender); - }; - }; - - - this.$resetCursorStyle = function() { - var style = this.$cursorStyle || "ace"; - var cursorLayer = this.renderer.$cursorLayer; - if (!cursorLayer) - return; - cursorLayer.setSmoothBlinking(/smooth/.test(style)); - cursorLayer.isBlinking = !this.$readOnly && style != "wide"; - dom.setCssClass(cursorLayer.element, "ace_slim-cursors", /slim/.test(style)); - }; - -}).call(Editor.prototype); - - - -config.defineOptions(Editor.prototype, "editor", { - selectionStyle: { - set: function(style) { - this.onSelectionChange(); - this._signal("changeSelectionStyle", {data: style}); - }, - initialValue: "line" - }, - highlightActiveLine: { - set: function() {this.$updateHighlightActiveLine();}, - initialValue: true - }, - highlightSelectedWord: { - set: function(shouldHighlight) {this.$onSelectionChange();}, - initialValue: true - }, - readOnly: { - set: function(readOnly) { - this.$resetCursorStyle(); - }, - initialValue: false - }, - cursorStyle: { - set: function(val) { this.$resetCursorStyle(); }, - values: ["ace", "slim", "smooth", "wide"], - initialValue: "ace" - }, - mergeUndoDeltas: { - values: [false, true, "always"], - initialValue: true - }, - behavioursEnabled: {initialValue: true}, - wrapBehavioursEnabled: {initialValue: true}, - autoScrollEditorIntoView: { - set: function(val) {this.setAutoScrollEditorIntoView(val)} - }, - - hScrollBarAlwaysVisible: "renderer", - vScrollBarAlwaysVisible: "renderer", - highlightGutterLine: "renderer", - animatedScroll: "renderer", - showInvisibles: "renderer", - showPrintMargin: "renderer", - printMarginColumn: "renderer", - printMargin: "renderer", - fadeFoldWidgets: "renderer", - showFoldWidgets: "renderer", - showLineNumbers: "renderer", - showGutter: "renderer", - displayIndentGuides: "renderer", - fontSize: "renderer", - fontFamily: "renderer", - maxLines: "renderer", - minLines: "renderer", - scrollPastEnd: "renderer", - fixedWidthGutter: "renderer", - theme: "renderer", - - scrollSpeed: "$mouseHandler", - dragDelay: "$mouseHandler", - dragEnabled: "$mouseHandler", - focusTimout: "$mouseHandler", - tooltipFollowsMouse: "$mouseHandler", - - firstLineNumber: "session", - overwrite: "session", - newLineMode: "session", - useWorker: "session", - useSoftTabs: "session", - tabSize: "session", - wrap: "session", - foldStyle: "session", - mode: "session" -}); - -exports.Editor = Editor; -}); - -define("ace/undomanager",["require","exports","module"], function(require, exports, module) { -"use strict"; -var UndoManager = function() { - this.reset(); -}; - -(function() { - this.execute = function(options) { - var deltas = options.args[0]; - this.$doc = options.args[1]; - if (options.merge && this.hasUndo()){ - this.dirtyCounter--; - deltas = this.$undoStack.pop().concat(deltas); - } - this.$undoStack.push(deltas); - this.$redoStack = []; - - if (this.dirtyCounter < 0) { - this.dirtyCounter = NaN; - } - this.dirtyCounter++; - }; - this.undo = function(dontSelect) { - var deltas = this.$undoStack.pop(); - var undoSelectionRange = null; - if (deltas) { - undoSelectionRange = - this.$doc.undoChanges(deltas, dontSelect); - this.$redoStack.push(deltas); - this.dirtyCounter--; - } - - return undoSelectionRange; - }; - this.redo = function(dontSelect) { - var deltas = this.$redoStack.pop(); - var redoSelectionRange = null; - if (deltas) { - redoSelectionRange = - this.$doc.redoChanges(deltas, dontSelect); - this.$undoStack.push(deltas); - this.dirtyCounter++; - } - - return redoSelectionRange; - }; - this.reset = function() { - this.$undoStack = []; - this.$redoStack = []; - this.dirtyCounter = 0; - }; - this.hasUndo = function() { - return this.$undoStack.length > 0; - }; - this.hasRedo = function() { - return this.$redoStack.length > 0; - }; - this.markClean = function() { - this.dirtyCounter = 0; - }; - this.isClean = function() { - return this.dirtyCounter === 0; - }; - -}).call(UndoManager.prototype); - -exports.UndoManager = UndoManager; -}); - -define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"], function(require, exports, module) { -"use strict"; - -var dom = require("../lib/dom"); -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var EventEmitter = require("../lib/event_emitter").EventEmitter; - -var Gutter = function(parentEl) { - this.element = dom.createElement("div"); - this.element.className = "ace_layer ace_gutter-layer"; - parentEl.appendChild(this.element); - this.setShowFoldWidgets(this.$showFoldWidgets); - - this.gutterWidth = 0; - - this.$annotations = []; - this.$updateAnnotations = this.$updateAnnotations.bind(this); - - this.$cells = []; -}; - -(function() { - - oop.implement(this, EventEmitter); - - this.setSession = function(session) { - if (this.session) - this.session.removeEventListener("change", this.$updateAnnotations); - this.session = session; - if (session) - session.on("change", this.$updateAnnotations); - }; - - this.addGutterDecoration = function(row, className){ - if (window.console) - console.warn && console.warn("deprecated use session.addGutterDecoration"); - this.session.addGutterDecoration(row, className); - }; - - this.removeGutterDecoration = function(row, className){ - if (window.console) - console.warn && console.warn("deprecated use session.removeGutterDecoration"); - this.session.removeGutterDecoration(row, className); - }; - - this.setAnnotations = function(annotations) { - this.$annotations = []; - for (var i = 0; i < annotations.length; i++) { - var annotation = annotations[i]; - var row = annotation.row; - var rowInfo = this.$annotations[row]; - if (!rowInfo) - rowInfo = this.$annotations[row] = {text: []}; - - var annoText = annotation.text; - annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || ""; - - if (rowInfo.text.indexOf(annoText) === -1) - rowInfo.text.push(annoText); - - var type = annotation.type; - if (type == "error") - rowInfo.className = " ace_error"; - else if (type == "warning" && rowInfo.className != " ace_error") - rowInfo.className = " ace_warning"; - else if (type == "info" && (!rowInfo.className)) - rowInfo.className = " ace_info"; - } - }; - - this.$updateAnnotations = function (e) { - if (!this.$annotations.length) - return; - var delta = e.data; - var range = delta.range; - var firstRow = range.start.row; - var len = range.end.row - firstRow; - if (len === 0) { - } else if (delta.action == "removeText" || delta.action == "removeLines") { - this.$annotations.splice(firstRow, len + 1, null); - } else { - var args = new Array(len + 1); - args.unshift(firstRow, 1); - this.$annotations.splice.apply(this.$annotations, args); - } - }; - - this.update = function(config) { - var session = this.session; - var firstRow = config.firstRow; - var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar - session.getLength() - 1); - var fold = session.getNextFoldLine(firstRow); - var foldStart = fold ? fold.start.row : Infinity; - var foldWidgets = this.$showFoldWidgets && session.foldWidgets; - var breakpoints = session.$breakpoints; - var decorations = session.$decorations; - var firstLineNumber = session.$firstLineNumber; - var lastLineNumber = 0; - - var gutterRenderer = session.gutterRenderer || this.$renderer; - - var cell = null; - var index = -1; - var row = firstRow; - while (true) { - if (row > foldStart) { - row = fold.end.row + 1; - fold = session.getNextFoldLine(row, fold); - foldStart = fold ? fold.start.row : Infinity; - } - if (row > lastRow) { - while (this.$cells.length > index + 1) { - cell = this.$cells.pop(); - this.element.removeChild(cell.element); - } - break; - } - - cell = this.$cells[++index]; - if (!cell) { - cell = {element: null, textNode: null, foldWidget: null}; - cell.element = dom.createElement("div"); - cell.textNode = document.createTextNode(''); - cell.element.appendChild(cell.textNode); - this.element.appendChild(cell.element); - this.$cells[index] = cell; - } - - var className = "ace_gutter-cell "; - if (breakpoints[row]) - className += breakpoints[row]; - if (decorations[row]) - className += decorations[row]; - if (this.$annotations[row]) - className += this.$annotations[row].className; - if (cell.element.className != className) - cell.element.className = className; - - var height = session.getRowLength(row) * config.lineHeight + "px"; - if (height != cell.element.style.height) - cell.element.style.height = height; - - if (foldWidgets) { - var c = foldWidgets[row]; - if (c == null) - c = foldWidgets[row] = session.getFoldWidget(row); - } - - if (c) { - if (!cell.foldWidget) { - cell.foldWidget = dom.createElement("span"); - cell.element.appendChild(cell.foldWidget); - } - var className = "ace_fold-widget ace_" + c; - if (c == "start" && row == foldStart && row < fold.end.row) - className += " ace_closed"; - else - className += " ace_open"; - if (cell.foldWidget.className != className) - cell.foldWidget.className = className; - - var height = config.lineHeight + "px"; - if (cell.foldWidget.style.height != height) - cell.foldWidget.style.height = height; - } else { - if (cell.foldWidget) { - cell.element.removeChild(cell.foldWidget); - cell.foldWidget = null; - } - } - - var text = lastLineNumber = gutterRenderer - ? gutterRenderer.getText(session, row) - : row + firstLineNumber; - if (text != cell.textNode.data) - cell.textNode.data = text; - - row++; - } - - this.element.style.height = config.minHeight + "px"; - - if (this.$fixedWidth || session.$useWrapMode) - lastLineNumber = session.getLength() + firstLineNumber; - - var gutterWidth = gutterRenderer - ? gutterRenderer.getWidth(session, lastLineNumber, config) - : lastLineNumber.toString().length * config.characterWidth; - - var padding = this.$padding || this.$computePadding(); - gutterWidth += padding.left + padding.right; - if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) { - this.gutterWidth = gutterWidth; - this.element.style.width = Math.ceil(this.gutterWidth) + "px"; - this._emit("changeGutterWidth", gutterWidth); - } - }; - - this.$fixedWidth = false; - - this.$showLineNumbers = true; - this.$renderer = ""; - this.setShowLineNumbers = function(show) { - this.$renderer = !show && { - getWidth: function() {return ""}, - getText: function() {return ""} - }; - }; - - this.getShowLineNumbers = function() { - return this.$showLineNumbers; - }; - - this.$showFoldWidgets = true; - this.setShowFoldWidgets = function(show) { - if (show) - dom.addCssClass(this.element, "ace_folding-enabled"); - else - dom.removeCssClass(this.element, "ace_folding-enabled"); - - this.$showFoldWidgets = show; - this.$padding = null; - }; - - this.getShowFoldWidgets = function() { - return this.$showFoldWidgets; - }; - - this.$computePadding = function() { - if (!this.element.firstChild) - return {left: 0, right: 0}; - var style = dom.computedStyle(this.element.firstChild); - this.$padding = {}; - this.$padding.left = parseInt(style.paddingLeft) + 1 || 0; - this.$padding.right = parseInt(style.paddingRight) || 0; - return this.$padding; - }; - - this.getRegion = function(point) { - var padding = this.$padding || this.$computePadding(); - var rect = this.element.getBoundingClientRect(); - if (point.x < padding.left + rect.left) - return "markers"; - if (this.$showFoldWidgets && point.x > rect.right - padding.right) - return "foldWidgets"; - }; - -}).call(Gutter.prototype); - -exports.Gutter = Gutter; - -}); - -define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; -var dom = require("../lib/dom"); - -var Marker = function(parentEl) { - this.element = dom.createElement("div"); - this.element.className = "ace_layer ace_marker-layer"; - parentEl.appendChild(this.element); -}; - -(function() { - - this.$padding = 0; - - this.setPadding = function(padding) { - this.$padding = padding; - }; - this.setSession = function(session) { - this.session = session; - }; - - this.setMarkers = function(markers) { - this.markers = markers; - }; - - this.update = function(config) { - var config = config || this.config; - if (!config) - return; - - this.config = config; - - - var html = []; - for (var key in this.markers) { - var marker = this.markers[key]; - - if (!marker.range) { - marker.update(html, this, this.session, config); - continue; - } - - var range = marker.range.clipRows(config.firstRow, config.lastRow); - if (range.isEmpty()) continue; - - range = range.toScreenRange(this.session); - if (marker.renderer) { - var top = this.$getTop(range.start.row, config); - var left = this.$padding + range.start.column * config.characterWidth; - marker.renderer(html, range, left, top, config); - } else if (marker.type == "fullLine") { - this.drawFullLineMarker(html, range, marker.clazz, config); - } else if (marker.type == "screenLine") { - this.drawScreenLineMarker(html, range, marker.clazz, config); - } else if (range.isMultiLine()) { - if (marker.type == "text") - this.drawTextMarker(html, range, marker.clazz, config); - else - this.drawMultiLineMarker(html, range, marker.clazz, config); - } else { - this.drawSingleLineMarker(html, range, marker.clazz + " ace_start", config); - } - } - this.element.innerHTML = html.join(""); - }; - - this.$getTop = function(row, layerConfig) { - return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight; - }; - this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig, extraStyle) { - var row = range.start.row; - - var lineRange = new Range( - row, range.start.column, - row, this.session.getScreenLastRowColumn(row) - ); - this.drawSingleLineMarker(stringBuilder, lineRange, clazz + " ace_start", layerConfig, 1, extraStyle); - row = range.end.row; - lineRange = new Range(row, 0, row, range.end.column); - this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 0, extraStyle); - - for (row = range.start.row + 1; row < range.end.row; row++) { - lineRange.start.row = row; - lineRange.end.row = row; - lineRange.end.column = this.session.getScreenLastRowColumn(row); - this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 1, extraStyle); - } - }; - this.drawMultiLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { - var padding = this.$padding; - var height = config.lineHeight; - var top = this.$getTop(range.start.row, config); - var left = padding + range.start.column * config.characterWidth; - extraStyle = extraStyle || ""; - - stringBuilder.push( - "
" - ); - top = this.$getTop(range.end.row, config); - var width = range.end.column * config.characterWidth; - - stringBuilder.push( - "
" - ); - height = (range.end.row - range.start.row - 1) * config.lineHeight; - if (height < 0) - return; - top = this.$getTop(range.start.row + 1, config); - - stringBuilder.push( - "
" - ); - }; - this.drawSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) { - var height = config.lineHeight; - var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth; - - var top = this.$getTop(range.start.row, config); - var left = this.$padding + range.start.column * config.characterWidth; - - stringBuilder.push( - "
" - ); - }; - - this.drawFullLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { - var top = this.$getTop(range.start.row, config); - var height = config.lineHeight; - if (range.start.row != range.end.row) - height += this.$getTop(range.end.row, config) - top; - - stringBuilder.push( - "
" - ); - }; - - this.drawScreenLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { - var top = this.$getTop(range.start.row, config); - var height = config.lineHeight; - - stringBuilder.push( - "
" - ); - }; - -}).call(Marker.prototype); - -exports.Marker = Marker; - -}); - -define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var dom = require("../lib/dom"); -var lang = require("../lib/lang"); -var useragent = require("../lib/useragent"); -var EventEmitter = require("../lib/event_emitter").EventEmitter; - -var Text = function(parentEl) { - this.element = dom.createElement("div"); - this.element.className = "ace_layer ace_text-layer"; - parentEl.appendChild(this.element); - this.$updateEolChar = this.$updateEolChar.bind(this); -}; - -(function() { - - oop.implement(this, EventEmitter); - - this.EOF_CHAR = "\xB6"; - this.EOL_CHAR_LF = "\xAC"; - this.EOL_CHAR_CRLF = "\xa4"; - this.EOL_CHAR = this.EOL_CHAR_LF; - this.TAB_CHAR = "\u2192"; //"\u21E5"; - this.SPACE_CHAR = "\xB7"; - this.$padding = 0; - - this.$updateEolChar = function() { - var EOL_CHAR = this.session.doc.getNewLineCharacter() == "\n" - ? this.EOL_CHAR_LF - : this.EOL_CHAR_CRLF; - if (this.EOL_CHAR != EOL_CHAR) { - this.EOL_CHAR = EOL_CHAR; - return true; - } - } - - this.setPadding = function(padding) { - this.$padding = padding; - this.element.style.padding = "0 " + padding + "px"; - }; - - this.getLineHeight = function() { - return this.$fontMetrics.$characterSize.height || 0; - }; - - this.getCharacterWidth = function() { - return this.$fontMetrics.$characterSize.width || 0; - }; - - this.$setFontMetrics = function(measure) { - this.$fontMetrics = measure; - this.$fontMetrics.on("changeCharacterSize", function(e) { - this._signal("changeCharacterSize", e); - }.bind(this)); - this.$pollSizeChanges(); - } - - this.checkForSizeChanges = function() { - this.$fontMetrics.checkForSizeChanges(); - }; - this.$pollSizeChanges = function() { - return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges(); - }; - this.setSession = function(session) { - this.session = session; - if (session) - this.$computeTabString(); - }; - - this.showInvisibles = false; - this.setShowInvisibles = function(showInvisibles) { - if (this.showInvisibles == showInvisibles) - return false; - - this.showInvisibles = showInvisibles; - this.$computeTabString(); - return true; - }; - - this.displayIndentGuides = true; - this.setDisplayIndentGuides = function(display) { - if (this.displayIndentGuides == display) - return false; - - this.displayIndentGuides = display; - this.$computeTabString(); - return true; - }; - - this.$tabStrings = []; - this.onChangeTabSize = - this.$computeTabString = function() { - var tabSize = this.session.getTabSize(); - this.tabSize = tabSize; - var tabStr = this.$tabStrings = [0]; - for (var i = 1; i < tabSize + 1; i++) { - if (this.showInvisibles) { - tabStr.push("" - + this.TAB_CHAR - + lang.stringRepeat("\xa0", i - 1) - + ""); - } else { - tabStr.push(lang.stringRepeat("\xa0", i)); - } - } - if (this.displayIndentGuides) { - this.$indentGuideRe = /\s\S| \t|\t |\s$/; - var className = "ace_indent-guide"; - var spaceClass = ""; - var tabClass = ""; - if (this.showInvisibles) { - className += " ace_invisible"; - spaceClass = " ace_invisible_space"; - tabClass = " ace_invisible_tab"; - var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize); - var tabContent = this.TAB_CHAR + lang.stringRepeat("\xa0", this.tabSize - 1); - } else{ - var spaceContent = lang.stringRepeat("\xa0", this.tabSize); - var tabContent = spaceContent; - } - - this.$tabStrings[" "] = "" + spaceContent + ""; - this.$tabStrings["\t"] = "" + tabContent + ""; - } - }; - - this.updateLines = function(config, firstRow, lastRow) { - if (this.config.lastRow != config.lastRow || - this.config.firstRow != config.firstRow) { - this.scrollLines(config); - } - this.config = config; - - var first = Math.max(firstRow, config.firstRow); - var last = Math.min(lastRow, config.lastRow); - - var lineElements = this.element.childNodes; - var lineElementsIdx = 0; - - for (var row = config.firstRow; row < first; row++) { - var foldLine = this.session.getFoldLine(row); - if (foldLine) { - if (foldLine.containsRow(first)) { - first = foldLine.start.row; - break; - } else { - row = foldLine.end.row; - } - } - lineElementsIdx ++; - } - - var row = first; - var foldLine = this.session.getNextFoldLine(row); - var foldStart = foldLine ? foldLine.start.row : Infinity; - - while (true) { - if (row > foldStart) { - row = foldLine.end.row+1; - foldLine = this.session.getNextFoldLine(row, foldLine); - foldStart = foldLine ? foldLine.start.row :Infinity; - } - if (row > last) - break; - - var lineElement = lineElements[lineElementsIdx++]; - if (lineElement) { - var html = []; - this.$renderLine( - html, row, !this.$useLineGroups(), row == foldStart ? foldLine : false - ); - lineElement.style.height = config.lineHeight * this.session.getRowLength(row) + "px"; - lineElement.innerHTML = html.join(""); - } - row++; - } - }; - - this.scrollLines = function(config) { - var oldConfig = this.config; - this.config = config; - - if (!oldConfig || oldConfig.lastRow < config.firstRow) - return this.update(config); - - if (config.lastRow < oldConfig.firstRow) - return this.update(config); - - var el = this.element; - if (oldConfig.firstRow < config.firstRow) - for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--) - el.removeChild(el.firstChild); - - if (oldConfig.lastRow > config.lastRow) - for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--) - el.removeChild(el.lastChild); - - if (config.firstRow < oldConfig.firstRow) { - var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1); - if (el.firstChild) - el.insertBefore(fragment, el.firstChild); - else - el.appendChild(fragment); - } - - if (config.lastRow > oldConfig.lastRow) { - var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow); - el.appendChild(fragment); - } - }; - - this.$renderLinesFragment = function(config, firstRow, lastRow) { - var fragment = this.element.ownerDocument.createDocumentFragment(); - var row = firstRow; - var foldLine = this.session.getNextFoldLine(row); - var foldStart = foldLine ? foldLine.start.row : Infinity; - - while (true) { - if (row > foldStart) { - row = foldLine.end.row+1; - foldLine = this.session.getNextFoldLine(row, foldLine); - foldStart = foldLine ? foldLine.start.row : Infinity; - } - if (row > lastRow) - break; - - var container = dom.createElement("div"); - - var html = []; - this.$renderLine(html, row, false, row == foldStart ? foldLine : false); - container.innerHTML = html.join(""); - if (this.$useLineGroups()) { - container.className = 'ace_line_group'; - fragment.appendChild(container); - container.style.height = config.lineHeight * this.session.getRowLength(row) + "px"; - - } else { - while(container.firstChild) - fragment.appendChild(container.firstChild); - } - - row++; - } - return fragment; - }; - - this.update = function(config) { - this.config = config; - - var html = []; - var firstRow = config.firstRow, lastRow = config.lastRow; - - var row = firstRow; - var foldLine = this.session.getNextFoldLine(row); - var foldStart = foldLine ? foldLine.start.row : Infinity; - - while (true) { - if (row > foldStart) { - row = foldLine.end.row+1; - foldLine = this.session.getNextFoldLine(row, foldLine); - foldStart = foldLine ? foldLine.start.row :Infinity; - } - if (row > lastRow) - break; - - if (this.$useLineGroups()) - html.push("
") - - this.$renderLine(html, row, false, row == foldStart ? foldLine : false); - - if (this.$useLineGroups()) - html.push("
"); // end the line group - - row++; - } - this.element.innerHTML = html.join(""); - }; - - this.$textToken = { - "text": true, - "rparen": true, - "lparen": true - }; - - this.$renderToken = function(stringBuilder, screenColumn, token, value) { - var self = this; - var replaceReg = /\t|&|<|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g; - var replaceFunc = function(c, a, b, tabIdx, idx4) { - if (a) { - return self.showInvisibles ? - "" + lang.stringRepeat(self.SPACE_CHAR, c.length) + "" : - lang.stringRepeat("\xa0", c.length); - } else if (c == "&") { - return "&"; - } else if (c == "<") { - return "<"; - } else if (c == "\t") { - var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx); - screenColumn += tabSize - 1; - return self.$tabStrings[tabSize]; - } else if (c == "\u3000") { - var classToUse = self.showInvisibles ? "ace_cjk ace_invisible ace_invisible_space" : "ace_cjk"; - var space = self.showInvisibles ? self.SPACE_CHAR : ""; - screenColumn += 1; - return "" + space + ""; - } else if (b) { - return "" + self.SPACE_CHAR + ""; - } else { - screenColumn += 1; - return "" + c + ""; - } - }; - - var output = value.replace(replaceReg, replaceFunc); - - if (!this.$textToken[token.type]) { - var classes = "ace_" + token.type.replace(/\./g, " ace_"); - var style = ""; - if (token.type == "fold") - style = " style='width:" + (token.value.length * this.config.characterWidth) + "px;' "; - stringBuilder.push("", output, ""); - } - else { - stringBuilder.push(output); - } - return screenColumn + value.length; - }; - - this.renderIndentGuide = function(stringBuilder, value, max) { - var cols = value.search(this.$indentGuideRe); - if (cols <= 0 || cols >= max) - return value; - if (value[0] == " ") { - cols -= cols % this.tabSize; - stringBuilder.push(lang.stringRepeat(this.$tabStrings[" "], cols/this.tabSize)); - return value.substr(cols); - } else if (value[0] == "\t") { - stringBuilder.push(lang.stringRepeat(this.$tabStrings["\t"], cols)); - return value.substr(cols); - } - return value; - }; - - this.$renderWrappedLine = function(stringBuilder, tokens, splits, onlyContents) { - var chars = 0; - var split = 0; - var splitChars = splits[0]; - var screenColumn = 0; - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - var value = token.value; - if (i == 0 && this.displayIndentGuides) { - chars = value.length; - value = this.renderIndentGuide(stringBuilder, value, splitChars); - if (!value) - continue; - chars -= value.length; - } - - if (chars + value.length < splitChars) { - screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); - chars += value.length; - } else { - while (chars + value.length >= splitChars) { - screenColumn = this.$renderToken( - stringBuilder, screenColumn, - token, value.substring(0, splitChars - chars) - ); - value = value.substring(splitChars - chars); - chars = splitChars; - - if (!onlyContents) { - stringBuilder.push("", - "
" - ); - } - - split ++; - screenColumn = 0; - splitChars = splits[split] || Number.MAX_VALUE; - } - if (value.length != 0) { - chars += value.length; - screenColumn = this.$renderToken( - stringBuilder, screenColumn, token, value - ); - } - } - } - }; - - this.$renderSimpleLine = function(stringBuilder, tokens) { - var screenColumn = 0; - var token = tokens[0]; - var value = token.value; - if (this.displayIndentGuides) - value = this.renderIndentGuide(stringBuilder, value); - if (value) - screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); - for (var i = 1; i < tokens.length; i++) { - token = tokens[i]; - value = token.value; - screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); - } - }; - this.$renderLine = function(stringBuilder, row, onlyContents, foldLine) { - if (!foldLine && foldLine != false) - foldLine = this.session.getFoldLine(row); - - if (foldLine) - var tokens = this.$getFoldLineTokens(row, foldLine); - else - var tokens = this.session.getTokens(row); - - - if (!onlyContents) { - stringBuilder.push( - "
" - ); - } - - if (tokens.length) { - var splits = this.session.getRowSplitData(row); - if (splits && splits.length) - this.$renderWrappedLine(stringBuilder, tokens, splits, onlyContents); - else - this.$renderSimpleLine(stringBuilder, tokens); - } - - if (this.showInvisibles) { - if (foldLine) - row = foldLine.end.row - - stringBuilder.push( - "", - row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR, - "" - ); - } - if (!onlyContents) - stringBuilder.push("
"); - }; - - this.$getFoldLineTokens = function(row, foldLine) { - var session = this.session; - var renderTokens = []; - - function addTokens(tokens, from, to) { - var idx = 0, col = 0; - while ((col + tokens[idx].value.length) < from) { - col += tokens[idx].value.length; - idx++; - - if (idx == tokens.length) - return; - } - if (col != from) { - var value = tokens[idx].value.substring(from - col); - if (value.length > (to - from)) - value = value.substring(0, to - from); - - renderTokens.push({ - type: tokens[idx].type, - value: value - }); - - col = from + value.length; - idx += 1; - } - - while (col < to && idx < tokens.length) { - var value = tokens[idx].value; - if (value.length + col > to) { - renderTokens.push({ - type: tokens[idx].type, - value: value.substring(0, to - col) - }); - } else - renderTokens.push(tokens[idx]); - col += value.length; - idx += 1; - } - } - - var tokens = session.getTokens(row); - foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) { - if (placeholder != null) { - renderTokens.push({ - type: "fold", - value: placeholder - }); - } else { - if (isNewRow) - tokens = session.getTokens(row); - - if (tokens.length) - addTokens(tokens, lastColumn, column); - } - }, foldLine.end.row, this.session.getLine(foldLine.end.row).length); - - return renderTokens; - }; - - this.$useLineGroups = function() { - return this.session.getUseWrapMode(); - }; - - this.destroy = function() { - clearInterval(this.$pollSizeChangesTimer); - if (this.$measureNode) - this.$measureNode.parentNode.removeChild(this.$measureNode); - delete this.$measureNode; - }; - -}).call(Text.prototype); - -exports.Text = Text; - -}); - -define("ace/layer/cursor",["require","exports","module","ace/lib/dom"], function(require, exports, module) { -"use strict"; - -var dom = require("../lib/dom"); -var IE8; - -var Cursor = function(parentEl) { - this.element = dom.createElement("div"); - this.element.className = "ace_layer ace_cursor-layer"; - parentEl.appendChild(this.element); - - if (IE8 === undefined) - IE8 = "opacity" in this.element; - - this.isVisible = false; - this.isBlinking = true; - this.blinkInterval = 1000; - this.smoothBlinking = false; - - this.cursors = []; - this.cursor = this.addCursor(); - dom.addCssClass(this.element, "ace_hidden-cursors"); - this.$updateCursors = this.$updateVisibility.bind(this); -}; - -(function() { - - this.$updateVisibility = function(val) { - var cursors = this.cursors; - for (var i = cursors.length; i--; ) - cursors[i].style.visibility = val ? "" : "hidden"; - }; - this.$updateOpacity = function(val) { - var cursors = this.cursors; - for (var i = cursors.length; i--; ) - cursors[i].style.opacity = val ? "" : "0"; - }; - - - this.$padding = 0; - this.setPadding = function(padding) { - this.$padding = padding; - }; - - this.setSession = function(session) { - this.session = session; - }; - - this.setBlinking = function(blinking) { - if (blinking != this.isBlinking){ - this.isBlinking = blinking; - this.restartTimer(); - } - }; - - this.setBlinkInterval = function(blinkInterval) { - if (blinkInterval != this.blinkInterval){ - this.blinkInterval = blinkInterval; - this.restartTimer(); - } - }; - - this.setSmoothBlinking = function(smoothBlinking) { - if (smoothBlinking != this.smoothBlinking && !IE8) { - this.smoothBlinking = smoothBlinking; - dom.setCssClass(this.element, "ace_smooth-blinking", smoothBlinking); - this.$updateCursors(true); - this.$updateCursors = (smoothBlinking - ? this.$updateOpacity - : this.$updateVisibility).bind(this); - this.restartTimer(); - } - }; - - this.addCursor = function() { - var el = dom.createElement("div"); - el.className = "ace_cursor"; - this.element.appendChild(el); - this.cursors.push(el); - return el; - }; - - this.removeCursor = function() { - if (this.cursors.length > 1) { - var el = this.cursors.pop(); - el.parentNode.removeChild(el); - return el; - } - }; - - this.hideCursor = function() { - this.isVisible = false; - dom.addCssClass(this.element, "ace_hidden-cursors"); - this.restartTimer(); - }; - - this.showCursor = function() { - this.isVisible = true; - dom.removeCssClass(this.element, "ace_hidden-cursors"); - this.restartTimer(); - }; - - this.restartTimer = function() { - var update = this.$updateCursors; - clearInterval(this.intervalId); - clearTimeout(this.timeoutId); - if (this.smoothBlinking) { - dom.removeCssClass(this.element, "ace_smooth-blinking"); - } - - update(true); - - if (!this.isBlinking || !this.blinkInterval || !this.isVisible) - return; - - if (this.smoothBlinking) { - setTimeout(function(){ - dom.addCssClass(this.element, "ace_smooth-blinking"); - }.bind(this)); - } - - var blink = function(){ - this.timeoutId = setTimeout(function() { - update(false); - }, 0.6 * this.blinkInterval); - }.bind(this); - - this.intervalId = setInterval(function() { - update(true); - blink(); - }, this.blinkInterval); - - blink(); - }; - - this.getPixelPosition = function(position, onScreen) { - if (!this.config || !this.session) - return {left : 0, top : 0}; - - if (!position) - position = this.session.selection.getCursor(); - var pos = this.session.documentToScreenPosition(position); - var cursorLeft = this.$padding + pos.column * this.config.characterWidth; - var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) * - this.config.lineHeight; - - return {left : cursorLeft, top : cursorTop}; - }; - - this.update = function(config) { - this.config = config; - - var selections = this.session.$selectionMarkers; - var i = 0, cursorIndex = 0; - - if (selections === undefined || selections.length === 0){ - selections = [{cursor: null}]; - } - - for (var i = 0, n = selections.length; i < n; i++) { - var pixelPos = this.getPixelPosition(selections[i].cursor, true); - if ((pixelPos.top > config.height + config.offset || - pixelPos.top < 0) && i > 1) { - continue; - } - - var style = (this.cursors[cursorIndex++] || this.addCursor()).style; - - if (!this.drawCursor) { - style.left = pixelPos.left + "px"; - style.top = pixelPos.top + "px"; - style.width = config.characterWidth + "px"; - style.height = config.lineHeight + "px"; - } else { - this.drawCursor(style, pixelPos, config, selections[i], this.session); - } - } - while (this.cursors.length > cursorIndex) - this.removeCursor(); - - var overwrite = this.session.getOverwrite(); - this.$setOverwrite(overwrite); - this.$pixelPos = pixelPos; - this.restartTimer(); - }; - - this.drawCursor = null; - - this.$setOverwrite = function(overwrite) { - if (overwrite != this.overwrite) { - this.overwrite = overwrite; - if (overwrite) - dom.addCssClass(this.element, "ace_overwrite-cursors"); - else - dom.removeCssClass(this.element, "ace_overwrite-cursors"); - } - }; - - this.destroy = function() { - clearInterval(this.intervalId); - clearTimeout(this.timeoutId); - }; - -}).call(Cursor.prototype); - -exports.Cursor = Cursor; - -}); - -define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"], function(require, exports, module) { -"use strict"; - -var oop = require("./lib/oop"); -var dom = require("./lib/dom"); -var event = require("./lib/event"); -var EventEmitter = require("./lib/event_emitter").EventEmitter; -var ScrollBar = function(parent) { - this.element = dom.createElement("div"); - this.element.className = "ace_scrollbar ace_scrollbar" + this.classSuffix; - - this.inner = dom.createElement("div"); - this.inner.className = "ace_scrollbar-inner"; - this.element.appendChild(this.inner); - - parent.appendChild(this.element); - - this.setVisible(false); - this.skipEvent = false; - - event.addListener(this.element, "scroll", this.onScroll.bind(this)); - event.addListener(this.element, "mousedown", event.preventDefault); -}; - -(function() { - oop.implement(this, EventEmitter); - - this.setVisible = function(isVisible) { - this.element.style.display = isVisible ? "" : "none"; - this.isVisible = isVisible; - }; -}).call(ScrollBar.prototype); -var VScrollBar = function(parent, renderer) { - ScrollBar.call(this, parent); - this.scrollTop = 0; - renderer.$scrollbarWidth = - this.width = dom.scrollbarWidth(parent.ownerDocument); - this.inner.style.width = - this.element.style.width = (this.width || 15) + 5 + "px"; -}; - -oop.inherits(VScrollBar, ScrollBar); - -(function() { - - this.classSuffix = '-v'; - this.onScroll = function() { - if (!this.skipEvent) { - this.scrollTop = this.element.scrollTop; - this._emit("scroll", {data: this.scrollTop}); - } - this.skipEvent = false; - }; - this.getWidth = function() { - return this.isVisible ? this.width : 0; - }; - this.setHeight = function(height) { - this.element.style.height = height + "px"; - }; - this.setInnerHeight = function(height) { - this.inner.style.height = height + "px"; - }; - this.setScrollHeight = function(height) { - this.inner.style.height = height + "px"; - }; - this.setScrollTop = function(scrollTop) { - if (this.scrollTop != scrollTop) { - this.skipEvent = true; - this.scrollTop = this.element.scrollTop = scrollTop; - } - }; - -}).call(VScrollBar.prototype); -var HScrollBar = function(parent, renderer) { - ScrollBar.call(this, parent); - this.scrollLeft = 0; - this.height = renderer.$scrollbarWidth; - this.inner.style.height = - this.element.style.height = (this.height || 15) + 5 + "px"; -}; - -oop.inherits(HScrollBar, ScrollBar); - -(function() { - - this.classSuffix = '-h'; - this.onScroll = function() { - if (!this.skipEvent) { - this.scrollLeft = this.element.scrollLeft; - this._emit("scroll", {data: this.scrollLeft}); - } - this.skipEvent = false; - }; - this.getHeight = function() { - return this.isVisible ? this.height : 0; - }; - this.setWidth = function(width) { - this.element.style.width = width + "px"; - }; - this.setInnerWidth = function(width) { - this.inner.style.width = width + "px"; - }; - this.setScrollWidth = function(width) { - this.inner.style.width = width + "px"; - }; - this.setScrollLeft = function(scrollLeft) { - if (this.scrollLeft != scrollLeft) { - this.skipEvent = true; - this.scrollLeft = this.element.scrollLeft = scrollLeft; - } - }; - -}).call(HScrollBar.prototype); - - -exports.ScrollBar = VScrollBar; // backward compatibility -exports.ScrollBarV = VScrollBar; // backward compatibility -exports.ScrollBarH = HScrollBar; // backward compatibility - -exports.VScrollBar = VScrollBar; -exports.HScrollBar = HScrollBar; -}); - -define("ace/renderloop",["require","exports","module","ace/lib/event"], function(require, exports, module) { -"use strict"; - -var event = require("./lib/event"); - - -var RenderLoop = function(onRender, win) { - this.onRender = onRender; - this.pending = false; - this.changes = 0; - this.window = win || window; -}; - -(function() { - - - this.schedule = function(change) { - this.changes = this.changes | change; - if (!this.pending && this.changes) { - this.pending = true; - var _self = this; - event.nextFrame(function() { - _self.pending = false; - var changes; - while (changes = _self.changes) { - _self.changes = 0; - _self.onRender(changes); - } - }, this.window); - } - }; - -}).call(RenderLoop.prototype); - -exports.RenderLoop = RenderLoop; -}); - -define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"], function(require, exports, module) { - -var oop = require("../lib/oop"); -var dom = require("../lib/dom"); -var lang = require("../lib/lang"); -var useragent = require("../lib/useragent"); -var EventEmitter = require("../lib/event_emitter").EventEmitter; - -var CHAR_COUNT = 0; - -var FontMetrics = exports.FontMetrics = function(parentEl, interval) { - this.el = dom.createElement("div"); - this.$setMeasureNodeStyles(this.el.style, true); - - this.$main = dom.createElement("div"); - this.$setMeasureNodeStyles(this.$main.style); - - this.$measureNode = dom.createElement("div"); - this.$setMeasureNodeStyles(this.$measureNode.style); - - - this.el.appendChild(this.$main); - this.el.appendChild(this.$measureNode); - parentEl.appendChild(this.el); - - if (!CHAR_COUNT) - this.$testFractionalRect(); - this.$measureNode.innerHTML = lang.stringRepeat("X", CHAR_COUNT); - - this.$characterSize = {width: 0, height: 0}; - this.checkForSizeChanges(); -}; - -(function() { - - oop.implement(this, EventEmitter); - - this.$characterSize = {width: 0, height: 0}; - - this.$testFractionalRect = function() { - var el = dom.createElement("div"); - this.$setMeasureNodeStyles(el.style); - el.style.width = "0.2px"; - document.documentElement.appendChild(el); - var w = el.getBoundingClientRect().width; - if (w > 0 && w < 1) - CHAR_COUNT = 50; - else - CHAR_COUNT = 100; - el.parentNode.removeChild(el); - }; - - this.$setMeasureNodeStyles = function(style, isRoot) { - style.width = style.height = "auto"; - style.left = style.top = "0px"; - style.visibility = "hidden"; - style.position = "absolute"; - style.whiteSpace = "pre"; - - if (useragent.isIE < 8) { - style["font-family"] = "inherit"; - } else { - style.font = "inherit"; - } - style.overflow = isRoot ? "hidden" : "visible"; - }; - - this.checkForSizeChanges = function() { - var size = this.$measureSizes(); - if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) { - this.$measureNode.style.fontWeight = "bold"; - var boldSize = this.$measureSizes(); - this.$measureNode.style.fontWeight = ""; - this.$characterSize = size; - this.charSizes = Object.create(null); - this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height; - this._emit("changeCharacterSize", {data: size}); - } - }; - - this.$pollSizeChanges = function() { - if (this.$pollSizeChangesTimer) - return this.$pollSizeChangesTimer; - var self = this; - return this.$pollSizeChangesTimer = setInterval(function() { - self.checkForSizeChanges(); - }, 500); - }; - - this.setPolling = function(val) { - if (val) { - this.$pollSizeChanges(); - } else { - if (this.$pollSizeChangesTimer) - this.$pollSizeChangesTimer; - } - }; - - this.$measureSizes = function() { - if (CHAR_COUNT === 50) { - var rect = null; - try { - rect = this.$measureNode.getBoundingClientRect(); - } catch(e) { - rect = {width: 0, height:0 }; - }; - var size = { - height: rect.height, - width: rect.width / CHAR_COUNT - }; - } else { - var size = { - height: this.$measureNode.clientHeight, - width: this.$measureNode.clientWidth / CHAR_COUNT - }; - } - if (size.width === 0 || size.height === 0) - return null; - return size; - }; - - this.$measureCharWidth = function(ch) { - this.$main.innerHTML = lang.stringRepeat(ch, CHAR_COUNT); - var rect = this.$main.getBoundingClientRect(); - return rect.width / CHAR_COUNT; - }; - - this.getCharacterWidth = function(ch) { - var w = this.charSizes[ch]; - if (w === undefined) { - this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width; - } - return w; - }; - - this.destroy = function() { - clearInterval(this.$pollSizeChangesTimer); - if (this.el && this.el.parentNode) - this.el.parentNode.removeChild(this.el); - }; - -}).call(FontMetrics.prototype); - -}); - -define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"], function(require, exports, module) { -"use strict"; - -var oop = require("./lib/oop"); -var dom = require("./lib/dom"); -var config = require("./config"); -var useragent = require("./lib/useragent"); -var GutterLayer = require("./layer/gutter").Gutter; -var MarkerLayer = require("./layer/marker").Marker; -var TextLayer = require("./layer/text").Text; -var CursorLayer = require("./layer/cursor").Cursor; -var HScrollBar = require("./scrollbar").HScrollBar; -var VScrollBar = require("./scrollbar").VScrollBar; -var RenderLoop = require("./renderloop").RenderLoop; -var FontMetrics = require("./layer/font_metrics").FontMetrics; -var EventEmitter = require("./lib/event_emitter").EventEmitter; -var editorCss = ".ace_editor {\ -position: relative;\ -overflow: hidden;\ -font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;\ -direction: ltr;\ -}\ -.ace_scroller {\ -position: absolute;\ -overflow: hidden;\ -top: 0;\ -bottom: 0;\ -background-color: inherit;\ --ms-user-select: none;\ --moz-user-select: none;\ --webkit-user-select: none;\ -user-select: none;\ -cursor: text;\ -}\ -.ace_content {\ -position: absolute;\ --moz-box-sizing: border-box;\ --webkit-box-sizing: border-box;\ -box-sizing: border-box;\ -min-width: 100%;\ -}\ -.ace_dragging .ace_scroller:before{\ -position: absolute;\ -top: 0;\ -left: 0;\ -right: 0;\ -bottom: 0;\ -content: '';\ -background: rgba(250, 250, 250, 0.01);\ -z-index: 1000;\ -}\ -.ace_dragging.ace_dark .ace_scroller:before{\ -background: rgba(0, 0, 0, 0.01);\ -}\ -.ace_selecting, .ace_selecting * {\ -cursor: text !important;\ -}\ -.ace_gutter {\ -position: absolute;\ -overflow : hidden;\ -width: auto;\ -top: 0;\ -bottom: 0;\ -left: 0;\ -cursor: default;\ -z-index: 4;\ --ms-user-select: none;\ --moz-user-select: none;\ --webkit-user-select: none;\ -user-select: none;\ -}\ -.ace_gutter-active-line {\ -position: absolute;\ -left: 0;\ -right: 0;\ -}\ -.ace_scroller.ace_scroll-left {\ -box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\ -}\ -.ace_gutter-cell {\ -padding-left: 19px;\ -padding-right: 6px;\ -background-repeat: no-repeat;\ -}\ -.ace_gutter-cell.ace_error {\ -background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==\");\ -background-repeat: no-repeat;\ -background-position: 2px center;\ -}\ -.ace_gutter-cell.ace_warning {\ -background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==\");\ -background-position: 2px center;\ -}\ -.ace_gutter-cell.ace_info {\ -background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=\");\ -background-position: 2px center;\ -}\ -.ace_dark .ace_gutter-cell.ace_info {\ -background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC\");\ -}\ -.ace_scrollbar {\ -position: absolute;\ -right: 0;\ -bottom: 0;\ -z-index: 6;\ -}\ -.ace_scrollbar-inner {\ -position: absolute;\ -cursor: text;\ -left: 0;\ -top: 0;\ -}\ -.ace_scrollbar-v{\ -overflow-x: hidden;\ -overflow-y: scroll;\ -top: 0;\ -}\ -.ace_scrollbar-h {\ -overflow-x: scroll;\ -overflow-y: hidden;\ -left: 0;\ -}\ -.ace_print-margin {\ -position: absolute;\ -height: 100%;\ -}\ -.ace_text-input {\ -position: absolute;\ -z-index: 0;\ -width: 0.5em;\ -height: 1em;\ -opacity: 0;\ -background: transparent;\ --moz-appearance: none;\ -appearance: none;\ -border: none;\ -resize: none;\ -outline: none;\ -overflow: hidden;\ -font: inherit;\ -padding: 0 1px;\ -margin: 0 -1px;\ -text-indent: -1em;\ --ms-user-select: text;\ --moz-user-select: text;\ --webkit-user-select: text;\ -user-select: text;\ -}\ -.ace_text-input.ace_composition {\ -background: inherit;\ -color: inherit;\ -z-index: 1000;\ -opacity: 1;\ -text-indent: 0;\ -}\ -.ace_layer {\ -z-index: 1;\ -position: absolute;\ -overflow: hidden;\ -white-space: pre;\ -height: 100%;\ -width: 100%;\ --moz-box-sizing: border-box;\ --webkit-box-sizing: border-box;\ -box-sizing: border-box;\ -pointer-events: none;\ -}\ -.ace_gutter-layer {\ -position: relative;\ -width: auto;\ -text-align: right;\ -pointer-events: auto;\ -}\ -.ace_text-layer {\ -font: inherit !important;\ -}\ -.ace_cjk {\ -display: inline-block;\ -text-align: center;\ -}\ -.ace_cursor-layer {\ -z-index: 4;\ -}\ -.ace_cursor {\ -z-index: 4;\ -position: absolute;\ --moz-box-sizing: border-box;\ --webkit-box-sizing: border-box;\ -box-sizing: border-box;\ -border-left: 2px solid\ -}\ -.ace_slim-cursors .ace_cursor {\ -border-left-width: 1px;\ -}\ -.ace_overwrite-cursors .ace_cursor {\ -border-left-width: 0;\ -border-bottom: 1px solid;\ -}\ -.ace_hidden-cursors .ace_cursor {\ -opacity: 0.2;\ -}\ -.ace_smooth-blinking .ace_cursor {\ --webkit-transition: opacity 0.18s;\ -transition: opacity 0.18s;\ -}\ -.ace_editor.ace_multiselect .ace_cursor {\ -border-left-width: 1px;\ -}\ -.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\ -position: absolute;\ -z-index: 3;\ -}\ -.ace_marker-layer .ace_selection {\ -position: absolute;\ -z-index: 5;\ -}\ -.ace_marker-layer .ace_bracket {\ -position: absolute;\ -z-index: 6;\ -}\ -.ace_marker-layer .ace_active-line {\ -position: absolute;\ -z-index: 2;\ -}\ -.ace_marker-layer .ace_selected-word {\ -position: absolute;\ -z-index: 4;\ --moz-box-sizing: border-box;\ --webkit-box-sizing: border-box;\ -box-sizing: border-box;\ -}\ -.ace_line .ace_fold {\ --moz-box-sizing: border-box;\ --webkit-box-sizing: border-box;\ -box-sizing: border-box;\ -display: inline-block;\ -height: 11px;\ -margin-top: -2px;\ -vertical-align: middle;\ -background-image:\ -url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\ -url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=\");\ -background-repeat: no-repeat, repeat-x;\ -background-position: center center, top left;\ -color: transparent;\ -border: 1px solid black;\ -border-radius: 2px;\ -cursor: pointer;\ -pointer-events: auto;\ -}\ -.ace_dark .ace_fold {\ -}\ -.ace_fold:hover{\ -background-image:\ -url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\ -url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC\");\ -}\ -.ace_tooltip {\ -background-color: #FFF;\ -background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));\ -background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\ -border: 1px solid gray;\ -border-radius: 1px;\ -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\ -color: black;\ -max-width: 100%;\ -padding: 3px 4px;\ -position: fixed;\ -z-index: 999999;\ --moz-box-sizing: border-box;\ --webkit-box-sizing: border-box;\ -box-sizing: border-box;\ -cursor: default;\ -white-space: pre;\ -word-wrap: break-word;\ -line-height: normal;\ -font-style: normal;\ -font-weight: normal;\ -letter-spacing: normal;\ -pointer-events: none;\ -}\ -.ace_folding-enabled > .ace_gutter-cell {\ -padding-right: 13px;\ -}\ -.ace_fold-widget {\ --moz-box-sizing: border-box;\ --webkit-box-sizing: border-box;\ -box-sizing: border-box;\ -margin: 0 -12px 0 1px;\ -display: none;\ -width: 11px;\ -vertical-align: top;\ -background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==\");\ -background-repeat: no-repeat;\ -background-position: center;\ -border-radius: 3px;\ -border: 1px solid transparent;\ -cursor: pointer;\ -}\ -.ace_folding-enabled .ace_fold-widget {\ -display: inline-block; \ -}\ -.ace_fold-widget.ace_end {\ -background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==\");\ -}\ -.ace_fold-widget.ace_closed {\ -background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==\");\ -}\ -.ace_fold-widget:hover {\ -border: 1px solid rgba(0, 0, 0, 0.3);\ -background-color: rgba(255, 255, 255, 0.2);\ -box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\ -}\ -.ace_fold-widget:active {\ -border: 1px solid rgba(0, 0, 0, 0.4);\ -background-color: rgba(0, 0, 0, 0.05);\ -box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\ -}\ -.ace_dark .ace_fold-widget {\ -background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\");\ -}\ -.ace_dark .ace_fold-widget.ace_end {\ -background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\");\ -}\ -.ace_dark .ace_fold-widget.ace_closed {\ -background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\");\ -}\ -.ace_dark .ace_fold-widget:hover {\ -box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\ -background-color: rgba(255, 255, 255, 0.1);\ -}\ -.ace_dark .ace_fold-widget:active {\ -box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\ -}\ -.ace_fold-widget.ace_invalid {\ -background-color: #FFB4B4;\ -border-color: #DE5555;\ -}\ -.ace_fade-fold-widgets .ace_fold-widget {\ --webkit-transition: opacity 0.4s ease 0.05s;\ -transition: opacity 0.4s ease 0.05s;\ -opacity: 0;\ -}\ -.ace_fade-fold-widgets:hover .ace_fold-widget {\ --webkit-transition: opacity 0.05s ease 0.05s;\ -transition: opacity 0.05s ease 0.05s;\ -opacity:1;\ -}\ -.ace_underline {\ -text-decoration: underline;\ -}\ -.ace_bold {\ -font-weight: bold;\ -}\ -.ace_nobold .ace_bold {\ -font-weight: normal;\ -}\ -.ace_italic {\ -font-style: italic;\ -}\ -.ace_error-marker {\ -background-color: rgba(255, 0, 0,0.2);\ -position: absolute;\ -z-index: 9;\ -}\ -.ace_highlight-marker {\ -background-color: rgba(255, 255, 0,0.2);\ -position: absolute;\ -z-index: 8;\ -}\ -"; - -dom.importCssString(editorCss, "ace_editor"); - -var VirtualRenderer = function(container, theme) { - var _self = this; - - this.container = container || dom.createElement("div"); - this.$keepTextAreaAtCursor = !useragent.isOldIE; - - dom.addCssClass(this.container, "ace_editor"); - - this.setTheme(theme); - - this.$gutter = dom.createElement("div"); - this.$gutter.className = "ace_gutter"; - this.container.appendChild(this.$gutter); - - this.scroller = dom.createElement("div"); - this.scroller.className = "ace_scroller"; - this.container.appendChild(this.scroller); - - this.content = dom.createElement("div"); - this.content.className = "ace_content"; - this.scroller.appendChild(this.content); - - this.$gutterLayer = new GutterLayer(this.$gutter); - this.$gutterLayer.on("changeGutterWidth", this.onGutterResize.bind(this)); - - this.$markerBack = new MarkerLayer(this.content); - - var textLayer = this.$textLayer = new TextLayer(this.content); - this.canvas = textLayer.element; - - this.$markerFront = new MarkerLayer(this.content); - - this.$cursorLayer = new CursorLayer(this.content); - this.$horizScroll = false; - this.$vScroll = false; - - this.scrollBar = - this.scrollBarV = new VScrollBar(this.container, this); - this.scrollBarH = new HScrollBar(this.container, this); - this.scrollBarV.addEventListener("scroll", function(e) { - if (!_self.$scrollAnimation) - _self.session.setScrollTop(e.data - _self.scrollMargin.top); - }); - this.scrollBarH.addEventListener("scroll", function(e) { - if (!_self.$scrollAnimation) - _self.session.setScrollLeft(e.data - _self.scrollMargin.left); - }); - - this.scrollTop = 0; - this.scrollLeft = 0; - - this.cursorPos = { - row : 0, - column : 0 - }; - - this.$fontMetrics = new FontMetrics(this.container, 500); - this.$textLayer.$setFontMetrics(this.$fontMetrics); - this.$textLayer.addEventListener("changeCharacterSize", function(e) { - _self.updateCharacterSize(); - _self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height); - _self._signal("changeCharacterSize", e); - }); - - this.$size = { - width: 0, - height: 0, - scrollerHeight: 0, - scrollerWidth: 0, - $dirty: true - }; - - this.layerConfig = { - width : 1, - padding : 0, - firstRow : 0, - firstRowScreen: 0, - lastRow : 0, - lineHeight : 0, - characterWidth : 0, - minHeight : 1, - maxHeight : 1, - offset : 0, - height : 1, - gutterOffset: 1 - }; - - this.scrollMargin = { - left: 0, - right: 0, - top: 0, - bottom: 0, - v: 0, - h: 0 - }; - - this.$loop = new RenderLoop( - this.$renderChanges.bind(this), - this.container.ownerDocument.defaultView - ); - this.$loop.schedule(this.CHANGE_FULL); - - this.updateCharacterSize(); - this.setPadding(4); - config.resetOptions(this); - config._emit("renderer", this); -}; - -(function() { - - this.CHANGE_CURSOR = 1; - this.CHANGE_MARKER = 2; - this.CHANGE_GUTTER = 4; - this.CHANGE_SCROLL = 8; - this.CHANGE_LINES = 16; - this.CHANGE_TEXT = 32; - this.CHANGE_SIZE = 64; - this.CHANGE_MARKER_BACK = 128; - this.CHANGE_MARKER_FRONT = 256; - this.CHANGE_FULL = 512; - this.CHANGE_H_SCROLL = 1024; - - oop.implement(this, EventEmitter); - - this.updateCharacterSize = function() { - if (this.$textLayer.allowBoldFonts != this.$allowBoldFonts) { - this.$allowBoldFonts = this.$textLayer.allowBoldFonts; - this.setStyle("ace_nobold", !this.$allowBoldFonts); - } - - this.layerConfig.characterWidth = - this.characterWidth = this.$textLayer.getCharacterWidth(); - this.layerConfig.lineHeight = - this.lineHeight = this.$textLayer.getLineHeight(); - this.$updatePrintMargin(); - }; - this.setSession = function(session) { - if (this.session) - this.session.doc.off("changeNewLineMode", this.onChangeNewLineMode); - - this.session = session; - if (session && this.scrollMargin.top && session.getScrollTop() <= 0) - session.setScrollTop(-this.scrollMargin.top); - - this.$cursorLayer.setSession(session); - this.$markerBack.setSession(session); - this.$markerFront.setSession(session); - this.$gutterLayer.setSession(session); - this.$textLayer.setSession(session); - if (!session) - return; - - this.$loop.schedule(this.CHANGE_FULL); - this.session.$setFontMetrics(this.$fontMetrics); - - this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this); - this.onChangeNewLineMode() - this.session.doc.on("changeNewLineMode", this.onChangeNewLineMode); - }; - this.updateLines = function(firstRow, lastRow, force) { - if (lastRow === undefined) - lastRow = Infinity; - - if (!this.$changedLines) { - this.$changedLines = { - firstRow: firstRow, - lastRow: lastRow - }; - } - else { - if (this.$changedLines.firstRow > firstRow) - this.$changedLines.firstRow = firstRow; - - if (this.$changedLines.lastRow < lastRow) - this.$changedLines.lastRow = lastRow; - } - if (this.$changedLines.lastRow < this.layerConfig.firstRow) { - if (force) - this.$changedLines.lastRow = this.layerConfig.lastRow; - else - return; - } - if (this.$changedLines.firstRow > this.layerConfig.lastRow) - return; - this.$loop.schedule(this.CHANGE_LINES); - }; - - this.onChangeNewLineMode = function() { - this.$loop.schedule(this.CHANGE_TEXT); - this.$textLayer.$updateEolChar(); - }; - - this.onChangeTabSize = function() { - this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER); - this.$textLayer.onChangeTabSize(); - }; - this.updateText = function() { - this.$loop.schedule(this.CHANGE_TEXT); - }; - this.updateFull = function(force) { - if (force) - this.$renderChanges(this.CHANGE_FULL, true); - else - this.$loop.schedule(this.CHANGE_FULL); - }; - this.updateFontSize = function() { - this.$textLayer.checkForSizeChanges(); - }; - - this.$changes = 0; - this.$updateSizeAsync = function() { - if (this.$loop.pending) - this.$size.$dirty = true; - else - this.onResize(); - }; - this.onResize = function(force, gutterWidth, width, height) { - if (this.resizing > 2) - return; - else if (this.resizing > 0) - this.resizing++; - else - this.resizing = force ? 1 : 0; - var el = this.container; - if (!height) - height = el.clientHeight || el.scrollHeight; - if (!width) - width = el.clientWidth || el.scrollWidth; - var changes = this.$updateCachedSize(force, gutterWidth, width, height); - - - if (!this.$size.scrollerHeight || (!width && !height)) - return this.resizing = 0; - - if (force) - this.$gutterLayer.$padding = null; - - if (force) - this.$renderChanges(changes | this.$changes, true); - else - this.$loop.schedule(changes | this.$changes); - - if (this.resizing) - this.resizing = 0; - this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null; - }; - - this.$updateCachedSize = function(force, gutterWidth, width, height) { - height -= (this.$extraHeight || 0); - var changes = 0; - var size = this.$size; - var oldSize = { - width: size.width, - height: size.height, - scrollerHeight: size.scrollerHeight, - scrollerWidth: size.scrollerWidth - }; - if (height && (force || size.height != height)) { - size.height = height; - changes |= this.CHANGE_SIZE; - - size.scrollerHeight = size.height; - if (this.$horizScroll) - size.scrollerHeight -= this.scrollBarH.getHeight(); - this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + "px"; - - changes = changes | this.CHANGE_SCROLL; - } - - if (width && (force || size.width != width)) { - changes |= this.CHANGE_SIZE; - size.width = width; - - if (gutterWidth == null) - gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0; - - this.gutterWidth = gutterWidth; - - this.scrollBarH.element.style.left = - this.scroller.style.left = gutterWidth + "px"; - size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth()); - - this.scrollBarH.element.style.right = - this.scroller.style.right = this.scrollBarV.getWidth() + "px"; - this.scroller.style.bottom = this.scrollBarH.getHeight() + "px"; - - if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force) - changes |= this.CHANGE_FULL; - } - - size.$dirty = !width || !height; - - if (changes) - this._signal("resize", oldSize); - - return changes; - }; - - this.onGutterResize = function() { - var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0; - if (gutterWidth != this.gutterWidth) - this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height); - - if (this.session.getUseWrapMode() && this.adjustWrapLimit()) { - this.$loop.schedule(this.CHANGE_FULL); - } else if (this.$size.$dirty) { - this.$loop.schedule(this.CHANGE_FULL); - } else { - this.$computeLayerConfig(); - this.$loop.schedule(this.CHANGE_MARKER); - } - }; - this.adjustWrapLimit = function() { - var availableWidth = this.$size.scrollerWidth - this.$padding * 2; - var limit = Math.floor(availableWidth / this.characterWidth); - return this.session.adjustWrapLimit(limit, this.$showPrintMargin && this.$printMarginColumn); - }; - this.setAnimatedScroll = function(shouldAnimate){ - this.setOption("animatedScroll", shouldAnimate); - }; - this.getAnimatedScroll = function() { - return this.$animatedScroll; - }; - this.setShowInvisibles = function(showInvisibles) { - this.setOption("showInvisibles", showInvisibles); - }; - this.getShowInvisibles = function() { - return this.getOption("showInvisibles"); - }; - this.getDisplayIndentGuides = function() { - return this.getOption("displayIndentGuides"); - }; - - this.setDisplayIndentGuides = function(display) { - this.setOption("displayIndentGuides", display); - }; - this.setShowPrintMargin = function(showPrintMargin) { - this.setOption("showPrintMargin", showPrintMargin); - }; - this.getShowPrintMargin = function() { - return this.getOption("showPrintMargin"); - }; - this.setPrintMarginColumn = function(showPrintMargin) { - this.setOption("printMarginColumn", showPrintMargin); - }; - this.getPrintMarginColumn = function() { - return this.getOption("printMarginColumn"); - }; - this.getShowGutter = function(){ - return this.getOption("showGutter"); - }; - this.setShowGutter = function(show){ - return this.setOption("showGutter", show); - }; - - this.getFadeFoldWidgets = function(){ - return this.getOption("fadeFoldWidgets") - }; - - this.setFadeFoldWidgets = function(show) { - this.setOption("fadeFoldWidgets", show); - }; - - this.setHighlightGutterLine = function(shouldHighlight) { - this.setOption("highlightGutterLine", shouldHighlight); - }; - - this.getHighlightGutterLine = function() { - return this.getOption("highlightGutterLine"); - }; - - this.$updateGutterLineHighlight = function() { - var pos = this.$cursorLayer.$pixelPos; - var height = this.layerConfig.lineHeight; - if (this.session.getUseWrapMode()) { - var cursor = this.session.selection.getCursor(); - cursor.column = 0; - pos = this.$cursorLayer.getPixelPosition(cursor, true); - height *= this.session.getRowLength(cursor.row); - } - this.$gutterLineHighlight.style.top = pos.top - this.layerConfig.offset + "px"; - this.$gutterLineHighlight.style.height = height + "px"; - }; - - this.$updatePrintMargin = function() { - if (!this.$showPrintMargin && !this.$printMarginEl) - return; - - if (!this.$printMarginEl) { - var containerEl = dom.createElement("div"); - containerEl.className = "ace_layer ace_print-margin-layer"; - this.$printMarginEl = dom.createElement("div"); - this.$printMarginEl.className = "ace_print-margin"; - containerEl.appendChild(this.$printMarginEl); - this.content.insertBefore(containerEl, this.content.firstChild); - } - - var style = this.$printMarginEl.style; - style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding) + "px"; - style.visibility = this.$showPrintMargin ? "visible" : "hidden"; - - if (this.session && this.session.$wrap == -1) - this.adjustWrapLimit(); - }; - this.getContainerElement = function() { - return this.container; - }; - this.getMouseEventTarget = function() { - return this.content; - }; - this.getTextAreaContainer = function() { - return this.container; - }; - this.$moveTextAreaToCursor = function() { - if (!this.$keepTextAreaAtCursor) - return; - var config = this.layerConfig; - var posTop = this.$cursorLayer.$pixelPos.top; - var posLeft = this.$cursorLayer.$pixelPos.left; - posTop -= config.offset; - - var style = this.textarea.style; - var h = this.lineHeight; - if (posTop < 0 || posTop > config.height - h) { - style.top = style.left = "0"; - return; - } - - var w = this.characterWidth; - if (this.$composition) { - var val = this.textarea.value.replace(/^\x01+/, ""); - w *= (this.session.$getStringScreenWidth(val)[0]+2); - h += 2; - } - posLeft -= this.scrollLeft; - if (posLeft > this.$size.scrollerWidth - w) - posLeft = this.$size.scrollerWidth - w; - - posLeft += this.gutterWidth; - style.height = h + "px"; - style.width = w + "px"; - style.left = Math.min(posLeft, this.$size.scrollerWidth - w) + "px"; - style.top = Math.min(posTop, this.$size.height - h) + "px"; - }; - this.getFirstVisibleRow = function() { - return this.layerConfig.firstRow; - }; - this.getFirstFullyVisibleRow = function() { - return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1); - }; - this.getLastFullyVisibleRow = function() { - var flint = Math.floor((this.layerConfig.height + this.layerConfig.offset) / this.layerConfig.lineHeight); - return this.layerConfig.firstRow - 1 + flint; - }; - this.getLastVisibleRow = function() { - return this.layerConfig.lastRow; - }; - - this.$padding = null; - this.setPadding = function(padding) { - this.$padding = padding; - this.$textLayer.setPadding(padding); - this.$cursorLayer.setPadding(padding); - this.$markerFront.setPadding(padding); - this.$markerBack.setPadding(padding); - this.$loop.schedule(this.CHANGE_FULL); - this.$updatePrintMargin(); - }; - - this.setScrollMargin = function(top, bottom, left, right) { - var sm = this.scrollMargin; - sm.top = top|0; - sm.bottom = bottom|0; - sm.right = right|0; - sm.left = left|0; - sm.v = sm.top + sm.bottom; - sm.h = sm.left + sm.right; - if (sm.top && this.scrollTop <= 0 && this.session) - this.session.setScrollTop(-sm.top); - this.updateFull(); - }; - this.getHScrollBarAlwaysVisible = function() { - return this.$hScrollBarAlwaysVisible; - }; - this.setHScrollBarAlwaysVisible = function(alwaysVisible) { - this.setOption("hScrollBarAlwaysVisible", alwaysVisible); - }; - this.getVScrollBarAlwaysVisible = function() { - return this.$hScrollBarAlwaysVisible; - }; - this.setVScrollBarAlwaysVisible = function(alwaysVisible) { - this.setOption("vScrollBarAlwaysVisible", alwaysVisible); - }; - - this.$updateScrollBarV = function() { - var scrollHeight = this.layerConfig.maxHeight; - var scrollerHeight = this.$size.scrollerHeight; - if (!this.$maxLines && this.$scrollPastEnd) { - scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd; - if (this.scrollTop > scrollHeight - scrollerHeight) { - scrollHeight = this.scrollTop + scrollerHeight; - this.scrollBarV.scrollTop = null; - } - } - this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v); - this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top); - }; - this.$updateScrollBarH = function() { - this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h); - this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left); - }; - - this.$frozen = false; - this.freeze = function() { - this.$frozen = true; - }; - - this.unfreeze = function() { - this.$frozen = false; - }; - - this.$renderChanges = function(changes, force) { - if (this.$changes) { - changes |= this.$changes; - this.$changes = 0; - } - if ((!this.session || !this.container.offsetWidth || this.$frozen) || (!changes && !force)) { - this.$changes |= changes; - return; - } - if (this.$size.$dirty) { - this.$changes |= changes; - return this.onResize(true); - } - if (!this.lineHeight) { - this.$textLayer.checkForSizeChanges(); - } - - this._signal("beforeRender"); - var config = this.layerConfig; - if (changes & this.CHANGE_FULL || - changes & this.CHANGE_SIZE || - changes & this.CHANGE_TEXT || - changes & this.CHANGE_LINES || - changes & this.CHANGE_SCROLL || - changes & this.CHANGE_H_SCROLL - ) { - changes |= this.$computeLayerConfig(); - if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) { - var st = this.scrollTop + (config.firstRow - this.layerConfig.firstRow) * this.lineHeight; - if (st > 0) { - this.scrollTop = st; - changes = changes | this.CHANGE_SCROLL; - changes |= this.$computeLayerConfig(); - } - } - config = this.layerConfig; - this.$updateScrollBarV(); - if (changes & this.CHANGE_H_SCROLL) - this.$updateScrollBarH(); - this.$gutterLayer.element.style.marginTop = (-config.offset) + "px"; - this.content.style.marginTop = (-config.offset) + "px"; - this.content.style.width = config.width + 2 * this.$padding + "px"; - this.content.style.height = config.minHeight + "px"; - } - if (changes & this.CHANGE_H_SCROLL) { - this.content.style.marginLeft = -this.scrollLeft + "px"; - this.scroller.className = this.scrollLeft <= 0 ? "ace_scroller" : "ace_scroller ace_scroll-left"; - } - if (changes & this.CHANGE_FULL) { - this.$textLayer.update(config); - if (this.$showGutter) - this.$gutterLayer.update(config); - this.$markerBack.update(config); - this.$markerFront.update(config); - this.$cursorLayer.update(config); - this.$moveTextAreaToCursor(); - this.$highlightGutterLine && this.$updateGutterLineHighlight(); - this._signal("afterRender"); - return; - } - if (changes & this.CHANGE_SCROLL) { - if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES) - this.$textLayer.update(config); - else - this.$textLayer.scrollLines(config); - - if (this.$showGutter) - this.$gutterLayer.update(config); - this.$markerBack.update(config); - this.$markerFront.update(config); - this.$cursorLayer.update(config); - this.$highlightGutterLine && this.$updateGutterLineHighlight(); - this.$moveTextAreaToCursor(); - this._signal("afterRender"); - return; - } - - if (changes & this.CHANGE_TEXT) { - this.$textLayer.update(config); - if (this.$showGutter) - this.$gutterLayer.update(config); - } - else if (changes & this.CHANGE_LINES) { - if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter) - this.$gutterLayer.update(config); - } - else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) { - if (this.$showGutter) - this.$gutterLayer.update(config); - } - - if (changes & this.CHANGE_CURSOR) { - this.$cursorLayer.update(config); - this.$moveTextAreaToCursor(); - this.$highlightGutterLine && this.$updateGutterLineHighlight(); - } - - if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) { - this.$markerFront.update(config); - } - - if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) { - this.$markerBack.update(config); - } - - this._signal("afterRender"); - }; - - - this.$autosize = function() { - var height = this.session.getScreenLength() * this.lineHeight; - var maxHeight = this.$maxLines * this.lineHeight; - var desiredHeight = Math.max( - (this.$minLines||1) * this.lineHeight, - Math.min(maxHeight, height) - ) + this.scrollMargin.v + (this.$extraHeight || 0); - var vScroll = height > maxHeight; - - if (desiredHeight != this.desiredHeight || - this.$size.height != this.desiredHeight || vScroll != this.$vScroll) { - if (vScroll != this.$vScroll) { - this.$vScroll = vScroll; - this.scrollBarV.setVisible(vScroll); - } - - var w = this.container.clientWidth; - this.container.style.height = desiredHeight + "px"; - this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight); - this.desiredHeight = desiredHeight; - - this._signal("autosize"); - } - }; - - this.$computeLayerConfig = function() { - if (this.$maxLines && this.lineHeight > 1) - this.$autosize(); - - var session = this.session; - var size = this.$size; - - var hideScrollbars = size.height <= 2 * this.lineHeight; - var screenLines = this.session.getScreenLength(); - var maxHeight = screenLines * this.lineHeight; - - var offset = this.scrollTop % this.lineHeight; - var minHeight = size.scrollerHeight + this.lineHeight; - - var longestLine = this.$getLongestLine(); - - var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible || - size.scrollerWidth - longestLine - 2 * this.$padding < 0); - - var hScrollChanged = this.$horizScroll !== horizScroll; - if (hScrollChanged) { - this.$horizScroll = horizScroll; - this.scrollBarH.setVisible(horizScroll); - } - - var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd - ? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd - : 0; - maxHeight += scrollPastEnd; - - this.session.setScrollTop(Math.max(-this.scrollMargin.top, - Math.min(this.scrollTop, maxHeight - size.scrollerHeight + this.scrollMargin.bottom))); - - this.session.setScrollLeft(Math.max(-this.scrollMargin.left, Math.min(this.scrollLeft, - longestLine + 2 * this.$padding - size.scrollerWidth + this.scrollMargin.right))); - - var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible || - size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop); - var vScrollChanged = this.$vScroll !== vScroll; - if (vScrollChanged) { - this.$vScroll = vScroll; - this.scrollBarV.setVisible(vScroll); - } - - var lineCount = Math.ceil(minHeight / this.lineHeight) - 1; - var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight)); - var lastRow = firstRow + lineCount; - var firstRowScreen, firstRowHeight; - var lineHeight = this.lineHeight; - firstRow = session.screenToDocumentRow(firstRow, 0); - var foldLine = session.getFoldLine(firstRow); - if (foldLine) { - firstRow = foldLine.start.row; - } - - firstRowScreen = session.documentToScreenRow(firstRow, 0); - firstRowHeight = session.getRowLength(firstRow) * lineHeight; - - lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1); - minHeight = size.scrollerHeight + session.getRowLength(lastRow) * lineHeight + - firstRowHeight; - - offset = this.scrollTop - firstRowScreen * lineHeight; - - var changes = 0; - if (this.layerConfig.width != longestLine) - changes = this.CHANGE_H_SCROLL; - if (hScrollChanged || vScrollChanged) { - changes = this.$updateCachedSize(true, this.gutterWidth, size.width, size.height); - this._signal("scrollbarVisibilityChanged"); - if (vScrollChanged) - longestLine = this.$getLongestLine(); - } - - this.layerConfig = { - width : longestLine, - padding : this.$padding, - firstRow : firstRow, - firstRowScreen: firstRowScreen, - lastRow : lastRow, - lineHeight : lineHeight, - characterWidth : this.characterWidth, - minHeight : minHeight, - maxHeight : maxHeight, - offset : offset, - gutterOffset : Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)), - height : this.$size.scrollerHeight - }; - - return changes; - }; - - this.$updateLines = function() { - var firstRow = this.$changedLines.firstRow; - var lastRow = this.$changedLines.lastRow; - this.$changedLines = null; - - var layerConfig = this.layerConfig; - - if (firstRow > layerConfig.lastRow + 1) { return; } - if (lastRow < layerConfig.firstRow) { return; } - if (lastRow === Infinity) { - if (this.$showGutter) - this.$gutterLayer.update(layerConfig); - this.$textLayer.update(layerConfig); - return; - } - this.$textLayer.updateLines(layerConfig, firstRow, lastRow); - return true; - }; - - this.$getLongestLine = function() { - var charCount = this.session.getScreenWidth(); - if (this.showInvisibles && !this.session.$useWrapMode) - charCount += 1; - - return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth)); - }; - this.updateFrontMarkers = function() { - this.$markerFront.setMarkers(this.session.getMarkers(true)); - this.$loop.schedule(this.CHANGE_MARKER_FRONT); - }; - this.updateBackMarkers = function() { - this.$markerBack.setMarkers(this.session.getMarkers()); - this.$loop.schedule(this.CHANGE_MARKER_BACK); - }; - this.addGutterDecoration = function(row, className){ - this.$gutterLayer.addGutterDecoration(row, className); - }; - this.removeGutterDecoration = function(row, className){ - this.$gutterLayer.removeGutterDecoration(row, className); - }; - this.updateBreakpoints = function(rows) { - this.$loop.schedule(this.CHANGE_GUTTER); - }; - this.setAnnotations = function(annotations) { - this.$gutterLayer.setAnnotations(annotations); - this.$loop.schedule(this.CHANGE_GUTTER); - }; - this.updateCursor = function() { - this.$loop.schedule(this.CHANGE_CURSOR); - }; - this.hideCursor = function() { - this.$cursorLayer.hideCursor(); - }; - this.showCursor = function() { - this.$cursorLayer.showCursor(); - }; - - this.scrollSelectionIntoView = function(anchor, lead, offset) { - this.scrollCursorIntoView(anchor, offset); - this.scrollCursorIntoView(lead, offset); - }; - this.scrollCursorIntoView = function(cursor, offset, $viewMargin) { - if (this.$size.scrollerHeight === 0) - return; - - var pos = this.$cursorLayer.getPixelPosition(cursor); - - var left = pos.left; - var top = pos.top; - - var topMargin = $viewMargin && $viewMargin.top || 0; - var bottomMargin = $viewMargin && $viewMargin.bottom || 0; - - var scrollTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop; - - if (scrollTop + topMargin > top) { - if (offset) - top -= offset * this.$size.scrollerHeight; - if (top === 0) - top = -this.scrollMargin.top; - this.session.setScrollTop(top); - } else if (scrollTop + this.$size.scrollerHeight - bottomMargin < top + this.lineHeight) { - if (offset) - top += offset * this.$size.scrollerHeight; - this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight); - } - - var scrollLeft = this.scrollLeft; - - if (scrollLeft > left) { - if (left < this.$padding + 2 * this.layerConfig.characterWidth) - left = -this.scrollMargin.left; - this.session.setScrollLeft(left); - } else if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) { - this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth)); - } else if (scrollLeft <= this.$padding && left - scrollLeft < this.characterWidth) { - this.session.setScrollLeft(0); - } - }; - this.getScrollTop = function() { - return this.session.getScrollTop(); - }; - this.getScrollLeft = function() { - return this.session.getScrollLeft(); - }; - this.getScrollTopRow = function() { - return this.scrollTop / this.lineHeight; - }; - this.getScrollBottomRow = function() { - return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1); - }; - this.scrollToRow = function(row) { - this.session.setScrollTop(row * this.lineHeight); - }; - - this.alignCursor = function(cursor, alignment) { - if (typeof cursor == "number") - cursor = {row: cursor, column: 0}; - - var pos = this.$cursorLayer.getPixelPosition(cursor); - var h = this.$size.scrollerHeight - this.lineHeight; - var offset = pos.top - h * (alignment || 0); - - this.session.setScrollTop(offset); - return offset; - }; - - this.STEPS = 8; - this.$calcSteps = function(fromValue, toValue){ - var i = 0; - var l = this.STEPS; - var steps = []; - - var func = function(t, x_min, dx) { - return dx * (Math.pow(t - 1, 3) + 1) + x_min; - }; - - for (i = 0; i < l; ++i) - steps.push(func(i / this.STEPS, fromValue, toValue - fromValue)); - - return steps; - }; - this.scrollToLine = function(line, center, animate, callback) { - var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0}); - var offset = pos.top; - if (center) - offset -= this.$size.scrollerHeight / 2; - - var initialScroll = this.scrollTop; - this.session.setScrollTop(offset); - if (animate !== false) - this.animateScrolling(initialScroll, callback); - }; - - this.animateScrolling = function(fromValue, callback) { - var toValue = this.scrollTop; - if (!this.$animatedScroll) - return; - var _self = this; - - if (fromValue == toValue) - return; - - if (this.$scrollAnimation) { - var oldSteps = this.$scrollAnimation.steps; - if (oldSteps.length) { - fromValue = oldSteps[0]; - if (fromValue == toValue) - return; - } - } - - var steps = _self.$calcSteps(fromValue, toValue); - this.$scrollAnimation = {from: fromValue, to: toValue, steps: steps}; - - clearInterval(this.$timer); - - _self.session.setScrollTop(steps.shift()); - _self.session.$scrollTop = toValue; - this.$timer = setInterval(function() { - if (steps.length) { - _self.session.setScrollTop(steps.shift()); - _self.session.$scrollTop = toValue; - } else if (toValue != null) { - _self.session.$scrollTop = -1; - _self.session.setScrollTop(toValue); - toValue = null; - } else { - _self.$timer = clearInterval(_self.$timer); - _self.$scrollAnimation = null; - callback && callback(); - } - }, 10); - }; - this.scrollToY = function(scrollTop) { - if (this.scrollTop !== scrollTop) { - this.$loop.schedule(this.CHANGE_SCROLL); - this.scrollTop = scrollTop; - } - }; - this.scrollToX = function(scrollLeft) { - if (this.scrollLeft !== scrollLeft) - this.scrollLeft = scrollLeft; - this.$loop.schedule(this.CHANGE_H_SCROLL); - }; - this.scrollTo = function(x, y) { - this.session.setScrollTop(y); - this.session.setScrollLeft(y); - }; - this.scrollBy = function(deltaX, deltaY) { - deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY); - deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX); - }; - this.isScrollableBy = function(deltaX, deltaY) { - if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top) - return true; - if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight - - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom) - return true; - if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left) - return true; - if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth - - this.layerConfig.width < -1 + this.scrollMargin.right) - return true; - }; - - this.pixelToScreenCoordinates = function(x, y) { - var canvasPos = this.scroller.getBoundingClientRect(); - - var offset = (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth; - var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight); - var col = Math.round(offset); - - return {row: row, column: col, side: offset - col > 0 ? 1 : -1}; - }; - - this.screenToTextCoordinates = function(x, y) { - var canvasPos = this.scroller.getBoundingClientRect(); - - var col = Math.round( - (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth - ); - - var row = (y + this.scrollTop - canvasPos.top) / this.lineHeight; - - return this.session.screenToDocumentPosition(row, Math.max(col, 0)); - }; - this.textToScreenCoordinates = function(row, column) { - var canvasPos = this.scroller.getBoundingClientRect(); - var pos = this.session.documentToScreenPosition(row, column); - - var x = this.$padding + Math.round(pos.column * this.characterWidth); - var y = pos.row * this.lineHeight; - - return { - pageX: canvasPos.left + x - this.scrollLeft, - pageY: canvasPos.top + y - this.scrollTop - }; - }; - this.visualizeFocus = function() { - dom.addCssClass(this.container, "ace_focus"); - }; - this.visualizeBlur = function() { - dom.removeCssClass(this.container, "ace_focus"); - }; - this.showComposition = function(position) { - if (!this.$composition) - this.$composition = { - keepTextAreaAtCursor: this.$keepTextAreaAtCursor, - cssText: this.textarea.style.cssText - }; - - this.$keepTextAreaAtCursor = true; - dom.addCssClass(this.textarea, "ace_composition"); - this.textarea.style.cssText = ""; - this.$moveTextAreaToCursor(); - }; - this.setCompositionText = function(text) { - this.$moveTextAreaToCursor(); - }; - this.hideComposition = function() { - if (!this.$composition) - return; - - dom.removeCssClass(this.textarea, "ace_composition"); - this.$keepTextAreaAtCursor = this.$composition.keepTextAreaAtCursor; - this.textarea.style.cssText = this.$composition.cssText; - this.$composition = null; - }; - this.setTheme = function(theme, cb) { - var _self = this; - this.$themeId = theme; - _self._dispatchEvent('themeChange',{theme:theme}); - - if (!theme || typeof theme == "string") { - var moduleName = theme || this.$options.theme.initialValue; - config.loadModule(["theme", moduleName], afterLoad); - } else { - afterLoad(theme); - } - - function afterLoad(module) { - if (_self.$themeId != theme) - return cb && cb(); - if (!module.cssClass) - return; - dom.importCssString( - module.cssText, - module.cssClass, - _self.container.ownerDocument - ); - - if (_self.theme) - dom.removeCssClass(_self.container, _self.theme.cssClass); - - var padding = "padding" in module ? module.padding - : "padding" in (_self.theme || {}) ? 4 : _self.$padding; - if (_self.$padding && padding != _self.$padding) - _self.setPadding(padding); - _self.$theme = module.cssClass; - - _self.theme = module; - dom.addCssClass(_self.container, module.cssClass); - dom.setCssClass(_self.container, "ace_dark", module.isDark); - if (_self.$size) { - _self.$size.width = 0; - _self.$updateSizeAsync(); - } - - _self._dispatchEvent('themeLoaded', {theme:module}); - cb && cb(); - } - }; - this.getTheme = function() { - return this.$themeId; - }; - this.setStyle = function(style, include) { - dom.setCssClass(this.container, style, include !== false); - }; - this.unsetStyle = function(style) { - dom.removeCssClass(this.container, style); - }; - - this.setCursorStyle = function(style) { - if (this.scroller.style.cursor != style) - this.scroller.style.cursor = style; - }; - this.setMouseCursor = function(cursorStyle) { - this.scroller.style.cursor = cursorStyle; - }; - this.destroy = function() { - this.$textLayer.destroy(); - this.$cursorLayer.destroy(); - }; - -}).call(VirtualRenderer.prototype); - - -config.defineOptions(VirtualRenderer.prototype, "renderer", { - animatedScroll: {initialValue: false}, - showInvisibles: { - set: function(value) { - if (this.$textLayer.setShowInvisibles(value)) - this.$loop.schedule(this.CHANGE_TEXT); - }, - initialValue: false - }, - showPrintMargin: { - set: function() { this.$updatePrintMargin(); }, - initialValue: true - }, - printMarginColumn: { - set: function() { this.$updatePrintMargin(); }, - initialValue: 80 - }, - printMargin: { - set: function(val) { - if (typeof val == "number") - this.$printMarginColumn = val; - this.$showPrintMargin = !!val; - this.$updatePrintMargin(); - }, - get: function() { - return this.$showPrintMargin && this.$printMarginColumn; - } - }, - showGutter: { - set: function(show){ - this.$gutter.style.display = show ? "block" : "none"; - this.$loop.schedule(this.CHANGE_FULL); - this.onGutterResize(); - }, - initialValue: true - }, - fadeFoldWidgets: { - set: function(show) { - dom.setCssClass(this.$gutter, "ace_fade-fold-widgets", show); - }, - initialValue: false - }, - showFoldWidgets: { - set: function(show) {this.$gutterLayer.setShowFoldWidgets(show)}, - initialValue: true - }, - showLineNumbers: { - set: function(show) { - this.$gutterLayer.setShowLineNumbers(show); - this.$loop.schedule(this.CHANGE_GUTTER); - }, - initialValue: true - }, - displayIndentGuides: { - set: function(show) { - if (this.$textLayer.setDisplayIndentGuides(show)) - this.$loop.schedule(this.CHANGE_TEXT); - }, - initialValue: true - }, - highlightGutterLine: { - set: function(shouldHighlight) { - if (!this.$gutterLineHighlight) { - this.$gutterLineHighlight = dom.createElement("div"); - this.$gutterLineHighlight.className = "ace_gutter-active-line"; - this.$gutter.appendChild(this.$gutterLineHighlight); - return; - } - - this.$gutterLineHighlight.style.display = shouldHighlight ? "" : "none"; - if (this.$cursorLayer.$pixelPos) - this.$updateGutterLineHighlight(); - }, - initialValue: false, - value: true - }, - hScrollBarAlwaysVisible: { - set: function(val) { - if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll) - this.$loop.schedule(this.CHANGE_SCROLL); - }, - initialValue: false - }, - vScrollBarAlwaysVisible: { - set: function(val) { - if (!this.$vScrollBarAlwaysVisible || !this.$vScroll) - this.$loop.schedule(this.CHANGE_SCROLL); - }, - initialValue: false - }, - fontSize: { - set: function(size) { - if (typeof size == "number") - size = size + "px"; - this.container.style.fontSize = size; - this.updateFontSize(); - }, - initialValue: 12 - }, - fontFamily: { - set: function(name) { - this.container.style.fontFamily = name; - this.updateFontSize(); - } - }, - maxLines: { - set: function(val) { - this.updateFull(); - } - }, - minLines: { - set: function(val) { - this.updateFull(); - } - }, - scrollPastEnd: { - set: function(val) { - val = +val || 0; - if (this.$scrollPastEnd == val) - return; - this.$scrollPastEnd = val; - this.$loop.schedule(this.CHANGE_SCROLL); - }, - initialValue: 0, - handlesSet: true - }, - fixedWidthGutter: { - set: function(val) { - this.$gutterLayer.$fixedWidth = !!val; - this.$loop.schedule(this.CHANGE_GUTTER); - } - }, - theme: { - set: function(val) { this.setTheme(val) }, - get: function() { return this.$themeId || this.theme; }, - initialValue: "./theme/textmate", - handlesSet: true - } -}); - -exports.VirtualRenderer = VirtualRenderer; -}); - -define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var net = require("../lib/net"); -var EventEmitter = require("../lib/event_emitter").EventEmitter; -var config = require("../config"); - -var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl) { - this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this); - this.changeListener = this.changeListener.bind(this); - this.onMessage = this.onMessage.bind(this); - if (require.nameToUrl && !require.toUrl) - require.toUrl = require.nameToUrl; - - if (config.get("packaged") || !require.toUrl) { - workerUrl = workerUrl || config.moduleUrl(mod, "worker"); - } else { - var normalizePath = this.$normalizePath; - workerUrl = workerUrl || normalizePath(require.toUrl("ace/worker/worker.js", null, "_")); - - var tlns = {}; - topLevelNamespaces.forEach(function(ns) { - tlns[ns] = normalizePath(require.toUrl(ns, null, "_").replace(/(\.js)?(\?.*)?$/, "")); - }); - } - - try { - this.$worker = new Worker(workerUrl); - } catch(e) { - if (e instanceof window.DOMException) { - var blob = this.$workerBlob(workerUrl); - var URL = window.URL || window.webkitURL; - var blobURL = URL.createObjectURL(blob); - - this.$worker = new Worker(blobURL); - URL.revokeObjectURL(blobURL); - } else { - throw e; - } - } - this.$worker.postMessage({ - init : true, - tlns : tlns, - module : mod, - classname : classname - }); - - this.callbackId = 1; - this.callbacks = {}; - - this.$worker.onmessage = this.onMessage; -}; - -(function(){ - - oop.implement(this, EventEmitter); - - this.onMessage = function(e) { - var msg = e.data; - switch(msg.type) { - case "event": - this._signal(msg.name, {data: msg.data}); - break; - case "call": - var callback = this.callbacks[msg.id]; - if (callback) { - callback(msg.data); - delete this.callbacks[msg.id]; - } - break; - case "error": - this.reportError(msg.data); - break; - case "log": - window.console && console.log && console.log.apply(console, msg.data); - break; - } - }; - - this.reportError = function(err) { - window.console && console.error && console.error(err); - }; - - this.$normalizePath = function(path) { - return net.qualifyURL(path); - }; - - this.terminate = function() { - this._signal("terminate", {}); - this.deltaQueue = null; - this.$worker.terminate(); - this.$worker = null; - if (this.$doc) - this.$doc.off("change", this.changeListener); - this.$doc = null; - }; - - this.send = function(cmd, args) { - this.$worker.postMessage({command: cmd, args: args}); - }; - - this.call = function(cmd, args, callback) { - if (callback) { - var id = this.callbackId++; - this.callbacks[id] = callback; - args.push(id); - } - this.send(cmd, args); - }; - - this.emit = function(event, data) { - try { - this.$worker.postMessage({event: event, data: {data: data.data}}); - } - catch(ex) { - console.error(ex.stack); - } - }; - - this.attachToDocument = function(doc) { - if(this.$doc) - this.terminate(); - - this.$doc = doc; - this.call("setValue", [doc.getValue()]); - doc.on("change", this.changeListener); - }; - - this.changeListener = function(e) { - if (!this.deltaQueue) { - this.deltaQueue = [e.data]; - setTimeout(this.$sendDeltaQueue, 0); - } else - this.deltaQueue.push(e.data); - }; - - this.$sendDeltaQueue = function() { - var q = this.deltaQueue; - if (!q) return; - this.deltaQueue = null; - if (q.length > 20 && q.length > this.$doc.getLength() >> 1) { - this.call("setValue", [this.$doc.getValue()]); - } else - this.emit("change", {data: q}); - }; - - this.$workerBlob = function(workerUrl) { - var script = "importScripts('" + net.qualifyURL(workerUrl) + "');"; - try { - return new Blob([script], {"type": "application/javascript"}); - } catch (e) { // Backwards-compatibility - var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder; - var blobBuilder = new BlobBuilder(); - blobBuilder.append(script); - return blobBuilder.getBlob("application/javascript"); - } - }; - -}).call(WorkerClient.prototype); - - -var UIWorkerClient = function(topLevelNamespaces, mod, classname) { - this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this); - this.changeListener = this.changeListener.bind(this); - this.callbackId = 1; - this.callbacks = {}; - this.messageBuffer = []; - - var main = null; - var emitSync = false; - var sender = Object.create(EventEmitter); - var _self = this; - - this.$worker = {}; - this.$worker.terminate = function() {}; - this.$worker.postMessage = function(e) { - _self.messageBuffer.push(e); - if (main) { - if (emitSync) - setTimeout(processNext); - else - processNext(); - } - }; - this.setEmitSync = function(val) { emitSync = val }; - - var processNext = function() { - var msg = _self.messageBuffer.shift(); - if (msg.command) - main[msg.command].apply(main, msg.args); - else if (msg.event) - sender._signal(msg.event, msg.data); - }; - - sender.postMessage = function(msg) { - _self.onMessage({data: msg}); - }; - sender.callback = function(data, callbackId) { - this.postMessage({type: "call", id: callbackId, data: data}); - }; - sender.emit = function(name, data) { - this.postMessage({type: "event", name: name, data: data}); - }; - - config.loadModule(["worker", mod], function(Main) { - main = new Main[classname](sender); - while (_self.messageBuffer.length) - processNext(); - }); -}; - -UIWorkerClient.prototype = WorkerClient.prototype; - -exports.UIWorkerClient = UIWorkerClient; -exports.WorkerClient = WorkerClient; - -}); - -define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"], function(require, exports, module) { -"use strict"; - -var Range = require("./range").Range; -var EventEmitter = require("./lib/event_emitter").EventEmitter; -var oop = require("./lib/oop"); - -var PlaceHolder = function(session, length, pos, others, mainClass, othersClass) { - var _self = this; - this.length = length; - this.session = session; - this.doc = session.getDocument(); - this.mainClass = mainClass; - this.othersClass = othersClass; - this.$onUpdate = this.onUpdate.bind(this); - this.doc.on("change", this.$onUpdate); - this.$others = others; - - this.$onCursorChange = function() { - setTimeout(function() { - _self.onCursorChange(); - }); - }; - - this.$pos = pos; - var undoStack = session.getUndoManager().$undoStack || session.getUndoManager().$undostack || {length: -1}; - this.$undoStackDepth = undoStack.length; - this.setup(); - - session.selection.on("changeCursor", this.$onCursorChange); -}; - -(function() { - - oop.implement(this, EventEmitter); - this.setup = function() { - var _self = this; - var doc = this.doc; - var session = this.session; - var pos = this.$pos; - - this.selectionBefore = session.selection.toJSON(); - if (session.selection.inMultiSelectMode) - session.selection.toSingleRange(); - - this.pos = doc.createAnchor(pos.row, pos.column); - this.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false); - this.pos.on("change", function(event) { - session.removeMarker(_self.markerId); - _self.markerId = session.addMarker(new Range(event.value.row, event.value.column, event.value.row, event.value.column+_self.length), _self.mainClass, null, false); - }); - this.others = []; - this.$others.forEach(function(other) { - var anchor = doc.createAnchor(other.row, other.column); - _self.others.push(anchor); - }); - session.setUndoSelect(false); - }; - this.showOtherMarkers = function() { - if(this.othersActive) return; - var session = this.session; - var _self = this; - this.othersActive = true; - this.others.forEach(function(anchor) { - anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column+_self.length), _self.othersClass, null, false); - anchor.on("change", function(event) { - session.removeMarker(anchor.markerId); - anchor.markerId = session.addMarker(new Range(event.value.row, event.value.column, event.value.row, event.value.column+_self.length), _self.othersClass, null, false); - }); - }); - }; - this.hideOtherMarkers = function() { - if(!this.othersActive) return; - this.othersActive = false; - for (var i = 0; i < this.others.length; i++) { - this.session.removeMarker(this.others[i].markerId); - } - }; - this.onUpdate = function(event) { - var delta = event.data; - var range = delta.range; - if(range.start.row !== range.end.row) return; - if(range.start.row !== this.pos.row) return; - if (this.$updating) return; - this.$updating = true; - var lengthDiff = delta.action === "insertText" ? range.end.column - range.start.column : range.start.column - range.end.column; - - if(range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1) { - var distanceFromStart = range.start.column - this.pos.column; - this.length += lengthDiff; - if(!this.session.$fromUndo) { - if(delta.action === "insertText") { - for (var i = this.others.length - 1; i >= 0; i--) { - var otherPos = this.others[i]; - var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart}; - if(otherPos.row === range.start.row && range.start.column < otherPos.column) - newPos.column += lengthDiff; - this.doc.insert(newPos, delta.text); - } - } else if(delta.action === "removeText") { - for (var i = this.others.length - 1; i >= 0; i--) { - var otherPos = this.others[i]; - var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart}; - if(otherPos.row === range.start.row && range.start.column < otherPos.column) - newPos.column += lengthDiff; - this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff)); - } - } - if(range.start.column === this.pos.column && delta.action === "insertText") { - setTimeout(function() { - this.pos.setPosition(this.pos.row, this.pos.column - lengthDiff); - for (var i = 0; i < this.others.length; i++) { - var other = this.others[i]; - var newPos = {row: other.row, column: other.column - lengthDiff}; - if(other.row === range.start.row && range.start.column < other.column) - newPos.column += lengthDiff; - other.setPosition(newPos.row, newPos.column); - } - }.bind(this), 0); - } - else if(range.start.column === this.pos.column && delta.action === "removeText") { - setTimeout(function() { - for (var i = 0; i < this.others.length; i++) { - var other = this.others[i]; - if(other.row === range.start.row && range.start.column < other.column) { - other.setPosition(other.row, other.column - lengthDiff); - } - } - }.bind(this), 0); - } - } - this.pos._emit("change", {value: this.pos}); - for (var i = 0; i < this.others.length; i++) { - this.others[i]._emit("change", {value: this.others[i]}); - } - } - this.$updating = false; - }; - - this.onCursorChange = function(event) { - if (this.$updating || !this.session) return; - var pos = this.session.selection.getCursor(); - if (pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) { - this.showOtherMarkers(); - this._emit("cursorEnter", event); - } else { - this.hideOtherMarkers(); - this._emit("cursorLeave", event); - } - }; - this.detach = function() { - this.session.removeMarker(this.markerId); - this.hideOtherMarkers(); - this.doc.removeEventListener("change", this.$onUpdate); - this.session.selection.removeEventListener("changeCursor", this.$onCursorChange); - this.pos.detach(); - for (var i = 0; i < this.others.length; i++) { - this.others[i].detach(); - } - this.session.setUndoSelect(true); - this.session = null; - }; - this.cancel = function() { - if(this.$undoStackDepth === -1) - throw Error("Canceling placeholders only supported with undo manager attached to session."); - var undoManager = this.session.getUndoManager(); - var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth; - for (var i = 0; i < undosRequired; i++) { - undoManager.undo(true); - } - if (this.selectionBefore) - this.session.selection.fromJSON(this.selectionBefore); - }; -}).call(PlaceHolder.prototype); - - -exports.PlaceHolder = PlaceHolder; -}); - -define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { - -var event = require("../lib/event"); -var useragent = require("../lib/useragent"); -function isSamePoint(p1, p2) { - return p1.row == p2.row && p1.column == p2.column; -} - -function onMouseDown(e) { - var ev = e.domEvent; - var alt = ev.altKey; - var shift = ev.shiftKey; - var ctrl = ev.ctrlKey; - var accel = e.getAccelKey(); - var button = e.getButton(); - - if (ctrl && useragent.isMac) - button = ev.button; - - if (e.editor.inMultiSelectMode && button == 2) { - e.editor.textInput.onContextMenu(e.domEvent); - return; - } - - if (!ctrl && !alt && !accel) { - if (button === 0 && e.editor.inMultiSelectMode) - e.editor.exitMultiSelectMode(); - return; - } - - if (button !== 0) - return; - - var editor = e.editor; - var selection = editor.selection; - var isMultiSelect = editor.inMultiSelectMode; - var pos = e.getDocumentPosition(); - var cursor = selection.getCursor(); - var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor)); - - var mouseX = e.x, mouseY = e.y; - var onMouseSelection = function(e) { - mouseX = e.clientX; - mouseY = e.clientY; - }; - - var session = editor.session; - var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY); - var screenCursor = screenAnchor; - - var selectionMode; - if (editor.$mouseHandler.$enableJumpToDef) { - if (ctrl && alt || accel && alt) - selectionMode = "add"; - else if (alt) - selectionMode = "block"; - } else { - if (accel && !alt) { - selectionMode = "add"; - if (!isMultiSelect && shift) - return; - } else if (alt) { - selectionMode = "block"; - } - } - - if (selectionMode && useragent.isMac && ev.ctrlKey) { - editor.$mouseHandler.cancelContextMenu(); - } - - if (selectionMode == "add") { - if (!isMultiSelect && inSelection) - return; // dragging - - if (!isMultiSelect) { - var range = selection.toOrientedRange(); - editor.addSelectionMarker(range); - } - - var oldRange = selection.rangeList.rangeAtPoint(pos); - - - editor.$blockScrolling++; - editor.inVirtualSelectionMode = true; - - if (shift) { - oldRange = null; - range = selection.ranges[0]; - editor.removeSelectionMarker(range); - } - editor.once("mouseup", function() { - var tmpSel = selection.toOrientedRange(); - - if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor)) - selection.substractPoint(tmpSel.cursor); - else { - if (shift) { - selection.substractPoint(range.cursor); - } else if (range) { - editor.removeSelectionMarker(range); - selection.addRange(range); - } - selection.addRange(tmpSel); - } - editor.$blockScrolling--; - editor.inVirtualSelectionMode = false; - }); - - } else if (selectionMode == "block") { - e.stop(); - editor.inVirtualSelectionMode = true; - var initialRange; - var rectSel = []; - var blockSelect = function() { - var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY); - var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column); - - if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead)) - return; - screenCursor = newCursor; - - editor.$blockScrolling++; - editor.selection.moveToPosition(cursor); - editor.renderer.scrollCursorIntoView(); - - editor.removeSelectionMarkers(rectSel); - rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor); - if (editor.$mouseHandler.$clickSelection && rectSel.length == 1 && rectSel[0].isEmpty()) - rectSel[0] = editor.$mouseHandler.$clickSelection.clone(); - rectSel.forEach(editor.addSelectionMarker, editor); - editor.updateSelectionMarkers(); - editor.$blockScrolling--; - }; - editor.$blockScrolling++; - if (isMultiSelect && !accel) { - selection.toSingleRange(); - } else if (!isMultiSelect && accel) { - initialRange = selection.toOrientedRange(); - editor.addSelectionMarker(initialRange); - } - - if (shift) - screenAnchor = session.documentToScreenPosition(selection.lead); - else - selection.moveToPosition(pos); - editor.$blockScrolling--; - - screenCursor = {row: -1, column: -1}; - - var onMouseSelectionEnd = function(e) { - clearInterval(timerId); - editor.removeSelectionMarkers(rectSel); - if (!rectSel.length) - rectSel = [selection.toOrientedRange()]; - editor.$blockScrolling++; - if (initialRange) { - editor.removeSelectionMarker(initialRange); - selection.toSingleRange(initialRange); - } - for (var i = 0; i < rectSel.length; i++) - selection.addRange(rectSel[i]); - editor.inVirtualSelectionMode = false; - editor.$mouseHandler.$clickSelection = null; - editor.$blockScrolling--; - }; - - var onSelectionInterval = blockSelect; - - event.capture(editor.container, onMouseSelection, onMouseSelectionEnd); - var timerId = setInterval(function() {onSelectionInterval();}, 20); - - return e.preventDefault(); - } -} - - -exports.onMouseDown = onMouseDown; - -}); - -define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"], function(require, exports, module) { -exports.defaultCommands = [{ - name: "addCursorAbove", - exec: function(editor) { editor.selectMoreLines(-1); }, - bindKey: {win: "Ctrl-Alt-Up", mac: "Ctrl-Alt-Up"}, - scrollIntoView: "cursor", - readonly: true -}, { - name: "addCursorBelow", - exec: function(editor) { editor.selectMoreLines(1); }, - bindKey: {win: "Ctrl-Alt-Down", mac: "Ctrl-Alt-Down"}, - scrollIntoView: "cursor", - readonly: true -}, { - name: "addCursorAboveSkipCurrent", - exec: function(editor) { editor.selectMoreLines(-1, true); }, - bindKey: {win: "Ctrl-Alt-Shift-Up", mac: "Ctrl-Alt-Shift-Up"}, - scrollIntoView: "cursor", - readonly: true -}, { - name: "addCursorBelowSkipCurrent", - exec: function(editor) { editor.selectMoreLines(1, true); }, - bindKey: {win: "Ctrl-Alt-Shift-Down", mac: "Ctrl-Alt-Shift-Down"}, - scrollIntoView: "cursor", - readonly: true -}, { - name: "selectMoreBefore", - exec: function(editor) { editor.selectMore(-1); }, - bindKey: {win: "Ctrl-Alt-Left", mac: "Ctrl-Alt-Left"}, - scrollIntoView: "cursor", - readonly: true -}, { - name: "selectMoreAfter", - exec: function(editor) { editor.selectMore(1); }, - bindKey: {win: "Ctrl-Alt-Right", mac: "Ctrl-Alt-Right"}, - scrollIntoView: "cursor", - readonly: true -}, { - name: "selectNextBefore", - exec: function(editor) { editor.selectMore(-1, true); }, - bindKey: {win: "Ctrl-Alt-Shift-Left", mac: "Ctrl-Alt-Shift-Left"}, - scrollIntoView: "cursor", - readonly: true -}, { - name: "selectNextAfter", - exec: function(editor) { editor.selectMore(1, true); }, - bindKey: {win: "Ctrl-Alt-Shift-Right", mac: "Ctrl-Alt-Shift-Right"}, - scrollIntoView: "cursor", - readonly: true -}, { - name: "splitIntoLines", - exec: function(editor) { editor.multiSelect.splitIntoLines(); }, - bindKey: {win: "Ctrl-Alt-L", mac: "Ctrl-Alt-L"}, - readonly: true -}, { - name: "alignCursors", - exec: function(editor) { editor.alignCursors(); }, - bindKey: {win: "Ctrl-Alt-A", mac: "Ctrl-Alt-A"}, - scrollIntoView: "cursor" -}, { - name: "findAll", - exec: function(editor) { editor.findAll(); }, - bindKey: {win: "Ctrl-Alt-K", mac: "Ctrl-Alt-G"}, - scrollIntoView: "cursor", - readonly: true -}]; -exports.multiSelectCommands = [{ - name: "singleSelection", - bindKey: "esc", - exec: function(editor) { editor.exitMultiSelectMode(); }, - scrollIntoView: "cursor", - readonly: true, - isAvailable: function(editor) {return editor && editor.inMultiSelectMode} -}]; - -var HashHandler = require("../keyboard/hash_handler").HashHandler; -exports.keyboardHandler = new HashHandler(exports.multiSelectCommands); - -}); - -define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"], function(require, exports, module) { - -var RangeList = require("./range_list").RangeList; -var Range = require("./range").Range; -var Selection = require("./selection").Selection; -var onMouseDown = require("./mouse/multi_select_handler").onMouseDown; -var event = require("./lib/event"); -var lang = require("./lib/lang"); -var commands = require("./commands/multi_select_commands"); -exports.commands = commands.defaultCommands.concat(commands.multiSelectCommands); -var Search = require("./search").Search; -var search = new Search(); - -function find(session, needle, dir) { - search.$options.wrap = true; - search.$options.needle = needle; - search.$options.backwards = dir == -1; - return search.find(session); -} -var EditSession = require("./edit_session").EditSession; -(function() { - this.getSelectionMarkers = function() { - return this.$selectionMarkers; - }; -}).call(EditSession.prototype); -(function() { - this.ranges = null; - this.rangeList = null; - this.addRange = function(range, $blockChangeEvents) { - if (!range) - return; - - if (!this.inMultiSelectMode && this.rangeCount === 0) { - var oldRange = this.toOrientedRange(); - this.rangeList.add(oldRange); - this.rangeList.add(range); - if (this.rangeList.ranges.length != 2) { - this.rangeList.removeAll(); - return $blockChangeEvents || this.fromOrientedRange(range); - } - this.rangeList.removeAll(); - this.rangeList.add(oldRange); - this.$onAddRange(oldRange); - } - - if (!range.cursor) - range.cursor = range.end; - - var removed = this.rangeList.add(range); - - this.$onAddRange(range); - - if (removed.length) - this.$onRemoveRange(removed); - - if (this.rangeCount > 1 && !this.inMultiSelectMode) { - this._signal("multiSelect"); - this.inMultiSelectMode = true; - this.session.$undoSelect = false; - this.rangeList.attach(this.session); - } - - return $blockChangeEvents || this.fromOrientedRange(range); - }; - - this.toSingleRange = function(range) { - range = range || this.ranges[0]; - var removed = this.rangeList.removeAll(); - if (removed.length) - this.$onRemoveRange(removed); - - range && this.fromOrientedRange(range); - }; - this.substractPoint = function(pos) { - var removed = this.rangeList.substractPoint(pos); - if (removed) { - this.$onRemoveRange(removed); - return removed[0]; - } - }; - this.mergeOverlappingRanges = function() { - var removed = this.rangeList.merge(); - if (removed.length) - this.$onRemoveRange(removed); - else if(this.ranges[0]) - this.fromOrientedRange(this.ranges[0]); - }; - - this.$onAddRange = function(range) { - this.rangeCount = this.rangeList.ranges.length; - this.ranges.unshift(range); - this._signal("addRange", {range: range}); - }; - - this.$onRemoveRange = function(removed) { - this.rangeCount = this.rangeList.ranges.length; - if (this.rangeCount == 1 && this.inMultiSelectMode) { - var lastRange = this.rangeList.ranges.pop(); - removed.push(lastRange); - this.rangeCount = 0; - } - - for (var i = removed.length; i--; ) { - var index = this.ranges.indexOf(removed[i]); - this.ranges.splice(index, 1); - } - - this._signal("removeRange", {ranges: removed}); - - if (this.rangeCount === 0 && this.inMultiSelectMode) { - this.inMultiSelectMode = false; - this._signal("singleSelect"); - this.session.$undoSelect = true; - this.rangeList.detach(this.session); - } - - lastRange = lastRange || this.ranges[0]; - if (lastRange && !lastRange.isEqual(this.getRange())) - this.fromOrientedRange(lastRange); - }; - this.$initRangeList = function() { - if (this.rangeList) - return; - - this.rangeList = new RangeList(); - this.ranges = []; - this.rangeCount = 0; - }; - this.getAllRanges = function() { - return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()]; - }; - - this.splitIntoLines = function () { - if (this.rangeCount > 1) { - var ranges = this.rangeList.ranges; - var lastRange = ranges[ranges.length - 1]; - var range = Range.fromPoints(ranges[0].start, lastRange.end); - - this.toSingleRange(); - this.setSelectionRange(range, lastRange.cursor == lastRange.start); - } else { - var range = this.getRange(); - var isBackwards = this.isBackwards(); - var startRow = range.start.row; - var endRow = range.end.row; - if (startRow == endRow) { - if (isBackwards) - var start = range.end, end = range.start; - else - var start = range.start, end = range.end; - - this.addRange(Range.fromPoints(end, end)); - this.addRange(Range.fromPoints(start, start)); - return; - } - - var rectSel = []; - var r = this.getLineRange(startRow, true); - r.start.column = range.start.column; - rectSel.push(r); - - for (var i = startRow + 1; i < endRow; i++) - rectSel.push(this.getLineRange(i, true)); - - r = this.getLineRange(endRow, true); - r.end.column = range.end.column; - rectSel.push(r); - - rectSel.forEach(this.addRange, this); - } - }; - this.toggleBlockSelection = function () { - if (this.rangeCount > 1) { - var ranges = this.rangeList.ranges; - var lastRange = ranges[ranges.length - 1]; - var range = Range.fromPoints(ranges[0].start, lastRange.end); - - this.toSingleRange(); - this.setSelectionRange(range, lastRange.cursor == lastRange.start); - } else { - var cursor = this.session.documentToScreenPosition(this.selectionLead); - var anchor = this.session.documentToScreenPosition(this.selectionAnchor); - - var rectSel = this.rectangularRangeBlock(cursor, anchor); - rectSel.forEach(this.addRange, this); - } - }; - this.rectangularRangeBlock = function(screenCursor, screenAnchor, includeEmptyLines) { - var rectSel = []; - - var xBackwards = screenCursor.column < screenAnchor.column; - if (xBackwards) { - var startColumn = screenCursor.column; - var endColumn = screenAnchor.column; - } else { - var startColumn = screenAnchor.column; - var endColumn = screenCursor.column; - } - - var yBackwards = screenCursor.row < screenAnchor.row; - if (yBackwards) { - var startRow = screenCursor.row; - var endRow = screenAnchor.row; - } else { - var startRow = screenAnchor.row; - var endRow = screenCursor.row; - } - - if (startColumn < 0) - startColumn = 0; - if (startRow < 0) - startRow = 0; - - if (startRow == endRow) - includeEmptyLines = true; - - for (var row = startRow; row <= endRow; row++) { - var range = Range.fromPoints( - this.session.screenToDocumentPosition(row, startColumn), - this.session.screenToDocumentPosition(row, endColumn) - ); - if (range.isEmpty()) { - if (docEnd && isSamePoint(range.end, docEnd)) - break; - var docEnd = range.end; - } - range.cursor = xBackwards ? range.start : range.end; - rectSel.push(range); - } - - if (yBackwards) - rectSel.reverse(); - - if (!includeEmptyLines) { - var end = rectSel.length - 1; - while (rectSel[end].isEmpty() && end > 0) - end--; - if (end > 0) { - var start = 0; - while (rectSel[start].isEmpty()) - start++; - } - for (var i = end; i >= start; i--) { - if (rectSel[i].isEmpty()) - rectSel.splice(i, 1); - } - } - - return rectSel; - }; -}).call(Selection.prototype); -var Editor = require("./editor").Editor; -(function() { - this.updateSelectionMarkers = function() { - this.renderer.updateCursor(); - this.renderer.updateBackMarkers(); - }; - this.addSelectionMarker = function(orientedRange) { - if (!orientedRange.cursor) - orientedRange.cursor = orientedRange.end; - - var style = this.getSelectionStyle(); - orientedRange.marker = this.session.addMarker(orientedRange, "ace_selection", style); - - this.session.$selectionMarkers.push(orientedRange); - this.session.selectionMarkerCount = this.session.$selectionMarkers.length; - return orientedRange; - }; - this.removeSelectionMarker = function(range) { - if (!range.marker) - return; - this.session.removeMarker(range.marker); - var index = this.session.$selectionMarkers.indexOf(range); - if (index != -1) - this.session.$selectionMarkers.splice(index, 1); - this.session.selectionMarkerCount = this.session.$selectionMarkers.length; - }; - - this.removeSelectionMarkers = function(ranges) { - var markerList = this.session.$selectionMarkers; - for (var i = ranges.length; i--; ) { - var range = ranges[i]; - if (!range.marker) - continue; - this.session.removeMarker(range.marker); - var index = markerList.indexOf(range); - if (index != -1) - markerList.splice(index, 1); - } - this.session.selectionMarkerCount = markerList.length; - }; - - this.$onAddRange = function(e) { - this.addSelectionMarker(e.range); - this.renderer.updateCursor(); - this.renderer.updateBackMarkers(); - }; - - this.$onRemoveRange = function(e) { - this.removeSelectionMarkers(e.ranges); - this.renderer.updateCursor(); - this.renderer.updateBackMarkers(); - }; - - this.$onMultiSelect = function(e) { - if (this.inMultiSelectMode) - return; - this.inMultiSelectMode = true; - - this.setStyle("ace_multiselect"); - this.keyBinding.addKeyboardHandler(commands.keyboardHandler); - this.commands.setDefaultHandler("exec", this.$onMultiSelectExec); - - this.renderer.updateCursor(); - this.renderer.updateBackMarkers(); - }; - - this.$onSingleSelect = function(e) { - if (this.session.multiSelect.inVirtualMode) - return; - this.inMultiSelectMode = false; - - this.unsetStyle("ace_multiselect"); - this.keyBinding.removeKeyboardHandler(commands.keyboardHandler); - - this.commands.removeDefaultHandler("exec", this.$onMultiSelectExec); - this.renderer.updateCursor(); - this.renderer.updateBackMarkers(); - this._emit("changeSelection"); - }; - - this.$onMultiSelectExec = function(e) { - var command = e.command; - var editor = e.editor; - if (!editor.multiSelect) - return; - if (!command.multiSelectAction) { - var result = command.exec(editor, e.args || {}); - editor.multiSelect.addRange(editor.multiSelect.toOrientedRange()); - editor.multiSelect.mergeOverlappingRanges(); - } else if (command.multiSelectAction == "forEach") { - result = editor.forEachSelection(command, e.args); - } else if (command.multiSelectAction == "forEachLine") { - result = editor.forEachSelection(command, e.args, true); - } else if (command.multiSelectAction == "single") { - editor.exitMultiSelectMode(); - result = command.exec(editor, e.args || {}); - } else { - result = command.multiSelectAction(editor, e.args || {}); - } - return result; - }; - this.forEachSelection = function(cmd, args, options) { - if (this.inVirtualSelectionMode) - return; - var keepOrder = options && options.keepOrder; - var $byLines = options == true || options && options.$byLines - var session = this.session; - var selection = this.selection; - var rangeList = selection.rangeList; - var ranges = (keepOrder ? selection : rangeList).ranges; - var result; - - if (!ranges.length) - return cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {}); - - var reg = selection._eventRegistry; - selection._eventRegistry = {}; - - var tmpSel = new Selection(session); - this.inVirtualSelectionMode = true; - for (var i = ranges.length; i--;) { - if ($byLines) { - while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row) - i--; - } - tmpSel.fromOrientedRange(ranges[i]); - tmpSel.index = i; - this.selection = session.selection = tmpSel; - var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {}); - if (!result && cmdResult !== undefined) - result = cmdResult; - tmpSel.toOrientedRange(ranges[i]); - } - tmpSel.detach(); - - this.selection = session.selection = selection; - this.inVirtualSelectionMode = false; - selection._eventRegistry = reg; - selection.mergeOverlappingRanges(); - - var anim = this.renderer.$scrollAnimation; - this.onCursorChange(); - this.onSelectionChange(); - if (anim && anim.from == anim.to) - this.renderer.animateScrolling(anim.from); - - return result; - }; - this.exitMultiSelectMode = function() { - if (!this.inMultiSelectMode || this.inVirtualSelectionMode) - return; - this.multiSelect.toSingleRange(); - }; - - this.getSelectedText = function() { - var text = ""; - if (this.inMultiSelectMode && !this.inVirtualSelectionMode) { - var ranges = this.multiSelect.rangeList.ranges; - var buf = []; - for (var i = 0; i < ranges.length; i++) { - buf.push(this.session.getTextRange(ranges[i])); - } - var nl = this.session.getDocument().getNewLineCharacter(); - text = buf.join(nl); - if (text.length == (buf.length - 1) * nl.length) - text = ""; - } else if (!this.selection.isEmpty()) { - text = this.session.getTextRange(this.getSelectionRange()); - } - return text; - }; - - this.$checkMultiselectChange = function(e, anchor) { - if (this.inMultiSelectMode && !this.inVirtualSelectionMode) { - var range = this.multiSelect.ranges[0]; - if (this.multiSelect.isEmpty() && anchor == this.multiSelect.anchor) - return; - var pos = anchor == this.multiSelect.anchor - ? range.cursor == range.start ? range.end : range.start - : range.cursor; - if (pos.row != anchor.row - || this.session.$clipPositionToDocument(pos.row, pos.column).column != anchor.column) - this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()); - } - }; - this.findAll = function(needle, options, additive) { - options = options || {}; - options.needle = needle || options.needle; - if (options.needle == undefined) { - var range = this.selection.isEmpty() - ? this.selection.getWordRange() - : this.selection.getRange(); - options.needle = this.session.getTextRange(range); - } - this.$search.set(options); - - var ranges = this.$search.findAll(this.session); - if (!ranges.length) - return 0; - - this.$blockScrolling += 1; - var selection = this.multiSelect; - - if (!additive) - selection.toSingleRange(ranges[0]); - - for (var i = ranges.length; i--; ) - selection.addRange(ranges[i], true); - if (range && selection.rangeList.rangeAtPoint(range.start)) - selection.addRange(range, true); - - this.$blockScrolling -= 1; - - return ranges.length; - }; - this.selectMoreLines = function(dir, skip) { - var range = this.selection.toOrientedRange(); - var isBackwards = range.cursor == range.end; - - var screenLead = this.session.documentToScreenPosition(range.cursor); - if (this.selection.$desiredColumn) - screenLead.column = this.selection.$desiredColumn; - - var lead = this.session.screenToDocumentPosition(screenLead.row + dir, screenLead.column); - - if (!range.isEmpty()) { - var screenAnchor = this.session.documentToScreenPosition(isBackwards ? range.end : range.start); - var anchor = this.session.screenToDocumentPosition(screenAnchor.row + dir, screenAnchor.column); - } else { - var anchor = lead; - } - - if (isBackwards) { - var newRange = Range.fromPoints(lead, anchor); - newRange.cursor = newRange.start; - } else { - var newRange = Range.fromPoints(anchor, lead); - newRange.cursor = newRange.end; - } - - newRange.desiredColumn = screenLead.column; - if (!this.selection.inMultiSelectMode) { - this.selection.addRange(range); - } else { - if (skip) - var toRemove = range.cursor; - } - - this.selection.addRange(newRange); - if (toRemove) - this.selection.substractPoint(toRemove); - }; - this.transposeSelections = function(dir) { - var session = this.session; - var sel = session.multiSelect; - var all = sel.ranges; - - for (var i = all.length; i--; ) { - var range = all[i]; - if (range.isEmpty()) { - var tmp = session.getWordRange(range.start.row, range.start.column); - range.start.row = tmp.start.row; - range.start.column = tmp.start.column; - range.end.row = tmp.end.row; - range.end.column = tmp.end.column; - } - } - sel.mergeOverlappingRanges(); - - var words = []; - for (var i = all.length; i--; ) { - var range = all[i]; - words.unshift(session.getTextRange(range)); - } - - if (dir < 0) - words.unshift(words.pop()); - else - words.push(words.shift()); - - for (var i = all.length; i--; ) { - var range = all[i]; - var tmp = range.clone(); - session.replace(range, words[i]); - range.start.row = tmp.start.row; - range.start.column = tmp.start.column; - } - }; - this.selectMore = function(dir, skip, stopAtFirst) { - var session = this.session; - var sel = session.multiSelect; - - var range = sel.toOrientedRange(); - if (range.isEmpty()) { - range = session.getWordRange(range.start.row, range.start.column); - range.cursor = dir == -1 ? range.start : range.end; - this.multiSelect.addRange(range); - if (stopAtFirst) - return; - } - var needle = session.getTextRange(range); - - var newRange = find(session, needle, dir); - if (newRange) { - newRange.cursor = dir == -1 ? newRange.start : newRange.end; - this.$blockScrolling += 1; - this.session.unfold(newRange); - this.multiSelect.addRange(newRange); - this.$blockScrolling -= 1; - this.renderer.scrollCursorIntoView(null, 0.5); - } - if (skip) - this.multiSelect.substractPoint(range.cursor); - }; - this.alignCursors = function() { - var session = this.session; - var sel = session.multiSelect; - var ranges = sel.ranges; - var row = -1; - var sameRowRanges = ranges.filter(function(r) { - if (r.cursor.row == row) - return true; - row = r.cursor.row; - }); - - if (!ranges.length || sameRowRanges.length == ranges.length - 1) { - var range = this.selection.getRange(); - var fr = range.start.row, lr = range.end.row; - var guessRange = fr == lr; - if (guessRange) { - var max = this.session.getLength(); - var line; - do { - line = this.session.getLine(lr); - } while (/[=:]/.test(line) && ++lr < max); - do { - line = this.session.getLine(fr); - } while (/[=:]/.test(line) && --fr > 0); - - if (fr < 0) fr = 0; - if (lr >= max) lr = max - 1; - } - var lines = this.session.doc.removeLines(fr, lr); - lines = this.$reAlignText(lines, guessRange); - this.session.doc.insert({row: fr, column: 0}, lines.join("\n") + "\n"); - if (!guessRange) { - range.start.column = 0; - range.end.column = lines[lines.length - 1].length; - } - this.selection.setRange(range); - } else { - sameRowRanges.forEach(function(r) { - sel.substractPoint(r.cursor); - }); - - var maxCol = 0; - var minSpace = Infinity; - var spaceOffsets = ranges.map(function(r) { - var p = r.cursor; - var line = session.getLine(p.row); - var spaceOffset = line.substr(p.column).search(/\S/g); - if (spaceOffset == -1) - spaceOffset = 0; - - if (p.column > maxCol) - maxCol = p.column; - if (spaceOffset < minSpace) - minSpace = spaceOffset; - return spaceOffset; - }); - ranges.forEach(function(r, i) { - var p = r.cursor; - var l = maxCol - p.column; - var d = spaceOffsets[i] - minSpace; - if (l > d) - session.insert(p, lang.stringRepeat(" ", l - d)); - else - session.remove(new Range(p.row, p.column, p.row, p.column - l + d)); - - r.start.column = r.end.column = maxCol; - r.start.row = r.end.row = p.row; - r.cursor = r.end; - }); - sel.fromOrientedRange(ranges[0]); - this.renderer.updateCursor(); - this.renderer.updateBackMarkers(); - } - }; - - this.$reAlignText = function(lines, forceLeft) { - var isLeftAligned = true, isRightAligned = true; - var startW, textW, endW; - - return lines.map(function(line) { - var m = line.match(/(\s*)(.*?)(\s*)([=:].*)/); - if (!m) - return [line]; - - if (startW == null) { - startW = m[1].length; - textW = m[2].length; - endW = m[3].length; - return m; - } - - if (startW + textW + endW != m[1].length + m[2].length + m[3].length) - isRightAligned = false; - if (startW != m[1].length) - isLeftAligned = false; - - if (startW > m[1].length) - startW = m[1].length; - if (textW < m[2].length) - textW = m[2].length; - if (endW > m[3].length) - endW = m[3].length; - - return m; - }).map(forceLeft ? alignLeft : - isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign); - - function spaces(n) { - return lang.stringRepeat(" ", n); - } - - function alignLeft(m) { - return !m[2] ? m[0] : spaces(startW) + m[2] - + spaces(textW - m[2].length + endW) - + m[4].replace(/^([=:])\s+/, "$1 "); - } - function alignRight(m) { - return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2] - + spaces(endW, " ") - + m[4].replace(/^([=:])\s+/, "$1 "); - } - function unAlign(m) { - return !m[2] ? m[0] : spaces(startW) + m[2] - + spaces(endW) - + m[4].replace(/^([=:])\s+/, "$1 "); - } - }; -}).call(Editor.prototype); - - -function isSamePoint(p1, p2) { - return p1.row == p2.row && p1.column == p2.column; -} -exports.onSessionChange = function(e) { - var session = e.session; - if (session && !session.multiSelect) { - session.$selectionMarkers = []; - session.selection.$initRangeList(); - session.multiSelect = session.selection; - } - this.multiSelect = session && session.multiSelect; - - var oldSession = e.oldSession; - if (oldSession) { - oldSession.multiSelect.off("addRange", this.$onAddRange); - oldSession.multiSelect.off("removeRange", this.$onRemoveRange); - oldSession.multiSelect.off("multiSelect", this.$onMultiSelect); - oldSession.multiSelect.off("singleSelect", this.$onSingleSelect); - oldSession.multiSelect.lead.off("change", this.$checkMultiselectChange); - oldSession.multiSelect.anchor.off("change", this.$checkMultiselectChange); - } - - if (session) { - session.multiSelect.on("addRange", this.$onAddRange); - session.multiSelect.on("removeRange", this.$onRemoveRange); - session.multiSelect.on("multiSelect", this.$onMultiSelect); - session.multiSelect.on("singleSelect", this.$onSingleSelect); - session.multiSelect.lead.on("change", this.$checkMultiselectChange); - session.multiSelect.anchor.on("change", this.$checkMultiselectChange); - } - - if (session && this.inMultiSelectMode != session.selection.inMultiSelectMode) { - if (session.selection.inMultiSelectMode) - this.$onMultiSelect(); - else - this.$onSingleSelect(); - } -}; -function MultiSelect(editor) { - if (editor.$multiselectOnSessionChange) - return; - editor.$onAddRange = editor.$onAddRange.bind(editor); - editor.$onRemoveRange = editor.$onRemoveRange.bind(editor); - editor.$onMultiSelect = editor.$onMultiSelect.bind(editor); - editor.$onSingleSelect = editor.$onSingleSelect.bind(editor); - editor.$multiselectOnSessionChange = exports.onSessionChange.bind(editor); - editor.$checkMultiselectChange = editor.$checkMultiselectChange.bind(editor); - - editor.$multiselectOnSessionChange(editor); - editor.on("changeSession", editor.$multiselectOnSessionChange); - - editor.on("mousedown", onMouseDown); - editor.commands.addCommands(commands.defaultCommands); - - addAltCursorListeners(editor); -} - -function addAltCursorListeners(editor){ - var el = editor.textInput.getElement(); - var altCursor = false; - event.addListener(el, "keydown", function(e) { - if (e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey)) { - if (!altCursor) { - editor.renderer.setMouseCursor("crosshair"); - altCursor = true; - } - } else if (altCursor) { - reset(); - } - }); - - event.addListener(el, "keyup", reset); - event.addListener(el, "blur", reset); - function reset(e) { - if (altCursor) { - editor.renderer.setMouseCursor(""); - altCursor = false; - } - } -} - -exports.MultiSelect = MultiSelect; - - -require("./config").defineOptions(Editor.prototype, "editor", { - enableMultiselect: { - set: function(val) { - MultiSelect(this); - if (val) { - this.on("changeSession", this.$multiselectOnSessionChange); - this.on("mousedown", onMouseDown); - } else { - this.off("changeSession", this.$multiselectOnSessionChange); - this.off("mousedown", onMouseDown); - } - }, - value: true - } -}); - - - -}); - -define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; - -(function() { - - this.foldingStartMarker = null; - this.foldingStopMarker = null; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - if (this.foldingStartMarker.test(line)) - return "start"; - if (foldStyle == "markbeginend" - && this.foldingStopMarker - && this.foldingStopMarker.test(line)) - return "end"; - return ""; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - return null; - }; - - this.indentationBlock = function(session, row, column) { - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1) - return; - - var startColumn = column || line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - var level = session.getLine(row).search(re); - - if (level == -1) - continue; - - if (level <= startLevel) - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - - this.openingBracketBlock = function(session, bracket, row, column, typeRe) { - var start = {row: row, column: column + 1}; - var end = session.$findClosingBracket(bracket, start, typeRe); - if (!end) - return; - - var fw = session.foldWidgets[end.row]; - if (fw == null) - fw = session.getFoldWidget(end.row); - - if (fw == "start" && end.row > start.row) { - end.row --; - end.column = session.getLine(end.row).length; - } - return Range.fromPoints(start, end); - }; - - this.closingBracketBlock = function(session, bracket, row, column, typeRe) { - var end = {row: row, column: column}; - var start = session.$findOpeningBracket(bracket, end); - - if (!start) - return; - - start.column++; - end.column--; - - return Range.fromPoints(start, end); - }; -}).call(FoldMode.prototype); - -}); - -define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) { -"use strict"; - -exports.isDark = false; -exports.cssClass = "ace-tm"; -exports.cssText = ".ace-tm .ace_gutter {\ -background: #f0f0f0;\ -color: #333;\ -}\ -.ace-tm .ace_print-margin {\ -width: 1px;\ -background: #e8e8e8;\ -}\ -.ace-tm .ace_fold {\ -background-color: #6B72E6;\ -}\ -.ace-tm {\ -background-color: #FFFFFF;\ -color: black;\ -}\ -.ace-tm .ace_cursor {\ -color: black;\ -}\ -.ace-tm .ace_invisible {\ -color: rgb(191, 191, 191);\ -}\ -.ace-tm .ace_storage,\ -.ace-tm .ace_keyword {\ -color: blue;\ -}\ -.ace-tm .ace_constant {\ -color: rgb(197, 6, 11);\ -}\ -.ace-tm .ace_constant.ace_buildin {\ -color: rgb(88, 72, 246);\ -}\ -.ace-tm .ace_constant.ace_language {\ -color: rgb(88, 92, 246);\ -}\ -.ace-tm .ace_constant.ace_library {\ -color: rgb(6, 150, 14);\ -}\ -.ace-tm .ace_invalid {\ -background-color: rgba(255, 0, 0, 0.1);\ -color: red;\ -}\ -.ace-tm .ace_support.ace_function {\ -color: rgb(60, 76, 114);\ -}\ -.ace-tm .ace_support.ace_constant {\ -color: rgb(6, 150, 14);\ -}\ -.ace-tm .ace_support.ace_type,\ -.ace-tm .ace_support.ace_class {\ -color: rgb(109, 121, 222);\ -}\ -.ace-tm .ace_keyword.ace_operator {\ -color: rgb(104, 118, 135);\ -}\ -.ace-tm .ace_string {\ -color: rgb(3, 106, 7);\ -}\ -.ace-tm .ace_comment {\ -color: rgb(76, 136, 107);\ -}\ -.ace-tm .ace_comment.ace_doc {\ -color: rgb(0, 102, 255);\ -}\ -.ace-tm .ace_comment.ace_doc.ace_tag {\ -color: rgb(128, 159, 191);\ -}\ -.ace-tm .ace_constant.ace_numeric {\ -color: rgb(0, 0, 205);\ -}\ -.ace-tm .ace_variable {\ -color: rgb(49, 132, 149);\ -}\ -.ace-tm .ace_xml-pe {\ -color: rgb(104, 104, 91);\ -}\ -.ace-tm .ace_entity.ace_name.ace_function {\ -color: #0000A2;\ -}\ -.ace-tm .ace_heading {\ -color: rgb(12, 7, 255);\ -}\ -.ace-tm .ace_list {\ -color:rgb(185, 6, 144);\ -}\ -.ace-tm .ace_meta.ace_tag {\ -color:rgb(0, 22, 142);\ -}\ -.ace-tm .ace_string.ace_regex {\ -color: rgb(255, 0, 0)\ -}\ -.ace-tm .ace_marker-layer .ace_selection {\ -background: rgb(181, 213, 255);\ -}\ -.ace-tm.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px white;\ -border-radius: 2px;\ -}\ -.ace-tm .ace_marker-layer .ace_step {\ -background: rgb(252, 255, 0);\ -}\ -.ace-tm .ace_marker-layer .ace_stack {\ -background: rgb(164, 229, 101);\ -}\ -.ace-tm .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgb(192, 192, 192);\ -}\ -.ace-tm .ace_marker-layer .ace_active-line {\ -background: rgba(0, 0, 0, 0.07);\ -}\ -.ace-tm .ace_gutter-active-line {\ -background-color : #dcdcdc;\ -}\ -.ace-tm .ace_marker-layer .ace_selected-word {\ -background: rgb(250, 250, 255);\ -border: 1px solid rgb(200, 200, 250);\ -}\ -.ace-tm .ace_indent-guide {\ -background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ -}\ -"; - -var dom = require("../lib/dom"); -dom.importCssString(exports.cssText, exports.cssClass); -}); - -define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("./lib/oop"); -var dom = require("./lib/dom"); -var Range = require("./range").Range; - - -function LineWidgets(session) { - this.session = session; - this.session.widgetManager = this; - this.session.getRowLength = this.getRowLength; - this.session.$getWidgetScreenLength = this.$getWidgetScreenLength; - this.updateOnChange = this.updateOnChange.bind(this); - this.renderWidgets = this.renderWidgets.bind(this); - this.measureWidgets = this.measureWidgets.bind(this); - this.session._changedWidgets = []; - this.$onChangeEditor = this.$onChangeEditor.bind(this); - - this.session.on("change", this.updateOnChange); - this.session.on("changeEditor", this.$onChangeEditor); -} - -(function() { - this.getRowLength = function(row) { - var h; - if (this.lineWidgets) - h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0; - else - h = 0; - if (!this.$useWrapMode || !this.$wrapData[row]) { - return 1 + h; - } else { - return this.$wrapData[row].length + 1 + h; - } - }; - - this.$getWidgetScreenLength = function() { - var screenRows = 0; - this.lineWidgets.forEach(function(w){ - if (w && w.rowCount) - screenRows +=w.rowCount; - }); - return screenRows; - }; - - this.$onChangeEditor = function(e) { - this.attach(e.editor); - }; - - this.attach = function(editor) { - if (editor && editor.widgetManager && editor.widgetManager != this) - editor.widgetManager.detach(); - - if (this.editor == editor) - return; - - this.detach(); - this.editor = editor; - - if (editor) { - editor.widgetManager = this; - editor.renderer.on("beforeRender", this.measureWidgets); - editor.renderer.on("afterRender", this.renderWidgets); - } - }; - this.detach = function(e) { - var editor = this.editor; - if (!editor) - return; - - this.editor = null; - editor.widgetManager = null; - - editor.renderer.off("beforeRender", this.measureWidgets); - editor.renderer.off("afterRender", this.renderWidgets); - var lineWidgets = this.session.lineWidgets; - lineWidgets && lineWidgets.forEach(function(w) { - if (w && w.el && w.el.parentNode) { - w._inDocument = false; - w.el.parentNode.removeChild(w.el); - } - }); - }; - - this.updateOnChange = function(e) { - var lineWidgets = this.session.lineWidgets; - if (!lineWidgets) return; - - var delta = e.data; - var range = delta.range; - var startRow = range.start.row; - var len = range.end.row - startRow; - - if (len === 0) { - } else if (delta.action == "removeText" || delta.action == "removeLines") { - var removed = lineWidgets.splice(startRow + 1, len); - removed.forEach(function(w) { - w && this.removeLineWidget(w); - }, this); - this.$updateRows(); - } else { - var args = new Array(len); - args.unshift(startRow, 0); - lineWidgets.splice.apply(lineWidgets, args); - this.$updateRows(); - } - }; - - this.$updateRows = function() { - var lineWidgets = this.session.lineWidgets; - if (!lineWidgets) return; - var noWidgets = true; - lineWidgets.forEach(function(w, i) { - if (w) { - noWidgets = false; - w.row = i; - } - }); - if (noWidgets) - this.session.lineWidgets = null; - }; - - this.addLineWidget = function(w) { - if (!this.session.lineWidgets) - this.session.lineWidgets = new Array(this.session.getLength()); - - this.session.lineWidgets[w.row] = w; - - var renderer = this.editor.renderer; - if (w.html && !w.el) { - w.el = dom.createElement("div"); - w.el.innerHTML = w.html; - } - if (w.el) { - dom.addCssClass(w.el, "ace_lineWidgetContainer"); - w.el.style.position = "absolute"; - w.el.style.zIndex = 5; - renderer.container.appendChild(w.el); - w._inDocument = true; - } - - if (!w.coverGutter) { - w.el.style.zIndex = 3; - } - if (!w.pixelHeight) { - w.pixelHeight = w.el.offsetHeight; - } - if (w.rowCount == null) - w.rowCount = w.pixelHeight / renderer.layerConfig.lineHeight; - - this.session._emit("changeFold", {data:{start:{row: w.row}}}); - - this.$updateRows(); - this.renderWidgets(null, renderer); - return w; - }; - - this.removeLineWidget = function(w) { - w._inDocument = false; - if (w.el && w.el.parentNode) - w.el.parentNode.removeChild(w.el); - if (w.editor && w.editor.destroy) try { - w.editor.destroy(); - } catch(e){} - if (this.session.lineWidgets) - this.session.lineWidgets[w.row] = undefined; - this.session._emit("changeFold", {data:{start:{row: w.row}}}); - this.$updateRows(); - }; - - this.onWidgetChanged = function(w) { - this.session._changedWidgets.push(w); - this.editor && this.editor.renderer.updateFull(); - }; - - this.measureWidgets = function(e, renderer) { - var changedWidgets = this.session._changedWidgets; - var config = renderer.layerConfig; - - if (!changedWidgets || !changedWidgets.length) return; - var min = Infinity; - for (var i = 0; i < changedWidgets.length; i++) { - var w = changedWidgets[i]; - if (!w._inDocument) { - w._inDocument = true; - renderer.container.appendChild(w.el); - } - - w.h = w.el.offsetHeight; - - if (!w.fixedWidth) { - w.w = w.el.offsetWidth; - w.screenWidth = Math.ceil(w.w / config.characterWidth); - } - - var rowCount = w.h / config.lineHeight; - if (w.coverLine) { - rowCount -= this.session.getRowLineCount(w.row); - if (rowCount < 0) - rowCount = 0; - } - if (w.rowCount != rowCount) { - w.rowCount = rowCount; - if (w.row < min) - min = w.row; - } - } - if (min != Infinity) { - this.session._emit("changeFold", {data:{start:{row: min}}}); - this.session.lineWidgetWidth = null; - } - this.session._changedWidgets = []; - }; - - this.renderWidgets = function(e, renderer) { - var config = renderer.layerConfig; - var lineWidgets = this.session.lineWidgets; - if (!lineWidgets) - return; - var first = Math.min(this.firstRow, config.firstRow); - var last = Math.max(this.lastRow, config.lastRow, lineWidgets.length); - - while (first > 0 && !lineWidgets[first]) - first--; - - this.firstRow = config.firstRow; - this.lastRow = config.lastRow; - - renderer.$cursorLayer.config = config; - for (var i = first; i <= last; i++) { - var w = lineWidgets[i]; - if (!w || !w.el) continue; - - if (!w._inDocument) { - w._inDocument = true; - renderer.container.appendChild(w.el); - } - var top = renderer.$cursorLayer.getPixelPosition({row: i, column:0}, true).top; - if (!w.coverLine) - top += config.lineHeight * this.session.getRowLineCount(w.row); - w.el.style.top = top - config.offset + "px"; - - var left = w.coverGutter ? 0 : renderer.gutterWidth; - if (!w.fixedWidth) - left -= renderer.scrollLeft; - w.el.style.left = left + "px"; - - if (w.fixedWidth) { - w.el.style.right = renderer.scrollBar.getWidth() + "px"; - } else { - w.el.style.right = ""; - } - } - }; - -}).call(LineWidgets.prototype); - - -exports.LineWidgets = LineWidgets; - -}); - -define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"], function(require, exports, module) { -"use strict"; -var LineWidgets = require("../line_widgets").LineWidgets; -var dom = require("../lib/dom"); -var Range = require("../range").Range; - -function binarySearch(array, needle, comparator) { - var first = 0; - var last = array.length - 1; - - while (first <= last) { - var mid = (first + last) >> 1; - var c = comparator(needle, array[mid]); - if (c > 0) - first = mid + 1; - else if (c < 0) - last = mid - 1; - else - return mid; - } - return -(first + 1); -} - -function findAnnotations(session, row, dir) { - var annotations = session.getAnnotations().sort(Range.comparePoints); - if (!annotations.length) - return; - - var i = binarySearch(annotations, {row: row, column: -1}, Range.comparePoints); - if (i < 0) - i = -i - 1; - - if (i >= annotations.length - 1) - i = dir > 0 ? 0 : annotations.length - 1; - else if (i === 0 && dir < 0) - i = annotations.length - 1; - - var annotation = annotations[i]; - if (!annotation || !dir) - return; - - if (annotation.row === row) { - do { - annotation = annotations[i += dir]; - } while (annotation && annotation.row === row); - if (!annotation) - return annotations.slice(); - } - - - var matched = []; - row = annotation.row; - do { - matched[dir < 0 ? "unshift" : "push"](annotation); - annotation = annotations[i += dir]; - } while (annotation && annotation.row == row); - return matched.length && matched; -} - -exports.showErrorMarker = function(editor, dir) { - var session = editor.session; - if (!session.widgetManager) { - session.widgetManager = new LineWidgets(session); - session.widgetManager.attach(editor); - } - - var pos = editor.getCursorPosition(); - var row = pos.row; - var oldWidget = session.lineWidgets && session.lineWidgets[row]; - if (oldWidget) { - oldWidget.destroy(); - } else { - row -= dir; - } - var annotations = findAnnotations(session, row, dir); - var gutterAnno; - if (annotations) { - var annotation = annotations[0]; - pos.column = (annotation.pos && typeof annotation.column != "number" - ? annotation.pos.sc - : annotation.column) || 0; - pos.row = annotation.row; - gutterAnno = editor.renderer.$gutterLayer.$annotations[pos.row]; - } else if (oldWidget) { - return; - } else { - gutterAnno = { - text: ["Looks good!"], - className: "ace_ok" - }; - } - editor.session.unfold(pos.row); - editor.selection.moveToPosition(pos); - - var w = { - row: pos.row, - fixedWidth: true, - coverGutter: true, - el: dom.createElement("div") - }; - var el = w.el.appendChild(dom.createElement("div")); - var arrow = w.el.appendChild(dom.createElement("div")); - arrow.className = "error_widget_arrow " + gutterAnno.className; - - var left = editor.renderer.$cursorLayer - .getPixelPosition(pos).left; - arrow.style.left = left + editor.renderer.gutterWidth - 5 + "px"; - - w.el.className = "error_widget_wrapper"; - el.className = "error_widget " + gutterAnno.className; - el.innerHTML = gutterAnno.text.join("
"); - - el.appendChild(dom.createElement("div")); - - var kb = function(_, hashId, keyString) { - if (hashId === 0 && (keyString === "esc" || keyString === "return")) { - w.destroy(); - return {command: "null"}; - } - }; - - w.destroy = function() { - if (editor.$mouseHandler.isMousePressed) - return; - editor.keyBinding.removeKeyboardHandler(kb); - session.widgetManager.removeLineWidget(w); - editor.off("changeSelection", w.destroy); - editor.off("changeSession", w.destroy); - editor.off("mouseup", w.destroy); - editor.off("change", w.destroy); - }; - - editor.keyBinding.addKeyboardHandler(kb); - editor.on("changeSelection", w.destroy); - editor.on("changeSession", w.destroy); - editor.on("mouseup", w.destroy); - editor.on("change", w.destroy); - - editor.session.widgetManager.addLineWidget(w); - - w.el.onmousedown = editor.focus.bind(editor); - - editor.renderer.scrollCursorIntoView(null, 0.5, {bottom: w.el.offsetHeight}); -}; - - -dom.importCssString("\ - .error_widget_wrapper {\ - background: inherit;\ - color: inherit;\ - border:none\ - }\ - .error_widget {\ - border-top: solid 2px;\ - border-bottom: solid 2px;\ - margin: 5px 0;\ - padding: 10px 40px;\ - white-space: pre-wrap;\ - }\ - .error_widget.ace_error, .error_widget_arrow.ace_error{\ - border-color: #ff5a5a\ - }\ - .error_widget.ace_warning, .error_widget_arrow.ace_warning{\ - border-color: #F1D817\ - }\ - .error_widget.ace_info, .error_widget_arrow.ace_info{\ - border-color: #5a5a5a\ - }\ - .error_widget.ace_ok, .error_widget_arrow.ace_ok{\ - border-color: #5aaa5a\ - }\ - .error_widget_arrow {\ - position: absolute;\ - border: solid 5px;\ - border-top-color: transparent!important;\ - border-right-color: transparent!important;\ - border-left-color: transparent!important;\ - top: -5px;\ - }\ -", ""); - -}); - -define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"], function(require, exports, module) { -"use strict"; - -require("./lib/fixoldbrowsers"); - -var dom = require("./lib/dom"); -var event = require("./lib/event"); - -var Editor = require("./editor").Editor; -var EditSession = require("./edit_session").EditSession; -var UndoManager = require("./undomanager").UndoManager; -var Renderer = require("./virtual_renderer").VirtualRenderer; -require("./worker/worker_client"); -require("./keyboard/hash_handler"); -require("./placeholder"); -require("./multi_select"); -require("./mode/folding/fold_mode"); -require("./theme/textmate"); -require("./ext/error_marker"); - -exports.config = require("./config"); -exports.require = require; -exports.edit = function(el) { - if (typeof(el) == "string") { - var _id = el; - el = document.getElementById(_id); - if (!el) - throw new Error("ace.edit can't find div #" + _id); - } - - if (el && el.env && el.env.editor instanceof Editor) - return el.env.editor; - - var value = ""; - if (el && /input|textarea/i.test(el.tagName)) { - var oldNode = el; - value = oldNode.value; - el = dom.createElement("pre"); - oldNode.parentNode.replaceChild(el, oldNode); - } else { - value = dom.getInnerText(el); - el.innerHTML = ''; - } - - var doc = exports.createEditSession(value); - - var editor = new Editor(new Renderer(el)); - editor.setSession(doc); - - var env = { - document: doc, - editor: editor, - onResize: editor.resize.bind(editor, null) - }; - if (oldNode) env.textarea = oldNode; - event.addListener(window, "resize", env.onResize); - editor.on("destroy", function() { - event.removeListener(window, "resize", env.onResize); - env.editor.container.env = null; // prevent memory leak on old ie - }); - editor.container.env = editor.env = env; - return editor; -}; -exports.createEditSession = function(text, mode) { - var doc = new EditSession(text, mode); - doc.setUndoManager(new UndoManager()); - return doc; -} -exports.EditSession = EditSession; -exports.UndoManager = UndoManager; -}); - (function() { - window.require(["ace/ace"], function(a) { - a && a.config.init(true); - if (!window.ace) - window.ace = a; - for (var key in a) if (a.hasOwnProperty(key)) - window.ace[key] = a[key]; - }); - })(); - \ No newline at end of file +!function(){function e(e){var t=function(e,t){return s("",e,t)},o=i;e&&(i[e]||(i[e]={}),o=i[e]),o.define&&o.define.packaged||(n.original=o.define,o.define=n,o.define.packaged=!0),o.require&&o.require.packaged||(s.original=o.require,o.require=t,o.require.packaged=!0)}var t="",i=function(){return this}();if(t||"undefined"==typeof requirejs){var n=function(e,t,i){return"string"!=typeof e?void(n.original?n.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace())):(2==arguments.length&&(i=t),n.modules||(n.modules={},n.payloads={}),n.payloads[e]=i,void(n.modules[e]=null))},s=function(e,t,i){if("[object Array]"===Object.prototype.toString.call(t)){for(var n=[],o=0,a=t.length;o1&&s(l,"")>-1&&(i=RegExp(this.source,o.replace.call(n(this),"g","")),o.replace.call(e.slice(l.index),i,function(){for(var e=1;el.index&&this.lastIndex--}return l},a||(RegExp.prototype.test=function(e){var t=o.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),define("ace/lib/es5-shim",["require","exports","module"],function(e,t,i){function n(){}function s(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(e){}}function o(e){return e=+e,e!==e?e=0:0!==e&&e!==1/0&&e!==-(1/0)&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var i=f.call(arguments,1),s=function(){if(this instanceof s){var n=t.apply(this,i.concat(f.call(arguments)));return Object(n)===n?n:this}return t.apply(e,i.concat(f.call(arguments)))};return t.prototype&&(n.prototype=t.prototype,s.prototype=new n,n.prototype=null),s});var r,a,l,h,c,u=Function.prototype.call,d=Array.prototype,g=Object.prototype,f=d.slice,m=u.bind(g.toString),p=u.bind(g.hasOwnProperty);if((c=p(g,"__defineGetter__"))&&(r=u.bind(g.__defineGetter__),a=u.bind(g.__defineSetter__),l=u.bind(g.__lookupGetter__),h=u.bind(g.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,i=[];if(i.splice.apply(i,e(20)),i.splice.apply(i,e(26)),t=i.length,i.splice(5,0,"XXX"),t+1==i.length,t+1==i.length)return!0}()){var A=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?A.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(f.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var i=this.length;e>0?e>i&&(e=i):void 0==e?e=0:e<0&&(e=Math.max(i+e,0)),e+ta)for(u=h;u--;)this[l+u]=this[a+u];if(o&&e===c)this.length=c,this.push.apply(this,s);else for(this.length=c+o,u=0;u>>0;if("[object Function]"!=m(e))throw new TypeError;for(;++s>>0,s=Array(n),o=arguments[1];if("[object Function]"!=m(e))throw new TypeError(e+" is not a function");for(var r=0;r>>0,o=[],r=arguments[1];if("[object Function]"!=m(e))throw new TypeError(e+" is not a function");for(var a=0;a>>0,s=arguments[1];if("[object Function]"!=m(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0,s=arguments[1];if("[object Function]"!=m(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0;if("[object Function]"!=m(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var s,o=0;if(arguments.length>=2)s=arguments[1];else for(;;){if(o in i){s=i[o++];break}if(++o>=n)throw new TypeError("reduce of empty array with no initial value")}for(;o>>0;if("[object Function]"!=m(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var s,o=n-1;if(arguments.length>=2)s=arguments[1];else for(;;){if(o in i){s=i[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do o in this&&(s=e.call(void 0,s,i[o],o,t));while(o--);return s}),Array.prototype.indexOf&&[0,1].indexOf(1,2)==-1||(Array.prototype.indexOf=function(e){var t=F&&"[object String]"==m(this)?this.split(""):_(this),i=t.length>>>0;if(!i)return-1;var n=0;for(arguments.length>1&&(n=o(arguments[1])),n=n>=0?n:Math.max(0,i+n);n>>0;if(!i)return-1;var n=i-1;for(arguments.length>1&&(n=Math.min(n,o(arguments[1]))),n=n>=0?n:i-Math.abs(n);n>=0;n--)if(n in t&&e===t[n])return n;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:g)}),!Object.getOwnPropertyDescriptor){var v="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError(v+e);if(p(e,t)){var i,n,s;if(i={enumerable:!0,configurable:!0},c){var o=e.__proto__;e.__proto__=g;var n=l(e,t),s=h(e,t);if(e.__proto__=o,n||s)return n&&(i.get=n),s&&(i.set=s),i}return i.value=e[t],i}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),!Object.create){var w;w=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var i;if(null===e)i=w();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var n=function(){};n.prototype=e,i=new n,i.__proto__=e}return void 0!==t&&Object.defineProperties(i,t),i}}if(Object.defineProperty){var E=s({}),$="undefined"==typeof document||s(document.createElement("div"));if(!E||!$)var b=Object.defineProperty}if(!Object.defineProperty||b){var y="Property description must be an object: ",B="Object.defineProperty called on non-object: ",D="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,i){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError(B+e);if("object"!=typeof i&&"function"!=typeof i||null===i)throw new TypeError(y+i);if(b)try{return b.call(Object,e,t,i)}catch(e){}if(p(i,"value"))if(c&&(l(e,t)||h(e,t))){var n=e.__proto__;e.__proto__=g,delete e[t],e[t]=i.value,e.__proto__=n}else e[t]=i.value;else{if(!c)throw new TypeError(D);p(i,"get")&&r(e,t,i.get),p(i,"set")&&a(e,t,i.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var i in t)p(t,i)&&Object.defineProperty(e,i,t[i]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(e){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";p(e,t);)t+="?";e[t]=!0;var i=p(e,t);return delete e[t],i}),!Object.keys){var S=!0,k=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],x=k.length;for(var L in{toString:null})S=!1;Object.keys=function e(t){if("object"!=typeof t&&"function"!=typeof t||null===t)throw new TypeError("Object.keys called on a non-object");var e=[];for(var i in t)p(t,i)&&e.push(i);if(S)for(var n=0,s=x;n=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,t.isOldGecko=t.isGecko&&parseInt((s.match(/rv\:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,t.isAIR=s.indexOf("AdobeAIR")>=0,t.isIPad=s.indexOf("iPad")>=0,t.isTouchPad=s.indexOf("TouchPad")>=0,t.isChromeOS=s.indexOf(" CrOS ")>=0}}),define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,i){"use strict";function n(e,t,i){var n=r(t);if(!o.isMac&&a){if((a[91]||a[92])&&(n|=8),a.altGr){if(3==(3&n))return;a.altGr=0}if(18===i||17===i){var h="location"in t?t.location:t.keyLocation;if(17===i&&1===h)l=t.timeStamp;else if(18===i&&3===n&&2===h){var c=-l;l=t.timeStamp,c+=l,c<3&&(a.altGr=!0)}}}if(i in s.MODIFIER_KEYS){switch(s.MODIFIER_KEYS[i]){case"Alt":n=2;break;case"Shift":n=4;break;case"Ctrl":n=1;break;default:n=8}i=-1}if(8&n&&(91===i||93===i)&&(i=-1),!n&&13===i){var h="location"in t?t.location:t.keyLocation;if(3===h&&(e(t,n,-i),t.defaultPrevented))return}if(o.isChromeOS&&8&n){if(e(t,n,i),t.defaultPrevented)return;n&=-9}return!!(n||i in s.FUNCTION_KEYS||i in s.PRINTABLE_KEYS)&&e(t,n,i)}var s=e("./keys"),o=e("./useragent");t.addListener=function(e,t,i){if(e.addEventListener)return e.addEventListener(t,i,!1);if(e.attachEvent){var n=function(){i.call(e,window.event)};i._wrapper=n,e.attachEvent("on"+t,n)}},t.removeListener=function(e,t,i){return e.removeEventListener?e.removeEventListener(t,i,!1):void(e.detachEvent&&e.detachEvent("on"+t,i._wrapper||i))},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||o.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,i,n){function s(e){i&&i(e),n&&n(e),t.removeListener(document,"mousemove",i,!0),t.removeListener(document,"mouseup",s,!0),t.removeListener(document,"dragstart",s,!0)}return t.addListener(document,"mousemove",i,!0),t.addListener(document,"mouseup",s,!0),t.addListener(document,"dragstart",s,!0),s},t.addMouseWheelListener=function(e,i){"onmousewheel"in e?t.addListener(e,"mousewheel",function(e){var t=8;void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/t,e.wheelY=-e.wheelDeltaY/t):(e.wheelX=0,e.wheelY=-e.wheelDelta/t),i(e)}):"onwheel"in e?t.addListener(e,"wheel",function(e){var t=.35;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=e.deltaX*t||0,e.wheelY=e.deltaY*t||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}i(e)}):t.addListener(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),i(e)})},t.addMultiMouseDownListener=function(e,i,n,s){var r,a,l,h=0,c={2:"dblclick",3:"tripleclick",4:"quadclick"};t.addListener(e,"mousedown",function(e){if(0!==t.getButton(e)?h=0:e.detail>1?(h++,h>4&&(h=1)):h=1,o.isIE){var u=Math.abs(e.clientX-r)>5||Math.abs(e.clientY-a)>5;l&&!u||(h=1),l&&clearTimeout(l),l=setTimeout(function(){l=null},i[h-1]||600),1==h&&(r=e.clientX,a=e.clientY)}if(e._clicks=h,n[s]("mousedown",e),h>4)h=0;else if(h>1)return n[s](c[h],e)}),o.isOldIE&&t.addListener(e,"dblclick",function(e){h=2,l&&clearTimeout(l),l=setTimeout(function(){l=null},i[h-1]||600),n[s]("mousedown",e),n[s](c[h],e)})};var r=!o.isMac||!o.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};t.getModifierString=function(e){return s.KEY_MODS[r(e)]};var a=null,l=0;if(t.addCommandKeyListener=function(e,i){var s=t.addListener;if(o.isOldGecko||o.isOpera&&!("KeyboardEvent"in window)){var r=null;s(e,"keydown",function(e){r=e.keyCode}),s(e,"keypress",function(e){return n(i,e,r)})}else{var l=null;s(e,"keydown",function(e){a[e.keyCode]=!0;var t=n(i,e,e.keyCode);return l=e.defaultPrevented,t}),s(e,"keypress",function(e){l&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),l=null)}),s(e,"keyup",function(e){a[e.keyCode]=null}),a||(a=Object.create(null),s(window,"focus",function(e){a=Object.create(null)}))}},window.postMessage&&!o.isOldIE){var h=1;t.nextTick=function(e,i){i=i||window;var n="zero-timeout-message-"+h;t.addListener(i,"message",function s(o){o.data==n&&(t.stopPropagation(o),t.removeListener(i,"message",s),e())}),i.postMessage(n,"*")}}t.nextFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame,t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),define("ace/lib/lang",["require","exports","module"],function(e,t,i){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var i="";t>0;)1&t&&(i+=e),(t>>=1)&&(e+=e);return i};var n=/^\s\s*/,s=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(s,"")},t.copyObject=function(e){var t={};for(var i in e)t[i]=e[i];return t},t.copyArray=function(e){for(var t=[],i=0,n=e.length;i1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;i.$blockScrolling++,this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(e):t||i.selection.moveToPosition(e),t||this.select(),i.renderer.scroller.setCapture&&i.renderer.scroller.setCapture(),i.setStyle("ace_selecting"),this.setState("select"),i.$blockScrolling--},this.select=function(){var e,t=this.editor,i=t.renderer.screenToTextCoordinates(this.x,this.y);if(t.$blockScrolling++,this.$clickSelection){var n=this.$clickSelection.comparePoint(i);if(n==-1)e=this.$clickSelection.end;else if(1==n)e=this.$clickSelection.start;else{var s=o(this.$clickSelection,i);i=s.cursor,e=s.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(i),t.$blockScrolling--,t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,i=this.editor,n=i.renderer.screenToTextCoordinates(this.x,this.y),s=i.selection[e](n.row,n.column);if(i.$blockScrolling++,this.$clickSelection){var r=this.$clickSelection.comparePoint(s.start),a=this.$clickSelection.comparePoint(s.end);if(r==-1&&a<=0)t=this.$clickSelection.end,s.end.row==n.row&&s.end.column==n.column||(n=s.start);else if(1==a&&r>=0)t=this.$clickSelection.start,s.start.row==n.row&&s.start.column==n.column||(n=s.end);else if(r==-1&&1==a)n=s.end,t=s.start;else{var l=o(this.$clickSelection,n);n=l.cursor,t=l.anchor}i.selection.setSelectionAnchor(t.row,t.column)}i.selection.selectToPosition(n),i.$blockScrolling--,i.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>r||t-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),i=this.editor,n=i.session,s=n.getBracketRange(t);s?(s.isEmpty()&&(s.start.column--,s.end.column++),this.setState("select")):(s=i.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=s,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var n=i.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=i.selection.getLineRange(n.start.row),this.$clickSelection.end=i.selection.getLineRange(n.end.row).end):this.$clickSelection=i.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=e.domEvent.timeStamp,i=t-(this.$lastScrollTime||0),n=this.editor,s=n.renderer.isScrollableBy(e.wheelX*e.speed,e.wheelY*e.speed);return s||i<200?(this.$lastScrollTime=t,n.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(n.prototype),t.DefaultHandlers=n}),define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,i){"use strict";function n(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}var s=(e("./lib/oop"),e("./lib/dom"));(function(){this.$init=function(){return this.$element=s.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){s.setInnerText(this.getElement(),e)},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){s.addCssClass(this.getElement(),e)},this.show=function(e,t,i){null!=e&&this.setText(e),null!=t&&null!=i&&this.setPosition(t,i),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth}}).call(n.prototype),t.Tooltip=n}),define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,i){"use strict";function n(e){function t(){var t=u.getDocumentPosition().row,s=l.$annotations[t];if(!s)return i();var o=r.session.getLength();if(t==o){var a=r.renderer.pixelToScreenCoordinates(0,u.y).row,c=u.$pos;if(a>r.session.documentToScreenRow(c.row,c.column))return i()}if(d!=s)if(d=s.text.join("
"),h.setHtml(d),h.show(),r.on("mousewheel",i),e.$tooltipFollowsMouse)n(u);else{var g=l.$cells[r.session.documentToScreenRow(t,0)].element,f=g.getBoundingClientRect(),m=h.getElement().style;m.left=f.right+"px",m.top=f.bottom+"px"}}function i(){c&&(c=clearTimeout(c)),d&&(h.hide(),d=null,r.removeEventListener("mousewheel",i))}function n(e){h.setPosition(e.x,e.y)}var r=e.editor,l=r.renderer.$gutterLayer,h=new s(r.container);e.editor.setDefaultHandler("guttermousedown",function(t){if(r.isFocused()&&0==t.getButton()){var i=l.getRegion(t);if("foldWidgets"!=i){var n=t.getDocumentPosition().row,s=r.session.selection;if(t.getShiftKey())s.selectTo(n,0);else{if(2==t.domEvent.detail)return r.selectAll(),t.preventDefault();e.$clickSelection=r.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}});var c,u,d;e.editor.setDefaultHandler("guttermousemove",function(s){var r=s.domEvent.target||s.domEvent.srcElement;return o.hasCssClass(r,"ace_fold-widget")?i():(d&&e.$tooltipFollowsMouse&&n(s),u=s,void(c||(c=setTimeout(function(){c=null,u&&!e.isMousePressed?t():i()},50))))}),a.addListener(r.renderer.$gutter,"mouseout",function(e){u=null,d&&!c&&(c=setTimeout(function(){c=null,i()},50))}),r.on("changeSession",i)}function s(e){l.call(this,e)}var o=e("../lib/dom"),r=e("../lib/oop"),a=e("../lib/event"),l=e("../tooltip").Tooltip;r.inherits(s,l),function(){this.setPosition=function(e,t){var i=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,s=this.getWidth(),o=this.getHeight();e+=15,t+=15,e+s>i&&(e-=e+s-i),t+o>n&&(t-=20+o),l.prototype.setPosition.call(this,e,t)}}.call(s.prototype),t.GutterHandler=n}),define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var i=this.getDocumentPosition();this.$inSelection=t.contains(i.row,i.column)}return this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=s.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)}),define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";function n(e){function t(e,t){var i=Date.now(),n=!t||e.row!=t.row,o=!t||e.column!=t.column;if(!S||n||o)p.$blockScrolling+=1,p.moveCursorToPosition(e),p.$blockScrolling-=1,S=i,k={x:v,y:w};else{var r=s(k.x,k.y,v,w);r>c?S=null:i-S>=h&&(p.renderer.scrollCursorIntoView(),S=null)}}function i(e,t){var i=Date.now(),n=p.renderer.layerConfig.lineHeight,s=p.renderer.layerConfig.characterWidth,o=p.renderer.scroller.getBoundingClientRect(),r={x:{left:v-o.left,right:o.right-v},y:{top:w-o.top,bottom:o.bottom-w}},a=Math.min(r.x.left,r.x.right),h=Math.min(r.y.top,r.y.bottom),c={row:e.row,column:e.column};a/s<=2&&(c.column+=r.x.left=l&&p.renderer.scrollCursorIntoView(c):D=i:D=null}function n(){var e=b;b=p.renderer.screenToTextCoordinates(v,w),t(b,e),i(b,e)}function u(){$=p.selection.toOrientedRange(),F=p.session.addMarker($,"ace_selection",p.getSelectionStyle()),p.clearSelection(),p.isFocused()&&p.renderer.$cursorLayer.setBlinking(!1),clearInterval(E),n(),E=setInterval(n,20),L=0,r.addListener(document,"mousemove",g)}function d(){clearInterval(E),p.session.removeMarker(F),F=null,p.$blockScrolling+=1,p.selection.fromOrientedRange($),p.$blockScrolling-=1,p.isFocused()&&!B&&p.renderer.$cursorLayer.setBlinking(!p.getReadOnly()),$=null,b=null,L=0,D=null,S=null,r.removeListener(document,"mousemove",g)}function g(){null==R&&(R=setTimeout(function(){null!=R&&F&&d()},20))}function f(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function m(e){var t=["copy","copymove","all","uninitialized"],i=["move","copymove","linkmove","all","uninitialized"],n=a.isMac?e.altKey:e.ctrlKey,s="uninitialized";try{s=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return n&&t.indexOf(s)>=0?o="copy":i.indexOf(s)>=0?o="move":t.indexOf(s)>=0&&(o="copy"),o}var p=e.editor,A=o.createElement("img");A.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",a.isOpera&&(A.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var C=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];C.forEach(function(t){e[t]=this[t]},this),p.addEventListener("mousedown",this.onMouseDown.bind(e));var F,v,w,E,$,b,y,B,D,S,k,x=p.container,L=0;this.onDragStart=function(e){if(this.cancelDrag||!x.draggable){var t=this;return setTimeout(function(){t.startSelect(),t.captureMouse(e)},0),e.preventDefault()}$=p.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=p.getReadOnly()?"copy":"copyMove",a.isOpera&&(p.container.appendChild(A),A.scrollTop=0),i.setDragImage&&i.setDragImage(A,0,0),a.isOpera&&p.container.removeChild(A),i.clearData(),i.setData("Text",p.session.getTextRange()),B=!0,this.setState("drag")},this.onDragEnd=function(e){if(x.draggable=!1,B=!1,this.setState(null),!p.getReadOnly()){var t=e.dataTransfer.dropEffect;y||"move"!=t||p.session.remove(p.getSelectionRange()),p.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!p.getReadOnly()&&f(e.dataTransfer))return v=e.clientX,w=e.clientY,F||u(),L++,e.dataTransfer.dropEffect=y=m(e),r.preventDefault(e)},this.onDragOver=function(e){if(!p.getReadOnly()&&f(e.dataTransfer))return v=e.clientX,w=e.clientY,F||(u(),L++),null!==R&&(R=null),e.dataTransfer.dropEffect=y=m(e),r.preventDefault(e)},this.onDragLeave=function(e){if(L--,L<=0&&F)return d(),y=null,r.preventDefault(e)},this.onDrop=function(e){if(b){var t=e.dataTransfer;if(B)switch(y){case"move":$=$.contains(b.row,b.column)?{start:b,end:b}:p.moveText($,b);break;case"copy":$=p.moveText($,b,!0)}else{var i=t.getData("Text");$={start:b,end:p.session.insert(b,i)},p.focus(),y=null}return d(),r.preventDefault(e)}},r.addListener(x,"dragstart",this.onDragStart.bind(e)),r.addListener(x,"dragend",this.onDragEnd.bind(e)),r.addListener(x,"dragenter",this.onDragEnter.bind(e)),r.addListener(x,"dragover",this.onDragOver.bind(e)),r.addListener(x,"dragleave",this.onDragLeave.bind(e)),r.addListener(x,"drop",this.onDrop.bind(e));var R=null}function s(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}var o=e("../lib/dom"),r=e("../lib/event"),a=e("../lib/useragent"),l=200,h=200,c=5;(function(){this.dragWait=function(){var e=Date.now()-this.mousedownEvent.time;e>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var e=this.editor.container;e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor,t=e.container;t.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var i=a.isWin?"default":"move";e.renderer.setCursorStyle(i),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(a.isIE&&"dragReady"==this.state){var i=s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>3&&t.dragDrop()}if("dragWait"===this.state){var i=s(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,i=e.inSelection(),n=e.getButton(),s=e.domEvent.detail||1;if(1===s&&0===n&&i){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in o&&(o.unselectable="on"),t.getDragDelay()){if(a.isWebKit){this.cancelDrag=!0;var r=t.container;r.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(n.prototype),t.DragdropHandler=n}),define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";var n=e("./dom");t.get=function(e,t){var i=new XMLHttpRequest;i.open("GET",e,!0),i.onreadystatechange=function(){4===i.readyState&&t(i.responseText)},i.send(null)},t.loadScript=function(e,t){var i=n.getDocumentHead(),s=document.createElement("script");s.src=e,i.appendChild(s),s.onload=s.onreadystatechange=function(e,i){!i&&s.readyState&&"loaded"!=s.readyState&&"complete"!=s.readyState||(s=s.onload=s.onreadystatechange=null,i||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),define("ace/lib/event_emitter",["require","exports","module"],function(e,t,i){"use strict";var n={},s=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};n._emit=n._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[e]||[],n=this._defaultHandlers[e];if(i.length||n){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=s),t.preventDefault||(t.preventDefault=o),i=i.slice();for(var r=0;r1&&(s=i[i.length-2]);var r=h[t+"Path"];return null==r?r=h.basePath:"/"==n&&(t=n=""),r&&"/"!=r.slice(-1)&&(r+="/"),r+t+n+s+this.get("suffix")},t.setModuleUrl=function(e,t){return h.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(i,n){var s,o;Array.isArray(i)&&(o=i[0],i=i[1]);try{s=e(i)}catch(e){}if(s&&!t.$loading[i])return n&&n(s);if(t.$loading[i]||(t.$loading[i]=[]),t.$loading[i].push(n),!(t.$loading[i].length>1)){var a=function(){e([i],function(e){t._emit("load.module",{name:i,module:e});var n=t.$loading[i];t.$loading[i]=null,n.forEach(function(t){t&&t(e)})})};return t.get("packaged")?void r.loadScript(t.moduleUrl(i,o),a):a()}},n(!0),t.init=n}),define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(e,t,i){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,r=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,h=e("../config"),c=function(e){var t=this;this.editor=e,new o(this),new r(this),new l(this);var i=function(t){document.hasFocus&&document.hasFocus()||window.focus(),e.focus()},a=e.renderer.getMouseEventTarget();n.addListener(a,"click",this.onMouseEvent.bind(this,"click")),n.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove")),n.addMultiMouseDownListener(a,[400,300,250],this,"onMouseEvent"),e.renderer.scrollBarV&&(n.addMultiMouseDownListener(e.renderer.scrollBarV.inner,[400,300,250],this,"onMouseEvent"),n.addMultiMouseDownListener(e.renderer.scrollBarH.inner,[400,300,250],this,"onMouseEvent"),s.isIE&&(n.addListener(e.renderer.scrollBarV.element,"mousedown",i),n.addListener(e.renderer.scrollBarH.element,"mousedown",i))),n.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"));var h=e.renderer.$gutter;n.addListener(h,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),n.addListener(h,"click",this.onMouseEvent.bind(this,"gutterclick")),n.addListener(h,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),n.addListener(h,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),n.addListener(a,"mousedown",i),n.addListener(h,"mousedown",function(t){return e.focus(),n.preventDefault(t)}),e.on("mousemove",function(i){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var n=e.renderer.screenToTextCoordinates(i.x,i.y),s=e.session.selection.getRange(),o=e.renderer;!s.isEmpty()&&s.insideStart(n.row,n.column)?o.setCursorStyle("default"):o.setCursorStyle("")}})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new a(t,this.editor))},this.onMouseMove=function(e,t){var i=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;i&&i.length&&this.editor._emit(e,new a(t,this.editor))},this.onMouseWheel=function(e,t){var i=new a(t,this.editor);i.speed=2*this.$scrollSpeed,i.wheelX=t.wheelX,i.wheelY=t.wheelY,this.editor._emit(e,i)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var i=this.editor.renderer;i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=null);var o=this,r=function(e){if(e){if(s.isWebKit&&!e.which&&o.releaseMouse)return o.releaseMouse();o.x=e.clientX,o.y=e.clientY,t&&t(e),o.mouseEvent=new a(e,o.editor),o.$mouseMoved=!0}},l=function(e){clearInterval(c),h(),o[o.state+"End"]&&o[o.state+"End"](e),o.state="",null==i.$keepTextAreaAtCursor&&(i.$keepTextAreaAtCursor=!0,i.$moveTextAreaToCursor()),o.isMousePressed=!1,o.$onCaptureMouseMove=o.releaseMouse=null,e&&o.onMouseEvent("mouseup",e)},h=function(){o[o.state]&&o[o.state](),o.$mouseMoved=!1};if(s.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){l(e)});o.$onCaptureMouseMove=r,o.releaseMouse=n.capture(this.editor.container,r,l);var c=setInterval(h,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&n.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(c.prototype),h.defineOptions(c.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:s.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=c}),define("ace/mouse/fold_handler",["require","exports","module"],function(e,t,i){"use strict";function n(e){e.on("click",function(t){var i=t.getDocumentPosition(),n=e.session,s=n.getFoldAt(i.row,i.column,1);s&&(t.getAccelKey()?n.removeFold(s):n.expandFold(s),t.stop())}),e.on("gutterclick",function(t){var i=e.renderer.$gutterLayer.getRegion(t);if("foldWidgets"==i){var n=t.getDocumentPosition().row,s=e.session;s.foldWidgets&&s.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){var i=e.renderer.$gutterLayer.getRegion(t);if("foldWidgets"==i){var n=t.getDocumentPosition().row,s=e.session,o=s.getParentFoldRangeData(n,!0),r=o.range||o.firstRange;if(r){n=r.start.row;var a=s.getFoldAt(n,s.getLine(n).length,1);a?s.removeFold(a):(s.addFold("...",r),e.renderer.scrollCursorIntoView({row:r.start.row,column:0}))}t.stop()}})}t.FoldHandler=n}),define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,i){"use strict";var n=e("../lib/keys"),s=e("../lib/event"),o=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var i=this.$handlers.indexOf(e);i!=-1&&this.$handlers.splice(i,1),void 0==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),i==-1&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return t!=-1&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(i){return i.getStatusText&&i.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,i,n){for(var o,r=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&(o=this.$handlers[l].handleKeyboard(this.$data,e,t,i,n),!(o&&o.command&&(r="null"==o.command||a.exec(o.command,this.$editor,o.args,n),r&&n&&e!=-1&&1!=o.passEvent&&1!=o.command.passEvent&&s.stopEvent(n),r))););return r},this.onCommandKey=function(e,t,i){var s=n.keyCodeToString(i);this.$callKeyboardHandlers(t,s,i,e)},this.onTextInput=function(e){var t=this.$callKeyboardHandlers(-1,e);t||this.$editor.commands.exec("insertstring",this.$editor,e)}}).call(o.prototype),t.KeyBinding=o}),define("ace/range",["require","exports","module"],function(e,t,i){"use strict";var n=function(e,t){return e.row-t.row||e.column-t.column},s=function(e,t,i,n){this.start={row:e,column:t},this.end={row:i,column:n}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,i=e.end,n=e.start;return t=this.compare(i.row,i.column),1==t?(t=this.compare(n.row,n.column),1==t?2:0==t?1:0):t==-1?-2:(t=this.compare(n.row,n.column),t==-1?-1:1==t?42:0)},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return t==-1||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var i={row:t+1,column:0};else if(this.end.rowt)var n={row:t+1,column:0};else if(this.start.rowt.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.isEmpty()?r.fromPoints(t,t):this.isBackwards()?r.fromPoints(t,e):r.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var e=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(e,this.doc.getLine(e).length)},this.setRange=this.setSelectionRange=function(e,t){t?(this.setSelectionAnchor(e.end.row,e.end.column),this.selectTo(e.start.row,e.start.column)):(this.setSelectionAnchor(e.start.row,e.start.column),this.selectTo(e.end.row,e.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if("undefined"==typeof t){var i=e||this.lead;e=i.row,t=i.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var i,n="number"==typeof e?e:this.lead.row,s=this.session.getFoldLine(n);return s?(n=s.start.row,i=s.end.row):i=n,t===!0?new r(n,0,i,this.session.getLine(i).length):new r(n,0,i+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var i=this.session.getTabSize();this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(t.column-i,t.column).split(" ").length-1==i?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=n)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e,t=this.lead.row,i=this.lead.column,n=this.doc.getLine(t),s=n.substring(i);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(t,i,1);return o?void this.moveCursorTo(o.end.row,o.end.column):((e=this.session.nonTokenRe.exec(s))&&(i+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,s=n.substring(i)),i>=n.length?(this.moveCursorTo(t,n.length),this.moveCursorRight(),void(t0&&this.moveCursorWordLeft())):((o=this.session.tokenRe.exec(r))&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),void this.moveCursorTo(t,i))},this.$shortWordEndIndex=function(e){var t,i,n=0,s=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,t=this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(i=e[n])&&s.test(i);)n++;if(n<1)for(o.lastIndex=0;(i=e[n])&&!o.test(i);)if(o.lastIndex=0,n++,s.test(i)){if(n>2){n--;break}for(;(i=e[n])&&s.test(i);)n++;if(n>2)break}}return o.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t),s=this.session.getFoldAt(e,t,1);if(s)return this.moveCursorTo(s.end.row,s.end.column);if(t==i.length){var o=this.doc.getLength();do e++,n=this.doc.getLine(e);while(e0&&/^\s*$/.test(n));i=n.length,/\s+$/.test(n)||(n="")}var o=s.stringReverse(n),r=this.$shortWordEndIndex(o);return this.moveCursorTo(t,i-r)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column);var n=this.session.screenToDocumentPosition(i.row+e,i.column);0!==e&&0===t&&n.row===this.lead.row&&n.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[n.row]&&n.row++,this.moveCursorTo(n.row,n.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,i){var n=this.session.getFoldAt(e,t,1);n&&(e=n.start.row,t=n.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,i){var n=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(n.row,n.column,i)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e.call(null,this);var i=this.getCursor();return r.fromPoints(t,i)}catch(e){return r.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else{var e=this.getRange();e.isBackwards=this.isBackwards()}return e},this.fromJSON=function(e){if(void 0==e.start){if(this.rangeList){this.toSingleRange(e[0]);for(var t=e.length;t--;){var i=r.fromPoints(e[t].start,e[t].end);e.isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(a.prototype),t.Selection=a}),define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,i){"use strict";var n=e("./config"),s=2e3,o=function(e){this.states=e,this.regExps={},this.matchMappings={};for(var t in this.states){for(var i=this.states[t],n=[],s=0,o=this.matchMappings[t]={defaultToken:"text"},r="g",a=[],l=0;l1?h.onMatch=this.$applyToken:h.onMatch=h.token),u>1&&(/\\\d/.test(h.regex)?c=h.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+s+1)}):(u=1,c=this.removeCapturingGroups(h.regex)),h.splitRegex||"string"==typeof h.token||a.push(h)),o[s]=l,s+=u,n.push(c),h.onMatch||(h.onMatch=null)}}n.length||(o[0]=0,n.push("$")),a.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,r)},this),this.regExps[t]=new RegExp("("+n.join(")|(")+")|($)",r)}};(function(){this.$setMaxTokenCount=function(e){s=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),i=this.token.apply(this,t);if("string"==typeof i)return[{type:i,value:e}];for(var n=[],s=0,o=i.length;sc){var A=e.substring(c,p-m.length);d.type==g?d.value+=A:(d.type&&h.push(d),d={type:g,value:A})}for(var C=0;Cs){for(u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});c1&&i[0]!==n&&i.unshift("#tmp",n),{tokens:h,state:i.length?i:n}},this.reportError=n.reportError}).call(o.prototype),t.Tokenizer=o}),define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,i){"use strict";var n=e("../lib/lang"),s=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var i in e){for(var n=e[i],s=0;s=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,i=e[t].start;if(void 0!==i)return i;for(i=0;t>0;)t-=1,i+=e[t].value.length;return i}}).call(n.prototype),t.TokenIterator=n}),define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,i){"use strict";var n=e("../tokenizer").Tokenizer,s=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour").Behaviour,r=e("../unicode"),a=e("../lib/lang"),l=e("../token_iterator").TokenIterator,h=e("../range").Range,c=function(){this.HighlightRules=s,this.$behaviour=new o};(function(){this.tokenRe=new RegExp("^["+r.packages.L+r.packages.Mn+r.packages.Mc+r.packages.Nd+r.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+r.packages.L+r.packages.Mn+r.packages.Mc+r.packages.Nd+r.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules,this.$tokenizer=new n(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,i,n){function s(e){for(var t=i;t<=n;t++)e(o.getLine(t),t)}var o=t.doc,r=!0,l=!0,h=1/0,c=t.getTabSize(),u=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var d=this.lineCommentStart.map(a.escapeRegExp).join("|"),g=this.lineCommentStart[0];else var d=a.escapeRegExp(this.lineCommentStart),g=this.lineCommentStart;d=new RegExp("^(\\s*)(?:"+d+") ?"),u=t.getUseSoftTabs();var f=function(e,t){var i=e.match(d);if(i){var n=i[1].length,s=i[0].length;C(e,n,s)||" "!=i[0][s-1]||s--,o.removeInLine(t,n,s)}},m=g+" ",p=function(e,t){r&&!/\S/.test(e)||(C(e,h,h)?o.insertInLine({row:t,column:h},m):o.insertInLine({row:t,column:h},g))},A=function(e,t){return d.test(e)},C=function(e,t,i){for(var n=0;t--&&" "==e.charAt(t);)n++;if(n%c!=0)return!1;for(var n=0;" "==e.charAt(i++);)n++;return c>2?n%c!=c-1:n%c==0}}else{if(!this.blockComment)return!1;var g=this.blockComment.start,F=this.blockComment.end,d=new RegExp("^(\\s*)(?:"+a.escapeRegExp(g)+")"),v=new RegExp("(?:"+a.escapeRegExp(F)+")\\s*$"),p=function(e,t){A(e,t)||r&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},F),o.insertInLine({row:t,column:h},g))},f=function(e,t){var i;(i=e.match(v))&&o.removeInLine(t,e.length-i[0].length,e.length),(i=e.match(d))&&o.removeInLine(t,i[1].length,i[0].length)},A=function(e,i){if(d.test(e))return!0;for(var n=t.getTokens(i),s=0;se.length&&(w=e.length)}),h==1/0&&(h=w,r=!1,l=!1),u&&h%c!=0&&(h=Math.floor(h/c)*c),s(l?f:p)},this.toggleBlockComment=function(e,t,i,n){var s=this.blockComment;if(s){!s.start&&s[0]&&(s=s[0]);var o,r,a=new l(t,n.row,n.column),c=a.getCurrentToken(),u=(t.selection,t.selection.toOrientedRange());if(c&&/comment/.test(c.type)){for(var d,g;c&&/comment/.test(c.type);){var f=c.value.indexOf(s.start);if(f!=-1){var m=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn()+f;d=new h(m,p,m,p+s.start.length);break}c=a.stepBackward()}for(var a=new l(t,n.row,n.column),c=a.getCurrentToken();c&&/comment/.test(c.type);){var f=c.value.indexOf(s.end);if(f!=-1){var m=a.getCurrentTokenRow(),p=a.getCurrentTokenColumn()+f;g=new h(m,p,m,p+s.end.length);break}c=a.stepForward()}g&&t.remove(g),d&&(t.remove(d),o=d.start.row,r=-s.start.length)}else r=s.start.length,o=i.start.row,t.insert(i.end,s.end),t.insert(i.start,s.start);u.start.row==o&&(u.start.column+=r),u.end.row==o&&(u.end.column+=r),t.selection.fromOrientedRange(u)}},this.getNextLineIndent=function(e,t,i){return this.$getIndent(t)},this.checkOutdent=function(e,t,i){return!1},this.autoOutdent=function(e,t,i){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var t in e)e[t]&&(this.$embeds.push(t),this.$modes[t]=new e[t]);for(var i=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],t=0;tthis.row||i.start.row==this.row&&i.start.column>this.column)){var n=this.row,s=this.column,o=i.start,r=i.end;"insertText"===t.action?o.row===n&&o.column<=s?o.column===s&&this.$insertRight||(o.row===r.row?s+=r.column-o.column:(s-=o.column,n+=r.row-o.row)):o.row!==r.row&&o.row=s?o.column:Math.max(0,s-(r.column-o.column)):o.row!==r.row&&o.row=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):e<0?(i.row=0,i.column=0):(i.row=e,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,t))),t<0&&(i.column=0),i}}).call(o.prototype)}),define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,r=e("./anchor").Anchor,a=function(e){this.$lines=[],0===e.length?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){n.implement(this,s),this.setValue=function(e){var t=this.getLength();this.remove(new o(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new r(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.getLine(e.start.row).substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var i=t.length-1;return e.end.row-e.start.row==i&&(t[i]=t[i].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||0===t.length)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var i=this.$split(t),n=i.splice(0,1)[0],s=0==i.length?null:i.splice(i.length-1,1)[0];return e=this.insertInLine(e,n),null!==s&&(e=this.insertNewLine(e),e=this._insertLines(e.row,i),e=this.insertInLine(e,s||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(0==t.length)return{row:e,column:0};for(;t.length>61440;){var i=this._insertLines(e,t.slice(0,61440));t=t.slice(61440),e=i.row}var n=[e,0];n.push.apply(n,t),this.$lines.splice.apply(this.$lines,n);var s=new o(e,0,e+t.length,0),r={action:"insertLines",range:s,lines:t};return this._signal("change",{data:r}),s.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var i={row:e.row+1,column:0},n={action:"insertText",range:o.fromPoints(e,i),text:this.getNewLineCharacter()};return this._signal("change",{data:n}),i},this.insertInLine=function(e,t){if(0==t.length)return e;var i=this.$lines[e.row]||"";this.$lines[e.row]=i.substring(0,e.column)+t+i.substring(e.column);var n={row:e.row,column:e.column+t.length},s={action:"insertText",range:o.fromPoints(e,n),text:t};return this._signal("change",{data:s}),n},this.remove=function(e){if(e instanceof o||(e=o.fromPoints(e.start,e.end)),e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end),e.isEmpty())return e.start;var t=e.start.row,i=e.end.row;if(e.isMultiLine()){var n=0==e.start.column?t:t+1,s=i-1;e.end.column>0&&this.removeInLine(i,0,e.end.column),s>=n&&this._removeLines(n,s),n!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,i){if(t!=i){var n=new o(e,t,e,i),s=this.getLine(e),r=s.substring(t,i),a=s.substring(0,t)+s.substring(i,s.length);this.$lines.splice(e,1,a);var l={action:"removeText",range:n,text:r};return this._signal("change",{data:l}),n.start}},this.removeLines=function(e,t){return e<0||t>=this.getLength()?this.remove(new o(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var i=new o(e,0,t+1,0),n=this.$lines.splice(e,t-e+1),s={action:"removeLines",range:i,nl:this.getNewLineCharacter(),lines:n};return this._signal("change",{data:s}),n},this.removeNewLine=function(e){var t=this.getLine(e),i=this.getLine(e+1),n=new o(e,t.length,e+1,0),s=t+i;this.$lines.splice(e,2,s);var r={action:"removeText",range:n,text:this.getNewLineCharacter()};this._signal("change",{data:r})},this.replace=function(e,t){if(e instanceof o||(e=o.fromPoints(e.start,e.end)),0==t.length&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;if(this.remove(e),t)var i=this.insert(e.start,t);else i=e.start;return i},this.applyDeltas=function(e){for(var t=0;t=0;t--){var i=e[t],n=o.fromPoints(i.range.start,i.range.end);"insertLines"==i.action?this._removeLines(n.start.row,n.end.row-1):"insertText"==i.action?this.remove(n):"removeLines"==i.action?this._insertLines(n.start.row,i.lines):"removeText"==i.action&&this.insert(n.start,i.text)}},this.indexToPosition=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,s=t||0,o=i.length;s20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,o<=n&&i.fireUpdateEvent(o,n)}}};(function(){n.implement(this,s),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var i={first:e,last:t};this._signal("update",{data:i})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.range,i=t.start.row,n=t.end.row-i;if(0===n)this.lines[i]=null;else if("removeText"==e.action||"removeLines"==e.action)this.lines.splice(i,n+1,null),this.states.splice(i,n+1,null);else{var s=Array(n+1);s.unshift(i,1),this.lines.splice.apply(this.lines,s),this.states.splice.apply(this.states,s)}this.currentLine=Math.min(i,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),i=this.states[e-1],n=this.tokenizer.getLineTokens(t,i,e);return this.states[e]+""!=n.state+""?(this.states[e]=n.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=n.tokens}}).call(o.prototype),t.BackgroundTokenizer=o}),define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,i){"use strict";var n=e("./lib/lang"),s=(e("./lib/oop"),e("./range").Range),o=function(e,t,i){this.setRegexp(e),this.clazz=t,this.type=i||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,i,o){if(this.regExp)for(var r=o.firstRow,a=o.lastRow,l=r;l<=a;l++){var h=this.cache[l];null==h&&(h=n.getMatchOffsets(i.getLine(l),this.regExp),h.length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES)),h=h.map(function(e){return new s(l,e.offset,l,e.offset+e.length)}),this.cache[l]=h.length?h:"");for(var c=h.length;c--;)t.drawSingleLineMarker(e,h[c].toScreenRange(i),this.clazz,o)}}}).call(o.prototype),t.SearchHighlight=o}),define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,i){"use strict";function n(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var i=t[t.length-1];this.range=new s(t[0].start.row,t[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var s=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,i){var n,s,o,r=0,a=this.folds,l=!0;null==t&&(t=this.end.row,i=this.end.column);for(var h=0;h0)){var l=s(e,r.start);return 0===a?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),i=this.pointIndex(e.start,t);i<0&&(i=-i-1);var n=this.pointIndex(e.end,t,i);return n<0?n=-n-1:n++,this.ranges.splice(i,n-i,e)},this.addList=function(e){for(var t=[],i=e.length;i--;)t.push.call(t,this.add(e[i]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){var e=[],t=this.ranges;t=t.sort(function(e,t){return s(e.start,t.start)});for(var i,n=t[0],o=1;o=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var i=this.ranges;if(i[0].start.row>t||i[i.length-1].start.rows)break;if(u.start.row==s&&u.start.column>=i.column&&(u.start.column==i.column&&this.$insertRight||(u.start.column+=a,u.start.row+=r)),u.end.row==s&&u.end.column>=i.column){if(u.end.column==i.column&&this.$insertRight)continue;u.end.column==i.column&&a>0&&hu.start.column&&u.end.column==l[h+1].start.column&&(u.end.column-=a),u.end.column+=a,u.end.row+=r}}}if(0!=r&&h=e)return s;if(s.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var i=this.$foldData,n=0;for(t&&(n=i.indexOf(t)),n==-1&&(n=0),n;n=e)return s}return null},this.getFoldedRowCount=function(e,t){for(var i=this.$foldData,n=t-e+1,s=0;s=t){a=e?n-=t-a:n=0);break}r>=e&&(n-=a>=e?r-a:r-e+1)}return n},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var i,n=this.$foldData,s=!1;e instanceof r?i=e:(i=new r(t,e),i.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(i.range);var a=i.start.row,l=i.start.column,h=i.end.row,c=i.end.column;if(!(a0&&(this.removeFolds(g),g.forEach(function(e){i.addSubFold(e)}));for(var f=0;f0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var i,n;if(null==e?(i=new s(0,0,this.getLength(),0),t=!0):i="number"==typeof e?new s(e,0,e,this.getLine(e).length):"row"in e?s.fromPoints(e,e):e,n=this.getFoldsInRangeList(i),t)this.removeFolds(n);else for(var o=n;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(i);if(n.length)return n},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var i=this.getFoldLine(e,t);return i?i.end.row:e},this.getRowFoldStart=function(e,t){var i=this.getFoldLine(e,t);return i?i.start.row:e},this.getFoldDisplayLine=function(e,t,i,n,s){null==n&&(n=e.start.row),null==s&&(s=0),null==t&&(t=e.end.row),null==i&&(i=this.getLine(t).length);var o=this.doc,r="";return e.walk(function(e,t,i,a){if(!(t=e){s=o.end.row;try{var r=this.addFold("...",o);r&&(r.collapseChildren=i)}catch(e){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){if(this.$foldMode!=e){if(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._emit("changeAnnotation"),!e||"manual"==this.$foldStyle)return void(this.foldWidgets=null);this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(e,t){var i=this.foldWidgets;if(!i||t&&i[e])return{};for(var n,s=e-1;s>=0;){var o=i[s];if(null==o&&(o=i[s]=this.getFoldWidget(s)),"start"==o){var r=this.getFoldWidgetRange(s);if(n||(n=r),r&&r.end.row>=e)break}s--}return{range:s!==-1&&r,firstRange:n}},this.onFoldWidgetClick=function(e,t){t=t.domEvent;var i={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey},n=this.$toggleFoldWidget(e,i);if(!n){var s=t.target||t.srcElement;s&&/ace_fold-widget/.test(s.className)&&(s.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var i=this.getFoldWidget(e),n=this.getLine(e),s="end"===i?-1:1,o=this.getFoldAt(e,s===-1?0:n.length,s);if(o)return void(t.children||t.all?this.removeFold(o):this.expandFold(o));var r=this.getFoldWidgetRange(e,!0);if(r&&!r.isMultiLine()&&(o=this.getFoldAt(r.start.row,r.start.column,1),o&&r.isEqual(o.range)))return void this.removeFold(o);if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,h=a.range.end.row;this.foldAll(l,h,t.all?1e4:0)}else t.children?(h=r?r.end.row:this.getLength(),this.foldAll(e+1,r.end.row,t.all?1e4:0)):r&&(t.all&&(r.collapseChildren=1e4),this.addFold("...",r));return r}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var i=this.$toggleFoldWidget(t,{});if(!i){var n=this.getParentFoldRangeData(t,!0);if(i=n.range||n.firstRange){t=i.start.row;var s=this.getFoldAt(t,this.getLine(t).length,1);s?this.removeFold(s):this.addFold("...",i)}}},this.updateFoldWidgets=function(e){var t=e.data,i=t.range,n=i.start.row,s=i.end.row-n;if(0===s)this.foldWidgets[n]=null;else if("removeText"==t.action||"removeLines"==t.action)this.foldWidgets.splice(n,s+1,null);else{var o=Array(s+1);o.unshift(n,1),this.foldWidgets.splice.apply(this.foldWidgets,o)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}var s=e("../range").Range,o=e("./fold_line").FoldLine,r=e("./fold").Fold,a=e("../token_iterator").TokenIterator;t.Folding=n}),define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,i){"use strict";function n(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var i=t||this.getLine(e.row).charAt(e.column-1);if(""==i)return null;var n=i.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],e):this.$findOpeningBracket(n[2],e):null},this.getBracketRange=function(e){var t,i=this.getLine(e.row),n=!0,s=i.charAt(e.column-1),r=s&&s.match(/([\(\[\{])|([\)\]\}])/);if(r||(s=i.charAt(e.column),e={row:e.row,column:e.column+1},r=s&&s.match(/([\(\[\{])|([\)\]\}])/),n=!1),!r)return null;if(r[1]){var a=this.$findClosingBracket(r[1],e);if(!a)return null;t=o.fromPoints(e,a),n||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a=this.$findOpeningBracket(r[2],e);if(!a)return null;t=o.fromPoints(a,e),n||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(e,t,i){var n=this.$brackets[e],o=1,r=new s(this,t.row,t.column),a=r.getCurrentToken();if(a||(a=r.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end|start|begin)\b/,"")+")+"));for(var l=t.column-r.getCurrentTokenColumn()-2,h=a.value;;){for(;l>=0;){var c=h.charAt(l);if(c==n){if(o-=1,0==o)return{row:r.getCurrentTokenRow(),column:l+r.getCurrentTokenColumn()}}else c==e&&(o+=1);l-=1}do a=r.stepBackward();while(a&&!i.test(a.type));if(null==a)break;h=a.value,l=h.length-1}return null}},this.$findClosingBracket=function(e,t,i){var n=this.$brackets[e],o=1,r=new s(this,t.row,t.column),a=r.getCurrentToken();if(a||(a=r.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:end|start|begin)\b/,"")+")+"));for(var l=t.column-r.getCurrentTokenColumn();;){for(var h=a.value,c=h.length;l=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}n.implement(this,r),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,i=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>i&&(this.$docRowCache.splice(i,t),this.$screenRowCache.splice(i,t))},this.$getRowCacheIndex=function(e,t){for(var i=0,n=e.length-1;i<=n;){var s=i+n>>1,o=e[s];if(t>o)i=s+1;else{if(!(t=t));o++);return(i=n[o])?(i.index=o,i.start=s-i.value.length,i):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.$deltasFold.length&&(t.$deltas.push({group:"fold",deltas:t.$deltasFold}),t.$deltasFold=[]),t.$deltasDoc.length&&(t.$deltas.push({group:"doc",deltas:t.$deltasDoc}),t.$deltasDoc=[]),t.$deltas.length>0&&e.execute({action:"aceupdate",args:[t.$deltas,t],merge:t.mergeUndoDeltas}),t.mergeUndoDeltas=!1,t.$deltas=[]},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(n=!!i.charAt(t-1).match(this.tokenRe)),n||(n=!!i.charAt(t).match(this.tokenRe)),n)var s=this.tokenRe;else if(/^\s+$/.test(i.slice(t-1,t+1)))var s=/\s/;else var s=this.nonTokenRe;var o=t;if(o>0){do o--;while(o>=0&&i.charAt(o).match(s));o++}for(var r=t;re&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),i=this.$rowLengthCache,n=0,s=0,o=this.$foldData[s],r=o?o.start.row:1/0,a=t.length,l=0;lr){if(l=o.end.row+1,l>=a)break;o=this.$foldData[s++],r=o?o.start.row:1/0}null==i[l]&&(i[l]=this.$getStringScreenWidth(t[l])[0]),i[l]>n&&(n=i[l])}this.screenWidth=n}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=e.length-1;n!=-1;n--){var s=e[n];"doc"==s.group?(this.doc.revertDeltas(s.deltas),i=this.$getUndoSelection(s.deltas,!0,i)):s.deltas.forEach(function(e){this.addFolds(e.folds)},this)}return this.$fromUndo=!1,i&&this.$undoSelect&&!t&&this.selection.setSelectionRange(i),i}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=null,n=0;ne.end.column&&(o.start.column+=a),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=a)),r&&o.start.row>=e.end.row&&(o.start.row+=r,o.end.row+=r)}if(o.end=this.insert(o.start,n),s.length){var l=e.start,c=o.start,r=c.row-l.row,a=c.column-l.column;this.addFolds(s.map(function(e){return e=e.clone(),e.start.row==l.row&&(e.start.column+=a),e.end.row==l.row&&(e.end.column+=a),e.start.row+=r,e.end.row+=r,e}))}return o},this.indentRows=function(e,t,i){i=i.replace(/\t/g,this.getTabString());for(var n=e;n<=t;n++)this.insert({row:n,column:0},i)},this.outdentRows=function(e){for(var t=e.collapseRows(),i=new h(0,0,0,0),n=this.getTabSize(),s=t.start.row;s<=t.end.row;++s){var o=this.getLine(s);i.start.row=s,i.end.row=s;for(var r=0;r0){var n=this.getRowFoldEnd(t+i);if(n>this.doc.getLength()-1)return 0;var s=n-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);var s=t-e+1}var o=new h(e,0,t,Number.MAX_VALUE),r=this.getFoldsInRange(o).map(function(e){return e=e.clone(),e.start.row+=s,e.end.row+=s,e}),a=0==i?this.doc.getLines(e,t):this.doc.removeLines(e,t);return this.doc.insertLines(e+s,a),r.length&&this.addFolds(r),s},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var i=this.doc.getLength();e>=i?(e=i-1,t=this.doc.getLine(i-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var i=this.$wrapLimitRange;i.max<0&&(i={min:t,max:t});var n=this.$constrainWrapLimit(e,i.min,i.max);return n!=this.$wrapLimit&&n>1&&(this.$wrapLimit=n,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,i){return t&&(e=Math.max(t,e)),i&&(e=Math.min(i,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t,i=this.$useWrapMode,n=e.data.action,s=e.data.range.start.row,o=e.data.range.end.row,r=e.data.range.start,a=e.data.range.end,l=null;if(n.indexOf("Lines")!=-1?(o="insertLines"==n?s+e.data.lines.length:s,t=e.data.lines?e.data.lines.length:o-s):t=o-s,this.$updating=!0,0!=t)if(n.indexOf("remove")!=-1){this[i?"$wrapData":"$rowLengthCache"].splice(s,t);var h=this.$foldData;l=this.getFoldsInRange(e.data.range),this.removeFolds(l);var c=this.getFoldLine(a.row),u=0;if(c){c.addRemoveChars(a.row,a.column,r.column-a.column),c.shiftRow(-t);var d=this.getFoldLine(s);d&&d!==c&&(d.merge(c),c=d),u=h.indexOf(c)+1}for(u;u=a.row&&c.shiftRow(-t)}o=s}else{var g=Array(t);g.unshift(s,0);var f=i?this.$wrapData:this.$rowLengthCache;f.splice.apply(f,g);var h=this.$foldData,c=this.getFoldLine(s),u=0;if(c){var m=c.range.compareInside(r.row,r.column);0==m?(c=c.split(r.row,r.column),c&&(c.shiftRow(t),c.addRemoveChars(o,0,a.column-r.column))):m==-1&&(c.addRemoveChars(s,0,a.column-r.column),c.shiftRow(t)),u=h.indexOf(c)+1}for(u;u=s&&c.shiftRow(t)}}else{t=Math.abs(e.data.range.start.column-e.data.range.end.column),n.indexOf("remove")!=-1&&(l=this.getFoldsInRange(e.data.range),this.removeFolds(l),t=-t);var c=this.getFoldLine(s);c&&c.addRemoveChars(s,r.column,t)}return i&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,i?this.$updateWrapData(s,o):this.$updateRowLengthCache(s,o),l},this.$updateRowLengthCache=function(e,t,i){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var i,n,s=this.doc.getAllLines(),o=this.getTabSize(),r=this.$wrapData,l=this.$wrapLimit,h=e;for(t=Math.min(t,s.length-1);h<=t;)n=this.getFoldLine(h,n),n?(i=[],n.walk(function(e,t,n,o){var r;if(null!=e){r=this.$getDisplayTokens(e,i.length),r[0]=a;for(var l=1;lt;){var u=r+t;if(e[u-1]>=f&&e[u]>=f)n(u);else if(e[u]!=a&&e[u]!=c){for(var d=Math.max(u-(h?10:t-(t>>2)),r-1);u>d&&e[u]d&&e[u]d&&e[u]==g;)u--}else for(;u>d&&e[u]d?n(++u):(u=r+t,e[u]==i&&u--,n(u))}else{for(u;u!=r-1&&e[u]!=a;u--);if(u>r){n(u);continue}for(u=r+t;u39&&l<48||l>57&&l<64?r.push(g):l>=4352&&e(l)?r.push(t,i):r.push(t)}return r},this.$getStringScreenWidth=function(t,i,n){if(0==i)return[0,0];null==i&&(i=1/0),n=n||0;var s,o;for(o=0;o=4352&&e(s)?2:1,!(n>i));o++);return[n,o]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},this.getDocumentLastRowColumn=function(e,t){var i=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(i)},this.getDocumentLastRowColumnPosition=function(e,t){var i=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(i,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},this.getScreenTabSize=function(e){return this.$tabSize-e%this.$tabSize},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t){if(e<0)return{row:0,column:0};var i,n,s=0,o=0,r=0,a=0,l=this.$screenRowCache,h=this.$getRowCacheIndex(l,e),c=l.length;if(c&&h>=0)var r=l[h],s=this.$docRowCache[h],u=e>l[c-1];else var u=!c;for(var d=this.getLength()-1,g=this.getNextFoldLine(s),f=g?g.start.row:1/0;r<=e&&(a=this.getRowLength(s),!(r+a>e||s>=d));)r+=a,s++,s>f&&(s=g.end.row+1,g=this.getNextFoldLine(s,g),f=g?g.start.row:1/0),u&&(this.$docRowCache.push(s),this.$screenRowCache.push(r));if(g&&g.start.row<=s)i=this.getFoldDisplayLine(g),s=g.start.row;else{if(r+a<=e||s>d)return{row:d,column:this.getLine(d).length};i=this.getLine(s),g=null}if(this.$useWrapMode){var m=this.$wrapData[s];if(m){var p=Math.floor(e-r);n=m[p],p>0&&m.length&&(o=m[p-1]||m[m.length-1],i=i.substring(o))}}return o+=this.$getStringScreenWidth(i,t)[1],this.$useWrapMode&&o>=n&&(o=n-1),g?g.idxToPosition(o):{row:s,column:o}},this.documentToScreenPosition=function(e,t){if("undefined"==typeof t)var i=this.$clipPositionToDocument(e.row,e.column);else i=this.$clipPositionToDocument(e,t);e=i.row,t=i.column;var n=0,s=null,o=null;o=this.getFoldAt(e,t,1),o&&(e=o.start.row,t=o.start.column);var r,a=0,l=this.$docRowCache,h=this.$getRowCacheIndex(l,e),c=l.length;if(c&&h>=0)var a=l[h],n=this.$screenRowCache[h],u=e>l[c-1];else var u=!c;for(var d=this.getNextFoldLine(a),g=d?d.start.row:1/0;a=g){if(r=d.end.row+1,r>e)break;d=this.getNextFoldLine(r,d),g=d?d.start.row:1/0}else r=a+1;n+=this.getRowLength(a),a=r,u&&(this.$docRowCache.push(a),this.$screenRowCache.push(n))}var f="";if(d&&a>=g?(f=this.getFoldDisplayLine(d,e,t),s=d.start.row):(f=this.getLine(e).substring(0,t),s=e),this.$useWrapMode){var m=this.$wrapData[s];if(m){for(var p=0;f.length>=m[p];)n++,p++;f=f.substring(m[p-1]||0,f.length)}}return{row:n,column:this.$getStringScreenWidth(f)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var i=this.$wrapData.length,n=0,s=0,t=this.$foldData[s++],o=t?t.start.row:1/0;no&&(n=t.end.row+1,t=this.$foldData[s++],o=t?t.start.row:1/0)}else{e=this.getLength();for(var a=this.$foldData,s=0;sm||(r.push(l=new o(u,m,u+h-1,p)),h>2&&(u=u+h-2))}}else for(var A=0;Aw&&r[d].end.row==i.end.row;)d--;for(r=r.slice(A,d+1),A=0,d=r.length;A=0;a--)if(s(r[a],t,o))return!0};else var a=function(e,t,o){for(var r=n.getMatchOffsets(e,i),a=0;a=r;n--)if(i(e.getLine(n),n))return;if(0!=t.wrap)for(n=a,r=o.row;n>=r;n--)if(i(e.getLine(n),n))return}}:function(i){var n=o.row,s=e.getLine(n).substr(o.column);if(!i(s,n,o.column)){for(n+=1;n<=a;n++)if(i(e.getLine(n),n))return;if(0!=t.wrap)for(n=r,a=o.row;n<=a;n++)if(i(e.getLine(n),n))return}};return{forEach:l}}}).call(r.prototype),t.Search=r}),define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,i){"use strict";function n(e,t){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function s(e,t){n.call(this,e,t),this.$singleCommand=!1}var o=e("../lib/keys"),r=e("../lib/useragent"),a=o.KEY_MODS;s.prototype=n.prototype,function(){this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var i=e&&("string"==typeof e?e:e.name);e=this.commands[i],t||delete this.commands[i];var n=this.commandKeyBinding;for(var s in n){var o=n[s];if(o==e)delete n[s];else if(Array.isArray(o)){var r=o.indexOf(e);r!=-1&&(o.splice(r,1),1==o.length&&(n[s]=o[0]))}}},this.bindKey=function(e,t,i){if("object"==typeof e&&(e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach(function(e){var n="";if(e.indexOf(" ")!=-1){var s=e.split(/\s+/);e=s.pop(),s.forEach(function(e){var t=this.parseKeys(e),i=a[t.hashId]+t.key;n+=(n?" ":"")+i,this._addCommandToBinding(n,"chainKeys")},this),n+=" "}var o=this.parseKeys(e),r=a[o.hashId]+o.key;this._addCommandToBinding(n+r,t,i)},this)},this._addCommandToBinding=function(e,t,i){var n,s=this.commandKeyBinding;t?!s[e]||this.$singleCommand?s[e]=t:(Array.isArray(s[e])?(n=s[e].indexOf(t))!=-1&&s[e].splice(n,1):s[e]=[s[e]],i||t.isDefault?s[e].unshift(t):s[e].push(t)):delete s[e]},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var i=e[t];if(i){if("string"==typeof i)return this.bindKey(i,t);"function"==typeof i&&(i={exec:i}),"object"==typeof i&&(i.name||(i.name=t),this.addCommand(i))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),i=t.pop(),n=o[i];if(o.FUNCTION_KEYS[n])i=o.FUNCTION_KEYS[n].toLowerCase();else{if(!t.length)return{key:i,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:i.toUpperCase(),hashId:-1}}for(var s=0,r=t.length;r--;){var a=o.KEY_MODS[t[r]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[r]+" in "+e),!1;s|=a}return{key:i,hashId:s}},this.findKeyCommand=function(e,t){var i=a[e]+t;return this.commandKeyBinding[i]},this.handleKeyboard=function(e,t,i,n){var s=a[t]+i,o=this.commandKeyBinding[s];return e.$keyChain&&(e.$keyChain+=" "+s,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&n>0&&(e.$keyChain=""),{command:o}):(e.$keyChain=e.$keyChain||s,{command:"null"})}}.call(n.prototype),t.HashHandler=n,t.MultiHashHandler=s}),define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("../lib/oop"),s=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,r=function(e,t){s.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};n.inherits(r,s),function(){n.implement(this,o),this.exec=function(e,t,i){if(Array.isArray(e)){for(var n=e.length;n--;)if(this.exec(e[n],t,i))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;var s={editor:t,command:e,args:i};return s.returnValue=this._emit("exec",s),this._signal("afterExec",s),s.returnValue!==!1},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(r.prototype),t.CommandManager=r}),define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,i){"use strict";function n(e,t){return{win:e,mac:t}}var s=e("../lib/lang"),o=e("../config"),r=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:n("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:n("Alt-E","Ctrl-E"),exec:function(e){o.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:n("Alt-Shift-E","Ctrl-Shift-E"),exec:function(e){o.loadModule("ace/ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:n("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",bindKey:n(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:n("Ctrl-L","Command-L"),exec:function(e){var t=parseInt(prompt("Enter line number:"),10);isNaN(t)||e.gotoLine(t)},readOnly:!0},{name:"fold",bindKey:n("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:n("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:n("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:n("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:n("Ctrl-Alt-0","Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:n("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:n("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:n("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:n("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:n("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:n("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",bindKey:n("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:n("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:n("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:n("Shift-Up","Shift-Up"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:n("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:n("Ctrl-Shift-End","Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:n("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:n("Shift-Down","Shift-Down"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:n("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:n("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:n("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:n("Alt-Shift-Left","Command-Shift-Left"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:n("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:n("Shift-Left","Shift-Left"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:n("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:n("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:n("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:n("Alt-Shift-Right","Command-Shift-Right"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:n("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:n("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:n("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:n(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:n("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:n(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:n("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:n("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:n("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",bindKey:n("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",bindKey:n("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:n("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:n("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:n("null","null"),exec:function(){},passEvent:!0,readOnly:!0},{name:"cut",exec:function(e){var t=e.getSelectionRange();e._emit("cut",t),e.selection.isEmpty()||(e.session.remove(t),e.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"removeline",bindKey:n("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:n("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:n("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:n("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:n("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:n("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:n("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:n("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",bindKey:n("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",bindKey:n("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",bindKey:n("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:n("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:n("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:n("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:n("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:n("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:n("Shift-Delete",null),exec:function(e){return!!e.selection.isEmpty()&&void e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:n("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:n("Alt-Delete","Ctrl-K"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:n("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:n("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:n("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:n("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent", +bindKey:n("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:n("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(e,t){e.insert(s.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:n(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:n("Ctrl-T","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:n("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:n("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:n("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:n(null,null),exec:function(e){for(var t=e.selection.isBackwards(),i=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),n=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),o=e.session.doc.getLine(i.row).length,a=e.session.doc.getTextRange(e.selection.getRange()),l=a.replace(/\n\s*/," ").length,h=e.session.doc.getLine(i.row),c=i.row+1;c<=n.row+1;c++){var u=s.stringTrimLeft(s.stringTrimRight(e.session.doc.getLine(c)));0!==u.length&&(u=" "+u),h+=u}n.row+10?(e.selection.moveCursorTo(i.row,i.column),e.selection.selectTo(i.row,i.column+l)):(o=e.session.doc.getLine(i.row).length>o?o+1:o,e.selection.moveCursorTo(i.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:n(null,null),exec:function(e){var t=e.session.doc.getLength()-1,i=e.session.doc.getLine(t).length,n=e.selection.rangeList.ranges,s=[];n.length<1&&(n=[e.selection.getRange()]);for(var o=0;o=n.lastRow||i.end.row<=n.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==t.scrollIntoView&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,i=this.$mergeableCommands,n=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var s=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(s)||/\s/.test(t.args)),this.mergeNextCommand=!0}else n=n&&i.indexOf(e.command.name)!==-1;"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(n=!1),n?this.session.mergeUndoDeltas=!0:i.indexOf(e.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e){this.$keybindingId=e;var i=this;A.loadModule(["keybinding",e],function(n){i.$keybindingId==e&&i.keyBinding.setKeyboardHandler(n&&n.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){var t=this.session;if(t){this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeScrollLeft",this.$onScrollLeftChange);var i=this.session.getSelection();i.removeEventListener("changeCursor",this.$onCursorChange),i.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this})}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():t==-1&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||s.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=t.findMatchingBracket(e.getCursorPosition());if(i)var n=new g(i.row,i.column,i.row,i.column+1);else if(t.$mode.getMatching)var n=t.$mode.getMatching(e.session);n&&(t.$bracketHighlight=t.addMarker(n,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout(function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var i=e.getCursorPosition(),n=new C(e.session,i.row,i.column),s=n.getCurrentToken();if(!s||!/\b(?:tag-open|tag-name)/.test(s.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);s.type.indexOf("tag-open")!=-1&&(s=n.stepForward());var o=s.value,r=0,a=n.stepBackward();if("<"==a.value){do a=s,s=n.stepForward(),s&&s.value===o&&s.type.indexOf("tag-name")!==-1&&("<"===a.value?r++:"=0)}else{do s=a,a=n.stepBackward(),s&&s.value===o&&s.type.indexOf("tag-name")!==-1&&("<"===a.value?r++:"1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var i=new g(e.row,e.column,e.row,1/0);i.id=t.addMarker(i,"ace_active-line","screenLine"),t.$highlightLineMarker=i}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var i=this.selection.getRange(),n=this.getSelectionStyle();t.$selectionMarker=t.addMarker(i,"ace_selection",n)}var s=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(s),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var i=t.start.column-1,n=t.end.column+1,s=e.getLine(t.start.row),o=s.length,r=s.substring(Math.max(i,0),Math.min(n,o));if(!(i>=0&&/^[\w\d]/.test(r)||n<=o&&/[\w\d]$/.test(r))&&(r=s.substring(t.start.column,t.end.column),/^[\w\d]+$/.test(r))){var a=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:r});return a}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText();return this._signal("copy",e),e},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e){if(!this.$readOnly){var t={text:e};if(this._signal("paste",t),e=t.text,!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(e);else{var i=e.split(/\r\n|\r|\n/),n=this.selection.rangeList.ranges;if(i.length>n.length||i.length<2||!i[1])return this.commands.exec("insertstring",this,e);for(var s=n.length;s--;){var o=n[s];o.isEmpty()||this.session.remove(o),this.session.insert(o.start,i[s])}}this.renderer.scrollCursorIntoView()}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var i=this.session,n=i.getMode(),s=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=n.transformAction(i.getState(s.row),"insertion",this,i,e);o&&(e!==o.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var r=new g.fromPoints(s,s);r.end.column+=e.length,this.session.remove(r)}}else{var r=this.getSelectionRange();s=this.session.remove(r),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=i.getLine(s.row);if(s.column>a.search(/\S|$/)){var l=a.substr(s.column).search(/\S|$/);i.doc.removeInLine(s.row,s.column,s.column+l)}}this.clearSelection();var h=s.column,c=i.getState(s.row),a=i.getLine(s.row),u=n.checkOutdent(c,a,e);if(i.insert(s,e),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new g(s.row,h+o.selection[0],s.row,h+o.selection[1])):this.selection.setSelectionRange(new g(s.row+o.selection[0],o.selection[1],s.row+o.selection[2],o.selection[3]))),i.getDocument().isNewLine(e)){var d=n.getNextLineIndent(c,a.slice(0,s.column),i.getTabString());i.insert({row:s.row+1,column:0},d)}u&&n.autoOutdent(c,i,s.row)},this.onTextInput=function(e){this.keyBinding.onTextInput(e)},this.onCommandKey=function(e,t,i){this.keyBinding.onCommandKey(e,t,i)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var i=this.session,n=i.getState(t.start.row),s=i.getMode().transformAction(n,"deletion",this,i,t);if(0===t.end.column){var o=i.getTextRange(t);if("\n"==o[o.length-1]){var r=i.getLine(t.end.row);/^\s+$/.test(r)&&(t.end.column=r.length)}}s&&(t=s)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var i,n,s=this.session.getLine(e.row);tt.toLowerCase()?1:0});for(var n=new g(0,0,0,0),s=e.first;s<=e.last;s++){var o=t.getLine(s);n.start.row=s,n.end.row=s,n.end.column=o.length,t.replace(n,i[s-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),i=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,i,e)},this.getNumberAt=function(e,t){var i=/[\-]?[0-9]+(?:\.[0-9]+)?/g;i.lastIndex=0;for(var n=this.session.getLine(e);i.lastIndex=t){var o={value:s[0],start:s.index,end:s.index+s[0].length};return o}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,i=this.selection.getCursor().column,n=new g(t,i-1,t,i),s=this.session.getTextRange(n);if(!isNaN(parseFloat(s))&&isFinite(s)){var o=this.getNumberAt(t,i);if(o){var r=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-r,l=parseFloat(o.value);l*=Math.pow(10,a),e*=r!==o.end&&ig+1)break;g=f.last}for(c--,a=this.session.$moveLines(d,g,t?0:e),t&&e==-1&&(u=c+1);u<=c;)r[u].moveBy(a,0),u++;t||(a=0),l+=a}s.fromOrientedRange(s.ranges[0]),s.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var i=this.renderer,n=this.renderer.layerConfig,s=e*Math.floor(n.height/n.lineHeight);this.$blockScrolling++,t===!0?this.selection.$moveSelection(function(){this.moveCursorBy(s,0)}):t===!1&&(this.selection.moveCursorBy(s,0),this.selection.clearSelection()),this.$blockScrolling--;var o=i.scrollTop;i.scrollBy(0,s*n.lineHeight),null!=t&&i.scrollCursorIntoView(null,.5),i.animateScrolling(o)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,i,n){this.renderer.scrollToLine(e,t,i,n)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var i=this.getCursorPosition(),n=new C(this.session,i.row,i.column),s=n.getCurrentToken(),o=s||n.stepForward();if(o){var r,a,l=!1,h={},c=i.column-o.start,u={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;c=0;--o)this.$tryReplace(i[o],e)&&n++;return this.selection.setSelectionRange(s),this.$blockScrolling-=1,n},this.$tryReplace=function(e,t){var i=this.session.getTextRange(e);return t=this.$search.replace(i,t),null!==t?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,i){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&n.mixin(t,e);var s=this.selection.getRange();null==t.needle&&(e=this.session.getTextRange(s)||this.$search.$options.needle,e||(s=this.session.getWordRange(s.start.row,s.start.column),e=this.session.getTextRange(s)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:s});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,i),o):(t.backwards?s.start=s.end:s.end=s.start,void this.selection.setRange(s))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.$blockScrolling+=1,this.session.unfold(e),this.selection.setSelectionRange(e),this.$blockScrolling-=1;var i=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),t!==!1&&this.renderer.animateScrolling(i)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,i=this,n=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var s=this.$scrollAnchor;s.style.cssText="position:absolute",this.container.insertBefore(s,this.container.firstChild);var o=this.on("changeSelection",function(){n=!0}),r=this.renderer.on("beforeRender",function(){n&&(t=i.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){if(n&&t&&(i.isFocused()||i.searchBox&&i.searchBox.isFocused())){var e=i.renderer,o=e.$cursorLayer.$pixelPos,r=e.layerConfig,a=o.top-r.offset;n=o.top>=0&&a+t.top<0||!(o.topwindow.innerHeight)&&null,null!=n&&(s.style.top=a+"px",s.style.left=o.left+"px",s.style.height=r.lineHeight+"px",s.scrollIntoView(n)),n=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",o),this.renderer.removeEventListener("afterRender",a),this.renderer.removeEventListener("beforeRender",r))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,s.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))}}).call(F.prototype),A.defineOptions(F.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",foldStyle:"session",mode:"session"}),t.Editor=F}),define("ace/undomanager",["require","exports","module"],function(e,t,i){"use strict";var n=function(){this.reset()};(function(){this.execute=function(e){var t=e.args[0];this.$doc=e.args[1],e.merge&&this.hasUndo()&&(this.dirtyCounter--,t=this.$undoStack.pop().concat(t)),this.$undoStack.push(t),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(e){var t=this.$undoStack.pop(),i=null;return t&&(i=this.$doc.undoChanges(t,e),this.$redoStack.push(t),this.dirtyCounter--),i},this.redo=function(e){var t=this.$redoStack.pop(),i=null;return t&&(i=this.$doc.redoChanges(t,e),this.$undoStack.push(t),this.dirtyCounter++),i},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter}}).call(n.prototype),t.UndoManager=n}),define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("../lib/dom"),s=e("../lib/oop"),o=e("../lib/lang"),r=e("../lib/event_emitter").EventEmitter,a=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){s.implement(this,r),this.setSession=function(e){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;tr&&(m=o.end.row+1,o=t.getNextFoldLine(m,o),r=o?o.start.row:1/0),m>s){for(;this.$cells.length>f+1;)g=this.$cells.pop(),this.element.removeChild(g.element);break}g=this.$cells[++f],g||(g={element:null,textNode:null,foldWidget:null},g.element=n.createElement("div"),g.textNode=document.createTextNode(""),g.element.appendChild(g.textNode),this.element.appendChild(g.element),this.$cells[f]=g);var p="ace_gutter-cell ";l[m]&&(p+=l[m]),h[m]&&(p+=h[m]),this.$annotations[m]&&(p+=this.$annotations[m].className),g.element.className!=p&&(g.element.className=p);var A=t.getRowLength(m)*e.lineHeight+"px";if(A!=g.element.style.height&&(g.element.style.height=A),a){var C=a[m];null==C&&(C=a[m]=t.getFoldWidget(m))}if(C){g.foldWidget||(g.foldWidget=n.createElement("span"),g.element.appendChild(g.foldWidget));var p="ace_fold-widget ace_"+C;p+="start"==C&&m==r&&mi.right-t.right?"foldWidgets":void 0}}).call(a.prototype),t.Gutter=a}),define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,i){"use strict";var n=e("../range").Range,s=e("../lib/dom"),o=function(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.update=function(e){var e=e||this.config;if(e){this.config=e;var t=[];for(var i in this.markers){var n=this.markers[i];if(n.range){var s=n.range.clipRows(e.firstRow,e.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),n.renderer){var o=this.$getTop(s.start.row,e),r=this.$padding+s.start.column*e.characterWidth;n.renderer(t,s,r,o,e)}else"fullLine"==n.type?this.drawFullLineMarker(t,s,n.clazz,e):"screenLine"==n.type?this.drawScreenLineMarker(t,s,n.clazz,e):s.isMultiLine()?"text"==n.type?this.drawTextMarker(t,s,n.clazz,e):this.drawMultiLineMarker(t,s,n.clazz,e):this.drawSingleLineMarker(t,s,n.clazz+" ace_start",e)}else n.update(t,this,this.session,e)}this.element.innerHTML=t.join("")}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,i,s,o){var r=t.start.row,a=new n(r,t.start.column,r,this.session.getScreenLastRowColumn(r));for(this.drawSingleLineMarker(e,a,i+" ace_start",s,1,o),r=t.end.row,a=new n(r,0,r,t.end.column),this.drawSingleLineMarker(e,a,i,s,0,o),r=t.start.row+1;r
"),a=this.$getTop(t.end.row,n);var h=t.end.column*n.characterWidth;e.push("
"),r=(t.end.row-t.start.row-1)*n.lineHeight,r<0||(a=this.$getTop(t.start.row+1,n),e.push("
"))},this.drawSingleLineMarker=function(e,t,i,n,s,o){var r=n.lineHeight,a=(t.end.column+(s||0)-t.start.column)*n.characterWidth,l=this.$getTop(t.start.row,n),h=this.$padding+t.start.column*n.characterWidth;e.push("
")},this.drawFullLineMarker=function(e,t,i,n,s){var o=this.$getTop(t.start.row,n),r=n.lineHeight;t.start.row!=t.end.row&&(r+=this.$getTop(t.end.row,n)-o),e.push("
")},this.drawScreenLineMarker=function(e,t,i,n,s){var o=this.$getTop(t.start.row,n),r=n.lineHeight;e.push("
")}}).call(o.prototype),t.Marker=o}),define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("../lib/oop"),s=e("../lib/dom"),o=e("../lib/lang"),r=(e("../lib/useragent"),e("../lib/event_emitter").EventEmitter),a=function(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){n.implement(this,r),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="→",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var e="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.padding="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],i=1;i"+this.TAB_CHAR+o.stringRepeat(" ",i-1)+""):t.push(o.stringRepeat(" ",i));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var n="ace_indent-guide",s="",r="";if(this.showInvisibles){n+=" ace_invisible",s=" ace_invisible_space",r=" ace_invisible_tab";var a=o.stringRepeat(this.SPACE_CHAR,this.tabSize),l=this.TAB_CHAR+o.stringRepeat(" ",this.tabSize-1)}else var a=o.stringRepeat(" ",this.tabSize),l=a;this.$tabStrings[" "]=""+a+"",this.$tabStrings["\t"]=""+l+""}},this.updateLines=function(e,t,i){this.config.lastRow==e.lastRow&&this.config.firstRow==e.firstRow||this.scrollLines(e),this.config=e;for(var n=Math.max(t,e.firstRow),s=Math.min(i,e.lastRow),o=this.element.childNodes,r=0,a=e.firstRow;ah&&(a=l.end.row+1,l=this.session.getNextFoldLine(a,l),h=l?l.start.row:1/0),!(a>s);){var c=o[r++];if(c){var u=[];this.$renderLine(u,a,!this.$useLineGroups(),a==h&&l),c.style.height=e.lineHeight*this.session.getRowLength(a)+"px",c.innerHTML=u.join("")}a++}},this.scrollLines=function(e){var t=this.config;if(this.config=e,!t||t.lastRow0;n--)i.removeChild(i.firstChild);if(t.lastRow>e.lastRow)for(var n=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);n>0;n--)i.removeChild(i.lastChild);if(e.firstRowt.lastRow){var s=this.$renderLinesFragment(e,t.lastRow+1,e.lastRow);i.appendChild(s)}},this.$renderLinesFragment=function(e,t,i){for(var n=this.element.ownerDocument.createDocumentFragment(),o=t,r=this.session.getNextFoldLine(o),a=r?r.start.row:1/0;o>a&&(o=r.end.row+1,r=this.session.getNextFoldLine(o,r),a=r?r.start.row:1/0),!(o>i);){var l=s.createElement("div"),h=[];if(this.$renderLine(h,o,!1,o==a&&r),l.innerHTML=h.join(""),this.$useLineGroups())l.className="ace_line_group",n.appendChild(l),l.style.height=e.lineHeight*this.session.getRowLength(o)+"px";else for(;l.firstChild;)n.appendChild(l.firstChild);o++}return n},this.update=function(e){this.config=e;for(var t=[],i=e.firstRow,n=e.lastRow,s=i,o=this.session.getNextFoldLine(s),r=o?o.start.row:1/0;s>r&&(s=o.end.row+1,o=this.session.getNextFoldLine(s,o),r=o?o.start.row:1/0),!(s>n);)this.$useLineGroups()&&t.push("
"),this.$renderLine(t,s,!1,s==r&&o),this.$useLineGroups()&&t.push("
"),s++;this.element.innerHTML=t.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,i,n){var s=this,r=/\t|&|<|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,a=function(e,i,n,r,a){if(i)return s.showInvisibles?""+o.stringRepeat(s.SPACE_CHAR,e.length)+"":o.stringRepeat(" ",e.length);if("&"==e)return"&";if("<"==e)return"<";if("\t"==e){var l=s.session.getScreenTabSize(t+r);return t+=l-1,s.$tabStrings[l]}if(" "==e){var h=s.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",c=s.showInvisibles?s.SPACE_CHAR:"";return t+=1,""+c+""}return n?""+s.SPACE_CHAR+"":(t+=1,""+e+"")},l=n.replace(r,a);if(this.$textToken[i.type])e.push(l);else{var h="ace_"+i.type.replace(/\./g," ace_"),c="";"fold"==i.type&&(c=" style='width:"+i.value.length*this.config.characterWidth+"px;' "),e.push("",l,"")}return t+n.length},this.renderIndentGuide=function(e,t,i){var n=t.search(this.$indentGuideRe);return n<=0||n>=i?t:" "==t[0]?(n-=n%this.tabSize,e.push(o.stringRepeat(this.$tabStrings[" "],n/this.tabSize)),t.substr(n)):"\t"==t[0]?(e.push(o.stringRepeat(this.$tabStrings["\t"],n)),t.substr(n)):t},this.$renderWrappedLine=function(e,t,i,n){for(var s=0,o=0,r=i[0],a=0,l=0;l=r;)a=this.$renderToken(e,a,h,c.substring(0,r-s)),c=c.substring(r-s),s=r,n||e.push("","
"),o++,a=0,r=i[o]||Number.MAX_VALUE;0!=c.length&&(s+=c.length,a=this.$renderToken(e,a,h,c))}}},this.$renderSimpleLine=function(e,t){var i=0,n=t[0],s=n.value;this.displayIndentGuides&&(s=this.renderIndentGuide(e,s)),s&&(i=this.$renderToken(e,i,n,s));for(var o=1;o"),s.length){var o=this.session.getRowSplitData(t);o&&o.length?this.$renderWrappedLine(e,s,o,i):this.$renderSimpleLine(e,s)}this.showInvisibles&&(n&&(t=n.end.row),e.push("",t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"")),i||e.push("
")},this.$getFoldLineTokens=function(e,t){function i(e,t,i){for(var n=0,o=0;o+e[n].value.lengthi-t&&(r=r.substring(0,i-t)),s.push({type:e[n].type,value:r}),o=t+r.length,n+=1}for(;oi?s.push({type:e[n].type,value:r.substring(0,i-o)}):s.push(e[n]),o+=r.length,n+=1}}var n=this.session,s=[],o=n.getTokens(e);return t.walk(function(e,t,r,a,l){null!=e?s.push({type:"fold",value:e}):(l&&(o=n.getTokens(t)),o.length&&i(o,a,r))},t.end.row,this.session.getLine(t.end.row).length),s},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(a.prototype),t.Text=a}),define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";var n,s=e("../lib/dom"),o=function(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),void 0===n&&(n="opacity"in this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),s.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateVisibility.bind(this)};(function(){this.$updateVisibility=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.visibility=e?"":"hidden"},this.$updateOpacity=function(e){for(var t=this.cursors,i=t.length;i--;)t[i].style.opacity=e?"":"0"},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e==this.smoothBlinking||n||(this.smoothBlinking=e,s.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.$updateCursors=(e?this.$updateOpacity:this.$updateVisibility).bind(this),this.restartTimer())},this.addCursor=function(){var e=s.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,s.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,s.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&s.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){s.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var i=this.session.documentToScreenPosition(e),n=this.$padding+i.column*this.config.characterWidth,s=(i.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:n,top:s}},this.update=function(e){this.config=e;var t=this.session.$selectionMarkers,i=0,n=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);for(var i=0,s=t.length;ie.height+e.offset||o.top<0)&&i>1)){var r=(this.cursors[n++]||this.addCursor()).style;this.drawCursor?this.drawCursor(r,o,e,t[i],this.session):(r.left=o.left+"px",r.top=o.top+"px",r.width=e.characterWidth+"px",r.height=e.lineHeight+"px")}}for(;this.cursors.length>n;)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?s.addCssClass(this.element,"ace_overwrite-cursors"):s.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(o.prototype),t.Cursor=o}),define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/dom"),o=e("./lib/event"),r=e("./lib/event_emitter").EventEmitter,a=function(e){this.element=s.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=s.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){n.implement(this,r),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,t.$scrollbarWidth=this.width=s.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};n.inherits(l,a),function(){this.classSuffix="-v",this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=function(e){this.inner.style.height=e+"px"},this.setScrollHeight=function(e){this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=e)}}.call(l.prototype);var h=function(e,t){a.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};n.inherits(h,a),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(h.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=h,t.VScrollBar=l,t.HScrollBar=h}),define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,i){"use strict";var n=e("./lib/event"),s=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.window=t||window};(function(){this.schedule=function(e){if(this.changes=this.changes|e,!this.pending&&this.changes){this.pending=!0;var t=this;n.nextFrame(function(){t.pending=!1;for(var e;e=t.changes;)t.changes=0,t.onRender(e)},this.window)}}}).call(s.prototype),t.RenderLoop=s}),define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,i){var n=e("../lib/oop"),s=e("../lib/dom"),o=e("../lib/lang"),r=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,l=0,h=t.FontMetrics=function(e,t){this.el=s.createElement("div"), +this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),l||this.$testFractionalRect(),this.$measureNode.innerHTML=o.stringRepeat("X",l),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){n.implement(this,a),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var e=s.createElement("div");this.$setMeasureNodeStyles(e.style),e.style.width="0.2px",document.documentElement.appendChild(e);var t=e.getBoundingClientRect().width;l=t>0&&t<1?50:100,e.parentNode.removeChild(e)},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",r.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(){var e=this.$measureSizes();if(e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=setInterval(function(){e.checkForSizeChanges()},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&this.$pollSizeChangesTimer},this.$measureSizes=function(){if(50===l){var e=null;try{e=this.$measureNode.getBoundingClientRect()}catch(t){e={width:0,height:0}}var t={height:e.height,width:e.width/l}}else var t={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/l};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){this.$main.innerHTML=o.stringRepeat(e,l);var t=this.$main.getBoundingClientRect();return t.width/l},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(h.prototype)}),define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/dom"),o=e("./config"),r=e("./lib/useragent"),a=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,h=e("./layer/text").Text,c=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,g=e("./renderloop").RenderLoop,f=e("./layer/font_metrics").FontMetrics,m=e("./lib/event_emitter").EventEmitter,p='.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;min-width: 100%;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;text-indent: -1em;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;}.ace_text-input.ace_composition {background: inherit;color: inherit;z-index: 1000;opacity: 1;text-indent: 0;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;white-space: pre;height: 100%;width: 100%;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;}.ace_text-layer {font: inherit !important;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;border-left: 2px solid}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {-webkit-transition: opacity 0.18s;transition: opacity 0.18s;}.ace_editor.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;}.ace_line .ace_fold {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {-webkit-transition: opacity 0.4s ease 0.05s;transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {-webkit-transition: opacity 0.05s ease 0.05s;transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}';s.importCssString(p,"ace_editor");var A=function(e,t){var i=this;this.container=e||s.createElement("div"),this.$keepTextAreaAtCursor=!r.isOldIE,s.addCssClass(this.container,"ace_editor"),this.setTheme(t),this.$gutter=s.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=s.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=s.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var n=this.$textLayer=new h(this.content);this.canvas=n.element,this.$markerFront=new l(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){i.$scrollAnimation||i.session.setScrollTop(e.data-i.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){i.$scrollAnimation||i.session.setScrollLeft(e.data-i.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container,500),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){i.updateCharacterSize(),i.onResize(!0,i.gutterWidth,i.$size.width,i.$size.height),i._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new g(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,n.implement(this,m),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,i){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar()},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,i,n){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var s=this.container;n||(n=s.clientHeight||s.scrollHeight),i||(i=s.clientWidth||s.scrollWidth);var o=this.$updateCachedSize(e,t,i,n);if(!this.$size.scrollerHeight||!i&&!n)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,i,n){n-=this.$extraHeight||0;var s=0,o=this.$size,r={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};return n&&(e||o.height!=n)&&(o.height=n,s|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",s|=this.CHANGE_SCROLL),i&&(e||o.width!=i)&&(s|=this.CHANGE_SIZE,o.width=i,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,this.scrollBarH.element.style.left=this.scroller.style.left=t+"px",o.scrollerWidth=Math.max(0,i-t-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(s|=this.CHANGE_FULL)),o.$dirty=!i||!n,s&&this._signal("resize",r),s},this.onGutterResize=function(){var e=this.$showGutter?this.$gutter.offsetWidth:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var e=this.$cursorLayer.$pixelPos,t=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var i=this.session.selection.getCursor();i.column=0,e=this.$cursorLayer.getPixelPosition(i,!0),t*=this.session.getRowLength(i.row)}this.$gutterLineHighlight.style.top=e.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=t+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=s.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var e=this.layerConfig,t=this.$cursorLayer.$pixelPos.top,i=this.$cursorLayer.$pixelPos.left;t-=e.offset;var n=this.textarea.style,s=this.lineHeight;if(t<0||t>e.height-s)return void(n.top=n.left="0");var o=this.characterWidth;if(this.$composition){var r=this.textarea.value.replace(/^\x01+/,"");o*=this.session.$getStringScreenWidth(r)[0]+2,s+=2}i-=this.scrollLeft,i>this.$size.scrollerWidth-o&&(i=this.$size.scrollerWidth-o),i+=this.gutterWidth,n.height=s+"px",n.width=o+"px",n.left=Math.min(i,this.$size.scrollerWidth-o)+"px",n.top=Math.min(t,this.$size.height-s)+"px"}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+e},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,i,n){var s=this.scrollMargin;s.top=0|e,s.bottom=0|t,s.right=0|n,s.left=0|i,s.v=s.top+s.bottom,s.h=s.left+s.right,s.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-s.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!e&&!t)return void(this.$changes|=e);if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var i=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig(),i.firstRow!=this.layerConfig.firstRow&&i.firstRowScreen==this.layerConfig.firstRowScreen){var n=this.scrollTop+(i.firstRow-this.layerConfig.firstRow)*this.lineHeight;n>0&&(this.scrollTop=n,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig())}i=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-i.offset+"px",this.content.style.marginTop=-i.offset+"px",this.content.style.width=i.width+2*this.$padding+"px",this.content.style.height=i.minHeight+"px"}return e&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL?(this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender")):e&this.CHANGE_SCROLL?(e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(i):this.$textLayer.scrollLines(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender")):(e&this.CHANGE_TEXT?(this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(i):(e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(i),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(i),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(i),void this._signal("afterRender"))},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,i=Math.max((this.$minLines||1)*this.lineHeight,Math.min(t,e))+this.scrollMargin.v+(this.$extraHeight||0),n=e>t;if(i!=this.desiredHeight||this.$size.height!=this.desiredHeight||n!=this.$vScroll){n!=this.$vScroll&&(this.$vScroll=n,this.scrollBarV.setVisible(n));var s=this.container.clientWidth;this.container.style.height=i+"px",this.$updateCachedSize(!0,this.$gutterWidth,s,i),this.desiredHeight=i,this._signal("autosize")}},this.$computeLayerConfig=function(){this.$maxLines&&this.lineHeight>1&&this.$autosize();var e=this.session,t=this.$size,i=t.height<=2*this.lineHeight,n=this.session.getScreenLength(),s=n*this.lineHeight,o=this.scrollTop%this.lineHeight,r=t.scrollerHeight+this.lineHeight,a=this.$getLongestLine(),l=!i&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-a-2*this.$padding<0),h=this.$horizScroll!==l;h&&(this.$horizScroll=l,this.scrollBarH.setVisible(l));var c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;s+=c,this.session.setScrollTop(Math.max(-this.scrollMargin.top,Math.min(this.scrollTop,s-t.scrollerHeight+this.scrollMargin.bottom))),this.session.setScrollLeft(Math.max(-this.scrollMargin.left,Math.min(this.scrollLeft,a+2*this.$padding-t.scrollerWidth+this.scrollMargin.right)));var u=!i&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-s+c<0||this.scrollTop),d=this.$vScroll!==u;d&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var g,f,m=Math.ceil(r/this.lineHeight)-1,p=Math.max(0,Math.round((this.scrollTop-o)/this.lineHeight)),A=p+m,C=this.lineHeight;p=e.screenToDocumentRow(p,0);var F=e.getFoldLine(p);F&&(p=F.start.row),g=e.documentToScreenRow(p,0),f=e.getRowLength(p)*C,A=Math.min(e.screenToDocumentRow(A,0),e.getLength()-1),r=t.scrollerHeight+e.getRowLength(A)*C+f,o=this.scrollTop-g*C;var v=0;return this.layerConfig.width!=a&&(v=this.CHANGE_H_SCROLL),(h||d)&&(v=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),d&&(a=this.$getLongestLine())),this.layerConfig={width:a,padding:this.$padding,firstRow:p,firstRowScreen:g,lastRow:A,lineHeight:C,characterWidth:this.characterWidth,minHeight:r,maxHeight:s,offset:o,gutterOffset:Math.max(0,Math.ceil((o+t.height-t.scrollerHeight)/C)),height:this.$size.scrollerHeight},v},this.$updateLines=function(){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var i=this.layerConfig;if(!(e>i.lastRow+1||to?(t&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-as?(s=1-this.scrollMargin.top||t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},this.pixelToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=(e+this.scrollLeft-i.left-this.$padding)/this.characterWidth,s=Math.floor((t+this.scrollTop-i.top)/this.lineHeight),o=Math.round(n);return{row:s,column:o,side:n-o>0?1:-1}},this.screenToTextCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=Math.round((e+this.scrollLeft-i.left-this.$padding)/this.characterWidth),s=(t+this.scrollTop-i.top)/this.lineHeight;return this.session.screenToDocumentPosition(s,Math.max(n,0))},this.textToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=this.session.documentToScreenPosition(e,t),s=this.$padding+Math.round(n.column*this.characterWidth),o=n.row*this.lineHeight;return{pageX:i.left+s-this.scrollLeft,pageY:i.top+o-this.scrollTop}},this.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){s.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,s.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(e){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(s.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(e,t){function i(i){if(n.$themeId!=e)return t&&t();if(i.cssClass){s.importCssString(i.cssText,i.cssClass,n.container.ownerDocument),n.theme&&s.removeCssClass(n.container,n.theme.cssClass);var o="padding"in i?i.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&o!=n.$padding&&n.setPadding(o),n.$theme=i.cssClass,n.theme=i,s.addCssClass(n.container,i.cssClass),s.setCssClass(n.container,"ace_dark",i.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:i}),t&&t()}}var n=this;if(this.$themeId=e,n._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)i(e);else{var r=e||this.$options.theme.initialValue;o.loadModule(["theme",r],i)}},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){s.setCssClass(this.container,e,t!==!1)},this.unsetStyle=function(e){s.removeCssClass(this.container,e)},this.setCursorStyle=function(e){this.scroller.style.cursor!=e&&(this.scroller.style.cursor=e)},this.setMouseCursor=function(e){this.scroller.style.cursor=e},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(A.prototype),o.defineOptions(A.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){s.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e)},initialValue:!0},showLineNumbers:{set:function(e){this.$gutterLayer.setShowLineNumbers(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){return this.$gutterLineHighlight?(this.$gutterLineHighlight.style.display=e?"":"none",void(this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight())):(this.$gutterLineHighlight=s.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight))},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.updateFull()}},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),t.VirtualRenderer=A}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(e,t,i){"use strict";var n=e("../lib/oop"),s=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,r=e("../config"),a=function(t,i,n,s){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),r.get("packaged")||!e.toUrl)s=s||r.moduleUrl(i,"worker");else{var o=this.$normalizePath;s=s||o(e.toUrl("ace/worker/worker.js",null,"_"));var a={};t.forEach(function(t){a[t]=o(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}try{this.$worker=new Worker(s)}catch(e){if(!(e instanceof window.DOMException))throw e;var l=this.$workerBlob(s),h=window.URL||window.webkitURL,c=h.createObjectURL(l);this.$worker=new Worker(c),h.revokeObjectURL(c)}this.$worker.postMessage({init:!0,tlns:a,module:i,classname:n}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){n.implement(this,o),this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var i=this.callbacks[t.id];i&&(i(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return s.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,i){if(i){var n=this.callbackId++;this.callbacks[n]=i,t.push(n)}this.send(e,t)},this.emit=function(e,t){try{this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue?this.deltaQueue.push(e.data):(this.deltaQueue=[e.data],setTimeout(this.$sendDeltaQueue,0))},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>20&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))},this.$workerBlob=function(e){var t="importScripts('"+s.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,n=new i;return n.append(t),n.getBlob("application/javascript")}}}).call(a.prototype);var l=function(e,t,i){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var n=null,s=!1,a=Object.create(o),l=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(e){l.messageBuffer.push(e),n&&(s?setTimeout(h):h())},this.setEmitSync=function(e){s=e};var h=function(){var e=l.messageBuffer.shift();e.command?n[e.command].apply(n,e.args):e.event&&a._signal(e.event,e.data)};a.postMessage=function(e){l.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},r.loadModule(["worker",t],function(e){for(n=new e[i](a);l.messageBuffer.length;)h()})};l.prototype=a.prototype,t.UIWorkerClient=l,t.WorkerClient=a}),define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,i){"use strict";var n=e("./range").Range,s=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),r=function(e,t,i,n,s,o){var r=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=s,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=n,this.$onCursorChange=function(){setTimeout(function(){r.onCursorChange()})},this.$pos=i;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,s),this.setup=function(){var e=this,t=this.doc,i=this.session,s=this.$pos;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=t.createAnchor(s.row,s.column),this.markerId=i.addMarker(new n(s.row,s.column,s.row,s.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(t){i.removeMarker(e.markerId),e.markerId=i.addMarker(new n(t.value.row,t.value.column,t.value.row,t.value.column+e.length),e.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(i){var n=t.createAnchor(i.row,i.column);e.others.push(n)}),i.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(i){i.markerId=e.addMarker(new n(i.row,i.column,i.row,i.column+t.length),t.othersClass,null,!1),i.on("change",function(s){e.removeMarker(i.markerId),i.markerId=e.addMarker(new n(s.value.row,s.value.column,s.value.row,s.value.column+t.length),t.othersClass,null,!1)})})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&i.start.column<=this.pos.column+this.length+1){var o=i.start.column-this.pos.column;if(this.length+=s,!this.session.$fromUndo){if("insertText"===t.action)for(var r=this.others.length-1;r>=0;r--){var a=this.others[r],l={row:a.row,column:a.column+o};a.row===i.start.row&&i.start.column=0;r--){var a=this.others[r],l={row:a.row,column:a.column+o};a.row===i.start.row&&i.start.column=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var e=0;e1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length?this.$onRemoveRange(e):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var i=e.length;i--;){var n=this.ranges.indexOf(e[i]);this.ranges.splice(n,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),t=t||this.ranges[0],t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new a,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],i=l.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{var i=this.getRange(),n=this.isBackwards(),s=i.start.row,o=i.end.row;if(s==o){if(n)var r=i.end,a=i.start;else var r=i.start,a=i.end;return this.addRange(l.fromPoints(a,a)),void this.addRange(l.fromPoints(r,r))}var h=[],c=this.getLineRange(s,!0);c.start.column=i.start.column,h.push(c);for(var u=s+1;u1){var e=this.rangeList.ranges,t=e[e.length-1],i=l.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{var n=this.session.documentToScreenPosition(this.selectionLead),s=this.session.documentToScreenPosition(this.selectionAnchor),o=this.rectangularRangeBlock(n,s);o.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,i){var n=[],o=e.column0;)m--;if(m>0)for(var p=0;n[p].isEmpty();)p++;for(var A=m;A>=p;A--)n[A].isEmpty()&&n.splice(A,1)}return n}}.call(h.prototype);var A=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);t!=-1&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,i=e.length;i--;){var n=e[i];if(n.marker){this.session.removeMarker(n.marker);var s=t.indexOf(n);s!=-1&&t.splice(s,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(g.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(g.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,i=e.editor;if(i.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?n=i.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?n=i.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(i.exitMultiSelectMode(),n=t.exec(i,e.args||{})):n=t.multiSelectAction(i,e.args||{});else{var n=t.exec(i,e.args||{});i.multiSelect.addRange(i.multiSelect.toOrientedRange()),i.multiSelect.mergeOverlappingRanges()}return n}},this.forEachSelection=function(e,t,i){if(!this.inVirtualSelectionMode){var n,s=i&&i.keepOrder,o=1==i||i&&i.$byLines,r=this.session,a=this.selection,l=a.rangeList,c=(s?a:l).ranges;if(!c.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var u=a._eventRegistry;a._eventRegistry={};var d=new h(r);this.inVirtualSelectionMode=!0;for(var g=c.length;g--;){if(o)for(;g>0&&c[g].start.row==c[g-1].end.row;)g--;d.fromOrientedRange(c[g]),d.index=g,this.selection=r.selection=d;var f=e.exec?e.exec(this,t||{}):e(this,t||{});n||void 0===f||(n=f),d.toOrientedRange(c[g])}d.detach(),this.selection=r.selection=a,this.inVirtualSelectionMode=!1,a._eventRegistry=u,a.mergeOverlappingRanges();var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),n}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,i=[],n=0;no&&(o=i.column),sh?e.insert(n,d.stringRepeat(" ",s-h)):e.remove(new l(n.row,n.column,n.row,n.column-s+h)),t.start.column=t.end.column=o,t.start.row=t.end.row=n.row,t.cursor=t.end}),t.fromOrientedRange(i[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var h=this.selection.getRange(),c=h.start.row,u=h.end.row,g=c==u;if(g){var f,m=this.session.getLength();do f=this.session.getLine(u);while(/[=:]/.test(f)&&++u0);c<0&&(c=0),u>=m&&(u=m-1)}var p=this.session.doc.removeLines(c,u);p=this.$reAlignText(p,g),this.session.doc.insert({row:c,column:0},p.join("\n")+"\n"),g||(h.start.column=0,h.end.column=p[p.length-1].length),this.selection.setRange(h)}},this.$reAlignText=function(e,t){function i(e){return d.stringRepeat(" ",e)}function n(e){return e[2]?i(r)+e[2]+i(a-e[2].length+l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function s(e){return e[2]?i(r+a-e[2].length)+e[2]+i(l," ")+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function o(e){return e[2]?i(r)+e[2]+i(l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var r,a,l,h=!0,c=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==r?(r=t[1].length,a=t[2].length,l=t[3].length,t):(r+a+l!=t[1].length+t[2].length+t[3].length&&(c=!1),r!=t[1].length&&(h=!1),r>t[1].length&&(r=t[1].length),at[3].length&&(l=t[3].length),t):[e]}).map(t?n:h?c?s:n:o)}}).call(A.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var i=e.oldSession;i&&(i.multiSelect.off("addRange",this.$onAddRange),i.multiSelect.off("removeRange",this.$onRemoveRange),i.multiSelect.off("multiSelect",this.$onMultiSelect),i.multiSelect.off("singleSelect",this.$onSingleSelect),i.multiSelect.lead.off("change",this.$checkMultiselectChange),i.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=o,e("./config").defineOptions(A.prototype,"editor",{enableMultiselect:{set:function(e){o(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",c)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",c))},value:!0}})}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=e("../../range").Range,s=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,i){var n=e.getLine(i);return this.foldingStartMarker.test(n)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(e,t,i){return null},this.indentationBlock=function(e,t,i){var s=/\S/,o=e.getLine(t),r=o.search(s);if(r!=-1){for(var a=i||o.length,l=e.getLength(),h=t,c=t;++th){var d=e.getLine(c).length;return new n(h,a,c,d)}}},this.openingBracketBlock=function(e,t,i,s,o){var r={row:i,column:s+1},a=e.$findClosingBracket(t,r,o);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>r.row&&(a.row--,a.column=e.getLine(a.row).length),n.fromPoints(r,a)}},this.closingBracketBlock=function(e,t,i,s,o){var r={row:i,column:s},a=e.$findOpeningBracket(t,r);if(a)return a.column++,r.column--,n.fromPoints(a,r)}}).call(s.prototype)}),define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var n=e("../lib/dom");n.importCssString(t.cssText,t.cssClass)}),define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,t,i){"use strict";function n(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeEditor",this.$onChangeEditor)}var s=(e("./lib/oop"),e("./lib/dom"));e("./range").Range,function(){this.getRowLength=function(e){var t;return t=this.lineWidgets?this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0:0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&(e+=t.rowCount)}),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var i=this.session.lineWidgets;i&&i.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},this.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var i=e.data,n=i.range,s=n.start.row,o=n.end.row-s;if(0===o);else if("removeText"==i.action||"removeLines"==i.action){var r=t.splice(s+1,o);r.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var a=new Array(o);a.unshift(s,0),t.splice.apply(t,a),this.$updateRows()}}},this.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach(function(e,i){e&&(t=!1,e.row=i)}),t&&(this.session.lineWidgets=null)}},this.addLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength())),this.session.lineWidgets[e.row]=e;var t=this.editor.renderer;return e.html&&!e.el&&(e.el=s.createElement("div"),e.el.innerHTML=e.html),e.el&&(s.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0),e.coverGutter||(e.el.style.zIndex=3),e.pixelHeight||(e.pixelHeight=e.el.offsetHeight),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}this.session.lineWidgets&&(this.session.lineWidgets[e.row]=void 0),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var i=this.session._changedWidgets,n=t.layerConfig;if(i&&i.length){for(var s=1/0,o=0;o0&&!n[s];)s--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,t.$cursorLayer.config=i;for(var r=s;r<=o;r++){var a=n[r];if(a&&a.el){a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:r,column:0},!0).top;a.coverLine||(l+=i.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-i.offset+"px";var h=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(h-=t.scrollLeft),a.el.style.left=h+"px",a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}.call(n.prototype),t.LineWidgets=n}),define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,i){"use strict";function n(e,t,i){for(var n=0,s=e.length-1;n<=s;){var o=n+s>>1,r=i(t,e[o]);if(r>0)n=o+1;else{if(!(r<0))return o;s=o-1}}return-(n+1)}function s(e,t,i){var s=e.getAnnotations().sort(a.comparePoints);if(s.length){var o=n(s,{row:t,column:-1},a.comparePoints);o<0&&(o=-o-1),o>=s.length-1?o=i>0?0:s.length-1:0===o&&i<0&&(o=s.length-1);var r=s[o];if(r&&i){if(r.row===t){do r=s[o+=i];while(r&&r.row===t);if(!r)return s.slice()}var l=[];t=r.row;do l[i<0?"unshift":"push"](r),r=s[o+=i];while(r&&r.row==t);return l.length&&l}}}var o=e("../line_widgets").LineWidgets,r=e("../lib/dom"),a=e("../range").Range;t.showErrorMarker=function(e,t){var i=e.session;i.widgetManager||(i.widgetManager=new o(i),i.widgetManager.attach(e));var n=e.getCursorPosition(),a=n.row,l=i.lineWidgets&&i.lineWidgets[a];l?l.destroy():a-=t;var h,c=s(i,a,t);if(c){var u=c[0];n.column=(u.pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,n.row=u.row,h=e.renderer.$gutterLayer.$annotations[n.row]}else{if(l)return;h={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(n.row),e.selection.moveToPosition(n);var d={row:n.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div")},g=d.el.appendChild(r.createElement("div")),f=d.el.appendChild(r.createElement("div"));f.className="error_widget_arrow "+h.className;var m=e.renderer.$cursorLayer.getPixelPosition(n).left;f.style.left=m+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",g.className="error_widget "+h.className,g.innerHTML=h.text.join("
"),g.appendChild(r.createElement("div"));var p=function(e,t,i){if(0===t&&("esc"===i||"return"===i))return d.destroy(),{command:"null"}};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(p),i.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(p),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},r.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,i){"use strict";e("./lib/fixoldbrowsers");var n=e("./lib/dom"),s=e("./lib/event"),o=e("./editor").Editor,r=e("./edit_session").EditSession,a=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.edit=function(e){if("string"==typeof e){var i=e;if(e=document.getElementById(i),!e)throw new Error("ace.edit can't find div #"+i)}if(e&&e.env&&e.env.editor instanceof o)return e.env.editor;var r="";if(e&&/input|textarea/i.test(e.tagName)){var a=e;r=a.value,e=n.createElement("pre"),a.parentNode.replaceChild(e,a)}else r=n.getInnerText(e),e.innerHTML="";var h=t.createEditSession(r),c=new o(new l(e));c.setSession(h);var u={document:h,editor:c,onResize:c.resize.bind(c,null)};return a&&(u.textarea=a),s.addListener(window,"resize",u.onResize),c.on("destroy",function(){s.removeListener(window,"resize",u.onResize),u.editor.container.env=null}),c.container.env=c.env=u,c},t.createEditSession=function(e,t){var i=new r(e,t);return i.setUndoManager(new a),i},t.EditSession=r,t.UndoManager=a}),function(){window.require(["ace/ace"],function(e){e&&e.config.init(!0),window.ace||(window.ace=e);for(var t in e)e.hasOwnProperty(t)&&(window.ace[t]=e[t])})}(); \ No newline at end of file diff --git a/www/js/vendor/ace/ext-beautify.js b/www/js/vendor/ace/ext-beautify.js index 8e0b25d53..ab44f91f2 100755 --- a/www/js/vendor/ace/ext-beautify.js +++ b/www/js/vendor/ace/ext-beautify.js @@ -1,334 +1 @@ -define("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"], function(require, exports, module) { -"use strict"; -var TokenIterator = require("ace/token_iterator").TokenIterator; -exports.newLines = [{ - type: 'support.php_tag', - value: '' -}, { - type: 'paren.lparen', - value: '{', - indent: true -}, { - type: 'paren.rparen', - breakBefore: true, - value: '}', - indent: false -}, { - type: 'paren.rparen', - breakBefore: true, - value: '})', - indent: false, - dontBreak: true -}, { - type: 'comment' -}, { - type: 'text', - value: ';' -}, { - type: 'text', - value: ':', - context: 'php' -}, { - type: 'keyword', - value: 'case', - indent: true, - dontBreak: true -}, { - type: 'keyword', - value: 'default', - indent: true, - dontBreak: true -}, { - type: 'keyword', - value: 'break', - indent: false, - dontBreak: true -}, { - type: 'punctuation.doctype.end', - value: '>' -}, { - type: 'meta.tag.punctuation.end', - value: '>' -}, { - type: 'meta.tag.punctuation.begin', - value: '<', - blockTag: true, - indent: true, - dontBreak: true -}, { - type: 'meta.tag.punctuation.begin', - value: '' ){ - context = 'php'; - } - else if( token.type == 'support.php_tag' && token.value == '?>' ){ - context = 'html'; - } - else if( token.type == 'meta.tag.name.style' && context != 'css' ){ - context = 'css'; - } - else if( token.type == 'meta.tag.name.style' && context == 'css' ){ - context = 'html'; - } - else if( token.type == 'meta.tag.name.script' && context != 'js' ){ - context = 'js'; - } - else if( token.type == 'meta.tag.name.script' && context == 'js' ){ - context = 'html'; - } - - nextToken = iterator.stepForward(); - if (nextToken && nextToken.type.indexOf('meta.tag.name') == 0) { - nextTag = nextToken.value; - } - if ( lastToken.type == 'support.php_tag' && lastToken.value == '' ) { - dontBreak = false; - } - lastTag = tag; - - lastToken = token; - - token = nextToken; - - if (token===null) { - break; - } - } - - return code; -}; - - - -}); - -define("ace/ext/beautify",["require","exports","module","ace/token_iterator","ace/ext/beautify/php_rules"], function(require, exports, module) { -"use strict"; -var TokenIterator = require("ace/token_iterator").TokenIterator; - -var phpTransform = require("./beautify/php_rules").transform; - -exports.beautify = function(session) { - var iterator = new TokenIterator(session, 0, 0); - var token = iterator.getCurrentToken(); - - var context = session.$modeId.split("/").pop(); - - var code = phpTransform(iterator, context); - session.doc.setValue(code); -}; - -exports.commands = [{ - name: "beautify", - exec: function(editor) { - exports.beautify(editor.session); - }, - bindKey: "Ctrl-Shift-B" -}] - -}); - (function() { - window.require(["ace/ext/beautify"], function() {}); - })(); - \ No newline at end of file +define("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"],function(e,t,a){"use strict";e("ace/token_iterator").TokenIterator,t.newLines=[{type:"support.php_tag",value:""},{type:"paren.lparen",value:"{",indent:!0},{type:"paren.rparen",breakBefore:!0,value:"}",indent:!1},{type:"paren.rparen",breakBefore:!0,value:"})",indent:!1,dontBreak:!0},{type:"comment"},{type:"text",value:";"},{type:"text",value:":",context:"php"},{type:"keyword",value:"case",indent:!0,dontBreak:!0},{type:"keyword",value:"default",indent:!0,dontBreak:!0},{type:"keyword",value:"break",indent:!1,dontBreak:!0},{type:"punctuation.doctype.end",value:">"},{type:"meta.tag.punctuation.end",value:">"},{type:"meta.tag.punctuation.begin",value:"<",blockTag:!0,indent:!0,dontBreak:!0},{type:"meta.tag.punctuation.begin",value:""!=u.value?p="php":"support.php_tag"==u.type&&"?>"==u.value?p="html":"meta.tag.name.style"==u.type&&"css"!=p?p="css":"meta.tag.name.style"==u.type&&"css"==p?p="html":"meta.tag.name.script"==u.type&&"js"!=p?p="js":"meta.tag.name.script"==u.type&&"js"==p&&(p="html"),f=e.stepForward(),f&&0==f.type.indexOf("meta.tag.name")&&(o=f.value),"support.php_tag"==c.type&&""==c.value&&(v=!1),r=n,c=u,u=f,null===u)break}else u=f;else u=e.stepForward();return d}}),define("ace/ext/beautify",["require","exports","module","ace/token_iterator","ace/ext/beautify/php_rules"],function(e,t,a){"use strict";var p=e("ace/token_iterator").TokenIterator,n=e("./beautify/php_rules").transform;t.beautify=function(e){var t=new p(e,0,0),a=(t.getCurrentToken(),e.$modeId.split("/").pop()),r=n(t,a);e.doc.setValue(r)},t.commands=[{name:"beautify",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]}),function(){window.require(["ace/ext/beautify"],function(){})}(); \ No newline at end of file diff --git a/www/js/vendor/ace/ext-chromevox.js b/www/js/vendor/ace/ext-chromevox.js index 74e04943f..c3a0d72d5 100755 --- a/www/js/vendor/ace/ext-chromevox.js +++ b/www/js/vendor/ace/ext-chromevox.js @@ -1,541 +1 @@ -define("ace/ext/chromevox",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) { -var cvoxAce = {}; -cvoxAce.SpeechProperty; -cvoxAce.Cursor; -cvoxAce.Token; -cvoxAce.Annotation; -var CONSTANT_PROP = { - 'rate': 0.8, - 'pitch': 0.4, - 'volume': 0.9 -}; -var DEFAULT_PROP = { - 'rate': 1, - 'pitch': 0.5, - 'volume': 0.9 -}; -var ENTITY_PROP = { - 'rate': 0.8, - 'pitch': 0.8, - 'volume': 0.9 -}; -var KEYWORD_PROP = { - 'rate': 0.8, - 'pitch': 0.3, - 'volume': 0.9 -}; -var STORAGE_PROP = { - 'rate': 0.8, - 'pitch': 0.7, - 'volume': 0.9 -}; -var VARIABLE_PROP = { - 'rate': 0.8, - 'pitch': 0.8, - 'volume': 0.9 -}; -var DELETED_PROP = { - 'punctuationEcho': 'none', - 'relativePitch': -0.6 -}; -var ERROR_EARCON = 'ALERT_NONMODAL'; -var MODE_SWITCH_EARCON = 'ALERT_MODAL'; -var NO_MATCH_EARCON = 'INVALID_KEYPRESS'; -var INSERT_MODE_STATE = 'insertMode'; -var COMMAND_MODE_STATE = 'start'; - -var REPLACE_LIST = [ - { - substr: ';', - newSubstr: ' semicolon ' - }, - { - substr: ':', - newSubstr: ' colon ' - } -]; -var Command = { - SPEAK_ANNOT: 'annots', - SPEAK_ALL_ANNOTS: 'all_annots', - TOGGLE_LOCATION: 'toggle_location', - SPEAK_MODE: 'mode', - SPEAK_ROW_COL: 'row_col', - TOGGLE_DISPLACEMENT: 'toggle_displacement', - FOCUS_TEXT: 'focus_text' -}; -var KEY_PREFIX = 'CONTROL + SHIFT '; -cvoxAce.editor = null; -var lastCursor = null; -var annotTable = {}; -var shouldSpeakRowLocation = false; -var shouldSpeakDisplacement = false; -var changed = false; -var vimState = null; -var keyCodeToShortcutMap = {}; -var cmdToShortcutMap = {}; -var getKeyShortcutString = function(keyCode) { - return KEY_PREFIX + String.fromCharCode(keyCode); -}; -var isVimMode = function() { - var keyboardHandler = cvoxAce.editor.keyBinding.getKeyboardHandler(); - return keyboardHandler.$id === 'ace/keyboard/vim'; -}; -var getCurrentToken = function(cursor) { - return cvoxAce.editor.getSession().getTokenAt(cursor.row, cursor.column + 1); -}; -var getCurrentLine = function(cursor) { - return cvoxAce.editor.getSession().getLine(cursor.row); -}; -var onRowChange = function(currCursor) { - if (annotTable[currCursor.row]) { - cvox.Api.playEarcon(ERROR_EARCON); - } - if (shouldSpeakRowLocation) { - cvox.Api.stop(); - speakChar(currCursor); - speakTokenQueue(getCurrentToken(currCursor)); - speakLine(currCursor.row, 1); - } else { - speakLine(currCursor.row, 0); - } -}; -var isWord = function(cursor) { - var line = getCurrentLine(cursor); - var lineSuffix = line.substr(cursor.column - 1); - if (cursor.column === 0) { - lineSuffix = ' ' + line; - } - var firstWordRegExp = /^\W(\w+)/; - var words = firstWordRegExp.exec(lineSuffix); - return words !== null; -}; -var rules = { - 'constant': { - prop: CONSTANT_PROP - }, - 'entity': { - prop: ENTITY_PROP - }, - 'keyword': { - prop: KEYWORD_PROP - }, - 'storage': { - prop: STORAGE_PROP - }, - 'variable': { - prop: VARIABLE_PROP - }, - 'meta': { - prop: DEFAULT_PROP, - replace: [ - { - substr: '', - newSubstr: ' close tag ' - }, - { - substr: '<', - newSubstr: ' tag start ' - }, - { - substr: '>', - newSubstr: ' tag end ' - } - ] - } -}; -var DEFAULT_RULE = { - prop: DEFAULT_RULE -}; -var expand = function(value, replaceRules) { - var newValue = value; - for (var i = 0; i < replaceRules.length; i++) { - var replaceRule = replaceRules[i]; - var regexp = new RegExp(replaceRule.substr, 'g'); - newValue = newValue.replace(regexp, replaceRule.newSubstr); - } - return newValue; -}; -var mergeTokens = function(tokens, start, end) { - var newToken = {}; - newToken.value = ''; - newToken.type = tokens[start].type; - for (var j = start; j < end; j++) { - newToken.value += tokens[j].value; - } - return newToken; -}; -var mergeLikeTokens = function(tokens) { - if (tokens.length <= 1) { - return tokens; - } - var newTokens = []; - var lastLikeIndex = 0; - for (var i = 1; i < tokens.length; i++) { - var lastLikeToken = tokens[lastLikeIndex]; - var currToken = tokens[i]; - if (getTokenRule(lastLikeToken) !== getTokenRule(currToken)) { - newTokens.push(mergeTokens(tokens, lastLikeIndex, i)); - lastLikeIndex = i; - } - } - newTokens.push(mergeTokens(tokens, lastLikeIndex, tokens.length)); - return newTokens; -}; -var isRowWhiteSpace = function(row) { - var line = cvoxAce.editor.getSession().getLine(row); - var whiteSpaceRegexp = /^\s*$/; - return whiteSpaceRegexp.exec(line) !== null; -}; -var speakLine = function(row, queue) { - var tokens = cvoxAce.editor.getSession().getTokens(row); - if (tokens.length === 0 || isRowWhiteSpace(row)) { - cvox.Api.playEarcon('EDITABLE_TEXT'); - return; - } - tokens = mergeLikeTokens(tokens); - var firstToken = tokens[0]; - tokens = tokens.filter(function(token) { - return token !== firstToken; - }); - speakToken_(firstToken, queue); - tokens.forEach(speakTokenQueue); -}; -var speakTokenFlush = function(token) { - speakToken_(token, 0); -}; -var speakTokenQueue = function(token) { - speakToken_(token, 1); -}; -var getTokenRule = function(token) { - if (!token || !token.type) { - return; - } - var split = token.type.split('.'); - if (split.length === 0) { - return; - } - var type = split[0]; - var rule = rules[type]; - if (!rule) { - return DEFAULT_RULE; - } - return rule; -}; -var speakToken_ = function(token, queue) { - var rule = getTokenRule(token); - var value = expand(token.value, REPLACE_LIST); - if (rule.replace) { - value = expand(value, rule.replace); - } - cvox.Api.speak(value, queue, rule.prop); -}; -var speakChar = function(cursor) { - var line = getCurrentLine(cursor); - cvox.Api.speak(line[cursor.column], 1); -}; -var speakDisplacement = function(lastCursor, currCursor) { - var line = getCurrentLine(currCursor); - var displace = line.substring(lastCursor.column, currCursor.column); - displace = displace.replace(/ /g, ' space '); - cvox.Api.speak(displace); -}; -var speakCharOrWordOrLine = function(lastCursor, currCursor) { - if (Math.abs(lastCursor.column - currCursor.column) !== 1) { - var currLineLength = getCurrentLine(currCursor).length; - if (currCursor.column === 0 || currCursor.column === currLineLength) { - speakLine(currCursor.row, 0); - return; - } - if (isWord(currCursor)) { - cvox.Api.stop(); - speakTokenQueue(getCurrentToken(currCursor)); - return; - } - } - speakChar(currCursor); -}; -var onColumnChange = function(lastCursor, currCursor) { - if (!cvoxAce.editor.selection.isEmpty()) { - speakDisplacement(lastCursor, currCursor); - cvox.Api.speak('selected', 1); - } - else if (shouldSpeakDisplacement) { - speakDisplacement(lastCursor, currCursor); - } else { - speakCharOrWordOrLine(lastCursor, currCursor); - } -}; -var onCursorChange = function(evt) { - if (changed) { - changed = false; - return; - } - var currCursor = cvoxAce.editor.selection.getCursor(); - if (currCursor.row !== lastCursor.row) { - onRowChange(currCursor); - } else { - onColumnChange(lastCursor, currCursor); - } - lastCursor = currCursor; -}; -var onSelectionChange = function(evt) { - if (cvoxAce.editor.selection.isEmpty()) { - cvox.Api.speak('unselected'); - } -}; -var onChange = function(evt) { - var data = evt.data; - switch (data.action) { - case 'removeText': - cvox.Api.speak(data.text, 0, DELETED_PROP); - changed = true; - break; - case 'insertText': - cvox.Api.speak(data.text, 0); - changed = true; - break; - } -}; -var isNewAnnotation = function(annot) { - var row = annot.row; - var col = annot.column; - return !annotTable[row] || !annotTable[row][col]; -}; -var populateAnnotations = function(annotations) { - annotTable = {}; - for (var i = 0; i < annotations.length; i++) { - var annotation = annotations[i]; - var row = annotation.row; - var col = annotation.column; - if (!annotTable[row]) { - annotTable[row] = {}; - } - annotTable[row][col] = annotation; - } -}; -var onAnnotationChange = function(evt) { - var annotations = cvoxAce.editor.getSession().getAnnotations(); - var newAnnotations = annotations.filter(isNewAnnotation); - if (newAnnotations.length > 0) { - cvox.Api.playEarcon(ERROR_EARCON); - } - populateAnnotations(annotations); -}; -var speakAnnot = function(annot) { - var annotText = annot.type + ' ' + annot.text + ' on ' + - rowColToString(annot.row, annot.column); - annotText = annotText.replace(';', 'semicolon'); - cvox.Api.speak(annotText, 1); -}; -var speakAnnotsByRow = function(row) { - var annots = annotTable[row]; - for (var col in annots) { - speakAnnot(annots[col]); - } -}; -var rowColToString = function(row, col) { - return 'row ' + (row + 1) + ' column ' + (col + 1); -}; -var speakCurrRowAndCol = function() { - cvox.Api.speak(rowColToString(lastCursor.row, lastCursor.column)); -}; -var speakAllAnnots = function() { - for (var row in annotTable) { - speakAnnotsByRow(row); - } -}; -var speakMode = function() { - if (!isVimMode()) { - return; - } - switch (cvoxAce.editor.keyBinding.$data.state) { - case INSERT_MODE_STATE: - cvox.Api.speak('Insert mode'); - break; - case COMMAND_MODE_STATE: - cvox.Api.speak('Command mode'); - break; - } -}; -var toggleSpeakRowLocation = function() { - shouldSpeakRowLocation = !shouldSpeakRowLocation; - if (shouldSpeakRowLocation) { - cvox.Api.speak('Speak location on row change enabled.'); - } else { - cvox.Api.speak('Speak location on row change disabled.'); - } -}; -var toggleSpeakDisplacement = function() { - shouldSpeakDisplacement = !shouldSpeakDisplacement; - if (shouldSpeakDisplacement) { - cvox.Api.speak('Speak displacement on column changes.'); - } else { - cvox.Api.speak('Speak current character or word on column changes.'); - } -}; -var onKeyDown = function(evt) { - if (evt.ctrlKey && evt.shiftKey) { - var shortcut = keyCodeToShortcutMap[evt.keyCode]; - if (shortcut) { - shortcut.func(); - } - } -}; -var onChangeStatus = function(evt, editor) { - if (!isVimMode()) { - return; - } - var state = editor.keyBinding.$data.state; - if (state === vimState) { - return; - } - switch (state) { - case INSERT_MODE_STATE: - cvox.Api.playEarcon(MODE_SWITCH_EARCON); - cvox.Api.setKeyEcho(true); - break; - case COMMAND_MODE_STATE: - cvox.Api.playEarcon(MODE_SWITCH_EARCON); - cvox.Api.setKeyEcho(false); - break; - } - vimState = state; -}; -var contextMenuHandler = function(evt) { - var cmd = evt.detail['customCommand']; - var shortcut = cmdToShortcutMap[cmd]; - if (shortcut) { - shortcut.func(); - cvoxAce.editor.focus(); - } -}; -var initContextMenu = function() { - var ACTIONS = SHORTCUTS.map(function(shortcut) { - return { - desc: shortcut.desc + getKeyShortcutString(shortcut.keyCode), - cmd: shortcut.cmd - }; - }); - var body = document.querySelector('body'); - body.setAttribute('contextMenuActions', JSON.stringify(ACTIONS)); - body.addEventListener('ATCustomEvent', contextMenuHandler, true); -}; -var onFindSearchbox = function(evt) { - if (evt.match) { - speakLine(lastCursor.row, 0); - } else { - cvox.Api.playEarcon(NO_MATCH_EARCON); - } -}; -var focus = function() { - cvoxAce.editor.focus(); -}; -var SHORTCUTS = [ - { - keyCode: 49, - func: function() { - speakAnnotsByRow(lastCursor.row); - }, - cmd: Command.SPEAK_ANNOT, - desc: 'Speak annotations on line' - }, - { - keyCode: 50, - func: speakAllAnnots, - cmd: Command.SPEAK_ALL_ANNOTS, - desc: 'Speak all annotations' - }, - { - keyCode: 51, - func: speakMode, - cmd: Command.SPEAK_MODE, - desc: 'Speak Vim mode' - }, - { - keyCode: 52, - func: toggleSpeakRowLocation, - cmd: Command.TOGGLE_LOCATION, - desc: 'Toggle speak row location' - }, - { - keyCode: 53, - func: speakCurrRowAndCol, - cmd: Command.SPEAK_ROW_COL, - desc: 'Speak row and column' - }, - { - keyCode: 54, - func: toggleSpeakDisplacement, - cmd: Command.TOGGLE_DISPLACEMENT, - desc: 'Toggle speak displacement' - }, - { - keyCode: 55, - func: focus, - cmd: Command.FOCUS_TEXT, - desc: 'Focus text' - } -]; -var onFocus = function() { - cvoxAce.editor = editor; - editor.getSession().selection.on('changeCursor', onCursorChange); - editor.getSession().selection.on('changeSelection', onSelectionChange); - editor.getSession().on('change', onChange); - editor.getSession().on('changeAnnotation', onAnnotationChange); - editor.on('changeStatus', onChangeStatus); - editor.on('findSearchBox', onFindSearchbox); - editor.container.addEventListener('keydown', onKeyDown); - - lastCursor = editor.selection.getCursor(); -}; -var init = function(editor) { - onFocus(); - SHORTCUTS.forEach(function(shortcut) { - keyCodeToShortcutMap[shortcut.keyCode] = shortcut; - cmdToShortcutMap[shortcut.cmd] = shortcut; - }); - - editor.on('focus', onFocus); - if (isVimMode()) { - cvox.Api.setKeyEcho(false); - } - initContextMenu(); -}; -function cvoxApiExists() { - return (typeof(cvox) !== 'undefined') && cvox && cvox.Api; -} -var tries = 0; -var MAX_TRIES = 15; -function watchForCvoxLoad(editor) { - if (cvoxApiExists()) { - init(editor); - } else { - tries++; - if (tries >= MAX_TRIES) { - return; - } - window.setTimeout(watchForCvoxLoad, 500, editor); - } -} - -var Editor = require('../editor').Editor; -require('../config').defineOptions(Editor.prototype, 'editor', { - enableChromevoxEnhancements: { - set: function(val) { - if (val) { - watchForCvoxLoad(this); - } - }, - value: true // turn it on by default or check for window.cvox - } -}); - -}); - (function() { - window.require(["ace/ext/chromevox"], function() {}); - })(); - \ No newline at end of file +define("ace/ext/chromevox",["require","exports","module","ace/editor","ace/config"],function(e,o,n){function t(){return"undefined"!=typeof cvox&&cvox&&cvox.Api}function r(e){if(t())Ae(e);else{if(he++,he>=Se)return;window.setTimeout(r,500,e)}}var c={};c.SpeechProperty,c.Cursor,c.Token,c.Annotation;var i={rate:.8,pitch:.4,volume:.9},a={rate:1,pitch:.5,volume:.9},u={rate:.8,pitch:.8,volume:.9},s={rate:.8,pitch:.3,volume:.9},p={rate:.8,pitch:.7,volume:.9},d={rate:.8,pitch:.8,volume:.9},l={punctuationEcho:"none",relativePitch:-.6},f="ALERT_NONMODAL",v="ALERT_MODAL",m="INVALID_KEYPRESS",g="insertMode",A="start",h=[{substr:";",newSubstr:" semicolon "},{substr:":",newSubstr:" colon "}],S={SPEAK_ANNOT:"annots",SPEAK_ALL_ANNOTS:"all_annots",TOGGLE_LOCATION:"toggle_location",SPEAK_MODE:"mode",SPEAK_ROW_COL:"row_col",TOGGLE_DISPLACEMENT:"toggle_displacement",FOCUS_TEXT:"focus_text"},k="CONTROL + SHIFT ";c.editor=null;var x=null,E={},y=!1,w=!1,T=!1,C=null,b={},O={},_=function(e){return k+String.fromCharCode(e)},L=function(){var e=c.editor.keyBinding.getKeyboardHandler();return"ace/keyboard/vim"===e.$id},N=function(e){return c.editor.getSession().getTokenAt(e.row,e.column+1)},K=function(e){return c.editor.getSession().getLine(e.row)},P=function(e){E[e.row]&&cvox.Api.playEarcon(f),y?(cvox.Api.stop(),H(e),q(N(e)),$(e.row,1)):$(e.row,0)},I=function(e){var o=K(e),n=o.substr(e.column-1);0===e.column&&(n=" "+o);var t=/^\W(\w+)/,r=t.exec(n);return null!==r},M={constant:{prop:i},entity:{prop:u},keyword:{prop:s},storage:{prop:p},variable:{prop:d},meta:{prop:a,replace:[{substr:"",newSubstr:" close tag "},{substr:"<",newSubstr:" tag start "},{substr:">",newSubstr:" tag end "}]}},D={prop:D},G=function(e,o){for(var n=e,t=0;t0&&cvox.Api.playEarcon(f),Z(o)},oe=function(e){var o=e.type+" "+e.text+" on "+te(e.row,e.column);o=o.replace(";","semicolon"),cvox.Api.speak(o,1)},ne=function(e){var o=E[e];for(var n in o)oe(o[n])},te=function(e,o){return"row "+(e+1)+" column "+(o+1)},re=function(){cvox.Api.speak(te(x.row,x.column))},ce=function(){for(var e in E)ne(e)},ie=function(){if(L())switch(c.editor.keyBinding.$data.state){case g:cvox.Api.speak("Insert mode");break;case A:cvox.Api.speak("Command mode")}},ae=function(){y=!y,y?cvox.Api.speak("Speak location on row change enabled."):cvox.Api.speak("Speak location on row change disabled.")},ue=function(){w=!w,w?cvox.Api.speak("Speak displacement on column changes."):cvox.Api.speak("Speak current character or word on column changes.")},se=function(e){if(e.ctrlKey&&e.shiftKey){var o=b[e.keyCode];o&&o.func()}},pe=function(e,o){if(L()){var n=o.keyBinding.$data.state;if(n!==C){switch(n){case g:cvox.Api.playEarcon(v),cvox.Api.setKeyEcho(!0);break;case A:cvox.Api.playEarcon(v),cvox.Api.setKeyEcho(!1)}C=n}}},de=function(e){var o=e.detail.customCommand,n=O[o];n&&(n.func(),c.editor.focus())},le=function(){var e=me.map(function(e){return{desc:e.desc+_(e.keyCode),cmd:e.cmd}}),o=document.querySelector("body");o.setAttribute("contextMenuActions",JSON.stringify(e)),o.addEventListener("ATCustomEvent",de,!0)},fe=function(e){e.match?$(x.row,0):cvox.Api.playEarcon(m)},ve=function(){c.editor.focus()},me=[{keyCode:49,func:function(){ne(x.row)},cmd:S.SPEAK_ANNOT,desc:"Speak annotations on line"},{keyCode:50,func:ce,cmd:S.SPEAK_ALL_ANNOTS,desc:"Speak all annotations"},{keyCode:51,func:ie,cmd:S.SPEAK_MODE,desc:"Speak Vim mode"},{keyCode:52,func:ae,cmd:S.TOGGLE_LOCATION,desc:"Toggle speak row location"},{keyCode:53,func:re,cmd:S.SPEAK_ROW_COL,desc:"Speak row and column"},{keyCode:54,func:ue,cmd:S.TOGGLE_DISPLACEMENT,desc:"Toggle speak displacement"},{keyCode:55,func:ve,cmd:S.FOCUS_TEXT,desc:"Focus text"}],ge=function(){c.editor=editor,editor.getSession().selection.on("changeCursor",Y),editor.getSession().selection.on("changeSelection",j),editor.getSession().on("change",z),editor.getSession().on("changeAnnotation",ee),editor.on("changeStatus",pe),editor.on("findSearchBox",fe),editor.container.addEventListener("keydown",se),x=editor.selection.getCursor()},Ae=function(e){ge(),me.forEach(function(e){b[e.keyCode]=e,O[e.cmd]=e}),e.on("focus",ge),L()&&cvox.Api.setKeyEcho(!1),le()},he=0,Se=15,ke=e("../editor").Editor;e("../config").defineOptions(ke.prototype,"editor",{enableChromevoxEnhancements:{set:function(e){e&&r(this)},value:!0}})}),function(){window.require(["ace/ext/chromevox"],function(){})}(); \ No newline at end of file diff --git a/www/js/vendor/ace/ext-elastic_tabstops_lite.js b/www/js/vendor/ace/ext-elastic_tabstops_lite.js index a4faeac80..48db165a0 100755 --- a/www/js/vendor/ace/ext-elastic_tabstops_lite.js +++ b/www/js/vendor/ace/ext-elastic_tabstops_lite.js @@ -1,275 +1 @@ -define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) { -"use strict"; - -var ElasticTabstopsLite = function(editor) { - this.$editor = editor; - var self = this; - var changedRows = []; - var recordChanges = false; - this.onAfterExec = function() { - recordChanges = false; - self.processRows(changedRows); - changedRows = []; - }; - this.onExec = function() { - recordChanges = true; - }; - this.onChange = function(e) { - var range = e.data.range - if (recordChanges) { - if (changedRows.indexOf(range.start.row) == -1) - changedRows.push(range.start.row); - if (range.end.row != range.start.row) - changedRows.push(range.end.row); - } - }; -}; - -(function() { - this.processRows = function(rows) { - this.$inChange = true; - var checkedRows = []; - - for (var r = 0, rowCount = rows.length; r < rowCount; r++) { - var row = rows[r]; - - if (checkedRows.indexOf(row) > -1) - continue; - - var cellWidthObj = this.$findCellWidthsForBlock(row); - var cellWidths = this.$setBlockCellWidthsToMax(cellWidthObj.cellWidths); - var rowIndex = cellWidthObj.firstRow; - - for (var w = 0, l = cellWidths.length; w < l; w++) { - var widths = cellWidths[w]; - checkedRows.push(rowIndex); - this.$adjustRow(rowIndex, widths); - rowIndex++; - } - } - this.$inChange = false; - }; - - this.$findCellWidthsForBlock = function(row) { - var cellWidths = [], widths; - var rowIter = row; - while (rowIter >= 0) { - widths = this.$cellWidthsForRow(rowIter); - if (widths.length == 0) - break; - - cellWidths.unshift(widths); - rowIter--; - } - var firstRow = rowIter + 1; - rowIter = row; - var numRows = this.$editor.session.getLength(); - - while (rowIter < numRows - 1) { - rowIter++; - - widths = this.$cellWidthsForRow(rowIter); - if (widths.length == 0) - break; - - cellWidths.push(widths); - } - - return { cellWidths: cellWidths, firstRow: firstRow }; - }; - - this.$cellWidthsForRow = function(row) { - var selectionColumns = this.$selectionColumnsForRow(row); - - var tabs = [-1].concat(this.$tabsForRow(row)); - var widths = tabs.map(function(el) { return 0; } ).slice(1); - var line = this.$editor.session.getLine(row); - - for (var i = 0, len = tabs.length - 1; i < len; i++) { - var leftEdge = tabs[i]+1; - var rightEdge = tabs[i+1]; - - var rightmostSelection = this.$rightmostSelectionInCell(selectionColumns, rightEdge); - var cell = line.substring(leftEdge, rightEdge); - widths[i] = Math.max(cell.replace(/\s+$/g,'').length, rightmostSelection - leftEdge); - } - - return widths; - }; - - this.$selectionColumnsForRow = function(row) { - var selections = [], cursor = this.$editor.getCursorPosition(); - if (this.$editor.session.getSelection().isEmpty()) { - if (row == cursor.row) - selections.push(cursor.column); - } - - return selections; - }; - - this.$setBlockCellWidthsToMax = function(cellWidths) { - var startingNewBlock = true, blockStartRow, blockEndRow, maxWidth; - var columnInfo = this.$izip_longest(cellWidths); - - for (var c = 0, l = columnInfo.length; c < l; c++) { - var column = columnInfo[c]; - if (!column.push) { - console.error(column); - continue; - } - column.push(NaN); - - for (var r = 0, s = column.length; r < s; r++) { - var width = column[r]; - if (startingNewBlock) { - blockStartRow = r; - maxWidth = 0; - startingNewBlock = false; - } - if (isNaN(width)) { - blockEndRow = r; - - for (var j = blockStartRow; j < blockEndRow; j++) { - cellWidths[j][c] = maxWidth; - } - startingNewBlock = true; - } - - maxWidth = Math.max(maxWidth, width); - } - } - - return cellWidths; - }; - - this.$rightmostSelectionInCell = function(selectionColumns, cellRightEdge) { - var rightmost = 0; - - if (selectionColumns.length) { - var lengths = []; - for (var s = 0, length = selectionColumns.length; s < length; s++) { - if (selectionColumns[s] <= cellRightEdge) - lengths.push(s); - else - lengths.push(0); - } - rightmost = Math.max.apply(Math, lengths); - } - - return rightmost; - }; - - this.$tabsForRow = function(row) { - var rowTabs = [], line = this.$editor.session.getLine(row), - re = /\t/g, match; - - while ((match = re.exec(line)) != null) { - rowTabs.push(match.index); - } - - return rowTabs; - }; - - this.$adjustRow = function(row, widths) { - var rowTabs = this.$tabsForRow(row); - - if (rowTabs.length == 0) - return; - - var bias = 0, location = -1; - var expandedSet = this.$izip(widths, rowTabs); - - for (var i = 0, l = expandedSet.length; i < l; i++) { - var w = expandedSet[i][0], it = expandedSet[i][1]; - location += 1 + w; - it += bias; - var difference = location - it; - - if (difference == 0) - continue; - - var partialLine = this.$editor.session.getLine(row).substr(0, it ); - var strippedPartialLine = partialLine.replace(/\s*$/g, ""); - var ispaces = partialLine.length - strippedPartialLine.length; - - if (difference > 0) { - this.$editor.session.getDocument().insertInLine({row: row, column: it + 1}, Array(difference + 1).join(" ") + "\t"); - this.$editor.session.getDocument().removeInLine(row, it, it + 1); - - bias += difference; - } - - if (difference < 0 && ispaces >= -difference) { - this.$editor.session.getDocument().removeInLine(row, it + difference, it); - bias += difference; - } - } - }; - this.$izip_longest = function(iterables) { - if (!iterables[0]) - return []; - var longest = iterables[0].length; - var iterablesLength = iterables.length; - - for (var i = 1; i < iterablesLength; i++) { - var iLength = iterables[i].length; - if (iLength > longest) - longest = iLength; - } - - var expandedSet = []; - - for (var l = 0; l < longest; l++) { - var set = []; - for (var i = 0; i < iterablesLength; i++) { - if (iterables[i][l] === "") - set.push(NaN); - else - set.push(iterables[i][l]); - } - - expandedSet.push(set); - } - - - return expandedSet; - }; - this.$izip = function(widths, tabs) { - var size = widths.length >= tabs.length ? tabs.length : widths.length; - - var expandedSet = []; - for (var i = 0; i < size; i++) { - var set = [ widths[i], tabs[i] ]; - expandedSet.push(set); - } - return expandedSet; - }; - -}).call(ElasticTabstopsLite.prototype); - -exports.ElasticTabstopsLite = ElasticTabstopsLite; - -var Editor = require("../editor").Editor; -require("../config").defineOptions(Editor.prototype, "editor", { - useElasticTabstops: { - set: function(val) { - if (val) { - if (!this.elasticTabstops) - this.elasticTabstops = new ElasticTabstopsLite(this); - this.commands.on("afterExec", this.elasticTabstops.onAfterExec); - this.commands.on("exec", this.elasticTabstops.onExec); - this.on("change", this.elasticTabstops.onChange); - } else if (this.elasticTabstops) { - this.commands.removeListener("afterExec", this.elasticTabstops.onAfterExec); - this.commands.removeListener("exec", this.elasticTabstops.onExec); - this.removeListener("change", this.elasticTabstops.onChange); - } - } - } -}); - -}); - (function() { - window.require(["ace/ext/elastic_tabstops_lite"], function() {}); - })(); - \ No newline at end of file +define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"],function(t,s,e){"use strict";var i=function(t){this.$editor=t;var s=this,e=[],i=!1;this.onAfterExec=function(){i=!1,s.processRows(e),e=[]},this.onExec=function(){i=!0},this.onChange=function(t){var s=t.data.range;i&&(e.indexOf(s.start.row)==-1&&e.push(s.start.row),s.end.row!=s.start.row&&e.push(s.end.row))}};(function(){this.processRows=function(t){this.$inChange=!0;for(var s=[],e=0,i=t.length;e-1))for(var n=this.$findCellWidthsForBlock(o),r=this.$setBlockCellWidthsToMax(n.cellWidths),h=n.firstRow,a=0,c=r.length;a=0&&(s=this.$cellWidthsForRow(i),0!=s.length);)e.unshift(s),i--;var o=i+1;i=t;for(var n=this.$editor.session.getLength();i0&&(this.$editor.session.getDocument().insertInLine({row:t,column:c+1},Array(l+1).join(" ")+"\t"),this.$editor.session.getDocument().removeInLine(t,c,c+1),i+=l),l<0&&g>=-l&&(this.$editor.session.getDocument().removeInLine(t,c+l,c),i+=l)}}},this.$izip_longest=function(t){if(!t[0])return[];for(var s=t[0].length,e=t.length,i=1;is&&(s=o)}for(var n=[],r=0;r=s.length?s.length:t.length,i=[],o=0;o "a"}; - } - } - - return [val]; - }}, - {regex: /}/, onMatch: function(val, state, stack) { - return [stack.length ? stack.shift() : val]; - }}, - {regex: /\$(?:\d+|\w+)/, onMatch: TabstopToken}, - {regex: /\$\{[\dA-Z_a-z]+/, onMatch: function(str, state, stack) { - var t = TabstopToken(str.substr(1), state, stack); - stack.unshift(t[0]); - return t; - }, next: "snippetVar"}, - {regex: /\n/, token: "newline", merge: false} - ], - snippetVar: [ - {regex: "\\|" + escape("\\|") + "*\\|", onMatch: function(val, state, stack) { - stack[0].choices = val.slice(1, -1).split(","); - }, next: "start"}, - {regex: "/(" + escape("/") + "+)/(?:(" + escape("/") + "*)/)(\\w*):?", - onMatch: function(val, state, stack) { - var ts = stack[0]; - ts.fmtString = val; - - val = this.splitRegex.exec(val); - ts.guard = val[1]; - ts.fmt = val[2]; - ts.flag = val[3]; - return ""; - }, next: "start"}, - {regex: "`" + escape("`") + "*`", onMatch: function(val, state, stack) { - stack[0].code = val.splice(1, -1); - return ""; - }, next: "start"}, - {regex: "\\?", onMatch: function(val, state, stack) { - if (stack[0]) - stack[0].expectIf = true; - }, next: "start"}, - {regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "start"} - ], - formatString: [ - {regex: "/(" + escape("/") + "+)/", token: "regex"}, - {regex: "", onMatch: function(val, state, stack) { - stack.inFormatString = true; - }, next: "start"} - ] - }); - SnippetManager.prototype.getTokenizer = function() { - return SnippetManager.$tokenizer; - }; - return SnippetManager.$tokenizer; - }; - - this.tokenizeTmSnippet = function(str, startState) { - return this.getTokenizer().getLineTokens(str, startState).tokens.map(function(x) { - return x.value || x; - }); - }; - - this.$getDefaultValue = function(editor, name) { - if (/^[A-Z]\d+$/.test(name)) { - var i = name.substr(1); - return (this.variables[name[0] + "__"] || {})[i]; - } - if (/^\d+$/.test(name)) { - return (this.variables.__ || {})[name]; - } - name = name.replace(/^TM_/, ""); - - if (!editor) - return; - var s = editor.session; - switch(name) { - case "CURRENT_WORD": - var r = s.getWordRange(); - case "SELECTION": - case "SELECTED_TEXT": - return s.getTextRange(r); - case "CURRENT_LINE": - return s.getLine(editor.getCursorPosition().row); - case "PREV_LINE": // not possible in textmate - return s.getLine(editor.getCursorPosition().row - 1); - case "LINE_INDEX": - return editor.getCursorPosition().column; - case "LINE_NUMBER": - return editor.getCursorPosition().row + 1; - case "SOFT_TABS": - return s.getUseSoftTabs() ? "YES" : "NO"; - case "TAB_SIZE": - return s.getTabSize(); - case "FILENAME": - case "FILEPATH": - return ""; - case "FULLNAME": - return "Ace"; - } - }; - this.variables = {}; - this.getVariableValue = function(editor, varName) { - if (this.variables.hasOwnProperty(varName)) - return this.variables[varName](editor, varName) || ""; - return this.$getDefaultValue(editor, varName) || ""; - }; - this.tmStrFormat = function(str, ch, editor) { - var flag = ch.flag || ""; - var re = ch.guard; - re = new RegExp(re, flag.replace(/[^gi]/, "")); - var fmtTokens = this.tokenizeTmSnippet(ch.fmt, "formatString"); - var _self = this; - var formatted = str.replace(re, function() { - _self.variables.__ = arguments; - var fmtParts = _self.resolveVariables(fmtTokens, editor); - var gChangeCase = "E"; - for (var i = 0; i < fmtParts.length; i++) { - var ch = fmtParts[i]; - if (typeof ch == "object") { - fmtParts[i] = ""; - if (ch.changeCase && ch.local) { - var next = fmtParts[i + 1]; - if (next && typeof next == "string") { - if (ch.changeCase == "u") - fmtParts[i] = next[0].toUpperCase(); - else - fmtParts[i] = next[0].toLowerCase(); - fmtParts[i + 1] = next.substr(1); - } - } else if (ch.changeCase) { - gChangeCase = ch.changeCase; - } - } else if (gChangeCase == "U") { - fmtParts[i] = ch.toUpperCase(); - } else if (gChangeCase == "L") { - fmtParts[i] = ch.toLowerCase(); - } - } - return fmtParts.join(""); - }); - this.variables.__ = null; - return formatted; - }; - - this.resolveVariables = function(snippet, editor) { - var result = []; - for (var i = 0; i < snippet.length; i++) { - var ch = snippet[i]; - if (typeof ch == "string") { - result.push(ch); - } else if (typeof ch != "object") { - continue; - } else if (ch.skip) { - gotoNext(ch); - } else if (ch.processed < i) { - continue; - } else if (ch.text) { - var value = this.getVariableValue(editor, ch.text); - if (value && ch.fmtString) - value = this.tmStrFormat(value, ch); - ch.processed = i; - if (ch.expectIf == null) { - if (value) { - result.push(value); - gotoNext(ch); - } - } else { - if (value) { - ch.skip = ch.elseBranch; - } else - gotoNext(ch); - } - } else if (ch.tabstopId != null) { - result.push(ch); - } else if (ch.changeCase != null) { - result.push(ch); - } - } - function gotoNext(ch) { - var i1 = snippet.indexOf(ch, i + 1); - if (i1 != -1) - i = i1; - } - return result; - }; - - this.insertSnippetForSelection = function(editor, snippetText) { - var cursor = editor.getCursorPosition(); - var line = editor.session.getLine(cursor.row); - var tabString = editor.session.getTabString(); - var indentString = line.match(/^\s*/)[0]; - - if (cursor.column < indentString.length) - indentString = indentString.slice(0, cursor.column); - - var tokens = this.tokenizeTmSnippet(snippetText); - tokens = this.resolveVariables(tokens, editor); - tokens = tokens.map(function(x) { - if (x == "\n") - return x + indentString; - if (typeof x == "string") - return x.replace(/\t/g, tabString); - return x; - }); - var tabstops = []; - tokens.forEach(function(p, i) { - if (typeof p != "object") - return; - var id = p.tabstopId; - var ts = tabstops[id]; - if (!ts) { - ts = tabstops[id] = []; - ts.index = id; - ts.value = ""; - } - if (ts.indexOf(p) !== -1) - return; - ts.push(p); - var i1 = tokens.indexOf(p, i + 1); - if (i1 === -1) - return; - - var value = tokens.slice(i + 1, i1); - var isNested = value.some(function(t) {return typeof t === "object"}); - if (isNested && !ts.value) { - ts.value = value; - } else if (value.length && (!ts.value || typeof ts.value !== "string")) { - ts.value = value.join(""); - } - }); - tabstops.forEach(function(ts) {ts.length = 0}); - var expanding = {}; - function copyValue(val) { - var copy = []; - for (var i = 0; i < val.length; i++) { - var p = val[i]; - if (typeof p == "object") { - if (expanding[p.tabstopId]) - continue; - var j = val.lastIndexOf(p, i - 1); - p = copy[j] || {tabstopId: p.tabstopId}; - } - copy[i] = p; - } - return copy; - } - for (var i = 0; i < tokens.length; i++) { - var p = tokens[i]; - if (typeof p != "object") - continue; - var id = p.tabstopId; - var i1 = tokens.indexOf(p, i + 1); - if (expanding[id]) { - if (expanding[id] === p) - expanding[id] = null; - continue; - } - - var ts = tabstops[id]; - var arg = typeof ts.value == "string" ? [ts.value] : copyValue(ts.value); - arg.unshift(i + 1, Math.max(0, i1 - i)); - arg.push(p); - expanding[id] = p; - tokens.splice.apply(tokens, arg); - - if (ts.indexOf(p) === -1) - ts.push(p); - } - var row = 0, column = 0; - var text = ""; - tokens.forEach(function(t) { - if (typeof t === "string") { - if (t[0] === "\n"){ - column = t.length - 1; - row ++; - } else - column += t.length; - text += t; - } else { - if (!t.start) - t.start = {row: row, column: column}; - else - t.end = {row: row, column: column}; - } - }); - var range = editor.getSelectionRange(); - var end = editor.session.replace(range, text); - - var tabstopManager = new TabstopManager(editor); - var selectionId = editor.inVirtualSelectionMode && editor.selection.index; - tabstopManager.addTabstops(tabstops, range.start, end, selectionId); - }; - - this.insertSnippet = function(editor, snippetText) { - var self = this; - if (editor.inVirtualSelectionMode) - return self.insertSnippetForSelection(editor, snippetText); - - editor.forEachSelection(function() { - self.insertSnippetForSelection(editor, snippetText); - }, null, {keepOrder: true}); - - if (editor.tabstopManager) - editor.tabstopManager.tabNext(); - }; - - this.$getScope = function(editor) { - var scope = editor.session.$mode.$id || ""; - scope = scope.split("/").pop(); - if (scope === "html" || scope === "php") { - if (scope === "php" && !editor.session.$mode.inlinePhp) - scope = "html"; - var c = editor.getCursorPosition(); - var state = editor.session.getState(c.row); - if (typeof state === "object") { - state = state[0]; - } - if (state.substring) { - if (state.substring(0, 3) == "js-") - scope = "javascript"; - else if (state.substring(0, 4) == "css-") - scope = "css"; - else if (state.substring(0, 4) == "php-") - scope = "php"; - } - } - - return scope; - }; - - this.getActiveScopes = function(editor) { - var scope = this.$getScope(editor); - var scopes = [scope]; - var snippetMap = this.snippetMap; - if (snippetMap[scope] && snippetMap[scope].includeScopes) { - scopes.push.apply(scopes, snippetMap[scope].includeScopes); - } - scopes.push("_"); - return scopes; - }; - - this.expandWithTab = function(editor, options) { - var self = this; - var result = editor.forEachSelection(function() { - return self.expandSnippetForSelection(editor, options); - }, null, {keepOrder: true}); - if (result && editor.tabstopManager) - editor.tabstopManager.tabNext(); - return result; - }; - - this.expandSnippetForSelection = function(editor, options) { - var cursor = editor.getCursorPosition(); - var line = editor.session.getLine(cursor.row); - var before = line.substring(0, cursor.column); - var after = line.substr(cursor.column); - - var snippetMap = this.snippetMap; - var snippet; - this.getActiveScopes(editor).some(function(scope) { - var snippets = snippetMap[scope]; - if (snippets) - snippet = this.findMatchingSnippet(snippets, before, after); - return !!snippet; - }, this); - if (!snippet) - return false; - if (options && options.dryRun) - return true; - editor.session.doc.removeInLine(cursor.row, - cursor.column - snippet.replaceBefore.length, - cursor.column + snippet.replaceAfter.length - ); - - this.variables.M__ = snippet.matchBefore; - this.variables.T__ = snippet.matchAfter; - this.insertSnippetForSelection(editor, snippet.content); - - this.variables.M__ = this.variables.T__ = null; - return true; - }; - - this.findMatchingSnippet = function(snippetList, before, after) { - for (var i = snippetList.length; i--;) { - var s = snippetList[i]; - if (s.startRe && !s.startRe.test(before)) - continue; - if (s.endRe && !s.endRe.test(after)) - continue; - if (!s.startRe && !s.endRe) - continue; - - s.matchBefore = s.startRe ? s.startRe.exec(before) : [""]; - s.matchAfter = s.endRe ? s.endRe.exec(after) : [""]; - s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : ""; - s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : ""; - return s; - } - }; - - this.snippetMap = {}; - this.snippetNameMap = {}; - this.register = function(snippets, scope) { - var snippetMap = this.snippetMap; - var snippetNameMap = this.snippetNameMap; - var self = this; - - if (!snippets) - snippets = []; - - function wrapRegexp(src) { - if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src)) - src = "(?:" + src + ")"; - - return src || ""; - } - function guardedRegexp(re, guard, opening) { - re = wrapRegexp(re); - guard = wrapRegexp(guard); - if (opening) { - re = guard + re; - if (re && re[re.length - 1] != "$") - re = re + "$"; - } else { - re = re + guard; - if (re && re[0] != "^") - re = "^" + re; - } - return new RegExp(re); - } - - function addSnippet(s) { - if (!s.scope) - s.scope = scope || "_"; - scope = s.scope; - if (!snippetMap[scope]) { - snippetMap[scope] = []; - snippetNameMap[scope] = {}; - } - - var map = snippetNameMap[scope]; - if (s.name) { - var old = map[s.name]; - if (old) - self.unregister(old); - map[s.name] = s; - } - snippetMap[scope].push(s); - - if (s.tabTrigger && !s.trigger) { - if (!s.guard && /^\w/.test(s.tabTrigger)) - s.guard = "\\b"; - s.trigger = lang.escapeRegExp(s.tabTrigger); - } - - s.startRe = guardedRegexp(s.trigger, s.guard, true); - s.triggerRe = new RegExp(s.trigger, "", true); - - s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true); - s.endTriggerRe = new RegExp(s.endTrigger, "", true); - } - - if (snippets && snippets.content) - addSnippet(snippets); - else if (Array.isArray(snippets)) - snippets.forEach(addSnippet); - - this._signal("registerSnippets", {scope: scope}); - }; - this.unregister = function(snippets, scope) { - var snippetMap = this.snippetMap; - var snippetNameMap = this.snippetNameMap; - - function removeSnippet(s) { - var nameMap = snippetNameMap[s.scope||scope]; - if (nameMap && nameMap[s.name]) { - delete nameMap[s.name]; - var map = snippetMap[s.scope||scope]; - var i = map && map.indexOf(s); - if (i >= 0) - map.splice(i, 1); - } - } - if (snippets.content) - removeSnippet(snippets); - else if (Array.isArray(snippets)) - snippets.forEach(removeSnippet); - }; - this.parseSnippetFile = function(str) { - str = str.replace(/\r/g, ""); - var list = [], snippet = {}; - var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm; - var m; - while (m = re.exec(str)) { - if (m[1]) { - try { - snippet = JSON.parse(m[1]); - list.push(snippet); - } catch (e) {} - } if (m[4]) { - snippet.content = m[4].replace(/^\t/gm, ""); - list.push(snippet); - snippet = {}; - } else { - var key = m[2], val = m[3]; - if (key == "regex") { - var guardRe = /\/((?:[^\/\\]|\\.)*)|$/g; - snippet.guard = guardRe.exec(val)[1]; - snippet.trigger = guardRe.exec(val)[1]; - snippet.endTrigger = guardRe.exec(val)[1]; - snippet.endGuard = guardRe.exec(val)[1]; - } else if (key == "snippet") { - snippet.tabTrigger = val.match(/^\S*/)[0]; - if (!snippet.name) - snippet.name = val; - } else { - snippet[key] = val; - } - } - } - return list; - }; - this.getSnippetByName = function(name, editor) { - var snippetMap = this.snippetNameMap; - var snippet; - this.getActiveScopes(editor).some(function(scope) { - var snippets = snippetMap[scope]; - if (snippets) - snippet = snippets[name]; - return !!snippet; - }, this); - return snippet; - }; - -}).call(SnippetManager.prototype); - - -var TabstopManager = function(editor) { - if (editor.tabstopManager) - return editor.tabstopManager; - editor.tabstopManager = this; - this.$onChange = this.onChange.bind(this); - this.$onChangeSelection = lang.delayedCall(this.onChangeSelection.bind(this)).schedule; - this.$onChangeSession = this.onChangeSession.bind(this); - this.$onAfterExec = this.onAfterExec.bind(this); - this.attach(editor); -}; -(function() { - this.attach = function(editor) { - this.index = 0; - this.ranges = []; - this.tabstops = []; - this.$openTabstops = null; - this.selectedTabstop = null; - - this.editor = editor; - this.editor.on("change", this.$onChange); - this.editor.on("changeSelection", this.$onChangeSelection); - this.editor.on("changeSession", this.$onChangeSession); - this.editor.commands.on("afterExec", this.$onAfterExec); - this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); - }; - this.detach = function() { - this.tabstops.forEach(this.removeTabstopMarkers, this); - this.ranges = null; - this.tabstops = null; - this.selectedTabstop = null; - this.editor.removeListener("change", this.$onChange); - this.editor.removeListener("changeSelection", this.$onChangeSelection); - this.editor.removeListener("changeSession", this.$onChangeSession); - this.editor.commands.removeListener("afterExec", this.$onAfterExec); - this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); - this.editor.tabstopManager = null; - this.editor = null; - }; - - this.onChange = function(e) { - var changeRange = e.data.range; - var isRemove = e.data.action[0] == "r"; - var start = changeRange.start; - var end = changeRange.end; - var startRow = start.row; - var endRow = end.row; - var lineDif = endRow - startRow; - var colDiff = end.column - start.column; - - if (isRemove) { - lineDif = -lineDif; - colDiff = -colDiff; - } - if (!this.$inChange && isRemove) { - var ts = this.selectedTabstop; - var changedOutside = ts && !ts.some(function(r) { - return comparePoints(r.start, start) <= 0 && comparePoints(r.end, end) >= 0; - }); - if (changedOutside) - return this.detach(); - } - var ranges = this.ranges; - for (var i = 0; i < ranges.length; i++) { - var r = ranges[i]; - if (r.end.row < start.row) - continue; - - if (isRemove && comparePoints(start, r.start) < 0 && comparePoints(end, r.end) > 0) { - this.removeRange(r); - i--; - continue; - } - - if (r.start.row == startRow && r.start.column > start.column) - r.start.column += colDiff; - if (r.end.row == startRow && r.end.column >= start.column) - r.end.column += colDiff; - if (r.start.row >= startRow) - r.start.row += lineDif; - if (r.end.row >= startRow) - r.end.row += lineDif; - - if (comparePoints(r.start, r.end) > 0) - this.removeRange(r); - } - if (!ranges.length) - this.detach(); - }; - this.updateLinkedFields = function() { - var ts = this.selectedTabstop; - if (!ts || !ts.hasLinkedRanges) - return; - this.$inChange = true; - var session = this.editor.session; - var text = session.getTextRange(ts.firstNonLinked); - for (var i = ts.length; i--;) { - var range = ts[i]; - if (!range.linked) - continue; - var fmt = exports.snippetManager.tmStrFormat(text, range.original); - session.replace(range, fmt); - } - this.$inChange = false; - }; - this.onAfterExec = function(e) { - if (e.command && !e.command.readOnly) - this.updateLinkedFields(); - }; - this.onChangeSelection = function() { - if (!this.editor) - return; - var lead = this.editor.selection.lead; - var anchor = this.editor.selection.anchor; - var isEmpty = this.editor.selection.isEmpty(); - for (var i = this.ranges.length; i--;) { - if (this.ranges[i].linked) - continue; - var containsLead = this.ranges[i].contains(lead.row, lead.column); - var containsAnchor = isEmpty || this.ranges[i].contains(anchor.row, anchor.column); - if (containsLead && containsAnchor) - return; - } - this.detach(); - }; - this.onChangeSession = function() { - this.detach(); - }; - this.tabNext = function(dir) { - var max = this.tabstops.length; - var index = this.index + (dir || 1); - index = Math.min(Math.max(index, 1), max); - if (index == max) - index = 0; - this.selectTabstop(index); - if (index === 0) - this.detach(); - }; - this.selectTabstop = function(index) { - this.$openTabstops = null; - var ts = this.tabstops[this.index]; - if (ts) - this.addTabstopMarkers(ts); - this.index = index; - ts = this.tabstops[this.index]; - if (!ts || !ts.length) - return; - - this.selectedTabstop = ts; - if (!this.editor.inVirtualSelectionMode) { - var sel = this.editor.multiSelect; - sel.toSingleRange(ts.firstNonLinked.clone()); - for (var i = ts.length; i--;) { - if (ts.hasLinkedRanges && ts[i].linked) - continue; - sel.addRange(ts[i].clone(), true); - } - if (sel.ranges[0]) - sel.addRange(sel.ranges[0].clone()); - } else { - this.editor.selection.setRange(ts.firstNonLinked); - } - - this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); - }; - this.addTabstops = function(tabstops, start, end) { - if (!this.$openTabstops) - this.$openTabstops = []; - if (!tabstops[0]) { - var p = Range.fromPoints(end, end); - moveRelative(p.start, start); - moveRelative(p.end, start); - tabstops[0] = [p]; - tabstops[0].index = 0; - } - - var i = this.index; - var arg = [i + 1, 0]; - var ranges = this.ranges; - tabstops.forEach(function(ts, index) { - var dest = this.$openTabstops[index] || ts; - - for (var i = ts.length; i--;) { - var p = ts[i]; - var range = Range.fromPoints(p.start, p.end || p.start); - movePoint(range.start, start); - movePoint(range.end, start); - range.original = p; - range.tabstop = dest; - ranges.push(range); - if (dest != ts) - dest.unshift(range); - else - dest[i] = range; - if (p.fmtString) { - range.linked = true; - dest.hasLinkedRanges = true; - } else if (!dest.firstNonLinked) - dest.firstNonLinked = range; - } - if (!dest.firstNonLinked) - dest.hasLinkedRanges = false; - if (dest === ts) { - arg.push(dest); - this.$openTabstops[index] = dest; - } - this.addTabstopMarkers(dest); - }, this); - - if (arg.length > 2) { - if (this.tabstops.length) - arg.push(arg.splice(2, 1)[0]); - this.tabstops.splice.apply(this.tabstops, arg); - } - }; - - this.addTabstopMarkers = function(ts) { - var session = this.editor.session; - ts.forEach(function(range) { - if (!range.markerId) - range.markerId = session.addMarker(range, "ace_snippet-marker", "text"); - }); - }; - this.removeTabstopMarkers = function(ts) { - var session = this.editor.session; - ts.forEach(function(range) { - session.removeMarker(range.markerId); - range.markerId = null; - }); - }; - this.removeRange = function(range) { - var i = range.tabstop.indexOf(range); - range.tabstop.splice(i, 1); - i = this.ranges.indexOf(range); - this.ranges.splice(i, 1); - this.editor.session.removeMarker(range.markerId); - if (!range.tabstop.length) { - i = this.tabstops.indexOf(range.tabstop); - if (i != -1) - this.tabstops.splice(i, 1); - if (!this.tabstops.length) - this.detach(); - } - }; - - this.keyboardHandler = new HashHandler(); - this.keyboardHandler.bindKeys({ - "Tab": function(ed) { - if (exports.snippetManager && exports.snippetManager.expandWithTab(ed)) { - return; - } - - ed.tabstopManager.tabNext(1); - }, - "Shift-Tab": function(ed) { - ed.tabstopManager.tabNext(-1); - }, - "Esc": function(ed) { - ed.tabstopManager.detach(); - }, - "Return": function(ed) { - return false; - } - }); -}).call(TabstopManager.prototype); - - - -var changeTracker = {}; -changeTracker.onChange = Anchor.prototype.onChange; -changeTracker.setPosition = function(row, column) { - this.pos.row = row; - this.pos.column = column; -}; -changeTracker.update = function(pos, delta, $insertRight) { - this.$insertRight = $insertRight; - this.pos = pos; - this.onChange(delta); -}; - -var movePoint = function(point, diff) { - if (point.row == 0) - point.column += diff.column; - point.row += diff.row; -}; - -var moveRelative = function(point, start) { - if (point.row == start.row) - point.column -= start.column; - point.row -= start.row; -}; - - -require("./lib/dom").importCssString("\ -.ace_snippet-marker {\ - -moz-box-sizing: border-box;\ - box-sizing: border-box;\ - background: rgba(194, 193, 208, 0.09);\ - border: 1px dotted rgba(211, 208, 235, 0.62);\ - position: absolute;\ -}"); - -exports.snippetManager = new SnippetManager(); - - -var Editor = require("./editor").Editor; -(function() { - this.insertSnippet = function(content, options) { - return exports.snippetManager.insertSnippet(this, content, options); - }; - this.expandSnippet = function(options) { - return exports.snippetManager.expandWithTab(this, options); - }; -}).call(Editor.prototype); - -}); - -define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","resources","resources","range","tabStops","resources","utils","actions","ace/config","ace/config"], function(require, exports, module) { -"use strict"; -var HashHandler = require("ace/keyboard/hash_handler").HashHandler; -var Editor = require("ace/editor").Editor; -var snippetManager = require("ace/snippets").snippetManager; -var Range = require("ace/range").Range; -var emmet, emmetPath; -function AceEmmetEditor() {} - -AceEmmetEditor.prototype = { - setupContext: function(editor) { - this.ace = editor; - this.indentation = editor.session.getTabString(); - if (!emmet) - emmet = window.emmet; - emmet.require("resources").setVariable("indentation", this.indentation); - this.$syntax = null; - this.$syntax = this.getSyntax(); - }, - getSelectionRange: function() { - var range = this.ace.getSelectionRange(); - var doc = this.ace.session.doc; - return { - start: doc.positionToIndex(range.start), - end: doc.positionToIndex(range.end) - }; - }, - createSelection: function(start, end) { - var doc = this.ace.session.doc; - this.ace.selection.setRange({ - start: doc.indexToPosition(start), - end: doc.indexToPosition(end) - }); - }, - getCurrentLineRange: function() { - var ace = this.ace; - var row = ace.getCursorPosition().row; - var lineLength = ace.session.getLine(row).length; - var index = ace.session.doc.positionToIndex({row: row, column: 0}); - return { - start: index, - end: index + lineLength - }; - }, - getCaretPos: function(){ - var pos = this.ace.getCursorPosition(); - return this.ace.session.doc.positionToIndex(pos); - }, - setCaretPos: function(index){ - var pos = this.ace.session.doc.indexToPosition(index); - this.ace.selection.moveToPosition(pos); - }, - getCurrentLine: function() { - var row = this.ace.getCursorPosition().row; - return this.ace.session.getLine(row); - }, - replaceContent: function(value, start, end, noIndent) { - if (end == null) - end = start == null ? this.getContent().length : start; - if (start == null) - start = 0; - - var editor = this.ace; - var doc = editor.session.doc; - var range = Range.fromPoints(doc.indexToPosition(start), doc.indexToPosition(end)); - editor.session.remove(range); - - range.end = range.start; - - value = this.$updateTabstops(value); - snippetManager.insertSnippet(editor, value); - }, - getContent: function(){ - return this.ace.getValue(); - }, - getSyntax: function() { - if (this.$syntax) - return this.$syntax; - var syntax = this.ace.session.$modeId.split("/").pop(); - if (syntax == "html" || syntax == "php") { - var cursor = this.ace.getCursorPosition(); - var state = this.ace.session.getState(cursor.row); - if (typeof state != "string") - state = state[0]; - if (state) { - state = state.split("-"); - if (state.length > 1) - syntax = state[0]; - else if (syntax == "php") - syntax = "html"; - } - } - return syntax; - }, - getProfileName: function() { - switch(this.getSyntax()) { - case "css": return "css"; - case "xml": - case "xsl": - return "xml"; - case "html": - var profile = emmet.require("resources").getVariable("profile"); - if (!profile) - profile = this.ace.session.getLines(0,2).join("").search(/]+XHTML/i) != -1 ? "xhtml": "html"; - return profile; - } - return "xhtml"; - }, - prompt: function(title) { - return prompt(title); - }, - getSelection: function() { - return this.ace.session.getTextRange(); - }, - getFilePath: function() { - return ""; - }, - $updateTabstops: function(value) { - var base = 1000; - var zeroBase = 0; - var lastZero = null; - var range = emmet.require('range'); - var ts = emmet.require('tabStops'); - var settings = emmet.require('resources').getVocabulary("user"); - var tabstopOptions = { - tabstop: function(data) { - var group = parseInt(data.group, 10); - var isZero = group === 0; - if (isZero) - group = ++zeroBase; - else - group += base; - - var placeholder = data.placeholder; - if (placeholder) { - placeholder = ts.processText(placeholder, tabstopOptions); - } - - var result = '${' + group + (placeholder ? ':' + placeholder : '') + '}'; - - if (isZero) { - lastZero = range.create(data.start, result); - } - - return result; - }, - escape: function(ch) { - if (ch == '$') return '\\$'; - if (ch == '\\') return '\\\\'; - return ch; - } - }; - - value = ts.processText(value, tabstopOptions); - - if (settings.variables['insert_final_tabstop'] && !/\$\{0\}$/.test(value)) { - value += '${0}'; - } else if (lastZero) { - value = emmet.require('utils').replaceSubstring(value, '${0}', lastZero); - } - - return value; - } -}; - - -var keymap = { - expand_abbreviation: {"mac": "ctrl+alt+e", "win": "alt+e"}, - match_pair_outward: {"mac": "ctrl+d", "win": "ctrl+,"}, - match_pair_inward: {"mac": "ctrl+j", "win": "ctrl+shift+0"}, - matching_pair: {"mac": "ctrl+alt+j", "win": "alt+j"}, - next_edit_point: "alt+right", - prev_edit_point: "alt+left", - toggle_comment: {"mac": "command+/", "win": "ctrl+/"}, - split_join_tag: {"mac": "shift+command+'", "win": "shift+ctrl+`"}, - remove_tag: {"mac": "command+'", "win": "shift+ctrl+;"}, - evaluate_math_expression: {"mac": "shift+command+y", "win": "shift+ctrl+y"}, - increment_number_by_1: "ctrl+up", - decrement_number_by_1: "ctrl+down", - increment_number_by_01: "alt+up", - decrement_number_by_01: "alt+down", - increment_number_by_10: {"mac": "alt+command+up", "win": "shift+alt+up"}, - decrement_number_by_10: {"mac": "alt+command+down", "win": "shift+alt+down"}, - select_next_item: {"mac": "shift+command+.", "win": "shift+ctrl+."}, - select_previous_item: {"mac": "shift+command+,", "win": "shift+ctrl+,"}, - reflect_css_value: {"mac": "shift+command+r", "win": "shift+ctrl+r"}, - - encode_decode_data_url: {"mac": "shift+ctrl+d", "win": "ctrl+'"}, - expand_abbreviation_with_tab: "Tab", - wrap_with_abbreviation: {"mac": "shift+ctrl+a", "win": "shift+ctrl+a"} -}; - -var editorProxy = new AceEmmetEditor(); -exports.commands = new HashHandler(); -exports.runEmmetCommand = function(editor) { - try { - editorProxy.setupContext(editor); - if (editorProxy.getSyntax() == "php") - return false; - var actions = emmet.require("actions"); - - if (this.action == "expand_abbreviation_with_tab") { - if (!editor.selection.isEmpty()) - return false; - } - - if (this.action == "wrap_with_abbreviation") { - return setTimeout(function() { - actions.run("wrap_with_abbreviation", editorProxy); - }, 0); - } - - var pos = editor.selection.lead; - var token = editor.session.getTokenAt(pos.row, pos.column); - if (token && /\btag\b/.test(token.type)) - return false; - - var result = actions.run(this.action, editorProxy); - } catch(e) { - editor._signal("changeStatus", typeof e == "string" ? e : e.message); - console.log(e); - result = false; - } - return result; -}; - -for (var command in keymap) { - exports.commands.addCommand({ - name: "emmet:" + command, - action: command, - bindKey: keymap[command], - exec: exports.runEmmetCommand, - multiSelectAction: "forEach" - }); -} - -exports.updateCommands = function(editor, enabled) { - if (enabled) { - editor.keyBinding.addKeyboardHandler(exports.commands); - } else { - editor.keyBinding.removeKeyboardHandler(exports.commands); - } -}; - -exports.isSupportedMode = function(modeId) { - return modeId && /css|less|scss|sass|stylus|html|php|twig|ejs/.test(modeId); -}; - -var onChangeMode = function(e, target) { - var editor = target; - if (!editor) - return; - var enabled = exports.isSupportedMode(editor.session.$modeId); - if (e.enableEmmet === false) - enabled = false; - if (enabled) { - if (typeof emmetPath == "string") { - require("ace/config").loadModule(emmetPath, function() { - emmetPath = null; - }); - } - } - exports.updateCommands(editor, enabled); -}; - -exports.AceEmmetEditor = AceEmmetEditor; -require("ace/config").defineOptions(Editor.prototype, "editor", { - enableEmmet: { - set: function(val) { - this[val ? "on" : "removeListener"]("changeMode", onChangeMode); - onChangeMode({enableEmmet: !!val}, this); - }, - value: true - } -}); - -exports.setCore = function(e) { - if (typeof e == "string") - emmetPath = e; - else - emmet = e; -}; -}); - (function() { - window.require(["ace/ext/emmet"], function() {}); - })(); - \ No newline at end of file +define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],function(e,t,n){"use strict";var i=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,s=e("./lib/lang"),a=e("./range").Range,o=e("./anchor").Anchor,c=e("./keyboard/hash_handler").HashHandler,h=e("./tokenizer").Tokenizer,p=a.comparePoints,u=function(){this.snippetMap={},this.snippetNameMap={}};(function(){i.implement(this,r),this.getTokenizer=function(){function e(e,t,n){return e=e.substr(1),/^\d+$/.test(e)&&!n.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return u.$tokenizer=new h({start:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectIf?(n[0].expectIf=!1,n[0].elseBranch=n[0],[n[0]]):":"}},{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length?e=i:"`$\\".indexOf(i)!=-1?e=i:n.inFormatString&&("n"==i?e="\n":"t"==i?e="\n":"ulULE".indexOf(i)!=-1&&(e={changeCase:i,local:i>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,i){var r=e(t.substr(1),n,i);return i.unshift(r[0]),r},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){n[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,n){var i=n[0];return i.fmtString=e,e=this.splitRegex.exec(e),i.guard=e[1],i.fmt=e[2],i.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,n){return n[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,n){n[0]&&(n[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,n){n.inFormatString=!0},next:"start"}]}),u.prototype.getTokenizer=function(){return u.$tokenizer},u.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var n=t.substr(1);return(this.variables[t[0]+"__"]||{})[n]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];if(t=t.replace(/^TM_/,""),e){var i=e.session;switch(t){case"CURRENT_WORD":var r=i.getWordRange();case"SELECTION":case"SELECTED_TEXT":return i.getTextRange(r);case"CURRENT_LINE":return i.getLine(e.getCursorPosition().row);case"PREV_LINE":return i.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return i.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return i.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,n){var i=t.flag||"",r=t.guard;r=new RegExp(r,i.replace(/[^gi]/,""));var s=this.tokenizeTmSnippet(t.fmt,"formatString"),a=this,o=e.replace(r,function(){a.variables.__=arguments;for(var e=a.resolveVariables(s,n),t="E",i=0;i=0&&s.splice(a,1)}}var i=this.snippetMap,r=this.snippetNameMap;e.content?n(e):Array.isArray(e)&&e.forEach(n)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n=[],i={},r=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=r.exec(e);){if(t[1])try{i=JSON.parse(t[1]),n.push(i)}catch(e){}if(t[4])i.content=t[4].replace(/^\t/gm,""),n.push(i),i={};else{var s=t[2],a=t[3];if("regex"==s){var o=/\/((?:[^\/\\]|\\.)*)|$/g;i.guard=o.exec(a)[1],i.trigger=o.exec(a)[1],i.endTrigger=o.exec(a)[1],i.endGuard=o.exec(a)[1]}else"snippet"==s?(i.tabTrigger=a.match(/^\S*/)[0],i.name||(i.name=a)):i[s]=a}}return n},this.getSnippetByName=function(e,t){var n,i=this.snippetNameMap;return this.getActiveScopes(t).some(function(t){var r=i[t];return r&&(n=r[e]),!!n},this),n}}).call(u.prototype);var l=function(e){return e.tabstopManager?e.tabstopManager:(e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=s.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),void this.attach(e))};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t=e.data.range,n="r"==e.data.action[0],i=t.start,r=t.end,s=i.row,a=r.row,o=a-s,c=r.column-i.column;if(n&&(o=-o,c=-c),!this.$inChange&&n){var h=this.selectedTabstop,u=h&&!h.some(function(e){return p(e.start,i)<=0&&p(e.end,r)>=0});if(u)return this.detach()}for(var l=this.ranges,d=0;d0?(this.removeRange(g),d--):(g.start.row==s&&g.start.column>i.column&&(g.start.column+=c),g.end.row==s&&g.end.column>=i.column&&(g.end.column+=c),g.start.row>=s&&(g.start.row+=o),g.end.row>=s&&(g.end.row+=o),p(g.start,g.end)>0&&this.removeRange(g)))}l.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges){this.$inChange=!0;for(var n=this.editor.session,i=n.getTextRange(e.firstNonLinked),r=e.length;r--;){var s=e[r];if(s.linked){var a=t.snippetManager.tmStrFormat(i,s.original);n.replace(s,a)}}this.$inChange=!1}},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,n=this.editor.selection.isEmpty(),i=this.ranges.length;i--;)if(!this.ranges[i].linked){var r=this.ranges[i].contains(e.row,e.column),s=n||this.ranges[i].contains(t.row,t.column);if(r&&s)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,n=this.index+(e||1);n=Math.min(Math.max(n,1),t),n==t&&(n=0),this.selectTabstop(n),0===n&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,t=this.tabstops[this.index],t&&t.length){if(this.selectedTabstop=t,this.editor.inVirtualSelectionMode)this.editor.selection.setRange(t.firstNonLinked);else{var n=this.editor.multiSelect;n.toSingleRange(t.firstNonLinked.clone());for(var i=t.length;i--;)t.hasLinkedRanges&&t[i].linked||n.addRange(t[i].clone(),!0);n.ranges[0]&&n.addRange(n.ranges[0].clone())}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)}},this.addTabstops=function(e,t,n){if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var i=a.fromPoints(n,n);f(i.start,t),f(i.end,t),e[0]=[i],e[0].index=0}var r=this.index,s=[r+1,0],o=this.ranges;e.forEach(function(e,n){for(var i=this.$openTabstops[n]||e,r=e.length;r--;){var c=e[r],h=a.fromPoints(c.start,c.end||c.start);g(h.start,t),g(h.end,t),h.original=c,h.tabstop=i,o.push(h),i!=e?i.unshift(h):i[r]=h,c.fmtString?(h.linked=!0,i.hasLinkedRanges=!0):i.firstNonLinked||(i.firstNonLinked=h)}i.firstNonLinked||(i.hasLinkedRanges=!1),i===e&&(s.push(i),this.$openTabstops[n]=i),this.addTabstopMarkers(i)},this),s.length>2&&(this.tabstops.length&&s.push(s.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,s))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new c,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(l.prototype);var d={};d.onChange=o.prototype.onChange,d.setPosition=function(e,t){this.pos.row=e,this.pos.column=t},d.update=function(e,t,n){this.$insertRight=n,this.pos=e,this.onChange(t)};var g=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},f=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute;}"),t.snippetManager=new u;var m=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(m.prototype)}),define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","resources","resources","range","tabStops","resources","utils","actions","ace/config","ace/config"],function(e,t,n){"use strict";function i(){}var r,s,a=e("ace/keyboard/hash_handler").HashHandler,o=e("ace/editor").Editor,c=e("ace/snippets").snippetManager,h=e("ace/range").Range;i.prototype={setupContext:function(e){this.ace=e,this.indentation=e.session.getTabString(),r||(r=window.emmet),r.require("resources").setVariable("indentation",this.indentation),this.$syntax=null,this.$syntax=this.getSyntax()},getSelectionRange:function(){var e=this.ace.getSelectionRange(),t=this.ace.session.doc;return{start:t.positionToIndex(e.start),end:t.positionToIndex(e.end)}},createSelection:function(e,t){var n=this.ace.session.doc;this.ace.selection.setRange({start:n.indexToPosition(e),end:n.indexToPosition(t)})},getCurrentLineRange:function(){var e=this.ace,t=e.getCursorPosition().row,n=e.session.getLine(t).length,i=e.session.doc.positionToIndex({row:t,column:0});return{start:i,end:i+n}},getCaretPos:function(){var e=this.ace.getCursorPosition();return this.ace.session.doc.positionToIndex(e)},setCaretPos:function(e){var t=this.ace.session.doc.indexToPosition(e);this.ace.selection.moveToPosition(t)},getCurrentLine:function(){var e=this.ace.getCursorPosition().row;return this.ace.session.getLine(e)},replaceContent:function(e,t,n,i){null==n&&(n=null==t?this.getContent().length:t),null==t&&(t=0);var r=this.ace,s=r.session.doc,a=h.fromPoints(s.indexToPosition(t),s.indexToPosition(n));r.session.remove(a),a.end=a.start,e=this.$updateTabstops(e),c.insertSnippet(r,e)},getContent:function(){return this.ace.getValue()},getSyntax:function(){if(this.$syntax)return this.$syntax;var e=this.ace.session.$modeId.split("/").pop();if("html"==e||"php"==e){var t=this.ace.getCursorPosition(),n=this.ace.session.getState(t.row);"string"!=typeof n&&(n=n[0]),n&&(n=n.split("-"),n.length>1?e=n[0]:"php"==e&&(e="html"))}return e},getProfileName:function(){switch(this.getSyntax()){case"css":return"css";case"xml":case"xsl":return"xml";case"html":var e=r.require("resources").getVariable("profile");return e||(e=this.ace.session.getLines(0,2).join("").search(/]+XHTML/i)!=-1?"xhtml":"html"),e}return"xhtml"},prompt:function(e){return prompt(e)},getSelection:function(){return this.ace.session.getTextRange()},getFilePath:function(){return""},$updateTabstops:function(e){var t=1e3,n=0,i=null,s=r.require("range"),a=r.require("tabStops"),o=r.require("resources").getVocabulary("user"),c={tabstop:function(e){var r=parseInt(e.group,10),o=0===r;o?r=++n:r+=t;var h=e.placeholder;h&&(h=a.processText(h,c));var p="${"+r+(h?":"+h:"")+"}";return o&&(i=s.create(e.start,p)),p},escape:function(e){return"$"==e?"\\$":"\\"==e?"\\\\":e}};return e=a.processText(e,c),o.variables.insert_final_tabstop&&!/\$\{0\}$/.test(e)?e+="${0}":i&&(e=r.require("utils").replaceSubstring(e,"${0}",i)),e}};var p={expand_abbreviation:{mac:"ctrl+alt+e",win:"alt+e"},match_pair_outward:{mac:"ctrl+d",win:"ctrl+,"},match_pair_inward:{mac:"ctrl+j",win:"ctrl+shift+0"},matching_pair:{mac:"ctrl+alt+j",win:"alt+j"},next_edit_point:"alt+right",prev_edit_point:"alt+left",toggle_comment:{mac:"command+/",win:"ctrl+/"},split_join_tag:{mac:"shift+command+'",win:"shift+ctrl+`"},remove_tag:{mac:"command+'",win:"shift+ctrl+;"},evaluate_math_expression:{mac:"shift+command+y",win:"shift+ctrl+y"},increment_number_by_1:"ctrl+up",decrement_number_by_1:"ctrl+down",increment_number_by_01:"alt+up",decrement_number_by_01:"alt+down",increment_number_by_10:{mac:"alt+command+up",win:"shift+alt+up"},decrement_number_by_10:{mac:"alt+command+down",win:"shift+alt+down"},select_next_item:{mac:"shift+command+.",win:"shift+ctrl+."},select_previous_item:{mac:"shift+command+,",win:"shift+ctrl+,"},reflect_css_value:{mac:"shift+command+r",win:"shift+ctrl+r"},encode_decode_data_url:{mac:"shift+ctrl+d",win:"ctrl+'"},expand_abbreviation_with_tab:"Tab",wrap_with_abbreviation:{mac:"shift+ctrl+a",win:"shift+ctrl+a"}},u=new i;t.commands=new a,t.runEmmetCommand=function(e){try{if(u.setupContext(e),"php"==u.getSyntax())return!1;var t=r.require("actions");if("expand_abbreviation_with_tab"==this.action&&!e.selection.isEmpty())return!1;if("wrap_with_abbreviation"==this.action)return setTimeout(function(){t.run("wrap_with_abbreviation",u)},0);var n=e.selection.lead,i=e.session.getTokenAt(n.row,n.column);if(i&&/\btag\b/.test(i.type))return!1;var s=t.run(this.action,u)}catch(t){e._signal("changeStatus","string"==typeof t?t:t.message),console.log(t),s=!1}return s};for(var l in p)t.commands.addCommand({name:"emmet:"+l,action:l,bindKey:p[l],exec:t.runEmmetCommand,multiSelectAction:"forEach"});t.updateCommands=function(e,n){n?e.keyBinding.addKeyboardHandler(t.commands):e.keyBinding.removeKeyboardHandler(t.commands)},t.isSupportedMode=function(e){return e&&/css|less|scss|sass|stylus|html|php|twig|ejs/.test(e)};var d=function(n,i){var r=i;if(r){var a=t.isSupportedMode(r.session.$modeId);n.enableEmmet===!1&&(a=!1),a&&"string"==typeof s&&e("ace/config").loadModule(s,function(){s=null}),t.updateCommands(r,a)}};t.AceEmmetEditor=i,e("ace/config").defineOptions(o.prototype,"editor",{enableEmmet:{set:function(e){this[e?"on":"removeListener"]("changeMode",d),d({enableEmmet:!!e},this)},value:!0}}),t.setCore=function(e){"string"==typeof e?s=e:r=e}}),function(){window.require(["ace/ext/emmet"],function(){})}(); \ No newline at end of file diff --git a/www/js/vendor/ace/ext-error_marker.js b/www/js/vendor/ace/ext-error_marker.js index 31ac11d81..2280bb0ab 100755 --- a/www/js/vendor/ace/ext-error_marker.js +++ b/www/js/vendor/ace/ext-error_marker.js @@ -1,6 +1 @@ - -; - (function() { - window.require(["ace/ext/error_marker"], function() {}); - })(); - \ No newline at end of file +!function(){window.require(["ace/ext/error_marker"],function(){})}(); \ No newline at end of file diff --git a/www/js/vendor/ace/ext-keybinding_menu.js b/www/js/vendor/ace/ext-keybinding_menu.js index 895e9be63..45371e14b 100755 --- a/www/js/vendor/ace/ext-keybinding_menu.js +++ b/www/js/vendor/ace/ext-keybinding_menu.js @@ -1,170 +1 @@ -define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) { -'use strict'; -var dom = require("../../lib/dom"); -var cssText = "#ace_settingsmenu, #kbshortcutmenu {\ -background-color: #F7F7F7;\ -color: black;\ -box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\ -padding: 1em 0.5em 2em 1em;\ -overflow: auto;\ -position: absolute;\ -margin: 0;\ -bottom: 0;\ -right: 0;\ -top: 0;\ -z-index: 9991;\ -cursor: default;\ -}\ -.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\ -box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\ -background-color: rgba(255, 255, 255, 0.6);\ -color: black;\ -}\ -.ace_optionsMenuEntry:hover {\ -background-color: rgba(100, 100, 100, 0.1);\ --webkit-transition: all 0.5s;\ -transition: all 0.3s\ -}\ -.ace_closeButton {\ -background: rgba(245, 146, 146, 0.5);\ -border: 1px solid #F48A8A;\ -border-radius: 50%;\ -padding: 7px;\ -position: absolute;\ -right: -8px;\ -top: -8px;\ -z-index: 1000;\ -}\ -.ace_closeButton{\ -background: rgba(245, 146, 146, 0.9);\ -}\ -.ace_optionsMenuKey {\ -color: darkslateblue;\ -font-weight: bold;\ -}\ -.ace_optionsMenuCommand {\ -color: darkcyan;\ -font-weight: normal;\ -}"; -dom.importCssString(cssText); -module.exports.overlayPage = function overlayPage(editor, contentElement, top, right, bottom, left) { - top = top ? 'top: ' + top + ';' : ''; - bottom = bottom ? 'bottom: ' + bottom + ';' : ''; - right = right ? 'right: ' + right + ';' : ''; - left = left ? 'left: ' + left + ';' : ''; - - var closer = document.createElement('div'); - var contentContainer = document.createElement('div'); - - function documentEscListener(e) { - if (e.keyCode === 27) { - closer.click(); - } - } - - closer.style.cssText = 'margin: 0; padding: 0; ' + - 'position: fixed; top:0; bottom:0; left:0; right:0;' + - 'z-index: 9990; ' + - 'background-color: rgba(0, 0, 0, 0.3);'; - closer.addEventListener('click', function() { - document.removeEventListener('keydown', documentEscListener); - closer.parentNode.removeChild(closer); - editor.focus(); - closer = null; - }); - document.addEventListener('keydown', documentEscListener); - - contentContainer.style.cssText = top + right + bottom + left; - contentContainer.addEventListener('click', function(e) { - e.stopPropagation(); - }); - - var wrapper = dom.createElement("div"); - wrapper.style.position = "relative"; - - var closeButton = dom.createElement("div"); - closeButton.className = "ace_closeButton"; - closeButton.addEventListener('click', function() { - closer.click(); - }); - - wrapper.appendChild(closeButton); - contentContainer.appendChild(wrapper); - - contentContainer.appendChild(contentElement); - closer.appendChild(contentContainer); - document.body.appendChild(closer); - editor.blur(); -}; - -}); - -define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"], function(require, exports, module) { -"use strict"; -var keys = require("../../lib/keys"); -module.exports.getEditorKeybordShortcuts = function(editor) { - var KEY_MODS = keys.KEY_MODS; - var keybindings = []; - var commandMap = {}; - editor.keyBinding.$handlers.forEach(function(handler) { - var ckb = handler.commandKeyBinding; - for (var i in ckb) { - var key = i.replace(/(^|-)\w/g, function(x) { return x.toUpperCase(); }); - var commands = ckb[i]; - if (!Array.isArray(commands)) - commands = [commands]; - commands.forEach(function(command) { - if (typeof command != "string") - command = command.name - if (commandMap[command]) { - commandMap[command].key += "|" + key; - } else { - commandMap[command] = {key: key, command: command}; - keybindings.push(commandMap[command]); - } - }); - } - }); - return keybindings; -}; - -}); - -define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"], function(require, exports, module) { - "use strict"; - var Editor = require("ace/editor").Editor; - function showKeyboardShortcuts (editor) { - if(!document.getElementById('kbshortcutmenu')) { - var overlayPage = require('./menu_tools/overlay_page').overlayPage; - var getEditorKeybordShortcuts = require('./menu_tools/get_editor_keyboard_shortcuts').getEditorKeybordShortcuts; - var kb = getEditorKeybordShortcuts(editor); - var el = document.createElement('div'); - var commands = kb.reduce(function(previous, current) { - return previous + '
' - + current.command + ' : ' - + '' + current.key + '
'; - }, ''); - - el.id = 'kbshortcutmenu'; - el.innerHTML = '

Keyboard Shortcuts

' + commands + ''; - overlayPage(editor, el, '0', '0', '0', null); - } - }; - module.exports.init = function(editor) { - Editor.prototype.showKeyboardShortcuts = function() { - showKeyboardShortcuts(this); - }; - editor.commands.addCommands([{ - name: "showKeyboardShortcuts", - bindKey: {win: "Ctrl-Alt-h", mac: "Command-Alt-h"}, - exec: function(editor, line) { - editor.showKeyboardShortcuts(); - } - }]); - }; - -}); - (function() { - window.require(["ace/ext/keybinding_menu"], function() {}); - })(); - \ No newline at end of file +define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"],function(e,o,t){"use strict";var n=e("../../lib/dom"),r="#ace_settingsmenu, #kbshortcutmenu {background-color: #F7F7F7;color: black;box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);padding: 1em 0.5em 2em 1em;overflow: auto;position: absolute;margin: 0;bottom: 0;right: 0;top: 0;z-index: 9991;cursor: default;}.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);background-color: rgba(255, 255, 255, 0.6);color: black;}.ace_optionsMenuEntry:hover {background-color: rgba(100, 100, 100, 0.1);-webkit-transition: all 0.5s;transition: all 0.3s}.ace_closeButton {background: rgba(245, 146, 146, 0.5);border: 1px solid #F48A8A;border-radius: 50%;padding: 7px;position: absolute;right: -8px;top: -8px;z-index: 1000;}.ace_closeButton{background: rgba(245, 146, 146, 0.9);}.ace_optionsMenuKey {color: darkslateblue;font-weight: bold;}.ace_optionsMenuCommand {color: darkcyan;font-weight: normal;}";n.importCssString(r),t.exports.overlayPage=function(e,o,t,r,a,i){function c(e){27===e.keyCode&&d.click()}t=t?"top: "+t+";":"",a=a?"bottom: "+a+";":"",r=r?"right: "+r+";":"",i=i?"left: "+i+";":"";var d=document.createElement("div"),s=document.createElement("div");d.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; background-color: rgba(0, 0, 0, 0.3);",d.addEventListener("click",function(){document.removeEventListener("keydown",c),d.parentNode.removeChild(d),e.focus(),d=null}),document.addEventListener("keydown",c),s.style.cssText=t+r+a+i,s.addEventListener("click",function(e){e.stopPropagation()});var u=n.createElement("div");u.style.position="relative";var l=n.createElement("div");l.className="ace_closeButton",l.addEventListener("click",function(){d.click()}),u.appendChild(l),s.appendChild(u),s.appendChild(o),d.appendChild(s),document.body.appendChild(d),e.blur()}}),define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"],function(e,o,t){"use strict";var n=e("../../lib/keys");t.exports.getEditorKeybordShortcuts=function(e){var o=(n.KEY_MODS,[]),t={};return e.keyBinding.$handlers.forEach(function(e){var n=e.commandKeyBinding;for(var r in n){var a=r.replace(/(^|-)\w/g,function(e){return e.toUpperCase()}),i=n[r];Array.isArray(i)||(i=[i]),i.forEach(function(e){"string"!=typeof e&&(e=e.name),t[e]?t[e].key+="|"+a:(t[e]={key:a,command:e},o.push(t[e]))})}}),o}}),define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"],function(e,o,t){"use strict";function n(o){if(!document.getElementById("kbshortcutmenu")){var t=e("./menu_tools/overlay_page").overlayPage,n=e("./menu_tools/get_editor_keyboard_shortcuts").getEditorKeybordShortcuts,r=n(o),a=document.createElement("div"),i=r.reduce(function(e,o){return e+'
'+o.command+' : '+o.key+"
"},"");a.id="kbshortcutmenu",a.innerHTML="

Keyboard Shortcuts

"+i+"",t(o,a,"0","0","0",null)}}var r=e("ace/editor").Editor;t.exports.init=function(e){r.prototype.showKeyboardShortcuts=function(){n(this)},e.commands.addCommands([{name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e,o){e.showKeyboardShortcuts()}}])}}),function(){window.require(["ace/ext/keybinding_menu"],function(){})}(); \ No newline at end of file diff --git a/www/js/vendor/ace/ext-language_tools.js b/www/js/vendor/ace/ext-language_tools.js index 5508e0fe8..a2465aee1 100755 --- a/www/js/vendor/ace/ext-language_tools.js +++ b/www/js/vendor/ace/ext-language_tools.js @@ -1,1934 +1,2 @@ -define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"], function(require, exports, module) { -"use strict"; -var oop = require("./lib/oop"); -var EventEmitter = require("./lib/event_emitter").EventEmitter; -var lang = require("./lib/lang"); -var Range = require("./range").Range; -var Anchor = require("./anchor").Anchor; -var HashHandler = require("./keyboard/hash_handler").HashHandler; -var Tokenizer = require("./tokenizer").Tokenizer; -var comparePoints = Range.comparePoints; - -var SnippetManager = function() { - this.snippetMap = {}; - this.snippetNameMap = {}; -}; - -(function() { - oop.implement(this, EventEmitter); - - this.getTokenizer = function() { - function TabstopToken(str, _, stack) { - str = str.substr(1); - if (/^\d+$/.test(str) && !stack.inFormatString) - return [{tabstopId: parseInt(str, 10)}]; - return [{text: str}]; - } - function escape(ch) { - return "(?:[^\\\\" + ch + "]|\\\\.)"; - } - SnippetManager.$tokenizer = new Tokenizer({ - start: [ - {regex: /:/, onMatch: function(val, state, stack) { - if (stack.length && stack[0].expectIf) { - stack[0].expectIf = false; - stack[0].elseBranch = stack[0]; - return [stack[0]]; - } - return ":"; - }}, - {regex: /\\./, onMatch: function(val, state, stack) { - var ch = val[1]; - if (ch == "}" && stack.length) { - val = ch; - }else if ("`$\\".indexOf(ch) != -1) { - val = ch; - } else if (stack.inFormatString) { - if (ch == "n") - val = "\n"; - else if (ch == "t") - val = "\n"; - else if ("ulULE".indexOf(ch) != -1) { - val = {changeCase: ch, local: ch > "a"}; - } - } - - return [val]; - }}, - {regex: /}/, onMatch: function(val, state, stack) { - return [stack.length ? stack.shift() : val]; - }}, - {regex: /\$(?:\d+|\w+)/, onMatch: TabstopToken}, - {regex: /\$\{[\dA-Z_a-z]+/, onMatch: function(str, state, stack) { - var t = TabstopToken(str.substr(1), state, stack); - stack.unshift(t[0]); - return t; - }, next: "snippetVar"}, - {regex: /\n/, token: "newline", merge: false} - ], - snippetVar: [ - {regex: "\\|" + escape("\\|") + "*\\|", onMatch: function(val, state, stack) { - stack[0].choices = val.slice(1, -1).split(","); - }, next: "start"}, - {regex: "/(" + escape("/") + "+)/(?:(" + escape("/") + "*)/)(\\w*):?", - onMatch: function(val, state, stack) { - var ts = stack[0]; - ts.fmtString = val; - - val = this.splitRegex.exec(val); - ts.guard = val[1]; - ts.fmt = val[2]; - ts.flag = val[3]; - return ""; - }, next: "start"}, - {regex: "`" + escape("`") + "*`", onMatch: function(val, state, stack) { - stack[0].code = val.splice(1, -1); - return ""; - }, next: "start"}, - {regex: "\\?", onMatch: function(val, state, stack) { - if (stack[0]) - stack[0].expectIf = true; - }, next: "start"}, - {regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "start"} - ], - formatString: [ - {regex: "/(" + escape("/") + "+)/", token: "regex"}, - {regex: "", onMatch: function(val, state, stack) { - stack.inFormatString = true; - }, next: "start"} - ] - }); - SnippetManager.prototype.getTokenizer = function() { - return SnippetManager.$tokenizer; - }; - return SnippetManager.$tokenizer; - }; - - this.tokenizeTmSnippet = function(str, startState) { - return this.getTokenizer().getLineTokens(str, startState).tokens.map(function(x) { - return x.value || x; - }); - }; - - this.$getDefaultValue = function(editor, name) { - if (/^[A-Z]\d+$/.test(name)) { - var i = name.substr(1); - return (this.variables[name[0] + "__"] || {})[i]; - } - if (/^\d+$/.test(name)) { - return (this.variables.__ || {})[name]; - } - name = name.replace(/^TM_/, ""); - - if (!editor) - return; - var s = editor.session; - switch(name) { - case "CURRENT_WORD": - var r = s.getWordRange(); - case "SELECTION": - case "SELECTED_TEXT": - return s.getTextRange(r); - case "CURRENT_LINE": - return s.getLine(editor.getCursorPosition().row); - case "PREV_LINE": // not possible in textmate - return s.getLine(editor.getCursorPosition().row - 1); - case "LINE_INDEX": - return editor.getCursorPosition().column; - case "LINE_NUMBER": - return editor.getCursorPosition().row + 1; - case "SOFT_TABS": - return s.getUseSoftTabs() ? "YES" : "NO"; - case "TAB_SIZE": - return s.getTabSize(); - case "FILENAME": - case "FILEPATH": - return ""; - case "FULLNAME": - return "Ace"; - } - }; - this.variables = {}; - this.getVariableValue = function(editor, varName) { - if (this.variables.hasOwnProperty(varName)) - return this.variables[varName](editor, varName) || ""; - return this.$getDefaultValue(editor, varName) || ""; - }; - this.tmStrFormat = function(str, ch, editor) { - var flag = ch.flag || ""; - var re = ch.guard; - re = new RegExp(re, flag.replace(/[^gi]/, "")); - var fmtTokens = this.tokenizeTmSnippet(ch.fmt, "formatString"); - var _self = this; - var formatted = str.replace(re, function() { - _self.variables.__ = arguments; - var fmtParts = _self.resolveVariables(fmtTokens, editor); - var gChangeCase = "E"; - for (var i = 0; i < fmtParts.length; i++) { - var ch = fmtParts[i]; - if (typeof ch == "object") { - fmtParts[i] = ""; - if (ch.changeCase && ch.local) { - var next = fmtParts[i + 1]; - if (next && typeof next == "string") { - if (ch.changeCase == "u") - fmtParts[i] = next[0].toUpperCase(); - else - fmtParts[i] = next[0].toLowerCase(); - fmtParts[i + 1] = next.substr(1); - } - } else if (ch.changeCase) { - gChangeCase = ch.changeCase; - } - } else if (gChangeCase == "U") { - fmtParts[i] = ch.toUpperCase(); - } else if (gChangeCase == "L") { - fmtParts[i] = ch.toLowerCase(); - } - } - return fmtParts.join(""); - }); - this.variables.__ = null; - return formatted; - }; - - this.resolveVariables = function(snippet, editor) { - var result = []; - for (var i = 0; i < snippet.length; i++) { - var ch = snippet[i]; - if (typeof ch == "string") { - result.push(ch); - } else if (typeof ch != "object") { - continue; - } else if (ch.skip) { - gotoNext(ch); - } else if (ch.processed < i) { - continue; - } else if (ch.text) { - var value = this.getVariableValue(editor, ch.text); - if (value && ch.fmtString) - value = this.tmStrFormat(value, ch); - ch.processed = i; - if (ch.expectIf == null) { - if (value) { - result.push(value); - gotoNext(ch); - } - } else { - if (value) { - ch.skip = ch.elseBranch; - } else - gotoNext(ch); - } - } else if (ch.tabstopId != null) { - result.push(ch); - } else if (ch.changeCase != null) { - result.push(ch); - } - } - function gotoNext(ch) { - var i1 = snippet.indexOf(ch, i + 1); - if (i1 != -1) - i = i1; - } - return result; - }; - - this.insertSnippetForSelection = function(editor, snippetText) { - var cursor = editor.getCursorPosition(); - var line = editor.session.getLine(cursor.row); - var tabString = editor.session.getTabString(); - var indentString = line.match(/^\s*/)[0]; - - if (cursor.column < indentString.length) - indentString = indentString.slice(0, cursor.column); - - var tokens = this.tokenizeTmSnippet(snippetText); - tokens = this.resolveVariables(tokens, editor); - tokens = tokens.map(function(x) { - if (x == "\n") - return x + indentString; - if (typeof x == "string") - return x.replace(/\t/g, tabString); - return x; - }); - var tabstops = []; - tokens.forEach(function(p, i) { - if (typeof p != "object") - return; - var id = p.tabstopId; - var ts = tabstops[id]; - if (!ts) { - ts = tabstops[id] = []; - ts.index = id; - ts.value = ""; - } - if (ts.indexOf(p) !== -1) - return; - ts.push(p); - var i1 = tokens.indexOf(p, i + 1); - if (i1 === -1) - return; - - var value = tokens.slice(i + 1, i1); - var isNested = value.some(function(t) {return typeof t === "object"}); - if (isNested && !ts.value) { - ts.value = value; - } else if (value.length && (!ts.value || typeof ts.value !== "string")) { - ts.value = value.join(""); - } - }); - tabstops.forEach(function(ts) {ts.length = 0}); - var expanding = {}; - function copyValue(val) { - var copy = []; - for (var i = 0; i < val.length; i++) { - var p = val[i]; - if (typeof p == "object") { - if (expanding[p.tabstopId]) - continue; - var j = val.lastIndexOf(p, i - 1); - p = copy[j] || {tabstopId: p.tabstopId}; - } - copy[i] = p; - } - return copy; - } - for (var i = 0; i < tokens.length; i++) { - var p = tokens[i]; - if (typeof p != "object") - continue; - var id = p.tabstopId; - var i1 = tokens.indexOf(p, i + 1); - if (expanding[id]) { - if (expanding[id] === p) - expanding[id] = null; - continue; - } - - var ts = tabstops[id]; - var arg = typeof ts.value == "string" ? [ts.value] : copyValue(ts.value); - arg.unshift(i + 1, Math.max(0, i1 - i)); - arg.push(p); - expanding[id] = p; - tokens.splice.apply(tokens, arg); - - if (ts.indexOf(p) === -1) - ts.push(p); - } - var row = 0, column = 0; - var text = ""; - tokens.forEach(function(t) { - if (typeof t === "string") { - if (t[0] === "\n"){ - column = t.length - 1; - row ++; - } else - column += t.length; - text += t; - } else { - if (!t.start) - t.start = {row: row, column: column}; - else - t.end = {row: row, column: column}; - } - }); - var range = editor.getSelectionRange(); - var end = editor.session.replace(range, text); - - var tabstopManager = new TabstopManager(editor); - var selectionId = editor.inVirtualSelectionMode && editor.selection.index; - tabstopManager.addTabstops(tabstops, range.start, end, selectionId); - }; - - this.insertSnippet = function(editor, snippetText) { - var self = this; - if (editor.inVirtualSelectionMode) - return self.insertSnippetForSelection(editor, snippetText); - - editor.forEachSelection(function() { - self.insertSnippetForSelection(editor, snippetText); - }, null, {keepOrder: true}); - - if (editor.tabstopManager) - editor.tabstopManager.tabNext(); - }; - - this.$getScope = function(editor) { - var scope = editor.session.$mode.$id || ""; - scope = scope.split("/").pop(); - if (scope === "html" || scope === "php") { - if (scope === "php" && !editor.session.$mode.inlinePhp) - scope = "html"; - var c = editor.getCursorPosition(); - var state = editor.session.getState(c.row); - if (typeof state === "object") { - state = state[0]; - } - if (state.substring) { - if (state.substring(0, 3) == "js-") - scope = "javascript"; - else if (state.substring(0, 4) == "css-") - scope = "css"; - else if (state.substring(0, 4) == "php-") - scope = "php"; - } - } - - return scope; - }; - - this.getActiveScopes = function(editor) { - var scope = this.$getScope(editor); - var scopes = [scope]; - var snippetMap = this.snippetMap; - if (snippetMap[scope] && snippetMap[scope].includeScopes) { - scopes.push.apply(scopes, snippetMap[scope].includeScopes); - } - scopes.push("_"); - return scopes; - }; - - this.expandWithTab = function(editor, options) { - var self = this; - var result = editor.forEachSelection(function() { - return self.expandSnippetForSelection(editor, options); - }, null, {keepOrder: true}); - if (result && editor.tabstopManager) - editor.tabstopManager.tabNext(); - return result; - }; - - this.expandSnippetForSelection = function(editor, options) { - var cursor = editor.getCursorPosition(); - var line = editor.session.getLine(cursor.row); - var before = line.substring(0, cursor.column); - var after = line.substr(cursor.column); - - var snippetMap = this.snippetMap; - var snippet; - this.getActiveScopes(editor).some(function(scope) { - var snippets = snippetMap[scope]; - if (snippets) - snippet = this.findMatchingSnippet(snippets, before, after); - return !!snippet; - }, this); - if (!snippet) - return false; - if (options && options.dryRun) - return true; - editor.session.doc.removeInLine(cursor.row, - cursor.column - snippet.replaceBefore.length, - cursor.column + snippet.replaceAfter.length - ); - - this.variables.M__ = snippet.matchBefore; - this.variables.T__ = snippet.matchAfter; - this.insertSnippetForSelection(editor, snippet.content); - - this.variables.M__ = this.variables.T__ = null; - return true; - }; - - this.findMatchingSnippet = function(snippetList, before, after) { - for (var i = snippetList.length; i--;) { - var s = snippetList[i]; - if (s.startRe && !s.startRe.test(before)) - continue; - if (s.endRe && !s.endRe.test(after)) - continue; - if (!s.startRe && !s.endRe) - continue; - - s.matchBefore = s.startRe ? s.startRe.exec(before) : [""]; - s.matchAfter = s.endRe ? s.endRe.exec(after) : [""]; - s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : ""; - s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : ""; - return s; - } - }; - - this.snippetMap = {}; - this.snippetNameMap = {}; - this.register = function(snippets, scope) { - var snippetMap = this.snippetMap; - var snippetNameMap = this.snippetNameMap; - var self = this; - - if (!snippets) - snippets = []; - - function wrapRegexp(src) { - if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src)) - src = "(?:" + src + ")"; - - return src || ""; - } - function guardedRegexp(re, guard, opening) { - re = wrapRegexp(re); - guard = wrapRegexp(guard); - if (opening) { - re = guard + re; - if (re && re[re.length - 1] != "$") - re = re + "$"; - } else { - re = re + guard; - if (re && re[0] != "^") - re = "^" + re; - } - return new RegExp(re); - } - - function addSnippet(s) { - if (!s.scope) - s.scope = scope || "_"; - scope = s.scope; - if (!snippetMap[scope]) { - snippetMap[scope] = []; - snippetNameMap[scope] = {}; - } - - var map = snippetNameMap[scope]; - if (s.name) { - var old = map[s.name]; - if (old) - self.unregister(old); - map[s.name] = s; - } - snippetMap[scope].push(s); - - if (s.tabTrigger && !s.trigger) { - if (!s.guard && /^\w/.test(s.tabTrigger)) - s.guard = "\\b"; - s.trigger = lang.escapeRegExp(s.tabTrigger); - } - - s.startRe = guardedRegexp(s.trigger, s.guard, true); - s.triggerRe = new RegExp(s.trigger, "", true); - - s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true); - s.endTriggerRe = new RegExp(s.endTrigger, "", true); - } - - if (snippets && snippets.content) - addSnippet(snippets); - else if (Array.isArray(snippets)) - snippets.forEach(addSnippet); - - this._signal("registerSnippets", {scope: scope}); - }; - this.unregister = function(snippets, scope) { - var snippetMap = this.snippetMap; - var snippetNameMap = this.snippetNameMap; - - function removeSnippet(s) { - var nameMap = snippetNameMap[s.scope||scope]; - if (nameMap && nameMap[s.name]) { - delete nameMap[s.name]; - var map = snippetMap[s.scope||scope]; - var i = map && map.indexOf(s); - if (i >= 0) - map.splice(i, 1); - } - } - if (snippets.content) - removeSnippet(snippets); - else if (Array.isArray(snippets)) - snippets.forEach(removeSnippet); - }; - this.parseSnippetFile = function(str) { - str = str.replace(/\r/g, ""); - var list = [], snippet = {}; - var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm; - var m; - while (m = re.exec(str)) { - if (m[1]) { - try { - snippet = JSON.parse(m[1]); - list.push(snippet); - } catch (e) {} - } if (m[4]) { - snippet.content = m[4].replace(/^\t/gm, ""); - list.push(snippet); - snippet = {}; - } else { - var key = m[2], val = m[3]; - if (key == "regex") { - var guardRe = /\/((?:[^\/\\]|\\.)*)|$/g; - snippet.guard = guardRe.exec(val)[1]; - snippet.trigger = guardRe.exec(val)[1]; - snippet.endTrigger = guardRe.exec(val)[1]; - snippet.endGuard = guardRe.exec(val)[1]; - } else if (key == "snippet") { - snippet.tabTrigger = val.match(/^\S*/)[0]; - if (!snippet.name) - snippet.name = val; - } else { - snippet[key] = val; - } - } - } - return list; - }; - this.getSnippetByName = function(name, editor) { - var snippetMap = this.snippetNameMap; - var snippet; - this.getActiveScopes(editor).some(function(scope) { - var snippets = snippetMap[scope]; - if (snippets) - snippet = snippets[name]; - return !!snippet; - }, this); - return snippet; - }; - -}).call(SnippetManager.prototype); - - -var TabstopManager = function(editor) { - if (editor.tabstopManager) - return editor.tabstopManager; - editor.tabstopManager = this; - this.$onChange = this.onChange.bind(this); - this.$onChangeSelection = lang.delayedCall(this.onChangeSelection.bind(this)).schedule; - this.$onChangeSession = this.onChangeSession.bind(this); - this.$onAfterExec = this.onAfterExec.bind(this); - this.attach(editor); -}; -(function() { - this.attach = function(editor) { - this.index = 0; - this.ranges = []; - this.tabstops = []; - this.$openTabstops = null; - this.selectedTabstop = null; - - this.editor = editor; - this.editor.on("change", this.$onChange); - this.editor.on("changeSelection", this.$onChangeSelection); - this.editor.on("changeSession", this.$onChangeSession); - this.editor.commands.on("afterExec", this.$onAfterExec); - this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); - }; - this.detach = function() { - this.tabstops.forEach(this.removeTabstopMarkers, this); - this.ranges = null; - this.tabstops = null; - this.selectedTabstop = null; - this.editor.removeListener("change", this.$onChange); - this.editor.removeListener("changeSelection", this.$onChangeSelection); - this.editor.removeListener("changeSession", this.$onChangeSession); - this.editor.commands.removeListener("afterExec", this.$onAfterExec); - this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); - this.editor.tabstopManager = null; - this.editor = null; - }; - - this.onChange = function(e) { - var changeRange = e.data.range; - var isRemove = e.data.action[0] == "r"; - var start = changeRange.start; - var end = changeRange.end; - var startRow = start.row; - var endRow = end.row; - var lineDif = endRow - startRow; - var colDiff = end.column - start.column; - - if (isRemove) { - lineDif = -lineDif; - colDiff = -colDiff; - } - if (!this.$inChange && isRemove) { - var ts = this.selectedTabstop; - var changedOutside = ts && !ts.some(function(r) { - return comparePoints(r.start, start) <= 0 && comparePoints(r.end, end) >= 0; - }); - if (changedOutside) - return this.detach(); - } - var ranges = this.ranges; - for (var i = 0; i < ranges.length; i++) { - var r = ranges[i]; - if (r.end.row < start.row) - continue; - - if (isRemove && comparePoints(start, r.start) < 0 && comparePoints(end, r.end) > 0) { - this.removeRange(r); - i--; - continue; - } - - if (r.start.row == startRow && r.start.column > start.column) - r.start.column += colDiff; - if (r.end.row == startRow && r.end.column >= start.column) - r.end.column += colDiff; - if (r.start.row >= startRow) - r.start.row += lineDif; - if (r.end.row >= startRow) - r.end.row += lineDif; - - if (comparePoints(r.start, r.end) > 0) - this.removeRange(r); - } - if (!ranges.length) - this.detach(); - }; - this.updateLinkedFields = function() { - var ts = this.selectedTabstop; - if (!ts || !ts.hasLinkedRanges) - return; - this.$inChange = true; - var session = this.editor.session; - var text = session.getTextRange(ts.firstNonLinked); - for (var i = ts.length; i--;) { - var range = ts[i]; - if (!range.linked) - continue; - var fmt = exports.snippetManager.tmStrFormat(text, range.original); - session.replace(range, fmt); - } - this.$inChange = false; - }; - this.onAfterExec = function(e) { - if (e.command && !e.command.readOnly) - this.updateLinkedFields(); - }; - this.onChangeSelection = function() { - if (!this.editor) - return; - var lead = this.editor.selection.lead; - var anchor = this.editor.selection.anchor; - var isEmpty = this.editor.selection.isEmpty(); - for (var i = this.ranges.length; i--;) { - if (this.ranges[i].linked) - continue; - var containsLead = this.ranges[i].contains(lead.row, lead.column); - var containsAnchor = isEmpty || this.ranges[i].contains(anchor.row, anchor.column); - if (containsLead && containsAnchor) - return; - } - this.detach(); - }; - this.onChangeSession = function() { - this.detach(); - }; - this.tabNext = function(dir) { - var max = this.tabstops.length; - var index = this.index + (dir || 1); - index = Math.min(Math.max(index, 1), max); - if (index == max) - index = 0; - this.selectTabstop(index); - if (index === 0) - this.detach(); - }; - this.selectTabstop = function(index) { - this.$openTabstops = null; - var ts = this.tabstops[this.index]; - if (ts) - this.addTabstopMarkers(ts); - this.index = index; - ts = this.tabstops[this.index]; - if (!ts || !ts.length) - return; - - this.selectedTabstop = ts; - if (!this.editor.inVirtualSelectionMode) { - var sel = this.editor.multiSelect; - sel.toSingleRange(ts.firstNonLinked.clone()); - for (var i = ts.length; i--;) { - if (ts.hasLinkedRanges && ts[i].linked) - continue; - sel.addRange(ts[i].clone(), true); - } - if (sel.ranges[0]) - sel.addRange(sel.ranges[0].clone()); - } else { - this.editor.selection.setRange(ts.firstNonLinked); - } - - this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); - }; - this.addTabstops = function(tabstops, start, end) { - if (!this.$openTabstops) - this.$openTabstops = []; - if (!tabstops[0]) { - var p = Range.fromPoints(end, end); - moveRelative(p.start, start); - moveRelative(p.end, start); - tabstops[0] = [p]; - tabstops[0].index = 0; - } - - var i = this.index; - var arg = [i + 1, 0]; - var ranges = this.ranges; - tabstops.forEach(function(ts, index) { - var dest = this.$openTabstops[index] || ts; - - for (var i = ts.length; i--;) { - var p = ts[i]; - var range = Range.fromPoints(p.start, p.end || p.start); - movePoint(range.start, start); - movePoint(range.end, start); - range.original = p; - range.tabstop = dest; - ranges.push(range); - if (dest != ts) - dest.unshift(range); - else - dest[i] = range; - if (p.fmtString) { - range.linked = true; - dest.hasLinkedRanges = true; - } else if (!dest.firstNonLinked) - dest.firstNonLinked = range; - } - if (!dest.firstNonLinked) - dest.hasLinkedRanges = false; - if (dest === ts) { - arg.push(dest); - this.$openTabstops[index] = dest; - } - this.addTabstopMarkers(dest); - }, this); - - if (arg.length > 2) { - if (this.tabstops.length) - arg.push(arg.splice(2, 1)[0]); - this.tabstops.splice.apply(this.tabstops, arg); - } - }; - - this.addTabstopMarkers = function(ts) { - var session = this.editor.session; - ts.forEach(function(range) { - if (!range.markerId) - range.markerId = session.addMarker(range, "ace_snippet-marker", "text"); - }); - }; - this.removeTabstopMarkers = function(ts) { - var session = this.editor.session; - ts.forEach(function(range) { - session.removeMarker(range.markerId); - range.markerId = null; - }); - }; - this.removeRange = function(range) { - var i = range.tabstop.indexOf(range); - range.tabstop.splice(i, 1); - i = this.ranges.indexOf(range); - this.ranges.splice(i, 1); - this.editor.session.removeMarker(range.markerId); - if (!range.tabstop.length) { - i = this.tabstops.indexOf(range.tabstop); - if (i != -1) - this.tabstops.splice(i, 1); - if (!this.tabstops.length) - this.detach(); - } - }; - - this.keyboardHandler = new HashHandler(); - this.keyboardHandler.bindKeys({ - "Tab": function(ed) { - if (exports.snippetManager && exports.snippetManager.expandWithTab(ed)) { - return; - } - - ed.tabstopManager.tabNext(1); - }, - "Shift-Tab": function(ed) { - ed.tabstopManager.tabNext(-1); - }, - "Esc": function(ed) { - ed.tabstopManager.detach(); - }, - "Return": function(ed) { - return false; - } - }); -}).call(TabstopManager.prototype); - - - -var changeTracker = {}; -changeTracker.onChange = Anchor.prototype.onChange; -changeTracker.setPosition = function(row, column) { - this.pos.row = row; - this.pos.column = column; -}; -changeTracker.update = function(pos, delta, $insertRight) { - this.$insertRight = $insertRight; - this.pos = pos; - this.onChange(delta); -}; - -var movePoint = function(point, diff) { - if (point.row == 0) - point.column += diff.column; - point.row += diff.row; -}; - -var moveRelative = function(point, start) { - if (point.row == start.row) - point.column -= start.column; - point.row -= start.row; -}; - - -require("./lib/dom").importCssString("\ -.ace_snippet-marker {\ - -moz-box-sizing: border-box;\ - box-sizing: border-box;\ - background: rgba(194, 193, 208, 0.09);\ - border: 1px dotted rgba(211, 208, 235, 0.62);\ - position: absolute;\ -}"); - -exports.snippetManager = new SnippetManager(); - - -var Editor = require("./editor").Editor; -(function() { - this.insertSnippet = function(content, options) { - return exports.snippetManager.insertSnippet(this, content, options); - }; - this.expandSnippet = function(options) { - return exports.snippetManager.expandWithTab(this, options); - }; -}).call(Editor.prototype); - -}); - -define("ace/autocomplete/popup",["require","exports","module","ace/edit_session","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"], function(require, exports, module) { -"use strict"; - -var EditSession = require("../edit_session").EditSession; -var Renderer = require("../virtual_renderer").VirtualRenderer; -var Editor = require("../editor").Editor; -var Range = require("../range").Range; -var event = require("../lib/event"); -var lang = require("../lib/lang"); -var dom = require("../lib/dom"); - -var $singleLineEditor = function(el) { - var renderer = new Renderer(el); - - renderer.$maxLines = 4; - - var editor = new Editor(renderer); - - editor.setHighlightActiveLine(false); - editor.setShowPrintMargin(false); - editor.renderer.setShowGutter(false); - editor.renderer.setHighlightGutterLine(false); - - editor.$mouseHandler.$focusWaitTimout = 0; - editor.$highlightTagPending = true; - - return editor; -}; - -var AcePopup = function(parentNode) { - var el = dom.createElement("div"); - var popup = new $singleLineEditor(el); - - if (parentNode) - parentNode.appendChild(el); - el.style.display = "none"; - popup.renderer.content.style.cursor = "default"; - popup.renderer.setStyle("ace_autocomplete"); - - popup.setOption("displayIndentGuides", false); - popup.setOption("dragDelay", 150); - - var noop = function(){}; - - popup.focus = noop; - popup.$isFocused = true; - - popup.renderer.$cursorLayer.restartTimer = noop; - popup.renderer.$cursorLayer.element.style.opacity = 0; - - popup.renderer.$maxLines = 8; - popup.renderer.$keepTextAreaAtCursor = false; - - popup.setHighlightActiveLine(false); - popup.session.highlight(""); - popup.session.$searchHighlight.clazz = "ace_highlight-marker"; - - popup.on("mousedown", function(e) { - var pos = e.getDocumentPosition(); - popup.selection.moveToPosition(pos); - selectionMarker.start.row = selectionMarker.end.row = pos.row; - e.stop(); - }); - - var lastMouseEvent; - var hoverMarker = new Range(-1,0,-1,Infinity); - var selectionMarker = new Range(-1,0,-1,Infinity); - selectionMarker.id = popup.session.addMarker(selectionMarker, "ace_active-line", "fullLine"); - popup.setSelectOnHover = function(val) { - if (!val) { - hoverMarker.id = popup.session.addMarker(hoverMarker, "ace_line-hover", "fullLine"); - } else if (hoverMarker.id) { - popup.session.removeMarker(hoverMarker.id); - hoverMarker.id = null; - } - }; - popup.setSelectOnHover(false); - popup.on("mousemove", function(e) { - if (!lastMouseEvent) { - lastMouseEvent = e; - return; - } - if (lastMouseEvent.x == e.x && lastMouseEvent.y == e.y) { - return; - } - lastMouseEvent = e; - lastMouseEvent.scrollTop = popup.renderer.scrollTop; - var row = lastMouseEvent.getDocumentPosition().row; - if (hoverMarker.start.row != row) { - if (!hoverMarker.id) - popup.setRow(row); - setHoverMarker(row); - } - }); - popup.renderer.on("beforeRender", function() { - if (lastMouseEvent && hoverMarker.start.row != -1) { - lastMouseEvent.$pos = null; - var row = lastMouseEvent.getDocumentPosition().row; - if (!hoverMarker.id) - popup.setRow(row); - setHoverMarker(row, true); - } - }); - popup.renderer.on("afterRender", function() { - var row = popup.getRow(); - var t = popup.renderer.$textLayer; - var selected = t.element.childNodes[row - t.config.firstRow]; - if (selected == t.selectedNode) - return; - if (t.selectedNode) - dom.removeCssClass(t.selectedNode, "ace_selected"); - t.selectedNode = selected; - if (selected) - dom.addCssClass(selected, "ace_selected"); - }); - var hideHoverMarker = function() { setHoverMarker(-1) }; - var setHoverMarker = function(row, suppressRedraw) { - if (row !== hoverMarker.start.row) { - hoverMarker.start.row = hoverMarker.end.row = row; - if (!suppressRedraw) - popup.session._emit("changeBackMarker"); - popup._emit("changeHoverMarker"); - } - }; - popup.getHoveredRow = function() { - return hoverMarker.start.row; - }; - - event.addListener(popup.container, "mouseout", hideHoverMarker); - popup.on("hide", hideHoverMarker); - popup.on("changeSelection", hideHoverMarker); - - popup.session.doc.getLength = function() { - return popup.data.length; - }; - popup.session.doc.getLine = function(i) { - var data = popup.data[i]; - if (typeof data == "string") - return data; - return (data && data.value) || ""; - }; - - var bgTokenizer = popup.session.bgTokenizer; - bgTokenizer.$tokenizeRow = function(row) { - var data = popup.data[row]; - var tokens = []; - if (!data) - return tokens; - if (typeof data == "string") - data = {value: data}; - if (!data.caption) - data.caption = data.value || data.name; - - var last = -1; - var flag, c; - for (var i = 0; i < data.caption.length; i++) { - c = data.caption[i]; - flag = data.matchMask & (1 << i) ? 1 : 0; - if (last !== flag) { - tokens.push({type: data.className || "" + ( flag ? "completion-highlight" : ""), value: c}); - last = flag; - } else { - tokens[tokens.length - 1].value += c; - } - } - - if (data.meta) { - var maxW = popup.renderer.$size.scrollerWidth / popup.renderer.layerConfig.characterWidth; - if (data.meta.length + data.caption.length < maxW - 2) - tokens.push({type: "rightAlignedText", value: data.meta}); - } - return tokens; - }; - bgTokenizer.$updateOnChange = noop; - bgTokenizer.start = noop; - - popup.session.$computeWidth = function() { - return this.screenWidth = 0; - }; - - popup.$blockScrolling = Infinity; - popup.isOpen = false; - popup.isTopdown = false; - - popup.data = []; - popup.setData = function(list) { - popup.data = list || []; - popup.setValue(lang.stringRepeat("\n", list.length), -1); - popup.setRow(0); - }; - popup.getData = function(row) { - return popup.data[row]; - }; - - popup.getRow = function() { - return selectionMarker.start.row; - }; - popup.setRow = function(line) { - line = Math.max(-1, Math.min(this.data.length, line)); - if (selectionMarker.start.row != line) { - popup.selection.clearSelection(); - selectionMarker.start.row = selectionMarker.end.row = line || 0; - popup.session._emit("changeBackMarker"); - popup.moveCursorTo(line || 0, 0); - if (popup.isOpen) - popup._signal("select"); - } - }; - - popup.on("changeSelection", function() { - if (popup.isOpen) - popup.setRow(popup.selection.lead.row); - popup.renderer.scrollCursorIntoView(); - }); - - popup.hide = function() { - this.container.style.display = "none"; - this._signal("hide"); - popup.isOpen = false; - }; - popup.show = function(pos, lineHeight, topdownOnly) { - var el = this.container; - var screenHeight = window.innerHeight; - var screenWidth = window.innerWidth; - var renderer = this.renderer; - var maxH = renderer.$maxLines * lineHeight * 1.4; - var top = pos.top + this.$borderSize; - if (top + maxH > screenHeight - lineHeight && !topdownOnly) { - el.style.top = ""; - el.style.bottom = screenHeight - top + "px"; - popup.isTopdown = false; - } else { - top += lineHeight; - el.style.top = top + "px"; - el.style.bottom = ""; - popup.isTopdown = true; - } - - el.style.display = ""; - this.renderer.$textLayer.checkForSizeChanges(); - - var left = pos.left; - if (left + el.offsetWidth > screenWidth) - left = screenWidth - el.offsetWidth; - - el.style.left = left + "px"; - - this._signal("show"); - lastMouseEvent = null; - popup.isOpen = true; - }; - - popup.getTextLeftOffset = function() { - return this.$borderSize + this.renderer.$padding + this.$imageSize; - }; - - popup.$imageSize = 0; - popup.$borderSize = 1; - - return popup; -}; - -dom.importCssString("\ -.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\ - background-color: #CAD6FA;\ - z-index: 1;\ -}\ -.ace_editor.ace_autocomplete .ace_line-hover {\ - border: 1px solid #abbffe;\ - margin-top: -1px;\ - background: rgba(233,233,253,0.4);\ -}\ -.ace_editor.ace_autocomplete .ace_line-hover {\ - position: absolute;\ - z-index: 2;\ -}\ -.ace_editor.ace_autocomplete .ace_scroller {\ - background: none;\ - border: none;\ - box-shadow: none;\ -}\ -.ace_rightAlignedText {\ - color: gray;\ - display: inline-block;\ - position: absolute;\ - right: 4px;\ - text-align: right;\ - z-index: -1;\ -}\ -.ace_editor.ace_autocomplete .ace_completion-highlight{\ - color: #000;\ - text-shadow: 0 0 0.01em;\ -}\ -.ace_editor.ace_autocomplete {\ - width: 280px;\ - z-index: 200000;\ - background: #fbfbfb;\ - color: #444;\ - border: 1px lightgray solid;\ - position: fixed;\ - box-shadow: 2px 3px 5px rgba(0,0,0,.2);\ - line-height: 1.4;\ -}"); - -exports.AcePopup = AcePopup; - -}); - -define("ace/autocomplete/util",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.parForEach = function(array, fn, callback) { - var completed = 0; - var arLength = array.length; - if (arLength === 0) - callback(); - for (var i = 0; i < arLength; i++) { - fn(array[i], function(result, err) { - completed++; - if (completed === arLength) - callback(result, err); - }); - } -}; - -var ID_REGEX = /[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/; - -exports.retrievePrecedingIdentifier = function(text, pos, regex) { - regex = regex || ID_REGEX; - var buf = []; - for (var i = pos-1; i >= 0; i--) { - if (regex.test(text[i])) - buf.push(text[i]); - else - break; - } - return buf.reverse().join(""); -}; - -exports.retrieveFollowingIdentifier = function(text, pos, regex) { - regex = regex || ID_REGEX; - var buf = []; - for (var i = pos; i < text.length; i++) { - if (regex.test(text[i])) - buf.push(text[i]); - else - break; - } - return buf; -}; - -}); - -define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/snippets"], function(require, exports, module) { -"use strict"; - -var HashHandler = require("./keyboard/hash_handler").HashHandler; -var AcePopup = require("./autocomplete/popup").AcePopup; -var util = require("./autocomplete/util"); -var event = require("./lib/event"); -var lang = require("./lib/lang"); -var dom = require("./lib/dom"); -var snippetManager = require("./snippets").snippetManager; - -var Autocomplete = function() { - this.autoInsert = true; - this.autoSelect = true; - this.exactMatch = false; - this.keyboardHandler = new HashHandler(); - this.keyboardHandler.bindKeys(this.commands); - - this.blurListener = this.blurListener.bind(this); - this.changeListener = this.changeListener.bind(this); - this.mousedownListener = this.mousedownListener.bind(this); - this.mousewheelListener = this.mousewheelListener.bind(this); - - this.changeTimer = lang.delayedCall(function() { - this.updateCompletions(true); - }.bind(this)); - - this.tooltipTimer = lang.delayedCall(this.updateDocTooltip.bind(this), 50); -}; - -(function() { - this.gatherCompletionsId = 0; - - this.$init = function() { - this.popup = new AcePopup(document.body || document.documentElement); - this.popup.on("click", function(e) { - this.insertMatch(); - e.stop(); - }.bind(this)); - this.popup.focus = this.editor.focus.bind(this.editor); - this.popup.on("show", this.tooltipTimer.bind(null, null)); - this.popup.on("select", this.tooltipTimer.bind(null, null)); - this.popup.on("changeHoverMarker", this.tooltipTimer.bind(null, null)); - return this.popup; - }; - - this.getPopup = function() { - return this.popup || this.$init(); - }; - - this.openPopup = function(editor, prefix, keepPopupPosition) { - if (!this.popup) - this.$init(); - - this.popup.setData(this.completions.filtered); - - var renderer = editor.renderer; - this.popup.setRow(this.autoSelect ? 0 : -1); - if (!keepPopupPosition) { - this.popup.setTheme(editor.getTheme()); - this.popup.setFontSize(editor.getFontSize()); - - var lineHeight = renderer.layerConfig.lineHeight; - - var pos = renderer.$cursorLayer.getPixelPosition(this.base, true); - pos.left -= this.popup.getTextLeftOffset(); - - var rect = editor.container.getBoundingClientRect(); - pos.top += rect.top - renderer.layerConfig.offset; - pos.left += rect.left - editor.renderer.scrollLeft; - pos.left += renderer.$gutterLayer.gutterWidth; - - this.popup.show(pos, lineHeight); - } else if (keepPopupPosition && !prefix) { - this.detach(); - } - }; - - this.detach = function() { - this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); - this.editor.off("changeSelection", this.changeListener); - this.editor.off("blur", this.blurListener); - this.editor.off("mousedown", this.mousedownListener); - this.editor.off("mousewheel", this.mousewheelListener); - this.changeTimer.cancel(); - this.hideDocTooltip(); - - if (this.popup && this.popup.isOpen) { - this.gatherCompletionsId += 1; - this.popup.hide(); - } - - if (this.base) - this.base.detach(); - this.activated = false; - this.completions = this.base = null; - }; - - this.changeListener = function(e) { - var cursor = this.editor.selection.lead; - if (cursor.row != this.base.row || cursor.column < this.base.column) { - this.detach(); - } - if (this.activated) - this.changeTimer.schedule(); - else - this.detach(); - }; - - this.blurListener = function(e) { - var el = document.activeElement; - var text = this.editor.textInput.getElement() - if (el != text && el.parentNode != this.popup.container - && el != this.tooltipNode && e.relatedTarget != this.tooltipNode - && e.relatedTarget != text - ) { - this.detach(); - } - }; - - this.mousedownListener = function(e) { - this.detach(); - }; - - this.mousewheelListener = function(e) { - this.detach(); - }; - - this.goTo = function(where) { - var row = this.popup.getRow(); - var max = this.popup.session.getLength() - 1; - - switch(where) { - case "up": row = row <= 0 ? max : row - 1; break; - case "down": row = row >= max ? -1 : row + 1; break; - case "start": row = 0; break; - case "end": row = max; break; - } - - this.popup.setRow(row); - }; - - this.insertMatch = function(data) { - if (!data) - data = this.popup.getData(this.popup.getRow()); - if (!data) - return false; - - if (data.completer && data.completer.insertMatch) { - data.completer.insertMatch(this.editor, data); - } else { - if (this.completions.filterText) { - var ranges = this.editor.selection.getAllRanges(); - for (var i = 0, range; range = ranges[i]; i++) { - range.start.column -= this.completions.filterText.length; - this.editor.session.remove(range); - } - } - if (data.snippet) - snippetManager.insertSnippet(this.editor, data.snippet); - else - this.editor.execCommand("insertstring", data.value || data); - } - this.detach(); - }; - - - this.commands = { - "Up": function(editor) { editor.completer.goTo("up"); }, - "Down": function(editor) { editor.completer.goTo("down"); }, - "Ctrl-Up|Ctrl-Home": function(editor) { editor.completer.goTo("start"); }, - "Ctrl-Down|Ctrl-End": function(editor) { editor.completer.goTo("end"); }, - - "Esc": function(editor) { editor.completer.detach(); }, - "Space": function(editor) { editor.completer.detach(); editor.insert(" ");}, - "Return": function(editor) { return editor.completer.insertMatch(); }, - "Shift-Return": function(editor) { editor.completer.insertMatch(true); }, - "Tab": function(editor) { - var result = editor.completer.insertMatch(); - if (!result && !editor.tabstopManager) - editor.completer.goTo("down"); - else - return result; - }, - - "PageUp": function(editor) { editor.completer.popup.gotoPageUp(); }, - "PageDown": function(editor) { editor.completer.popup.gotoPageDown(); } - }; - - this.gatherCompletions = function(editor, callback) { - var session = editor.getSession(); - var pos = editor.getCursorPosition(); - - var line = session.getLine(pos.row); - var prefix = util.retrievePrecedingIdentifier(line, pos.column); - - this.base = session.doc.createAnchor(pos.row, pos.column - prefix.length); - this.base.$insertRight = true; - - var matches = []; - var total = editor.completers.length; - editor.completers.forEach(function(completer, i) { - completer.getCompletions(editor, session, pos, prefix, function(err, results) { - if (!err) - matches = matches.concat(results); - var pos = editor.getCursorPosition(); - var line = session.getLine(pos.row); - callback(null, { - prefix: util.retrievePrecedingIdentifier(line, pos.column, results[0] && results[0].identifierRegex), - matches: matches, - finished: (--total === 0) - }); - }); - }); - return true; - }; - - this.showPopup = function(editor) { - if (this.editor) - this.detach(); - - this.activated = true; - - this.editor = editor; - if (editor.completer != this) { - if (editor.completer) - editor.completer.detach(); - editor.completer = this; - } - - editor.keyBinding.addKeyboardHandler(this.keyboardHandler); - editor.on("changeSelection", this.changeListener); - editor.on("blur", this.blurListener); - editor.on("mousedown", this.mousedownListener); - editor.on("mousewheel", this.mousewheelListener); - - this.updateCompletions(); - }; - - this.updateCompletions = function(keepPopupPosition) { - if (keepPopupPosition && this.base && this.completions) { - var pos = this.editor.getCursorPosition(); - var prefix = this.editor.session.getTextRange({start: this.base, end: pos}); - if (prefix == this.completions.filterText) - return; - this.completions.setFilter(prefix); - if (!this.completions.filtered.length) - return this.detach(); - if (this.completions.filtered.length == 1 - && this.completions.filtered[0].value == prefix - && !this.completions.filtered[0].snippet) - return this.detach(); - this.openPopup(this.editor, prefix, keepPopupPosition); - return; - } - var _id = this.gatherCompletionsId; - this.gatherCompletions(this.editor, function(err, results) { - var detachIfFinished = function() { - if (!results.finished) return; - return this.detach(); - }.bind(this); - - var prefix = results.prefix; - var matches = results && results.matches; - - if (!matches || !matches.length) - return detachIfFinished(); - if (prefix.indexOf(results.prefix) !== 0 || _id != this.gatherCompletionsId) - return; - - this.completions = new FilteredList(matches); - - if (this.exactMatch) - this.completions.exactMatch = true; - - this.completions.setFilter(prefix); - var filtered = this.completions.filtered; - if (!filtered.length) - return detachIfFinished(); - if (filtered.length == 1 && filtered[0].value == prefix && !filtered[0].snippet) - return detachIfFinished(); - if (this.autoInsert && filtered.length == 1 && results.finished) - return this.insertMatch(filtered[0]); - - this.openPopup(this.editor, prefix, keepPopupPosition); - }.bind(this)); - }; - - this.cancelContextMenu = function() { - this.editor.$mouseHandler.cancelContextMenu(); - }; - - this.updateDocTooltip = function() { - var popup = this.popup; - var all = popup.data; - var selected = all && (all[popup.getHoveredRow()] || all[popup.getRow()]); - var doc = null; - if (!selected || !this.editor || !this.popup.isOpen) - return this.hideDocTooltip(); - this.editor.completers.some(function(completer) { - if (completer.getDocTooltip) - doc = completer.getDocTooltip(selected); - return doc; - }); - if (!doc) - doc = selected; - - if (typeof doc == "string") - doc = {docText: doc} - if (!doc || !(doc.docHTML || doc.docText)) - return this.hideDocTooltip(); - this.showDocTooltip(doc); - }; - - this.showDocTooltip = function(item) { - if (!this.tooltipNode) { - this.tooltipNode = dom.createElement("div"); - this.tooltipNode.className = "ace_tooltip ace_doc-tooltip"; - this.tooltipNode.style.margin = 0; - this.tooltipNode.style.pointerEvents = "auto"; - this.tooltipNode.tabIndex = -1; - this.tooltipNode.onblur = this.blurListener.bind(this); - } - - var tooltipNode = this.tooltipNode; - if (item.docHTML) { - tooltipNode.innerHTML = item.docHTML; - } else if (item.docText) { - tooltipNode.textContent = item.docText; - } - - if (!tooltipNode.parentNode) - document.body.appendChild(tooltipNode); - var popup = this.popup; - var rect = popup.container.getBoundingClientRect(); - tooltipNode.style.top = popup.container.style.top; - tooltipNode.style.bottom = popup.container.style.bottom; - - if (window.innerWidth - rect.right < 320) { - tooltipNode.style.right = window.innerWidth - rect.left + "px"; - tooltipNode.style.left = ""; - } else { - tooltipNode.style.left = (rect.right + 1) + "px"; - tooltipNode.style.right = ""; - } - tooltipNode.style.display = "block"; - }; - - this.hideDocTooltip = function() { - this.tooltipTimer.cancel(); - if (!this.tooltipNode) return; - var el = this.tooltipNode; - if (!this.editor.isFocused() && document.activeElement == el) - this.editor.focus(); - this.tooltipNode = null; - if (el.parentNode) - el.parentNode.removeChild(el); - }; - -}).call(Autocomplete.prototype); - -Autocomplete.startCommand = { - name: "startAutocomplete", - exec: function(editor) { - if (!editor.completer) - editor.completer = new Autocomplete(); - editor.completer.autoInsert = - editor.completer.autoSelect = true; - editor.completer.showPopup(editor); - editor.completer.cancelContextMenu(); - }, - bindKey: "Ctrl-Space|Ctrl-Shift-Space|Alt-Space" -}; - -var FilteredList = function(array, filterText, mutateData) { - this.all = array; - this.filtered = array; - this.filterText = filterText || ""; - this.exactMatch = false; -}; -(function(){ - this.setFilter = function(str) { - if (str.length > this.filterText && str.lastIndexOf(this.filterText, 0) === 0) - var matches = this.filtered; - else - var matches = this.all; - - this.filterText = str; - matches = this.filterCompletions(matches, this.filterText); - matches = matches.sort(function(a, b) { - return b.exactMatch - a.exactMatch || b.score - a.score; - }); - var prev = null; - matches = matches.filter(function(item){ - var caption = item.snippet || item.caption || item.value; - if (caption === prev) return false; - prev = caption; - return true; - }); - - this.filtered = matches; - }; - this.filterCompletions = function(items, needle) { - var results = []; - var upper = needle.toUpperCase(); - var lower = needle.toLowerCase(); - loop: for (var i = 0, item; item = items[i]; i++) { - var caption = item.value || item.caption || item.snippet; - if (!caption) continue; - var lastIndex = -1; - var matchMask = 0; - var penalty = 0; - var index, distance; - - if (this.exactMatch) { - if (needle !== caption.substr(0, needle.length)) - continue loop; - }else{ - for (var j = 0; j < needle.length; j++) { - var i1 = caption.indexOf(lower[j], lastIndex + 1); - var i2 = caption.indexOf(upper[j], lastIndex + 1); - index = (i1 >= 0) ? ((i2 < 0 || i1 < i2) ? i1 : i2) : i2; - if (index < 0) - continue loop; - distance = index - lastIndex - 1; - if (distance > 0) { - if (lastIndex === -1) - penalty += 10; - penalty += distance; - } - matchMask = matchMask | (1 << index); - lastIndex = index; - } - } - item.matchMask = matchMask; - item.exactMatch = penalty ? 0 : 1; - item.score = (item.score || 0) - penalty; - results.push(item); - } - return results; - }; -}).call(FilteredList.prototype); - -exports.Autocomplete = Autocomplete; -exports.FilteredList = FilteredList; - -}); - -define("ace/autocomplete/text_completer",["require","exports","module","ace/range"], function(require, exports, module) { - var Range = require("../range").Range; - - var splitRegex = /[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/; - - function getWordIndex(doc, pos) { - var textBefore = doc.getTextRange(Range.fromPoints({row: 0, column:0}, pos)); - return textBefore.split(splitRegex).length - 1; - } - function wordDistance(doc, pos) { - var prefixPos = getWordIndex(doc, pos); - var words = doc.getValue().split(splitRegex); - var wordScores = Object.create(null); - - var currentWord = words[prefixPos]; - - words.forEach(function(word, idx) { - if (!word || word === currentWord) return; - - var distance = Math.abs(prefixPos - idx); - var score = words.length - distance; - if (wordScores[word]) { - wordScores[word] = Math.max(score, wordScores[word]); - } else { - wordScores[word] = score; - } - }); - return wordScores; - } - - exports.getCompletions = function(editor, session, pos, prefix, callback) { - var wordScore = wordDistance(session, pos, prefix); - var wordList = Object.keys(wordScore); - callback(null, wordList.map(function(word) { - return { - caption: word, - value: word, - score: wordScore[word], - meta: "local" - }; - })); - }; -}); - -define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"], function(require, exports, module) { -"use strict"; - -var snippetManager = require("../snippets").snippetManager; -var Autocomplete = require("../autocomplete").Autocomplete; -var config = require("../config"); -var lang = require("../lib/lang"); -var util = require("../autocomplete/util"); - -var textCompleter = require("../autocomplete/text_completer"); -var keyWordCompleter = { - getCompletions: function(editor, session, pos, prefix, callback) { - if (session.$mode.completer) { - return session.$mode.completer.getCompletions(editor, session, pos, prefix, callback); - } - var state = editor.session.getState(pos.row); - var completions = session.$mode.getCompletions(state, session, pos, prefix); - callback(null, completions); - } -}; - -var snippetCompleter = { - getCompletions: function(editor, session, pos, prefix, callback) { - var snippetMap = snippetManager.snippetMap; - var completions = []; - snippetManager.getActiveScopes(editor).forEach(function(scope) { - var snippets = snippetMap[scope] || []; - for (var i = snippets.length; i--;) { - var s = snippets[i]; - var caption = s.name || s.tabTrigger; - if (!caption) - continue; - completions.push({ - caption: caption, - snippet: s.content, - meta: s.tabTrigger && !s.name ? s.tabTrigger + "\u21E5 " : "snippet", - type: "snippet" - }); - } - }, this); - callback(null, completions); - }, - getDocTooltip: function(item) { - if (item.type == "snippet" && !item.docHTML) { - item.docHTML = [ - "", lang.escapeHTML(item.caption), "", "
", - lang.escapeHTML(item.snippet) - ].join(""); - } - } -}; - -var completers = [snippetCompleter, textCompleter, keyWordCompleter]; -exports.setCompleters = function(val) { - completers = val || []; -}; -exports.addCompleter = function(completer) { - completers.push(completer); -}; -exports.textCompleter = textCompleter; -exports.keyWordCompleter = keyWordCompleter; -exports.snippetCompleter = snippetCompleter; - -var expandSnippet = { - name: "expandSnippet", - exec: function(editor) { - return snippetManager.expandWithTab(editor); - }, - bindKey: "Tab" -}; - -var onChangeMode = function(e, editor) { - loadSnippetsForMode(editor.session.$mode); -}; - -var loadSnippetsForMode = function(mode) { - var id = mode.$id; - if (!snippetManager.files) - snippetManager.files = {}; - loadSnippetFile(id); - if (mode.modes) - mode.modes.forEach(loadSnippetsForMode); -}; - -var loadSnippetFile = function(id) { - if (!id || snippetManager.files[id]) - return; - var snippetFilePath = id.replace("mode", "snippets"); - snippetManager.files[id] = {}; - config.loadModule(snippetFilePath, function(m) { - if (m) { - snippetManager.files[id] = m; - if (!m.snippets && m.snippetText) - m.snippets = snippetManager.parseSnippetFile(m.snippetText); - snippetManager.register(m.snippets || [], m.scope); - if (m.includeScopes) { - snippetManager.snippetMap[m.scope].includeScopes = m.includeScopes; - m.includeScopes.forEach(function(x) { - loadSnippetFile("ace/mode/" + x); - }); - } - } - }); -}; - -function getCompletionPrefix(editor) { - var pos = editor.getCursorPosition(); - var line = editor.session.getLine(pos.row); - var prefix = util.retrievePrecedingIdentifier(line, pos.column); - editor.completers.forEach(function(completer) { - if (completer.identifierRegexps) { - completer.identifierRegexps.forEach(function(identifierRegex) { - if (!prefix && identifierRegex) - prefix = util.retrievePrecedingIdentifier(line, pos.column, identifierRegex); - }); - } - }); - return prefix; -} - -var doLiveAutocomplete = function(e) { - var editor = e.editor; - var text = e.args || ""; - var hasCompleter = editor.completer && editor.completer.activated; - if (e.command.name === "backspace") { - if (hasCompleter && !getCompletionPrefix(editor)) - editor.completer.detach(); - } - else if (e.command.name === "insertstring") { - var prefix = getCompletionPrefix(editor); - if (prefix && !hasCompleter) { - if (!editor.completer) { - editor.completer = new Autocomplete(); - } - editor.completer.autoSelect = false; - editor.completer.autoInsert = false; - editor.completer.showPopup(editor); - } - } -}; - -var Editor = require("../editor").Editor; -require("../config").defineOptions(Editor.prototype, "editor", { - enableBasicAutocompletion: { - set: function(val) { - if (val) { - if (!this.completers) - this.completers = Array.isArray(val)? val: completers; - this.commands.addCommand(Autocomplete.startCommand); - } else { - this.commands.removeCommand(Autocomplete.startCommand); - } - }, - value: false - }, - enableLiveAutocompletion: { - set: function(val) { - if (val) { - if (!this.completers) - this.completers = Array.isArray(val)? val: completers; - this.commands.on('afterExec', doLiveAutocomplete); - } else { - this.commands.removeListener('afterExec', doLiveAutocomplete); - } - }, - value: false - }, - enableSnippets: { - set: function(val) { - if (val) { - this.commands.addCommand(expandSnippet); - this.on("changeMode", onChangeMode); - onChangeMode(null, this); - } else { - this.commands.removeCommand(expandSnippet); - this.off("changeMode", onChangeMode); - } - }, - value: false - } -}); -}); - (function() { - window.require(["ace/ext/language_tools"], function() {}); - })(); - \ No newline at end of file +define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"],function(e,t,i){"use strict";var n=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,r=e("./lib/lang"),s=e("./range").Range,a=e("./anchor").Anchor,c=e("./keyboard/hash_handler").HashHandler,h=e("./tokenizer").Tokenizer,l=s.comparePoints,p=function(){this.snippetMap={},this.snippetNameMap={}};(function(){n.implement(this,o),this.getTokenizer=function(){function e(e,t,i){return e=e.substr(1),/^\d+$/.test(e)&&!i.inFormatString?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}return p.$tokenizer=new h({start:[{regex:/:/,onMatch:function(e,t,i){return i.length&&i[0].expectIf?(i[0].expectIf=!1,i[0].elseBranch=i[0],[i[0]]):":"}},{regex:/\\./,onMatch:function(e,t,i){var n=e[1];return"}"==n&&i.length?e=n:"`$\\".indexOf(n)!=-1?e=n:i.inFormatString&&("n"==n?e="\n":"t"==n?e="\n":"ulULE".indexOf(n)!=-1&&(e={changeCase:n,local:n>"a"})),[e]}},{regex:/}/,onMatch:function(e,t,i){return[i.length?i.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,i,n){var o=e(t.substr(1),i,n);return n.unshift(o[0]),o},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,i){i[0].choices=e.slice(1,-1).split(",")},next:"start"},{regex:"/("+t("/")+"+)/(?:("+t("/")+"*)/)(\\w*):?",onMatch:function(e,t,i){var n=i[0];return n.fmtString=e,e=this.splitRegex.exec(e),n.guard=e[1],n.fmt=e[2],n.flag=e[3],""},next:"start"},{regex:"`"+t("`")+"*`",onMatch:function(e,t,i){return i[0].code=e.splice(1,-1),""},next:"start"},{regex:"\\?",onMatch:function(e,t,i){i[0]&&(i[0].expectIf=!0)},next:"start"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:"/("+t("/")+"+)/",token:"regex"},{regex:"",onMatch:function(e,t,i){i.inFormatString=!0},next:"start"}]}),p.prototype.getTokenizer=function(){return p.$tokenizer},p.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.$getDefaultValue=function(e,t){if(/^[A-Z]\d+$/.test(t)){var i=t.substr(1);return(this.variables[t[0]+"__"]||{})[i]}if(/^\d+$/.test(t))return(this.variables.__||{})[t];if(t=t.replace(/^TM_/,""),e){var n=e.session;switch(t){case"CURRENT_WORD":var o=n.getWordRange();case"SELECTION":case"SELECTED_TEXT":return n.getTextRange(o);case"CURRENT_LINE":return n.getLine(e.getCursorPosition().row);case"PREV_LINE":return n.getLine(e.getCursorPosition().row-1);case"LINE_INDEX":return e.getCursorPosition().column;case"LINE_NUMBER":return e.getCursorPosition().row+1;case"SOFT_TABS":return n.getUseSoftTabs()?"YES":"NO";case"TAB_SIZE":return n.getTabSize();case"FILENAME":case"FILEPATH":return"";case"FULLNAME":return"Ace"}}},this.variables={},this.getVariableValue=function(e,t){return this.variables.hasOwnProperty(t)?this.variables[t](e,t)||"":this.$getDefaultValue(e,t)||""},this.tmStrFormat=function(e,t,i){var n=t.flag||"",o=t.guard;o=new RegExp(o,n.replace(/[^gi]/,""));var r=this.tokenizeTmSnippet(t.fmt,"formatString"),s=this,a=e.replace(o,function(){s.variables.__=arguments;for(var e=s.resolveVariables(r,i),t="E",n=0;n=0&&r.splice(s,1)}}var n=this.snippetMap,o=this.snippetNameMap;e.content?i(e):Array.isArray(e)&&e.forEach(i)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,i=[],n={},o=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=o.exec(e);){if(t[1])try{n=JSON.parse(t[1]),i.push(n)}catch(e){}if(t[4])n.content=t[4].replace(/^\t/gm,""),i.push(n),n={};else{var r=t[2],s=t[3];if("regex"==r){var a=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=a.exec(s)[1],n.trigger=a.exec(s)[1],n.endTrigger=a.exec(s)[1],n.endGuard=a.exec(s)[1]}else"snippet"==r?(n.tabTrigger=s.match(/^\S*/)[0],n.name||(n.name=s)):n[r]=s}}return i},this.getSnippetByName=function(e,t){var i,n=this.snippetNameMap;return this.getActiveScopes(t).some(function(t){var o=n[t];return o&&(i=o[e]),!!i},this),i}}).call(p.prototype);var u=function(e){return e.tabstopManager?e.tabstopManager:(e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=r.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),void this.attach(e))};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){var t=e.data.range,i="r"==e.data.action[0],n=t.start,o=t.end,r=n.row,s=o.row,a=s-r,c=o.column-n.column;if(i&&(a=-a,c=-c),!this.$inChange&&i){var h=this.selectedTabstop,p=h&&!h.some(function(e){return l(e.start,n)<=0&&l(e.end,o)>=0});if(p)return this.detach()}for(var u=this.ranges,d=0;d0?(this.removeRange(g),d--):(g.start.row==r&&g.start.column>n.column&&(g.start.column+=c),g.end.row==r&&g.end.column>=n.column&&(g.end.column+=c),g.start.row>=r&&(g.start.row+=a),g.end.row>=r&&(g.end.row+=a),l(g.start,g.end)>0&&this.removeRange(g)))}u.length||this.detach()},this.updateLinkedFields=function(){var e=this.selectedTabstop;if(e&&e.hasLinkedRanges){this.$inChange=!0;for(var i=this.editor.session,n=i.getTextRange(e.firstNonLinked),o=e.length;o--;){var r=e[o];if(r.linked){var s=t.snippetManager.tmStrFormat(n,r.original);i.replace(r,s)}}this.$inChange=!1}},this.onAfterExec=function(e){e.command&&!e.command.readOnly&&this.updateLinkedFields()},this.onChangeSelection=function(){if(this.editor){for(var e=this.editor.selection.lead,t=this.editor.selection.anchor,i=this.editor.selection.isEmpty(),n=this.ranges.length;n--;)if(!this.ranges[n].linked){var o=this.ranges[n].contains(e.row,e.column),r=i||this.ranges[n].contains(t.row,t.column);if(o&&r)return}this.detach()}},this.onChangeSession=function(){this.detach()},this.tabNext=function(e){var t=this.tabstops.length,i=this.index+(e||1);i=Math.min(Math.max(i,1),t),i==t&&(i=0),this.selectTabstop(i),0===i&&this.detach()},this.selectTabstop=function(e){this.$openTabstops=null;var t=this.tabstops[this.index];if(t&&this.addTabstopMarkers(t),this.index=e,t=this.tabstops[this.index],t&&t.length){if(this.selectedTabstop=t,this.editor.inVirtualSelectionMode)this.editor.selection.setRange(t.firstNonLinked);else{var i=this.editor.multiSelect;i.toSingleRange(t.firstNonLinked.clone());for(var n=t.length;n--;)t.hasLinkedRanges&&t[n].linked||i.addRange(t[n].clone(),!0);i.ranges[0]&&i.addRange(i.ranges[0].clone())}this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)}},this.addTabstops=function(e,t,i){if(this.$openTabstops||(this.$openTabstops=[]),!e[0]){var n=s.fromPoints(i,i);f(n.start,t),f(n.end,t),e[0]=[n],e[0].index=0}var o=this.index,r=[o+1,0],a=this.ranges;e.forEach(function(e,i){for(var n=this.$openTabstops[i]||e,o=e.length;o--;){var c=e[o],h=s.fromPoints(c.start,c.end||c.start);g(h.start,t),g(h.end,t),h.original=c,h.tabstop=n,a.push(h),n!=e?n.unshift(h):n[o]=h,c.fmtString?(h.linked=!0,n.hasLinkedRanges=!0):n.firstNonLinked||(n.firstNonLinked=h)}n.firstNonLinked||(n.hasLinkedRanges=!1),n===e&&(r.push(n),this.$openTabstops[i]=n),this.addTabstopMarkers(n)},this),r.length>2&&(this.tabstops.length&&r.push(r.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,r))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},this.removeRange=function(e){var t=e.tabstop.indexOf(e);e.tabstop.splice(t,1),t=this.ranges.indexOf(e),this.ranges.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(t=this.tabstops.indexOf(e.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new c,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(e){return!1}})}).call(u.prototype);var d={};d.onChange=a.prototype.onChange,d.setPosition=function(e,t){this.pos.row=e,this.pos.column=t},d.update=function(e,t,i){this.$insertRight=i,this.pos=e,this.onChange(t)};var g=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},f=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute;}"),t.snippetManager=new p;var m=e("./editor").Editor;(function(){this.insertSnippet=function(e,i){return t.snippetManager.insertSnippet(this,e,i)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(m.prototype)}),define("ace/autocomplete/popup",["require","exports","module","ace/edit_session","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],function(e,t,i){"use strict";var n=(e("../edit_session").EditSession,e("../virtual_renderer").VirtualRenderer),o=e("../editor").Editor,r=e("../range").Range,s=e("../lib/event"),a=e("../lib/lang"),c=e("../lib/dom"),h=function(e){var t=new n(e);t.$maxLines=4;var i=new o(t);return i.setHighlightActiveLine(!1),i.setShowPrintMargin(!1),i.renderer.setShowGutter(!1),i.renderer.setHighlightGutterLine(!1),i.$mouseHandler.$focusWaitTimout=0,i.$highlightTagPending=!0,i},l=function(e){var t=c.createElement("div"),i=new h(t);e&&e.appendChild(t),t.style.display="none",i.renderer.content.style.cursor="default",i.renderer.setStyle("ace_autocomplete"),i.setOption("displayIndentGuides",!1),i.setOption("dragDelay",150);var n=function(){};i.focus=n,i.$isFocused=!0,i.renderer.$cursorLayer.restartTimer=n,i.renderer.$cursorLayer.element.style.opacity=0,i.renderer.$maxLines=8,i.renderer.$keepTextAreaAtCursor=!1,i.setHighlightActiveLine(!1),i.session.highlight(""),i.session.$searchHighlight.clazz="ace_highlight-marker",i.on("mousedown",function(e){var t=e.getDocumentPosition();i.selection.moveToPosition(t),p.start.row=p.end.row=t.row,e.stop()});var o,l=new r((-1),0,(-1),1/0),p=new r((-1),0,(-1),1/0);p.id=i.session.addMarker(p,"ace_active-line","fullLine"),i.setSelectOnHover=function(e){e?l.id&&(i.session.removeMarker(l.id),l.id=null):l.id=i.session.addMarker(l,"ace_line-hover","fullLine")},i.setSelectOnHover(!1),i.on("mousemove",function(e){if(!o)return void(o=e);if(o.x!=e.x||o.y!=e.y){o=e,o.scrollTop=i.renderer.scrollTop;var t=o.getDocumentPosition().row;l.start.row!=t&&(l.id||i.setRow(t),d(t))}}),i.renderer.on("beforeRender",function(){if(o&&l.start.row!=-1){o.$pos=null;var e=o.getDocumentPosition().row;l.id||i.setRow(e),d(e,!0)}}),i.renderer.on("afterRender",function(){var e=i.getRow(),t=i.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow];n!=t.selectedNode&&(t.selectedNode&&c.removeCssClass(t.selectedNode,"ace_selected"),t.selectedNode=n,n&&c.addCssClass(n,"ace_selected"))});var u=function(){d(-1)},d=function(e,t){e!==l.start.row&&(l.start.row=l.end.row=e,t||i.session._emit("changeBackMarker"),i._emit("changeHoverMarker"))};i.getHoveredRow=function(){return l.start.row},s.addListener(i.container,"mouseout",u),i.on("hide",u),i.on("changeSelection",u),i.session.doc.getLength=function(){return i.data.length},i.session.doc.getLine=function(e){var t=i.data[e];return"string"==typeof t?t:t&&t.value||""};var g=i.session.bgTokenizer;return g.$tokenizeRow=function(e){var t=i.data[e],n=[];if(!t)return n;"string"==typeof t&&(t={value:t}),t.caption||(t.caption=t.value||t.name);for(var o,r,s=-1,a=0;as-t&&!n?(r.style.top="",r.style.bottom=s-l+"px",i.isTopdown=!1):(l+=t,r.style.top=l+"px",r.style.bottom="",i.isTopdown=!0),r.style.display="",this.renderer.$textLayer.checkForSizeChanges();var p=e.left;p+r.offsetWidth>a&&(p=a-r.offsetWidth),r.style.left=p+"px",this._signal("show"),o=null,i.isOpen=!0},i.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},i.$imageSize=0,i.$borderSize=1,i};c.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1;}.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid #abbffe; margin-top: -1px; background: rgba(233,233,253,0.4);}.ace_editor.ace_autocomplete .ace_line-hover { position: absolute; z-index: 2;}.ace_editor.ace_autocomplete .ace_scroller { background: none; border: none; box-shadow: none;}.ace_rightAlignedText { color: gray; display: inline-block; position: absolute; right: 4px; text-align: right; z-index: -1;}.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #000; text-shadow: 0 0 0.01em;}.ace_editor.ace_autocomplete { width: 280px; z-index: 200000; background: #fbfbfb; color: #444; border: 1px lightgray solid; position: fixed; box-shadow: 2px 3px 5px rgba(0,0,0,.2); line-height: 1.4;}"),t.AcePopup=l}),define("ace/autocomplete/util",["require","exports","module"],function(e,t,i){"use strict";t.parForEach=function(e,t,i){var n=0,o=e.length;0===o&&i();for(var r=0;r=0&&i.test(e[r]);r--)o.push(e[r]);return o.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,i){i=i||n;for(var o=[],r=t;r=i?-1:t+1;break;case"start":t=0;break;case"end":t=i}this.popup.setRow(t)},this.insertMatch=function(e){if(e||(e=this.popup.getData(this.popup.getRow())),!e)return!1;if(e.completer&&e.completer.insertMatch)e.completer.insertMatch(this.editor,e);else{if(this.completions.filterText)for(var t,i=this.editor.selection.getAllRanges(),n=0;t=i[n];n++)t.start.column-=this.completions.filterText.length,this.editor.session.remove(t);e.snippet?c.insertSnippet(this.editor,e.snippet):this.editor.execCommand("insertstring",e.value||e)}this.detach()},this.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Space:function(e){e.completer.detach(),e.insert(" ")},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(!0)},Tab:function(e){var t=e.completer.insertMatch();return t||e.tabstopManager?t:void e.completer.goTo("down")},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},this.gatherCompletions=function(e,t){var i=e.getSession(),n=e.getCursorPosition(),o=i.getLine(n.row),s=r.retrievePrecedingIdentifier(o,n.column);this.base=i.doc.createAnchor(n.row,n.column-s.length),this.base.$insertRight=!0;var a=[],c=e.completers.length;return e.completers.forEach(function(o,h){o.getCompletions(e,i,n,s,function(n,o){n||(a=a.concat(o));var s=e.getCursorPosition(),h=i.getLine(s.row);t(null,{prefix:r.retrievePrecedingIdentifier(h,s.column,o[0]&&o[0].identifierRegex),matches:a,finished:0===--c})})}),!0},this.showPopup=function(e){this.editor&&this.detach(),this.activated=!0,this.editor=e,e.completer!=this&&(e.completer&&e.completer.detach(),e.completer=this),e.keyBinding.addKeyboardHandler(this.keyboardHandler),e.on("changeSelection",this.changeListener),e.on("blur",this.blurListener),e.on("mousedown",this.mousedownListener),e.on("mousewheel",this.mousewheelListener),this.updateCompletions()},this.updateCompletions=function(e){if(e&&this.base&&this.completions){var t=this.editor.getCursorPosition(),i=this.editor.session.getTextRange({start:this.base,end:t});if(i==this.completions.filterText)return;return this.completions.setFilter(i),this.completions.filtered.length&&(1!=this.completions.filtered.length||this.completions.filtered[0].value!=i||this.completions.filtered[0].snippet)?void this.openPopup(this.editor,i,e):this.detach()}var n=this.gatherCompletionsId;this.gatherCompletions(this.editor,function(t,i){var o=function(){if(i.finished)return this.detach()}.bind(this),r=i.prefix,s=i&&i.matches;if(!s||!s.length)return o();if(0===r.indexOf(i.prefix)&&n==this.gatherCompletionsId){this.completions=new l(s),this.exactMatch&&(this.completions.exactMatch=!0),this.completions.setFilter(r);var a=this.completions.filtered;return a.length&&(1!=a.length||a[0].value!=r||a[0].snippet)?this.autoInsert&&1==a.length&&i.finished?this.insertMatch(a[0]):void this.openPopup(this.editor,r,e):o()}}.bind(this))},this.cancelContextMenu=function(){this.editor.$mouseHandler.cancelContextMenu()},this.updateDocTooltip=function(){var e=this.popup,t=e.data,i=t&&(t[e.getHoveredRow()]||t[e.getRow()]),n=null;return i&&this.editor&&this.popup.isOpen?(this.editor.completers.some(function(e){return e.getDocTooltip&&(n=e.getDocTooltip(i)),n}),n||(n=i),"string"==typeof n&&(n={docText:n}),n&&(n.docHTML||n.docText)?void this.showDocTooltip(n):this.hideDocTooltip()):this.hideDocTooltip()},this.showDocTooltip=function(e){this.tooltipNode||(this.tooltipNode=a.createElement("div"),this.tooltipNode.className="ace_tooltip ace_doc-tooltip",this.tooltipNode.style.margin=0,this.tooltipNode.style.pointerEvents="auto",this.tooltipNode.tabIndex=-1,this.tooltipNode.onblur=this.blurListener.bind(this));var t=this.tooltipNode;e.docHTML?t.innerHTML=e.docHTML:e.docText&&(t.textContent=e.docText),t.parentNode||document.body.appendChild(t);var i=this.popup,n=i.container.getBoundingClientRect();t.style.top=i.container.style.top,t.style.bottom=i.container.style.bottom,window.innerWidth-n.right<320?(t.style.right=window.innerWidth-n.left+"px",t.style.left=""):(t.style.left=n.right+1+"px",t.style.right=""),t.style.display="block"},this.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}}}).call(h.prototype),h.startCommand={name:"startAutocomplete",exec:function(e){e.completer||(e.completer=new h),e.completer.autoInsert=e.completer.autoSelect=!0,e.completer.showPopup(e),e.completer.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var l=function(e,t,i){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1};(function(){this.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else var t=this.all;this.filterText=e,t=this.filterCompletions(t,this.filterText),t=t.sort(function(e,t){return t.exactMatch-e.exactMatch||t.score-e.score});var i=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t!==i&&(i=t,!0)}),this.filtered=t},this.filterCompletions=function(e,t){var i=[],n=t.toUpperCase(),o=t.toLowerCase();e:for(var r,s=0;r=e[s];s++){var a=r.value||r.caption||r.snippet;if(a){var c,h,l=-1,p=0,u=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue e}else for(var d=0;d=0&&(f<0||g0&&(l===-1&&(u+=10),u+=h),p|=1<",a.escapeHTML(e.caption),"","
",a.escapeHTML(e.snippet)].join("")); +}},u=[p,h,l];t.setCompleters=function(e){u=e||[]},t.addCompleter=function(e){u.push(e)},t.textCompleter=h,t.keyWordCompleter=l,t.snippetCompleter=p;var d={name:"expandSnippet",exec:function(e){return o.expandWithTab(e)},bindKey:"Tab"},g=function(e,t){f(t.session.$mode)},f=function(e){var t=e.$id;o.files||(o.files={}),m(t),e.modes&&e.modes.forEach(f)},m=function(e){if(e&&!o.files[e]){var t=e.replace("mode","snippets");o.files[e]={},s.loadModule(t,function(t){t&&(o.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=o.parseSnippetFile(t.snippetText)),o.register(t.snippets||[],t.scope),t.includeScopes&&(o.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){m("ace/mode/"+e)})))})}},v=function(e){var t=e.editor,i=(e.args||"",t.completer&&t.completer.activated);if("backspace"===e.command.name)i&&!n(t)&&t.completer.detach();else if("insertstring"===e.command.name){var o=n(t);o&&!i&&(t.completer||(t.completer=new r),t.completer.autoSelect=!1,t.completer.autoInsert=!1,t.completer.showPopup(t))}},b=e("../editor").Editor;e("../config").defineOptions(b.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:u),this.commands.addCommand(r.startCommand)):this.commands.removeCommand(r.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:u),this.commands.on("afterExec",v)):this.commands.removeListener("afterExec",v)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(d),this.on("changeMode",g),g(null,this)):(this.commands.removeCommand(d),this.off("changeMode",g))},value:!1}})}),function(){window.require(["ace/ext/language_tools"],function(){})}(); \ No newline at end of file diff --git a/www/js/vendor/ace/ext-linking.js b/www/js/vendor/ace/ext-linking.js index e004d6b7f..f6ea3c003 100755 --- a/www/js/vendor/ace/ext-linking.js +++ b/www/js/vendor/ace/ext-linking.js @@ -1,52 +1 @@ -define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) { - -var Editor = require("ace/editor").Editor; - -require("../config").defineOptions(Editor.prototype, "editor", { - enableLinking: { - set: function(val) { - if (val) { - this.on("click", onClick); - this.on("mousemove", onMouseMove); - } else { - this.off("click", onClick); - this.off("mousemove", onMouseMove); - } - }, - value: false - } -}) - -function onMouseMove(e) { - var editor = e.editor; - var ctrl = e.getAccelKey(); - - if (ctrl) { - var editor = e.editor; - var docPos = e.getDocumentPosition(); - var session = editor.session; - var token = session.getTokenAt(docPos.row, docPos.column); - - editor._emit("linkHover", {position: docPos, token: token}); - } -} - -function onClick(e) { - var ctrl = e.getAccelKey(); - var button = e.getButton(); - - if (button == 0 && ctrl) { - var editor = e.editor; - var docPos = e.getDocumentPosition(); - var session = editor.session; - var token = session.getTokenAt(docPos.row, docPos.column); - - editor._emit("linkClick", {position: docPos, token: token}); - } -} - -}); - (function() { - window.require(["ace/ext/linking"], function() {}); - })(); - \ No newline at end of file +define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,o,i){function t(e){var o=e.editor,i=e.getAccelKey();if(i){var o=e.editor,t=e.getDocumentPosition(),n=o.session,c=n.getTokenAt(t.row,t.column);o._emit("linkHover",{position:t,token:c})}}function n(e){var o=e.getAccelKey(),i=e.getButton();if(0==i&&o){var t=e.editor,n=e.getDocumentPosition(),c=t.session,r=c.getTokenAt(n.row,n.column);t._emit("linkClick",{position:n,token:r})}}var c=e("ace/editor").Editor;e("../config").defineOptions(c.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",n),this.on("mousemove",t)):(this.off("click",n),this.off("mousemove",t))},value:!1}})}),function(){window.require(["ace/ext/linking"],function(){})}(); \ No newline at end of file diff --git a/www/js/vendor/ace/ext-modelist.js b/www/js/vendor/ace/ext-modelist.js index f3eee10ec..83e806616 100755 --- a/www/js/vendor/ace/ext-modelist.js +++ b/www/js/vendor/ace/ext-modelist.js @@ -1,187 +1 @@ -define("ace/ext/modelist",["require","exports","module"], function(require, exports, module) { -"use strict"; - -var modes = []; -function getModeForPath(path) { - var mode = modesByName.text; - var fileName = path.split(/[\/\\]/).pop(); - for (var i = 0; i < modes.length; i++) { - if (modes[i].supportsFile(fileName)) { - mode = modes[i]; - break; - } - } - return mode; -} - -var Mode = function(name, caption, extensions) { - this.name = name; - this.caption = caption; - this.mode = "ace/mode/" + name; - this.extensions = extensions; - if (/\^/.test(extensions)) { - var re = extensions.replace(/\|(\^)?/g, function(a, b){ - return "$|" + (b ? "^" : "^.*\\."); - }) + "$"; - } else { - var re = "^.*\\.(" + extensions + ")$"; - } - - this.extRe = new RegExp(re, "gi"); -}; - -Mode.prototype.supportsFile = function(filename) { - return filename.match(this.extRe); -}; -var supportedModes = { - ABAP: ["abap"], - ActionScript:["as"], - ADA: ["ada|adb"], - Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"], - AsciiDoc: ["asciidoc"], - Assembly_x86:["asm"], - AutoHotKey: ["ahk"], - BatchFile: ["bat|cmd"], - C9Search: ["c9search_results"], - C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp"], - Cirru: ["cirru|cr"], - Clojure: ["clj|cljs"], - Cobol: ["CBL|COB"], - coffee: ["coffee|cf|cson|^Cakefile"], - ColdFusion: ["cfm"], - CSharp: ["cs"], - CSS: ["css"], - Curly: ["curly"], - D: ["d|di"], - Dart: ["dart"], - Diff: ["diff|patch"], - Dockerfile: ["^Dockerfile"], - Dot: ["dot"], - Dummy: ["dummy"], - DummySyntax: ["dummy"], - Eiffel: ["e"], - EJS: ["ejs"], - Elixir: ["ex|exs"], - Elm: ["elm"], - Erlang: ["erl|hrl"], - Forth: ["frt|fs|ldr"], - FTL: ["ftl"], - Gcode: ["gcode"], - Gherkin: ["feature"], - Gitignore: ["^.gitignore"], - Glsl: ["glsl|frag|vert"], - golang: ["go"], - Groovy: ["groovy"], - HAML: ["haml"], - Handlebars: ["hbs|handlebars|tpl|mustache"], - Haskell: ["hs"], - haXe: ["hx"], - HTML: ["html|htm|xhtml"], - HTML_Ruby: ["erb|rhtml|html.erb"], - INI: ["ini|conf|cfg|prefs"], - Io: ["io"], - Jack: ["jack"], - Jade: ["jade"], - Java: ["java"], - JavaScript: ["js|jsm"], - JSON: ["json"], - JSONiq: ["jq"], - JSP: ["jsp"], - JSX: ["jsx"], - Julia: ["jl"], - LaTeX: ["tex|latex|ltx|bib"], - LESS: ["less"], - Liquid: ["liquid"], - Lisp: ["lisp"], - LiveScript: ["ls"], - LogiQL: ["logic|lql"], - LSL: ["lsl"], - Lua: ["lua"], - LuaPage: ["lp"], - Lucene: ["lucene"], - Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"], - Markdown: ["md|markdown"], - Mask: ["mask"], - MATLAB: ["matlab"], - MEL: ["mel"], - MUSHCode: ["mc|mush"], - MySQL: ["mysql"], - Nix: ["nix"], - ObjectiveC: ["m|mm"], - OCaml: ["ml|mli"], - Pascal: ["pas|p"], - Perl: ["pl|pm"], - pgSQL: ["pgsql"], - PHP: ["php|phtml"], - Powershell: ["ps1"], - Praat: ["praat|praatscript|psc|proc"], - Prolog: ["plg|prolog"], - Properties: ["properties"], - Protobuf: ["proto"], - Python: ["py"], - R: ["r"], - RDoc: ["Rd"], - RHTML: ["Rhtml"], - Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"], - Rust: ["rs"], - SASS: ["sass"], - SCAD: ["scad"], - Scala: ["scala"], - Scheme: ["scm|rkt"], - SCSS: ["scss"], - SH: ["sh|bash|^.bashrc"], - SJS: ["sjs"], - Smarty: ["smarty|tpl"], - snippets: ["snippets"], - Soy_Template:["soy"], - Space: ["space"], - SQL: ["sql"], - Stylus: ["styl|stylus"], - SVG: ["svg"], - Tcl: ["tcl"], - Tex: ["tex"], - Text: ["txt"], - Textile: ["textile"], - Toml: ["toml"], - Twig: ["twig"], - Typescript: ["ts|typescript|str"], - Vala: ["vala"], - VBScript: ["vbs|vb"], - Velocity: ["vm"], - Verilog: ["v|vh|sv|svh"], - VHDL: ["vhd|vhdl"], - XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"], - XQuery: ["xq"], - YAML: ["yaml|yml"] -}; - -var nameOverrides = { - ObjectiveC: "Objective-C", - CSharp: "C#", - golang: "Go", - C_Cpp: "C and C++", - coffee: "CoffeeScript", - HTML_Ruby: "HTML (Ruby)", - FTL: "FreeMarker" -}; -var modesByName = {}; -for (var name in supportedModes) { - var data = supportedModes[name]; - var displayName = (nameOverrides[name] || name).replace(/_/g, " "); - var filename = name.toLowerCase(); - var mode = new Mode(filename, displayName, data[0]); - modesByName[filename] = mode; - modes.push(mode); -} - -module.exports = { - getModeForPath: getModeForPath, - modes: modes, - modesByName: modesByName -}; - -}); - (function() { - window.require(["ace/ext/modelist"], function() {}); - })(); - \ No newline at end of file +define("ace/ext/modelist",["require","exports","module"],function(e,s,t){"use strict";function a(e){for(var s=c.text,t=e.split(/[\/\\]/).pop(),a=0;a\s+/g, ">"); - -var SearchBox = function(editor, range, showReplaceForm) { - var div = dom.createElement("div"); - div.innerHTML = html; - this.element = div.firstChild; - - this.$init(); - this.setEditor(editor); -}; - -(function() { - this.setEditor = function(editor) { - editor.searchBox = this; - editor.container.appendChild(this.element); - this.editor = editor; - }; - - this.$initElements = function(sb) { - this.searchBox = sb.querySelector(".ace_search_form"); - this.replaceBox = sb.querySelector(".ace_replace_form"); - this.searchOptions = sb.querySelector(".ace_search_options"); - this.regExpOption = sb.querySelector("[action=toggleRegexpMode]"); - this.caseSensitiveOption = sb.querySelector("[action=toggleCaseSensitive]"); - this.wholeWordOption = sb.querySelector("[action=toggleWholeWords]"); - this.searchInput = this.searchBox.querySelector(".ace_search_field"); - this.replaceInput = this.replaceBox.querySelector(".ace_search_field"); - }; - - this.$init = function() { - var sb = this.element; - - this.$initElements(sb); - - var _this = this; - event.addListener(sb, "mousedown", function(e) { - setTimeout(function(){ - _this.activeInput.focus(); - }, 0); - event.stopPropagation(e); - }); - event.addListener(sb, "click", function(e) { - var t = e.target || e.srcElement; - var action = t.getAttribute("action"); - if (action && _this[action]) - _this[action](); - else if (_this.$searchBarKb.commands[action]) - _this.$searchBarKb.commands[action].exec(_this); - event.stopPropagation(e); - }); - - event.addCommandKeyListener(sb, function(e, hashId, keyCode) { - var keyString = keyUtil.keyCodeToString(keyCode); - var command = _this.$searchBarKb.findKeyCommand(hashId, keyString); - if (command && command.exec) { - command.exec(_this); - event.stopEvent(e); - } - }); - - this.$onChange = lang.delayedCall(function() { - _this.find(false, false); - }); - - event.addListener(this.searchInput, "input", function() { - _this.$onChange.schedule(20); - }); - event.addListener(this.searchInput, "focus", function() { - _this.activeInput = _this.searchInput; - _this.searchInput.value && _this.highlight(); - }); - event.addListener(this.replaceInput, "focus", function() { - _this.activeInput = _this.replaceInput; - _this.searchInput.value && _this.highlight(); - }); - }; - this.$closeSearchBarKb = new HashHandler([{ - bindKey: "Esc", - name: "closeSearchBar", - exec: function(editor) { - editor.searchBox.hide(); - } - }]); - this.$searchBarKb = new HashHandler(); - this.$searchBarKb.bindKeys({ - "Ctrl-f|Command-f|Ctrl-H|Command-Option-F": function(sb) { - var isReplace = sb.isReplace = !sb.isReplace; - sb.replaceBox.style.display = isReplace ? "" : "none"; - sb[isReplace ? "replaceInput" : "searchInput"].focus(); - }, - "Ctrl-G|Command-G": function(sb) { - sb.findNext(); - }, - "Ctrl-Shift-G|Command-Shift-G": function(sb) { - sb.findPrev(); - }, - "esc": function(sb) { - setTimeout(function() { sb.hide();}); - }, - "Return": function(sb) { - if (sb.activeInput == sb.replaceInput) - sb.replace(); - sb.findNext(); - }, - "Shift-Return": function(sb) { - if (sb.activeInput == sb.replaceInput) - sb.replace(); - sb.findPrev(); - }, - "Alt-Return": function(sb) { - if (sb.activeInput == sb.replaceInput) - sb.replaceAll(); - sb.findAll(); - }, - "Tab": function(sb) { - (sb.activeInput == sb.replaceInput ? sb.searchInput : sb.replaceInput).focus(); - } - }); - - this.$searchBarKb.addCommands([{ - name: "toggleRegexpMode", - bindKey: {win: "Alt-R|Alt-/", mac: "Ctrl-Alt-R|Ctrl-Alt-/"}, - exec: function(sb) { - sb.regExpOption.checked = !sb.regExpOption.checked; - sb.$syncOptions(); - } - }, { - name: "toggleCaseSensitive", - bindKey: {win: "Alt-C|Alt-I", mac: "Ctrl-Alt-R|Ctrl-Alt-I"}, - exec: function(sb) { - sb.caseSensitiveOption.checked = !sb.caseSensitiveOption.checked; - sb.$syncOptions(); - } - }, { - name: "toggleWholeWords", - bindKey: {win: "Alt-B|Alt-W", mac: "Ctrl-Alt-B|Ctrl-Alt-W"}, - exec: function(sb) { - sb.wholeWordOption.checked = !sb.wholeWordOption.checked; - sb.$syncOptions(); - } - }]); - - this.$syncOptions = function() { - dom.setCssClass(this.regExpOption, "checked", this.regExpOption.checked); - dom.setCssClass(this.wholeWordOption, "checked", this.wholeWordOption.checked); - dom.setCssClass(this.caseSensitiveOption, "checked", this.caseSensitiveOption.checked); - this.find(false, false); - }; - - this.highlight = function(re) { - this.editor.session.highlight(re || this.editor.$search.$options.re); - this.editor.renderer.updateBackMarkers() - }; - this.find = function(skipCurrent, backwards) { - var range = this.editor.find(this.searchInput.value, { - skipCurrent: skipCurrent, - backwards: backwards, - wrap: true, - regExp: this.regExpOption.checked, - caseSensitive: this.caseSensitiveOption.checked, - wholeWord: this.wholeWordOption.checked - }); - var noMatch = !range && this.searchInput.value; - dom.setCssClass(this.searchBox, "ace_nomatch", noMatch); - this.editor._emit("findSearchBox", { match: !noMatch }); - this.highlight(); - }; - this.findNext = function() { - this.find(true, false); - }; - this.findPrev = function() { - this.find(true, true); - }; - this.findAll = function(){ - var range = this.editor.findAll(this.searchInput.value, { - regExp: this.regExpOption.checked, - caseSensitive: this.caseSensitiveOption.checked, - wholeWord: this.wholeWordOption.checked - }); - var noMatch = !range && this.searchInput.value; - dom.setCssClass(this.searchBox, "ace_nomatch", noMatch); - this.editor._emit("findSearchBox", { match: !noMatch }); - this.highlight(); - this.hide(); - }; - this.replace = function() { - if (!this.editor.getReadOnly()) - this.editor.replace(this.replaceInput.value); - }; - this.replaceAndFindNext = function() { - if (!this.editor.getReadOnly()) { - this.editor.replace(this.replaceInput.value); - this.findNext() - } - }; - this.replaceAll = function() { - if (!this.editor.getReadOnly()) - this.editor.replaceAll(this.replaceInput.value); - }; - - this.hide = function() { - this.element.style.display = "none"; - this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb); - this.editor.focus(); - }; - this.show = function(value, isReplace) { - this.element.style.display = ""; - this.replaceBox.style.display = isReplace ? "" : "none"; - - this.isReplace = isReplace; - - if (value) - this.searchInput.value = value; - this.searchInput.focus(); - this.searchInput.select(); - - this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb); - }; - - this.isFocused = function() { - var el = document.activeElement; - return el == this.searchInput || el == this.replaceInput; - } -}).call(SearchBox.prototype); - -exports.SearchBox = SearchBox; - -exports.Search = function(editor, isReplace) { - var sb = editor.searchBox || new SearchBox(editor); - sb.show(editor.session.getTextRange(), isReplace); -}; - -}); - -define("ace/ext/old_ie",["require","exports","module","ace/lib/useragent","ace/tokenizer","ace/ext/searchbox","ace/mode/text"], function(require, exports, module) { -"use strict"; -var MAX_TOKEN_COUNT = 1000; -var useragent = require("../lib/useragent"); -var TokenizerModule = require("../tokenizer"); - -function patch(obj, name, regexp, replacement) { - eval("obj['" + name + "']=" + obj[name].toString().replace( - regexp, replacement - )); -} - -if (useragent.isIE && useragent.isIE < 10 && window.top.document.compatMode === "BackCompat") - useragent.isOldIE = true; - -if (typeof document != "undefined" && !document.documentElement.querySelector) { - useragent.isOldIE = true; - var qs = function(el, selector) { - if (selector.charAt(0) == ".") { - var classNeme = selector.slice(1); - } else { - var m = selector.match(/(\w+)=(\w+)/); - var attr = m && m[1]; - var attrVal = m && m[2]; - } - for (var i = 0; i < el.all.length; i++) { - var ch = el.all[i]; - if (classNeme) { - if (ch.className.indexOf(classNeme) != -1) - return ch; - } else if (attr) { - if (ch.getAttribute(attr) == attrVal) - return ch; - } - } - }; - var sb = require("./searchbox").SearchBox.prototype; - patch( - sb, "$initElements", - /([^\s=]*).querySelector\((".*?")\)/g, - "qs($1, $2)" - ); -} - -var compliantExecNpcg = /()??/.exec("")[1] === undefined; -if (compliantExecNpcg) - return; -var proto = TokenizerModule.Tokenizer.prototype; -TokenizerModule.Tokenizer_orig = TokenizerModule.Tokenizer; -proto.getLineTokens_orig = proto.getLineTokens; - -patch( - TokenizerModule, "Tokenizer", - "ruleRegExps.push(adjustedregex);\n", - function(m) { - return m + '\ - if (state[i].next && RegExp(adjustedregex).test(""))\n\ - rule._qre = RegExp(adjustedregex, "g");\n\ - '; - } -); -TokenizerModule.Tokenizer.prototype = proto; -patch( - proto, "getLineTokens", - /if \(match\[i \+ 1\] === undefined\)\s*continue;/, - "if (!match[i + 1]) {\n\ - if (value)continue;\n\ - var qre = state[mapping[i]]._qre;\n\ - if (!qre) continue;\n\ - qre.lastIndex = lastIndex;\n\ - if (!qre.exec(line) || qre.lastIndex != lastIndex)\n\ - continue;\n\ - }" -); - -patch( - require("../mode/text").Mode.prototype, "getTokenizer", - /Tokenizer/, - "TokenizerModule.Tokenizer" -); - -useragent.isOldIE = true; - -}); - (function() { - window.require(["ace/ext/old_ie"], function() {}); - })(); - \ No newline at end of file +define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,i){"use strict";var n=e("../lib/dom"),o=e("../lib/lang"),r=e("../lib/event"),a=".ace_search {background-color: #ddd;border: 1px solid #cbcbcb;border-top: 0 none;max-width: 325px;overflow: hidden;margin: 0;padding: 4px;padding-right: 6px;padding-bottom: 0;position: absolute;top: 0px;z-index: 99;white-space: normal;}.ace_search.left {border-left: 0 none;border-radius: 0px 0px 5px 0px;left: 0;}.ace_search.right {border-radius: 0px 0px 0px 5px;border-right: 0 none;right: 0;}.ace_search_form, .ace_replace_form {border-radius: 3px;border: 1px solid #cbcbcb;float: left;margin-bottom: 4px;overflow: hidden;}.ace_search_form.ace_nomatch {outline: 1px solid red;}.ace_search_field {background-color: white;border-right: 1px solid #cbcbcb;border: 0 none;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;float: left;height: 22px;outline: 0;padding: 0 7px;width: 214px;margin: 0;}.ace_searchbtn,.ace_replacebtn {background: #fff;border: 0 none;border-left: 1px solid #dcdcdc;cursor: pointer;float: left;height: 22px;margin: 0;padding: 0;position: relative;}.ace_searchbtn:last-child,.ace_replacebtn:last-child {border-top-right-radius: 3px;border-bottom-right-radius: 3px;}.ace_searchbtn:disabled {background: none;cursor: default;}.ace_searchbtn {background-position: 50% 50%;background-repeat: no-repeat;width: 27px;}.ace_searchbtn.prev {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); }.ace_searchbtn.next {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); }.ace_searchbtn_close {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;border-radius: 50%;border: 0 none;color: #656565;cursor: pointer;float: right;font: 16px/16px Arial;height: 14px;margin: 5px 1px 9px 5px;padding: 0;text-align: center;width: 14px;}.ace_searchbtn_close:hover {background-color: #656565;background-position: 50% 100%;color: white;}.ace_replacebtn.prev {width: 54px}.ace_replacebtn.next {width: 27px}.ace_button {margin-left: 2px;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;overflow: hidden;opacity: 0.7;border: 1px solid rgba(100,100,100,0.23);padding: 1px;-moz-box-sizing: border-box;box-sizing: border-box;color: black;}.ace_button:hover {background-color: #eee;opacity:1;}.ace_button:active {background-color: #ddd;}.ace_button.checked {border-color: #3399ff;opacity:1;}.ace_search_options{margin-bottom: 3px;text-align: right;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;}",c=e("../keyboard/hash_handler").HashHandler,s=e("../lib/keys");n.importCssString(a,"ace_searchbox");var l=''.replace(/>\s+/g,">"),d=function(e,t,i){var o=n.createElement("div");o.innerHTML=l,this.element=o.firstChild,this.$init(),this.setEditor(e)};(function(){this.setEditor=function(e){e.searchBox=this,e.container.appendChild(this.element),this.editor=e},this.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOptions=e.querySelector(".ace_search_options"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field")},this.$init=function(){var e=this.element;this.$initElements(e);var t=this;r.addListener(e,"mousedown",function(e){setTimeout(function(){t.activeInput.focus()},0),r.stopPropagation(e)}),r.addListener(e,"click",function(e){var i=e.target||e.srcElement,n=i.getAttribute("action");n&&t[n]?t[n]():t.$searchBarKb.commands[n]&&t.$searchBarKb.commands[n].exec(t),r.stopPropagation(e)}),r.addCommandKeyListener(e,function(e,i,n){var o=s.keyCodeToString(n),a=t.$searchBarKb.findKeyCommand(i,o);a&&a.exec&&(a.exec(t),r.stopEvent(e))}),this.$onChange=o.delayedCall(function(){t.find(!1,!1)}),r.addListener(this.searchInput,"input",function(){t.$onChange.schedule(20)}),r.addListener(this.searchInput,"focus",function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()}),r.addListener(this.replaceInput,"focus",function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()})},this.$closeSearchBarKb=new c([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new c,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f|Ctrl-H|Command-Option-F":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e[t?"replaceInput":"searchInput"].focus()},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},"Alt-Return":function(e){e.activeInput==e.replaceInput&&e.replaceAll(),e.findAll()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}}]),this.$syncOptions=function(){n.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),n.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),n.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.find(!1,!1)},this.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(e,t){var i=this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),o=!i&&this.searchInput.value;n.setCssClass(this.searchBox,"ace_nomatch",o),this.editor._emit("findSearchBox",{match:!o}),this.highlight()},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var e=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),t=!e&&this.searchInput.value;n.setCssClass(this.searchBox,"ace_nomatch",t),this.editor._emit("findSearchBox",{match:!t}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.element.style.display="",this.replaceBox.style.display=t?"":"none",this.isReplace=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb)},this.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput}}).call(d.prototype),t.SearchBox=d,t.Search=function(e,t){var i=e.searchBox||new d(e);i.show(e.session.getTextRange(),t)}}),define("ace/ext/old_ie",["require","exports","module","ace/lib/useragent","ace/tokenizer","ace/ext/searchbox","ace/mode/text"],function(require,exports,module){"use strict";function patch(obj,name,regexp,replacement){eval("obj['"+name+"']="+obj[name].toString().replace(regexp,replacement))}var MAX_TOKEN_COUNT=1e3,useragent=require("../lib/useragent"),TokenizerModule=require("../tokenizer");if(useragent.isIE&&useragent.isIE<10&&"BackCompat"===window.top.document.compatMode&&(useragent.isOldIE=!0),"undefined"!=typeof document&&!document.documentElement.querySelector){useragent.isOldIE=!0;var qs=function(e,t){if("."==t.charAt(0))var i=t.slice(1);else var n=t.match(/(\w+)=(\w+)/),o=n&&n[1],r=n&&n[2];for(var a=0;a\s+/g, ">"); - -var SearchBox = function(editor, range, showReplaceForm) { - var div = dom.createElement("div"); - div.innerHTML = html; - this.element = div.firstChild; - - this.$init(); - this.setEditor(editor); -}; - -(function() { - this.setEditor = function(editor) { - editor.searchBox = this; - editor.container.appendChild(this.element); - this.editor = editor; - }; - - this.$initElements = function(sb) { - this.searchBox = sb.querySelector(".ace_search_form"); - this.replaceBox = sb.querySelector(".ace_replace_form"); - this.searchOptions = sb.querySelector(".ace_search_options"); - this.regExpOption = sb.querySelector("[action=toggleRegexpMode]"); - this.caseSensitiveOption = sb.querySelector("[action=toggleCaseSensitive]"); - this.wholeWordOption = sb.querySelector("[action=toggleWholeWords]"); - this.searchInput = this.searchBox.querySelector(".ace_search_field"); - this.replaceInput = this.replaceBox.querySelector(".ace_search_field"); - }; - - this.$init = function() { - var sb = this.element; - - this.$initElements(sb); - - var _this = this; - event.addListener(sb, "mousedown", function(e) { - setTimeout(function(){ - _this.activeInput.focus(); - }, 0); - event.stopPropagation(e); - }); - event.addListener(sb, "click", function(e) { - var t = e.target || e.srcElement; - var action = t.getAttribute("action"); - if (action && _this[action]) - _this[action](); - else if (_this.$searchBarKb.commands[action]) - _this.$searchBarKb.commands[action].exec(_this); - event.stopPropagation(e); - }); - - event.addCommandKeyListener(sb, function(e, hashId, keyCode) { - var keyString = keyUtil.keyCodeToString(keyCode); - var command = _this.$searchBarKb.findKeyCommand(hashId, keyString); - if (command && command.exec) { - command.exec(_this); - event.stopEvent(e); - } - }); - - this.$onChange = lang.delayedCall(function() { - _this.find(false, false); - }); - - event.addListener(this.searchInput, "input", function() { - _this.$onChange.schedule(20); - }); - event.addListener(this.searchInput, "focus", function() { - _this.activeInput = _this.searchInput; - _this.searchInput.value && _this.highlight(); - }); - event.addListener(this.replaceInput, "focus", function() { - _this.activeInput = _this.replaceInput; - _this.searchInput.value && _this.highlight(); - }); - }; - this.$closeSearchBarKb = new HashHandler([{ - bindKey: "Esc", - name: "closeSearchBar", - exec: function(editor) { - editor.searchBox.hide(); - } - }]); - this.$searchBarKb = new HashHandler(); - this.$searchBarKb.bindKeys({ - "Ctrl-f|Command-f|Ctrl-H|Command-Option-F": function(sb) { - var isReplace = sb.isReplace = !sb.isReplace; - sb.replaceBox.style.display = isReplace ? "" : "none"; - sb[isReplace ? "replaceInput" : "searchInput"].focus(); - }, - "Ctrl-G|Command-G": function(sb) { - sb.findNext(); - }, - "Ctrl-Shift-G|Command-Shift-G": function(sb) { - sb.findPrev(); - }, - "esc": function(sb) { - setTimeout(function() { sb.hide();}); - }, - "Return": function(sb) { - if (sb.activeInput == sb.replaceInput) - sb.replace(); - sb.findNext(); - }, - "Shift-Return": function(sb) { - if (sb.activeInput == sb.replaceInput) - sb.replace(); - sb.findPrev(); - }, - "Alt-Return": function(sb) { - if (sb.activeInput == sb.replaceInput) - sb.replaceAll(); - sb.findAll(); - }, - "Tab": function(sb) { - (sb.activeInput == sb.replaceInput ? sb.searchInput : sb.replaceInput).focus(); - } - }); - - this.$searchBarKb.addCommands([{ - name: "toggleRegexpMode", - bindKey: {win: "Alt-R|Alt-/", mac: "Ctrl-Alt-R|Ctrl-Alt-/"}, - exec: function(sb) { - sb.regExpOption.checked = !sb.regExpOption.checked; - sb.$syncOptions(); - } - }, { - name: "toggleCaseSensitive", - bindKey: {win: "Alt-C|Alt-I", mac: "Ctrl-Alt-R|Ctrl-Alt-I"}, - exec: function(sb) { - sb.caseSensitiveOption.checked = !sb.caseSensitiveOption.checked; - sb.$syncOptions(); - } - }, { - name: "toggleWholeWords", - bindKey: {win: "Alt-B|Alt-W", mac: "Ctrl-Alt-B|Ctrl-Alt-W"}, - exec: function(sb) { - sb.wholeWordOption.checked = !sb.wholeWordOption.checked; - sb.$syncOptions(); - } - }]); - - this.$syncOptions = function() { - dom.setCssClass(this.regExpOption, "checked", this.regExpOption.checked); - dom.setCssClass(this.wholeWordOption, "checked", this.wholeWordOption.checked); - dom.setCssClass(this.caseSensitiveOption, "checked", this.caseSensitiveOption.checked); - this.find(false, false); - }; - - this.highlight = function(re) { - this.editor.session.highlight(re || this.editor.$search.$options.re); - this.editor.renderer.updateBackMarkers() - }; - this.find = function(skipCurrent, backwards) { - var range = this.editor.find(this.searchInput.value, { - skipCurrent: skipCurrent, - backwards: backwards, - wrap: true, - regExp: this.regExpOption.checked, - caseSensitive: this.caseSensitiveOption.checked, - wholeWord: this.wholeWordOption.checked - }); - var noMatch = !range && this.searchInput.value; - dom.setCssClass(this.searchBox, "ace_nomatch", noMatch); - this.editor._emit("findSearchBox", { match: !noMatch }); - this.highlight(); - }; - this.findNext = function() { - this.find(true, false); - }; - this.findPrev = function() { - this.find(true, true); - }; - this.findAll = function(){ - var range = this.editor.findAll(this.searchInput.value, { - regExp: this.regExpOption.checked, - caseSensitive: this.caseSensitiveOption.checked, - wholeWord: this.wholeWordOption.checked - }); - var noMatch = !range && this.searchInput.value; - dom.setCssClass(this.searchBox, "ace_nomatch", noMatch); - this.editor._emit("findSearchBox", { match: !noMatch }); - this.highlight(); - this.hide(); - }; - this.replace = function() { - if (!this.editor.getReadOnly()) - this.editor.replace(this.replaceInput.value); - }; - this.replaceAndFindNext = function() { - if (!this.editor.getReadOnly()) { - this.editor.replace(this.replaceInput.value); - this.findNext() - } - }; - this.replaceAll = function() { - if (!this.editor.getReadOnly()) - this.editor.replaceAll(this.replaceInput.value); - }; - - this.hide = function() { - this.element.style.display = "none"; - this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb); - this.editor.focus(); - }; - this.show = function(value, isReplace) { - this.element.style.display = ""; - this.replaceBox.style.display = isReplace ? "" : "none"; - - this.isReplace = isReplace; - - if (value) - this.searchInput.value = value; - this.searchInput.focus(); - this.searchInput.select(); - - this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb); - }; - - this.isFocused = function() { - var el = document.activeElement; - return el == this.searchInput || el == this.replaceInput; - } -}).call(SearchBox.prototype); - -exports.SearchBox = SearchBox; - -exports.Search = function(editor, isReplace) { - var sb = editor.searchBox || new SearchBox(editor); - sb.show(editor.session.getTextRange(), isReplace); -}; - -}); - (function() { - window.require(["ace/ext/searchbox"], function() {}); - })(); - \ No newline at end of file +define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(e,t,i){"use strict";var n=e("../lib/dom"),c=e("../lib/lang"),o=e("../lib/event"),a=".ace_search {background-color: #ddd;border: 1px solid #cbcbcb;border-top: 0 none;max-width: 325px;overflow: hidden;margin: 0;padding: 4px;padding-right: 6px;padding-bottom: 0;position: absolute;top: 0px;z-index: 99;white-space: normal;}.ace_search.left {border-left: 0 none;border-radius: 0px 0px 5px 0px;left: 0;}.ace_search.right {border-radius: 0px 0px 0px 5px;border-right: 0 none;right: 0;}.ace_search_form, .ace_replace_form {border-radius: 3px;border: 1px solid #cbcbcb;float: left;margin-bottom: 4px;overflow: hidden;}.ace_search_form.ace_nomatch {outline: 1px solid red;}.ace_search_field {background-color: white;border-right: 1px solid #cbcbcb;border: 0 none;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;float: left;height: 22px;outline: 0;padding: 0 7px;width: 214px;margin: 0;}.ace_searchbtn,.ace_replacebtn {background: #fff;border: 0 none;border-left: 1px solid #dcdcdc;cursor: pointer;float: left;height: 22px;margin: 0;padding: 0;position: relative;}.ace_searchbtn:last-child,.ace_replacebtn:last-child {border-top-right-radius: 3px;border-bottom-right-radius: 3px;}.ace_searchbtn:disabled {background: none;cursor: default;}.ace_searchbtn {background-position: 50% 50%;background-repeat: no-repeat;width: 27px;}.ace_searchbtn.prev {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); }.ace_searchbtn.next {background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); }.ace_searchbtn_close {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;border-radius: 50%;border: 0 none;color: #656565;cursor: pointer;float: right;font: 16px/16px Arial;height: 14px;margin: 5px 1px 9px 5px;padding: 0;text-align: center;width: 14px;}.ace_searchbtn_close:hover {background-color: #656565;background-position: 50% 100%;color: white;}.ace_replacebtn.prev {width: 54px}.ace_replacebtn.next {width: 27px}.ace_button {margin-left: 2px;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;overflow: hidden;opacity: 0.7;border: 1px solid rgba(100,100,100,0.23);padding: 1px;-moz-box-sizing: border-box;box-sizing: border-box;color: black;}.ace_button:hover {background-color: #eee;opacity:1;}.ace_button:active {background-color: #ddd;}.ace_button.checked {border-color: #3399ff;opacity:1;}.ace_search_options{margin-bottom: 3px;text-align: right;-webkit-user-select: none;-moz-user-select: none;-o-user-select: none;-ms-user-select: none;user-select: none;}",s=e("../keyboard/hash_handler").HashHandler,r=e("../lib/keys");n.importCssString(a,"ace_searchbox");var l=''.replace(/>\s+/g,">"),h=function(e,t,i){var c=n.createElement("div");c.innerHTML=l,this.element=c.firstChild,this.$init(),this.setEditor(e)};(function(){this.setEditor=function(e){e.searchBox=this,e.container.appendChild(this.element),this.editor=e},this.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOptions=e.querySelector(".ace_search_options"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field")},this.$init=function(){var e=this.element;this.$initElements(e);var t=this;o.addListener(e,"mousedown",function(e){setTimeout(function(){t.activeInput.focus()},0),o.stopPropagation(e)}),o.addListener(e,"click",function(e){var i=e.target||e.srcElement,n=i.getAttribute("action");n&&t[n]?t[n]():t.$searchBarKb.commands[n]&&t.$searchBarKb.commands[n].exec(t),o.stopPropagation(e)}),o.addCommandKeyListener(e,function(e,i,n){var c=r.keyCodeToString(n),a=t.$searchBarKb.findKeyCommand(i,c);a&&a.exec&&(a.exec(t),o.stopEvent(e))}),this.$onChange=c.delayedCall(function(){t.find(!1,!1)}),o.addListener(this.searchInput,"input",function(){t.$onChange.schedule(20)}),o.addListener(this.searchInput,"focus",function(){t.activeInput=t.searchInput,t.searchInput.value&&t.highlight()}),o.addListener(this.replaceInput,"focus",function(){t.activeInput=t.replaceInput,t.searchInput.value&&t.highlight()})},this.$closeSearchBarKb=new s([{bindKey:"Esc",name:"closeSearchBar",exec:function(e){e.searchBox.hide()}}]),this.$searchBarKb=new s,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f|Ctrl-H|Command-Option-F":function(e){var t=e.isReplace=!e.isReplace;e.replaceBox.style.display=t?"":"none",e[t?"replaceInput":"searchInput"].focus()},"Ctrl-G|Command-G":function(e){e.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(e){e.findPrev()},esc:function(e){setTimeout(function(){e.hide()})},Return:function(e){e.activeInput==e.replaceInput&&e.replace(),e.findNext()},"Shift-Return":function(e){e.activeInput==e.replaceInput&&e.replace(),e.findPrev()},"Alt-Return":function(e){e.activeInput==e.replaceInput&&e.replaceAll(),e.findAll()},Tab:function(e){(e.activeInput==e.replaceInput?e.searchInput:e.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(e){e.regExpOption.checked=!e.regExpOption.checked,e.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(e){e.caseSensitiveOption.checked=!e.caseSensitiveOption.checked,e.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(e){e.wholeWordOption.checked=!e.wholeWordOption.checked,e.$syncOptions()}}]),this.$syncOptions=function(){n.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),n.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),n.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.find(!1,!1)},this.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(e,t){var i=this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),c=!i&&this.searchInput.value;n.setCssClass(this.searchBox,"ace_nomatch",c),this.editor._emit("findSearchBox",{match:!c}),this.highlight()},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var e=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),t=!e&&this.searchInput.value;n.setCssClass(this.searchBox,"ace_nomatch",t),this.editor._emit("findSearchBox",{match:!t}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.element.style.display="",this.replaceBox.style.display=t?"":"none",this.isReplace=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb)},this.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput}}).call(h.prototype),t.SearchBox=h,t.Search=function(e,t){var i=e.searchBox||new h(e);i.show(e.session.getTextRange(),t)}}),function(){window.require(["ace/ext/searchbox"],function(){})}(); \ No newline at end of file diff --git a/www/js/vendor/ace/ext-settings_menu.js b/www/js/vendor/ace/ext-settings_menu.js index 7e0910364..652b33cf2 100755 --- a/www/js/vendor/ace/ext-settings_menu.js +++ b/www/js/vendor/ace/ext-settings_menu.js @@ -1,637 +1 @@ -define("ace/ext/menu_tools/element_generator",["require","exports","module"], function(require, exports, module) { -'use strict'; -module.exports.createOption = function createOption (obj) { - var attribute; - var el = document.createElement('option'); - for(attribute in obj) { - if(obj.hasOwnProperty(attribute)) { - if(attribute === 'selected') { - el.setAttribute(attribute, obj[attribute]); - } else { - el[attribute] = obj[attribute]; - } - } - } - return el; -}; -module.exports.createCheckbox = function createCheckbox (id, checked, clss) { - var el = document.createElement('input'); - el.setAttribute('type', 'checkbox'); - el.setAttribute('id', id); - el.setAttribute('name', id); - el.setAttribute('value', checked); - el.setAttribute('class', clss); - if(checked) { - el.setAttribute('checked', 'checked'); - } - return el; -}; -module.exports.createInput = function createInput (id, value, clss) { - var el = document.createElement('input'); - el.setAttribute('type', 'text'); - el.setAttribute('id', id); - el.setAttribute('name', id); - el.setAttribute('value', value); - el.setAttribute('class', clss); - return el; -}; -module.exports.createLabel = function createLabel (text, labelFor) { - var el = document.createElement('label'); - el.setAttribute('for', labelFor); - el.textContent = text; - return el; -}; -module.exports.createSelection = function createSelection (id, values, clss) { - var el = document.createElement('select'); - el.setAttribute('id', id); - el.setAttribute('name', id); - el.setAttribute('class', clss); - values.forEach(function(item) { - el.appendChild(module.exports.createOption(item)); - }); - return el; -}; - -}); - -define("ace/ext/modelist",["require","exports","module"], function(require, exports, module) { -"use strict"; - -var modes = []; -function getModeForPath(path) { - var mode = modesByName.text; - var fileName = path.split(/[\/\\]/).pop(); - for (var i = 0; i < modes.length; i++) { - if (modes[i].supportsFile(fileName)) { - mode = modes[i]; - break; - } - } - return mode; -} - -var Mode = function(name, caption, extensions) { - this.name = name; - this.caption = caption; - this.mode = "ace/mode/" + name; - this.extensions = extensions; - if (/\^/.test(extensions)) { - var re = extensions.replace(/\|(\^)?/g, function(a, b){ - return "$|" + (b ? "^" : "^.*\\."); - }) + "$"; - } else { - var re = "^.*\\.(" + extensions + ")$"; - } - - this.extRe = new RegExp(re, "gi"); -}; - -Mode.prototype.supportsFile = function(filename) { - return filename.match(this.extRe); -}; -var supportedModes = { - ABAP: ["abap"], - ActionScript:["as"], - ADA: ["ada|adb"], - Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"], - AsciiDoc: ["asciidoc"], - Assembly_x86:["asm"], - AutoHotKey: ["ahk"], - BatchFile: ["bat|cmd"], - C9Search: ["c9search_results"], - C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp"], - Cirru: ["cirru|cr"], - Clojure: ["clj|cljs"], - Cobol: ["CBL|COB"], - coffee: ["coffee|cf|cson|^Cakefile"], - ColdFusion: ["cfm"], - CSharp: ["cs"], - CSS: ["css"], - Curly: ["curly"], - D: ["d|di"], - Dart: ["dart"], - Diff: ["diff|patch"], - Dockerfile: ["^Dockerfile"], - Dot: ["dot"], - Dummy: ["dummy"], - DummySyntax: ["dummy"], - Eiffel: ["e"], - EJS: ["ejs"], - Elixir: ["ex|exs"], - Elm: ["elm"], - Erlang: ["erl|hrl"], - Forth: ["frt|fs|ldr"], - FTL: ["ftl"], - Gcode: ["gcode"], - Gherkin: ["feature"], - Gitignore: ["^.gitignore"], - Glsl: ["glsl|frag|vert"], - golang: ["go"], - Groovy: ["groovy"], - HAML: ["haml"], - Handlebars: ["hbs|handlebars|tpl|mustache"], - Haskell: ["hs"], - haXe: ["hx"], - HTML: ["html|htm|xhtml"], - HTML_Ruby: ["erb|rhtml|html.erb"], - INI: ["ini|conf|cfg|prefs"], - Io: ["io"], - Jack: ["jack"], - Jade: ["jade"], - Java: ["java"], - JavaScript: ["js|jsm"], - JSON: ["json"], - JSONiq: ["jq"], - JSP: ["jsp"], - JSX: ["jsx"], - Julia: ["jl"], - LaTeX: ["tex|latex|ltx|bib"], - LESS: ["less"], - Liquid: ["liquid"], - Lisp: ["lisp"], - LiveScript: ["ls"], - LogiQL: ["logic|lql"], - LSL: ["lsl"], - Lua: ["lua"], - LuaPage: ["lp"], - Lucene: ["lucene"], - Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"], - Markdown: ["md|markdown"], - Mask: ["mask"], - MATLAB: ["matlab"], - MEL: ["mel"], - MUSHCode: ["mc|mush"], - MySQL: ["mysql"], - Nix: ["nix"], - ObjectiveC: ["m|mm"], - OCaml: ["ml|mli"], - Pascal: ["pas|p"], - Perl: ["pl|pm"], - pgSQL: ["pgsql"], - PHP: ["php|phtml"], - Powershell: ["ps1"], - Praat: ["praat|praatscript|psc|proc"], - Prolog: ["plg|prolog"], - Properties: ["properties"], - Protobuf: ["proto"], - Python: ["py"], - R: ["r"], - RDoc: ["Rd"], - RHTML: ["Rhtml"], - Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"], - Rust: ["rs"], - SASS: ["sass"], - SCAD: ["scad"], - Scala: ["scala"], - Scheme: ["scm|rkt"], - SCSS: ["scss"], - SH: ["sh|bash|^.bashrc"], - SJS: ["sjs"], - Smarty: ["smarty|tpl"], - snippets: ["snippets"], - Soy_Template:["soy"], - Space: ["space"], - SQL: ["sql"], - Stylus: ["styl|stylus"], - SVG: ["svg"], - Tcl: ["tcl"], - Tex: ["tex"], - Text: ["txt"], - Textile: ["textile"], - Toml: ["toml"], - Twig: ["twig"], - Typescript: ["ts|typescript|str"], - Vala: ["vala"], - VBScript: ["vbs|vb"], - Velocity: ["vm"], - Verilog: ["v|vh|sv|svh"], - VHDL: ["vhd|vhdl"], - XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl"], - XQuery: ["xq"], - YAML: ["yaml|yml"] -}; - -var nameOverrides = { - ObjectiveC: "Objective-C", - CSharp: "C#", - golang: "Go", - C_Cpp: "C and C++", - coffee: "CoffeeScript", - HTML_Ruby: "HTML (Ruby)", - FTL: "FreeMarker" -}; -var modesByName = {}; -for (var name in supportedModes) { - var data = supportedModes[name]; - var displayName = (nameOverrides[name] || name).replace(/_/g, " "); - var filename = name.toLowerCase(); - var mode = new Mode(filename, displayName, data[0]); - modesByName[filename] = mode; - modes.push(mode); -} - -module.exports = { - getModeForPath: getModeForPath, - modes: modes, - modesByName: modesByName -}; - -}); - -define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"], function(require, exports, module) { -"use strict"; -require("ace/lib/fixoldbrowsers"); - -var themeData = [ - ["Chrome" ], - ["Clouds" ], - ["Crimson Editor" ], - ["Dawn" ], - ["Dreamweaver" ], - ["Eclipse" ], - ["GitHub" ], - ["Solarized Light"], - ["TextMate" ], - ["Tomorrow" ], - ["XCode" ], - ["Kuroir"], - ["KatzenMilch"], - ["Ambiance" ,"ambiance" , "dark"], - ["Chaos" ,"chaos" , "dark"], - ["Clouds Midnight" ,"clouds_midnight" , "dark"], - ["Cobalt" ,"cobalt" , "dark"], - ["idle Fingers" ,"idle_fingers" , "dark"], - ["krTheme" ,"kr_theme" , "dark"], - ["Merbivore" ,"merbivore" , "dark"], - ["Merbivore Soft" ,"merbivore_soft" , "dark"], - ["Mono Industrial" ,"mono_industrial" , "dark"], - ["Monokai" ,"monokai" , "dark"], - ["Pastel on dark" ,"pastel_on_dark" , "dark"], - ["Solarized Dark" ,"solarized_dark" , "dark"], - ["Terminal" ,"terminal" , "dark"], - ["Tomorrow Night" ,"tomorrow_night" , "dark"], - ["Tomorrow Night Blue" ,"tomorrow_night_blue" , "dark"], - ["Tomorrow Night Bright","tomorrow_night_bright" , "dark"], - ["Tomorrow Night 80s" ,"tomorrow_night_eighties" , "dark"], - ["Twilight" ,"twilight" , "dark"], - ["Vibrant Ink" ,"vibrant_ink" , "dark"] -]; - - -exports.themesByName = {}; -exports.themes = themeData.map(function(data) { - var name = data[1] || data[0].replace(/ /g, "_").toLowerCase(); - var theme = { - caption: data[0], - theme: "ace/theme/" + name, - isDark: data[2] == "dark", - name: name - }; - exports.themesByName[name] = theme; - return theme; -}); - -}); - -define("ace/ext/menu_tools/add_editor_menu_options",["require","exports","module","ace/ext/modelist","ace/ext/themelist"], function(require, exports, module) { -'use strict'; -module.exports.addEditorMenuOptions = function addEditorMenuOptions (editor) { - var modelist = require('../modelist'); - var themelist = require('../themelist'); - editor.menuOptions = { - setNewLineMode: [{ - textContent: "unix", - value: "unix" - }, { - textContent: "windows", - value: "windows" - }, { - textContent: "auto", - value: "auto" - }], - setTheme: [], - setMode: [], - setKeyboardHandler: [{ - textContent: "ace", - value: "" - }, { - textContent: "vim", - value: "ace/keyboard/vim" - }, { - textContent: "emacs", - value: "ace/keyboard/emacs" - }, { - textContent: "textarea", - value: "ace/keyboard/textarea" - }, { - textContent: "sublime", - value: "ace/keyboard/sublime" - }] - }; - - editor.menuOptions.setTheme = themelist.themes.map(function(theme) { - return { - textContent: theme.caption, - value: theme.theme - }; - }); - - editor.menuOptions.setMode = modelist.modes.map(function(mode) { - return { - textContent: mode.name, - value: mode.mode - }; - }); -}; - - -}); - -define("ace/ext/menu_tools/get_set_functions",["require","exports","module"], function(require, exports, module) { -'use strict'; -module.exports.getSetFunctions = function getSetFunctions (editor) { - var out = []; - var my = { - 'editor' : editor, - 'session' : editor.session, - 'renderer' : editor.renderer - }; - var opts = []; - var skip = [ - 'setOption', - 'setUndoManager', - 'setDocument', - 'setValue', - 'setBreakpoints', - 'setScrollTop', - 'setScrollLeft', - 'setSelectionStyle', - 'setWrapLimitRange' - ]; - ['renderer', 'session', 'editor'].forEach(function(esra) { - var esr = my[esra]; - var clss = esra; - for(var fn in esr) { - if(skip.indexOf(fn) === -1) { - if(/^set/.test(fn) && opts.indexOf(fn) === -1) { - opts.push(fn); - out.push({ - 'functionName' : fn, - 'parentObj' : esr, - 'parentName' : clss - }); - } - } - } - }); - return out; -}; - -}); - -define("ace/ext/menu_tools/generate_settings_menu",["require","exports","module","ace/ext/menu_tools/element_generator","ace/ext/menu_tools/add_editor_menu_options","ace/ext/menu_tools/get_set_functions"], function(require, exports, module) { -'use strict'; -var egen = require('./element_generator'); -var addEditorMenuOptions = require('./add_editor_menu_options').addEditorMenuOptions; -var getSetFunctions = require('./get_set_functions').getSetFunctions; -module.exports.generateSettingsMenu = function generateSettingsMenu (editor) { - var elements = []; - function cleanupElementsList() { - elements.sort(function(a, b) { - var x = a.getAttribute('contains'); - var y = b.getAttribute('contains'); - return x.localeCompare(y); - }); - } - function wrapElements() { - var topmenu = document.createElement('div'); - topmenu.setAttribute('id', 'ace_settingsmenu'); - elements.forEach(function(element) { - topmenu.appendChild(element); - }); - - var el = topmenu.appendChild(document.createElement('div')); - var version = "1.1.8"; - el.style.padding = "1em"; - el.textContent = "Ace version " + version; - - return topmenu; - } - function createNewEntry(obj, clss, item, val) { - var el; - var div = document.createElement('div'); - div.setAttribute('contains', item); - div.setAttribute('class', 'ace_optionsMenuEntry'); - div.setAttribute('style', 'clear: both;'); - - div.appendChild(egen.createLabel( - item.replace(/^set/, '').replace(/([A-Z])/g, ' $1').trim(), - item - )); - - if (Array.isArray(val)) { - el = egen.createSelection(item, val, clss); - el.addEventListener('change', function(e) { - try{ - editor.menuOptions[e.target.id].forEach(function(x) { - if(x.textContent !== e.target.textContent) { - delete x.selected; - } - }); - obj[e.target.id](e.target.value); - } catch (err) { - throw new Error(err); - } - }); - } else if(typeof val === 'boolean') { - el = egen.createCheckbox(item, val, clss); - el.addEventListener('change', function(e) { - try{ - obj[e.target.id](!!e.target.checked); - } catch (err) { - throw new Error(err); - } - }); - } else { - el = egen.createInput(item, val, clss); - el.addEventListener('change', function(e) { - try{ - if(e.target.value === 'true') { - obj[e.target.id](true); - } else if(e.target.value === 'false') { - obj[e.target.id](false); - } else { - obj[e.target.id](e.target.value); - } - } catch (err) { - throw new Error(err); - } - }); - } - el.style.cssText = 'float:right;'; - div.appendChild(el); - return div; - } - function makeDropdown(item, esr, clss, fn) { - var val = editor.menuOptions[item]; - var currentVal = esr[fn](); - if (typeof currentVal == 'object') - currentVal = currentVal.$id; - val.forEach(function(valuex) { - if (valuex.value === currentVal) - valuex.selected = 'selected'; - }); - return createNewEntry(esr, clss, item, val); - } - function handleSet(setObj) { - var item = setObj.functionName; - var esr = setObj.parentObj; - var clss = setObj.parentName; - var val; - var fn = item.replace(/^set/, 'get'); - if(editor.menuOptions[item] !== undefined) { - elements.push(makeDropdown(item, esr, clss, fn)); - } else if(typeof esr[fn] === 'function') { - try { - val = esr[fn](); - if(typeof val === 'object') { - val = val.$id; - } - elements.push( - createNewEntry(esr, clss, item, val) - ); - } catch (e) { - } - } - } - addEditorMenuOptions(editor); - getSetFunctions(editor).forEach(function(setObj) { - handleSet(setObj); - }); - cleanupElementsList(); - return wrapElements(); -}; - -}); - -define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) { -'use strict'; -var dom = require("../../lib/dom"); -var cssText = "#ace_settingsmenu, #kbshortcutmenu {\ -background-color: #F7F7F7;\ -color: black;\ -box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\ -padding: 1em 0.5em 2em 1em;\ -overflow: auto;\ -position: absolute;\ -margin: 0;\ -bottom: 0;\ -right: 0;\ -top: 0;\ -z-index: 9991;\ -cursor: default;\ -}\ -.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\ -box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\ -background-color: rgba(255, 255, 255, 0.6);\ -color: black;\ -}\ -.ace_optionsMenuEntry:hover {\ -background-color: rgba(100, 100, 100, 0.1);\ --webkit-transition: all 0.5s;\ -transition: all 0.3s\ -}\ -.ace_closeButton {\ -background: rgba(245, 146, 146, 0.5);\ -border: 1px solid #F48A8A;\ -border-radius: 50%;\ -padding: 7px;\ -position: absolute;\ -right: -8px;\ -top: -8px;\ -z-index: 1000;\ -}\ -.ace_closeButton{\ -background: rgba(245, 146, 146, 0.9);\ -}\ -.ace_optionsMenuKey {\ -color: darkslateblue;\ -font-weight: bold;\ -}\ -.ace_optionsMenuCommand {\ -color: darkcyan;\ -font-weight: normal;\ -}"; -dom.importCssString(cssText); -module.exports.overlayPage = function overlayPage(editor, contentElement, top, right, bottom, left) { - top = top ? 'top: ' + top + ';' : ''; - bottom = bottom ? 'bottom: ' + bottom + ';' : ''; - right = right ? 'right: ' + right + ';' : ''; - left = left ? 'left: ' + left + ';' : ''; - - var closer = document.createElement('div'); - var contentContainer = document.createElement('div'); - - function documentEscListener(e) { - if (e.keyCode === 27) { - closer.click(); - } - } - - closer.style.cssText = 'margin: 0; padding: 0; ' + - 'position: fixed; top:0; bottom:0; left:0; right:0;' + - 'z-index: 9990; ' + - 'background-color: rgba(0, 0, 0, 0.3);'; - closer.addEventListener('click', function() { - document.removeEventListener('keydown', documentEscListener); - closer.parentNode.removeChild(closer); - editor.focus(); - closer = null; - }); - document.addEventListener('keydown', documentEscListener); - - contentContainer.style.cssText = top + right + bottom + left; - contentContainer.addEventListener('click', function(e) { - e.stopPropagation(); - }); - - var wrapper = dom.createElement("div"); - wrapper.style.position = "relative"; - - var closeButton = dom.createElement("div"); - closeButton.className = "ace_closeButton"; - closeButton.addEventListener('click', function() { - closer.click(); - }); - - wrapper.appendChild(closeButton); - contentContainer.appendChild(wrapper); - - contentContainer.appendChild(contentElement); - closer.appendChild(contentContainer); - document.body.appendChild(closer); - editor.blur(); -}; - -}); - -define("ace/ext/settings_menu",["require","exports","module","ace/ext/menu_tools/generate_settings_menu","ace/ext/menu_tools/overlay_page","ace/editor"], function(require, exports, module) { -"use strict"; -var generateSettingsMenu = require('./menu_tools/generate_settings_menu').generateSettingsMenu; -var overlayPage = require('./menu_tools/overlay_page').overlayPage; -function showSettingsMenu(editor) { - var sm = document.getElementById('ace_settingsmenu'); - if (!sm) - overlayPage(editor, generateSettingsMenu(editor), '0', '0', '0'); -} -module.exports.init = function(editor) { - var Editor = require("ace/editor").Editor; - Editor.prototype.showSettingsMenu = function() { - showSettingsMenu(this); - }; -}; -}); - (function() { - window.require(["ace/ext/settings_menu"], function() {}); - })(); - \ No newline at end of file +define("ace/ext/menu_tools/element_generator",["require","exports","module"],function(e,t,r){"use strict";r.exports.createOption=function(e){var t,r=document.createElement("option");for(t in e)e.hasOwnProperty(t)&&("selected"===t?r.setAttribute(t,e[t]):r[t]=e[t]);return r},r.exports.createCheckbox=function(e,t,r){var o=document.createElement("input");return o.setAttribute("type","checkbox"),o.setAttribute("id",e),o.setAttribute("name",e),o.setAttribute("value",t),o.setAttribute("class",r),t&&o.setAttribute("checked","checked"),o},r.exports.createInput=function(e,t,r){var o=document.createElement("input");return o.setAttribute("type","text"),o.setAttribute("id",e),o.setAttribute("name",e),o.setAttribute("value",t),o.setAttribute("class",r),o},r.exports.createLabel=function(e,t){var r=document.createElement("label");return r.setAttribute("for",t),r.textContent=e,r},r.exports.createSelection=function(e,t,o){var n=document.createElement("select");return n.setAttribute("id",e),n.setAttribute("name",e),n.setAttribute("class",o),t.forEach(function(e){n.appendChild(r.exports.createOption(e))}),n}}),define("ace/ext/modelist",["require","exports","module"],function(e,t,r){"use strict";function o(e){for(var t=c.text,r=e.split(/[\/\\]/).pop(),o=0;o 0!"; - } - - if (splits == this.$splits) { - return; - } else if (splits > this.$splits) { - while (this.$splits < this.$editors.length && this.$splits < splits) { - editor = this.$editors[this.$splits]; - this.$container.appendChild(editor.container); - editor.setFontSize(this.$fontSize); - this.$splits ++; - } - while (this.$splits < splits) { - this.$createEditor(); - this.$splits ++; - } - } else { - while (this.$splits > splits) { - editor = this.$editors[this.$splits - 1]; - this.$container.removeChild(editor.container); - this.$splits --; - } - } - this.resize(); - }; - this.getSplits = function() { - return this.$splits; - }; - this.getEditor = function(idx) { - return this.$editors[idx]; - }; - this.getCurrentEditor = function() { - return this.$cEditor; - }; - this.focus = function() { - this.$cEditor.focus(); - }; - this.blur = function() { - this.$cEditor.blur(); - }; - this.setTheme = function(theme) { - this.$editors.forEach(function(editor) { - editor.setTheme(theme); - }); - }; - this.setKeyboardHandler = function(keybinding) { - this.$editors.forEach(function(editor) { - editor.setKeyboardHandler(keybinding); - }); - }; - this.forEach = function(callback, scope) { - this.$editors.forEach(callback, scope); - }; - - - this.$fontSize = ""; - this.setFontSize = function(size) { - this.$fontSize = size; - this.forEach(function(editor) { - editor.setFontSize(size); - }); - }; - - this.$cloneSession = function(session) { - var s = new EditSession(session.getDocument(), session.getMode()); - - var undoManager = session.getUndoManager(); - if (undoManager) { - var undoManagerProxy = new UndoManagerProxy(undoManager, s); - s.setUndoManager(undoManagerProxy); - } - s.$informUndoManager = lang.delayedCall(function() { s.$deltas = []; }); - s.setTabSize(session.getTabSize()); - s.setUseSoftTabs(session.getUseSoftTabs()); - s.setOverwrite(session.getOverwrite()); - s.setBreakpoints(session.getBreakpoints()); - s.setUseWrapMode(session.getUseWrapMode()); - s.setUseWorker(session.getUseWorker()); - s.setWrapLimitRange(session.$wrapLimitRange.min, - session.$wrapLimitRange.max); - s.$foldData = session.$cloneFoldData(); - - return s; - }; - this.setSession = function(session, idx) { - var editor; - if (idx == null) { - editor = this.$cEditor; - } else { - editor = this.$editors[idx]; - } - var isUsed = this.$editors.some(function(editor) { - return editor.session === session; - }); - - if (isUsed) { - session = this.$cloneSession(session); - } - editor.setSession(session); - return session; - }; - this.getOrientation = function() { - return this.$orientation; - }; - this.setOrientation = function(orientation) { - if (this.$orientation == orientation) { - return; - } - this.$orientation = orientation; - this.resize(); - }; - this.resize = function() { - var width = this.$container.clientWidth; - var height = this.$container.clientHeight; - var editor; - - if (this.$orientation == this.BESIDE) { - var editorWidth = width / this.$splits; - for (var i = 0; i < this.$splits; i++) { - editor = this.$editors[i]; - editor.container.style.width = editorWidth + "px"; - editor.container.style.top = "0px"; - editor.container.style.left = i * editorWidth + "px"; - editor.container.style.height = height + "px"; - editor.resize(); - } - } else { - var editorHeight = height / this.$splits; - for (var i = 0; i < this.$splits; i++) { - editor = this.$editors[i]; - editor.container.style.width = width + "px"; - editor.container.style.top = i * editorHeight + "px"; - editor.container.style.left = "0px"; - editor.container.style.height = editorHeight + "px"; - editor.resize(); - } - } - }; - -}).call(Split.prototype); - - -function UndoManagerProxy(undoManager, session) { - this.$u = undoManager; - this.$doc = session; -} - -(function() { - this.execute = function(options) { - this.$u.execute(options); - }; - - this.undo = function() { - var selectionRange = this.$u.undo(true); - if (selectionRange) { - this.$doc.selection.setSelectionRange(selectionRange); - } - }; - - this.redo = function() { - var selectionRange = this.$u.redo(true); - if (selectionRange) { - this.$doc.selection.setSelectionRange(selectionRange); - } - }; - - this.reset = function() { - this.$u.reset(); - }; - - this.hasUndo = function() { - return this.$u.hasUndo(); - }; - - this.hasRedo = function() { - return this.$u.hasRedo(); - }; -}).call(UndoManagerProxy.prototype); - -exports.Split = Split; -}); - -define("ace/ext/split",["require","exports","module","ace/split"], function(require, exports, module) { -"use strict"; -module.exports = require("../split"); - -}); - (function() { - window.require(["ace/ext/split"], function() {}); - })(); - \ No newline at end of file +define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(t,i,e){"use strict";function s(t,i){this.$u=t,this.$doc=i}var n=t("./lib/oop"),o=t("./lib/lang"),r=t("./lib/event_emitter").EventEmitter,h=t("./editor").Editor,a=t("./virtual_renderer").VirtualRenderer,c=t("./edit_session").EditSession,l=function(t,i,e){this.BELOW=1,this.BESIDE=0,this.$container=t,this.$theme=i,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(e||1),this.$cEditor=this.$editors[0],this.on("focus",function(t){this.$cEditor=t}.bind(this))};(function(){n.implement(this,r),this.$createEditor=function(){var t=document.createElement("div");t.className=this.$editorCSS,t.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(t);var i=new h(new a(t,this.$theme));return i.on("focus",function(){this._emit("focus",i)}.bind(this)),this.$editors.push(i),i.setFontSize(this.$fontSize),i},this.setSplits=function(t){var i;if(t<1)throw"The number of splits have to be > 0!";if(t!=this.$splits){if(t>this.$splits){for(;this.$splitst;)i=this.$editors[this.$splits-1],this.$container.removeChild(i.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(t){return this.$editors[t]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(t){this.$editors.forEach(function(i){i.setTheme(t)})},this.setKeyboardHandler=function(t){this.$editors.forEach(function(i){i.setKeyboardHandler(t)})},this.forEach=function(t,i){this.$editors.forEach(t,i)},this.$fontSize="",this.setFontSize=function(t){this.$fontSize=t,this.forEach(function(i){i.setFontSize(t)})},this.$cloneSession=function(t){var i=new c(t.getDocument(),t.getMode()),e=t.getUndoManager();if(e){var n=new s(e,i);i.setUndoManager(n)}return i.$informUndoManager=o.delayedCall(function(){i.$deltas=[]}),i.setTabSize(t.getTabSize()),i.setUseSoftTabs(t.getUseSoftTabs()),i.setOverwrite(t.getOverwrite()),i.setBreakpoints(t.getBreakpoints()),i.setUseWrapMode(t.getUseWrapMode()),i.setUseWorker(t.getUseWorker()),i.setWrapLimitRange(t.$wrapLimitRange.min,t.$wrapLimitRange.max),i.$foldData=t.$cloneFoldData(),i},this.setSession=function(t,i){var e;e=null==i?this.$cEditor:this.$editors[i];var s=this.$editors.some(function(i){return i.session===t});return s&&(t=this.$cloneSession(t)),e.setSession(t),t},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(t){this.$orientation!=t&&(this.$orientation=t,this.resize())},this.resize=function(){var t,i=this.$container.clientWidth,e=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var s=i/this.$splits,n=0;n"); - if (!disableGutter) - stringBuilder.push("" + /*(ix + lineStart) + */ ""); - textLayer.$renderLine(stringBuilder, ix, true, false); - stringBuilder.push("\n"); - } - var html = "
" + - "
" + - stringBuilder.join("") + - "
" + - "
"; - - textLayer.destroy(); - - return { - css: baseStyles + theme.cssText, - html: html, - session: session - }; -}; - -module.exports = highlight; -module.exports.highlight =highlight; -}); - (function() { - window.require(["ace/ext/static_highlight"], function() {}); - })(); - \ No newline at end of file +define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom"],function(e,t,i){"use strict";var n=e("../edit_session").EditSession,s=e("../layer/text").Text,o=".ace_static_highlight {font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;font-size: 12px;}.ace_static_highlight .ace_gutter {width: 25px !important;float: left;text-align: right;padding: 0 3px 0 0;margin-right: 3px;position: static !important;}.ace_static_highlight .ace_line { clear: both; }.ace_static_highlight .ace_gutter-cell {-moz-user-select: -moz-none;-khtml-user-select: none;-webkit-user-select: none;user-select: none;}.ace_static_highlight .ace_gutter-cell:before {content: counter(ace_line, decimal);counter-increment: ace_line;}.ace_static_highlight {counter-reset: ace_line;}",r=e("../config"),a=e("../lib/dom"),c=function(e,t,i){var n=e.className.match(/lang-(\w+)/),s=t.mode||n&&"ace/mode/"+n[1];if(!s)return!1;var o=t.theme||"ace/theme/textmate",r="",l=[];if(e.firstElementChild)for(var h=0,d=0;d"),a||h.push(""),l.$renderLine(h,g,!0,!1),h.push("\n");var u="
"+h.join("")+"
";return l.destroy(),{css:o+i.cssText,html:u,session:c}},i.exports=c,i.exports.highlight=c}),function(){window.require(["ace/ext/static_highlight"],function(){})}(); \ No newline at end of file diff --git a/www/js/vendor/ace/ext-statusbar.js b/www/js/vendor/ace/ext-statusbar.js index 838d7c611..24caf3412 100755 --- a/www/js/vendor/ace/ext-statusbar.js +++ b/www/js/vendor/ace/ext-statusbar.js @@ -1,51 +1 @@ -define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"], function(require, exports, module) { -"use strict"; -var dom = require("ace/lib/dom"); -var lang = require("ace/lib/lang"); - -var StatusBar = function(editor, parentNode) { - this.element = dom.createElement("div"); - this.element.className = "ace_status-indicator"; - this.element.style.cssText = "display: inline-block;"; - parentNode.appendChild(this.element); - - var statusUpdate = lang.delayedCall(function(){ - this.updateStatus(editor) - }.bind(this)); - editor.on("changeStatus", function() { - statusUpdate.schedule(100); - }); - editor.on("changeSelection", function() { - statusUpdate.schedule(100); - }); -}; - -(function(){ - this.updateStatus = function(editor) { - var status = []; - function add(str, separator) { - str && status.push(str, separator || "|"); - } - - add(editor.keyBinding.getStatusText(editor)); - if (editor.commands.recording) - add("REC"); - - var c = editor.selection.lead; - add(c.row + ":" + c.column, " "); - if (!editor.selection.isEmpty()) { - var r = editor.getSelectionRange(); - add("(" + (r.end.row - r.start.row) + ":" +(r.end.column - r.start.column) + ")"); - } - status.pop(); - this.element.textContent = status.join(""); - }; -}).call(StatusBar.prototype); - -exports.StatusBar = StatusBar; - -}); - (function() { - window.require(["ace/ext/statusbar"], function() {}); - })(); - \ No newline at end of file +define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var i=e("ace/lib/dom"),a=e("ace/lib/lang"),c=function(e,t){this.element=i.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var n=a.delayedCall(function(){this.updateStatus(e)}.bind(this));e.on("changeStatus",function(){n.schedule(100)}),e.on("changeSelection",function(){n.schedule(100)})};(function(){this.updateStatus=function(e){function t(e,t){e&&n.push(e,t||"|")}var n=[];t(e.keyBinding.getStatusText(e)),e.commands.recording&&t("REC");var i=e.selection.lead;if(t(i.row+":"+i.column," "),!e.selection.isEmpty()){var a=e.getSelectionRange();t("("+(a.end.row-a.start.row)+":"+(a.end.column-a.start.column)+")")}n.pop(),this.element.textContent=n.join("")}}).call(c.prototype),t.StatusBar=c}),function(){window.require(["ace/ext/statusbar"],function(){})}(); \ No newline at end of file diff --git a/www/js/vendor/ace/ext-textarea.js b/www/js/vendor/ace/ext-textarea.js index 98fff053b..e66a9a30a 100755 --- a/www/js/vendor/ace/ext-textarea.js +++ b/www/js/vendor/ace/ext-textarea.js @@ -1,632 +1 @@ -define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) { -"use strict"; - -exports.isDark = false; -exports.cssClass = "ace-tm"; -exports.cssText = ".ace-tm .ace_gutter {\ -background: #f0f0f0;\ -color: #333;\ -}\ -.ace-tm .ace_print-margin {\ -width: 1px;\ -background: #e8e8e8;\ -}\ -.ace-tm .ace_fold {\ -background-color: #6B72E6;\ -}\ -.ace-tm {\ -background-color: #FFFFFF;\ -color: black;\ -}\ -.ace-tm .ace_cursor {\ -color: black;\ -}\ -.ace-tm .ace_invisible {\ -color: rgb(191, 191, 191);\ -}\ -.ace-tm .ace_storage,\ -.ace-tm .ace_keyword {\ -color: blue;\ -}\ -.ace-tm .ace_constant {\ -color: rgb(197, 6, 11);\ -}\ -.ace-tm .ace_constant.ace_buildin {\ -color: rgb(88, 72, 246);\ -}\ -.ace-tm .ace_constant.ace_language {\ -color: rgb(88, 92, 246);\ -}\ -.ace-tm .ace_constant.ace_library {\ -color: rgb(6, 150, 14);\ -}\ -.ace-tm .ace_invalid {\ -background-color: rgba(255, 0, 0, 0.1);\ -color: red;\ -}\ -.ace-tm .ace_support.ace_function {\ -color: rgb(60, 76, 114);\ -}\ -.ace-tm .ace_support.ace_constant {\ -color: rgb(6, 150, 14);\ -}\ -.ace-tm .ace_support.ace_type,\ -.ace-tm .ace_support.ace_class {\ -color: rgb(109, 121, 222);\ -}\ -.ace-tm .ace_keyword.ace_operator {\ -color: rgb(104, 118, 135);\ -}\ -.ace-tm .ace_string {\ -color: rgb(3, 106, 7);\ -}\ -.ace-tm .ace_comment {\ -color: rgb(76, 136, 107);\ -}\ -.ace-tm .ace_comment.ace_doc {\ -color: rgb(0, 102, 255);\ -}\ -.ace-tm .ace_comment.ace_doc.ace_tag {\ -color: rgb(128, 159, 191);\ -}\ -.ace-tm .ace_constant.ace_numeric {\ -color: rgb(0, 0, 205);\ -}\ -.ace-tm .ace_variable {\ -color: rgb(49, 132, 149);\ -}\ -.ace-tm .ace_xml-pe {\ -color: rgb(104, 104, 91);\ -}\ -.ace-tm .ace_entity.ace_name.ace_function {\ -color: #0000A2;\ -}\ -.ace-tm .ace_heading {\ -color: rgb(12, 7, 255);\ -}\ -.ace-tm .ace_list {\ -color:rgb(185, 6, 144);\ -}\ -.ace-tm .ace_meta.ace_tag {\ -color:rgb(0, 22, 142);\ -}\ -.ace-tm .ace_string.ace_regex {\ -color: rgb(255, 0, 0)\ -}\ -.ace-tm .ace_marker-layer .ace_selection {\ -background: rgb(181, 213, 255);\ -}\ -.ace-tm.ace_multiselect .ace_selection.ace_start {\ -box-shadow: 0 0 3px 0px white;\ -border-radius: 2px;\ -}\ -.ace-tm .ace_marker-layer .ace_step {\ -background: rgb(252, 255, 0);\ -}\ -.ace-tm .ace_marker-layer .ace_stack {\ -background: rgb(164, 229, 101);\ -}\ -.ace-tm .ace_marker-layer .ace_bracket {\ -margin: -1px 0 0 -1px;\ -border: 1px solid rgb(192, 192, 192);\ -}\ -.ace-tm .ace_marker-layer .ace_active-line {\ -background: rgba(0, 0, 0, 0.07);\ -}\ -.ace-tm .ace_gutter-active-line {\ -background-color : #dcdcdc;\ -}\ -.ace-tm .ace_marker-layer .ace_selected-word {\ -background: rgb(250, 250, 255);\ -border: 1px solid rgb(200, 200, 250);\ -}\ -.ace-tm .ace_indent-guide {\ -background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ -}\ -"; - -var dom = require("../lib/dom"); -dom.importCssString(exports.cssText, exports.cssClass); -}); - -define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"], function(require, exports, module) { -"use strict"; - -require("./lib/fixoldbrowsers"); - -var dom = require("./lib/dom"); -var event = require("./lib/event"); - -var Editor = require("./editor").Editor; -var EditSession = require("./edit_session").EditSession; -var UndoManager = require("./undomanager").UndoManager; -var Renderer = require("./virtual_renderer").VirtualRenderer; -require("./worker/worker_client"); -require("./keyboard/hash_handler"); -require("./placeholder"); -require("./multi_select"); -require("./mode/folding/fold_mode"); -require("./theme/textmate"); -require("./ext/error_marker"); - -exports.config = require("./config"); -exports.require = require; -exports.edit = function(el) { - if (typeof(el) == "string") { - var _id = el; - el = document.getElementById(_id); - if (!el) - throw new Error("ace.edit can't find div #" + _id); - } - - if (el && el.env && el.env.editor instanceof Editor) - return el.env.editor; - - var value = ""; - if (el && /input|textarea/i.test(el.tagName)) { - var oldNode = el; - value = oldNode.value; - el = dom.createElement("pre"); - oldNode.parentNode.replaceChild(el, oldNode); - } else { - value = dom.getInnerText(el); - el.innerHTML = ''; - } - - var doc = exports.createEditSession(value); - - var editor = new Editor(new Renderer(el)); - editor.setSession(doc); - - var env = { - document: doc, - editor: editor, - onResize: editor.resize.bind(editor, null) - }; - if (oldNode) env.textarea = oldNode; - event.addListener(window, "resize", env.onResize); - editor.on("destroy", function() { - event.removeListener(window, "resize", env.onResize); - env.editor.container.env = null; // prevent memory leak on old ie - }); - editor.container.env = editor.env = env; - return editor; -}; -exports.createEditSession = function(text, mode) { - var doc = new EditSession(text, mode); - doc.setUndoManager(new UndoManager()); - return doc; -} -exports.EditSession = EditSession; -exports.UndoManager = UndoManager; -}); - -define("ace/ext/textarea",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/net","ace/ace","ace/theme/textmate"], function(require, exports, module) { -"use strict"; - -var event = require("../lib/event"); -var UA = require("../lib/useragent"); -var net = require("../lib/net"); -var ace = require("../ace"); - -require("../theme/textmate"); - -module.exports = exports = ace; -var getCSSProperty = function(element, container, property) { - var ret = element.style[property]; - - if (!ret) { - if (window.getComputedStyle) { - ret = window.getComputedStyle(element, '').getPropertyValue(property); - } else { - ret = element.currentStyle[property]; - } - } - - if (!ret || ret == 'auto' || ret == 'intrinsic') { - ret = container.style[property]; - } - return ret; -}; - -function applyStyles(elm, styles) { - for (var style in styles) { - elm.style[style] = styles[style]; - } -} - -function setupContainer(element, getValue) { - if (element.type != 'textarea') { - throw new Error("Textarea required!"); - } - - var parentNode = element.parentNode; - var container = document.createElement('div'); - var resizeEvent = function() { - var style = 'position:relative;'; - [ - 'margin-top', 'margin-left', 'margin-right', 'margin-bottom' - ].forEach(function(item) { - style += item + ':' + - getCSSProperty(element, container, item) + ';'; - }); - var width = getCSSProperty(element, container, 'width') || (element.clientWidth + "px"); - var height = getCSSProperty(element, container, 'height') || (element.clientHeight + "px"); - style += 'height:' + height + ';width:' + width + ';'; - style += 'display:inline-block;'; - container.setAttribute('style', style); - }; - event.addListener(window, 'resize', resizeEvent); - resizeEvent(); - parentNode.insertBefore(container, element.nextSibling); - while (parentNode !== document) { - if (parentNode.tagName.toUpperCase() === 'FORM') { - var oldSumit = parentNode.onsubmit; - parentNode.onsubmit = function(evt) { - element.value = getValue(); - if (oldSumit) { - oldSumit.call(this, evt); - } - }; - break; - } - parentNode = parentNode.parentNode; - } - return container; -} - -exports.transformTextarea = function(element, options) { - var session; - var container = setupContainer(element, function() { - return session.getValue(); - }); - element.style.display = 'none'; - container.style.background = 'white'; - var editorDiv = document.createElement("div"); - applyStyles(editorDiv, { - top: "0px", - left: "0px", - right: "0px", - bottom: "0px", - border: "1px solid gray", - position: "absolute" - }); - container.appendChild(editorDiv); - - var settingOpener = document.createElement("div"); - applyStyles(settingOpener, { - position: "absolute", - right: "0px", - bottom: "0px", - background: "red", - cursor: "nw-resize", - borderStyle: "solid", - borderWidth: "9px 8px 10px 9px", - width: "2px", - borderColor: "lightblue gray gray lightblue", - zIndex: 101 - }); - - var settingDiv = document.createElement("div"); - var settingDivStyles = { - top: "0px", - left: "20%", - right: "0px", - bottom: "0px", - position: "absolute", - padding: "5px", - zIndex: 100, - color: "white", - display: "none", - overflow: "auto", - fontSize: "14px", - boxShadow: "-5px 2px 3px gray" - }; - if (!UA.isOldIE) { - settingDivStyles.backgroundColor = "rgba(0, 0, 0, 0.6)"; - } else { - settingDivStyles.backgroundColor = "#333"; - } - - applyStyles(settingDiv, settingDivStyles); - container.appendChild(settingDiv); - - options = options || exports.defaultOptions; - var editor = ace.edit(editorDiv); - session = editor.getSession(); - - session.setValue(element.value || element.innerHTML); - editor.focus(); - container.appendChild(settingOpener); - setupApi(editor, editorDiv, settingDiv, ace, options, load); - setupSettingPanel(settingDiv, settingOpener, editor); - - var state = ""; - event.addListener(settingOpener, "mousemove", function(e) { - var rect = this.getBoundingClientRect(); - var x = e.clientX - rect.left, y = e.clientY - rect.top; - if (x + y < (rect.width + rect.height)/2) { - this.style.cursor = "pointer"; - state = "toggle"; - } else { - state = "resize"; - this.style.cursor = "nw-resize"; - } - }); - - event.addListener(settingOpener, "mousedown", function(e) { - if (state == "toggle") { - editor.setDisplaySettings(); - return; - } - container.style.zIndex = 100000; - var rect = container.getBoundingClientRect(); - var startX = rect.width + rect.left - e.clientX; - var startY = rect.height + rect.top - e.clientY; - event.capture(settingOpener, function(e) { - container.style.width = e.clientX - rect.left + startX + "px"; - container.style.height = e.clientY - rect.top + startY + "px"; - editor.resize(); - }, function() {}); - }); - - return editor; -}; - -function load(url, module, callback) { - net.loadScript(url, function() { - require([module], callback); - }); -} - -function setupApi(editor, editorDiv, settingDiv, ace, options, loader) { - var session = editor.getSession(); - var renderer = editor.renderer; - loader = loader || load; - - function toBool(value) { - return value === "true" || value == true; - } - - editor.setDisplaySettings = function(display) { - if (display == null) - display = settingDiv.style.display == "none"; - if (display) { - settingDiv.style.display = "block"; - settingDiv.hideButton.focus(); - editor.on("focus", function onFocus() { - editor.removeListener("focus", onFocus); - settingDiv.style.display = "none"; - }); - } else { - editor.focus(); - } - }; - - editor.$setOption = editor.setOption; - editor.$getOption = editor.getOption; - editor.setOption = function(key, value) { - switch (key) { - case "mode": - editor.$setOption("mode", "ace/mode/" + value) - break; - case "theme": - editor.$setOption("theme", "ace/theme/" + value) - break; - case "keybindings": - switch (value) { - case "vim": - editor.setKeyboardHandler("ace/keyboard/vim"); - break; - case "emacs": - editor.setKeyboardHandler("ace/keyboard/emacs"); - break; - default: - editor.setKeyboardHandler(null); - } - break; - - case "softWrap": - case "fontSize": - editor.$setOption(key, value); - break; - - default: - editor.$setOption(key, toBool(value)); - } - }; - - editor.getOption = function(key) { - switch (key) { - case "mode": - return editor.$getOption("mode").substr("ace/mode/".length) - break; - - case "theme": - return editor.$getOption("theme").substr("ace/theme/".length) - break; - - case "keybindings": - var value = editor.getKeyboardHandler() - switch (value && value.$id) { - case "ace/keyboard/vim": - return "vim"; - case "ace/keyboard/emacs": - return "emacs"; - default: - return "ace"; - } - break; - - default: - return editor.$getOption(key); - } - }; - - editor.setOptions(options); - return editor; -} - -function setupSettingPanel(settingDiv, settingOpener, editor) { - var BOOL = null; - - var desc = { - mode: "Mode:", - wrap: "Soft Wrap:", - theme: "Theme:", - fontSize: "Font Size:", - showGutter: "Display Gutter:", - keybindings: "Keyboard", - showPrintMargin: "Show Print Margin:", - useSoftTabs: "Use Soft Tabs:", - showInvisibles: "Show Invisibles" - }; - - var optionValues = { - mode: { - text: "Plain", - javascript: "JavaScript", - xml: "XML", - html: "HTML", - css: "CSS", - scss: "SCSS", - python: "Python", - php: "PHP", - java: "Java", - ruby: "Ruby", - c_cpp: "C/C++", - coffee: "CoffeeScript", - json: "json", - perl: "Perl", - clojure: "Clojure", - ocaml: "OCaml", - csharp: "C#", - haxe: "haXe", - svg: "SVG", - textile: "Textile", - groovy: "Groovy", - liquid: "Liquid", - Scala: "Scala" - }, - theme: { - clouds: "Clouds", - clouds_midnight: "Clouds Midnight", - cobalt: "Cobalt", - crimson_editor: "Crimson Editor", - dawn: "Dawn", - eclipse: "Eclipse", - idle_fingers: "Idle Fingers", - kr_theme: "Kr Theme", - merbivore: "Merbivore", - merbivore_soft: "Merbivore Soft", - mono_industrial: "Mono Industrial", - monokai: "Monokai", - pastel_on_dark: "Pastel On Dark", - solarized_dark: "Solarized Dark", - solarized_light: "Solarized Light", - textmate: "Textmate", - twilight: "Twilight", - vibrant_ink: "Vibrant Ink" - }, - showGutter: BOOL, - fontSize: { - "10px": "10px", - "11px": "11px", - "12px": "12px", - "14px": "14px", - "16px": "16px" - }, - wrap: { - off: "Off", - 40: "40", - 80: "80", - free: "Free" - }, - keybindings: { - ace: "ace", - vim: "vim", - emacs: "emacs" - }, - showPrintMargin: BOOL, - useSoftTabs: BOOL, - showInvisibles: BOOL - }; - - var table = []; - table.push(""); - - function renderOption(builder, option, obj, cValue) { - if (!obj) { - builder.push( - "" - ); - return; - } - builder.push(""); - } - - for (var option in exports.defaultOptions) { - table.push(""); - table.push(""); - } - table.push("
SettingValue
", desc[option], ""); - renderOption(table, option, optionValues[option], editor.getOption(option)); - table.push("
"); - settingDiv.innerHTML = table.join(""); - - var onChange = function(e) { - var select = e.currentTarget; - editor.setOption(select.title, select.value); - }; - var onClick = function(e) { - var cb = e.currentTarget; - editor.setOption(cb.title, cb.checked); - }; - var selects = settingDiv.getElementsByTagName("select"); - for (var i = 0; i < selects.length; i++) - selects[i].onchange = onChange; - var cbs = settingDiv.getElementsByTagName("input"); - for (var i = 0; i < cbs.length; i++) - cbs[i].onclick = onClick; - - - var button = document.createElement("input"); - button.type = "button"; - button.value = "Hide"; - event.addListener(button, "click", function() { - editor.setDisplaySettings(false); - }); - settingDiv.appendChild(button); - settingDiv.hideButton = button; -} -exports.defaultOptions = { - mode: "javascript", - theme: "textmate", - wrap: "off", - fontSize: "12px", - showGutter: "false", - keybindings: "ace", - showPrintMargin: "false", - useSoftTabs: "true", - showInvisibles: "false" -}; - -}); - (function() { - window.require(["ace/ext/textarea"], function() {}); - })(); - \ No newline at end of file +define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,r){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;border-radius: 2px;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}';var a=e("../lib/dom");a.importCssString(t.cssText,t.cssClass)}),define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t,r){"use strict";e("./lib/fixoldbrowsers");var a=e("./lib/dom"),o=e("./lib/event"),n=e("./editor").Editor,i=e("./edit_session").EditSession,c=e("./undomanager").UndoManager,s=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,t.edit=function(e){if("string"==typeof e){var r=e;if(e=document.getElementById(r),!e)throw new Error("ace.edit can't find div #"+r)}if(e&&e.env&&e.env.editor instanceof n)return e.env.editor;var i="";if(e&&/input|textarea/i.test(e.tagName)){var c=e;i=c.value,e=a.createElement("pre"),c.parentNode.replaceChild(e,c)}else i=a.getInnerText(e),e.innerHTML="";var l=t.createEditSession(i),d=new n(new s(e));d.setSession(l);var u={document:l,editor:d,onResize:d.resize.bind(d,null)};return c&&(u.textarea=c),o.addListener(window,"resize",u.onResize),d.on("destroy",function(){o.removeListener(window,"resize",u.onResize),u.editor.container.env=null}),d.container.env=d.env=u,d},t.createEditSession=function(e,t){var r=new i(e,t);return r.setUndoManager(new c),r},t.EditSession=i,t.UndoManager=c}),define("ace/ext/textarea",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/net","ace/ace","ace/theme/textmate"],function(e,t,r){"use strict";function a(e,t){for(var r in t)e.style[r]=t[r]}function o(e,t){if("textarea"!=e.type)throw new Error("Textarea required!");var r=e.parentNode,a=document.createElement("div"),o=function(){var t="position:relative;";["margin-top","margin-left","margin-right","margin-bottom"].forEach(function(r){t+=r+":"+m(e,a,r)+";"});var r=m(e,a,"width")||e.clientWidth+"px",o=m(e,a,"height")||e.clientHeight+"px";t+="height:"+o+";width:"+r+";",t+="display:inline-block;",a.setAttribute("style",t)};for(s.addListener(window,"resize",o),o(),r.insertBefore(a,e.nextSibling);r!==document;){if("FORM"===r.tagName.toUpperCase()){var n=r.onsubmit;r.onsubmit=function(r){e.value=t(),n&&n.call(this,r)};break}r=r.parentNode}return a}function n(t,r,a){d.loadScript(t,function(){e([r],a)})}function i(e,t,r,a,o,i){function c(e){return"true"===e||1==e}return e.getSession(),e.renderer,i=i||n,e.setDisplaySettings=function(t){null==t&&(t="none"==r.style.display),t?(r.style.display="block",r.hideButton.focus(),e.on("focus",function t(){e.removeListener("focus",t),r.style.display="none"})):e.focus()},e.$setOption=e.setOption,e.$getOption=e.getOption,e.setOption=function(t,r){switch(t){case"mode":e.$setOption("mode","ace/mode/"+r);break;case"theme":e.$setOption("theme","ace/theme/"+r);break;case"keybindings":switch(r){case"vim":e.setKeyboardHandler("ace/keyboard/vim");break;case"emacs":e.setKeyboardHandler("ace/keyboard/emacs");break;default:e.setKeyboardHandler(null)}break;case"softWrap":case"fontSize":e.$setOption(t,r);break;default:e.$setOption(t,c(r))}},e.getOption=function(t){switch(t){case"mode":return e.$getOption("mode").substr("ace/mode/".length);case"theme":return e.$getOption("theme").substr("ace/theme/".length);case"keybindings":var r=e.getKeyboardHandler();switch(r&&r.$id){case"ace/keyboard/vim":return"vim";case"ace/keyboard/emacs":return"emacs";default:return"ace"}break;default:return e.$getOption(t)}},e.setOptions(o),e}function c(e,r,a){function o(e,t,r,a){if(!r)return void e.push("");e.push("")}var n=null,i={mode:"Mode:",wrap:"Soft Wrap:",theme:"Theme:",fontSize:"Font Size:",showGutter:"Display Gutter:",keybindings:"Keyboard",showPrintMargin:"Show Print Margin:",useSoftTabs:"Use Soft Tabs:",showInvisibles:"Show Invisibles"},c={mode:{text:"Plain",javascript:"JavaScript",xml:"XML",html:"HTML",css:"CSS",scss:"SCSS",python:"Python",php:"PHP",java:"Java",ruby:"Ruby",c_cpp:"C/C++",coffee:"CoffeeScript",json:"json",perl:"Perl",clojure:"Clojure",ocaml:"OCaml",csharp:"C#",haxe:"haXe",svg:"SVG",textile:"Textile",groovy:"Groovy",liquid:"Liquid",Scala:"Scala"},theme:{clouds:"Clouds",clouds_midnight:"Clouds Midnight",cobalt:"Cobalt",crimson_editor:"Crimson Editor",dawn:"Dawn",eclipse:"Eclipse",idle_fingers:"Idle Fingers",kr_theme:"Kr Theme",merbivore:"Merbivore",merbivore_soft:"Merbivore Soft",mono_industrial:"Mono Industrial",monokai:"Monokai",pastel_on_dark:"Pastel On Dark",solarized_dark:"Solarized Dark",solarized_light:"Solarized Light",textmate:"Textmate",twilight:"Twilight",vibrant_ink:"Vibrant Ink"},showGutter:n,fontSize:{"10px":"10px","11px":"11px","12px":"12px","14px":"14px","16px":"16px"},wrap:{off:"Off",40:"40",80:"80",free:"Free"},keybindings:{ace:"ace",vim:"vim",emacs:"emacs"},showPrintMargin:n,useSoftTabs:n,showInvisibles:n},l=[];l.push("");for(var d in t.defaultOptions)l.push(""),l.push("");l.push("
SettingValue
",i[d],""),o(l,d,c[d],a.getOption(d)),l.push("
"),e.innerHTML=l.join("");for(var u=function(e){var t=e.currentTarget;a.setOption(t.title,t.value)},m=function(e){var t=e.currentTarget;a.setOption(t.title,t.checked)},p=e.getElementsByTagName("select"),g=0;g 0 && !(prevSpaces%diff) && !(spaces%diff)) - changes[diff] = (changes[diff] || 0) + 1; - - stats[spaces] = (stats[spaces] || 0) + 1; - } - prevSpaces = spaces; - while (i < max && line[line.length - 1] == "\\") - line = lines[i++]; - } - - function getScore(indent) { - var score = 0; - for (var i = indent; i < stats.length; i += indent) - score += stats[i] || 0; - return score; - } - - var changesTotal = changes.reduce(function(a,b){return a+b}, 0); - - var first = {score: 0, length: 0}; - var spaceIndents = 0; - for (var i = 1; i < 12; i++) { - var score = getScore(i); - if (i == 1) { - spaceIndents = score; - score = stats[1] ? 0.9 : 0.8; - if (!stats.length) - score = 0 - } else - score /= spaceIndents; - - if (changes[i]) - score += changes[i] / changesTotal; - - if (score > first.score) - first = {score: score, length: i}; - } - - if (first.score && first.score > 1.4) - var tabLength = first.length; - - if (tabIndents > spaceIndents + 1) - return {ch: "\t", length: tabLength}; - - if (spaceIndents > tabIndents + 1) - return {ch: " ", length: tabLength}; -}; - -exports.detectIndentation = function(session) { - var lines = session.getLines(0, 1000); - var indent = exports.$detectIndentation(lines) || {}; - - if (indent.ch) - session.setUseSoftTabs(indent.ch == " "); - - if (indent.length) - session.setTabSize(indent.length); - return indent; -}; - -exports.trimTrailingSpace = function(session, trimEmpty) { - var doc = session.getDocument(); - var lines = doc.getAllLines(); - - var min = trimEmpty ? -1 : 0; - - for (var i = 0, l=lines.length; i < l; i++) { - var line = lines[i]; - var index = line.search(/\s+$/); - - if (index > min) - doc.removeInLine(i, index, line.length); - } -}; - -exports.convertIndentation = function(session, ch, len) { - var oldCh = session.getTabString()[0]; - var oldLen = session.getTabSize(); - if (!len) len = oldLen; - if (!ch) ch = oldCh; - - var tab = ch == "\t" ? ch: lang.stringRepeat(ch, len); - - var doc = session.doc; - var lines = doc.getAllLines(); - - var cache = {}; - var spaceCache = {}; - for (var i = 0, l=lines.length; i < l; i++) { - var line = lines[i]; - var match = line.match(/^\s*/)[0]; - if (match) { - var w = session.$getStringScreenWidth(match)[0]; - var tabCount = Math.floor(w/oldLen); - var reminder = w%oldLen; - var toInsert = cache[tabCount] || (cache[tabCount] = lang.stringRepeat(tab, tabCount)); - toInsert += spaceCache[reminder] || (spaceCache[reminder] = lang.stringRepeat(" ", reminder)); - - if (toInsert != match) { - doc.removeInLine(i, 0, match.length); - doc.insertInLine({row: i, column: 0}, toInsert); - } - } - } - session.setTabSize(len); - session.setUseSoftTabs(ch == " "); -}; - -exports.$parseStringArg = function(text) { - var indent = {}; - if (/t/.test(text)) - indent.ch = "\t"; - else if (/s/.test(text)) - indent.ch = " "; - var m = text.match(/\d+/); - if (m) - indent.length = parseInt(m[0], 10); - return indent; -}; - -exports.$parseArg = function(arg) { - if (!arg) - return {}; - if (typeof arg == "string") - return exports.$parseStringArg(arg); - if (typeof arg.text == "string") - return exports.$parseStringArg(arg.text); - return arg; -}; - -exports.commands = [{ - name: "detectIndentation", - exec: function(editor) { - exports.detectIndentation(editor.session); - } -}, { - name: "trimTrailingSpace", - exec: function(editor) { - exports.trimTrailingSpace(editor.session); - } -}, { - name: "convertIndentation", - exec: function(editor, arg) { - var indent = exports.$parseArg(arg); - exports.convertIndentation(editor.session, indent.ch, indent.length); - } -}, { - name: "setIndentation", - exec: function(editor, arg) { - var indent = exports.$parseArg(arg); - indent.length && editor.session.setTabSize(indent.length); - indent.ch && editor.session.setUseSoftTabs(indent.ch == " "); - } -}]; - -}); - (function() { - window.require(["ace/ext/whitespace"], function() {}); - })(); - \ No newline at end of file +define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/lang");t.$detectIndentation=function(e,t){function n(e){for(var t=0,n=e;n0)||s%l||h%l||(i[l]=(i[l]||0)+1),r[h]=(r[h]||0)+1}for(s=h;cu.score&&(u={score:d,length:c})}if(u.score&&u.score>1.4)var m=u.length;return a>v+1?{ch:"\t",length:m}:v>a+1?{ch:" ",length:m}:void 0},t.detectIndentation=function(e){var n=e.getLines(0,1e3),r=t.$detectIndentation(n)||{};return r.ch&&e.setUseSoftTabs(" "==r.ch),r.length&&e.setTabSize(r.length),r},t.trimTrailingSpace=function(e,t){for(var n=e.getDocument(),r=n.getAllLines(),i=t?-1:0,a=0,s=r.length;ai&&n.removeInLine(a,c,o.length)}},t.convertIndentation=function(e,t,n){var i=e.getTabString()[0],a=e.getTabSize();n||(n=a),t||(t=i);for(var s="\t"==t?t:r.stringRepeat(t,n),o=e.doc,c=o.getAllLines(),g={},h={},l=0,f=c.length;l 30) - this.$data.shift(); - }, - get: function(n) { - n = n || 1; - return this.$data.slice(this.$data.length-n, this.$data.length).reverse().join('\n'); - }, - pop: function() { - if (this.$data.length > 1) - this.$data.pop(); - return this.get(); - }, - rotate: function() { - this.$data.unshift(this.$data.pop()); - return this.get(); - } -}; - -}); +define("ace/occur",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/edit_session","ace/search_highlight","ace/lib/dom"],function(e,n,t){"use strict";function a(){}var o=e("./lib/oop"),r=(e("./range").Range,e("./search").Search),i=e("./edit_session").EditSession,s=e("./search_highlight").SearchHighlight;o.inherits(a,r),function(){this.enter=function(e,n){if(!n.needle)return!1;var t=e.getCursorPosition();this.displayOccurContent(e,n);var a=this.originalToOccurPosition(e.session,t);return e.moveCursorToPosition(a),!0},this.exit=function(e,n){var t=n.translatePosition&&e.getCursorPosition(),a=t&&this.occurToOriginalPosition(e.session,t);return this.displayOriginalContent(e),a&&e.moveCursorToPosition(a),!0},this.highlight=function(e,n){var t=e.$occurHighlight=e.$occurHighlight||e.addDynamicMarker(new s(null,"ace_occur-highlight","text"));t.setRegexp(n),e._emit("changeBackMarker")},this.displayOccurContent=function(e,n){this.$originalSession=e.session;var t=this.matchingLines(e.session,n),a=t.map(function(e){return e.content}),o=new i(a.join("\n"));o.$occur=this,o.$occurMatchingLines=t,e.setSession(o),this.$useEmacsStyleLineStart=this.$originalSession.$useEmacsStyleLineStart,o.$useEmacsStyleLineStart=this.$useEmacsStyleLineStart,this.highlight(o,n.re),o._emit("changeBackMarker")},this.displayOriginalContent=function(e){e.setSession(this.$originalSession),this.$originalSession.$useEmacsStyleLineStart=this.$useEmacsStyleLineStart},this.originalToOccurPosition=function(e,n){var t=e.$occurMatchingLines,a={row:0,column:0};if(!t)return a;for(var o=0;o30&&this.$data.shift()},get:function(e){return e=e||1,this.$data.slice(this.$data.length-e,this.$data.length).reverse().join("\n")},pop:function(){return this.$data.length>1&&this.$data.pop(),this.get()},rotate:function(){return this.$data.unshift(this.$data.pop()),this.get()}}}); \ No newline at end of file diff --git a/www/js/vendor/ace/keybinding-vim.js b/www/js/vendor/ace/keybinding-vim.js index bd9b4e4e9..28ef56a18 100755 --- a/www/js/vendor/ace/keybinding-vim.js +++ b/www/js/vendor/ace/keybinding-vim.js @@ -1,5320 +1,3 @@ -define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/multi_select"], function(require, exports, module) { - 'use strict'; - - function log() { - var d = ""; - function format(p) { - if (typeof p != "object") - return p + "" - if ("line" in p) { - return p.line + ":" + p.ch - } - if ("anchor" in p) { - return format(p.anchor) + "->" + format(p.head) - } - if (Array.isArray(p)) - return "[" + p.map(function(x) {return format(x)})+"]" - return JSON.stringify(p) - } - for (var i = 0; i < arguments.length; i++) { - var p = arguments[i] - var f = format(p) - d+= f+" " - } - console.log(d) - } - var Range = require("../range").Range; - var EventEmitter = require("../lib/event_emitter").EventEmitter; - var dom = require("../lib/dom"); - var oop = require("../lib/oop"); - var KEYS = require("../lib/keys"); - var event = require("../lib/event"); - var Search = require("../search").Search; - var useragent = require("../lib/useragent"); - var SearchHighlight = require("../search_highlight").SearchHighlight; - var multiSelectCommands = require("../commands/multi_select_commands"); - require("../multi_select"); - - var CodeMirror = function(ace) { - this.ace = ace; - this.state = {}; - this.marks = {}; - this.$uid = 0; - this.onChange = this.onChange.bind(this); - this.onSelectionChange = this.onSelectionChange.bind(this); - this.onBeforeEndOperation = this.onBeforeEndOperation.bind(this); - this.ace.on('change', this.onChange); - this.ace.on('changeSelection', this.onSelectionChange); - this.ace.on('beforeEndOperation', this.onBeforeEndOperation); - }; - CodeMirror.Pos = function(line, ch) { - if (!(this instanceof Pos)) return new Pos(line, ch); - this.line = line; this.ch = ch; - }; - CodeMirror.defineOption = function(name, val, setter) {}; - CodeMirror.commands = { - redo: function(cm) { cm.ace.redo(); }, - undo: function(cm) { cm.ace.undo(); }, - newlineAndIndent: function(cm) { cm.ace.insert("\n"); }, - }; - CodeMirror.keyMap = {}; - CodeMirror.addClass = CodeMirror.rmClass = - CodeMirror.e_stop = function() {}; - CodeMirror.keyName = function(e) { - if (e.key) return e.key; - var key = (KEYS[e.keyCode] || ""); - if (key.length == 1) key = key.toUpperCase(); - key = event.getModifierString(e).replace(/(^|-)\w/g, function(m) { - return m.toUpperCase(); - }) + key; - return key; - }; - CodeMirror.keyMap['default'] = function(key) { - return function(cm) { - var cmd = cm.ace.commands.commandKeyBinding[key.toLowerCase()]; - return cmd && cm.ace.execCommand(cmd) !== false; - }; - }; - CodeMirror.lookupKey = function lookupKey(key, map, handle) { - if (typeof map == "string") - map = CodeMirror.keyMap[map]; - var found = typeof map == "function" ? map(key) : map[key]; - if (found === false) return "nothing"; - if (found === "...") return "multi"; - if (found != null && handle(found)) return "handled"; - - if (map.fallthrough) { - if (!Array.isArray(map.fallthrough)) - return lookupKey(key, map.fallthrough, handle); - for (var i = 0; i < map.fallthrough.length; i++) { - var result = lookupKey(key, map.fallthrough[i], handle); - if (result) return result; - } - } - }; - - CodeMirror.signal = function(o, name, e) { return o._signal(name, e) }; - CodeMirror.on = event.addListener; - CodeMirror.off = event.removeListener; -(function() { - oop.implement(CodeMirror.prototype, EventEmitter); - - this.destroy = function() { - this.ace.off('change', this.onChange); - this.ace.off('changeSelection', this.onSelectionChange); - this.ace.off('beforeEndOperation', this.onBeforeEndOperation); - this.removeOverlay(); - }; - this.virtualSelectionMode = function() { - return this.ace.inVirtualSelectionMode && this.ace.selection.index - }; - this.onChange = function(delta) { - var oldDelta = delta.data; - delta = { - start: oldDelta.range.start, - end: oldDelta.range.end, - action: oldDelta.action, - lines: oldDelta.lines || [oldDelta.text] - };// v1.2 api compatibility - if (delta.action[0] == 'i') { - var change = { text: delta.lines }; - var curOp = this.curOp = this.curOp || {}; - if (!curOp.changeHandlers) - curOp.changeHandlers = this._eventRegistry["change"] && this._eventRegistry["change"].slice(); - if (this.virtualSelectionMode()) return; - if (!curOp.lastChange) { - curOp.lastChange = curOp.change = change; - } else { - curOp.lastChange.next = curOp.lastChange = change; - } - } - this.$updateMarkers(delta); - }; - this.onSelectionChange = function() { - var curOp = this.curOp = this.curOp || {}; - if (!curOp.cursorActivityHandlers) - curOp.cursorActivityHandlers = this._eventRegistry["cursorActivity"] && this._eventRegistry["cursorActivity"].slice(); - this.curOp.cursorActivity = true; - if (this.ace.inMultiSelectMode) { - this.ace.keyBinding.removeKeyboardHandler(multiSelectCommands.keyboardHandler); - } - }; - this.operation = function(fn, force) { - if (!force && this.curOp || force && this.curOp && this.curOp.force) { - return fn(); - } - if (force || !this.ace.curOp) { - if (this.curOp) - this.onBeforeEndOperation(); - } - if (!this.ace.curOp) { - var prevOp = this.ace.prevOp; - this.ace.startOperation({ - command: { name: "vim", scrollIntoView: "cursor" } - }); - } - var curOp = this.curOp = this.curOp || {}; - this.curOp.force = force; - var result = fn(); - if (this.ace.curOp && this.ace.curOp.command.name == "vim") { - this.ace.endOperation(); - if (!curOp.cursorActivity && !curOp.lastChange && prevOp) - this.ace.prevOp = prevOp; - } - if (force || !this.ace.curOp) { - if (this.curOp) - this.onBeforeEndOperation(); - } - return result; - }; - this.onBeforeEndOperation = function() { - var op = this.curOp; - if (op) { - if (op.change) { this.signal("change", op.change, op); } - if (op && op.cursorActivity) { this.signal("cursorActivity", null, op); } - this.curOp = null; - } - }; - - this.signal = function(eventName, e, handlers) { - var listeners = handlers ? handlers[eventName + "Handlers"] - : (this._eventRegistry || {})[eventName]; - if (!listeners) - return; - listeners = listeners.slice(); - for (var i=0; i 0) { - point.row += rowShift; - point.column += point.row == end.row ? colShift : 0; - continue; - } - if (!isInsert && cmp2 <= 0) { - point.row = start.row; - point.column = start.column; - if (cmp2 === 0) - point.bias = 1 - } - } - }; - var Marker = function(cm, id, row, column) { - this.cm = cm; - this.id = id; - this.row = row; - this.column = column; - cm.marks[this.id] = this; - }; - Marker.prototype.clear = function() { delete this.cm.marks[this.id] }; - Marker.prototype.find = function() { return toCmPos(this) }; - this.setBookmark = function(cursor, options) { - var bm = new Marker(this, this.$uid++, cursor.line, cursor.ch); - if (!options || !options.insertLeft) - bm.$insertRight = true; - this.marks[bm.id] = bm; - return bm; - }; - this.moveH = function(increment, unit) { - if (unit == 'char') { - var sel = this.ace.selection; - sel.clearSelection(); - sel.moveCursorBy(0, increment); - } - }; - this.findPosV = function(start, amaount, unit, goalColumn) { - if (unit == 'line') { - var screenPos = this.ace.session.documentToScreenPosition(start.line, start.ch); - if (goalColumn != null) - screenPos.column = goalColumn; - screenPos.row += amaount; - screenPos.row = Math.min(Math.max(0, screenPos.row), this.ace.session.getScreenLength() - 1); - var pos = this.ace.session.screenToDocumentPosition(screenPos.row, screenPos.column); - return toCmPos(pos); - } else { - debugger; - } - }; - this.charCoords = function(pos, mode) { - if (mode == 'div' || !mode) { - var sc = this.ace.session.documentToScreenPosition(pos.line, pos.ch); - return {left: sc.column, top: sc.row}; - }if (mode == 'local') { - var renderer = this.ace.renderer; - var sc = this.ace.session.documentToScreenPosition(pos.line, pos.ch); - var lh = renderer.layerConfig.lineHeight; - var cw = renderer.layerConfig.characterWidth; - var top = lh * sc.row; - return {left: sc.column * cw, top: top, bottom: top + lh}; - } - }; - this.coordsChar = function(pos, mode) { - var renderer = this.ace.renderer; - if (mode == 'local') { - var row = Math.max(0, Math.floor(pos.top / renderer.lineHeight)); - var col = Math.max(0, Math.floor(pos.left / renderer.characterWidth)); - var ch = renderer.session.screenToDocumentPosition(row, col); - return toCmPos(ch); - } else if (mode == 'div') { - throw "not implemented"; - } - }; - this.openDialog = function() { - debugger - }; - this.getSearchCursor = function(query, pos, caseFold) { - var caseSensitive = false; - var isRegexp = false; - if (query instanceof RegExp && !query.global) { - caseSensitive = !query.ignoreCase; - query = query.source; - isRegexp = true; - } - var search = new Search(); - if (pos.ch == undefined) pos.ch = Number.MAX_VALUE; - var acePos = {row: pos.line, column: pos.ch}; - var cm = this; - var last = null; - return { - findNext: function() { return this.find(false) }, - findPrevious: function() {return this.find(true) }, - find: function(back) { - search.setOptions({ - needle: query, - caseSensitive: caseSensitive, - wrap: false, - backwards: back, - regExp: isRegexp, - start: last || acePos - }); - var range = search.find(cm.ace.session); - if (range && range.isEmpty()) { - if (cm.getLine(range.start.row).length == range.start.column) { - search.$options.start = range; - range = search.find(cm.ace.session); - } - } - last = range; - return last; - }, - from: function() { return last && toCmPos(last.start) }, - to: function() { return last && toCmPos(last.end) }, - replace: function(text) { - if (last) { - last.end = cm.ace.session.doc.replace(last, text); - } - } - }; - }; - this.scrollTo = function(x, y) { - var renderer = this.ace.renderer; - var config = renderer.layerConfig; - var maxHeight = config.maxHeight; - maxHeight -= (renderer.$size.scrollerHeight - renderer.lineHeight) * renderer.$scrollPastEnd; - if (y != null) this.ace.session.setScrollTop(Math.max(0, Math.min(y, maxHeight))); - if (x != null) this.ace.session.setScrollLeft(Math.max(0, Math.min(x, config.width))); - }; - this.scrollInfo = function() { return 0; }; - this.scrollIntoView = function(pos, margin) { - if (pos) - this.ace.renderer.scrollCursorIntoView(toAcePos(pos), null, margin); - }; - this.getLine = function(row) { return this.ace.session.getLine(row) }; - this.getRange = function(s, e) { - return this.ace.session.getTextRange(new Range(s.line, s.ch, e.line, e.ch)); - }; - this.replaceRange = function(text, s, e) { - if (!e) e = s; - return this.ace.session.replace(new Range(s.line, s.ch, e.line, e.ch), text); - }; - this.replaceSelections = function(p) { - var sel = this.ace.selection; - if (this.ace.inVirtualSelectionMode) { - this.ace.session.replace(sel.getRange(), p[0] || ""); - return; - } - sel.inVirtualSelectionMode = true; - var ranges = sel.rangeList.ranges; - if (!ranges.length) ranges = [this.ace.multiSelect.getRange()]; - for (var i = ranges.length; i--;) - this.ace.session.replace(ranges[i], p[i] || ""); - sel.inVirtualSelectionMode = false; - }; - this.getSelection = function() { - return this.ace.getSelectedText(); - }; - this.getSelections = function() { - return this.listSelections().map(function(x) { - return this.getRange(x.anchor, x.head); - }, this); - }; - this.getInputField = function() { - return this.ace.textInput.getElement(); - }; - this.getWrapperElement = function() { - return this.ace.containter; - }; - var optMap = { - indentWithTabs: "useSoftTabs", - indentUnit: "tabSize", - firstLineNumber: "firstLineNumber" - }; - this.setOption = function(name, val) { - this.state[name] = val; - switch (name) { - case 'indentWithTabs': - name = optMap[name]; - val = !val; - break; - default: - name = optMap[name]; - } - if (name) - this.ace.setOption(name, val); - }; - this.getOption = function(name, val) { - var aceOpt = optMap[name]; - if (aceOpt) - val = this.ace.getOption(aceOpt); - switch (name) { - case 'indentWithTabs': - name = optMap[name]; - return !val; - } - return aceOpt ? val : this.state[name]; - }; - this.toggleOverwrite = function(on) { - this.state.overwrite = on; - return this.ace.setOverwrite(on); - }; - this.addOverlay = function(o) { - if (!this.$searchHighlight || !this.$searchHighlight.session) { - var highlight = new SearchHighlight(null, "ace_highlight-marker", "text"); - var marker = this.ace.session.addDynamicMarker(highlight); - highlight.id = marker.id; - highlight.session = this.ace.session; - highlight.destroy = function(o) { - highlight.session.off("change", highlight.updateOnChange); - highlight.session.off("changeEditor", highlight.destroy); - highlight.session.removeMarker(highlight.id); - highlight.session = null; - }; - highlight.updateOnChange = function(delta) { - delta = delta.data.range;// v1.2 api compatibility - var row = delta.start.row; - if (row == delta.end.row) highlight.cache[row] = undefined; - else highlight.cache.splice(row, highlight.cache.length); - } - highlight.session.on("changeEditor", highlight.destroy); - highlight.session.on("change", highlight.updateOnChange); - } - var re = new RegExp(o.query.source, "gmi"); - console.log(re) - this.$searchHighlight = o.highlight = highlight; - this.$searchHighlight.setRegexp(re); - this.ace.renderer.updateBackMarkers(); - }; - this.removeOverlay = function(o) { - if (this.$searchHighlight && this.$searchHighlight.session) { - this.$searchHighlight.destroy(); - } - }; - this.getScrollInfo = function() { - var renderer = this.ace.renderer; - var config = renderer.layerConfig; - return { - left: renderer.scrollLeft, - top: renderer.scrollTop, - height: config.maxHeight, - width: config.width, - clientHeight: config.height, - clientWidth: config.width - }; - }; - this.getValue = function() { - return this.ace.getValue(); - }; - this.setValue = function(v) { - return this.ace.setValue(v); - }; - this.getTokenTypeAt = function(pos) { - var token = this.ace.session.getTokenAt(pos.line, pos.ch); - return token && /comment|string/.test(token.type) ? "string" : ""; - }; - this.findMatchingBracket = function(pos) { - var m = this.ace.session.findMatchingBracket(toAcePos(pos)); - return {to: m && toCmPos(m)}; - }; - this.indentLine = function(line, method) { - if (method === true) - this.ace.session.indentRows(line, line, "\t"); - else if (method === false) - this.ace.session.outdentRows(new Range(line, 0, line, 0)); - }; - this.indexFromPos = function(pos) { - return this.ace.session.doc.positionToIndex(toAcePos(pos)); - }; - this.posFromIndex = function(index) { - return toCmPos(this.ace.session.doc.indexToPosition(index)); - }; - this.focus = function(index) { - return this.ace.focus(); - }; - this.blur = function(index) { - return this.ace.blur(); - }; - this.defaultTextHeight = function(index) { - return this.ace.renderer.layerConfig.lineHeight; - }; - this.scanForBracket = function(pos, dir, _, options) { - var re = options.bracketRegex.source; - if (dir == 1) { - var m = this.ace.session.$findClosingBracket(re.slice(1, 2), toAcePos(pos), /paren|text/); - } else { - var m = this.ace.session.$findOpeningBracket(re.slice(-2, -1), {row: pos.line, column: pos.ch + 1}, /paren|text/); - } - return m && {pos: toCmPos(m)}; - }; - this.refresh = function() { - return this.ace.resize(true); - }; -}).call(CodeMirror.prototype); - function toAcePos(cmPos) { - return {row: cmPos.line, column: cmPos.ch}; - } - function toCmPos(acePos) { - return new Pos(acePos.row, acePos.column); - } - - var StringStream = CodeMirror.StringStream = function(string, tabSize) { - this.pos = this.start = 0; - this.string = string; - this.tabSize = tabSize || 8; - this.lastColumnPos = this.lastColumnValue = 0; - this.lineStart = 0; - }; - - StringStream.prototype = { - eol: function() {return this.pos >= this.string.length;}, - sol: function() {return this.pos == this.lineStart;}, - peek: function() {return this.string.charAt(this.pos) || undefined;}, - next: function() { - if (this.pos < this.string.length) - return this.string.charAt(this.pos++); - }, - eat: function(match) { - var ch = this.string.charAt(this.pos); - if (typeof match == "string") var ok = ch == match; - else var ok = ch && (match.test ? match.test(ch) : match(ch)); - if (ok) {++this.pos; return ch;} - }, - eatWhile: function(match) { - var start = this.pos; - while (this.eat(match)){} - return this.pos > start; - }, - eatSpace: function() { - var start = this.pos; - while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos; - return this.pos > start; - }, - skipToEnd: function() {this.pos = this.string.length;}, - skipTo: function(ch) { - var found = this.string.indexOf(ch, this.pos); - if (found > -1) {this.pos = found; return true;} - }, - backUp: function(n) {this.pos -= n;}, - column: function() { - throw "not implemented"; - }, - indentation: function() { - throw "not implemented"; - }, - match: function(pattern, consume, caseInsensitive) { - if (typeof pattern == "string") { - var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;}; - var substr = this.string.substr(this.pos, pattern.length); - if (cased(substr) == cased(pattern)) { - if (consume !== false) this.pos += pattern.length; - return true; - } - } else { - var match = this.string.slice(this.pos).match(pattern); - if (match && match.index > 0) return null; - if (match && consume !== false) this.pos += match[0].length; - return match; - } - }, - current: function(){return this.string.slice(this.start, this.pos);}, - hideFirstChars: function(n, inner) { - this.lineStart += n; - try { return inner(); } - finally { this.lineStart -= n; } - } - }; -CodeMirror.defineExtension = function(name, fn) { - CodeMirror.prototype[name] = fn; -}; -dom.importCssString(".normal-mode .ace_cursor{\ - border: 0!important;\ - background-color: red;\ - opacity: 0.5;\ -}.ace_dialog {\ - position: absolute;\ - left: 0; right: 0;\ - background: white;\ - z-index: 15;\ - padding: .1em .8em;\ - overflow: hidden;\ - color: #333;\ -}\ -.ace_dialog-top {\ - border-bottom: 1px solid #eee;\ - top: 0;\ -}\ -.ace_dialog-bottom {\ - border-top: 1px solid #eee;\ - bottom: 0;\ -}\ -.ace_dialog input {\ - border: none;\ - outline: none;\ - background: transparent;\ - width: 20em;\ - color: inherit;\ - font-family: monospace;\ -}", "vimMode"); -(function() { - function dialogDiv(cm, template, bottom) { - var wrap = cm.ace.container; - var dialog; - dialog = wrap.appendChild(document.createElement("div")); - if (bottom) - dialog.className = "ace_dialog ace_dialog-bottom"; - else - dialog.className = "ace_dialog ace_dialog-top"; - - if (typeof template == "string") { - dialog.innerHTML = template; - } else { // Assuming it's a detached DOM element. - dialog.appendChild(template); - } - return dialog; - } - - function closeNotification(cm, newVal) { - if (cm.state.currentNotificationClose) - cm.state.currentNotificationClose(); - cm.state.currentNotificationClose = newVal; - } - - CodeMirror.defineExtension("openDialog", function(template, callback, options) { - if (this.virtualSelectionMode()) return; - if (!options) options = {}; - - closeNotification(this, null); - - var dialog = dialogDiv(this, template, options.bottom); - var closed = false, me = this; - function close(newVal) { - if (typeof newVal == 'string') { - inp.value = newVal; - } else { - if (closed) return; - closed = true; - dialog.parentNode.removeChild(dialog); - me.focus(); - - if (options.onClose) options.onClose(dialog); - } - } - - var inp = dialog.getElementsByTagName("input")[0], button; - if (inp) { - if (options.value) { - inp.value = options.value; - inp.select(); - } - - if (options.onInput) - CodeMirror.on(inp, "input", function(e) { options.onInput(e, inp.value, close);}); - if (options.onKeyUp) - CodeMirror.on(inp, "keyup", function(e) {options.onKeyUp(e, inp.value, close);}); - - CodeMirror.on(inp, "keydown", function(e) { - if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; } - if (e.keyCode == 27 || (options.closeOnEnter !== false && e.keyCode == 13)) { - inp.blur(); - CodeMirror.e_stop(e); - close(); - } - if (e.keyCode == 13) callback(inp.value); - }); - - if (options.closeOnBlur !== false) CodeMirror.on(inp, "blur", close); - - inp.focus(); - } else if (button = dialog.getElementsByTagName("button")[0]) { - CodeMirror.on(button, "click", function() { - close(); - me.focus(); - }); - - if (options.closeOnBlur !== false) CodeMirror.on(button, "blur", close); - - button.focus(); - } - return close; - }); - - CodeMirror.defineExtension("openNotification", function(template, options) { - if (this.virtualSelectionMode()) return; - closeNotification(this, close); - var dialog = dialogDiv(this, template, options && options.bottom); - var closed = false, doneTimer; - var duration = options && typeof options.duration !== "undefined" ? options.duration : 5000; - - function close() { - if (closed) return; - closed = true; - clearTimeout(doneTimer); - dialog.parentNode.removeChild(dialog); - } - - CodeMirror.on(dialog, 'click', function(e) { - CodeMirror.e_preventDefault(e); - close(); - }); - - if (duration) - doneTimer = setTimeout(close, duration); - - return close; - }); -})(); - - - var defaultKeymap = [ - { keys: '', type: 'keyToKey', toKeys: 'h' }, - { keys: '', type: 'keyToKey', toKeys: 'l' }, - { keys: '', type: 'keyToKey', toKeys: 'k' }, - { keys: '', type: 'keyToKey', toKeys: 'j' }, - { keys: '', type: 'keyToKey', toKeys: 'l' }, - { keys: '', type: 'keyToKey', toKeys: 'h' }, - { keys: '', type: 'keyToKey', toKeys: 'W' }, - { keys: '', type: 'keyToKey', toKeys: 'B' }, - { keys: '', type: 'keyToKey', toKeys: 'w' }, - { keys: '', type: 'keyToKey', toKeys: 'b' }, - { keys: '', type: 'keyToKey', toKeys: 'j' }, - { keys: '', type: 'keyToKey', toKeys: 'k' }, - { keys: '', type: 'keyToKey', toKeys: '' }, - { keys: '', type: 'keyToKey', toKeys: '' }, - { keys: '', type: 'keyToKey', toKeys: '', context: 'insert' }, - { keys: '', type: 'keyToKey', toKeys: '', context: 'insert' }, - { keys: 's', type: 'keyToKey', toKeys: 'cl', context: 'normal' }, - { keys: 's', type: 'keyToKey', toKeys: 'xi', context: 'visual'}, - { keys: 'S', type: 'keyToKey', toKeys: 'cc', context: 'normal' }, - { keys: 'S', type: 'keyToKey', toKeys: 'dcc', context: 'visual' }, - { keys: '', type: 'keyToKey', toKeys: '0' }, - { keys: '', type: 'keyToKey', toKeys: '$' }, - { keys: '', type: 'keyToKey', toKeys: '' }, - { keys: '', type: 'keyToKey', toKeys: '' }, - { keys: '', type: 'keyToKey', toKeys: 'j^', context: 'normal' }, - { keys: 'H', type: 'motion', motion: 'moveToTopLine', motionArgs: { linewise: true, toJumplist: true }}, - { keys: 'M', type: 'motion', motion: 'moveToMiddleLine', motionArgs: { linewise: true, toJumplist: true }}, - { keys: 'L', type: 'motion', motion: 'moveToBottomLine', motionArgs: { linewise: true, toJumplist: true }}, - { keys: 'h', type: 'motion', motion: 'moveByCharacters', motionArgs: { forward: false }}, - { keys: 'l', type: 'motion', motion: 'moveByCharacters', motionArgs: { forward: true }}, - { keys: 'j', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, linewise: true }}, - { keys: 'k', type: 'motion', motion: 'moveByLines', motionArgs: { forward: false, linewise: true }}, - { keys: 'gj', type: 'motion', motion: 'moveByDisplayLines', motionArgs: { forward: true }}, - { keys: 'gk', type: 'motion', motion: 'moveByDisplayLines', motionArgs: { forward: false }}, - { keys: 'w', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: false }}, - { keys: 'W', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: false, bigWord: true }}, - { keys: 'e', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: true, inclusive: true }}, - { keys: 'E', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: true, bigWord: true, inclusive: true }}, - { keys: 'b', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false }}, - { keys: 'B', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false, bigWord: true }}, - { keys: 'ge', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: true, inclusive: true }}, - { keys: 'gE', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: true, bigWord: true, inclusive: true }}, - { keys: '{', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: false, toJumplist: true }}, - { keys: '}', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: true, toJumplist: true }}, - { keys: '', type: 'motion', motion: 'moveByPage', motionArgs: { forward: true }}, - { keys: '', type: 'motion', motion: 'moveByPage', motionArgs: { forward: false }}, - { keys: '', type: 'motion', motion: 'moveByScroll', motionArgs: { forward: true, explicitRepeat: true }}, - { keys: '', type: 'motion', motion: 'moveByScroll', motionArgs: { forward: false, explicitRepeat: true }}, - { keys: 'gg', type: 'motion', motion: 'moveToLineOrEdgeOfDocument', motionArgs: { forward: false, explicitRepeat: true, linewise: true, toJumplist: true }}, - { keys: 'G', type: 'motion', motion: 'moveToLineOrEdgeOfDocument', motionArgs: { forward: true, explicitRepeat: true, linewise: true, toJumplist: true }}, - { keys: '0', type: 'motion', motion: 'moveToStartOfLine' }, - { keys: '^', type: 'motion', motion: 'moveToFirstNonWhiteSpaceCharacter' }, - { keys: '+', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, toFirstChar:true }}, - { keys: '-', type: 'motion', motion: 'moveByLines', motionArgs: { forward: false, toFirstChar:true }}, - { keys: '_', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, toFirstChar:true, repeatOffset:-1 }}, - { keys: '$', type: 'motion', motion: 'moveToEol', motionArgs: { inclusive: true }}, - { keys: '%', type: 'motion', motion: 'moveToMatchedSymbol', motionArgs: { inclusive: true, toJumplist: true }}, - { keys: 'f', type: 'motion', motion: 'moveToCharacter', motionArgs: { forward: true , inclusive: true }}, - { keys: 'F', type: 'motion', motion: 'moveToCharacter', motionArgs: { forward: false }}, - { keys: 't', type: 'motion', motion: 'moveTillCharacter', motionArgs: { forward: true, inclusive: true }}, - { keys: 'T', type: 'motion', motion: 'moveTillCharacter', motionArgs: { forward: false }}, - { keys: ';', type: 'motion', motion: 'repeatLastCharacterSearch', motionArgs: { forward: true }}, - { keys: ',', type: 'motion', motion: 'repeatLastCharacterSearch', motionArgs: { forward: false }}, - { keys: '\'', type: 'motion', motion: 'goToMark', motionArgs: {toJumplist: true, linewise: true}}, - { keys: '`', type: 'motion', motion: 'goToMark', motionArgs: {toJumplist: true}}, - { keys: ']`', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true } }, - { keys: '[`', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false } }, - { keys: ']\'', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true, linewise: true } }, - { keys: '[\'', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false, linewise: true } }, - { keys: ']p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true, matchIndent: true}}, - { keys: '[p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true, matchIndent: true}}, - { keys: ']', type: 'motion', motion: 'moveToSymbol', motionArgs: { forward: true, toJumplist: true}}, - { keys: '[', type: 'motion', motion: 'moveToSymbol', motionArgs: { forward: false, toJumplist: true}}, - { keys: '|', type: 'motion', motion: 'moveToColumn'}, - { keys: 'o', type: 'motion', motion: 'moveToOtherHighlightedEnd', context:'visual'}, - { keys: 'O', type: 'motion', motion: 'moveToOtherHighlightedEnd', motionArgs: {sameLine: true}, context:'visual'}, - { keys: 'd', type: 'operator', operator: 'delete' }, - { keys: 'y', type: 'operator', operator: 'yank' }, - { keys: 'c', type: 'operator', operator: 'change' }, - { keys: '>', type: 'operator', operator: 'indent', operatorArgs: { indentRight: true }}, - { keys: '<', type: 'operator', operator: 'indent', operatorArgs: { indentRight: false }}, - { keys: 'g~', type: 'operator', operator: 'changeCase' }, - { keys: 'gu', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: true}, isEdit: true }, - { keys: 'gU', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: false}, isEdit: true }, - { keys: 'n', type: 'motion', motion: 'findNext', motionArgs: { forward: true, toJumplist: true }}, - { keys: 'N', type: 'motion', motion: 'findNext', motionArgs: { forward: false, toJumplist: true }}, - { keys: 'x', type: 'operatorMotion', operator: 'delete', motion: 'moveByCharacters', motionArgs: { forward: true }, operatorMotionArgs: { visualLine: false }}, - { keys: 'X', type: 'operatorMotion', operator: 'delete', motion: 'moveByCharacters', motionArgs: { forward: false }, operatorMotionArgs: { visualLine: true }}, - { keys: 'D', type: 'operatorMotion', operator: 'delete', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'}, - { keys: 'D', type: 'operator', operator: 'delete', operatorArgs: { linewise: true }, context: 'visual'}, - { keys: 'Y', type: 'operatorMotion', operator: 'yank', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'}, - { keys: 'Y', type: 'operator', operator: 'yank', operatorArgs: { linewise: true }, context: 'visual'}, - { keys: 'C', type: 'operatorMotion', operator: 'change', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'}, - { keys: 'C', type: 'operator', operator: 'change', operatorArgs: { linewise: true }, context: 'visual'}, - { keys: '~', type: 'operatorMotion', operator: 'changeCase', motion: 'moveByCharacters', motionArgs: { forward: true }, operatorArgs: { shouldMoveCursor: true }, context: 'normal'}, - { keys: '~', type: 'operator', operator: 'changeCase', context: 'visual'}, - { keys: '', type: 'operatorMotion', operator: 'delete', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false }, context: 'insert' }, - { keys: '', type: 'action', action: 'jumpListWalk', actionArgs: { forward: true }}, - { keys: '', type: 'action', action: 'jumpListWalk', actionArgs: { forward: false }}, - { keys: '', type: 'action', action: 'scroll', actionArgs: { forward: true, linewise: true }}, - { keys: '', type: 'action', action: 'scroll', actionArgs: { forward: false, linewise: true }}, - { keys: 'a', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'charAfter' }, context: 'normal' }, - { keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'eol' }, context: 'normal' }, - { keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'endOfSelectedArea' }, context: 'visual' }, - { keys: 'i', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'inplace' }, context: 'normal' }, - { keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'firstNonBlank'}, context: 'normal' }, - { keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'startOfSelectedArea' }, context: 'visual' }, - { keys: 'o', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: true }, context: 'normal' }, - { keys: 'O', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: false }, context: 'normal' }, - { keys: 'v', type: 'action', action: 'toggleVisualMode' }, - { keys: 'V', type: 'action', action: 'toggleVisualMode', actionArgs: { linewise: true }}, - { keys: '', type: 'action', action: 'toggleVisualMode', actionArgs: { blockwise: true }}, - { keys: 'gv', type: 'action', action: 'reselectLastSelection' }, - { keys: 'J', type: 'action', action: 'joinLines', isEdit: true }, - { keys: 'p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true }}, - { keys: 'P', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true }}, - { keys: 'r', type: 'action', action: 'replace', isEdit: true }, - { keys: '@', type: 'action', action: 'replayMacro' }, - { keys: 'q', type: 'action', action: 'enterMacroRecordMode' }, - { keys: 'R', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { replace: true }}, - { keys: 'u', type: 'action', action: 'undo', context: 'normal' }, - { keys: 'u', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: true}, context: 'visual', isEdit: true }, - { keys: 'U', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: false}, context: 'visual', isEdit: true }, - { keys: '', type: 'action', action: 'redo' }, - { keys: 'm', type: 'action', action: 'setMark' }, - { keys: '"', type: 'action', action: 'setRegister' }, - { keys: 'zz', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'center' }}, - { keys: 'z.', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'center' }, motion: 'moveToFirstNonWhiteSpaceCharacter' }, - { keys: 'zt', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'top' }}, - { keys: 'z', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'top' }, motion: 'moveToFirstNonWhiteSpaceCharacter' }, - { keys: 'z-', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'bottom' }}, - { keys: 'zb', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'bottom' }, motion: 'moveToFirstNonWhiteSpaceCharacter' }, - { keys: '.', type: 'action', action: 'repeatLastEdit' }, - { keys: '', type: 'action', action: 'incrementNumberToken', isEdit: true, actionArgs: {increase: true, backtrack: false}}, - { keys: '', type: 'action', action: 'incrementNumberToken', isEdit: true, actionArgs: {increase: false, backtrack: false}}, - { keys: 'a', type: 'motion', motion: 'textObjectManipulation' }, - { keys: 'i', type: 'motion', motion: 'textObjectManipulation', motionArgs: { textObjectInner: true }}, - { keys: '/', type: 'search', searchArgs: { forward: true, querySrc: 'prompt', toJumplist: true }}, - { keys: '?', type: 'search', searchArgs: { forward: false, querySrc: 'prompt', toJumplist: true }}, - { keys: '*', type: 'search', searchArgs: { forward: true, querySrc: 'wordUnderCursor', wholeWordOnly: true, toJumplist: true }}, - { keys: '#', type: 'search', searchArgs: { forward: false, querySrc: 'wordUnderCursor', wholeWordOnly: true, toJumplist: true }}, - { keys: 'g*', type: 'search', searchArgs: { forward: true, querySrc: 'wordUnderCursor', toJumplist: true }}, - { keys: 'g#', type: 'search', searchArgs: { forward: false, querySrc: 'wordUnderCursor', toJumplist: true }}, - { keys: ':', type: 'ex' } - ]; - - var Pos = CodeMirror.Pos; - - var modifierCodes = [16, 17, 18, 91]; - var specialKey = {Enter:'CR',Backspace:'BS',Delete:'Del'}; - var mac = /Mac/.test(navigator.platform); - var Vim = function() { return vimApi; } //{ - function lookupKey(e) { - var keyCode = e.keyCode; - if (modifierCodes.indexOf(keyCode) != -1) { return; } - var hasModifier = e.ctrlKey || e.metaKey; - var key = CodeMirror.keyNames[keyCode]; - key = specialKey[key] || key; - var name = ''; - if (e.ctrlKey) { name += 'C-'; } - if (e.altKey) { name += 'A-'; } - if (mac && e.metaKey || (!hasModifier && e.shiftKey) && key.length < 2) { - return; - } else if (e.shiftKey && !/^[A-Za-z]$/.test(key)) { - name += 'S-'; - } - if (key.length == 1) { key = key.toLowerCase(); } - name += key; - if (name.length > 1) { name = '<' + name + '>'; } - return name; - } - function handleKeyDown(cm, e) { - var name = lookupKey(e); - if (!name) { return; } - - CodeMirror.signal(cm, 'vim-keypress', name); - if (CodeMirror.Vim.handleKey(cm, name, 'user')) { - CodeMirror.e_stop(e); - } - } - function handleKeyPress(cm, e) { - var code = e.charCode || e.keyCode; - if (e.ctrlKey || e.metaKey || e.altKey || - e.shiftKey && code < 32) { return; } - var name = String.fromCharCode(code); - - CodeMirror.signal(cm, 'vim-keypress', name); - if (CodeMirror.Vim.handleKey(cm, name, 'user')) { - CodeMirror.e_stop(e); - } - } - - function enterVimMode(cm) { - cm.setOption('disableInput', true); - cm.setOption('showCursorWhenSelecting', false); - CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"}); - cm.on('cursorActivity', onCursorActivity); - maybeInitVimState(cm); - CodeMirror.on(cm.getInputField(), 'paste', getOnPasteFn(cm)); - cm.on('keypress', handleKeyPress); - cm.on('keydown', handleKeyDown); - } - - function leaveVimMode(cm) { - cm.setOption('disableInput', false); - cm.off('cursorActivity', onCursorActivity); - CodeMirror.off(cm.getInputField(), 'paste', getOnPasteFn(cm)); - cm.state.vim = null; - cm.off('keypress', handleKeyPress); - cm.off('keydown', handleKeyDown); - } - - function detachVimMap(cm, next) { - if (this == CodeMirror.keyMap.vim) - CodeMirror.rmClass(cm.getWrapperElement(), "cm-fat-cursor"); - - if (!next || next.attach != attachVimMap) - leaveVimMode(cm, false); - } - function attachVimMap(cm, prev) { - if (this == CodeMirror.keyMap.vim) - CodeMirror.addClass(cm.getWrapperElement(), "cm-fat-cursor"); - - if (!prev || prev.attach != attachVimMap) - enterVimMode(cm); - } - CodeMirror.defineOption('vimMode', false, function(cm, val, prev) { - if (val && cm.getOption("keyMap") != "vim") - cm.setOption("keyMap", "vim"); - else if (!val && prev != CodeMirror.Init && /^vim/.test(cm.getOption("keyMap"))) - cm.setOption("keyMap", "default"); - }); - function getOnPasteFn(cm) { - var vim = cm.state.vim; - if (!vim.onPasteFn) { - vim.onPasteFn = function() { - if (!vim.insertMode) { - cm.setCursor(offsetCursor(cm.getCursor(), 0, 1)); - actions.enterInsertMode(cm, {}, vim); - } - }; - } - return vim.onPasteFn; - } - - var numberRegex = /[\d]/; - var wordRegexp = [(/\w/), (/[^\w\s]/)], bigWordRegexp = [(/\S/)]; - function makeKeyRange(start, size) { - var keys = []; - for (var i = start; i < start + size; i++) { - keys.push(String.fromCharCode(i)); - } - return keys; - } - var upperCaseAlphabet = makeKeyRange(65, 26); - var lowerCaseAlphabet = makeKeyRange(97, 26); - var numbers = makeKeyRange(48, 10); - var validMarks = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['<', '>']); - var validRegisters = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['-', '"', '.', ':', '/']); - - function isLine(cm, line) { - return line >= cm.firstLine() && line <= cm.lastLine(); - } - function isLowerCase(k) { - return (/^[a-z]$/).test(k); - } - function isMatchableSymbol(k) { - return '()[]{}'.indexOf(k) != -1; - } - function isNumber(k) { - return numberRegex.test(k); - } - function isUpperCase(k) { - return (/^[A-Z]$/).test(k); - } - function isWhiteSpaceString(k) { - return (/^\s*$/).test(k); - } - function inArray(val, arr) { - for (var i = 0; i < arr.length; i++) { - if (arr[i] == val) { - return true; - } - } - return false; - } - - var options = {}; - function defineOption(name, defaultValue, type) { - if (defaultValue === undefined) { throw Error('defaultValue is required'); } - if (!type) { type = 'string'; } - var opt = name; - if (typeof name == "string") - opt = { - type: type, - defaultValue: defaultValue - }; - else - name = opt.name; - options[name] = opt; - setOption(name, defaultValue); - } - - function setOption(name, value, cm) { - var option = options[name]; - if (!option) { - throw Error('Unknown option: ' + name); - } - if (option.type == 'boolean') { - if (value && value !== true) { - throw Error('Invalid argument: ' + name + '=' + value); - } else if (value !== false) { - value = true; - } - } - option.value = value; - if (option.set) option.set(value, cm); - } - - function getOption(name) { - var option = options[name]; - if (!option) { - throw Error('Unknown option: ' + name); - } - return option.value; - } - - var createCircularJumpList = function() { - var size = 100; - var pointer = -1; - var head = 0; - var tail = 0; - var buffer = new Array(size); - function add(cm, oldCur, newCur) { - var current = pointer % size; - var curMark = buffer[current]; - function useNextSlot(cursor) { - var next = ++pointer % size; - var trashMark = buffer[next]; - if (trashMark) { - trashMark.clear(); - } - buffer[next] = cm.setBookmark(cursor); - } - if (curMark) { - var markPos = curMark.find(); - if (markPos && !cursorEqual(markPos, oldCur)) { - useNextSlot(oldCur); - } - } else { - useNextSlot(oldCur); - } - useNextSlot(newCur); - head = pointer; - tail = pointer - size + 1; - if (tail < 0) { - tail = 0; - } - } - function move(cm, offset) { - pointer += offset; - if (pointer > head) { - pointer = head; - } else if (pointer < tail) { - pointer = tail; - } - var mark = buffer[(size + pointer) % size]; - if (mark && !mark.find()) { - var inc = offset > 0 ? 1 : -1; - var newCur; - var oldCur = cm.getCursor(); - do { - pointer += inc; - mark = buffer[(size + pointer) % size]; - if (mark && - (newCur = mark.find()) && - !cursorEqual(oldCur, newCur)) { - break; - } - } while (pointer < head && pointer > tail); - } - return mark; - } - return { - cachedCursor: undefined, //used for # and * jumps - add: add, - move: move - }; - }; - var createInsertModeChanges = function(c) { - if (c) { - return { - changes: c.changes, - expectCursorActivityForChange: c.expectCursorActivityForChange - }; - } - return { - changes: [], - expectCursorActivityForChange: false - }; - }; - - function MacroModeState() { - this.latestRegister = undefined; - this.isPlaying = false; - this.isRecording = false; - this.replaySearchQueries = []; - this.onRecordingDone = undefined; - this.lastInsertModeChanges = createInsertModeChanges(); - } - MacroModeState.prototype = { - exitMacroRecordMode: function() { - var macroModeState = vimGlobalState.macroModeState; - if (macroModeState.onRecordingDone) { - macroModeState.onRecordingDone(); // close dialog - } - macroModeState.onRecordingDone = undefined; - macroModeState.isRecording = false; - }, - enterMacroRecordMode: function(cm, registerName) { - var register = - vimGlobalState.registerController.getRegister(registerName); - if (register) { - register.clear(); - this.latestRegister = registerName; - if (cm.openDialog) { - this.onRecordingDone = cm.openDialog( - '(recording)['+registerName+']', null, {bottom:true}); - } - this.isRecording = true; - } - } - }; - - function maybeInitVimState(cm) { - if (!cm.state.vim) { - cm.state.vim = { - inputState: new InputState(), - lastEditInputState: undefined, - lastEditActionCommand: undefined, - lastHPos: -1, - lastHSPos: -1, - lastMotion: null, - marks: {}, - fakeCursor: null, - insertMode: false, - insertModeRepeat: undefined, - visualMode: false, - visualLine: false, - visualBlock: false, - lastSelection: null, - lastPastedText: null, - sel: { - } - }; - } - return cm.state.vim; - } - var vimGlobalState; - function resetVimGlobalState() { - vimGlobalState = { - searchQuery: null, - searchIsReversed: false, - lastSubstituteReplacePart: undefined, - jumpList: createCircularJumpList(), - macroModeState: new MacroModeState, - lastChararacterSearch: {increment:0, forward:true, selectedCharacter:''}, - registerController: new RegisterController({}), - searchHistoryController: new HistoryController({}), - exCommandHistoryController : new HistoryController({}) - }; - for (var optionName in options) { - var option = options[optionName]; - option.value = option.defaultValue; - } - } - - var lastInsertModeKeyTimer; - var vimApi= { - buildKeyMap: function() { - }, - getRegisterController: function() { - return vimGlobalState.registerController; - }, - resetVimGlobalState_: resetVimGlobalState, - getVimGlobalState_: function() { - return vimGlobalState; - }, - maybeInitVimState_: maybeInitVimState, - - InsertModeKey: InsertModeKey, - map: function(lhs, rhs, ctx) { - exCommandDispatcher.map(lhs, rhs, ctx); - }, - unmap: function(lhs, ctx) { - exCommandDispatcher.unmap(lhs, ctx); - }, - setOption: setOption, - getOption: getOption, - defineOption: defineOption, - defineEx: function(name, prefix, func){ - if (name.indexOf(prefix) !== 0) { - throw new Error('(Vim.defineEx) "'+prefix+'" is not a prefix of "'+name+'", command not registered'); - } - exCommands[name]=func; - exCommandDispatcher.commandMap_[prefix]={name:name, shortName:prefix, type:'api'}; - }, - handleKey: function(cm, key, origin) { - var vim = maybeInitVimState(cm); - function handleMacroRecording() { - var macroModeState = vimGlobalState.macroModeState; - if (macroModeState.isRecording) { - if (key == 'q') { - macroModeState.exitMacroRecordMode(); - clearInputState(cm); - return true; - } - if (origin != 'mapping') { - logKey(macroModeState, key); - } - } - } - function handleEsc() { - if (key == '') { - clearInputState(cm); - if (vim.visualMode) { - exitVisualMode(cm); - } else if (vim.insertMode) { - exitInsertMode(cm); - } - return true; - } - } - function doKeyToKey(keys) { - var match; - while (keys) { - match = (/<\w+-.+?>|<\w+>|./).exec(keys); - key = match[0]; - keys = keys.substring(match.index + key.length); - CodeMirror.Vim.handleKey(cm, key, 'mapping'); - } - } - - function handleKeyInsertMode() { - if (handleEsc()) { return true; } - var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key; - var keysAreChars = key.length == 1; - var match = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert'); - while (keys.length > 1 && match.type != 'full') { - var keys = vim.inputState.keyBuffer = keys.slice(1); - var thisMatch = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert'); - if (thisMatch.type != 'none') { match = thisMatch; } - } - if (match.type == 'none') { clearInputState(cm); return false; } - else if (match.type == 'partial') { - if (lastInsertModeKeyTimer) { window.clearTimeout(lastInsertModeKeyTimer); } - lastInsertModeKeyTimer = window.setTimeout( - function() { if (vim.insertMode && vim.inputState.keyBuffer) { clearInputState(cm); } }, - getOption('insertModeEscKeysTimeout')); - return !keysAreChars; - } - - if (lastInsertModeKeyTimer) { window.clearTimeout(lastInsertModeKeyTimer); } - if (keysAreChars) { - var here = cm.getCursor(); - cm.replaceRange('', offsetCursor(here, 0, -(keys.length - 1)), here, '+input'); - } - clearInputState(cm); - var command = match.command; - if (command.type == 'keyToKey') { - doKeyToKey(command.toKeys); - } else { - commandDispatcher.processCommand(cm, vim, command); - } - return true; - } - - function handleKeyNonInsertMode() { - if (handleMacroRecording() || handleEsc()) { return true; }; - - var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key; - if (/^[1-9]\d*$/.test(keys)) { return true; } - - var keysMatcher = /^(\d*)(.*)$/.exec(keys); - if (!keysMatcher) { clearInputState(cm); return false; } - var context = vim.visualMode ? 'visual' : - 'normal'; - var match = commandDispatcher.matchCommand(keysMatcher[2] || keysMatcher[1], defaultKeymap, vim.inputState, context); - if (match.type == 'none') { clearInputState(cm); return false; } - else if (match.type == 'partial') { return true; } - - vim.inputState.keyBuffer = ''; - var command = match.command; - var keysMatcher = /^(\d*)(.*)$/.exec(keys); - if (keysMatcher[1] && keysMatcher[1] != '0') { - vim.inputState.pushRepeatDigit(keysMatcher[1]); - } - if (command.type == 'keyToKey') { - doKeyToKey(command.toKeys); - } else { - commandDispatcher.processCommand(cm, vim, command); - } - return true; - } - - return cm.operation(function() { - cm.curOp.isVimOp = true; - try { - if (vim.insertMode) { return handleKeyInsertMode(); } - else { return handleKeyNonInsertMode(); } - } catch (e) { - cm.state.vim = undefined; - maybeInitVimState(cm); - throw e; - } - }); - }, - handleEx: function(cm, input) { - exCommandDispatcher.processCommand(cm, input); - } - }; - function InputState() { - this.prefixRepeat = []; - this.motionRepeat = []; - - this.operator = null; - this.operatorArgs = null; - this.motion = null; - this.motionArgs = null; - this.keyBuffer = []; // For matching multi-key commands. - this.registerName = null; // Defaults to the unnamed register. - } - InputState.prototype.pushRepeatDigit = function(n) { - if (!this.operator) { - this.prefixRepeat = this.prefixRepeat.concat(n); - } else { - this.motionRepeat = this.motionRepeat.concat(n); - } - }; - InputState.prototype.getRepeat = function() { - var repeat = 0; - if (this.prefixRepeat.length > 0 || this.motionRepeat.length > 0) { - repeat = 1; - if (this.prefixRepeat.length > 0) { - repeat *= parseInt(this.prefixRepeat.join(''), 10); - } - if (this.motionRepeat.length > 0) { - repeat *= parseInt(this.motionRepeat.join(''), 10); - } - } - return repeat; - }; - - function clearInputState(cm, reason) { - cm.state.vim.inputState = new InputState(); - CodeMirror.signal(cm, 'vim-command-done', reason); - } - function Register(text, linewise, blockwise) { - this.clear(); - this.keyBuffer = [text || '']; - this.insertModeChanges = []; - this.searchQueries = []; - this.linewise = !!linewise; - this.blockwise = !!blockwise; - } - Register.prototype = { - setText: function(text, linewise, blockwise) { - this.keyBuffer = [text || '']; - this.linewise = !!linewise; - this.blockwise = !!blockwise; - }, - pushText: function(text, linewise) { - if (linewise) { - if (!this.linewise) { - this.keyBuffer.push('\n'); - } - this.linewise = true; - } - this.keyBuffer.push(text); - }, - pushInsertModeChanges: function(changes) { - this.insertModeChanges.push(createInsertModeChanges(changes)); - }, - pushSearchQuery: function(query) { - this.searchQueries.push(query); - }, - clear: function() { - this.keyBuffer = []; - this.insertModeChanges = []; - this.searchQueries = []; - this.linewise = false; - }, - toString: function() { - return this.keyBuffer.join(''); - } - }; - function RegisterController(registers) { - this.registers = registers; - this.unnamedRegister = registers['"'] = new Register(); - registers['.'] = new Register(); - registers[':'] = new Register(); - registers['/'] = new Register(); - } - RegisterController.prototype = { - pushText: function(registerName, operator, text, linewise, blockwise) { - if (linewise && text.charAt(0) == '\n') { - text = text.slice(1) + '\n'; - } - if (linewise && text.charAt(text.length - 1) !== '\n'){ - text += '\n'; - } - var register = this.isValidRegister(registerName) ? - this.getRegister(registerName) : null; - if (!register) { - switch (operator) { - case 'yank': - this.registers['0'] = new Register(text, linewise, blockwise); - break; - case 'delete': - case 'change': - if (text.indexOf('\n') == -1) { - this.registers['-'] = new Register(text, linewise); - } else { - this.shiftNumericRegisters_(); - this.registers['1'] = new Register(text, linewise); - } - break; - } - this.unnamedRegister.setText(text, linewise, blockwise); - return; - } - var append = isUpperCase(registerName); - if (append) { - register.pushText(text, linewise); - } else { - register.setText(text, linewise, blockwise); - } - this.unnamedRegister.setText(register.toString(), linewise); - }, - getRegister: function(name) { - if (!this.isValidRegister(name)) { - return this.unnamedRegister; - } - name = name.toLowerCase(); - if (!this.registers[name]) { - this.registers[name] = new Register(); - } - return this.registers[name]; - }, - isValidRegister: function(name) { - return name && inArray(name, validRegisters); - }, - shiftNumericRegisters_: function() { - for (var i = 9; i >= 2; i--) { - this.registers[i] = this.getRegister('' + (i - 1)); - } - } - }; - function HistoryController() { - this.historyBuffer = []; - this.iterator; - this.initialPrefix = null; - } - HistoryController.prototype = { - nextMatch: function (input, up) { - var historyBuffer = this.historyBuffer; - var dir = up ? -1 : 1; - if (this.initialPrefix === null) this.initialPrefix = input; - for (var i = this.iterator + dir; up ? i >= 0 : i < historyBuffer.length; i+= dir) { - var element = historyBuffer[i]; - for (var j = 0; j <= element.length; j++) { - if (this.initialPrefix == element.substring(0, j)) { - this.iterator = i; - return element; - } - } - } - if (i >= historyBuffer.length) { - this.iterator = historyBuffer.length; - return this.initialPrefix; - } - if (i < 0 ) return input; - }, - pushInput: function(input) { - var index = this.historyBuffer.indexOf(input); - if (index > -1) this.historyBuffer.splice(index, 1); - if (input.length) this.historyBuffer.push(input); - }, - reset: function() { - this.initialPrefix = null; - this.iterator = this.historyBuffer.length; - } - }; - var commandDispatcher = { - matchCommand: function(keys, keyMap, inputState, context) { - var matches = commandMatches(keys, keyMap, context, inputState); - if (!matches.full && !matches.partial) { - return {type: 'none'}; - } else if (!matches.full && matches.partial) { - return {type: 'partial'}; - } - - var bestMatch; - for (var i = 0; i < matches.full.length; i++) { - var match = matches.full[i]; - if (!bestMatch) { - bestMatch = match; - } - } - if (bestMatch.keys.slice(-11) == '') { - inputState.selectedCharacter = lastChar(keys); - } - return {type: 'full', command: bestMatch}; - }, - processCommand: function(cm, vim, command) { - vim.inputState.repeatOverride = command.repeatOverride; - switch (command.type) { - case 'motion': - this.processMotion(cm, vim, command); - break; - case 'operator': - this.processOperator(cm, vim, command); - break; - case 'operatorMotion': - this.processOperatorMotion(cm, vim, command); - break; - case 'action': - this.processAction(cm, vim, command); - break; - case 'search': - this.processSearch(cm, vim, command); - clearInputState(cm); - break; - case 'ex': - case 'keyToEx': - this.processEx(cm, vim, command); - clearInputState(cm); - break; - default: - break; - } - }, - processMotion: function(cm, vim, command) { - vim.inputState.motion = command.motion; - vim.inputState.motionArgs = copyArgs(command.motionArgs); - this.evalInput(cm, vim); - }, - processOperator: function(cm, vim, command) { - var inputState = vim.inputState; - if (inputState.operator) { - if (inputState.operator == command.operator) { - inputState.motion = 'expandToLine'; - inputState.motionArgs = { linewise: true }; - this.evalInput(cm, vim); - return; - } else { - clearInputState(cm); - } - } - inputState.operator = command.operator; - inputState.operatorArgs = copyArgs(command.operatorArgs); - if (vim.visualMode) { - this.evalInput(cm, vim); - } - }, - processOperatorMotion: function(cm, vim, command) { - var visualMode = vim.visualMode; - var operatorMotionArgs = copyArgs(command.operatorMotionArgs); - if (operatorMotionArgs) { - if (visualMode && operatorMotionArgs.visualLine) { - vim.visualLine = true; - } - } - this.processOperator(cm, vim, command); - if (!visualMode) { - this.processMotion(cm, vim, command); - } - }, - processAction: function(cm, vim, command) { - var inputState = vim.inputState; - var repeat = inputState.getRepeat(); - var repeatIsExplicit = !!repeat; - var actionArgs = copyArgs(command.actionArgs) || {}; - if (inputState.selectedCharacter) { - actionArgs.selectedCharacter = inputState.selectedCharacter; - } - if (command.operator) { - this.processOperator(cm, vim, command); - } - if (command.motion) { - this.processMotion(cm, vim, command); - } - if (command.motion || command.operator) { - this.evalInput(cm, vim); - } - actionArgs.repeat = repeat || 1; - actionArgs.repeatIsExplicit = repeatIsExplicit; - actionArgs.registerName = inputState.registerName; - clearInputState(cm); - vim.lastMotion = null; - if (command.isEdit) { - this.recordLastEdit(vim, inputState, command); - } - actions[command.action](cm, actionArgs, vim); - }, - processSearch: function(cm, vim, command) { - if (!cm.getSearchCursor) { - return; - } - var forward = command.searchArgs.forward; - var wholeWordOnly = command.searchArgs.wholeWordOnly; - getSearchState(cm).setReversed(!forward); - var promptPrefix = (forward) ? '/' : '?'; - var originalQuery = getSearchState(cm).getQuery(); - var originalScrollPos = cm.getScrollInfo(); - function handleQuery(query, ignoreCase, smartCase) { - vimGlobalState.searchHistoryController.pushInput(query); - vimGlobalState.searchHistoryController.reset(); - try { - updateSearchQuery(cm, query, ignoreCase, smartCase); - } catch (e) { - showConfirm(cm, 'Invalid regex: ' + query); - return; - } - commandDispatcher.processMotion(cm, vim, { - type: 'motion', - motion: 'findNext', - motionArgs: { forward: true, toJumplist: command.searchArgs.toJumplist } - }); - } - function onPromptClose(query) { - cm.scrollTo(originalScrollPos.left, originalScrollPos.top); - handleQuery(query, true /** ignoreCase */, true /** smartCase */); - var macroModeState = vimGlobalState.macroModeState; - if (macroModeState.isRecording) { - logSearchQuery(macroModeState, query); - } - } - function onPromptKeyUp(e, query, close) { - var keyName = CodeMirror.keyName(e), up; - if (keyName == 'Up' || keyName == 'Down') { - up = keyName == 'Up' ? true : false; - query = vimGlobalState.searchHistoryController.nextMatch(query, up) || ''; - close(query); - } else { - if ( keyName != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift') - vimGlobalState.searchHistoryController.reset(); - } - var parsedQuery; - try { - parsedQuery = updateSearchQuery(cm, query, - true /** ignoreCase */, true /** smartCase */); - } catch (e) { - } - if (parsedQuery) { - cm.scrollIntoView(findNext(cm, !forward, parsedQuery), 30); - } else { - clearSearchHighlight(cm); - cm.scrollTo(originalScrollPos.left, originalScrollPos.top); - } - } - function onPromptKeyDown(e, query, close) { - var keyName = CodeMirror.keyName(e); - if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[') { - vimGlobalState.searchHistoryController.pushInput(query); - vimGlobalState.searchHistoryController.reset(); - updateSearchQuery(cm, originalQuery); - clearSearchHighlight(cm); - cm.scrollTo(originalScrollPos.left, originalScrollPos.top); - CodeMirror.e_stop(e); - close(); - cm.focus(); - } - } - switch (command.searchArgs.querySrc) { - case 'prompt': - var macroModeState = vimGlobalState.macroModeState; - if (macroModeState.isPlaying) { - var query = macroModeState.replaySearchQueries.shift(); - handleQuery(query, true /** ignoreCase */, false /** smartCase */); - } else { - showPrompt(cm, { - onClose: onPromptClose, - prefix: promptPrefix, - desc: searchPromptDesc, - onKeyUp: onPromptKeyUp, - onKeyDown: onPromptKeyDown - }); - } - break; - case 'wordUnderCursor': - var word = expandWordUnderCursor(cm, false /** inclusive */, - true /** forward */, false /** bigWord */, - true /** noSymbol */); - var isKeyword = true; - if (!word) { - word = expandWordUnderCursor(cm, false /** inclusive */, - true /** forward */, false /** bigWord */, - false /** noSymbol */); - isKeyword = false; - } - if (!word) { - return; - } - var query = cm.getLine(word.start.line).substring(word.start.ch, - word.end.ch); - if (isKeyword && wholeWordOnly) { - query = '\\b' + query + '\\b'; - } else { - query = escapeRegex(query); - } - vimGlobalState.jumpList.cachedCursor = cm.getCursor(); - cm.setCursor(word.start); - - handleQuery(query, true /** ignoreCase */, false /** smartCase */); - break; - } - }, - processEx: function(cm, vim, command) { - function onPromptClose(input) { - vimGlobalState.exCommandHistoryController.pushInput(input); - vimGlobalState.exCommandHistoryController.reset(); - exCommandDispatcher.processCommand(cm, input); - } - function onPromptKeyDown(e, input, close) { - var keyName = CodeMirror.keyName(e), up; - if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[') { - vimGlobalState.exCommandHistoryController.pushInput(input); - vimGlobalState.exCommandHistoryController.reset(); - CodeMirror.e_stop(e); - close(); - cm.focus(); - } - if (keyName == 'Up' || keyName == 'Down') { - up = keyName == 'Up' ? true : false; - input = vimGlobalState.exCommandHistoryController.nextMatch(input, up) || ''; - close(input); - } else { - if ( keyName != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift') - vimGlobalState.exCommandHistoryController.reset(); - } - } - if (command.type == 'keyToEx') { - exCommandDispatcher.processCommand(cm, command.exArgs.input); - } else { - if (vim.visualMode) { - showPrompt(cm, { onClose: onPromptClose, prefix: ':', value: '\'<,\'>', - onKeyDown: onPromptKeyDown}); - } else { - showPrompt(cm, { onClose: onPromptClose, prefix: ':', - onKeyDown: onPromptKeyDown}); - } - } - }, - evalInput: function(cm, vim) { - var inputState = vim.inputState; - var motion = inputState.motion; - var motionArgs = inputState.motionArgs || {}; - var operator = inputState.operator; - var operatorArgs = inputState.operatorArgs || {}; - var registerName = inputState.registerName; - var sel = vim.sel; - var origHead = copyCursor(vim.visualMode ? sel.head: cm.getCursor('head')); - var origAnchor = copyCursor(vim.visualMode ? sel.anchor : cm.getCursor('anchor')); - var oldHead = copyCursor(origHead); - var oldAnchor = copyCursor(origAnchor); - var newHead, newAnchor; - var repeat; - if (operator) { - this.recordLastEdit(vim, inputState); - } - if (inputState.repeatOverride !== undefined) { - repeat = inputState.repeatOverride; - } else { - repeat = inputState.getRepeat(); - } - if (repeat > 0 && motionArgs.explicitRepeat) { - motionArgs.repeatIsExplicit = true; - } else if (motionArgs.noRepeat || - (!motionArgs.explicitRepeat && repeat === 0)) { - repeat = 1; - motionArgs.repeatIsExplicit = false; - } - if (inputState.selectedCharacter) { - motionArgs.selectedCharacter = operatorArgs.selectedCharacter = - inputState.selectedCharacter; - } - motionArgs.repeat = repeat; - clearInputState(cm); - if (motion) { - var motionResult = motions[motion](cm, origHead, motionArgs, vim); - vim.lastMotion = motions[motion]; - if (!motionResult) { - return; - } - if (motionArgs.toJumplist) { - var jumpList = vimGlobalState.jumpList; - var cachedCursor = jumpList.cachedCursor; - if (cachedCursor) { - recordJumpPosition(cm, cachedCursor, motionResult); - delete jumpList.cachedCursor; - } else { - recordJumpPosition(cm, origHead, motionResult); - } - } - if (motionResult instanceof Array) { - newAnchor = motionResult[0]; - newHead = motionResult[1]; - } else { - newHead = motionResult; - } - if (!newHead) { - newHead = copyCursor(origHead); - } - if (vim.visualMode) { - newHead = clipCursorToContent(cm, newHead, true); - if (newAnchor) { - newAnchor = clipCursorToContent(cm, newAnchor, true); - } - newAnchor = newAnchor || oldAnchor; - sel.anchor = newAnchor; - sel.head = newHead; - updateCmSelection(cm); - updateMark(cm, vim, '<', - cursorIsBefore(newAnchor, newHead) ? newAnchor - : newHead); - updateMark(cm, vim, '>', - cursorIsBefore(newAnchor, newHead) ? newHead - : newAnchor); - } else if (!operator) { - newHead = clipCursorToContent(cm, newHead); - cm.setCursor(newHead.line, newHead.ch); - } - } - if (operator) { - if (operatorArgs.lastSel) { - newAnchor = oldAnchor; - var lastSel = operatorArgs.lastSel; - var lineOffset = Math.abs(lastSel.head.line - lastSel.anchor.line); - var chOffset = Math.abs(lastSel.head.ch - lastSel.anchor.ch); - if (lastSel.visualLine) { - newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch); - } else if (lastSel.visualBlock) { - newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch + chOffset); - } else if (lastSel.head.line == lastSel.anchor.line) { - newHead = Pos(oldAnchor.line, oldAnchor.ch + chOffset); - } else { - newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch); - } - vim.visualMode = true; - vim.visualLine = lastSel.visualLine; - vim.visualBlock = lastSel.visualBlock; - sel = vim.sel = { - anchor: newAnchor, - head: newHead - }; - updateCmSelection(cm); - } else if (vim.visualMode) { - operatorArgs.lastSel = { - anchor: copyCursor(sel.anchor), - head: copyCursor(sel.head), - visualBlock: vim.visualBlock, - visualLine: vim.visualLine - }; - } - var curStart, curEnd, linewise, mode; - var cmSel; - if (vim.visualMode) { - curStart = cursorMin(sel.head, sel.anchor); - curEnd = cursorMax(sel.head, sel.anchor); - linewise = vim.visualLine || operatorArgs.linewise; - mode = vim.visualBlock ? 'block' : - linewise ? 'line' : - 'char'; - cmSel = makeCmSelection(cm, { - anchor: curStart, - head: curEnd - }, mode); - if (linewise) { - var ranges = cmSel.ranges; - if (mode == 'block') { - for (var i = 0; i < ranges.length; i++) { - ranges[i].head.ch = lineLength(cm, ranges[i].head.line); - } - } else if (mode == 'line') { - ranges[0].head = Pos(ranges[0].head.line + 1, 0); - } - } - } else { - curStart = copyCursor(newAnchor || oldAnchor); - curEnd = copyCursor(newHead || oldHead); - if (cursorIsBefore(curEnd, curStart)) { - var tmp = curStart; - curStart = curEnd; - curEnd = tmp; - } - linewise = motionArgs.linewise || operatorArgs.linewise; - if (linewise) { - expandSelectionToLine(cm, curStart, curEnd); - } else if (motionArgs.forward) { - clipToLine(cm, curStart, curEnd); - } - mode = 'char'; - var exclusive = !motionArgs.inclusive || linewise; - cmSel = makeCmSelection(cm, { - anchor: curStart, - head: curEnd - }, mode, exclusive); - } - cm.setSelections(cmSel.ranges, cmSel.primary); - vim.lastMotion = null; - operatorArgs.repeat = repeat; // For indent in visual mode. - operatorArgs.registerName = registerName; - operatorArgs.linewise = linewise; - var operatorMoveTo = operators[operator]( - cm, operatorArgs, cmSel.ranges, oldAnchor, newHead); - if (vim.visualMode) { - exitVisualMode(cm); - } - if (operatorMoveTo) { - cm.setCursor(operatorMoveTo); - } - } - }, - recordLastEdit: function(vim, inputState, actionCommand) { - var macroModeState = vimGlobalState.macroModeState; - if (macroModeState.isPlaying) { return; } - vim.lastEditInputState = inputState; - vim.lastEditActionCommand = actionCommand; - macroModeState.lastInsertModeChanges.changes = []; - macroModeState.lastInsertModeChanges.expectCursorActivityForChange = false; - } - }; - var motions = { - moveToTopLine: function(cm, _head, motionArgs) { - var line = getUserVisibleLines(cm).top + motionArgs.repeat -1; - return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line))); - }, - moveToMiddleLine: function(cm) { - var range = getUserVisibleLines(cm); - var line = Math.floor((range.top + range.bottom) * 0.5); - return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line))); - }, - moveToBottomLine: function(cm, _head, motionArgs) { - var line = getUserVisibleLines(cm).bottom - motionArgs.repeat +1; - return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line))); - }, - expandToLine: function(_cm, head, motionArgs) { - var cur = head; - return Pos(cur.line + motionArgs.repeat - 1, Infinity); - }, - findNext: function(cm, _head, motionArgs) { - var state = getSearchState(cm); - var query = state.getQuery(); - if (!query) { - return; - } - var prev = !motionArgs.forward; - prev = (state.isReversed()) ? !prev : prev; - highlightSearchMatches(cm, query); - return findNext(cm, prev/** prev */, query, motionArgs.repeat); - }, - goToMark: function(cm, _head, motionArgs, vim) { - var mark = vim.marks[motionArgs.selectedCharacter]; - if (mark) { - var pos = mark.find(); - return motionArgs.linewise ? { line: pos.line, ch: findFirstNonWhiteSpaceCharacter(cm.getLine(pos.line)) } : pos; - } - return null; - }, - moveToOtherHighlightedEnd: function(cm, _head, motionArgs, vim) { - if (vim.visualBlock && motionArgs.sameLine) { - var sel = vim.sel; - return [ - clipCursorToContent(cm, Pos(sel.anchor.line, sel.head.ch)), - clipCursorToContent(cm, Pos(sel.head.line, sel.anchor.ch)) - ]; - } else { - return ([vim.sel.head, vim.sel.anchor]); - } - }, - jumpToMark: function(cm, head, motionArgs, vim) { - var best = head; - for (var i = 0; i < motionArgs.repeat; i++) { - var cursor = best; - for (var key in vim.marks) { - if (!isLowerCase(key)) { - continue; - } - var mark = vim.marks[key].find(); - var isWrongDirection = (motionArgs.forward) ? - cursorIsBefore(mark, cursor) : cursorIsBefore(cursor, mark); - - if (isWrongDirection) { - continue; - } - if (motionArgs.linewise && (mark.line == cursor.line)) { - continue; - } - - var equal = cursorEqual(cursor, best); - var between = (motionArgs.forward) ? - cursorIsBetween(cursor, mark, best) : - cursorIsBetween(best, mark, cursor); - - if (equal || between) { - best = mark; - } - } - } - - if (motionArgs.linewise) { - best = Pos(best.line, findFirstNonWhiteSpaceCharacter(cm.getLine(best.line))); - } - return best; - }, - moveByCharacters: function(_cm, head, motionArgs) { - var cur = head; - var repeat = motionArgs.repeat; - var ch = motionArgs.forward ? cur.ch + repeat : cur.ch - repeat; - return Pos(cur.line, ch); - }, - moveByLines: function(cm, head, motionArgs, vim) { - var cur = head; - var endCh = cur.ch; - switch (vim.lastMotion) { - case this.moveByLines: - case this.moveByDisplayLines: - case this.moveByScroll: - case this.moveToColumn: - case this.moveToEol: - endCh = vim.lastHPos; - break; - default: - vim.lastHPos = endCh; - } - var repeat = motionArgs.repeat+(motionArgs.repeatOffset||0); - var line = motionArgs.forward ? cur.line + repeat : cur.line - repeat; - var first = cm.firstLine(); - var last = cm.lastLine(); - if ((line < first && cur.line == first) || - (line > last && cur.line == last)) { - return; - } - if (motionArgs.toFirstChar){ - endCh=findFirstNonWhiteSpaceCharacter(cm.getLine(line)); - vim.lastHPos = endCh; - } - vim.lastHSPos = cm.charCoords(Pos(line, endCh),'div').left; - return Pos(line, endCh); - }, - moveByDisplayLines: function(cm, head, motionArgs, vim) { - var cur = head; - switch (vim.lastMotion) { - case this.moveByDisplayLines: - case this.moveByScroll: - case this.moveByLines: - case this.moveToColumn: - case this.moveToEol: - break; - default: - vim.lastHSPos = cm.charCoords(cur,'div').left; - } - var repeat = motionArgs.repeat; - var res=cm.findPosV(cur,(motionArgs.forward ? repeat : -repeat),'line',vim.lastHSPos); - if (res.hitSide) { - if (motionArgs.forward) { - var lastCharCoords = cm.charCoords(res, 'div'); - var goalCoords = { top: lastCharCoords.top + 8, left: vim.lastHSPos }; - var res = cm.coordsChar(goalCoords, 'div'); - } else { - var resCoords = cm.charCoords(Pos(cm.firstLine(), 0), 'div'); - resCoords.left = vim.lastHSPos; - res = cm.coordsChar(resCoords, 'div'); - } - } - vim.lastHPos = res.ch; - return res; - }, - moveByPage: function(cm, head, motionArgs) { - var curStart = head; - var repeat = motionArgs.repeat; - return cm.findPosV(curStart, (motionArgs.forward ? repeat : -repeat), 'page'); - }, - moveByParagraph: function(cm, head, motionArgs) { - var line = head.line; - var repeat = motionArgs.repeat; - var inc = motionArgs.forward ? 1 : -1; - for (var i = 0; i < repeat; i++) { - if ((!motionArgs.forward && line === cm.firstLine() ) || - (motionArgs.forward && line == cm.lastLine())) { - break; - } - line += inc; - while (line !== cm.firstLine() && line != cm.lastLine() && cm.getLine(line)) { - line += inc; - } - } - return Pos(line, 0); - }, - moveByScroll: function(cm, head, motionArgs, vim) { - var scrollbox = cm.getScrollInfo(); - var curEnd = null; - var repeat = motionArgs.repeat; - if (!repeat) { - repeat = scrollbox.clientHeight / (2 * cm.defaultTextHeight()); - } - var orig = cm.charCoords(head, 'local'); - motionArgs.repeat = repeat; - var curEnd = motions.moveByDisplayLines(cm, head, motionArgs, vim); - if (!curEnd) { - return null; - } - var dest = cm.charCoords(curEnd, 'local'); - cm.scrollTo(null, scrollbox.top + dest.top - orig.top); - return curEnd; - }, - moveByWords: function(cm, head, motionArgs) { - return moveToWord(cm, head, motionArgs.repeat, !!motionArgs.forward, - !!motionArgs.wordEnd, !!motionArgs.bigWord); - }, - moveTillCharacter: function(cm, _head, motionArgs) { - var repeat = motionArgs.repeat; - var curEnd = moveToCharacter(cm, repeat, motionArgs.forward, - motionArgs.selectedCharacter); - var increment = motionArgs.forward ? -1 : 1; - recordLastCharacterSearch(increment, motionArgs); - if (!curEnd) return null; - curEnd.ch += increment; - return curEnd; - }, - moveToCharacter: function(cm, head, motionArgs) { - var repeat = motionArgs.repeat; - recordLastCharacterSearch(0, motionArgs); - return moveToCharacter(cm, repeat, motionArgs.forward, - motionArgs.selectedCharacter) || head; - }, - moveToSymbol: function(cm, head, motionArgs) { - var repeat = motionArgs.repeat; - return findSymbol(cm, repeat, motionArgs.forward, - motionArgs.selectedCharacter) || head; - }, - moveToColumn: function(cm, head, motionArgs, vim) { - var repeat = motionArgs.repeat; - vim.lastHPos = repeat - 1; - vim.lastHSPos = cm.charCoords(head,'div').left; - return moveToColumn(cm, repeat); - }, - moveToEol: function(cm, head, motionArgs, vim) { - var cur = head; - vim.lastHPos = Infinity; - var retval= Pos(cur.line + motionArgs.repeat - 1, Infinity); - var end=cm.clipPos(retval); - end.ch--; - vim.lastHSPos = cm.charCoords(end,'div').left; - return retval; - }, - moveToFirstNonWhiteSpaceCharacter: function(cm, head) { - var cursor = head; - return Pos(cursor.line, - findFirstNonWhiteSpaceCharacter(cm.getLine(cursor.line))); - }, - moveToMatchedSymbol: function(cm, head) { - var cursor = head; - var line = cursor.line; - var ch = cursor.ch; - var lineText = cm.getLine(line); - var symbol; - do { - symbol = lineText.charAt(ch++); - if (symbol && isMatchableSymbol(symbol)) { - var style = cm.getTokenTypeAt(Pos(line, ch)); - if (style !== "string" && style !== "comment") { - break; - } - } - } while (symbol); - if (symbol) { - var matched = cm.findMatchingBracket(Pos(line, ch)); - return matched.to; - } else { - return cursor; - } - }, - moveToStartOfLine: function(_cm, head) { - return Pos(head.line, 0); - }, - moveToLineOrEdgeOfDocument: function(cm, _head, motionArgs) { - var lineNum = motionArgs.forward ? cm.lastLine() : cm.firstLine(); - if (motionArgs.repeatIsExplicit) { - lineNum = motionArgs.repeat - cm.getOption('firstLineNumber'); - } - return Pos(lineNum, - findFirstNonWhiteSpaceCharacter(cm.getLine(lineNum))); - }, - textObjectManipulation: function(cm, head, motionArgs) { - var mirroredPairs = {'(': ')', ')': '(', - '{': '}', '}': '{', - '[': ']', ']': '['}; - var selfPaired = {'\'': true, '"': true}; - - var character = motionArgs.selectedCharacter; - if (character == 'b') { - character = '('; - } else if (character == 'B') { - character = '{'; - } - var inclusive = !motionArgs.textObjectInner; - - var tmp; - if (mirroredPairs[character]) { - tmp = selectCompanionObject(cm, head, character, inclusive); - } else if (selfPaired[character]) { - tmp = findBeginningAndEnd(cm, head, character, inclusive); - } else if (character === 'W') { - tmp = expandWordUnderCursor(cm, inclusive, true /** forward */, - true /** bigWord */); - } else if (character === 'w') { - tmp = expandWordUnderCursor(cm, inclusive, true /** forward */, - false /** bigWord */); - } else if (character === 'p') { - tmp = expandParagraphUnderCursor(cm, inclusive, true /** forward */, - false /** bigWord */); - } else { - return null; - } - - if (!cm.state.vim.visualMode) { - return [tmp.start, tmp.end]; - } else { - return expandSelection(cm, tmp.start, tmp.end); - } - }, - - repeatLastCharacterSearch: function(cm, head, motionArgs) { - var lastSearch = vimGlobalState.lastChararacterSearch; - var repeat = motionArgs.repeat; - var forward = motionArgs.forward === lastSearch.forward; - var increment = (lastSearch.increment ? 1 : 0) * (forward ? -1 : 1); - cm.moveH(-increment, 'char'); - motionArgs.inclusive = forward ? true : false; - var curEnd = moveToCharacter(cm, repeat, forward, lastSearch.selectedCharacter); - if (!curEnd) { - cm.moveH(increment, 'char'); - return head; - } - curEnd.ch += increment; - return curEnd; - } - }; - - function fillArray(val, times) { - var arr = []; - for (var i = 0; i < times; i++) { - arr.push(val); - } - return arr; - } - var operators = { - change: function(cm, args, ranges) { - var finalHead, text; - var vim = cm.state.vim; - vimGlobalState.macroModeState.lastInsertModeChanges.inVisualBlock = vim.visualBlock; - if (!vim.visualMode) { - var anchor = ranges[0].anchor, - head = ranges[0].head; - text = cm.getRange(anchor, head); - if (!isWhiteSpaceString(text)) { - var match = (/\s+$/).exec(text); - if (match) { - head = offsetCursor(head, 0, - match[0].length); - text = text.slice(0, - match[0].length); - } - } - var wasLastLine = head.line - 1 == cm.lastLine(); - cm.replaceRange('', anchor, head); - if (args.linewise && !wasLastLine) { - CodeMirror.commands.newlineAndIndent(cm); - anchor.ch = null; - } - finalHead = anchor; - } else { - text = cm.getSelection(); - var replacement = fillArray('', ranges.length); - cm.replaceSelections(replacement); - finalHead = cursorMin(ranges[0].head, ranges[0].anchor); - } - vimGlobalState.registerController.pushText( - args.registerName, 'change', text, - args.linewise, ranges.length > 1); - actions.enterInsertMode(cm, {head: finalHead}, cm.state.vim); - }, - 'delete': function(cm, args, ranges) { - var finalHead, text; - var vim = cm.state.vim; - if (!vim.visualBlock) { - var anchor = ranges[0].anchor, - head = ranges[0].head; - if (args.linewise && - head.line != cm.firstLine() && - anchor.line == cm.lastLine() && - anchor.line == head.line - 1) { - if (anchor.line == cm.firstLine()) { - anchor.ch = 0; - } else { - anchor = Pos(anchor.line - 1, lineLength(cm, anchor.line - 1)); - } - } - text = cm.getRange(anchor, head); - cm.replaceRange('', anchor, head); - finalHead = anchor; - if (args.linewise) { - finalHead = motions.moveToFirstNonWhiteSpaceCharacter(cm, anchor); - } - } else { - text = cm.getSelection(); - var replacement = fillArray('', ranges.length); - cm.replaceSelections(replacement); - finalHead = ranges[0].anchor; - } - vimGlobalState.registerController.pushText( - args.registerName, 'delete', text, - args.linewise, vim.visualBlock); - return finalHead; - }, - indent: function(cm, args, ranges) { - var vim = cm.state.vim; - var startLine = ranges[0].anchor.line; - var endLine = vim.visualBlock ? - ranges[ranges.length - 1].anchor.line : - ranges[0].head.line; - var repeat = (vim.visualMode) ? args.repeat : 1; - if (args.linewise) { - endLine--; - } - for (var i = startLine; i <= endLine; i++) { - for (var j = 0; j < repeat; j++) { - cm.indentLine(i, args.indentRight); - } - } - return motions.moveToFirstNonWhiteSpaceCharacter(cm, ranges[0].anchor); - }, - changeCase: function(cm, args, ranges, oldAnchor, newHead) { - var selections = cm.getSelections(); - var swapped = []; - var toLower = args.toLower; - for (var j = 0; j < selections.length; j++) { - var toSwap = selections[j]; - var text = ''; - if (toLower === true) { - text = toSwap.toLowerCase(); - } else if (toLower === false) { - text = toSwap.toUpperCase(); - } else { - for (var i = 0; i < toSwap.length; i++) { - var character = toSwap.charAt(i); - text += isUpperCase(character) ? character.toLowerCase() : - character.toUpperCase(); - } - } - swapped.push(text); - } - cm.replaceSelections(swapped); - if (args.shouldMoveCursor){ - return newHead; - } else if (!cm.state.vim.visualMode && args.linewise && ranges[0].anchor.line + 1 == ranges[0].head.line) { - return motions.moveToFirstNonWhiteSpaceCharacter(cm, oldAnchor); - } else if (args.linewise){ - return oldAnchor; - } else { - return cursorMin(ranges[0].anchor, ranges[0].head); - } - }, - yank: function(cm, args, ranges, oldAnchor) { - var vim = cm.state.vim; - var text = cm.getSelection(); - var endPos = vim.visualMode - ? cursorMin(vim.sel.anchor, vim.sel.head, ranges[0].head, ranges[0].anchor) - : oldAnchor; - vimGlobalState.registerController.pushText( - args.registerName, 'yank', - text, args.linewise, vim.visualBlock); - return endPos; - } - }; - - var actions = { - jumpListWalk: function(cm, actionArgs, vim) { - if (vim.visualMode) { - return; - } - var repeat = actionArgs.repeat; - var forward = actionArgs.forward; - var jumpList = vimGlobalState.jumpList; - - var mark = jumpList.move(cm, forward ? repeat : -repeat); - var markPos = mark ? mark.find() : undefined; - markPos = markPos ? markPos : cm.getCursor(); - cm.setCursor(markPos); - }, - scroll: function(cm, actionArgs, vim) { - if (vim.visualMode) { - return; - } - var repeat = actionArgs.repeat || 1; - var lineHeight = cm.defaultTextHeight(); - var top = cm.getScrollInfo().top; - var delta = lineHeight * repeat; - var newPos = actionArgs.forward ? top + delta : top - delta; - var cursor = copyCursor(cm.getCursor()); - var cursorCoords = cm.charCoords(cursor, 'local'); - if (actionArgs.forward) { - if (newPos > cursorCoords.top) { - cursor.line += (newPos - cursorCoords.top) / lineHeight; - cursor.line = Math.ceil(cursor.line); - cm.setCursor(cursor); - cursorCoords = cm.charCoords(cursor, 'local'); - cm.scrollTo(null, cursorCoords.top); - } else { - cm.scrollTo(null, newPos); - } - } else { - var newBottom = newPos + cm.getScrollInfo().clientHeight; - if (newBottom < cursorCoords.bottom) { - cursor.line -= (cursorCoords.bottom - newBottom) / lineHeight; - cursor.line = Math.floor(cursor.line); - cm.setCursor(cursor); - cursorCoords = cm.charCoords(cursor, 'local'); - cm.scrollTo( - null, cursorCoords.bottom - cm.getScrollInfo().clientHeight); - } else { - cm.scrollTo(null, newPos); - } - } - }, - scrollToCursor: function(cm, actionArgs) { - var lineNum = cm.getCursor().line; - var charCoords = cm.charCoords(Pos(lineNum, 0), 'local'); - var height = cm.getScrollInfo().clientHeight; - var y = charCoords.top; - var lineHeight = charCoords.bottom - y; - switch (actionArgs.position) { - case 'center': y = y - (height / 2) + lineHeight; - break; - case 'bottom': y = y - height + lineHeight*1.4; - break; - case 'top': y = y + lineHeight*0.4; - break; - } - cm.scrollTo(null, y); - }, - replayMacro: function(cm, actionArgs, vim) { - var registerName = actionArgs.selectedCharacter; - var repeat = actionArgs.repeat; - var macroModeState = vimGlobalState.macroModeState; - if (registerName == '@') { - registerName = macroModeState.latestRegister; - } - while(repeat--){ - executeMacroRegister(cm, vim, macroModeState, registerName); - } - }, - enterMacroRecordMode: function(cm, actionArgs) { - var macroModeState = vimGlobalState.macroModeState; - var registerName = actionArgs.selectedCharacter; - macroModeState.enterMacroRecordMode(cm, registerName); - }, - enterInsertMode: function(cm, actionArgs, vim) { - if (cm.getOption('readOnly')) { return; } - vim.insertMode = true; - vim.insertModeRepeat = actionArgs && actionArgs.repeat || 1; - var insertAt = (actionArgs) ? actionArgs.insertAt : null; - var sel = vim.sel; - var head = actionArgs.head || cm.getCursor('head'); - var height = cm.listSelections().length; - if (insertAt == 'eol') { - head = Pos(head.line, lineLength(cm, head.line)); - } else if (insertAt == 'charAfter') { - head = offsetCursor(head, 0, 1); - } else if (insertAt == 'firstNonBlank') { - head = motions.moveToFirstNonWhiteSpaceCharacter(cm, head); - } else if (insertAt == 'startOfSelectedArea') { - if (!vim.visualBlock) { - if (sel.head.line < sel.anchor.line) { - head = sel.head; - } else { - head = Pos(sel.anchor.line, 0); - } - } else { - head = Pos( - Math.min(sel.head.line, sel.anchor.line), - Math.min(sel.head.ch, sel.anchor.ch)); - height = Math.abs(sel.head.line - sel.anchor.line) + 1; - } - } else if (insertAt == 'endOfSelectedArea') { - if (!vim.visualBlock) { - if (sel.head.line >= sel.anchor.line) { - head = offsetCursor(sel.head, 0, 1); - } else { - head = Pos(sel.anchor.line, 0); - } - } else { - head = Pos( - Math.min(sel.head.line, sel.anchor.line), - Math.max(sel.head.ch + 1, sel.anchor.ch)); - height = Math.abs(sel.head.line - sel.anchor.line) + 1; - } - } else if (insertAt == 'inplace') { - if (vim.visualMode){ - return; - } - } - cm.setOption('keyMap', 'vim-insert'); - cm.setOption('disableInput', false); - if (actionArgs && actionArgs.replace) { - cm.toggleOverwrite(true); - cm.setOption('keyMap', 'vim-replace'); - CodeMirror.signal(cm, "vim-mode-change", {mode: "replace"}); - } else { - cm.setOption('keyMap', 'vim-insert'); - CodeMirror.signal(cm, "vim-mode-change", {mode: "insert"}); - } - if (!vimGlobalState.macroModeState.isPlaying) { - cm.on('change', onChange); - CodeMirror.on(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown); - } - if (vim.visualMode) { - exitVisualMode(cm); - } - selectForInsert(cm, head, height); - }, - toggleVisualMode: function(cm, actionArgs, vim) { - var repeat = actionArgs.repeat; - var anchor = cm.getCursor(); - var head; - if (!vim.visualMode) { - vim.visualMode = true; - vim.visualLine = !!actionArgs.linewise; - vim.visualBlock = !!actionArgs.blockwise; - head = clipCursorToContent( - cm, Pos(anchor.line, anchor.ch + repeat - 1), - true /** includeLineBreak */); - vim.sel = { - anchor: anchor, - head: head - }; - CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: vim.visualLine ? "linewise" : vim.visualBlock ? "blockwise" : ""}); - updateCmSelection(cm); - updateMark(cm, vim, '<', cursorMin(anchor, head)); - updateMark(cm, vim, '>', cursorMax(anchor, head)); - } else if (vim.visualLine ^ actionArgs.linewise || - vim.visualBlock ^ actionArgs.blockwise) { - vim.visualLine = !!actionArgs.linewise; - vim.visualBlock = !!actionArgs.blockwise; - CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: vim.visualLine ? "linewise" : vim.visualBlock ? "blockwise" : ""}); - updateCmSelection(cm); - } else { - exitVisualMode(cm); - } - }, - reselectLastSelection: function(cm, _actionArgs, vim) { - var lastSelection = vim.lastSelection; - if (vim.visualMode) { - updateLastSelection(cm, vim); - } - if (lastSelection) { - var anchor = lastSelection.anchorMark.find(); - var head = lastSelection.headMark.find(); - if (!anchor || !head) { - return; - } - vim.sel = { - anchor: anchor, - head: head - }; - vim.visualMode = true; - vim.visualLine = lastSelection.visualLine; - vim.visualBlock = lastSelection.visualBlock; - updateCmSelection(cm); - updateMark(cm, vim, '<', cursorMin(anchor, head)); - updateMark(cm, vim, '>', cursorMax(anchor, head)); - CodeMirror.signal(cm, 'vim-mode-change', { - mode: 'visual', - subMode: vim.visualLine ? 'linewise' : - vim.visualBlock ? 'blockwise' : ''}); - } - }, - joinLines: function(cm, actionArgs, vim) { - var curStart, curEnd; - if (vim.visualMode) { - curStart = cm.getCursor('anchor'); - curEnd = cm.getCursor('head'); - curEnd.ch = lineLength(cm, curEnd.line) - 1; - } else { - var repeat = Math.max(actionArgs.repeat, 2); - curStart = cm.getCursor(); - curEnd = clipCursorToContent(cm, Pos(curStart.line + repeat - 1, - Infinity)); - } - var finalCh = 0; - for (var i = curStart.line; i < curEnd.line; i++) { - finalCh = lineLength(cm, curStart.line); - var tmp = Pos(curStart.line + 1, - lineLength(cm, curStart.line + 1)); - var text = cm.getRange(curStart, tmp); - text = text.replace(/\n\s*/g, ' '); - cm.replaceRange(text, curStart, tmp); - } - var curFinalPos = Pos(curStart.line, finalCh); - cm.setCursor(curFinalPos); - if (vim.visualMode) { - exitVisualMode(cm); - } - }, - newLineAndEnterInsertMode: function(cm, actionArgs, vim) { - vim.insertMode = true; - var insertAt = copyCursor(cm.getCursor()); - if (insertAt.line === cm.firstLine() && !actionArgs.after) { - cm.replaceRange('\n', Pos(cm.firstLine(), 0)); - cm.setCursor(cm.firstLine(), 0); - } else { - insertAt.line = (actionArgs.after) ? insertAt.line : - insertAt.line - 1; - insertAt.ch = lineLength(cm, insertAt.line); - cm.setCursor(insertAt); - var newlineFn = CodeMirror.commands.newlineAndIndentContinueComment || - CodeMirror.commands.newlineAndIndent; - newlineFn(cm); - } - this.enterInsertMode(cm, { repeat: actionArgs.repeat }, vim); - }, - paste: function(cm, actionArgs, vim) { - var cur = copyCursor(cm.getCursor()); - var register = vimGlobalState.registerController.getRegister( - actionArgs.registerName); - var text = register.toString(); - if (!text) { - return; - } - if (actionArgs.matchIndent) { - var tabSize = cm.getOption("tabSize"); - var whitespaceLength = function(str) { - var tabs = (str.split("\t").length - 1); - var spaces = (str.split(" ").length - 1); - return tabs * tabSize + spaces * 1; - }; - var currentLine = cm.getLine(cm.getCursor().line); - var indent = whitespaceLength(currentLine.match(/^\s*/)[0]); - var chompedText = text.replace(/\n$/, ''); - var wasChomped = text !== chompedText; - var firstIndent = whitespaceLength(text.match(/^\s*/)[0]); - var text = chompedText.replace(/^\s*/gm, function(wspace) { - var newIndent = indent + (whitespaceLength(wspace) - firstIndent); - if (newIndent < 0) { - return ""; - } - else if (cm.getOption("indentWithTabs")) { - var quotient = Math.floor(newIndent / tabSize); - return Array(quotient + 1).join('\t'); - } - else { - return Array(newIndent + 1).join(' '); - } - }); - text += wasChomped ? "\n" : ""; - } - if (actionArgs.repeat > 1) { - var text = Array(actionArgs.repeat + 1).join(text); - } - var linewise = register.linewise; - var blockwise = register.blockwise; - if (linewise) { - if(vim.visualMode) { - text = vim.visualLine ? text.slice(0, -1) : '\n' + text.slice(0, text.length - 1) + '\n'; - } else if (actionArgs.after) { - text = '\n' + text.slice(0, text.length - 1); - cur.ch = lineLength(cm, cur.line); - } else { - cur.ch = 0; - } - } else { - if (blockwise) { - text = text.split('\n'); - for (var i = 0; i < text.length; i++) { - text[i] = (text[i] == '') ? ' ' : text[i]; - } - } - cur.ch += actionArgs.after ? 1 : 0; - } - var curPosFinal; - var idx; - if (vim.visualMode) { - vim.lastPastedText = text; - var lastSelectionCurEnd; - var selectedArea = getSelectedAreaRange(cm, vim); - var selectionStart = selectedArea[0]; - var selectionEnd = selectedArea[1]; - var selectedText = cm.getSelection(); - var selections = cm.listSelections(); - var emptyStrings = new Array(selections.length).join('1').split('1'); - if (vim.lastSelection) { - lastSelectionCurEnd = vim.lastSelection.headMark.find(); - } - vimGlobalState.registerController.unnamedRegister.setText(selectedText); - if (blockwise) { - cm.replaceSelections(emptyStrings); - selectionEnd = Pos(selectionStart.line + text.length-1, selectionStart.ch); - cm.setCursor(selectionStart); - selectBlock(cm, selectionEnd); - cm.replaceSelections(text); - curPosFinal = selectionStart; - } else if (vim.visualBlock) { - cm.replaceSelections(emptyStrings); - cm.setCursor(selectionStart); - cm.replaceRange(text, selectionStart, selectionStart); - curPosFinal = selectionStart; - } else { - cm.replaceRange(text, selectionStart, selectionEnd); - curPosFinal = cm.posFromIndex(cm.indexFromPos(selectionStart) + text.length - 1); - } - if(lastSelectionCurEnd) { - vim.lastSelection.headMark = cm.setBookmark(lastSelectionCurEnd); - } - if (linewise) { - curPosFinal.ch=0; - } - } else { - if (blockwise) { - cm.setCursor(cur); - for (var i = 0; i < text.length; i++) { - var line = cur.line+i; - if (line > cm.lastLine()) { - cm.replaceRange('\n', Pos(line, 0)); - } - var lastCh = lineLength(cm, line); - if (lastCh < cur.ch) { - extendLineToColumn(cm, line, cur.ch); - } - } - cm.setCursor(cur); - selectBlock(cm, Pos(cur.line + text.length-1, cur.ch)); - cm.replaceSelections(text); - curPosFinal = cur; - } else { - cm.replaceRange(text, cur); - if (linewise && actionArgs.after) { - curPosFinal = Pos( - cur.line + 1, - findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line + 1))); - } else if (linewise && !actionArgs.after) { - curPosFinal = Pos( - cur.line, - findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line))); - } else if (!linewise && actionArgs.after) { - idx = cm.indexFromPos(cur); - curPosFinal = cm.posFromIndex(idx + text.length - 1); - } else { - idx = cm.indexFromPos(cur); - curPosFinal = cm.posFromIndex(idx + text.length); - } - } - } - if (vim.visualMode) { - exitVisualMode(cm); - } - cm.setCursor(curPosFinal); - }, - undo: function(cm, actionArgs) { - cm.operation(function() { - repeatFn(cm, CodeMirror.commands.undo, actionArgs.repeat)(); - cm.setCursor(cm.getCursor('anchor')); - }); - }, - redo: function(cm, actionArgs) { - repeatFn(cm, CodeMirror.commands.redo, actionArgs.repeat)(); - }, - setRegister: function(_cm, actionArgs, vim) { - vim.inputState.registerName = actionArgs.selectedCharacter; - }, - setMark: function(cm, actionArgs, vim) { - var markName = actionArgs.selectedCharacter; - updateMark(cm, vim, markName, cm.getCursor()); - }, - replace: function(cm, actionArgs, vim) { - var replaceWith = actionArgs.selectedCharacter; - var curStart = cm.getCursor(); - var replaceTo; - var curEnd; - var selections = cm.listSelections(); - if (vim.visualMode) { - curStart = cm.getCursor('start'); - curEnd = cm.getCursor('end'); - } else { - var line = cm.getLine(curStart.line); - replaceTo = curStart.ch + actionArgs.repeat; - if (replaceTo > line.length) { - replaceTo=line.length; - } - curEnd = Pos(curStart.line, replaceTo); - } - if (replaceWith=='\n') { - if (!vim.visualMode) cm.replaceRange('', curStart, curEnd); - (CodeMirror.commands.newlineAndIndentContinueComment || CodeMirror.commands.newlineAndIndent)(cm); - } else { - var replaceWithStr = cm.getRange(curStart, curEnd); - replaceWithStr = replaceWithStr.replace(/[^\n]/g, replaceWith); - if (vim.visualBlock) { - var spaces = new Array(cm.getOption("tabSize")+1).join(' '); - replaceWithStr = cm.getSelection(); - replaceWithStr = replaceWithStr.replace(/\t/g, spaces).replace(/[^\n]/g, replaceWith).split('\n'); - cm.replaceSelections(replaceWithStr); - } else { - cm.replaceRange(replaceWithStr, curStart, curEnd); - } - if (vim.visualMode) { - curStart = cursorIsBefore(selections[0].anchor, selections[0].head) ? - selections[0].anchor : selections[0].head; - cm.setCursor(curStart); - exitVisualMode(cm); - } else { - cm.setCursor(offsetCursor(curEnd, 0, -1)); - } - } - }, - incrementNumberToken: function(cm, actionArgs) { - var cur = cm.getCursor(); - var lineStr = cm.getLine(cur.line); - var re = /-?\d+/g; - var match; - var start; - var end; - var numberStr; - var token; - while ((match = re.exec(lineStr)) !== null) { - token = match[0]; - start = match.index; - end = start + token.length; - if (cur.ch < end)break; - } - if (!actionArgs.backtrack && (end <= cur.ch))return; - if (token) { - var increment = actionArgs.increase ? 1 : -1; - var number = parseInt(token) + (increment * actionArgs.repeat); - var from = Pos(cur.line, start); - var to = Pos(cur.line, end); - numberStr = number.toString(); - cm.replaceRange(numberStr, from, to); - } else { - return; - } - cm.setCursor(Pos(cur.line, start + numberStr.length - 1)); - }, - repeatLastEdit: function(cm, actionArgs, vim) { - var lastEditInputState = vim.lastEditInputState; - if (!lastEditInputState) { return; } - var repeat = actionArgs.repeat; - if (repeat && actionArgs.repeatIsExplicit) { - vim.lastEditInputState.repeatOverride = repeat; - } else { - repeat = vim.lastEditInputState.repeatOverride || repeat; - } - repeatLastEdit(cm, vim, repeat, false /** repeatForInsert */); - }, - exitInsertMode: exitInsertMode - }; - function clipCursorToContent(cm, cur, includeLineBreak) { - var line = Math.min(Math.max(cm.firstLine(), cur.line), cm.lastLine() ); - var maxCh = lineLength(cm, line) - 1; - maxCh = (includeLineBreak) ? maxCh + 1 : maxCh; - var ch = Math.min(Math.max(0, cur.ch), maxCh); - return Pos(line, ch); - } - function copyArgs(args) { - var ret = {}; - for (var prop in args) { - if (args.hasOwnProperty(prop)) { - ret[prop] = args[prop]; - } - } - return ret; - } - function offsetCursor(cur, offsetLine, offsetCh) { - if (typeof offsetLine === 'object') { - offsetCh = offsetLine.ch; - offsetLine = offsetLine.line; - } - return Pos(cur.line + offsetLine, cur.ch + offsetCh); - } - function getOffset(anchor, head) { - return { - line: head.line - anchor.line, - ch: head.line - anchor.line - }; - } - function commandMatches(keys, keyMap, context, inputState) { - var match, partial = [], full = []; - for (var i = 0; i < keyMap.length; i++) { - var command = keyMap[i]; - if (context == 'insert' && command.context != 'insert' || - command.context && command.context != context || - inputState.operator && command.type == 'action' || - !(match = commandMatch(keys, command.keys))) { continue; } - if (match == 'partial') { partial.push(command); } - if (match == 'full') { full.push(command); } - } - return { - partial: partial.length && partial, - full: full.length && full - }; - } - function commandMatch(pressed, mapped) { - if (mapped.slice(-11) == '') { - var prefixLen = mapped.length - 11; - var pressedPrefix = pressed.slice(0, prefixLen); - var mappedPrefix = mapped.slice(0, prefixLen); - return pressedPrefix == mappedPrefix && pressed.length > prefixLen ? 'full' : - mappedPrefix.indexOf(pressedPrefix) == 0 ? 'partial' : false; - } else { - return pressed == mapped ? 'full' : - mapped.indexOf(pressed) == 0 ? 'partial' : false; - } - } - function lastChar(keys) { - var match = /^.*(<[\w\-]+>)$/.exec(keys); - var selectedCharacter = match ? match[1] : keys.slice(-1); - if (selectedCharacter.length > 1){ - switch(selectedCharacter){ - case '': - selectedCharacter='\n'; - break; - case '': - selectedCharacter=' '; - break; - default: - break; - } - } - return selectedCharacter; - } - function repeatFn(cm, fn, repeat) { - return function() { - for (var i = 0; i < repeat; i++) { - fn(cm); - } - }; - } - function copyCursor(cur) { - return Pos(cur.line, cur.ch); - } - function cursorEqual(cur1, cur2) { - return cur1.ch == cur2.ch && cur1.line == cur2.line; - } - function cursorIsBefore(cur1, cur2) { - if (cur1.line < cur2.line) { - return true; - } - if (cur1.line == cur2.line && cur1.ch < cur2.ch) { - return true; - } - return false; - } - function cursorMin(cur1, cur2) { - if (arguments.length > 2) { - cur2 = cursorMin.apply(undefined, Array.prototype.slice.call(arguments, 1)); - } - return cursorIsBefore(cur1, cur2) ? cur1 : cur2; - } - function cursorMax(cur1, cur2) { - if (arguments.length > 2) { - cur2 = cursorMax.apply(undefined, Array.prototype.slice.call(arguments, 1)); - } - return cursorIsBefore(cur1, cur2) ? cur2 : cur1; - } - function cursorIsBetween(cur1, cur2, cur3) { - var cur1before2 = cursorIsBefore(cur1, cur2); - var cur2before3 = cursorIsBefore(cur2, cur3); - return cur1before2 && cur2before3; - } - function lineLength(cm, lineNum) { - return cm.getLine(lineNum).length; - } - function reverse(s){ - return s.split('').reverse().join(''); - } - function trim(s) { - if (s.trim) { - return s.trim(); - } - return s.replace(/^\s+|\s+$/g, ''); - } - function escapeRegex(s) { - return s.replace(/([.?*+$\[\]\/\\(){}|\-])/g, '\\$1'); - } - function extendLineToColumn(cm, lineNum, column) { - var endCh = lineLength(cm, lineNum); - var spaces = new Array(column-endCh+1).join(' '); - cm.setCursor(Pos(lineNum, endCh)); - cm.replaceRange(spaces, cm.getCursor()); - } - function selectBlock(cm, selectionEnd) { - var selections = [], ranges = cm.listSelections(); - var head = copyCursor(cm.clipPos(selectionEnd)); - var isClipped = !cursorEqual(selectionEnd, head); - var curHead = cm.getCursor('head'); - var primIndex = getIndex(ranges, curHead); - var wasClipped = cursorEqual(ranges[primIndex].head, ranges[primIndex].anchor); - var max = ranges.length - 1; - var index = max - primIndex > primIndex ? max : 0; - var base = ranges[index].anchor; - - var firstLine = Math.min(base.line, head.line); - var lastLine = Math.max(base.line, head.line); - var baseCh = base.ch, headCh = head.ch; - - var dir = ranges[index].head.ch - baseCh; - var newDir = headCh - baseCh; - if (dir > 0 && newDir <= 0) { - baseCh++; - if (!isClipped) { headCh--; } - } else if (dir < 0 && newDir >= 0) { - baseCh--; - if (!wasClipped) { headCh++; } - } else if (dir < 0 && newDir == -1) { - baseCh--; - headCh++; - } - for (var line = firstLine; line <= lastLine; line++) { - var range = {anchor: new Pos(line, baseCh), head: new Pos(line, headCh)}; - selections.push(range); - } - primIndex = head.line == lastLine ? selections.length - 1 : 0; - cm.setSelections(selections); - selectionEnd.ch = headCh; - base.ch = baseCh; - return base; - } - function selectForInsert(cm, head, height) { - var sel = []; - for (var i = 0; i < height; i++) { - var lineHead = offsetCursor(head, i, 0); - sel.push({anchor: lineHead, head: lineHead}); - } - cm.setSelections(sel, 0); - } - function getIndex(ranges, cursor, end) { - for (var i = 0; i < ranges.length; i++) { - var atAnchor = end != 'head' && cursorEqual(ranges[i].anchor, cursor); - var atHead = end != 'anchor' && cursorEqual(ranges[i].head, cursor); - if (atAnchor || atHead) { - return i; - } - } - return -1; - } - function getSelectedAreaRange(cm, vim) { - var lastSelection = vim.lastSelection; - var getCurrentSelectedAreaRange = function() { - var selections = cm.listSelections(); - var start = selections[0]; - var end = selections[selections.length-1]; - var selectionStart = cursorIsBefore(start.anchor, start.head) ? start.anchor : start.head; - var selectionEnd = cursorIsBefore(end.anchor, end.head) ? end.head : end.anchor; - return [selectionStart, selectionEnd]; - }; - var getLastSelectedAreaRange = function() { - var selectionStart = cm.getCursor(); - var selectionEnd = cm.getCursor(); - var block = lastSelection.visualBlock; - if (block) { - var width = block.width; - var height = block.height; - selectionEnd = Pos(selectionStart.line + height, selectionStart.ch + width); - var selections = []; - for (var i = selectionStart.line; i < selectionEnd.line; i++) { - var anchor = Pos(i, selectionStart.ch); - var head = Pos(i, selectionEnd.ch); - var range = {anchor: anchor, head: head}; - selections.push(range); - } - cm.setSelections(selections); - } else { - var start = lastSelection.anchorMark.find(); - var end = lastSelection.headMark.find(); - var line = end.line - start.line; - var ch = end.ch - start.ch; - selectionEnd = {line: selectionEnd.line + line, ch: line ? selectionEnd.ch : ch + selectionEnd.ch}; - if (lastSelection.visualLine) { - selectionStart = Pos(selectionStart.line, 0); - selectionEnd = Pos(selectionEnd.line, lineLength(cm, selectionEnd.line)); - } - cm.setSelection(selectionStart, selectionEnd); - } - return [selectionStart, selectionEnd]; - }; - if (!vim.visualMode) { - return getLastSelectedAreaRange(); - } else { - return getCurrentSelectedAreaRange(); - } - } - function updateLastSelection(cm, vim) { - var anchor = vim.sel.anchor; - var head = vim.sel.head; - if (vim.lastPastedText) { - head = cm.posFromIndex(cm.indexFromPos(anchor) + vim.lastPastedText.length); - vim.lastPastedText = null; - } - vim.lastSelection = {'anchorMark': cm.setBookmark(anchor), - 'headMark': cm.setBookmark(head), - 'anchor': copyCursor(anchor), - 'head': copyCursor(head), - 'visualMode': vim.visualMode, - 'visualLine': vim.visualLine, - 'visualBlock': vim.visualBlock}; - } - function expandSelection(cm, start, end) { - var sel = cm.state.vim.sel; - var head = sel.head; - var anchor = sel.anchor; - var tmp; - if (cursorIsBefore(end, start)) { - tmp = end; - end = start; - start = tmp; - } - if (cursorIsBefore(head, anchor)) { - head = cursorMin(start, head); - anchor = cursorMax(anchor, end); - } else { - anchor = cursorMin(start, anchor); - head = cursorMax(head, end); - head = offsetCursor(head, 0, -1); - if (head.ch == -1 && head.line != cm.firstLine()) { - head = Pos(head.line - 1, lineLength(cm, head.line - 1)); - } - } - return [anchor, head]; - } - function updateCmSelection(cm, sel, mode) { - var vim = cm.state.vim; - sel = sel || vim.sel; - var mode = mode || - vim.visualLine ? 'line' : vim.visualBlock ? 'block' : 'char'; - var cmSel = makeCmSelection(cm, sel, mode); - cm.setSelections(cmSel.ranges, cmSel.primary); - updateFakeCursor(cm); - } - function makeCmSelection(cm, sel, mode, exclusive) { - var head = copyCursor(sel.head); - var anchor = copyCursor(sel.anchor); - if (mode == 'char') { - var headOffset = !exclusive && !cursorIsBefore(sel.head, sel.anchor) ? 1 : 0; - var anchorOffset = cursorIsBefore(sel.head, sel.anchor) ? 1 : 0; - head = offsetCursor(sel.head, 0, headOffset); - anchor = offsetCursor(sel.anchor, 0, anchorOffset); - return { - ranges: [{anchor: anchor, head: head}], - primary: 0 - }; - } else if (mode == 'line') { - if (!cursorIsBefore(sel.head, sel.anchor)) { - anchor.ch = 0; - - var lastLine = cm.lastLine(); - if (head.line > lastLine) { - head.line = lastLine; - } - head.ch = lineLength(cm, head.line); - } else { - head.ch = 0; - anchor.ch = lineLength(cm, anchor.line); - } - return { - ranges: [{anchor: anchor, head: head}], - primary: 0 - }; - } else if (mode == 'block') { - var top = Math.min(anchor.line, head.line), - left = Math.min(anchor.ch, head.ch), - bottom = Math.max(anchor.line, head.line), - right = Math.max(anchor.ch, head.ch) + 1; - var height = bottom - top + 1; - var primary = head.line == top ? 0 : height - 1; - var ranges = []; - for (var i = 0; i < height; i++) { - ranges.push({ - anchor: Pos(top + i, left), - head: Pos(top + i, right) - }); - } - return { - ranges: ranges, - primary: primary - }; - } - } - function getHead(cm) { - var cur = cm.getCursor('head'); - if (cm.getSelection().length == 1) { - cur = cursorMin(cur, cm.getCursor('anchor')); - } - return cur; - } - function exitVisualMode(cm, moveHead) { - var vim = cm.state.vim; - if (moveHead !== false) { - cm.setCursor(clipCursorToContent(cm, vim.sel.head)); - } - updateLastSelection(cm, vim); - vim.visualMode = false; - vim.visualLine = false; - vim.visualBlock = false; - CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"}); - if (vim.fakeCursor) { - vim.fakeCursor.clear(); - } - } - function clipToLine(cm, curStart, curEnd) { - var selection = cm.getRange(curStart, curEnd); - if (/\n\s*$/.test(selection)) { - var lines = selection.split('\n'); - lines.pop(); - var line; - for (var line = lines.pop(); lines.length > 0 && line && isWhiteSpaceString(line); line = lines.pop()) { - curEnd.line--; - curEnd.ch = 0; - } - if (line) { - curEnd.line--; - curEnd.ch = lineLength(cm, curEnd.line); - } else { - curEnd.ch = 0; - } - } - } - function expandSelectionToLine(_cm, curStart, curEnd) { - curStart.ch = 0; - curEnd.ch = 0; - curEnd.line++; - } - - function findFirstNonWhiteSpaceCharacter(text) { - if (!text) { - return 0; - } - var firstNonWS = text.search(/\S/); - return firstNonWS == -1 ? text.length : firstNonWS; - } - - function expandWordUnderCursor(cm, inclusive, _forward, bigWord, noSymbol) { - var cur = getHead(cm); - var line = cm.getLine(cur.line); - var idx = cur.ch; - var textAfterIdx = line.substring(idx); - var firstMatchedChar; - if (noSymbol) { - firstMatchedChar = textAfterIdx.search(/\w/); - } else { - firstMatchedChar = textAfterIdx.search(/\S/); - } - if (firstMatchedChar == -1) { - return null; - } - idx += firstMatchedChar; - textAfterIdx = line.substring(idx); - var textBeforeIdx = line.substring(0, idx); - - var matchRegex; - if (bigWord) { - matchRegex = /^\S+/; - } else { - if ((/\w/).test(line.charAt(idx))) { - matchRegex = /^\w+/; - } else { - matchRegex = /^[^\w\s]+/; - } - } - - var wordAfterRegex = matchRegex.exec(textAfterIdx); - var wordStart = idx; - var wordEnd = idx + wordAfterRegex[0].length; - var revTextBeforeIdx = reverse(textBeforeIdx); - var wordBeforeRegex = matchRegex.exec(revTextBeforeIdx); - if (wordBeforeRegex) { - wordStart -= wordBeforeRegex[0].length; - } - - if (inclusive) { - var textAfterWordEnd = line.substring(wordEnd); - var whitespacesAfterWord = textAfterWordEnd.match(/^\s*/)[0].length; - if (whitespacesAfterWord > 0) { - wordEnd += whitespacesAfterWord; - } else { - var revTrim = revTextBeforeIdx.length - wordStart; - var textBeforeWordStart = revTextBeforeIdx.substring(revTrim); - var whitespacesBeforeWord = textBeforeWordStart.match(/^\s*/)[0].length; - wordStart -= whitespacesBeforeWord; - } - } - - return { start: Pos(cur.line, wordStart), - end: Pos(cur.line, wordEnd) }; - } - - function recordJumpPosition(cm, oldCur, newCur) { - if (!cursorEqual(oldCur, newCur)) { - vimGlobalState.jumpList.add(cm, oldCur, newCur); - } - } - - function recordLastCharacterSearch(increment, args) { - vimGlobalState.lastChararacterSearch.increment = increment; - vimGlobalState.lastChararacterSearch.forward = args.forward; - vimGlobalState.lastChararacterSearch.selectedCharacter = args.selectedCharacter; - } - - var symbolToMode = { - '(': 'bracket', ')': 'bracket', '{': 'bracket', '}': 'bracket', - '[': 'section', ']': 'section', - '*': 'comment', '/': 'comment', - 'm': 'method', 'M': 'method', - '#': 'preprocess' - }; - var findSymbolModes = { - bracket: { - isComplete: function(state) { - if (state.nextCh === state.symb) { - state.depth++; - if (state.depth >= 1)return true; - } else if (state.nextCh === state.reverseSymb) { - state.depth--; - } - return false; - } - }, - section: { - init: function(state) { - state.curMoveThrough = true; - state.symb = (state.forward ? ']' : '[') === state.symb ? '{' : '}'; - }, - isComplete: function(state) { - return state.index === 0 && state.nextCh === state.symb; - } - }, - comment: { - isComplete: function(state) { - var found = state.lastCh === '*' && state.nextCh === '/'; - state.lastCh = state.nextCh; - return found; - } - }, - method: { - init: function(state) { - state.symb = (state.symb === 'm' ? '{' : '}'); - state.reverseSymb = state.symb === '{' ? '}' : '{'; - }, - isComplete: function(state) { - if (state.nextCh === state.symb)return true; - return false; - } - }, - preprocess: { - init: function(state) { - state.index = 0; - }, - isComplete: function(state) { - if (state.nextCh === '#') { - var token = state.lineText.match(/#(\w+)/)[1]; - if (token === 'endif') { - if (state.forward && state.depth === 0) { - return true; - } - state.depth++; - } else if (token === 'if') { - if (!state.forward && state.depth === 0) { - return true; - } - state.depth--; - } - if (token === 'else' && state.depth === 0)return true; - } - return false; - } - } - }; - function findSymbol(cm, repeat, forward, symb) { - var cur = copyCursor(cm.getCursor()); - var increment = forward ? 1 : -1; - var endLine = forward ? cm.lineCount() : -1; - var curCh = cur.ch; - var line = cur.line; - var lineText = cm.getLine(line); - var state = { - lineText: lineText, - nextCh: lineText.charAt(curCh), - lastCh: null, - index: curCh, - symb: symb, - reverseSymb: (forward ? { ')': '(', '}': '{' } : { '(': ')', '{': '}' })[symb], - forward: forward, - depth: 0, - curMoveThrough: false - }; - var mode = symbolToMode[symb]; - if (!mode)return cur; - var init = findSymbolModes[mode].init; - var isComplete = findSymbolModes[mode].isComplete; - if (init) { init(state); } - while (line !== endLine && repeat) { - state.index += increment; - state.nextCh = state.lineText.charAt(state.index); - if (!state.nextCh) { - line += increment; - state.lineText = cm.getLine(line) || ''; - if (increment > 0) { - state.index = 0; - } else { - var lineLen = state.lineText.length; - state.index = (lineLen > 0) ? (lineLen-1) : 0; - } - state.nextCh = state.lineText.charAt(state.index); - } - if (isComplete(state)) { - cur.line = line; - cur.ch = state.index; - repeat--; - } - } - if (state.nextCh || state.curMoveThrough) { - return Pos(line, state.index); - } - return cur; - } - function findWord(cm, cur, forward, bigWord, emptyLineIsWord) { - var lineNum = cur.line; - var pos = cur.ch; - var line = cm.getLine(lineNum); - var dir = forward ? 1 : -1; - var regexps = bigWord ? bigWordRegexp : wordRegexp; - - if (emptyLineIsWord && line == '') { - lineNum += dir; - line = cm.getLine(lineNum); - if (!isLine(cm, lineNum)) { - return null; - } - pos = (forward) ? 0 : line.length; - } - - while (true) { - if (emptyLineIsWord && line == '') { - return { from: 0, to: 0, line: lineNum }; - } - var stop = (dir > 0) ? line.length : -1; - var wordStart = stop, wordEnd = stop; - while (pos != stop) { - var foundWord = false; - for (var i = 0; i < regexps.length && !foundWord; ++i) { - if (regexps[i].test(line.charAt(pos))) { - wordStart = pos; - while (pos != stop && regexps[i].test(line.charAt(pos))) { - pos += dir; - } - wordEnd = pos; - foundWord = wordStart != wordEnd; - if (wordStart == cur.ch && lineNum == cur.line && - wordEnd == wordStart + dir) { - continue; - } else { - return { - from: Math.min(wordStart, wordEnd + 1), - to: Math.max(wordStart, wordEnd), - line: lineNum }; - } - } - } - if (!foundWord) { - pos += dir; - } - } - lineNum += dir; - if (!isLine(cm, lineNum)) { - return null; - } - line = cm.getLine(lineNum); - pos = (dir > 0) ? 0 : line.length; - } - throw new Error('The impossible happened.'); - } - function moveToWord(cm, cur, repeat, forward, wordEnd, bigWord) { - var curStart = copyCursor(cur); - var words = []; - if (forward && !wordEnd || !forward && wordEnd) { - repeat++; - } - var emptyLineIsWord = !(forward && wordEnd); - for (var i = 0; i < repeat; i++) { - var word = findWord(cm, cur, forward, bigWord, emptyLineIsWord); - if (!word) { - var eodCh = lineLength(cm, cm.lastLine()); - words.push(forward - ? {line: cm.lastLine(), from: eodCh, to: eodCh} - : {line: 0, from: 0, to: 0}); - break; - } - words.push(word); - cur = Pos(word.line, forward ? (word.to - 1) : word.from); - } - var shortCircuit = words.length != repeat; - var firstWord = words[0]; - var lastWord = words.pop(); - if (forward && !wordEnd) { - if (!shortCircuit && (firstWord.from != curStart.ch || firstWord.line != curStart.line)) { - lastWord = words.pop(); - } - return Pos(lastWord.line, lastWord.from); - } else if (forward && wordEnd) { - return Pos(lastWord.line, lastWord.to - 1); - } else if (!forward && wordEnd) { - if (!shortCircuit && (firstWord.to != curStart.ch || firstWord.line != curStart.line)) { - lastWord = words.pop(); - } - return Pos(lastWord.line, lastWord.to); - } else { - return Pos(lastWord.line, lastWord.from); - } - } - - function moveToCharacter(cm, repeat, forward, character) { - var cur = cm.getCursor(); - var start = cur.ch; - var idx; - for (var i = 0; i < repeat; i ++) { - var line = cm.getLine(cur.line); - idx = charIdxInLine(start, line, character, forward, true); - if (idx == -1) { - return null; - } - start = idx; - } - return Pos(cm.getCursor().line, idx); - } - - function moveToColumn(cm, repeat) { - var line = cm.getCursor().line; - return clipCursorToContent(cm, Pos(line, repeat - 1)); - } - - function updateMark(cm, vim, markName, pos) { - if (!inArray(markName, validMarks)) { - return; - } - if (vim.marks[markName]) { - vim.marks[markName].clear(); - } - vim.marks[markName] = cm.setBookmark(pos); - } - - function charIdxInLine(start, line, character, forward, includeChar) { - var idx; - if (forward) { - idx = line.indexOf(character, start + 1); - if (idx != -1 && !includeChar) { - idx -= 1; - } - } else { - idx = line.lastIndexOf(character, start - 1); - if (idx != -1 && !includeChar) { - idx += 1; - } - } - return idx; - } - function selectCompanionObject(cm, head, symb, inclusive) { - var cur = head, start, end; - - var bracketRegexp = ({ - '(': /[()]/, ')': /[()]/, - '[': /[[\]]/, ']': /[[\]]/, - '{': /[{}]/, '}': /[{}]/})[symb]; - var openSym = ({ - '(': '(', ')': '(', - '[': '[', ']': '[', - '{': '{', '}': '{'})[symb]; - var curChar = cm.getLine(cur.line).charAt(cur.ch); - var offset = curChar === openSym ? 1 : 0; - - start = cm.scanForBracket(Pos(cur.line, cur.ch + offset), -1, null, {'bracketRegex': bracketRegexp}); - end = cm.scanForBracket(Pos(cur.line, cur.ch + offset), 1, null, {'bracketRegex': bracketRegexp}); - - if (!start || !end) { - return { start: cur, end: cur }; - } - - start = start.pos; - end = end.pos; - - if ((start.line == end.line && start.ch > end.ch) - || (start.line > end.line)) { - var tmp = start; - start = end; - end = tmp; - } - - if (inclusive) { - end.ch += 1; - } else { - start.ch += 1; - } - - return { start: start, end: end }; - } - function findBeginningAndEnd(cm, head, symb, inclusive) { - var cur = copyCursor(head); - var line = cm.getLine(cur.line); - var chars = line.split(''); - var start, end, i, len; - var firstIndex = chars.indexOf(symb); - if (cur.ch < firstIndex) { - cur.ch = firstIndex; - } - else if (firstIndex < cur.ch && chars[cur.ch] == symb) { - end = cur.ch; // assign end to the current cursor - --cur.ch; // make sure to look backwards - } - if (chars[cur.ch] == symb && !end) { - start = cur.ch + 1; // assign start to ahead of the cursor - } else { - for (i = cur.ch; i > -1 && !start; i--) { - if (chars[i] == symb) { - start = i + 1; - } - } - } - if (start && !end) { - for (i = start, len = chars.length; i < len && !end; i++) { - if (chars[i] == symb) { - end = i; - } - } - } - if (!start || !end) { - return { start: cur, end: cur }; - } - if (inclusive) { - --start; ++end; - } - - return { - start: Pos(cur.line, start), - end: Pos(cur.line, end) - }; - } - defineOption('pcre', true, 'boolean'); - function SearchState() {} - SearchState.prototype = { - getQuery: function() { - return vimGlobalState.query; - }, - setQuery: function(query) { - vimGlobalState.query = query; - }, - getOverlay: function() { - return this.searchOverlay; - }, - setOverlay: function(overlay) { - this.searchOverlay = overlay; - }, - isReversed: function() { - return vimGlobalState.isReversed; - }, - setReversed: function(reversed) { - vimGlobalState.isReversed = reversed; - } - }; - function getSearchState(cm) { - var vim = cm.state.vim; - return vim.searchState_ || (vim.searchState_ = new SearchState()); - } - function dialog(cm, template, shortText, onClose, options) { - if (cm.openDialog) { - cm.openDialog(template, onClose, { bottom: true, value: options.value, - onKeyDown: options.onKeyDown, onKeyUp: options.onKeyUp }); - } - else { - onClose(prompt(shortText, '')); - } - } - function splitBySlash(argString) { - var slashes = findUnescapedSlashes(argString) || []; - if (!slashes.length) return []; - var tokens = []; - if (slashes[0] !== 0) return; - for (var i = 0; i < slashes.length; i++) { - if (typeof slashes[i] == 'number') - tokens.push(argString.substring(slashes[i] + 1, slashes[i+1])); - } - return tokens; - } - - function findUnescapedSlashes(str) { - var escapeNextChar = false; - var slashes = []; - for (var i = 0; i < str.length; i++) { - var c = str.charAt(i); - if (!escapeNextChar && c == '/') { - slashes.push(i); - } - escapeNextChar = !escapeNextChar && (c == '\\'); - } - return slashes; - } - function translateRegex(str) { - var specials = '|(){'; - var unescape = '}'; - var escapeNextChar = false; - var out = []; - for (var i = -1; i < str.length; i++) { - var c = str.charAt(i) || ''; - var n = str.charAt(i+1) || ''; - var specialComesNext = (n && specials.indexOf(n) != -1); - if (escapeNextChar) { - if (c !== '\\' || !specialComesNext) { - out.push(c); - } - escapeNextChar = false; - } else { - if (c === '\\') { - escapeNextChar = true; - if (n && unescape.indexOf(n) != -1) { - specialComesNext = true; - } - if (!specialComesNext || n === '\\') { - out.push(c); - } - } else { - out.push(c); - if (specialComesNext && n !== '\\') { - out.push('\\'); - } - } - } - } - return out.join(''); - } - function translateRegexReplace(str) { - var escapeNextChar = false; - var out = []; - for (var i = -1; i < str.length; i++) { - var c = str.charAt(i) || ''; - var n = str.charAt(i+1) || ''; - if (escapeNextChar) { - out.push(c); - escapeNextChar = false; - } else { - if (c === '\\') { - escapeNextChar = true; - if ((isNumber(n) || n === '$')) { - out.push('$'); - } else if (n !== '/' && n !== '\\') { - out.push('\\'); - } - } else { - if (c === '$') { - out.push('$'); - } - out.push(c); - if (n === '/') { - out.push('\\'); - } - } - } - } - return out.join(''); - } - function unescapeRegexReplace(str) { - var stream = new CodeMirror.StringStream(str); - var output = []; - while (!stream.eol()) { - while (stream.peek() && stream.peek() != '\\') { - output.push(stream.next()); - } - if (stream.match('\\/', true)) { - output.push('/'); - } else if (stream.match('\\\\', true)) { - output.push('\\'); - } else { - output.push(stream.next()); - } - } - return output.join(''); - } - function parseQuery(query, ignoreCase, smartCase) { - var lastSearchRegister = vimGlobalState.registerController.getRegister('/'); - lastSearchRegister.setText(query); - if (query instanceof RegExp) { return query; } - var slashes = findUnescapedSlashes(query); - var regexPart; - var forceIgnoreCase; - if (!slashes.length) { - regexPart = query; - } else { - regexPart = query.substring(0, slashes[0]); - var flagsPart = query.substring(slashes[0]); - forceIgnoreCase = (flagsPart.indexOf('i') != -1); - } - if (!regexPart) { - return null; - } - if (!getOption('pcre')) { - regexPart = translateRegex(regexPart); - } - if (smartCase) { - ignoreCase = (/^[^A-Z]*$/).test(regexPart); - } - var regexp = new RegExp(regexPart, - (ignoreCase || forceIgnoreCase) ? 'i' : undefined); - return regexp; - } - function showConfirm(cm, text) { - if (cm.openNotification) { - cm.openNotification('' + text + '', - {bottom: true, duration: 5000}); - } else { - alert(text); - } - } - function makePrompt(prefix, desc) { - var raw = ''; - if (prefix) { - raw += '' + prefix + ''; - } - raw += ' ' + - ''; - if (desc) { - raw += ''; - raw += desc; - raw += ''; - } - return raw; - } - var searchPromptDesc = '(Javascript regexp)'; - function showPrompt(cm, options) { - var shortText = (options.prefix || '') + ' ' + (options.desc || ''); - var prompt = makePrompt(options.prefix, options.desc); - dialog(cm, prompt, shortText, options.onClose, options); - } - function regexEqual(r1, r2) { - if (r1 instanceof RegExp && r2 instanceof RegExp) { - var props = ['global', 'multiline', 'ignoreCase', 'source']; - for (var i = 0; i < props.length; i++) { - var prop = props[i]; - if (r1[prop] !== r2[prop]) { - return false; - } - } - return true; - } - return false; - } - function updateSearchQuery(cm, rawQuery, ignoreCase, smartCase) { - if (!rawQuery) { - return; - } - var state = getSearchState(cm); - var query = parseQuery(rawQuery, !!ignoreCase, !!smartCase); - if (!query) { - return; - } - highlightSearchMatches(cm, query); - if (regexEqual(query, state.getQuery())) { - return query; - } - state.setQuery(query); - return query; - } - function searchOverlay(query) { - if (query.source.charAt(0) == '^') { - var matchSol = true; - } - return { - token: function(stream) { - if (matchSol && !stream.sol()) { - stream.skipToEnd(); - return; - } - var match = stream.match(query, false); - if (match) { - if (match[0].length == 0) { - stream.next(); - return 'searching'; - } - if (!stream.sol()) { - stream.backUp(1); - if (!query.exec(stream.next() + match[0])) { - stream.next(); - return null; - } - } - stream.match(query); - return 'searching'; - } - while (!stream.eol()) { - stream.next(); - if (stream.match(query, false)) break; - } - }, - query: query - }; - } - function highlightSearchMatches(cm, query) { - var overlay = getSearchState(cm).getOverlay(); - if (!overlay || query != overlay.query) { - if (overlay) { - cm.removeOverlay(overlay); - } - overlay = searchOverlay(query); - cm.addOverlay(overlay); - getSearchState(cm).setOverlay(overlay); - } - } - function findNext(cm, prev, query, repeat) { - if (repeat === undefined) { repeat = 1; } - return cm.operation(function() { - var pos = cm.getCursor(); - var cursor = cm.getSearchCursor(query, pos); - for (var i = 0; i < repeat; i++) { - var found = cursor.find(prev); - if (i == 0 && found && cursorEqual(cursor.from(), pos)) { found = cursor.find(prev); } - if (!found) { - cursor = cm.getSearchCursor(query, - (prev) ? Pos(cm.lastLine()) : Pos(cm.firstLine(), 0) ); - if (!cursor.find(prev)) { - return; - } - } - } - return cursor.from(); - }); - } - function clearSearchHighlight(cm) { - cm.removeOverlay(getSearchState(cm).getOverlay()); - getSearchState(cm).setOverlay(null); - } - function isInRange(pos, start, end) { - if (typeof pos != 'number') { - pos = pos.line; - } - if (start instanceof Array) { - return inArray(pos, start); - } else { - if (end) { - return (pos >= start && pos <= end); - } else { - return pos == start; - } - } - } - function getUserVisibleLines(cm) { - var renderer = cm.ace.renderer; - return { - top: renderer.getFirstFullyVisibleRow(), - bottom: renderer.getLastFullyVisibleRow() - } - } - var defaultExCommandMap = [ - { name: 'map' }, - { name: 'imap', shortName: 'im' }, - { name: 'nmap', shortName: 'nm' }, - { name: 'vmap', shortName: 'vm' }, - { name: 'unmap' }, - { name: 'write', shortName: 'w' }, - { name: 'undo', shortName: 'u' }, - { name: 'redo', shortName: 'red' }, - { name: 'set', shortName: 'set' }, - { name: 'sort', shortName: 'sor' }, - { name: 'substitute', shortName: 's', possiblyAsync: true }, - { name: 'nohlsearch', shortName: 'noh' }, - { name: 'delmarks', shortName: 'delm' }, - { name: 'registers', shortName: 'reg', excludeFromCommandHistory: true }, - { name: 'global', shortName: 'g' } - ]; - var ExCommandDispatcher = function() { - this.buildCommandMap_(); - }; - ExCommandDispatcher.prototype = { - processCommand: function(cm, input, opt_params) { - var vim = cm.state.vim; - var commandHistoryRegister = vimGlobalState.registerController.getRegister(':'); - var previousCommand = commandHistoryRegister.toString(); - if (vim.visualMode) { - exitVisualMode(cm); - } - var inputStream = new CodeMirror.StringStream(input); - commandHistoryRegister.setText(input); - var params = opt_params || {}; - params.input = input; - try { - this.parseInput_(cm, inputStream, params); - } catch(e) { - showConfirm(cm, e); - throw e; - } - var command; - var commandName; - if (!params.commandName) { - if (params.line !== undefined) { - commandName = 'move'; - } - } else { - command = this.matchCommand_(params.commandName); - if (command) { - commandName = command.name; - if (command.excludeFromCommandHistory) { - commandHistoryRegister.setText(previousCommand); - } - this.parseCommandArgs_(inputStream, params, command); - if (command.type == 'exToKey') { - for (var i = 0; i < command.toKeys.length; i++) { - CodeMirror.Vim.handleKey(cm, command.toKeys[i], 'mapping'); - } - return; - } else if (command.type == 'exToEx') { - this.processCommand(cm, command.toInput); - return; - } - } - } - if (!commandName) { - showConfirm(cm, 'Not an editor command ":' + input + '"'); - return; - } - try { - exCommands[commandName](cm, params); - if ((!command || !command.possiblyAsync) && params.callback) { - params.callback(); - } - } catch(e) { - showConfirm(cm, e); - throw e; - } - }, - parseInput_: function(cm, inputStream, result) { - inputStream.eatWhile(':'); - if (inputStream.eat('%')) { - result.line = cm.firstLine(); - result.lineEnd = cm.lastLine(); - } else { - result.line = this.parseLineSpec_(cm, inputStream); - if (result.line !== undefined && inputStream.eat(',')) { - result.lineEnd = this.parseLineSpec_(cm, inputStream); - } - } - var commandMatch = inputStream.match(/^(\w+)/); - if (commandMatch) { - result.commandName = commandMatch[1]; - } else { - result.commandName = inputStream.match(/.*/)[0]; - } - - return result; - }, - parseLineSpec_: function(cm, inputStream) { - var numberMatch = inputStream.match(/^(\d+)/); - if (numberMatch) { - return parseInt(numberMatch[1], 10) - 1; - } - switch (inputStream.next()) { - case '.': - return cm.getCursor().line; - case '$': - return cm.lastLine(); - case '\'': - var mark = cm.state.vim.marks[inputStream.next()]; - if (mark && mark.find()) { - return mark.find().line; - } - throw new Error('Mark not set'); - default: - inputStream.backUp(1); - return undefined; - } - }, - parseCommandArgs_: function(inputStream, params, command) { - if (inputStream.eol()) { - return; - } - params.argString = inputStream.match(/.*/)[0]; - var delim = command.argDelimiter || /\s+/; - var args = trim(params.argString).split(delim); - if (args.length && args[0]) { - params.args = args; - } - }, - matchCommand_: function(commandName) { - for (var i = commandName.length; i > 0; i--) { - var prefix = commandName.substring(0, i); - if (this.commandMap_[prefix]) { - var command = this.commandMap_[prefix]; - if (command.name.indexOf(commandName) === 0) { - return command; - } - } - } - return null; - }, - buildCommandMap_: function() { - this.commandMap_ = {}; - for (var i = 0; i < defaultExCommandMap.length; i++) { - var command = defaultExCommandMap[i]; - var key = command.shortName || command.name; - this.commandMap_[key] = command; - } - }, - map: function(lhs, rhs, ctx) { - if (lhs != ':' && lhs.charAt(0) == ':') { - if (ctx) { throw Error('Mode not supported for ex mappings'); } - var commandName = lhs.substring(1); - if (rhs != ':' && rhs.charAt(0) == ':') { - this.commandMap_[commandName] = { - name: commandName, - type: 'exToEx', - toInput: rhs.substring(1), - user: true - }; - } else { - this.commandMap_[commandName] = { - name: commandName, - type: 'exToKey', - toKeys: rhs, - user: true - }; - } - } else { - if (rhs != ':' && rhs.charAt(0) == ':') { - var mapping = { - keys: lhs, - type: 'keyToEx', - exArgs: { input: rhs.substring(1) }, - user: true}; - if (ctx) { mapping.context = ctx; } - defaultKeymap.unshift(mapping); - } else { - var mapping = { - keys: lhs, - type: 'keyToKey', - toKeys: rhs, - user: true - }; - if (ctx) { mapping.context = ctx; } - defaultKeymap.unshift(mapping); - } - } - }, - unmap: function(lhs, ctx) { - if (lhs != ':' && lhs.charAt(0) == ':') { - if (ctx) { throw Error('Mode not supported for ex mappings'); } - var commandName = lhs.substring(1); - if (this.commandMap_[commandName] && this.commandMap_[commandName].user) { - delete this.commandMap_[commandName]; - return; - } - } else { - var keys = lhs; - for (var i = 0; i < defaultKeymap.length; i++) { - if (keys == defaultKeymap[i].keys - && defaultKeymap[i].context === ctx - && defaultKeymap[i].user) { - defaultKeymap.splice(i, 1); - return; - } - } - } - throw Error('No such mapping.'); - } - }; - - var exCommands = { - map: function(cm, params, ctx) { - var mapArgs = params.args; - if (!mapArgs || mapArgs.length < 2) { - if (cm) { - showConfirm(cm, 'Invalid mapping: ' + params.input); - } - return; - } - exCommandDispatcher.map(mapArgs[0], mapArgs[1], ctx); - }, - imap: function(cm, params) { this.map(cm, params, 'insert'); }, - nmap: function(cm, params) { this.map(cm, params, 'normal'); }, - vmap: function(cm, params) { this.map(cm, params, 'visual'); }, - unmap: function(cm, params, ctx) { - var mapArgs = params.args; - if (!mapArgs || mapArgs.length < 1) { - if (cm) { - showConfirm(cm, 'No such mapping: ' + params.input); - } - return; - } - exCommandDispatcher.unmap(mapArgs[0], ctx); - }, - move: function(cm, params) { - commandDispatcher.processCommand(cm, cm.state.vim, { - type: 'motion', - motion: 'moveToLineOrEdgeOfDocument', - motionArgs: { forward: false, explicitRepeat: true, - linewise: true }, - repeatOverride: params.line+1}); - }, - set: function(cm, params) { - var setArgs = params.args; - if (!setArgs || setArgs.length < 1) { - if (cm) { - showConfirm(cm, 'Invalid mapping: ' + params.input); - } - return; - } - var expr = setArgs[0].split('='); - var optionName = expr[0]; - var value = expr[1]; - var forceGet = false; - - if (optionName.charAt(optionName.length - 1) == '?') { - if (value) { throw Error('Trailing characters: ' + params.argString); } - optionName = optionName.substring(0, optionName.length - 1); - forceGet = true; - } - if (value === undefined && optionName.substring(0, 2) == 'no') { - optionName = optionName.substring(2); - value = false; - } - var optionIsBoolean = options[optionName] && options[optionName].type == 'boolean'; - if (optionIsBoolean && value == undefined) { - value = true; - } - if (!optionIsBoolean && !value || forceGet) { - var oldValue = getOption(optionName); - if (oldValue === true || oldValue === false) { - showConfirm(cm, ' ' + (oldValue ? '' : 'no') + optionName); - } else { - showConfirm(cm, ' ' + optionName + '=' + oldValue); - } - } else { - setOption(optionName, value, cm); - } - }, - registers: function(cm,params) { - var regArgs = params.args; - var registers = vimGlobalState.registerController.registers; - var regInfo = '----------Registers----------

'; - if (!regArgs) { - for (var registerName in registers) { - var text = registers[registerName].toString(); - if (text.length) { - regInfo += '"' + registerName + ' ' + text + '
'; - } - } - } else { - var registerName; - regArgs = regArgs.join(''); - for (var i = 0; i < regArgs.length; i++) { - registerName = regArgs.charAt(i); - if (!vimGlobalState.registerController.isValidRegister(registerName)) { - continue; - } - var register = registers[registerName] || new Register(); - regInfo += '"' + registerName + ' ' + register.toString() + '
'; - } - } - showConfirm(cm, regInfo); - }, - sort: function(cm, params) { - var reverse, ignoreCase, unique, number; - function parseArgs() { - if (params.argString) { - var args = new CodeMirror.StringStream(params.argString); - if (args.eat('!')) { reverse = true; } - if (args.eol()) { return; } - if (!args.eatSpace()) { return 'Invalid arguments'; } - var opts = args.match(/[a-z]+/); - if (opts) { - opts = opts[0]; - ignoreCase = opts.indexOf('i') != -1; - unique = opts.indexOf('u') != -1; - var decimal = opts.indexOf('d') != -1 && 1; - var hex = opts.indexOf('x') != -1 && 1; - var octal = opts.indexOf('o') != -1 && 1; - if (decimal + hex + octal > 1) { return 'Invalid arguments'; } - number = decimal && 'decimal' || hex && 'hex' || octal && 'octal'; - } - if (args.eatSpace() && args.match(/\/.*\//)) { 'patterns not supported'; } - } - } - var err = parseArgs(); - if (err) { - showConfirm(cm, err + ': ' + params.argString); - return; - } - var lineStart = params.line || cm.firstLine(); - var lineEnd = params.lineEnd || params.line || cm.lastLine(); - if (lineStart == lineEnd) { return; } - var curStart = Pos(lineStart, 0); - var curEnd = Pos(lineEnd, lineLength(cm, lineEnd)); - var text = cm.getRange(curStart, curEnd).split('\n'); - var numberRegex = (number == 'decimal') ? /(-?)([\d]+)/ : - (number == 'hex') ? /(-?)(?:0x)?([0-9a-f]+)/i : - (number == 'octal') ? /([0-7]+)/ : null; - var radix = (number == 'decimal') ? 10 : (number == 'hex') ? 16 : (number == 'octal') ? 8 : null; - var numPart = [], textPart = []; - if (number) { - for (var i = 0; i < text.length; i++) { - if (numberRegex.exec(text[i])) { - numPart.push(text[i]); - } else { - textPart.push(text[i]); - } - } - } else { - textPart = text; - } - function compareFn(a, b) { - if (reverse) { var tmp; tmp = a; a = b; b = tmp; } - if (ignoreCase) { a = a.toLowerCase(); b = b.toLowerCase(); } - var anum = number && numberRegex.exec(a); - var bnum = number && numberRegex.exec(b); - if (!anum) { return a < b ? -1 : 1; } - anum = parseInt((anum[1] + anum[2]).toLowerCase(), radix); - bnum = parseInt((bnum[1] + bnum[2]).toLowerCase(), radix); - return anum - bnum; - } - numPart.sort(compareFn); - textPart.sort(compareFn); - text = (!reverse) ? textPart.concat(numPart) : numPart.concat(textPart); - if (unique) { // Remove duplicate lines - var textOld = text; - var lastLine; - text = []; - for (var i = 0; i < textOld.length; i++) { - if (textOld[i] != lastLine) { - text.push(textOld[i]); - } - lastLine = textOld[i]; - } - } - cm.replaceRange(text.join('\n'), curStart, curEnd); - }, - global: function(cm, params) { - var argString = params.argString; - if (!argString) { - showConfirm(cm, 'Regular Expression missing from global'); - return; - } - var lineStart = (params.line !== undefined) ? params.line : cm.firstLine(); - var lineEnd = params.lineEnd || params.line || cm.lastLine(); - var tokens = splitBySlash(argString); - var regexPart = argString, cmd; - if (tokens.length) { - regexPart = tokens[0]; - cmd = tokens.slice(1, tokens.length).join('/'); - } - if (regexPart) { - try { - updateSearchQuery(cm, regexPart, true /** ignoreCase */, - true /** smartCase */); - } catch (e) { - showConfirm(cm, 'Invalid regex: ' + regexPart); - return; - } - } - var query = getSearchState(cm).getQuery(); - var matchedLines = [], content = ''; - for (var i = lineStart; i <= lineEnd; i++) { - var matched = query.test(cm.getLine(i)); - if (matched) { - matchedLines.push(i+1); - content+= cm.getLine(i) + '
'; - } - } - if (!cmd) { - showConfirm(cm, content); - return; - } - var index = 0; - var nextCommand = function() { - if (index < matchedLines.length) { - var command = matchedLines[index] + cmd; - exCommandDispatcher.processCommand(cm, command, { - callback: nextCommand - }); - } - index++; - }; - nextCommand(); - }, - substitute: function(cm, params) { - if (!cm.getSearchCursor) { - throw new Error('Search feature not available. Requires searchcursor.js or ' + - 'any other getSearchCursor implementation.'); - } - var argString = params.argString; - var tokens = argString ? splitBySlash(argString) : []; - var regexPart, replacePart = '', trailing, flagsPart, count; - var confirm = false; // Whether to confirm each replace. - var global = false; // True to replace all instances on a line, false to replace only 1. - if (tokens.length) { - regexPart = tokens[0]; - replacePart = tokens[1]; - if (replacePart !== undefined) { - if (getOption('pcre')) { - replacePart = unescapeRegexReplace(replacePart); - } else { - replacePart = translateRegexReplace(replacePart); - } - vimGlobalState.lastSubstituteReplacePart = replacePart; - } - trailing = tokens[2] ? tokens[2].split(' ') : []; - } else { - if (argString && argString.length) { - showConfirm(cm, 'Substitutions should be of the form ' + - ':s/pattern/replace/'); - return; - } - } - if (trailing) { - flagsPart = trailing[0]; - count = parseInt(trailing[1]); - if (flagsPart) { - if (flagsPart.indexOf('c') != -1) { - confirm = true; - flagsPart.replace('c', ''); - } - if (flagsPart.indexOf('g') != -1) { - global = true; - flagsPart.replace('g', ''); - } - regexPart = regexPart + '/' + flagsPart; - } - } - if (regexPart) { - try { - updateSearchQuery(cm, regexPart, true /** ignoreCase */, - true /** smartCase */); - } catch (e) { - showConfirm(cm, 'Invalid regex: ' + regexPart); - return; - } - } - replacePart = replacePart || vimGlobalState.lastSubstituteReplacePart; - if (replacePart === undefined) { - showConfirm(cm, 'No previous substitute regular expression'); - return; - } - var state = getSearchState(cm); - var query = state.getQuery(); - var lineStart = (params.line !== undefined) ? params.line : cm.getCursor().line; - var lineEnd = params.lineEnd || lineStart; - if (count) { - lineStart = lineEnd; - lineEnd = lineStart + count - 1; - } - var startPos = clipCursorToContent(cm, Pos(lineStart, 0)); - var cursor = cm.getSearchCursor(query, startPos); - doReplace(cm, confirm, global, lineStart, lineEnd, cursor, query, replacePart, params.callback); - }, - redo: CodeMirror.commands.redo, - undo: CodeMirror.commands.undo, - write: function(cm) { - if (CodeMirror.commands.save) { - CodeMirror.commands.save(cm); - } else { - cm.save(); - } - }, - nohlsearch: function(cm) { - clearSearchHighlight(cm); - }, - delmarks: function(cm, params) { - if (!params.argString || !trim(params.argString)) { - showConfirm(cm, 'Argument required'); - return; - } - - var state = cm.state.vim; - var stream = new CodeMirror.StringStream(trim(params.argString)); - while (!stream.eol()) { - stream.eatSpace(); - var count = stream.pos; - - if (!stream.match(/[a-zA-Z]/, false)) { - showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count)); - return; - } - - var sym = stream.next(); - if (stream.match('-', true)) { - if (!stream.match(/[a-zA-Z]/, false)) { - showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count)); - return; - } - - var startMark = sym; - var finishMark = stream.next(); - if (isLowerCase(startMark) && isLowerCase(finishMark) || - isUpperCase(startMark) && isUpperCase(finishMark)) { - var start = startMark.charCodeAt(0); - var finish = finishMark.charCodeAt(0); - if (start >= finish) { - showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count)); - return; - } - for (var j = 0; j <= finish - start; j++) { - var mark = String.fromCharCode(start + j); - delete state.marks[mark]; - } - } else { - showConfirm(cm, 'Invalid argument: ' + startMark + '-'); - return; - } - } else { - delete state.marks[sym]; - } - } - } - }; - - var exCommandDispatcher = new ExCommandDispatcher(); - function doReplace(cm, confirm, global, lineStart, lineEnd, searchCursor, query, - replaceWith, callback) { - cm.state.vim.exMode = true; - var done = false; - var lastPos = searchCursor.from(); - function replaceAll() { - cm.operation(function() { - while (!done) { - replace(); - next(); - } - stop(); - }); - } - function replace() { - var text = cm.getRange(searchCursor.from(), searchCursor.to()); - var newText = text.replace(query, replaceWith); - searchCursor.replace(newText); - } - function next() { - var found; - while(found = searchCursor.findNext() && - isInRange(searchCursor.from(), lineStart, lineEnd)) { - if (!global && lastPos && searchCursor.from().line == lastPos.line) { - continue; - } - cm.scrollIntoView(searchCursor.from(), 30); - cm.setSelection(searchCursor.from(), searchCursor.to()); - lastPos = searchCursor.from(); - done = false; - return; - } - done = true; - } - function stop(close) { - if (close) { close(); } - cm.focus(); - if (lastPos) { - cm.setCursor(lastPos); - var vim = cm.state.vim; - vim.exMode = false; - vim.lastHPos = vim.lastHSPos = lastPos.ch; - } - if (callback) { callback(); } - } - function onPromptKeyDown(e, _value, close) { - CodeMirror.e_stop(e); - var keyName = CodeMirror.keyName(e); - switch (keyName) { - case 'Y': - replace(); next(); break; - case 'N': - next(); break; - case 'A': - var savedCallback = callback; - callback = undefined; - cm.operation(replaceAll); - callback = savedCallback; - break; - case 'L': - replace(); - case 'Q': - case 'Esc': - case 'Ctrl-C': - case 'Ctrl-[': - stop(close); - break; - } - if (done) { stop(close); } - return true; - } - next(); - if (done) { - showConfirm(cm, 'No matches for ' + query.source); - return; - } - if (!confirm) { - replaceAll(); - if (callback) { callback(); }; - return; - } - showPrompt(cm, { - prefix: 'replace with ' + replaceWith + ' (y/n/a/q/l)', - onKeyDown: onPromptKeyDown - }); - } - - CodeMirror.keyMap.vim = { - attach: attachVimMap, - detach: detachVimMap - }; - - function exitInsertMode(cm) { - var vim = cm.state.vim; - var macroModeState = vimGlobalState.macroModeState; - var insertModeChangeRegister = vimGlobalState.registerController.getRegister('.'); - var isPlaying = macroModeState.isPlaying; - var lastChange = macroModeState.lastInsertModeChanges; - var text = []; - if (!isPlaying) { - var selLength = lastChange.inVisualBlock ? vim.lastSelection.visualBlock.height : 1; - var changes = lastChange.changes; - var text = []; - var i = 0; - while (i < changes.length) { - text.push(changes[i]); - if (changes[i] instanceof InsertModeKey) { - i++; - } else { - i+= selLength; - } - } - lastChange.changes = text; - cm.off('change', onChange); - CodeMirror.off(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown); - } - if (!isPlaying && vim.insertModeRepeat > 1) { - repeatLastEdit(cm, vim, vim.insertModeRepeat - 1, - true /** repeatForInsert */); - vim.lastEditInputState.repeatOverride = vim.insertModeRepeat; - } - delete vim.insertModeRepeat; - vim.insertMode = false; - cm.setCursor(cm.getCursor().line, cm.getCursor().ch-1); - cm.setOption('keyMap', 'vim'); - cm.setOption('disableInput', true); - cm.toggleOverwrite(false); // exit replace mode if we were in it. - insertModeChangeRegister.setText(lastChange.changes.join('')); - CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"}); - if (macroModeState.isRecording) { - logInsertModeChange(macroModeState); - } - } - defineOption('insertModeEscKeysTimeout', 200, 'number'); - - CodeMirror.keyMap['vim-insert'] = { - 'Ctrl-N': 'autocomplete', - 'Ctrl-P': 'autocomplete', - 'Enter': function(cm) { - var fn = CodeMirror.commands.newlineAndIndentContinueComment || - CodeMirror.commands.newlineAndIndent; - fn(cm); - }, - fallthrough: ['default'], - attach: attachVimMap, - detach: detachVimMap - }; - - CodeMirror.keyMap['await-second'] = { - fallthrough: ['vim-insert'], - attach: attachVimMap, - detach: detachVimMap - }; - - CodeMirror.keyMap['vim-replace'] = { - 'Backspace': 'goCharLeft', - fallthrough: ['vim-insert'], - attach: attachVimMap, - detach: detachVimMap - }; - - function executeMacroRegister(cm, vim, macroModeState, registerName) { - var register = vimGlobalState.registerController.getRegister(registerName); - var keyBuffer = register.keyBuffer; - var imc = 0; - macroModeState.isPlaying = true; - macroModeState.replaySearchQueries = register.searchQueries.slice(0); - for (var i = 0; i < keyBuffer.length; i++) { - var text = keyBuffer[i]; - var match, key; - while (text) { - match = (/<\w+-.+?>|<\w+>|./).exec(text); - key = match[0]; - text = text.substring(match.index + key.length); - CodeMirror.Vim.handleKey(cm, key, 'macro'); - if (vim.insertMode) { - var changes = register.insertModeChanges[imc++].changes; - vimGlobalState.macroModeState.lastInsertModeChanges.changes = - changes; - repeatInsertModeChanges(cm, changes, 1); - exitInsertMode(cm); - } - } - }; - macroModeState.isPlaying = false; - } - - function logKey(macroModeState, key) { - if (macroModeState.isPlaying) { return; } - var registerName = macroModeState.latestRegister; - var register = vimGlobalState.registerController.getRegister(registerName); - if (register) { - register.pushText(key); - } - } - - function logInsertModeChange(macroModeState) { - if (macroModeState.isPlaying) { return; } - var registerName = macroModeState.latestRegister; - var register = vimGlobalState.registerController.getRegister(registerName); - if (register) { - register.pushInsertModeChanges(macroModeState.lastInsertModeChanges); - } - } - - function logSearchQuery(macroModeState, query) { - if (macroModeState.isPlaying) { return; } - var registerName = macroModeState.latestRegister; - var register = vimGlobalState.registerController.getRegister(registerName); - if (register) { - register.pushSearchQuery(query); - } - } - function onChange(_cm, changeObj) { - var macroModeState = vimGlobalState.macroModeState; - var lastChange = macroModeState.lastInsertModeChanges; - if (!macroModeState.isPlaying) { - while(changeObj) { - lastChange.expectCursorActivityForChange = true; - if (changeObj.origin == '+input' || changeObj.origin == 'paste' - || changeObj.origin === undefined /* only in testing */) { - var text = changeObj.text.join('\n'); - lastChange.changes.push(text); - } - changeObj = changeObj.next; - } - } - } - function onCursorActivity(cm) { - var vim = cm.state.vim; - if (vim.insertMode) { - var macroModeState = vimGlobalState.macroModeState; - if (macroModeState.isPlaying) { return; } - var lastChange = macroModeState.lastInsertModeChanges; - if (lastChange.expectCursorActivityForChange) { - lastChange.expectCursorActivityForChange = false; - } else { - lastChange.changes = []; - } - } else if (!cm.curOp.isVimOp) { - handleExternalSelection(cm, vim); - } - if (vim.visualMode) { - updateFakeCursor(cm); - } - } - function updateFakeCursor(cm) { - var vim = cm.state.vim; - var from = copyCursor(vim.sel.head); - var to = offsetCursor(from, 0, 1); - if (vim.fakeCursor) { - vim.fakeCursor.clear(); - } - vim.fakeCursor = cm.markText(from, to, {className: 'cm-animate-fat-cursor'}); - } - function handleExternalSelection(cm, vim) { - var anchor = cm.getCursor('anchor'); - var head = cm.getCursor('head'); - if (vim.visualMode && cursorEqual(head, anchor) && lineLength(cm, head.line) > head.ch) { - exitVisualMode(cm, false); - } else if (!vim.visualMode && !vim.insertMode && cm.somethingSelected()) { - vim.visualMode = true; - vim.visualLine = false; - CodeMirror.signal(cm, "vim-mode-change", {mode: "visual"}); - } - if (vim.visualMode) { - var headOffset = !cursorIsBefore(head, anchor) ? -1 : 0; - var anchorOffset = cursorIsBefore(head, anchor) ? -1 : 0; - head = offsetCursor(head, 0, headOffset); - anchor = offsetCursor(anchor, 0, anchorOffset); - vim.sel = { - anchor: anchor, - head: head - }; - updateMark(cm, vim, '<', cursorMin(head, anchor)); - updateMark(cm, vim, '>', cursorMax(head, anchor)); - } else if (!vim.insertMode) { - vim.lastHPos = cm.getCursor().ch; - } - } - function InsertModeKey(keyName) { - this.keyName = keyName; - } - function onKeyEventTargetKeyDown(e) { - var macroModeState = vimGlobalState.macroModeState; - var lastChange = macroModeState.lastInsertModeChanges; - var keyName = CodeMirror.keyName(e); - function onKeyFound() { - lastChange.changes.push(new InsertModeKey(keyName)); - return true; - } - if (keyName.indexOf('Delete') != -1 || keyName.indexOf('Backspace') != -1) { - CodeMirror.lookupKey(keyName, 'vim-insert', onKeyFound); - } - } - function repeatLastEdit(cm, vim, repeat, repeatForInsert) { - var macroModeState = vimGlobalState.macroModeState; - macroModeState.isPlaying = true; - var isAction = !!vim.lastEditActionCommand; - var cachedInputState = vim.inputState; - function repeatCommand() { - if (isAction) { - commandDispatcher.processAction(cm, vim, vim.lastEditActionCommand); - } else { - commandDispatcher.evalInput(cm, vim); - } - } - function repeatInsert(repeat) { - if (macroModeState.lastInsertModeChanges.changes.length > 0) { - repeat = !vim.lastEditActionCommand ? 1 : repeat; - var changeObject = macroModeState.lastInsertModeChanges; - repeatInsertModeChanges(cm, changeObject.changes, repeat); - } - } - vim.inputState = vim.lastEditInputState; - if (isAction && vim.lastEditActionCommand.interlaceInsertRepeat) { - for (var i = 0; i < repeat; i++) { - repeatCommand(); - repeatInsert(1); - } - } else { - if (!repeatForInsert) { - repeatCommand(); - } - repeatInsert(repeat); - } - vim.inputState = cachedInputState; - if (vim.insertMode && !repeatForInsert) { - exitInsertMode(cm); - } - macroModeState.isPlaying = false; - }; - - function repeatInsertModeChanges(cm, changes, repeat) { - function keyHandler(binding) { - if (typeof binding == 'string') { - CodeMirror.commands[binding](cm); - } else { - binding(cm); - } - return true; - } - var head = cm.getCursor('head'); - var inVisualBlock = vimGlobalState.macroModeState.lastInsertModeChanges.inVisualBlock; - if (inVisualBlock) { - var vim = cm.state.vim; - var lastSel = vim.lastSelection; - var offset = getOffset(lastSel.anchor, lastSel.head); - selectForInsert(cm, head, offset.line + 1); - repeat = cm.listSelections().length; - cm.setCursor(head); - } - for (var i = 0; i < repeat; i++) { - if (inVisualBlock) { - cm.setCursor(offsetCursor(head, i, 0)); - } - for (var j = 0; j < changes.length; j++) { - var change = changes[j]; - if (change instanceof InsertModeKey) { - CodeMirror.lookupKey(change.keyName, 'vim-insert', keyHandler); - } else { - var cur = cm.getCursor(); - cm.replaceRange(change, cur, cur); - } - } - } - if (inVisualBlock) { - cm.setCursor(offsetCursor(head, 0, 1)); - } - } - - resetVimGlobalState(); - CodeMirror.Vim = Vim(); - - Vim = CodeMirror.Vim; - - specialKey = {'return':'CR',backspace:'BS','delete':'Del',esc:'Esc', - left:'Left',right:'Right',up:'Up',down:'Down',space: 'Space', - home:'Home',end:'End',pageup:'PageUp',pagedown:'PageDown', enter: 'CR' - }; - function lookupKey(hashId, key, e) { - if (key.length > 1 && key[0] == "n") { - key = key.replace("numpad", ""); - } - key = specialKey[key] || key; - var name = ''; - if (e.ctrlKey) { name += 'C-'; } - if (e.altKey) { name += 'A-'; } - if (e.shiftKey) { name += 'S-'; } - - name += key; - if (name.length > 1) { name = '<' + name + '>'; } - return name; - } - var handleKey = Vim.handleKey - Vim.handleKey = function(cm, key, origin) { - return cm.operation(function() { - return handleKey(cm, key, origin); - }, true); - } - function cloneVimState(state) { - var n = new state.constructor(); - Object.keys(state).forEach(function(key) { - var o = state[key]; - if (Array.isArray(o)) - o = o.slice(); - else if (o && typeof o == "object" && o.constructor != Object) - o = cloneVimState(o); - n[key] = o; - }); - if (state.sel) { - n.sel = { - head: state.sel.head && copyCursor(state.sel.head), - anchor: state.sel.anchor && copyCursor(state.sel.anchor) - }; - } - return n; - } - function multiSelectHandleKey(cm, key, origin) { - var isHandled = false; - var vim = Vim.maybeInitVimState_(cm); - var visualBlock = vim.visualBlock || vim.wasInVisualBlock; - if (vim.wasInVisualBlock && !cm.ace.inMultiSelectMode) { - vim.wasInVisualBlock = false; - } else if (cm.ace.inMultiSelectMode && vim.visualBlock) { - vim.wasInVisualBlock = true; - } - - if (key == '' && !vim.insertMode && !vim.visualMode && cm.ace.inMultiSelectMode) { - cm.ace.exitMultiSelectMode(); - } else if (visualBlock || !cm.ace.inMultiSelectMode || cm.ace.inVirtualSelectionMode) { - isHandled = Vim.handleKey(cm, key, origin); - } else { - var old = cloneVimState(vim); - cm.operation(function() { - cm.ace.forEachSelection(function() { - var sel = cm.ace.selection; - cm.state.vim.lastHPos = sel.$desiredColumn == null ? sel.lead.column : sel.$desiredColumn; - var head = cm.getCursor("head"); - var anchor = cm.getCursor("anchor"); - var headOffset = !cursorIsBefore(head, anchor) ? -1 : 0; - var anchorOffset = cursorIsBefore(head, anchor) ? -1 : 0; - head = offsetCursor(head, 0, headOffset); - anchor = offsetCursor(anchor, 0, anchorOffset); - cm.state.vim.sel.head = head; - cm.state.vim.sel.anchor = anchor; - - isHandled = handleKey(cm, key, origin); - sel.$desiredColumn = cm.state.vim.lastHPos == -1 ? null : cm.state.vim.lastHPos; - if (cm.virtualSelectionMode()) { - cm.state.vim = cloneVimState(old); - } - }); - if (cm.curOp.cursorActivity && !isHandled) - cm.curOp.cursorActivity = false; - }, true); - } - return isHandled; - }; - exports.CodeMirror = CodeMirror; - var getVim = Vim.maybeInitVimState_; - exports.handler = { - $id: "ace/keyboard/vim", - drawCursor: function(style, pixelPos, config, sel, session) { - var vim = this.state.vim || {}; - var w = config.characterWidth; - var h = config.lineHeight; - var top = pixelPos.top; - var left = pixelPos.left; - if (!vim.insertMode) { - var isbackwards = !sel.cursor - ? session.selection.isBackwards() || session.selection.isEmpty() - : Range.comparePoints(sel.cursor, sel.start) <= 0 - if (!isbackwards && left > w) - left -= w - } - if (!vim.insertMode && vim.status) { - h = h / 2; - top += h; - } - style.left = left + "px"; - style.top = top + "px"; - style.width = w + "px"; - style.height = h + "px"; - }, - handleKeyboard: function(data, hashId, key, keyCode, e) { - var editor = data.editor; - var cm = editor.state.cm; - var vim = getVim(cm); - if (keyCode == -1) return; - - if (key == "c" && hashId == 1) { // key == "ctrl-c" - if (!useragent.isMac && editor.getCopyText()) { - editor.once("copy", function() { - editor.selection.clearSelection(); - }); - return {command: "null", passEvent: true}; - } - return {command: coreCommands.stop}; - } else if (!vim.insertMode) { - if (useragent.isMac && this.handleMacRepeat(data, hashId, key)) { - hashId = -1; - key = data.inputChar; - } - } - - if (hashId == -1 || hashId & 1 || hashId === 0 && key.length > 1) { - var insertMode = vim.insertMode; - var name = lookupKey(hashId, key, e || {}); - if (vim.status == null) - vim.status = ""; - var isHandled = multiSelectHandleKey(cm, name, 'user'); - vim = getVim(cm); // may be changed by multiSelectHandleKey - if (isHandled && vim.status != null) - vim.status += name; - else if (vim.status == null) - vim.status = ""; - cm._signal("changeStatus"); - if (!isHandled && (hashId != -1 || insertMode)) - return; - return {command: "null", passEvent: !isHandled}; - } - }, - attach: function(editor) { - if (!editor.state) editor.state = {}; - var cm = new CodeMirror(editor); - editor.state.cm = cm; - editor.$vimModeHandler = this; - CodeMirror.keyMap.vim.attach(cm); - getVim(cm).status = null; - cm.on('vim-command-done', function() { - if (cm.virtualSelectionMode()) return; - getVim(cm).status = null; - cm.ace._signal("changeStatus"); - cm.ace.session.markUndoGroup(); - }); - cm.on("changeStatus", function() { - cm.ace.renderer.updateCursor(); - cm.ace._signal("changeStatus"); - }); - cm.on("vim-mode-change", function() { - if (cm.virtualSelectionMode()) return; - cm.ace.renderer.setStyle("normal-mode", !getVim(cm).insertMode); - cm._signal("changeStatus"); - }); - cm.ace.renderer.setStyle("normal-mode", !getVim(cm).insertMode); - editor.renderer.$cursorLayer.drawCursor = this.drawCursor.bind(cm); - this.updateMacCompositionHandlers(editor, true); - }, - detach: function(editor) { - var cm = editor.state.cm; - CodeMirror.keyMap.vim.detach(cm); - cm.destroy(); - editor.state.cm = null; - editor.$vimModeHandler = null; - editor.renderer.$cursorLayer.drawCursor = null; - editor.renderer.setStyle("normal-mode", false); - this.updateMacCompositionHandlers(editor, false); - }, - getStatusText: function(editor) { - var cm = editor.state.cm; - var vim = getVim(cm); - if (vim.insertMode) - return "INSERT"; - var status = ""; - if (vim.visualMode) { - status += "VISUAL"; - if (vim.visualLine) - status += " LINE"; - if (vim.visualBlock) - status += " BLOCK"; - } - if (vim.status) - status += (status ? " " : "") + vim.status; - return status; - }, - handleMacRepeat: function(data, hashId, key) { - if (hashId == -1) { - data.inputChar = key; - data.lastEvent = "input"; - } else if (data.inputChar && data.$lastHash == hashId && data.$lastKey == key) { - if (data.lastEvent == "input") { - data.lastEvent = "input1"; - } else if (data.lastEvent == "input1") { - return true; - } - } else { - data.$lastHash = hashId; - data.$lastKey = key; - data.lastEvent = "keypress"; - } - }, - updateMacCompositionHandlers: function(editor, enable) { - var onCompositionUpdateOverride = function(text) { - var cm = editor.state.cm; - var vim = getVim(cm); - if (!vim.insertMode) { - var el = this.textInput.getElement(); - el.blur(); - el.focus(); - el.value = text; - } else { - this.onCompositionUpdateOrig(text); - } - }; - var onCompositionStartOverride = function(text) { - var cm = editor.state.cm; - var vim = getVim(cm); - if (!vim.insertMode) { - this.onCompositionStartOrig(text); - } - }; - if (enable) { - if (!editor.onCompositionUpdateOrig) { - editor.onCompositionUpdateOrig = editor.onCompositionUpdate; - editor.onCompositionUpdate = onCompositionUpdateOverride; - editor.onCompositionStartOrig = editor.onCompositionStart; - editor.onCompositionStart = onCompositionStartOverride; - } - } else { - if (editor.onCompositionUpdateOrig) { - editor.onCompositionUpdate = editor.onCompositionUpdateOrig; - editor.onCompositionUpdateOrig = null; - editor.onCompositionStart = editor.onCompositionStartOrig; - editor.onCompositionStartOrig = null; - } - } - } - } - var renderVirtualNumbers = { - getText: function(session, row) { - return (Math.abs(session.selection.lead.row - row) || (row + 1 + (row < 9? "\xb7" : "" ))) + "" - }, - getWidth: function(session, lastLineNumber, config) { - return session.getLength().toString().length * config.characterWidth; - }, - update: function(e, editor) { - editor.renderer.$loop.schedule(editor.renderer.CHANGE_GUTTER) - }, - attach: function(editor) { - editor.renderer.$gutterLayer.$renderer = this; - editor.on("changeSelection", this.update); - }, - detach: function(editor) { - editor.renderer.$gutterLayer.$renderer = null; - editor.off("changeSelection", this.update); - } - }; - Vim.defineOption({ - name: "wrap", - set: function(value, cm) { - if (cm) {cm.ace.setOption("wrap", value)} - }, - type: "boolean" - }, false); - defaultKeymap.push( - { keys: 'zc', type: 'action', action: 'fold', actionArgs: { open: false } }, - { keys: 'zC', type: 'action', action: 'fold', actionArgs: { open: false, all: true } }, - { keys: 'zo', type: 'action', action: 'fold', actionArgs: { open: true, } }, - { keys: 'zO', type: 'action', action: 'fold', actionArgs: { open: true, all: true } }, - { keys: 'za', type: 'action', action: 'fold', actionArgs: { toggle: true } }, - { keys: 'zA', type: 'action', action: 'fold', actionArgs: { toggle: true, all: true } }, - { keys: 'zf', type: 'action', action: 'fold', actionArgs: { open: true, all: true } }, - { keys: 'zd', type: 'action', action: 'fold', actionArgs: { open: true, all: true } }, - - { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorAbove" } }, - { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorBelow" } }, - { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorAboveSkipCurrent" } }, - { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorBelowSkipCurrent" } }, - { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "selectMoreBefore" } }, - { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "selectMoreAfter" } }, - { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "selectNextBefore" } }, - { keys: '', type: 'action', action: 'aceCommand', actionArgs: { name: "selectNextAfter" } } - ); - actions.aceCommand = function(cm, actionArgs, vim) { - cm.vimCmd = actionArgs; - if (cm.ace.inVirtualSelectionMode) - cm.ace.on("beforeEndOperation", delayedExecAceCommand); - else - delayedExecAceCommand(null, cm.ace) - }; - function delayedExecAceCommand(op, ace) { - ace.off("beforeEndOperation", delayedExecAceCommand); - var cmd = ace.state.cm.vimCmd; - if (cmd) { - ace.execCommand(cmd.exec ? cmd : cmd.name, cmd.args); - } - ace.curOp = ace.prevOp; - } - actions.fold = function(cm, actionArgs, vim) { - cm.ace.execCommand(['toggleFoldWidget', 'toggleFoldWidget', 'foldOther', 'unfoldall' - ][(actionArgs.all ? 2 : 0) + (actionArgs.open ? 1 : 0)]); - }, - - exports.handler.defaultKeymap = defaultKeymap; - - Vim.map("Y", "yy"); -}); +define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/multi_select"],function(e,t,n){"use strict";function r(e){return{row:e.line,column:e.ch}}function o(e){return new Ct(e.row,e.column)}function i(e){var t=e.keyCode;if(kt.indexOf(t)==-1){var n=e.ctrlKey||e.metaKey,r=gt.keyNames[t];r=wt[r]||r;var o="";if(e.ctrlKey&&(o+="C-"),e.altKey&&(o+="A-"),!(Mt&&e.metaKey||!n&&e.shiftKey&&r.length<2))return e.shiftKey&&!/^[A-Za-z]$/.test(r)&&(o+="S-"),1==r.length&&(r=r.toLowerCase()),o+=r,o.length>1&&(o="<"+o+">"),o}}function a(e,t){var n=i(t);n&&(gt.signal(e,"vim-keypress",n),gt.Vim.handleKey(e,n,"user")&>.e_stop(t))}function s(e,t){var n=t.charCode||t.keyCode;if(!(t.ctrlKey||t.metaKey||t.altKey||t.shiftKey&&n<32)){var r=String.fromCharCode(n);gt.signal(e,"vim-keypress",r),gt.Vim.handleKey(e,r,"user")&>.e_stop(t)}}function c(e){e.setOption("disableInput",!0),e.setOption("showCursorWhenSelecting",!1),gt.signal(e,"vim-mode-change",{mode:"normal"}),e.on("cursorActivity",Ze),A(e),gt.on(e.getInputField(),"paste",d(e)),e.on("keypress",s),e.on("keydown",a)}function l(e){e.setOption("disableInput",!1),e.off("cursorActivity",Ze),gt.off(e.getInputField(),"paste",d(e)),e.state.vim=null,e.off("keypress",s),e.off("keydown",a)}function u(e,t){this==gt.keyMap.vim&>.rmClass(e.getWrapperElement(),"cm-fat-cursor"),t&&t.attach==h||l(e,!1)}function h(e,t){this==gt.keyMap.vim&>.addClass(e.getWrapperElement(),"cm-fat-cursor"),t&&t.attach==h||c(e)}function d(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(P(e.getCursor(),0,1)),jt.enterInsertMode(e,{},t))}),t.onPasteFn}function p(e,t){for(var n=[],r=e;r=e.firstLine()&&t<=e.lastLine()}function m(e){return/^[a-z]$/.test(e)}function g(e){return"()[]{}".indexOf(e)!=-1}function v(e){return xt.test(e)}function y(e){return/^[A-Z]$/.test(e)}function C(e){return/^\s*$/.test(e)}function k(e,t){for(var n=0;n"==t.slice(-11)){var n=t.length-11,r=e.slice(0,n),o=t.slice(0,n);return r==o&&e.length>n?"full":0==o.indexOf(r)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function V(e){var t=/^.*(<[\w\-]+>)$/.exec(e),n=t?t[1]:e.slice(-1);if(n.length>1)switch(n){case"":n="\n";break;case"":n=" "}return n}function $(e,t,n){return function(){for(var r=0;r2&&(t=W.apply(void 0,Array.prototype.slice.call(arguments,1))),F(e,t)?e:t}function U(e,t){return arguments.length>2&&(t=U.apply(void 0,Array.prototype.slice.call(arguments,1))),F(e,t)?t:e}function z(e,t,n){var r=F(e,t),o=F(t,n);return r&&o}function J(e,t){return e.getLine(t).length}function q(e){return e.split("").reverse().join("")}function Q(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Z(e){return e.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function G(e,t,n){var r=J(e,t),o=new Array(n-r+1).join(" ");e.setCursor(Ct(t,r)),e.replaceRange(o,e.getCursor())}function Y(e,t){var n=[],r=e.listSelections(),o=j(e.clipPos(t)),i=!D(t,o),a=e.getCursor("head"),s=ee(r,a),c=D(r[s].head,r[s].anchor),l=r.length-1,u=l-s>s?l:0,h=r[u].anchor,d=Math.min(h.line,o.line),p=Math.max(h.line,o.line),f=h.ch,m=o.ch,g=r[u].head.ch-f,v=m-f;g>0&&v<=0?(f++,i||m--):g<0&&v>=0?(f--,c||m++):g<0&&v==-1&&(f--,m++);for(var y=d;y<=p;y++){var C={anchor:new Ct(y,f),head:new Ct(y,m)};n.push(C)}return s=o.line==p?n.length-1:0,e.setSelections(n),t.ch=m,h.ch=f,h}function X(e,t,n){for(var r=[],o=0;oc&&(o.line=c),o.ch=J(e,o.line)}return{ranges:[{anchor:i,head:o}],primary:0}}if("block"==n){for(var l=Math.min(i.line,o.line),u=Math.min(i.ch,o.ch),h=Math.max(i.line,o.line),d=Math.max(i.ch,o.ch)+1,p=h-l+1,f=o.line==l?0:p-1,m=[],g=0;g0&&i&&C(i);i=o.pop())n.line--,n.ch=0;i?(n.line--,n.ch=J(e,n.line)):n.ch=0}}function le(e,t,n){t.ch=0,n.ch=0,n.line++}function ue(e){if(!e)return 0;var t=e.search(/\S/);return t==-1?e.length:t}function he(e,t,n,r,o){var i,a=ae(e),s=e.getLine(a.line),c=a.ch,l=s.substring(c);if(i=o?l.search(/\w/):l.search(/\S/),i==-1)return null;c+=i,l=s.substring(c);var u,h=s.substring(0,c);u=r?/^\S+/:/\w/.test(s.charAt(c))?/^\w+/:/^[^\w\s]+/;var d=u.exec(l),p=c,f=c+d[0].length,m=q(h),g=u.exec(m);if(g&&(p-=g[0].length),t){var v=s.substring(f),y=v.match(/^\s*/)[0].length;if(y>0)f+=y;else{var C=m.length-p,k=m.substring(C),w=k.match(/^\s*/)[0].length;p-=w}}return{start:Ct(a.line,p),end:Ct(a.line,f)}}function de(e,t,n){D(t,n)||Pt.jumpList.add(e,t,n)}function pe(e,t){Pt.lastChararacterSearch.increment=e,Pt.lastChararacterSearch.forward=t.forward,Pt.lastChararacterSearch.selectedCharacter=t.selectedCharacter}function fe(e,t,n,r){var o=j(e.getCursor()),i=n?1:-1,a=n?e.lineCount():-1,s=o.ch,c=o.line,l=e.getLine(c),u={lineText:l,nextCh:l.charAt(s),lastCh:null,index:s,symb:r,reverseSymb:(n?{")":"(","}":"{"}:{"(":")","{":"}"})[r],forward:n,depth:0,curMoveThrough:!1},h=Dt[r];if(!h)return o;var d=Ft[h].init,p=Ft[h].isComplete;for(d&&d(u);c!==a&&t;){if(u.index+=i,u.nextCh=u.lineText.charAt(u.index),!u.nextCh){if(c+=i,u.lineText=e.getLine(c)||"",i>0)u.index=0;else{var f=u.lineText.length;u.index=f>0?f-1:0}u.nextCh=u.lineText.charAt(u.index)}p(u)&&(o.line=c,o.ch=u.index,t--)}return u.nextCh||u.curMoveThrough?Ct(c,u.index):o}function me(e,t,n,r,o){var i=t.line,a=t.ch,s=e.getLine(i),c=n?1:-1,l=r?bt:At;if(o&&""==s){if(i+=c,s=e.getLine(i),!f(e,i))return null;a=n?0:s.length}for(;;){if(o&&""==s)return{from:0,to:0,line:i};for(var u=c>0?s.length:-1,h=u,d=u;a!=u;){for(var p=!1,m=0;m0?0:s.length}throw new Error("The impossible happened.")}function ge(e,t,n,r,o,i){var a=j(t),s=[];(r&&!o||!r&&o)&&n++;for(var c=!(r&&o),l=0;li.ch||o.line>i.line){var h=o;o=i,i=h}return r?i.ch+=1:o.ch+=1,{start:o,end:i}}function Me(e,t,n,r){var o,i,a,s,c=j(t),l=e.getLine(c.line),u=l.split(""),h=u.indexOf(n);if(c.ch-1&&!o;a--)u[a]==n&&(o=a+1);else o=c.ch+1;if(o&&!i)for(a=o,s=u.length;a'+t+"
",{bottom:!0,duration:5e3}):alert(t)}function Ie(e,t){var n="";return e&&(n+=''+e+""),n+=' ',t&&(n+='',n+=t,n+=""),n}function Ke(e,t){var n=(t.prefix||"")+" "+(t.desc||""),r=Ie(t.prefix,t.desc);Ae(e,r,n,t.onClose,t)}function Pe(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var n=["global","multiline","ignoreCase","source"],r=0;r=t&&e<=n:e==t}function De(e){var t=e.ace.renderer;return{top:t.getFirstFullyVisibleRow(),bottom:t.getLastFullyVisibleRow()}}function Fe(e,t,n,r,o,i,a,s,c){function l(){e.operation(function(){for(;!f;)u(),h();d()})}function u(){var t=e.getRange(i.from(),i.to()),n=t.replace(a,s);i.replace(n)}function h(){for(var t;t=i.findNext()&&je(i.from(),r,o);)if(n||!m||i.from().line!=m.line)return e.scrollIntoView(i.from(),30),e.setSelection(i.from(),i.to()),m=i.from(),void(f=!1);f=!0}function d(t){if(t&&t(),e.focus(),m){e.setCursor(m);var n=e.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=m.ch}c&&c()}function p(t,n,r){gt.e_stop(t);var o=gt.keyName(t);switch(o){case"Y":u(),h();break;case"N":h();break;case"A":var i=c;c=void 0,e.operation(l),c=i;break;case"L":u();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":d(r)}return f&&d(r),!0}e.state.vim.exMode=!0;var f=!1,m=i.from();return h(),f?void Be(e,"No matches for "+a.source):t?void Ke(e,{prefix:"replace with "+s+" (y/n/a/q/l)",onKeyDown:p}):(l(),void(c&&c()))}function We(e){var t=e.state.vim,n=Pt.macroModeState,r=Pt.registerController.getRegister("."),o=n.isPlaying,i=n.lastInsertModeChanges,a=[];if(!o){for(var s=i.inVisualBlock?t.lastSelection.visualBlock.height:1,c=i.changes,a=[],l=0;l1&&(tt(e,t,t.insertModeRepeat-1,!0),t.lastEditInputState.repeatOverride=t.insertModeRepeat),delete t.insertModeRepeat,t.insertMode=!1,e.setCursor(e.getCursor().line,e.getCursor().ch-1),e.setOption("keyMap","vim"),e.setOption("disableInput",!0),e.toggleOverwrite(!1),r.setText(i.changes.join("")),gt.signal(e,"vim-mode-change",{mode:"normal"}),n.isRecording&&Je(n)}function Ue(e,t,n,r){var o=Pt.registerController.getRegister(r),i=o.keyBuffer,a=0;n.isPlaying=!0,n.replaySearchQueries=o.searchQueries.slice(0);for(var s=0;s|<\w+>|./.exec(u),l=c[0],u=u.substring(c.index+l.length),gt.Vim.handleKey(e,l,"macro"),t.insertMode){var h=o.insertModeChanges[a++].changes;Pt.macroModeState.lastInsertModeChanges.changes=h,nt(e,h,1),We(e)}n.isPlaying=!1}function ze(e,t){if(!e.isPlaying){var n=e.latestRegister,r=Pt.registerController.getRegister(n);r&&r.pushText(t)}}function Je(e){if(!e.isPlaying){var t=e.latestRegister,n=Pt.registerController.getRegister(t);n&&n.pushInsertModeChanges(e.lastInsertModeChanges)}}function qe(e,t){if(!e.isPlaying){var n=e.latestRegister,r=Pt.registerController.getRegister(n);r&&r.pushSearchQuery(t)}}function Qe(e,t){var n=Pt.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying)for(;t;){if(r.expectCursorActivityForChange=!0,"+input"==t.origin||"paste"==t.origin||void 0===t.origin){var o=t.text.join("\n");r.changes.push(o)}t=t.next}}function Ze(e){var t=e.state.vim;if(t.insertMode){var n=Pt.macroModeState;if(n.isPlaying)return;var r=n.lastInsertModeChanges;r.expectCursorActivityForChange?r.expectCursorActivityForChange=!1:r.changes=[]}else e.curOp.isVimOp||Ye(e,t);t.visualMode&&Ge(e)}function Ge(e){var t=e.state.vim,n=j(t.sel.head),r=P(n,0,1);t.fakeCursor&&t.fakeCursor.clear(),t.fakeCursor=e.markText(n,r,{className:"cm-animate-fat-cursor"})}function Ye(e,t){var n=e.getCursor("anchor"),r=e.getCursor("head");if(t.visualMode&&D(r,n)&&J(e,r.line)>r.ch?se(e,!1):t.visualMode||t.insertMode||!e.somethingSelected()||(t.visualMode=!0,t.visualLine=!1,gt.signal(e,"vim-mode-change",{mode:"visual"})),t.visualMode){var o=F(r,n)?0:-1,i=F(r,n)?-1:0;r=P(r,0,o),n=P(n,0,i),t.sel={anchor:n,head:r},Ce(e,t,"<",W(r,n)),Ce(e,t,">",U(r,n))}else t.insertMode||(t.lastHPos=e.getCursor().ch)}function Xe(e){this.keyName=e}function et(e){function t(){return r.changes.push(new Xe(o)),!0}var n=Pt.macroModeState,r=n.lastInsertModeChanges,o=gt.keyName(e);o.indexOf("Delete")==-1&&o.indexOf("Backspace")==-1||gt.lookupKey(o,"vim-insert",t)}function tt(e,t,n,r){function o(){s?_t.processAction(e,t,t.lastEditActionCommand):_t.evalInput(e,t)}function i(n){if(a.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var r=a.lastInsertModeChanges;nt(e,r.changes,n)}}var a=Pt.macroModeState;a.isPlaying=!0;var s=!!t.lastEditActionCommand,c=t.inputState;if(t.inputState=t.lastEditInputState,s&&t.lastEditActionCommand.interlaceInsertRepeat)for(var l=0;l1&&"n"==t[0]&&(t=t.replace("numpad","")),t=wt[t]||t;var r="";return n.ctrlKey&&(r+="C-"),n.altKey&&(r+="A-"),n.shiftKey&&(r+="S-"),r+=t,r.length>1&&(r="<"+r+">"),r}function rt(e){var t=new e.constructor;return Object.keys(e).forEach(function(n){var r=e[n];Array.isArray(r)?r=r.slice():r&&"object"==typeof r&&r.constructor!=Object&&(r=rt(r)),t[n]=r}),e.sel&&(t.sel={head:e.sel.head&&j(e.sel.head),anchor:e.sel.anchor&&j(e.sel.anchor)}),t}function ot(e,t,n){var r=!1,o=St.maybeInitVimState_(e),i=o.visualBlock||o.wasInVisualBlock;if(o.wasInVisualBlock&&!e.ace.inMultiSelectMode?o.wasInVisualBlock=!1:e.ace.inMultiSelectMode&&o.visualBlock&&(o.wasInVisualBlock=!0),""!=t||o.insertMode||o.visualMode||!e.ace.inMultiSelectMode)if(i||!e.ace.inMultiSelectMode||e.ace.inVirtualSelectionMode)r=St.handleKey(e,t,n);else{var a=rt(o);e.operation(function(){e.ace.forEachSelection(function(){var o=e.ace.selection;e.state.vim.lastHPos=null==o.$desiredColumn?o.lead.column:o.$desiredColumn;var i=e.getCursor("head"),s=e.getCursor("anchor"),c=F(i,s)?0:-1,l=F(i,s)?-1:0;i=P(i,0,c),s=P(s,0,l),e.state.vim.sel.head=i,e.state.vim.sel.anchor=s,r=Qt(e,t,n),o.$desiredColumn=e.state.vim.lastHPos==-1?null:e.state.vim.lastHPos,e.virtualSelectionMode()&&(e.state.vim=rt(a))}),e.curOp.cursorActivity&&!r&&(e.curOp.cursorActivity=!1)},!0)}else e.ace.exitMultiSelectMode();return r}function it(e,t){t.off("beforeEndOperation",it);var n=t.state.cm.vimCmd;n&&t.execCommand(n.exec?n:n.name,n.args),t.curOp=t.prevOp}var at=e("../range").Range,st=e("../lib/event_emitter").EventEmitter,ct=e("../lib/dom"),lt=e("../lib/oop"),ut=e("../lib/keys"),ht=e("../lib/event"),dt=e("../search").Search,pt=e("../lib/useragent"),ft=e("../search_highlight").SearchHighlight,mt=e("../commands/multi_select_commands");e("../multi_select");var gt=function(e){this.ace=e,this.state={},this.marks={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};gt.Pos=function(e,t){return this instanceof Ct?(this.line=e,void(this.ch=t)):new Ct(e,t)},gt.defineOption=function(e,t,n){},gt.commands={redo:function(e){e.ace.redo()},undo:function(e){e.ace.undo()},newlineAndIndent:function(e){e.ace.insert("\n")}},gt.keyMap={},gt.addClass=gt.rmClass=gt.e_stop=function(){},gt.keyName=function(e){if(e.key)return e.key;var t=ut[e.keyCode]||"";return 1==t.length&&(t=t.toUpperCase()),t=ht.getModifierString(e).replace(/(^|-)\w/g,function(e){return e.toUpperCase()})+t},gt.keyMap.default=function(e){return function(t){var n=t.ace.commands.commandKeyBinding[e.toLowerCase()];return n&&t.ace.execCommand(n)!==!1}},gt.lookupKey=function e(t,n,r){"string"==typeof n&&(n=gt.keyMap[n]);var o="function"==typeof n?n(t):n[t];if(o===!1)return"nothing";if("..."===o)return"multi";if(null!=o&&r(o))return"handled";if(n.fallthrough){if(!Array.isArray(n.fallthrough))return e(t,n.fallthrough,r);for(var i=0;i0?(s.row+=o,s.column+=s.row==r.row?i:0):!t&&l<=0&&(s.row=n.row,s.column=n.column,0===l&&(s.bias=1))}}};var e=function(e,t,n,r){this.cm=e,this.id=t,this.row=n,this.column=r,e.marks[this.id]=this};e.prototype.clear=function(){delete this.cm.marks[this.id]},e.prototype.find=function(){return o(this)},this.setBookmark=function(t,n){var r=new e(this,(this.$uid++),t.line,t.ch);return n&&n.insertLeft||(r.$insertRight=!0),this.marks[r.id]=r,r},this.moveH=function(e,t){if("char"==t){var n=this.ace.selection;n.clearSelection(),n.moveCursorBy(0,e)}},this.findPosV=function(e,t,n,r){if("line"==n){var i=this.ace.session.documentToScreenPosition(e.line,e.ch);null!=r&&(i.column=r),i.row+=t,i.row=Math.min(Math.max(0,i.row),this.ace.session.getScreenLength()-1);var a=this.ace.session.screenToDocumentPosition(i.row,i.column);return o(a)}},this.charCoords=function(e,t){if("div"==t||!t){var n=this.ace.session.documentToScreenPosition(e.line,e.ch);return{left:n.column,top:n.row}}if("local"==t){var r=this.ace.renderer,n=this.ace.session.documentToScreenPosition(e.line,e.ch),o=r.layerConfig.lineHeight,i=r.layerConfig.characterWidth,a=o*n.row;return{left:n.column*i,top:a,bottom:a+o}}},this.coordsChar=function(e,t){var n=this.ace.renderer;if("local"==t){var r=Math.max(0,Math.floor(e.top/n.lineHeight)),i=Math.max(0,Math.floor(e.left/n.characterWidth)),a=n.session.screenToDocumentPosition(r,i);return o(a)}if("div"==t)throw"not implemented"},this.openDialog=function(){},this.getSearchCursor=function(e,t,n){var r=!1,i=!1;e instanceof RegExp&&!e.global&&(r=!e.ignoreCase,e=e.source,i=!0);var a=new dt;void 0==t.ch&&(t.ch=Number.MAX_VALUE);var s={row:t.line,column:t.ch},c=this,l=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){a.setOptions({needle:e,caseSensitive:r,wrap:!1,backwards:t,regExp:i,start:l||s});var n=a.find(c.ace.session);return n&&n.isEmpty()&&c.getLine(n.start.row).length==n.start.column&&(a.$options.start=n,n=a.find(c.ace.session)),l=n},from:function(){return l&&o(l.start)},to:function(){return l&&o(l.end)},replace:function(e){l&&(l.end=c.ace.session.doc.replace(l,e))}}},this.scrollTo=function(e,t){var n=this.ace.renderer,r=n.layerConfig,o=r.maxHeight;o-=(n.$size.scrollerHeight-n.lineHeight)*n.$scrollPastEnd,null!=t&&this.ace.session.setScrollTop(Math.max(0,Math.min(t,o))),null!=e&&this.ace.session.setScrollLeft(Math.max(0,Math.min(e,r.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(e,t){e&&this.ace.renderer.scrollCursorIntoView(r(e),null,t)},this.getLine=function(e){return this.ace.session.getLine(e)},this.getRange=function(e,t){return this.ace.session.getTextRange(new at(e.line,e.ch,t.line,t.ch))},this.replaceRange=function(e,t,n){return n||(n=t),this.ace.session.replace(new at(t.line,t.ch,n.line,n.ch),e)},this.replaceSelections=function(e){var t=this.ace.selection;if(this.ace.inVirtualSelectionMode)return void this.ace.session.replace(t.getRange(),e[0]||"");t.inVirtualSelectionMode=!0;var n=t.rangeList.ranges;n.length||(n=[this.ace.multiSelect.getRange()]);for(var r=n.length;r--;)this.ace.session.replace(n[r],e[r]||"");t.inVirtualSelectionMode=!1},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(e){return this.getRange(e.anchor,e.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.containter};var t={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",firstLineNumber:"firstLineNumber"};this.setOption=function(e,n){switch(this.state[e]=n,e){case"indentWithTabs":e=t[e],n=!n;break;default:e=t[e]}e&&this.ace.setOption(e,n)},this.getOption=function(e,n){var r=t[e]; +switch(r&&(n=this.ace.getOption(r)),e){case"indentWithTabs":return e=t[e],!n}return r?n:this.state[e]},this.toggleOverwrite=function(e){return this.state.overwrite=e,this.ace.setOverwrite(e)},this.addOverlay=function(e){if(!this.$searchHighlight||!this.$searchHighlight.session){var t=new ft(null,"ace_highlight-marker","text"),n=this.ace.session.addDynamicMarker(t);t.id=n.id,t.session=this.ace.session,t.destroy=function(e){t.session.off("change",t.updateOnChange),t.session.off("changeEditor",t.destroy),t.session.removeMarker(t.id),t.session=null},t.updateOnChange=function(e){e=e.data.range;var n=e.start.row;n==e.end.row?t.cache[n]=void 0:t.cache.splice(n,t.cache.length)},t.session.on("changeEditor",t.destroy),t.session.on("change",t.updateOnChange)}var r=new RegExp(e.query.source,"gmi");console.log(r),this.$searchHighlight=e.highlight=t,this.$searchHighlight.setRegexp(r),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(e){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var e=this.ace.renderer,t=e.layerConfig;return{left:e.scrollLeft,top:e.scrollTop,height:t.maxHeight,width:t.width,clientHeight:t.height,clientWidth:t.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(e){return this.ace.setValue(e)},this.getTokenTypeAt=function(e){var t=this.ace.session.getTokenAt(e.line,e.ch);return t&&/comment|string/.test(t.type)?"string":""},this.findMatchingBracket=function(e){var t=this.ace.session.findMatchingBracket(r(e));return{to:t&&o(t)}},this.indentLine=function(e,t){t===!0?this.ace.session.indentRows(e,e,"\t"):t===!1&&this.ace.session.outdentRows(new at(e,0,e,0))},this.indexFromPos=function(e){return this.ace.session.doc.positionToIndex(r(e))},this.posFromIndex=function(e){return o(this.ace.session.doc.indexToPosition(e))},this.focus=function(e){return this.ace.focus()},this.blur=function(e){return this.ace.blur()},this.defaultTextHeight=function(e){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(e,t,n,i){var a=i.bracketRegex.source;if(1==t)var s=this.ace.session.$findClosingBracket(a.slice(1,2),r(e),/paren|text/);else var s=this.ace.session.$findOpeningBracket(a.slice(-2,-1),{row:e.line,column:e.ch+1},/paren|text/);return s&&{pos:o(s)}},this.refresh=function(){return this.ace.resize(!0)}}.call(gt.prototype);var vt=gt.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};vt.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}var o=function(e){return n?e.toLowerCase():e},i=this.string.substr(this.pos,e.length);if(o(i)==o(e))return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}},gt.defineExtension=function(e,t){gt.prototype[e]=t},ct.importCssString(".normal-mode .ace_cursor{ border: 0!important; background-color: red; opacity: 0.5;}.ace_dialog { position: absolute; left: 0; right: 0; background: white; z-index: 15; padding: .1em .8em; overflow: hidden; color: #333;}.ace_dialog-top { border-bottom: 1px solid #eee; top: 0;}.ace_dialog-bottom { border-top: 1px solid #eee; bottom: 0;}.ace_dialog input { border: none; outline: none; background: transparent; width: 20em; color: inherit; font-family: monospace;}","vimMode"),function(){function e(e,t,n){var r,o=e.ace.container;return r=o.appendChild(document.createElement("div")),n?r.className="ace_dialog ace_dialog-bottom":r.className="ace_dialog ace_dialog-top","string"==typeof t?r.innerHTML=t:r.appendChild(t),r}function t(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}gt.defineExtension("openDialog",function(n,r,o){function i(e){if("string"==typeof e)u.value=e;else{if(c)return;c=!0,s.parentNode.removeChild(s),l.focus(),o.onClose&&o.onClose(s)}}if(!this.virtualSelectionMode()){o||(o={}),t(this,null);var a,s=e(this,n,o.bottom),c=!1,l=this,u=s.getElementsByTagName("input")[0];return u?(o.value&&(u.value=o.value,u.select()),o.onInput&>.on(u,"input",function(e){o.onInput(e,u.value,i)}),o.onKeyUp&>.on(u,"keyup",function(e){o.onKeyUp(e,u.value,i)}),gt.on(u,"keydown",function(e){o&&o.onKeyDown&&o.onKeyDown(e,u.value,i)||((27==e.keyCode||o.closeOnEnter!==!1&&13==e.keyCode)&&(u.blur(),gt.e_stop(e),i()),13==e.keyCode&&r(u.value))}),o.closeOnBlur!==!1&>.on(u,"blur",i),u.focus()):(a=s.getElementsByTagName("button")[0])&&(gt.on(a,"click",function(){i(),l.focus()}),o.closeOnBlur!==!1&>.on(a,"blur",i),a.focus()),i}}),gt.defineExtension("openNotification",function(n,r){function o(){s||(s=!0,clearTimeout(i),a.parentNode.removeChild(a))}if(!this.virtualSelectionMode()){t(this,o);var i,a=e(this,n,r&&r.bottom),s=!1,c=r&&"undefined"!=typeof r.duration?r.duration:5e3;return gt.on(a,"click",function(e){gt.e_preventDefault(e),o()}),c&&(i=setTimeout(o,c)),o}})}();var yt=[{keys:"",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"xi",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"dcc",context:"visual"},{keys:"",type:"keyToKey",toKeys:"0"},{keys:"",type:"keyToKey",toKeys:"$"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0}},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:'"',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],Ct=gt.Pos,kt=[16,17,18,91],wt={Enter:"CR",Backspace:"BS",Delete:"Del"},Mt=/Mac/.test(navigator.platform),St=function(){return Ht};gt.defineOption("vimMode",!1,function(e,t,n){t&&"vim"!=e.getOption("keyMap")?e.setOption("keyMap","vim"):!t&&n!=gt.Init&&/^vim/.test(e.getOption("keyMap"))&&e.setOption("keyMap","default")});var xt=/[\d]/,At=[/\w/,/[^\w\s]/],bt=[/\S/],Lt=p(65,26),Tt=p(97,26),Ot=p(48,10),Et=[].concat(Lt,Tt,Ot,["<",">"]),Rt=[].concat(Lt,Tt,Ot,["-",'"',".",":","/"]),Bt={},It=function(){function e(e,t,s){function c(t){var o=++r%n,i=a[o];i&&i.clear(),a[o]=e.setBookmark(t)}var l=r%n,u=a[l];if(u){var h=u.find();h&&!D(h,t)&&c(t)}else c(t);c(s),o=r,i=r-n+1,i<0&&(i=0)}function t(e,t){r+=t,r>o?r=o:r0?1:-1,u=e.getCursor();do if(r+=l,s=a[(n+r)%n],s&&(c=s.find())&&!D(u,c))break;while(ri)}return s}var n=100,r=-1,o=0,i=0,a=new Array(n);return{cachedCursor:void 0,add:e,move:t}},Kt=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};x.prototype={exitMacroRecordMode:function(){var e=Pt.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=Pt.registerController.getRegister(t);n&&(n.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog("(recording)["+t+"]",null,{bottom:!0})),this.isRecording=!0)}};var Pt,Nt,Ht={buildKeyMap:function(){},getRegisterController:function(){return Pt.registerController},resetVimGlobalState_:b,getVimGlobalState_:function(){return Pt},maybeInitVimState_:A,InsertModeKey:Xe,map:function(e,t,n){qt.map(e,t,n)},unmap:function(e,t){qt.unmap(e,t)},setOption:M,getOption:S,defineOption:w,defineEx:function(e,t,n){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered');Jt[e]=n,qt.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){function r(){var r=Pt.macroModeState;if(r.isRecording){if("q"==t)return r.exitMacroRecordMode(),T(e),!0;"mapping"!=n&&ze(r,t)}}function o(){if(""==t)return T(e),c.visualMode?se(e):c.insertMode&&We(e),!0}function i(n){for(var r;n;)r=/<\w+-.+?>|<\w+>|./.exec(n),t=r[0],n=n.substring(r.index+t.length),gt.Vim.handleKey(e,t,"mapping")}function a(){if(o())return!0;for(var n=c.inputState.keyBuffer=c.inputState.keyBuffer+t,r=1==t.length,a=_t.matchCommand(n,yt,c.inputState,"insert");n.length>1&&"full"!=a.type;){var n=c.inputState.keyBuffer=n.slice(1),s=_t.matchCommand(n,yt,c.inputState,"insert");"none"!=s.type&&(a=s)}if("none"==a.type)return T(e),!1;if("partial"==a.type)return Nt&&window.clearTimeout(Nt),Nt=window.setTimeout(function(){c.insertMode&&c.inputState.keyBuffer&&T(e)},S("insertModeEscKeysTimeout")),!r;if(Nt&&window.clearTimeout(Nt),r){var l=e.getCursor();e.replaceRange("",P(l,0,-(n.length-1)),l,"+input")}T(e);var u=a.command;return"keyToKey"==u.type?i(u.toKeys):_t.processCommand(e,c,u),!0}function s(){if(r()||o())return!0;var n=c.inputState.keyBuffer=c.inputState.keyBuffer+t;if(/^[1-9]\d*$/.test(n))return!0;var a=/^(\d*)(.*)$/.exec(n);if(!a)return T(e),!1;var s=c.visualMode?"visual":"normal",l=_t.matchCommand(a[2]||a[1],yt,c.inputState,s);if("none"==l.type)return T(e),!1;if("partial"==l.type)return!0;c.inputState.keyBuffer="";var u=l.command,a=/^(\d*)(.*)$/.exec(n);return a[1]&&"0"!=a[1]&&c.inputState.pushRepeatDigit(a[1]),"keyToKey"==u.type?i(u.toKeys):_t.processCommand(e,c,u),!0}var c=A(e);return e.operation(function(){e.curOp.isVimOp=!0;try{return c.insertMode?a():s()}catch(t){throw e.state.vim=void 0,A(e),t}})},handleEx:function(e,t){qt.processCommand(e,t)}};L.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},L.prototype.getRepeat=function(){var e=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10))),e},O.prototype={setText:function(e,t,n){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!n},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(Kt(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},E.prototype={pushText:function(e,t,n,r,o){r&&"\n"==n.charAt(0)&&(n=n.slice(1)+"\n"),r&&"\n"!==n.charAt(n.length-1)&&(n+="\n");var i=this.isValidRegister(e)?this.getRegister(e):null;if(!i){switch(t){case"yank":this.registers[0]=new O(n,r,o);break;case"delete":case"change":n.indexOf("\n")==-1?this.registers["-"]=new O(n,r):(this.shiftNumericRegisters_(),this.registers[1]=new O(n,r))}return void this.unnamedRegister.setText(n,r,o)}var a=y(e);a?i.pushText(n,r):i.setText(n,r,o),this.unnamedRegister.setText(i.toString(),r)},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new O),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&k(e,Rt)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},R.prototype={nextMatch:function(e,t){var n=this.historyBuffer,r=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var o=this.iterator+r;t?o>=0:o=n.length?(this.iterator=n.length,this.initialPrefix):o<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var _t={matchCommand:function(e,t,n,r){var o=H(e,t,r,n);if(!o.full&&!o.partial)return{type:"none"};if(!o.full&&o.partial)return{type:"partial"};for(var i,a=0;a"==i.keys.slice(-11)&&(n.selectedCharacter=V(e)),{type:"full",command:i}},processCommand:function(e,t,n){switch(t.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n),T(e);break;case"ex":case"keyToEx":this.processEx(e,t,n),T(e)}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=K(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var r=t.inputState;if(r.operator){if(r.operator==n.operator)return r.motion="expandToLine",r.motionArgs={linewise:!0},void this.evalInput(e,t);T(e)}r.operator=n.operator,r.operatorArgs=K(n.operatorArgs),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var r=t.visualMode,o=K(n.operatorMotionArgs);o&&r&&o.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),r||this.processMotion(e,t,n)},processAction:function(e,t,n){var r=t.inputState,o=r.getRepeat(),i=!!o,a=K(n.actionArgs)||{};r.selectedCharacter&&(a.selectedCharacter=r.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),a.repeat=o||1,a.repeatIsExplicit=i,a.registerName=r.registerName,T(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,r,n),jt[n.action](e,a,t)},processSearch:function(e,t,n){function r(r,o,i){Pt.searchHistoryController.pushInput(r),Pt.searchHistoryController.reset();try{Ne(e,r,o,i)}catch(t){return void Be(e,"Invalid regex: "+r)}_t.processMotion(e,t,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:n.searchArgs.toJumplist}})}function o(t){e.scrollTo(h.left,h.top),r(t,!0,!0);var n=Pt.macroModeState;n.isRecording&&qe(n,t)}function i(t,n,r){var o,i=gt.keyName(t);"Up"==i||"Down"==i?(o="Up"==i,n=Pt.searchHistoryController.nextMatch(n,o)||"",r(n)):"Left"!=i&&"Right"!=i&&"Ctrl"!=i&&"Alt"!=i&&"Shift"!=i&&Pt.searchHistoryController.reset();var a;try{a=Ne(e,n,!0,!0)}catch(e){}a?e.scrollIntoView(Ve(e,!s,a),30):($e(e),e.scrollTo(h.left,h.top))}function a(t,n,r){var o=gt.keyName(t);"Esc"!=o&&"Ctrl-C"!=o&&"Ctrl-["!=o||(Pt.searchHistoryController.pushInput(n),Pt.searchHistoryController.reset(),Ne(e,u),$e(e),e.scrollTo(h.left,h.top),gt.e_stop(t),r(),e.focus())}if(e.getSearchCursor){var s=n.searchArgs.forward,c=n.searchArgs.wholeWordOnly;xe(e).setReversed(!s);var l=s?"/":"?",u=xe(e).getQuery(),h=e.getScrollInfo();switch(n.searchArgs.querySrc){case"prompt":var d=Pt.macroModeState;if(d.isPlaying){var p=d.replaySearchQueries.shift();r(p,!0,!1)}else Ke(e,{onClose:o,prefix:l,desc:Wt,onKeyUp:i,onKeyDown:a});break;case"wordUnderCursor":var f=he(e,!1,!0,!1,!0),m=!0;if(f||(f=he(e,!1,!0,!1,!1),m=!1),!f)return;var p=e.getLine(f.start.line).substring(f.start.ch,f.end.ch);p=m&&c?"\\b"+p+"\\b":Z(p),Pt.jumpList.cachedCursor=e.getCursor(),e.setCursor(f.start),r(p,!0,!1)}}},processEx:function(e,t,n){function r(t){Pt.exCommandHistoryController.pushInput(t),Pt.exCommandHistoryController.reset(),qt.processCommand(e,t)}function o(t,n,r){var o,i=gt.keyName(t);"Esc"!=i&&"Ctrl-C"!=i&&"Ctrl-["!=i||(Pt.exCommandHistoryController.pushInput(n),Pt.exCommandHistoryController.reset(),gt.e_stop(t),r(),e.focus()),"Up"==i||"Down"==i?(o="Up"==i,n=Pt.exCommandHistoryController.nextMatch(n,o)||"",r(n)):"Left"!=i&&"Right"!=i&&"Ctrl"!=i&&"Alt"!=i&&"Shift"!=i&&Pt.exCommandHistoryController.reset()}"keyToEx"==n.type?qt.processCommand(e,n.exArgs.input):t.visualMode?Ke(e,{onClose:r,prefix:":",value:"'<,'>",onKeyDown:o}):Ke(e,{onClose:r,prefix:":",onKeyDown:o})},evalInput:function(e,t){var n,r,o,i=t.inputState,a=i.motion,s=i.motionArgs||{},c=i.operator,l=i.operatorArgs||{},u=i.registerName,h=t.sel,d=j(t.visualMode?h.head:e.getCursor("head")),p=j(t.visualMode?h.anchor:e.getCursor("anchor")),f=j(d),m=j(p);if(c&&this.recordLastEdit(t,i),o=void 0!==i.repeatOverride?i.repeatOverride:i.getRepeat(),o>0&&s.explicitRepeat?s.repeatIsExplicit=!0:(s.noRepeat||!s.explicitRepeat&&0===o)&&(o=1,s.repeatIsExplicit=!1),i.selectedCharacter&&(s.selectedCharacter=l.selectedCharacter=i.selectedCharacter),s.repeat=o,T(e),a){var g=Vt[a](e,d,s,t);if(t.lastMotion=Vt[a],!g)return;if(s.toJumplist){var v=Pt.jumpList,y=v.cachedCursor;y?(de(e,y,g),delete v.cachedCursor):de(e,d,g)}g instanceof Array?(r=g[0],n=g[1]):n=g,n||(n=j(d)),t.visualMode?(n=I(e,n,!0),r&&(r=I(e,r,!0)),r=r||m,h.anchor=r,h.head=n,oe(e),Ce(e,t,"<",F(r,n)?r:n),Ce(e,t,">",F(r,n)?n:r)):c||(n=I(e,n),e.setCursor(n.line,n.ch))}if(c){if(l.lastSel){r=m;var C=l.lastSel,k=Math.abs(C.head.line-C.anchor.line),w=Math.abs(C.head.ch-C.anchor.ch);n=C.visualLine?Ct(m.line+k,m.ch):C.visualBlock?Ct(m.line+k,m.ch+w):C.head.line==C.anchor.line?Ct(m.line,m.ch+w):Ct(m.line+k,m.ch),t.visualMode=!0,t.visualLine=C.visualLine,t.visualBlock=C.visualBlock,h=t.sel={anchor:r,head:n},oe(e)}else t.visualMode&&(l.lastSel={anchor:j(h.anchor),head:j(h.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var M,S,x,A,b;if(t.visualMode){if(M=W(h.head,h.anchor),S=U(h.head,h.anchor),x=t.visualLine||l.linewise,A=t.visualBlock?"block":x?"line":"char",b=ie(e,{anchor:M,head:S},A),x){var L=b.ranges;if("block"==A)for(var O=0;Ol&&o.line==l))return n.toFirstChar&&(i=ue(e.getLine(s)),r.lastHPos=i),r.lastHSPos=e.charCoords(Ct(s,i),"div").left,Ct(s,i)},moveByDisplayLines:function(e,t,n,r){var o=t;switch(r.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:r.lastHSPos=e.charCoords(o,"div").left}var i=n.repeat,a=e.findPosV(o,n.forward?i:-i,"line",r.lastHSPos);if(a.hitSide)if(n.forward)var s=e.charCoords(a,"div"),c={top:s.top+8,left:r.lastHSPos},a=e.coordsChar(c,"div");else{var l=e.charCoords(Ct(e.firstLine(),0),"div");l.left=r.lastHSPos,a=e.coordsChar(l,"div")}return r.lastHPos=a.ch,a},moveByPage:function(e,t,n){var r=t,o=n.repeat;return e.findPosV(r,n.forward?o:-o,"page"); +},moveByParagraph:function(e,t,n){for(var r=t.line,o=n.repeat,i=n.forward?1:-1,a=0;a1),jt.enterInsertMode(e,{head:r},e.state.vim)},delete:function(e,t,n){var r,o,i=e.state.vim;if(i.visualBlock){o=e.getSelection();var a=B("",n.length);e.replaceSelections(a),r=n[0].anchor}else{var s=n[0].anchor,c=n[0].head;t.linewise&&c.line!=e.firstLine()&&s.line==e.lastLine()&&s.line==c.line-1&&(s.line==e.firstLine()?s.ch=0:s=Ct(s.line-1,J(e,s.line-1))),o=e.getRange(s,c),e.replaceRange("",s,c),r=s,t.linewise&&(r=Vt.moveToFirstNonWhiteSpaceCharacter(e,s))}return Pt.registerController.pushText(t.registerName,"delete",o,t.linewise,i.visualBlock),r},indent:function(e,t,n){var r=e.state.vim,o=n[0].anchor.line,i=r.visualBlock?n[n.length-1].anchor.line:n[0].head.line,a=r.visualMode?t.repeat:1;t.linewise&&i--;for(var s=o;s<=i;s++)for(var c=0;cl.top?(c.line+=(s-l.top)/o,c.line=Math.ceil(c.line),e.setCursor(c),l=e.charCoords(c,"local"),e.scrollTo(null,l.top)):e.scrollTo(null,s);else{var u=s+e.getScrollInfo().clientHeight;u=o.anchor.line?P(o.head,0,1):Ct(o.anchor.line,0);else if("inplace"==r&&n.visualMode)return;e.setOption("keyMap","vim-insert"),e.setOption("disableInput",!1),t&&t.replace?(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),gt.signal(e,"vim-mode-change",{mode:"replace"})):(e.setOption("keyMap","vim-insert"),gt.signal(e,"vim-mode-change",{mode:"insert"})),Pt.macroModeState.isPlaying||(e.on("change",Qe),gt.on(e.getInputField(),"keydown",et)),n.visualMode&&se(e),X(e,i,a)}},toggleVisualMode:function(e,t,n){var r,o=t.repeat,i=e.getCursor();n.visualMode?n.visualLine^t.linewise||n.visualBlock^t.blockwise?(n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,gt.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),oe(e)):se(e):(n.visualMode=!0,n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,r=I(e,Ct(i.line,i.ch+o-1),!0),n.sel={anchor:i,head:r},gt.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),oe(e),Ce(e,n,"<",W(i,r)),Ce(e,n,">",U(i,r)))},reselectLastSelection:function(e,t,n){var r=n.lastSelection;if(n.visualMode&&ne(e,n),r){var o=r.anchorMark.find(),i=r.headMark.find();if(!o||!i)return;n.sel={anchor:o,head:i},n.visualMode=!0,n.visualLine=r.visualLine,n.visualBlock=r.visualBlock,oe(e),Ce(e,n,"<",W(o,i)),Ce(e,n,">",U(o,i)),gt.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var r,o;if(n.visualMode)r=e.getCursor("anchor"),o=e.getCursor("head"),o.ch=J(e,o.line)-1;else{var i=Math.max(t.repeat,2);r=e.getCursor(),o=I(e,Ct(r.line+i-1,1/0))}for(var a=0,s=r.line;s1)var i=Array(t.repeat+1).join(i);var p=o.linewise,f=o.blockwise;if(p)n.visualMode?i=n.visualLine?i.slice(0,-1):"\n"+i.slice(0,i.length-1)+"\n":t.after?(i="\n"+i.slice(0,i.length-1),r.ch=J(e,r.line)):r.ch=0;else{if(f){i=i.split("\n");for(var m=0;me.lastLine()&&e.replaceRange("\n",Ct(A,0));var b=J(e,A);bc.length&&(r=c.length),o=Ct(a.line,r)}if("\n"==i)n.visualMode||e.replaceRange("",a,o),(gt.commands.newlineAndIndentContinueComment||gt.commands.newlineAndIndent)(e);else{var l=e.getRange(a,o);if(l=l.replace(/[^\n]/g,i),n.visualBlock){var u=new Array(e.getOption("tabSize")+1).join(" ");l=e.getSelection(),l=l.replace(/\t/g,u).replace(/[^\n]/g,i).split("\n"),e.replaceSelections(l)}else e.replaceRange(l,a,o);n.visualMode?(a=F(s[0].anchor,s[0].head)?s[0].anchor:s[0].head,e.setCursor(a),se(e)):e.setCursor(P(o,0,-1))}},incrementNumberToken:function(e,t){for(var n,r,o,i,a,s=e.getCursor(),c=e.getLine(s.line),l=/-?\d+/g;null!==(n=l.exec(c))&&(a=n[0],r=n.index,o=r+a.length,!(s.ch=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};w("pcre",!0,"boolean"),Se.prototype={getQuery:function(){return Pt.query},setQuery:function(e){Pt.query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return Pt.isReversed},setReversed:function(e){Pt.isReversed=e}};var Wt="(Javascript regexp)",Ut=[{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"set"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],zt=function(){this.buildCommandMap_()};zt.prototype={processCommand:function(e,t,n){var r=e.state.vim,o=Pt.registerController.getRegister(":"),i=o.toString();r.visualMode&&se(e);var a=new gt.StringStream(t);o.setText(t);var s=n||{};s.input=t;try{this.parseInput_(e,a,s)}catch(t){throw Be(e,t),t}var c,l;if(s.commandName){if(c=this.matchCommand_(s.commandName)){if(l=c.name,c.excludeFromCommandHistory&&o.setText(i),this.parseCommandArgs_(a,s,c),"exToKey"==c.type){for(var u=0;u0;t--){var n=e.substring(0,t);if(this.commandMap_[n]){var r=this.commandMap_[n];if(0===r.name.indexOf(e))return r}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e
";if(n){var i;n=n.join("");for(var a=0;a"}}else for(var i in r){var c=r[i].toString();c.length&&(o+='"'+i+" "+c+"
")}Be(e,o)},sort:function(e,t){function n(){if(t.argString){var e=new gt.StringStream(t.argString);if(e.eat("!")&&(o=!0),e.eol())return;if(!e.eatSpace())return"Invalid arguments";var n=e.match(/[a-z]+/);if(n){n=n[0],i=n.indexOf("i")!=-1,a=n.indexOf("u")!=-1;var r=n.indexOf("d")!=-1&&1,c=n.indexOf("x")!=-1&&1,l=n.indexOf("o")!=-1&&1;if(r+c+l>1)return"Invalid arguments";s=r&&"decimal"||c&&"hex"||l&&"octal"}e.eatSpace()&&e.match(/\/.*\//)}}function r(e,t){if(o){var n;n=e,e=t,t=n}i&&(e=e.toLowerCase(),t=t.toLowerCase());var r=s&&f.exec(e),a=s&&f.exec(t);return r?(r=parseInt((r[1]+r[2]).toLowerCase(),m),a=parseInt((a[1]+a[2]).toLowerCase(),m),r-a):e")}if(!r)return void Be(e,u);var p=0,f=function(){if(p=l)return void Be(e,"Invalid argument: "+t.argString.substring(o));for(var u=0;u<=l-c;u++){var h=String.fromCharCode(c+u);delete n.marks[h]}}else delete n.marks[i]}}},qt=new zt;gt.keyMap.vim={attach:h,detach:u},w("insertModeEscKeysTimeout",200,"number"),gt.keyMap["vim-insert"]={"Ctrl-N":"autocomplete","Ctrl-P":"autocomplete",Enter:function(e){var t=gt.commands.newlineAndIndentContinueComment||gt.commands.newlineAndIndent;t(e)},fallthrough:["default"],attach:h,detach:u},gt.keyMap["await-second"]={fallthrough:["vim-insert"],attach:h,detach:u},gt.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:h,detach:u},b(),gt.Vim=St(),St=gt.Vim,wt={return:"CR",backspace:"BS",delete:"Del",esc:"Esc",left:"Left",right:"Right",up:"Up",down:"Down",space:"Space",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",enter:"CR"};var Qt=St.handleKey;St.handleKey=function(e,t,n){return e.operation(function(){return Qt(e,t,n)},!0)},t.CodeMirror=gt;var Zt=St.maybeInitVimState_;t.handler={$id:"ace/keyboard/vim",drawCursor:function(e,t,n,r,o){var i=this.state.vim||{},a=n.characterWidth,s=n.lineHeight,c=t.top,l=t.left;if(!i.insertMode){var u=r.cursor?at.comparePoints(r.cursor,r.start)<=0:o.selection.isBackwards()||o.selection.isEmpty();!u&&l>a&&(l-=a)}!i.insertMode&&i.status&&(s/=2,c+=s),e.left=l+"px",e.top=c+"px",e.width=a+"px",e.height=s+"px"},handleKeyboard:function(e,t,n,r,o){var a=e.editor,s=a.state.cm,c=Zt(s);if(r!=-1){if("c"==n&&1==t)return!pt.isMac&&a.getCopyText()?(a.once("copy",function(){a.selection.clearSelection()}),{command:"null",passEvent:!0}):{command:coreCommands.stop};if(c.insertMode||pt.isMac&&this.handleMacRepeat(e,t,n)&&(t=-1,n=e.inputChar),t==-1||1&t||0===t&&n.length>1){var l=c.insertMode,u=i(t,n,o||{});null==c.status&&(c.status="");var h=ot(s,u,"user");if(c=Zt(s),h&&null!=c.status?c.status+=u:null==c.status&&(c.status=""),s._signal("changeStatus"),!h&&(t!=-1||l))return;return{command:"null",passEvent:!h}}}},attach:function(e){e.state||(e.state={});var t=new gt(e);e.state.cm=t,e.$vimModeHandler=this,gt.keyMap.vim.attach(t),Zt(t).status=null,t.on("vim-command-done",function(){t.virtualSelectionMode()||(Zt(t).status=null,t.ace._signal("changeStatus"),t.ace.session.markUndoGroup())}),t.on("changeStatus",function(){t.ace.renderer.updateCursor(),t.ace._signal("changeStatus")}),t.on("vim-mode-change",function(){t.virtualSelectionMode()||(t.ace.renderer.setStyle("normal-mode",!Zt(t).insertMode),t._signal("changeStatus"))}),t.ace.renderer.setStyle("normal-mode",!Zt(t).insertMode),e.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(t),this.updateMacCompositionHandlers(e,!0)},detach:function(e){var t=e.state.cm;gt.keyMap.vim.detach(t),t.destroy(),e.state.cm=null,e.$vimModeHandler=null,e.renderer.$cursorLayer.drawCursor=null,e.renderer.setStyle("normal-mode",!1),this.updateMacCompositionHandlers(e,!1)},getStatusText:function(e){var t=e.state.cm,n=Zt(t);if(n.insertMode)return"INSERT";var r="";return n.visualMode&&(r+="VISUAL",n.visualLine&&(r+=" LINE"),n.visualBlock&&(r+=" BLOCK")),n.status&&(r+=(r?" ":"")+n.status),r},handleMacRepeat:function(e,t,n){if(t==-1)e.inputChar=n,e.lastEvent="input";else if(e.inputChar&&e.$lastHash==t&&e.$lastKey==n){if("input"==e.lastEvent)e.lastEvent="input1";else if("input1"==e.lastEvent)return!0}else e.$lastHash=t,e.$lastKey=n,e.lastEvent="keypress"},updateMacCompositionHandlers:function(e,t){var n=function(t){var n=e.state.cm,r=Zt(n);if(r.insertMode)this.onCompositionUpdateOrig(t);else{var o=this.textInput.getElement();o.blur(),o.focus(),o.value=t}},r=function(t){var n=e.state.cm,r=Zt(n);r.insertMode||this.onCompositionStartOrig(t)};t?e.onCompositionUpdateOrig||(e.onCompositionUpdateOrig=e.onCompositionUpdate,e.onCompositionUpdate=n,e.onCompositionStartOrig=e.onCompositionStart,e.onCompositionStart=r):e.onCompositionUpdateOrig&&(e.onCompositionUpdate=e.onCompositionUpdateOrig,e.onCompositionUpdateOrig=null,e.onCompositionStart=e.onCompositionStartOrig,e.onCompositionStartOrig=null)}},St.defineOption({name:"wrap",set:function(e,t){t&&t.ace.setOption("wrap",e)},type:"boolean"},!1),yt.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),jt.aceCommand=function(e,t,n){e.vimCmd=t,e.ace.inVirtualSelectionMode?e.ace.on("beforeEndOperation",it):it(null,e.ace)},jt.fold=function(e,t,n){e.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(t.all?2:0)+(t.open?1:0)])},t.handler.defaultKeymap=yt,St.map("Y","yy")}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-abap.js b/www/js/vendor/ace/mode-abap.js index 087b99019..e4a228e12 100755 --- a/www/js/vendor/ace/mode-abap.js +++ b/www/js/vendor/ace/mode-abap.js @@ -1,230 +1 @@ -define("ace/mode/abap_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var AbapHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "variable.language": "this", - "keyword": - "ADD ALIAS ALIASES ASSERT ASSIGN ASSIGNING AT BACK" + - " CALL CASE CATCH CHECK CLASS CLEAR CLOSE CNT COLLECT COMMIT COMMUNICATION COMPUTE CONCATENATE CONDENSE CONSTANTS CONTINUE CONTROLS CONVERT CREATE CURRENCY" + - " DATA DEFINE DEFINITION DEFERRED DELETE DESCRIBE DETAIL DIVIDE DO" + - " ELSE ELSEIF ENDAT ENDCASE ENDCLASS ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIF ENDIFEND ENDINTERFACE ENDLOOP ENDMETHOD ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDTRY ENDWHILE EVENT EVENTS EXEC EXIT EXPORT EXPORTING EXTRACT" + - " FETCH FIELDS FORM FORMAT FREE FROM FUNCTION" + - " GENERATE GET" + - " HIDE" + - " IF IMPORT IMPORTING INDEX INFOTYPES INITIALIZATION INTERFACE INTERFACES INPUT INSERT IMPLEMENTATION" + - " LEAVE LIKE LINE LOAD LOCAL LOOP" + - " MESSAGE METHOD METHODS MODIFY MODULE MOVE MULTIPLY" + - " ON OVERLAY OPTIONAL OTHERS" + - " PACK PARAMETERS PERFORM POSITION PROGRAM PROVIDE PUT" + - " RAISE RANGES READ RECEIVE RECEIVING REDEFINITION REFERENCE REFRESH REJECT REPLACE REPORT RESERVE RESTORE RETURNING ROLLBACK" + - " SCAN SCROLL SEARCH SELECT SET SHIFT SKIP SORT SORTED SPLIT STANDARD STATICS STEP STOP SUBMIT SUBTRACT SUM SUMMARY SUPPRESS" + - " TABLES TIMES TRANSFER TRANSLATE TRY TYPE TYPES" + - " UNASSIGN ULINE UNPACK UPDATE" + - " WHEN WHILE WINDOW WRITE" + - " OCCURS STRUCTURE OBJECT PROPERTY" + - " CASTING APPEND RAISING VALUE COLOR" + - " CHANGING EXCEPTION EXCEPTIONS DEFAULT CHECKBOX COMMENT" + - " ID NUMBER FOR TITLE OUTPUT" + - " WITH EXIT USING" + - " INTO WHERE GROUP BY HAVING ORDER BY SINGLE" + - " APPENDING CORRESPONDING FIELDS OF TABLE" + - " LEFT RIGHT OUTER INNER JOIN AS CLIENT SPECIFIED BYPASSING BUFFER UP TO ROWS CONNECTING" + - " EQ NE LT LE GT GE NOT AND OR XOR IN LIKE BETWEEN", - "constant.language": - "TRUE FALSE NULL SPACE", - "support.type": - "c n i p f d t x string xstring decfloat16 decfloat34", - "keyword.operator": - "abs sign ceil floor trunc frac acos asin atan cos sin tan" + - " abapOperator cosh sinh tanh exp log log10 sqrt" + - " strlen xstrlen charlen numofchar dbmaxlen lines" - }, "text", true, " "); - - var compoundKeywords = "WITH\\W+(?:HEADER\\W+LINE|FRAME|KEY)|NO\\W+STANDARD\\W+PAGE\\W+HEADING|"+ - "EXIT\\W+FROM\\W+STEP\\W+LOOP|BEGIN\\W+OF\\W+(?:BLOCK|LINE)|BEGIN\\W+OF|"+ - "END\\W+OF\\W+(?:BLOCK|LINE)|END\\W+OF|NO\\W+INTERVALS|"+ - "RESPECTING\\W+BLANKS|SEPARATED\\W+BY|USING\\W+(?:EDIT\\W+MASK)|"+ - "WHERE\\W+(?:LINE)|RADIOBUTTON\\W+GROUP|REF\\W+TO|"+ - "(?:PUBLIC|PRIVATE|PROTECTED)(?:\\W+SECTION)?|DELETING\\W+(?:TRAILING|LEADING)"+ - "(?:ALL\\W+OCCURRENCES)|(?:FIRST|LAST)\\W+OCCURRENCE|INHERITING\\W+FROM|"+ - "LINE-COUNT|ADD-CORRESPONDING|AUTHORITY-CHECK|BREAK-POINT|CLASS-DATA|CLASS-METHODS|"+ - "CLASS-METHOD|DIVIDE-CORRESPONDING|EDITOR-CALL|END-OF-DEFINITION|END-OF-PAGE|END-OF-SELECTION|"+ - "FIELD-GROUPS|FIELD-SYMBOLS|FUNCTION-POOL|MOVE-CORRESPONDING|MULTIPLY-CORRESPONDING|NEW-LINE|"+ - "NEW-PAGE|NEW-SECTION|PRINT-CONTROL|RP-PROVIDE-FROM-LAST|SELECT-OPTIONS|SELECTION-SCREEN|"+ - "START-OF-SELECTION|SUBTRACT-CORRESPONDING|SYNTAX-CHECK|SYNTAX-TRACE|TOP-OF-PAGE|TYPE-POOL|"+ - "TYPE-POOLS|LINE-SIZE|LINE-COUNT|MESSAGE-ID|DISPLAY-MODE|READ(?:-ONLY)?|"+ - "IS\\W+(?:NOT\\W+)?(?:ASSIGNED|BOUND|INITIAL|SUPPLIED)"; - - this.$rules = { - "start" : [ - {token : "string", regex : "`", next : "string"}, - {token : "string", regex : "'", next : "qstring"}, - {token : "doc.comment", regex : /^\*.+/}, - {token : "comment", regex : /".+$/}, - {token : "invalid", regex: "\\.{2,}"}, - {token : "keyword.operator", regex: /\W[\-+\%=<>*]\W|\*\*|[~:,\.&$]|->*?|=>/}, - {token : "paren.lparen", regex : "[\\[({]"}, - {token : "paren.rparen", regex : "[\\])}]"}, - {token : "constant.numeric", regex: "[+-]?\\d+\\b"}, - {token : "variable.parameter", regex : /sy|pa?\d\d\d\d\|t\d\d\d\.|innnn/}, - {token : "keyword", regex : compoundKeywords}, - {token : "variable.parameter", regex : /\w+-\w+(?:-\w+)*/}, - {token : keywordMapper, regex : "\\b\\w+\\b"}, - {caseInsensitive: true} - ], - "qstring" : [ - {token : "constant.language.escape", regex : "''"}, - {token : "string", regex : "'", next : "start"}, - {defaultToken : "string"} - ], - "string" : [ - {token : "constant.language.escape", regex : "``"}, - {token : "string", regex : "`", next : "start"}, - {defaultToken : "string"} - ] - } -}; -oop.inherits(AbapHighlightRules, TextHighlightRules); - -exports.AbapHighlightRules = AbapHighlightRules; -}); - -define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/abap",["require","exports","module","ace/mode/abap_highlight_rules","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/lib/oop"], function(require, exports, module) { -"use strict"; - -var Rules = require("./abap_highlight_rules").AbapHighlightRules; -var FoldMode = require("./folding/coffee").FoldMode; -var Range = require("../range").Range; -var TextMode = require("./text").Mode; -var oop = require("../lib/oop"); - -function Mode() { - this.HighlightRules = Rules; - this.foldingRules = new FoldMode(); -} - -oop.inherits(Mode, TextMode); - -(function() { - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - return indent; - }; - - this.toggleCommentLines = function(state, doc, startRow, endRow){ - var range = new Range(0, 0, 0, 0); - for (var i = startRow; i <= endRow; ++i) { - var line = doc.getLine(i); - if (hereComment.test(line)) - continue; - - if (commentLine.test(line)) - line = line.replace(commentLine, '$1'); - else - line = line.replace(indentation, '$&#'); - - range.end.row = range.start.row = i; - range.end.column = line.length + 1; - doc.replace(range, line); - } - }; - - this.$id = "ace/mode/abap"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/abap_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(E,e,t){"use strict";var N=E("../lib/oop"),T=E("./text_highlight_rules").TextHighlightRules,I=function(){var E=this.createKeywordMapper({"variable.language":"this",keyword:"ADD ALIAS ALIASES ASSERT ASSIGN ASSIGNING AT BACK CALL CASE CATCH CHECK CLASS CLEAR CLOSE CNT COLLECT COMMIT COMMUNICATION COMPUTE CONCATENATE CONDENSE CONSTANTS CONTINUE CONTROLS CONVERT CREATE CURRENCY DATA DEFINE DEFINITION DEFERRED DELETE DESCRIBE DETAIL DIVIDE DO ELSE ELSEIF ENDAT ENDCASE ENDCLASS ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIF ENDIFEND ENDINTERFACE ENDLOOP ENDMETHOD ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDTRY ENDWHILE EVENT EVENTS EXEC EXIT EXPORT EXPORTING EXTRACT FETCH FIELDS FORM FORMAT FREE FROM FUNCTION GENERATE GET HIDE IF IMPORT IMPORTING INDEX INFOTYPES INITIALIZATION INTERFACE INTERFACES INPUT INSERT IMPLEMENTATION LEAVE LIKE LINE LOAD LOCAL LOOP MESSAGE METHOD METHODS MODIFY MODULE MOVE MULTIPLY ON OVERLAY OPTIONAL OTHERS PACK PARAMETERS PERFORM POSITION PROGRAM PROVIDE PUT RAISE RANGES READ RECEIVE RECEIVING REDEFINITION REFERENCE REFRESH REJECT REPLACE REPORT RESERVE RESTORE RETURNING ROLLBACK SCAN SCROLL SEARCH SELECT SET SHIFT SKIP SORT SORTED SPLIT STANDARD STATICS STEP STOP SUBMIT SUBTRACT SUM SUMMARY SUPPRESS TABLES TIMES TRANSFER TRANSLATE TRY TYPE TYPES UNASSIGN ULINE UNPACK UPDATE WHEN WHILE WINDOW WRITE OCCURS STRUCTURE OBJECT PROPERTY CASTING APPEND RAISING VALUE COLOR CHANGING EXCEPTION EXCEPTIONS DEFAULT CHECKBOX COMMENT ID NUMBER FOR TITLE OUTPUT WITH EXIT USING INTO WHERE GROUP BY HAVING ORDER BY SINGLE APPENDING CORRESPONDING FIELDS OF TABLE LEFT RIGHT OUTER INNER JOIN AS CLIENT SPECIFIED BYPASSING BUFFER UP TO ROWS CONNECTING EQ NE LT LE GT GE NOT AND OR XOR IN LIKE BETWEEN","constant.language":"TRUE FALSE NULL SPACE","support.type":"c n i p f d t x string xstring decfloat16 decfloat34","keyword.operator":"abs sign ceil floor trunc frac acos asin atan cos sin tan abapOperator cosh sinh tanh exp log log10 sqrt strlen xstrlen charlen numofchar dbmaxlen lines"},"text",!0," "),e="WITH\\W+(?:HEADER\\W+LINE|FRAME|KEY)|NO\\W+STANDARD\\W+PAGE\\W+HEADING|EXIT\\W+FROM\\W+STEP\\W+LOOP|BEGIN\\W+OF\\W+(?:BLOCK|LINE)|BEGIN\\W+OF|END\\W+OF\\W+(?:BLOCK|LINE)|END\\W+OF|NO\\W+INTERVALS|RESPECTING\\W+BLANKS|SEPARATED\\W+BY|USING\\W+(?:EDIT\\W+MASK)|WHERE\\W+(?:LINE)|RADIOBUTTON\\W+GROUP|REF\\W+TO|(?:PUBLIC|PRIVATE|PROTECTED)(?:\\W+SECTION)?|DELETING\\W+(?:TRAILING|LEADING)(?:ALL\\W+OCCURRENCES)|(?:FIRST|LAST)\\W+OCCURRENCE|INHERITING\\W+FROM|LINE-COUNT|ADD-CORRESPONDING|AUTHORITY-CHECK|BREAK-POINT|CLASS-DATA|CLASS-METHODS|CLASS-METHOD|DIVIDE-CORRESPONDING|EDITOR-CALL|END-OF-DEFINITION|END-OF-PAGE|END-OF-SELECTION|FIELD-GROUPS|FIELD-SYMBOLS|FUNCTION-POOL|MOVE-CORRESPONDING|MULTIPLY-CORRESPONDING|NEW-LINE|NEW-PAGE|NEW-SECTION|PRINT-CONTROL|RP-PROVIDE-FROM-LAST|SELECT-OPTIONS|SELECTION-SCREEN|START-OF-SELECTION|SUBTRACT-CORRESPONDING|SYNTAX-CHECK|SYNTAX-TRACE|TOP-OF-PAGE|TYPE-POOL|TYPE-POOLS|LINE-SIZE|LINE-COUNT|MESSAGE-ID|DISPLAY-MODE|READ(?:-ONLY)?|IS\\W+(?:NOT\\W+)?(?:ASSIGNED|BOUND|INITIAL|SUPPLIED)";this.$rules={start:[{token:"string",regex:"`",next:"string"},{token:"string",regex:"'",next:"qstring"},{token:"doc.comment",regex:/^\*.+/},{token:"comment",regex:/".+$/},{token:"invalid",regex:"\\.{2,}"},{token:"keyword.operator",regex:/\W[\-+\%=<>*]\W|\*\*|[~:,\.&$]|->*?|=>/},{token:"paren.lparen",regex:"[\\[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"constant.numeric",regex:"[+-]?\\d+\\b"},{token:"variable.parameter",regex:/sy|pa?\d\d\d\d\|t\d\d\d\.|innnn/},{token:"keyword",regex:e},{token:"variable.parameter",regex:/\w+-\w+(?:-\w+)*/},{token:E,regex:"\\b\\w+\\b"},{caseInsensitive:!0}],qstring:[{token:"constant.language.escape",regex:"''"},{token:"string",regex:"'",next:"start"},{defaultToken:"string"}],string:[{token:"constant.language.escape",regex:"``"},{token:"string",regex:"`",next:"start"},{defaultToken:"string"}]}};N.inherits(I,T),e.AbapHighlightRules=I}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(E,e,t){"use strict";var N=E("../../lib/oop"),T=E("./fold_mode").FoldMode,I=E("../../range").Range,n=e.FoldMode=function(){};N.inherits(n,T),function(){this.getFoldWidgetRange=function(E,e,t){var N=this.indentationBlock(E,t);if(N)return N;var T=/\S/,n=E.getLine(t),O=n.search(T);if(O!=-1&&"#"==n[O]){for(var R=n.length,r=E.getLength(),S=t,o=t;++tS){var a=E.getLine(o).length;return new I(S,R,o,a)}}},this.getFoldWidget=function(E,e,t){var N=E.getLine(t),T=N.search(/\S/),I=E.getLine(t+1),n=E.getLine(t-1),O=n.search(/\S/),R=I.search(/\S/);if(T==-1)return E.foldWidgets[t-1]=O!=-1&&O indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/actionscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/actionscript_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var ActionScriptHighlightRules = require("./actionscript_highlight_rules").ActionScriptHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = ActionScriptHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$id = "ace/mode/actionscript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/actionscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,o){"use strict";var i=e("../lib/oop"),n=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{token:"support.class.actionscript.2",regex:"\\b(?:R(?:ecordset|DBMSResolver|adioButton(?:Group)?)|X(?:ML(?:Socket|Node|Connector)?|UpdateResolverDataHolder)|M(?:M(?:Save|Execute)|icrophoneMicrophone|o(?:use|vieClip(?:Loader)?)|e(?:nu(?:Bar)?|dia(?:Controller|Display|Playback))|ath)|B(?:yName|inding|utton)|S(?:haredObject|ystem|crollPane|t(?:yleSheet|age|ream)|ound|e(?:ndEvent|rviceObject)|OAPCall|lide)|N(?:umericStepper|et(?:stream|S(?:tream|ervices)|Connection|Debug(?:Config)?))|C(?:heckBox|o(?:ntextMenu(?:Item)?|okie|lor|m(?:ponentMixins|boBox))|ustomActions|lient|amera)|T(?:ypedValue|ext(?:Snapshot|Input|F(?:ield|ormat)|Area)|ree|AB)|Object|D(?:ownload|elta(?:Item|Packet)?|at(?:e(?:Chooser|Field)?|a(?:G(?:lue|rid)|Set|Type)))|U(?:RL|TC|IScrollBar)|P(?:opUpManager|endingCall|r(?:intJob|o(?:duct|gressBar)))|E(?:ndPoint|rror)|Video|Key|F(?:RadioButton|GridColumn|MessageBox|BarChart|S(?:croll(?:Bar|Pane)|tyleFormat|plitView)|orm|C(?:heckbox|omboBox|alendar)|unction|T(?:icker|ooltip(?:Lite)?|ree(?:Node)?)|IconButton|D(?:ataGrid|raggablePane)|P(?:ieChart|ushButton|ro(?:gressBar|mptBox))|L(?:i(?:stBox|neChart)|oadingBox)|AdvancedMessageBox)|W(?:indow|SDLURL|ebService(?:Connector)?)|L(?:ist|o(?:calConnection|ad(?:er|Vars)|g)|a(?:unch|bel))|A(?:sBroadcaster|cc(?:ordion|essibility)|S(?:Set(?:Native|PropFlags)|N(?:ew|ative)|C(?:onstructor|lamp(?:2)?)|InstanceOf)|pplication|lert|rray))\\b"},{token:"support.function.actionscript.2",regex:"\\b(?:s(?:h(?:ift|ow(?:GridLines|Menu|Border|Settings|Headers|ColumnHeaders|Today|Preferences)?|ad(?:ow|ePane))|c(?:hema|ale(?:X|Mode|Y|Content)|r(?:oll(?:Track|Drag)?|een(?:Resolution|Color|DPI)))|t(?:yleSheet|op(?:Drag|A(?:nimation|llSounds|gent))?|epSize|a(?:tus|rt(?:Drag|A(?:nimation|gent))?))|i(?:n|ze|lence(?:TimeOut|Level))|o(?:ngname|urce|rt(?:Items(?:By)?|On(?:HeaderRelease)?|able(?:Columns)?)?)|u(?:ppressInvalidCalls|bstr(?:ing)?)|p(?:li(?:ce|t)|aceCol(?:umnsEqually|lumnsEqually))|e(?:nd(?:DefaultPushButtonEvent|AndLoad)?|curity|t(?:R(?:GB|o(?:otNode|w(?:Height|Count))|esizable(?:Columns)?|a(?:nge|te))|G(?:ain|roupName)|X(?:AxisTitle)?|M(?:i(?:n(?:imum|utes)|lliseconds)|o(?:nth(?:Names)?|tionLevel|de)|ultilineMode|e(?:ssage|nu(?:ItemEnabled(?:At)?|EnabledAt)|dia)|a(?:sk|ximum))|B(?:u(?:tton(?:s|Width)|fferTime)|a(?:seTabIndex|ndwidthLimit|ckground))|S(?:howAsDisabled|croll(?:ing|Speed|Content|Target|P(?:osition|roperties)|barState|Location)|t(?:yle(?:Property)?|opOnFocus|at(?:us|e))|i(?:ze|lenceLevel)|ort(?:able(?:Columns)?|Function)|p(?:litterBarPosition|acing)|e(?:conds|lect(?:Multiple|ion(?:Required|Type)?|Style|Color|ed(?:Node(?:s)?|Cell|I(?:nd(?:ices|ex)|tem(?:s)?))?|able))|kin|m(?:oothness|allScroll))|H(?:ighlight(?:s|Color)|Scroll|o(?:urs|rizontal)|eader(?:Symbol|Height|Text|Property|Format|Width|Location)?|as(?:Shader|CloseBox))|Y(?:ear|AxisTitle)?|N(?:ode(?:Properties|ExpansionHandler)|ewTextFormat)|C(?:h(?:ildNodes|a(?:ngeHandler|rt(?:Title|EventHandler)))|o(?:ntent(?:Size)?|okie|lumns)|ell(?:Symbol|Data)|l(?:i(?:ckHandler|pboard)|oseHandler)|redentials)|T(?:ype(?:dVaule)?|i(?:tle(?:barHeight)?|p(?:Target|Offset)?|me(?:out(?:Handler)?)?)|oggle|extFormat|ransform)|I(?:s(?:Branch|Open)|n(?:terval|putProperty)|con(?:SymbolName)?|te(?:rator|m(?:ByKey|Symbol)))|Orientation|D(?:i(?:splay(?:Range|Graphics|Mode|Clip|Text|edMonth)|rection)|uration|e(?:pth(?:Below|To|Above)|fault(?:GatewayURL|Mappings|NodeIconSymbolName)|l(?:iveryMode|ay)|bug(?:ID)?)|a(?:yOfWeekNames|t(?:e(?:Filter)?|a(?:Mapping(?:s)?|Item(?:Text|Property|Format)|Provider|All(?:Height|Property|Format|Width))?))|ra(?:wConnectors|gContent))|U(?:se(?:Shadow|HandCursor|EchoSuppression|rInput|Fade)|TC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear))|P(?:osition|ercentComplete|an(?:e(?:M(?:inimumSize|aximumSize)|Size|Title))?|ro(?:pert(?:y(?:Data)?|iesAt)|gress))|E(?:nabled|dit(?:Handler|able)|xpand(?:NodeTrigger|erSymbolName))|V(?:Scroll|olume|alue(?:Source)?)|KeyFrameInterval|Quality|F(?:i(?:eld|rst(?:DayOfWeek|VisibleNode))|ocus|ullYear|ps|ade(?:InLength|OutLength)|rame(?:Color|Width))|Width|L(?:ine(?:Color|Weight)|o(?:opback|adTarget)|a(?:rgeScroll|bel(?:Source|Placement)?))|A(?:s(?:Boolean|String|Number)|n(?:yTypedValue|imation)|ctiv(?:e(?:State(?:Handler)?|Handler)|ateHandler)|utoH(?:ideScrollBar|eight)))?|paratorBefore|ek|lect(?:ion(?:Disabled|Unfocused)?|ed(?:Node(?:s)?|Child|I(?:nd(?:ices|ex)|tem(?:s)?)|Dat(?:e|a))?|able(?:Ranges)?)|rver(?:String)?)|kip|qrt|wapDepths|lice|aveToSharedObj|moothing)|h(?:scroll(?:Policy)?|tml(?:Text)?|i(?:t(?:Test(?:TextNearPos)?|Area)|de(?:BuiltInItems|Child)?|ghlight(?:2D|3D)?)|orizontal|e(?:ight|ader(?:Re(?:nderer|lease)|Height|Text))|P(?:osition|ageScrollSize)|a(?:s(?:childNodes|MP3|S(?:creen(?:Broadcast|Playback)|treaming(?:Video|Audio)|ort)|Next|OwnProperty|Pr(?:inting|evious)|EmbeddedVideo|VideoEncoder|A(?:ccesibility|udio(?:Encoder)?))|ndlerName)|LineScrollSize)|ye(?:sLabel|ar)|n(?:o(?:t|de(?:Name|Close|Type|Open|Value)|Label)|u(?:llValue|mChild(?:S(?:creens|lides)|ren|Forms))|e(?:w(?:Item|line|Value|LocationDialog)|xt(?:S(?:cene|ibling|lide)|TabIndex|Value|Frame)?)?|ame(?:s)?)|c(?:h(?:ildNodes|eck|a(?:nge(?:sPending)?|r(?:CodeAt|At))|r)|o(?:s|n(?:st(?:ant|ructor)|nect|c(?:urrency|at)|t(?:ent(?:Type|Path)?|ains|rol(?:Placement|lerPolicy))|denseWhite|version)|py|l(?:or|umn(?:Stretch|Name(?:s)?|Count))|m(?:p(?:onent|lete)|ment))|u(?:stomItems|ePoint(?:s)?|r(?:veTo|Value|rent(?:Slide|ChildSlide|Item|F(?:ocused(?:S(?:creen|lide)|Form)|ps))))|e(?:il|ll(?:Renderer|Press|Edit|Focus(?:In|Out)))|l(?:i(?:ck|ents)|o(?:se(?:Button|Pane)?|ne(?:Node)?)|ear(?:S(?:haredObjects|treams)|Timeout|Interval)?)|a(?:ncelLabel|tch|p(?:tion|abilities)|l(?:cFields|l(?:e(?:e|r))?))|reate(?:GatewayConnection|Menu|Se(?:rver|gment)|C(?:hild(?:AtDepth)?|l(?:ient|ass(?:ChildAtDepth|Object(?:AtDepth)?))|all)|Text(?:Node|Field)|Item|Object(?:AtDepth)?|PopUp|E(?:lement|mptyMovieClip)))|t(?:h(?:is|row)|ype(?:of|Name)?|i(?:tle(?:StyleDeclaration)?|me(?:out)?)|o(?:talTime|String|olTipText|p|UpperCase|ggle(?:HighQuality)?|Lo(?:caleString|werCase))|e(?:st|llTarget|xt(?:RightMargin|Bold|S(?:ize|elected)|Height|Color|I(?:ndent|talic)|Disabled|Underline|F(?:ield|ont)|Width|LeftMargin|Align)?)|a(?:n|rget(?:Path)?|b(?:Stops|Children|Index|Enabled|leName))|r(?:y|igger|ac(?:e|k(?:AsMenu)?)))|i(?:s(?:Running|Branch|NaN|Con(?:soleOpen|nected)|Toggled|Installed|Open|D(?:own|ebugger)|P(?:urchased|ro(?:totypeOf|pertyEnumerable))|Empty|F(?:inite|ullyPopulated)|Local|Active)|n(?:s(?:tall|ertBefore)|cludeDeltaPacketInfo|t|it(?:ialize|Component|Pod|A(?:pplication|gent))?|de(?:nt|terminate|x(?:InParent(?:Slide|Form)?|Of)?)|put|validate|finity|LocalInternetCache)?|con(?:F(?:ield|unction))?|t(?:e(?:ratorScrolled|m(?:s|RollO(?:ut|ver)|ClassName))|alic)|d3|p|fFrameLoaded|gnore(?:Case|White))|o(?:s|n(?:R(?:ollO(?:ut|ver)|e(?:s(?:ize|ult)|l(?:ease(?:Outside)?|aseOutside)))|XML|Mouse(?:Move|Down|Up|Wheel)|S(?:ync|croller|tatus|oundComplete|e(?:tFocus|lect(?:edItem)?))|N(?:oticeEvent|etworkChange)|C(?:hanged|onnect|l(?:ipEvent|ose))|ID3|D(?:isconnect|eactivate|ata|ragO(?:ut|ver))|Un(?:install|load)|P(?:aymentResult|ress)|EnterFrame|K(?:illFocus|ey(?:Down|Up))|Fault|Lo(?:ad|g)|A(?:ctiv(?:ity|ate)|ppSt(?:op|art)))?|pe(?:n|ration)|verLayChildren|kLabel|ldValue|r(?:d)?)|d(?:i(?:s(?:connect|play(?:Normal|ed(?:Month|Year)|Full)|able(?:Shader|d(?:Ranges|Days)|CloseBox|Events))|rection)|o(?:cTypeDecl|tall|Decoding|main|LazyDecoding)|u(?:plicateMovieClip|ration)|e(?:stroy(?:ChildAt|Object)|code|fault(?:PushButton(?:Enabled)?|KeydownHandler)?|l(?:ta(?:Packet(?:Changed)?)?|ete(?:PopUp|All)?)|blocking)|a(?:shBoardSave|yNames|ta(?:Provider)?|rkshadow)|r(?:opdown(?:Width)?|a(?:w|gO(?:ut|ver))))|u(?:se(?:Sort|HandCursor|Codepage|EchoSuppression)|n(?:shift|install|derline|escape|format|watch|lo(?:ck|ad(?:Movie(?:Num)?)?))|pdate(?:Results|Mode|I(?:nputProperties|tem(?:ByIndex)?)|P(?:acket|roperties)|View|AfterEvent)|rl)|join|p(?:ixelAspectRatio|o(?:sition|p|w)|u(?:sh|rge|blish)|ercen(?:tComplete|Loaded)|lay(?:head(?:Change|Time)|ing|Hidden|erType)?|a(?:ssword|use|r(?:se(?:XML|CSS|Int|Float)|ent(?:Node|Is(?:S(?:creen|lide)|Form))|ams))|r(?:int(?:Num|AsBitmap(?:Num)?)?|o(?:to(?:type)?|pert(?:y|ies)|gress)|e(?:ss|v(?:ious(?:S(?:ibling|lide)|Value)?|Scene|Frame)|ferred(?:Height|Width))))|e(?:scape|n(?:code(?:r)?|ter(?:Frame)?|dFill|able(?:Shader|d|CloseBox|Events))|dit(?:able|Field|LocationDialog)|v(?:ent|al(?:uate)?)|q|x(?:tended|p|ec(?:ute)?|actSettings)|m(?:phasized(?:StyleDeclaration)?|bedFonts))|v(?:i(?:sible|ewPod)|ScrollPolicy|o(?:id|lume)|ersion|P(?:osition|ageScrollSize)|a(?:l(?:idat(?:ionError|e(?:Property|ActivationKey)?)|ue(?:Of)?)|riable)|LineScrollSize)|k(?:ind|ey(?:Down|Up|Press|FrameInterval))|q(?:sort|uality)|f(?:scommand|i(?:n(?:d(?:Text|First|Last)?|ally)|eldInfo|lter(?:ed|Func)?|rst(?:Slide|Child|DayOfWeek|VisibleNode)?)|o(?:nt|cus(?:In|edCell|Out|Enabled)|r(?:egroundDisabled|mat(?:ter)?))|unctionName|ps|l(?:oor|ush)|ace|romCharCode)|w(?:i(?:th|dth)|ordWrap|atch|riteAccess)|l(?:t|i(?:st(?:Owner)?|ne(?:Style|To))|o(?:c(?:k|a(?:t(?:ion|eByld)|l(?:ToGlobal|FileReadDisable)))|opback|ad(?:Movie(?:Num)?|S(?:crollContent|ound)|ed|Variables(?:Num)?|Application)?|g(?:Changes)?)|e(?:ngth|ft(?:Margin)?|ading)?|a(?:st(?:Slide|Child|Index(?:Of)?)?|nguage|b(?:el(?:Placement|F(?:ield|unction))?|leField)))|a(?:s(?:scociate(?:Controller|Display)|in|pectRatio|function)|nd|c(?:ceptConnection|tiv(?:ityLevel|ePlayControl)|os)|t(?:t(?:ach(?:Movie|Sound|Video|Audio)|ributes)|an(?:2)?)|dd(?:header|RequestHeader|Menu(?:Item(?:At)?|At)?|Sort|Header|No(?:tice|de(?:At)?)|C(?:olumn(?:At)?|uePoint)|T(?:oLocalInternetCache|reeNode(?:At)?)|I(?:con|tem(?:s(?:At)?|At)?)|DeltaItem|P(?:od|age|roperty)|EventListener|View|FieldInfo|Listener|Animation)?|uto(?:Size|Play|KeyNav|Load)|pp(?:endChild|ly(?:Changes|Updates)?)|vHardwareDisable|fterLoaded|l(?:ternateRowColors|ign|l(?:ow(?:InsecureDomain|Domain)|Transitions(?:InDone|OutDone))|bum)|r(?:tist|row|g(?:uments|List))|gent|bs)|r(?:ight(?:Margin)?|o(?:ot(?:S(?:creen|lide)|Form)|und|w(?:Height|Count)|llO(?:ut|ver))|e(?:s(?:yncDepth|t(?:orePane|artAnimation|rict)|iz(?:e|able(?:Columns)?)|olveDelta|ult(?:s)?|ponse)|c(?:o(?:ncile(?:Results|Updates)|rd)|eive(?:Video|Audio))|draw|jectConnection|place(?:Sel|ItemAt|AllItems)?|ve(?:al(?:Child)?|rse)|quest(?:SizeChange|Payment)?|f(?:errer|resh(?:ScrollContent|Destinations|Pane|FromSources)?)|lease(?:Outside)?|ad(?:Only|Access)|gister(?:SkinElement|C(?:olor(?:Style|Name)|lass)|InheritingStyle|Proxy)|move(?:Range|M(?:ovieClip|enu(?:Item(?:At)?|At))|Background|Sort|No(?:tice|de(?:sAt|At)?)|C(?:olum(?:nAt|At)|uePoints)|T(?:extField|reeNode(?:At)?)|Item(?:At)?|Pod|EventListener|FromLocalInternetCache|Listener|All(?:C(?:olumns|uePoints)|Items)?))|a(?:ndom|te|dioDot))|g(?:t|oto(?:Slide|NextSlide|PreviousSlide|FirstSlide|LastSlide|And(?:Stop|Play))|e(?:nre|t(?:R(?:GB|o(?:otNode|wCount)|e(?:sizable|mote))|X(?:AxisTitle)?|M(?:i(?:n(?:imum(?:Size)?|utes)|lliseconds)|onth(?:Names)?|ultilineMode|e(?:ssage|nu(?:ItemAt|EnabledAt|At))|aximum(?:Size)?)|B(?:ytes(?:Total|Loaded)|ounds|utton(?:s|Width)|eginIndex|a(?:ndwidthLimit|ckground))|S(?:howAsDisabled|croll(?:ing|Speed|Content|Position|barState|Location)|t(?:yle(?:Names)?|opOnFocus|ate)|ize|o(?:urce|rtState)|p(?:litterBarPosition|acing)|e(?:conds|lect(?:Multiple|ion(?:Required|Type)|Style|ed(?:Node(?:s)?|Cell|Text|I(?:nd(?:ices|ex)|tem(?:s)?))?)|rvice)|moothness|WFVersion)|H(?:ighlight(?:s|Color)|ours|e(?:ight|ader(?:Height|Text|Property|Format|Width|Location)?)|as(?:Shader|CloseBox))|Y(?:ear|AxisTitle)?|N(?:o(?:tices|de(?:DisplayedAt|At))|um(?:Children|berAvailable)|e(?:wTextFormat|xtHighestDepth))|C(?:h(?:ild(?:S(?:creen|lide)|Nodes|Form|At)|artTitle)|o(?:n(?:tent|figInfo)|okie|de|unt|lumn(?:Names|Count|Index|At))|uePoint|ellIndex|loseHandler|a(?:ll|retIndex))|T(?:ypedValue|i(?:tle(?:barHeight)?|p(?:Target|Offset)?|me(?:stamp|zoneOffset|out(?:State|Handler)|r)?)|oggle|ext(?:Extent|Format)?|r(?:ee(?:NodeAt|Length)|ans(?:form|actionId)))|I(?:s(?:Branch|Open)|n(?:stanceAtDepth|d(?:icesByKey|exByKey))|con(?:SymbolName)?|te(?:rator|m(?:sByKey|By(?:Name|Key)|id|ID|At))|d)|O(?:utput(?:Parameter(?:s|ByName)?|Value(?:s)?)|peration|ri(?:entation|ginalCellData))|D(?:i(?:s(?:play(?:Range|Mode|Clip|Index|edMonth)|kUsage)|rection)|uration|e(?:pth|faultNodeIconSymbolName|l(?:taPacket|ay)|bug(?:Config|ID)?)|a(?:y(?:OfWeekNames)?|t(?:e|a(?:Mapping(?:s)?|Item(?:Text|Property|Format)|Label|All(?:Height|Property|Format|Width))?))|rawConnectors)|U(?:se(?:Shadow|HandCursor|rInput|Fade)|RL|TC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear))|P(?:o(?:sition|ds)|ercentComplete|a(?:n(?:e(?:M(?:inimums|aximums)|Height|Title|Width))?|rentNode)|r(?:operty(?:Name|Data)?|efer(?:ences|red(?:Height|Width))))|E(?:n(?:dIndex|abled)|ditingData|x(?:panderSymbolName|andNodeTrigger))|V(?:iewed(?:Pods|Applications)|olume|ersion|alue(?:Source)?)|F(?:i(?:eld|rst(?:DayOfWeek|VisibleNode))|o(?:ntList|cus)|ullYear|ade(?:InLength|OutLength)|rame(?:Color|Width))|Width|L(?:ine(?:Color|Weight)|o(?:cal|adTarget)|ength|a(?:stTabIndex|bel(?:Source)?))|A(?:s(?:cii|Boolean|String|Number)|n(?:yTypedValue|imation)|ctiv(?:eState(?:Handler)?|ateHandler)|utoH(?:ideScrollBar|eight)|llItems|gent))?)?|lobal(?:StyleFormat|ToLocal)?|ain|roupName)|x(?:updatePackety|mlDecl)?|m(?:y(?:MethodName|Call)|in(?:imum)?|o(?:nthNames|tion(?:TimeOut|Level)|de(?:lChanged)?|use(?:Move|O(?:ut|ver)|Down(?:Somewhere|Outside)?|Up(?:Somewhere)?|WheelEnabled)|ve(?:To)?)|u(?:ted|lti(?:pleS(?:imultaneousAllowed|elections)|line))|e(?:ssage|nu(?:Show|Hide)?|th(?:od)?|diaType)|a(?:nufacturer|tch|x(?:scroll|hscroll|imum|HPosition|Chars|VPosition)?)|b(?:substring|chr|ord|length))|b(?:ytes(?:Total|Loaded)|indFormat(?:Strings|Function)|o(?:ttom(?:Scroll)?|ld|rder(?:Color)?)|u(?:tton(?:Height|Width)|iltInItems|ffer(?:Time|Length)|llet)|e(?:foreApplyUpdates|gin(?:GradientFill|Fill))|lockIndent|a(?:ndwidth|ckground(?:Style|Color|Disabled)?)|roadcastMessage)|onHTTPStatus)\\b"},{token:"support.constant.actionscript.2",regex:"\\b(?:__proto__|__resolve|_accProps|_alpha|_changed|_currentframe|_droptarget|_flash|_focusrect|_framesloaded|_global|_height|_highquality|_level|_listeners|_lockroot|_name|_parent|_quality|_root|_rotation|_soundbuftime|_target|_totalframes|_url|_visible|_width|_x|_xmouse|_xscale|_y|_ymouse|_yscale)\\b"},{token:"keyword.control.actionscript.2",regex:"\\b(?:dynamic|extends|import|implements|interface|public|private|new|static|super|var|for|in|break|continue|while|do|return|if|else|case|switch)\\b"},{token:"storage.type.actionscript.2",regex:"\\b(?:Boolean|Number|String|Void)\\b"},{token:"constant.language.actionscript.2",regex:"\\b(?:null|undefined|true|false)\\b"},{token:"constant.numeric.actionscript.2",regex:"\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b"},{token:"punctuation.definition.string.begin.actionscript.2",regex:'"',push:[{token:"punctuation.definition.string.end.actionscript.2",regex:'"',next:"pop"},{token:"constant.character.escape.actionscript.2",regex:"\\\\."},{defaultToken:"string.quoted.double.actionscript.2"}]},{token:"punctuation.definition.string.begin.actionscript.2",regex:"'",push:[{token:"punctuation.definition.string.end.actionscript.2",regex:"'",next:"pop"},{token:"constant.character.escape.actionscript.2",regex:"\\\\."},{defaultToken:"string.quoted.single.actionscript.2"}]},{token:"support.constant.actionscript.2",regex:"\\b(?:BACKSPACE|CAPSLOCK|CONTROL|DELETEKEY|DOWN|END|ENTER|HOME|INSERT|LEFT|LN10|LN2|LOG10E|LOG2E|MAX_VALUE|MIN_VALUE|NEGATIVE_INFINITY|NaN|PGDN|PGUP|PI|POSITIVE_INFINITY|RIGHT|SPACE|SQRT1_2|SQRT2|UP)\\b"},{token:"punctuation.definition.comment.actionscript.2",regex:"/\\*",push:[{token:"punctuation.definition.comment.actionscript.2",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.actionscript.2"}]},{token:"punctuation.definition.comment.actionscript.2",regex:"//.*$",push_:[{token:"comment.line.double-slash.actionscript.2",regex:"$",next:"pop"},{defaultToken:"comment.line.double-slash.actionscript.2"}]},{token:"keyword.operator.actionscript.2",regex:"\\binstanceof\\b"},{token:"keyword.operator.symbolic.actionscript.2",regex:"[-!%&*+=/?:]"},{token:["meta.preprocessor.actionscript.2","punctuation.definition.preprocessor.actionscript.2","meta.preprocessor.actionscript.2"],regex:"^([ \\t]*)(#)([a-zA-Z]+)"},{token:["storage.type.function.actionscript.2","meta.function.actionscript.2","entity.name.function.actionscript.2","meta.function.actionscript.2","punctuation.definition.parameters.begin.actionscript.2"],regex:"\\b(function)(\\s+)([a-zA-Z_]\\w*)(\\s*)(\\()",push:[{token:"punctuation.definition.parameters.end.actionscript.2",regex:"\\)",next:"pop"},{token:"variable.parameter.function.actionscript.2",regex:"[^,)$]+"},{defaultToken:"meta.function.actionscript.2"}]},{token:["storage.type.class.actionscript.2","meta.class.actionscript.2","entity.name.type.class.actionscript.2","meta.class.actionscript.2","storage.modifier.extends.actionscript.2","meta.class.actionscript.2","entity.other.inherited-class.actionscript.2"],regex:"\\b(class)(\\s+)([a-zA-Z_](?:\\w|\\.)*)(?:(\\s+)(extends)(\\s+)([a-zA-Z_](?:\\w|\\.)*))?"}]},this.normalizeRules()};a.metaData={fileTypes:["as"],keyEquivalent:"^~A",name:"ActionScript",scopeName:"source.actionscript.2"},i.inherits(a,n),t.ActionScriptHighlightRules=a}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,o){"use strict";var i=e("../../lib/oop"),n=e("../../range").Range,a=e("./fold_mode").FoldMode,r=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};i.inherits(r,a),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,o){var i=e.getLine(o);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var n=this._getFoldWidgetBase(e,t,o);return!n&&this.startRegionRe.test(i)?"start":n},this.getFoldWidgetRange=function(e,t,o,i){var n=e.getLine(o);if(this.startRegionRe.test(n))return this.getCommentRegionBlock(e,n,o);var a=n.match(this.foldingStartMarker);if(a){var r=a.index;if(a[1])return this.openingBracketBlock(e,a[1],o,r);var l=e.getCommentFoldRange(o,r+a[0].length,1);return l&&!l.isMultiLine()&&(i?l=this.getSectionRange(e,o):"all"!=t&&(l=null)),l}if("markbegin"!==t){var a=n.match(this.foldingStopMarker);if(a){var r=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],o,r):e.getCommentFoldRange(o,r,-1)}}},this.getSectionRange=function(e,t){var o=e.getLine(t),i=o.search(/\S/),a=t,r=o.length;t+=1;for(var l=t,s=e.getLength();++td)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=a)break;if(c.isMultiLine())t=c.end.row;else if(i==d)break}l=t}}return new n(a,r,l,e.getLine(l).length)},this.getCommentRegionBlock=function(e,t,o){for(var i=t.search(/\s*$/),a=e.getLength(),r=o,l=/^\s*(?:\/\*|\/\/)#(end)?region\b/,s=1;++or)return new n(r,i,c,t.length)}}.call(r.prototype)}),define("ace/mode/actionscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/actionscript_highlight_rules","ace/mode/folding/cstyle"],function(e,t,o){"use strict";var i=e("../lib/oop"),n=e("./text").Mode,a=e("./actionscript_highlight_rules").ActionScriptHighlightRules,r=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=a,this.foldingRules=new r};i.inherits(l,n),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/actionscript"}.call(l.prototype),t.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-ada.js b/www/js/vendor/ace/mode-ada.js index 65ed9041a..6868c3af0 100755 --- a/www/js/vendor/ace/mode-ada.js +++ b/www/js/vendor/ace/mode-ada.js @@ -1,87 +1 @@ -define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var AdaHighlightRules = function() { -var keywords = "abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|" + -"access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|" + -"array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|" + -"body|private|then|if|procedure|type|case|in|protected|constant|interface|until|" + -"|is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor"; - - var builtinConstants = ( - "true|false|null" - ); - - var builtinFunctions = ( - "count|min|max|avg|sum|rank|now|coalesce|main" - ); - - var keywordMapper = this.createKeywordMapper({ - "support.function": builtinFunctions, - "keyword": keywords, - "constant.language": builtinConstants - }, "identifier", true); - - this.$rules = { - "start" : [ { - token : "comment", - regex : "--.*$" - }, { - token : "string", // " string - regex : '".*?"' - }, { - token : "string", // ' string - regex : "'.*?'" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" - }, { - token : "paren.lparen", - regex : "[\\(]" - }, { - token : "paren.rparen", - regex : "[\\)]" - }, { - token : "text", - regex : "\\s+" - } ] - }; -}; - -oop.inherits(AdaHighlightRules, TextHighlightRules); - -exports.AdaHighlightRules = AdaHighlightRules; -}); - -define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var AdaHighlightRules = require("./ada_highlight_rules").AdaHighlightRules; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = AdaHighlightRules; -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "--"; - - this.$id = "ace/mode/ada"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var a=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,n=function(){var e="abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|body|private|then|if|procedure|type|case|in|protected|constant|interface|until||is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor",t="true|false|null",r="count|min|max|avg|sum|rank|now|coalesce|main",a=this.createKeywordMapper({"support.function":r,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};a.inherits(n,i),t.AdaHighlightRules=n}),define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules","ace/range"],function(e,t,r){"use strict";var a=e("../lib/oop"),i=e("./text").Mode,n=e("./ada_highlight_rules").AdaHighlightRules,o=(e("../range").Range,function(){this.HighlightRules=n});a.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/ada"}.call(o.prototype),t.Mode=o}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-apache_conf.js b/www/js/vendor/ace/mode-apache_conf.js index 780b1d257..5e7f51bce 100755 --- a/www/js/vendor/ace/mode-apache_conf.js +++ b/www/js/vendor/ace/mode-apache_conf.js @@ -1,356 +1 @@ -define("ace/mode/apache_conf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var ApacheConfHighlightRules = function() { - - this.$rules = { start: - [ { token: - [ 'punctuation.definition.comment.apacheconf', - 'comment.line.hash.ini', - 'comment.line.hash.ini' ], - regex: '^((?:\\s)*)(#)(.*$)' }, - { token: - [ 'punctuation.definition.tag.apacheconf', - 'entity.tag.apacheconf', - 'text', - 'string.value.apacheconf', - 'punctuation.definition.tag.apacheconf' ], - regex: '(<)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost)(?:(\\s)(.+?))?(>)' }, - { token: - [ 'punctuation.definition.tag.apacheconf', - 'entity.tag.apacheconf', - 'punctuation.definition.tag.apacheconf' ], - regex: '()' }, - { token: - [ 'keyword.alias.apacheconf', 'text', - 'string.regexp.apacheconf', 'text', - 'string.replacement.apacheconf', 'text' ], - regex: '(Rewrite(?:Rule|Cond))(\\s+)(.+?)(\\s+)(.+?)($|\\s)' }, - { token: - [ 'keyword.alias.apacheconf', 'text', - 'entity.status.apacheconf', 'text', - 'string.regexp.apacheconf', 'text', - 'string.path.apacheconf', 'text' ], - regex: '(RedirectMatch)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?' }, - { token: - [ 'keyword.alias.apacheconf', 'text', - 'entity.status.apacheconf', 'text', - 'string.path.apacheconf', 'text', - 'string.path.apacheconf', 'text' ], - regex: '(Redirect)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?' }, - { token: - [ 'keyword.alias.apacheconf', 'text', - 'string.regexp.apacheconf', 'text', - 'string.path.apacheconf', 'text' ], - regex: '(ScriptAliasMatch|AliasMatch)(\\s+)(.+?)(\\s+)(?:(.+?)(\\s))?' }, - { token: - [ 'keyword.alias.apacheconf', 'text', - 'string.path.apacheconf', 'text', - 'string.path.apacheconf', 'text' ], - regex: '(RedirectPermanent|RedirectTemp|ScriptAlias|Alias)(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?' }, - { token: 'keyword.core.apacheconf', - regex: '\\b(?:AcceptPathInfo|AccessFileName|AddDefaultCharset|AddOutputFilterByType|AllowEncodedSlashes|AllowOverride|AuthName|AuthType|CGIMapExtension|ContentDigest|DefaultType|DocumentRoot|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|FileETag|ForceType|HostnameLookups|IdentityCheck|Include|KeepAlive|KeepAliveTimeout|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine|LimitXMLRequestBody|LogLevel|MaxKeepAliveRequests|NameVirtualHost|Options|Require|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScriptInterpreterSource|ServerAdmin|ServerAlias|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetHandler|SetInputFilter|SetOutputFilter|TimeOut|TraceEnable|UseCanonicalName)\\b' }, - { token: 'keyword.mpm.apacheconf', - regex: '\\b(?:AcceptMutex|AssignUserID|BS2000Account|ChildPerUserID|CoreDumpDirectory|EnableExceptionHook|Group|Listen|ListenBacklog|LockFile|MaxClients|MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MinSpareServers|MinSpareThreads|NumServers|PidFile|ReceiveBufferSize|ScoreBoardFile|SendBufferSize|ServerLimit|StartServers|StartThreads|ThreadLimit|ThreadsPerChild|ThreadStackSize|User|Win32DisableAcceptEx)\\b' }, - { token: 'keyword.access.apacheconf', - regex: '\\b(?:Allow|Deny|Order)\\b' }, - { token: 'keyword.actions.apacheconf', - regex: '\\b(?:Action|Script)\\b' }, - { token: 'keyword.alias.apacheconf', - regex: '\\b(?:Alias|AliasMatch|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ScriptAlias|ScriptAliasMatch)\\b' }, - { token: 'keyword.auth.apacheconf', - regex: '\\b(?:AuthAuthoritative|AuthGroupFile|AuthUserFile)\\b' }, - { token: 'keyword.auth_anon.apacheconf', - regex: '\\b(?:Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID|Anonymous_VerifyEmail)\\b' }, - { token: 'keyword.auth_dbm.apacheconf', - regex: '\\b(?:AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile)\\b' }, - { token: 'keyword.auth_digest.apacheconf', - regex: '\\b(?:AuthDigestAlgorithm|AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)\\b' }, - { token: 'keyword.auth_ldap.apacheconf', - regex: '\\b(?:AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases|AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl)\\b' }, - { token: 'keyword.autoindex.apacheconf', - regex: '\\b(?:AddAlt|AddAltByEncoding|AddAltByType|AddDescription|AddIcon|AddIconByEncoding|AddIconByType|DefaultIcon|HeaderName|IndexIgnore|IndexOptions|IndexOrderDefault|ReadmeName)\\b' }, - { token: 'keyword.cache.apacheconf', - regex: '\\b(?:CacheDefaultExpire|CacheDisable|CacheEnable|CacheForceCompletion|CacheIgnoreCacheControl|CacheIgnoreHeaders|CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire)\\b' }, - { token: 'keyword.cern_meta.apacheconf', - regex: '\\b(?:MetaDir|MetaFiles|MetaSuffix)\\b' }, - { token: 'keyword.cgi.apacheconf', - regex: '\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength)\\b' }, - { token: 'keyword.cgid.apacheconf', - regex: '\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock)\\b' }, - { token: 'keyword.charset_lite.apacheconf', - regex: '\\b(?:CharsetDefault|CharsetOptions|CharsetSourceEnc)\\b' }, - { token: 'keyword.dav.apacheconf', - regex: '\\b(?:Dav|DavDepthInfinity|DavMinTimeout|DavLockDB)\\b' }, - { token: 'keyword.deflate.apacheconf', - regex: '\\b(?:DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize)\\b' }, - { token: 'keyword.dir.apacheconf', - regex: '\\b(?:DirectoryIndex|DirectorySlash)\\b' }, - { token: 'keyword.disk_cache.apacheconf', - regex: '\\b(?:CacheDirLength|CacheDirLevels|CacheExpiryCheck|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheMaxFileSize|CacheMinFileSize|CacheRoot|CacheSize|CacheTimeMargin)\\b' }, - { token: 'keyword.dumpio.apacheconf', - regex: '\\b(?:DumpIOInput|DumpIOOutput)\\b' }, - { token: 'keyword.env.apacheconf', - regex: '\\b(?:PassEnv|SetEnv|UnsetEnv)\\b' }, - { token: 'keyword.expires.apacheconf', - regex: '\\b(?:ExpiresActive|ExpiresByType|ExpiresDefault)\\b' }, - { token: 'keyword.ext_filter.apacheconf', - regex: '\\b(?:ExtFilterDefine|ExtFilterOptions)\\b' }, - { token: 'keyword.file_cache.apacheconf', - regex: '\\b(?:CacheFile|MMapFile)\\b' }, - { token: 'keyword.headers.apacheconf', - regex: '\\b(?:Header|RequestHeader)\\b' }, - { token: 'keyword.imap.apacheconf', - regex: '\\b(?:ImapBase|ImapDefault|ImapMenu)\\b' }, - { token: 'keyword.include.apacheconf', - regex: '\\b(?:SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|XBitHack)\\b' }, - { token: 'keyword.isapi.apacheconf', - regex: '\\b(?:ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer)\\b' }, - { token: 'keyword.ldap.apacheconf', - regex: '\\b(?:LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize|LDAPTrustedCA|LDAPTrustedCAType)\\b' }, - { token: 'keyword.log.apacheconf', - regex: '\\b(?:BufferedLogs|CookieLog|CustomLog|LogFormat|TransferLog|ForensicLog)\\b' }, - { token: 'keyword.mem_cache.apacheconf', - regex: '\\b(?:MCacheMaxObjectCount|MCacheMaxObjectSize|MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize)\\b' }, - { token: 'keyword.mime.apacheconf', - regex: '\\b(?:AddCharset|AddEncoding|AddHandler|AddInputFilter|AddLanguage|AddOutputFilter|AddType|DefaultLanguage|ModMimeUsePathInfo|MultiviewsMatch|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|TypesConfig)\\b' }, - { token: 'keyword.misc.apacheconf', - regex: '\\b(?:ProtocolEcho|Example|AddModuleInfo|MimeMagicFile|CheckSpelling|ExtendedStatus|SuexecUserGroup|UserDir)\\b' }, - { token: 'keyword.negotiation.apacheconf', - regex: '\\b(?:CacheNegotiatedDocs|ForceLanguagePriority|LanguagePriority)\\b' }, - { token: 'keyword.nw_ssl.apacheconf', - regex: '\\b(?:NWSSLTrustedCerts|NWSSLUpgradeable|SecureListen)\\b' }, - { token: 'keyword.proxy.apacheconf', - regex: '\\b(?:AllowCONNECT|NoProxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyFtpDirCharset|ProxyIOBufferSize|ProxyMaxForwards|ProxyPass|ProxyPassReverse|ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia)\\b' }, - { token: 'keyword.rewrite.apacheconf', - regex: '\\b(?:RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule)\\b' }, - { token: 'keyword.setenvif.apacheconf', - regex: '\\b(?:BrowserMatch|BrowserMatchNoCase|SetEnvIf|SetEnvIfNoCase)\\b' }, - { token: 'keyword.so.apacheconf', - regex: '\\b(?:LoadFile|LoadModule)\\b' }, - { token: 'keyword.ssl.apacheconf', - regex: '\\b(?:SSLCACertificateFile|SSLCACertificatePath|SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions|SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite|SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire|SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth)\\b' }, - { token: 'keyword.usertrack.apacheconf', - regex: '\\b(?:CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking)\\b' }, - { token: 'keyword.vhost_alias.apacheconf', - regex: '\\b(?:VirtualDocumentRoot|VirtualDocumentRootIP|VirtualScriptAlias|VirtualScriptAliasIP)\\b' }, - { token: - [ 'keyword.php.apacheconf', - 'text', - 'entity.property.apacheconf', - 'text', - 'string.value.apacheconf', - 'text' ], - regex: '\\b(php_value|php_flag)\\b(?:(\\s+)(.+?)(?:(\\s+)(.+?))?)?(\\s)' }, - { token: - [ 'punctuation.variable.apacheconf', - 'variable.env.apacheconf', - 'variable.misc.apacheconf', - 'punctuation.variable.apacheconf' ], - regex: '(%\\{)(?:(HTTP_USER_AGENT|HTTP_REFERER|HTTP_COOKIE|HTTP_FORWARDED|HTTP_HOST|HTTP_PROXY_CONNECTION|HTTP_ACCEPT|REMOTE_ADDR|REMOTE_HOST|REMOTE_PORT|REMOTE_USER|REMOTE_IDENT|REQUEST_METHOD|SCRIPT_FILENAME|PATH_INFO|QUERY_STRING|AUTH_TYPE|DOCUMENT_ROOT|SERVER_ADMIN|SERVER_NAME|SERVER_ADDR|SERVER_PORT|SERVER_PROTOCOL|SERVER_SOFTWARE|TIME_YEAR|TIME_MON|TIME_DAY|TIME_HOUR|TIME_MIN|TIME_SEC|TIME_WDAY|TIME|API_VERSION|THE_REQUEST|REQUEST_URI|REQUEST_FILENAME|IS_SUBREQ|HTTPS)|(.*?))(\\})' }, - { token: [ 'entity.mime-type.apacheconf', 'text' ], - regex: '\\b((?:text|image|application|video|audio)/.+?)(\\s)' }, - { token: 'entity.helper.apacheconf', - regex: '\\b(?:from|unset|set|on|off)\\b', - caseInsensitive: true }, - { token: 'constant.integer.apacheconf', regex: '\\b\\d+\\b' }, - { token: - [ 'text', - 'punctuation.definition.flag.apacheconf', - 'string.flag.apacheconf', - 'punctuation.definition.flag.apacheconf', - 'text' ], - regex: '(\\s)(\\[)(.*?)(\\])(\\s)' } ] } - - this.normalizeRules(); -}; - -ApacheConfHighlightRules.metaData = { fileTypes: - [ 'conf', - 'CONF', - 'htaccess', - 'HTACCESS', - 'htgroups', - 'HTGROUPS', - 'htpasswd', - 'HTPASSWD', - '.htaccess', - '.HTACCESS', - '.htgroups', - '.HTGROUPS', - '.htpasswd', - '.HTPASSWD' ], - name: 'Apache Conf', - scopeName: 'source.apacheconf' } - - -oop.inherits(ApacheConfHighlightRules, TextHighlightRules); - -exports.ApacheConfHighlightRules = ApacheConfHighlightRules; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/apache_conf",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apache_conf_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var ApacheConfHighlightRules = require("./apache_conf_highlight_rules").ApacheConfHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = ApacheConfHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "#"; - this.$id = "ace/mode/apache_conf"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/apache_conf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,a){"use strict";var o=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{token:["punctuation.definition.comment.apacheconf","comment.line.hash.ini","comment.line.hash.ini"],regex:"^((?:\\s)*)(#)(.*$)"},{token:["punctuation.definition.tag.apacheconf","entity.tag.apacheconf","text","string.value.apacheconf","punctuation.definition.tag.apacheconf"],regex:"(<)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost)(?:(\\s)(.+?))?(>)"},{token:["punctuation.definition.tag.apacheconf","entity.tag.apacheconf","punctuation.definition.tag.apacheconf"],regex:"()"},{token:["keyword.alias.apacheconf","text","string.regexp.apacheconf","text","string.replacement.apacheconf","text"],regex:"(Rewrite(?:Rule|Cond))(\\s+)(.+?)(\\s+)(.+?)($|\\s)"},{token:["keyword.alias.apacheconf","text","entity.status.apacheconf","text","string.regexp.apacheconf","text","string.path.apacheconf","text"],regex:"(RedirectMatch)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?"},{token:["keyword.alias.apacheconf","text","entity.status.apacheconf","text","string.path.apacheconf","text","string.path.apacheconf","text"],regex:"(Redirect)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?"},{token:["keyword.alias.apacheconf","text","string.regexp.apacheconf","text","string.path.apacheconf","text"],regex:"(ScriptAliasMatch|AliasMatch)(\\s+)(.+?)(\\s+)(?:(.+?)(\\s))?"},{token:["keyword.alias.apacheconf","text","string.path.apacheconf","text","string.path.apacheconf","text"],regex:"(RedirectPermanent|RedirectTemp|ScriptAlias|Alias)(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?"},{token:"keyword.core.apacheconf",regex:"\\b(?:AcceptPathInfo|AccessFileName|AddDefaultCharset|AddOutputFilterByType|AllowEncodedSlashes|AllowOverride|AuthName|AuthType|CGIMapExtension|ContentDigest|DefaultType|DocumentRoot|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|FileETag|ForceType|HostnameLookups|IdentityCheck|Include|KeepAlive|KeepAliveTimeout|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine|LimitXMLRequestBody|LogLevel|MaxKeepAliveRequests|NameVirtualHost|Options|Require|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScriptInterpreterSource|ServerAdmin|ServerAlias|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetHandler|SetInputFilter|SetOutputFilter|TimeOut|TraceEnable|UseCanonicalName)\\b"},{token:"keyword.mpm.apacheconf",regex:"\\b(?:AcceptMutex|AssignUserID|BS2000Account|ChildPerUserID|CoreDumpDirectory|EnableExceptionHook|Group|Listen|ListenBacklog|LockFile|MaxClients|MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MinSpareServers|MinSpareThreads|NumServers|PidFile|ReceiveBufferSize|ScoreBoardFile|SendBufferSize|ServerLimit|StartServers|StartThreads|ThreadLimit|ThreadsPerChild|ThreadStackSize|User|Win32DisableAcceptEx)\\b"},{token:"keyword.access.apacheconf",regex:"\\b(?:Allow|Deny|Order)\\b"},{token:"keyword.actions.apacheconf",regex:"\\b(?:Action|Script)\\b"},{token:"keyword.alias.apacheconf",regex:"\\b(?:Alias|AliasMatch|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ScriptAlias|ScriptAliasMatch)\\b"},{token:"keyword.auth.apacheconf",regex:"\\b(?:AuthAuthoritative|AuthGroupFile|AuthUserFile)\\b"},{token:"keyword.auth_anon.apacheconf",regex:"\\b(?:Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID|Anonymous_VerifyEmail)\\b"},{token:"keyword.auth_dbm.apacheconf",regex:"\\b(?:AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile)\\b"},{token:"keyword.auth_digest.apacheconf",regex:"\\b(?:AuthDigestAlgorithm|AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)\\b"},{token:"keyword.auth_ldap.apacheconf",regex:"\\b(?:AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases|AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl)\\b"},{token:"keyword.autoindex.apacheconf",regex:"\\b(?:AddAlt|AddAltByEncoding|AddAltByType|AddDescription|AddIcon|AddIconByEncoding|AddIconByType|DefaultIcon|HeaderName|IndexIgnore|IndexOptions|IndexOrderDefault|ReadmeName)\\b"},{token:"keyword.cache.apacheconf",regex:"\\b(?:CacheDefaultExpire|CacheDisable|CacheEnable|CacheForceCompletion|CacheIgnoreCacheControl|CacheIgnoreHeaders|CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire)\\b"},{token:"keyword.cern_meta.apacheconf",regex:"\\b(?:MetaDir|MetaFiles|MetaSuffix)\\b"},{token:"keyword.cgi.apacheconf",regex:"\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength)\\b"},{token:"keyword.cgid.apacheconf",regex:"\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock)\\b"},{token:"keyword.charset_lite.apacheconf",regex:"\\b(?:CharsetDefault|CharsetOptions|CharsetSourceEnc)\\b"},{token:"keyword.dav.apacheconf",regex:"\\b(?:Dav|DavDepthInfinity|DavMinTimeout|DavLockDB)\\b"},{token:"keyword.deflate.apacheconf",regex:"\\b(?:DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize)\\b"},{token:"keyword.dir.apacheconf",regex:"\\b(?:DirectoryIndex|DirectorySlash)\\b"},{token:"keyword.disk_cache.apacheconf",regex:"\\b(?:CacheDirLength|CacheDirLevels|CacheExpiryCheck|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheMaxFileSize|CacheMinFileSize|CacheRoot|CacheSize|CacheTimeMargin)\\b"},{token:"keyword.dumpio.apacheconf",regex:"\\b(?:DumpIOInput|DumpIOOutput)\\b"},{token:"keyword.env.apacheconf",regex:"\\b(?:PassEnv|SetEnv|UnsetEnv)\\b"},{token:"keyword.expires.apacheconf",regex:"\\b(?:ExpiresActive|ExpiresByType|ExpiresDefault)\\b"},{token:"keyword.ext_filter.apacheconf",regex:"\\b(?:ExtFilterDefine|ExtFilterOptions)\\b"},{token:"keyword.file_cache.apacheconf",regex:"\\b(?:CacheFile|MMapFile)\\b"},{token:"keyword.headers.apacheconf",regex:"\\b(?:Header|RequestHeader)\\b"},{token:"keyword.imap.apacheconf",regex:"\\b(?:ImapBase|ImapDefault|ImapMenu)\\b"},{token:"keyword.include.apacheconf",regex:"\\b(?:SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|XBitHack)\\b"},{token:"keyword.isapi.apacheconf",regex:"\\b(?:ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer)\\b"},{token:"keyword.ldap.apacheconf",regex:"\\b(?:LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize|LDAPTrustedCA|LDAPTrustedCAType)\\b"},{token:"keyword.log.apacheconf",regex:"\\b(?:BufferedLogs|CookieLog|CustomLog|LogFormat|TransferLog|ForensicLog)\\b"},{token:"keyword.mem_cache.apacheconf",regex:"\\b(?:MCacheMaxObjectCount|MCacheMaxObjectSize|MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize)\\b"},{token:"keyword.mime.apacheconf",regex:"\\b(?:AddCharset|AddEncoding|AddHandler|AddInputFilter|AddLanguage|AddOutputFilter|AddType|DefaultLanguage|ModMimeUsePathInfo|MultiviewsMatch|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|TypesConfig)\\b"},{token:"keyword.misc.apacheconf",regex:"\\b(?:ProtocolEcho|Example|AddModuleInfo|MimeMagicFile|CheckSpelling|ExtendedStatus|SuexecUserGroup|UserDir)\\b"},{token:"keyword.negotiation.apacheconf",regex:"\\b(?:CacheNegotiatedDocs|ForceLanguagePriority|LanguagePriority)\\b"},{token:"keyword.nw_ssl.apacheconf",regex:"\\b(?:NWSSLTrustedCerts|NWSSLUpgradeable|SecureListen)\\b"},{token:"keyword.proxy.apacheconf",regex:"\\b(?:AllowCONNECT|NoProxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyFtpDirCharset|ProxyIOBufferSize|ProxyMaxForwards|ProxyPass|ProxyPassReverse|ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia)\\b"},{token:"keyword.rewrite.apacheconf",regex:"\\b(?:RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule)\\b"},{token:"keyword.setenvif.apacheconf",regex:"\\b(?:BrowserMatch|BrowserMatchNoCase|SetEnvIf|SetEnvIfNoCase)\\b"},{token:"keyword.so.apacheconf",regex:"\\b(?:LoadFile|LoadModule)\\b"},{token:"keyword.ssl.apacheconf",regex:"\\b(?:SSLCACertificateFile|SSLCACertificatePath|SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions|SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite|SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire|SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth)\\b"},{token:"keyword.usertrack.apacheconf",regex:"\\b(?:CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking)\\b"},{token:"keyword.vhost_alias.apacheconf",regex:"\\b(?:VirtualDocumentRoot|VirtualDocumentRootIP|VirtualScriptAlias|VirtualScriptAliasIP)\\b"},{token:["keyword.php.apacheconf","text","entity.property.apacheconf","text","string.value.apacheconf","text"],regex:"\\b(php_value|php_flag)\\b(?:(\\s+)(.+?)(?:(\\s+)(.+?))?)?(\\s)"},{token:["punctuation.variable.apacheconf","variable.env.apacheconf","variable.misc.apacheconf","punctuation.variable.apacheconf"],regex:"(%\\{)(?:(HTTP_USER_AGENT|HTTP_REFERER|HTTP_COOKIE|HTTP_FORWARDED|HTTP_HOST|HTTP_PROXY_CONNECTION|HTTP_ACCEPT|REMOTE_ADDR|REMOTE_HOST|REMOTE_PORT|REMOTE_USER|REMOTE_IDENT|REQUEST_METHOD|SCRIPT_FILENAME|PATH_INFO|QUERY_STRING|AUTH_TYPE|DOCUMENT_ROOT|SERVER_ADMIN|SERVER_NAME|SERVER_ADDR|SERVER_PORT|SERVER_PROTOCOL|SERVER_SOFTWARE|TIME_YEAR|TIME_MON|TIME_DAY|TIME_HOUR|TIME_MIN|TIME_SEC|TIME_WDAY|TIME|API_VERSION|THE_REQUEST|REQUEST_URI|REQUEST_FILENAME|IS_SUBREQ|HTTPS)|(.*?))(\\})"},{token:["entity.mime-type.apacheconf","text"],regex:"\\b((?:text|image|application|video|audio)/.+?)(\\s)"},{token:"entity.helper.apacheconf",regex:"\\b(?:from|unset|set|on|off)\\b",caseInsensitive:!0},{token:"constant.integer.apacheconf",regex:"\\b\\d+\\b"},{token:["text","punctuation.definition.flag.apacheconf","string.flag.apacheconf","punctuation.definition.flag.apacheconf","text"],regex:"(\\s)(\\[)(.*?)(\\])(\\s)"}]},this.normalizeRules()};r.metaData={fileTypes:["conf","CONF","htaccess","HTACCESS","htgroups","HTGROUPS","htpasswd","HTPASSWD",".htaccess",".HTACCESS",".htgroups",".HTGROUPS",".htpasswd",".HTPASSWD"],name:"Apache Conf",scopeName:"source.apacheconf"},o.inherits(r,i),t.ApacheConfHighlightRules=r}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,a){"use strict";var o=e("../../lib/oop"),i=e("../../range").Range,r=e("./fold_mode").FoldMode,n=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(n,r),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,a){var o=e.getLine(a);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var i=this._getFoldWidgetBase(e,t,a);return!i&&this.startRegionRe.test(o)?"start":i},this.getFoldWidgetRange=function(e,t,a,o){var i=e.getLine(a);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,a);var r=i.match(this.foldingStartMarker);if(r){var n=r.index;if(r[1])return this.openingBracketBlock(e,r[1],a,n);var c=e.getCommentFoldRange(a,n+r[0].length,1);return c&&!c.isMultiLine()&&(o?c=this.getSectionRange(e,a):"all"!=t&&(c=null)),c}if("markbegin"!==t){var r=i.match(this.foldingStopMarker);if(r){var n=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],a,n):e.getCommentFoldRange(a,n,-1)}}},this.getSectionRange=function(e,t){var a=e.getLine(t),o=a.search(/\S/),r=t,n=a.length;t+=1;for(var c=t,s=e.getLength();++th)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=r)break;if(l.isMultiLine())t=l.end.row;else if(o==h)break}c=t}}return new i(r,n,c,e.getLine(c).length)},this.getCommentRegionBlock=function(e,t,a){for(var o=t.search(/\s*$/),r=e.getLength(),n=a,c=/^\s*(?:\/\*|\/\/)#(end)?region\b/,s=1;++an)return new i(n,o,l,t.length)}}.call(n.prototype)}),define("ace/mode/apache_conf",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apache_conf_highlight_rules","ace/mode/folding/cstyle"],function(e,t,a){"use strict";var o=e("../lib/oop"),i=e("./text").Mode,r=e("./apache_conf_highlight_rules").ApacheConfHighlightRules,n=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=r,this.foldingRules=new n};o.inherits(c,i),function(){this.lineCommentStart="#",this.$id="ace/mode/apache_conf"}.call(c.prototype),t.Mode=c}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-applescript.js b/www/js/vendor/ace/mode-applescript.js index aaca308c1..7bfb9b982 100755 --- a/www/js/vendor/ace/mode-applescript.js +++ b/www/js/vendor/ace/mode-applescript.js @@ -1,272 +1 @@ -define("ace/mode/applescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var AppleScriptHighlightRules = function() { - var keywords = ( - "about|above|after|against|and|around|as|at|back|before|beginning|" + - "behind|below|beneath|beside|between|but|by|considering|" + - "contain|contains|continue|copy|div|does|eighth|else|end|equal|" + - "equals|error|every|exit|fifth|first|for|fourth|from|front|" + - "get|given|global|if|ignoring|in|into|is|it|its|last|local|me|" + - "middle|mod|my|ninth|not|of|on|onto|or|over|prop|property|put|ref|" + - "reference|repeat|returning|script|second|set|seventh|since|" + - "sixth|some|tell|tenth|that|the|then|third|through|thru|" + - "timeout|times|to|transaction|try|until|where|while|whose|with|without" - ); - - var builtinConstants = ( - "AppleScript|false|linefeed|return|pi|quote|result|space|tab|true" - ); - - var builtinFunctions = ( - "activate|beep|count|delay|launch|log|offset|read|round|run|say|" + - "summarize|write" - ); - - var builtinTypes = ( - "alias|application|boolean|class|constant|date|file|integer|list|" + - "number|real|record|string|text|character|characters|contents|day|" + - "frontmost|id|item|length|month|name|paragraph|paragraphs|rest|" + - "reverse|running|time|version|weekday|word|words|year" - ); - - var keywordMapper = this.createKeywordMapper({ - "support.function": builtinFunctions, - "constant.language": builtinConstants, - "support.type": builtinTypes, - "keyword": keywords - }, "identifier"); - - this.$rules = { - "start": [ - { - token: "comment", - regex: "--.*$" - }, - { - token : "comment", // multi line comment - regex : "\\(\\*", - next : "comment" - }, - { - token: "string", // " string - regex: '".*?"' - }, - { - token: "support.type", - regex: '\\b(POSIX file|POSIX path|(date|time) string|quoted form)\\b' - }, - { - token: "support.function", - regex: '\\b(clipboard info|the clipboard|info for|list (disks|folder)|' + - 'mount volume|path to|(close|open for) access|(get|set) eof|' + - 'current date|do shell script|get volume settings|random number|' + - 'set volume|system attribute|system info|time to GMT|' + - '(load|run|store) script|scripting components|' + - 'ASCII (character|number)|localized string|' + - 'choose (application|color|file|file name|' + - 'folder|from list|remote application|URL)|' + - 'display (alert|dialog))\\b|^\\s*return\\b' - }, - { - token: "constant.language", - regex: '\\b(text item delimiters|current application|missing value)\\b' - }, - { - token: "keyword", - regex: '\\b(apart from|aside from|instead of|out of|greater than|' + - "isn't|(doesn't|does not) (equal|come before|come after|contain)|" + - '(greater|less) than( or equal)?|(starts?|ends|begins?) with|' + - 'contained by|comes (before|after)|a (ref|reference))\\b' - }, - { - token: keywordMapper, - regex: "[a-zA-Z][a-zA-Z0-9_]*\\b" - } - ], - "comment": [ - { - token: "comment", // closing comment - regex: "\\*\\)", - next: "start" - }, { - defaultToken: "comment" - } - ] - } - - this.normalizeRules(); -}; - -oop.inherits(AppleScriptHighlightRules, TextHighlightRules); - -exports.AppleScriptHighlightRules = AppleScriptHighlightRules; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/applescript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/applescript_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; -var AppleScriptHighlightRules = require("./applescript_highlight_rules").AppleScriptHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = AppleScriptHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "--"; - this.blockComment = {start: "(*", end: "*)"}; - this.$id = "ace/mode/applescript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/applescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,i){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,n=function(){var e="about|above|after|against|and|around|as|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|contain|contains|continue|copy|div|does|eighth|else|end|equal|equals|error|every|exit|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|into|is|it|its|last|local|me|middle|mod|my|ninth|not|of|on|onto|or|over|prop|property|put|ref|reference|repeat|returning|script|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|try|until|where|while|whose|with|without",t="AppleScript|false|linefeed|return|pi|quote|result|space|tab|true",i="activate|beep|count|delay|launch|log|offset|read|round|run|say|summarize|write",r="alias|application|boolean|class|constant|date|file|integer|list|number|real|record|string|text|character|characters|contents|day|frontmost|id|item|length|month|name|paragraph|paragraphs|rest|reverse|running|time|version|weekday|word|words|year",o=this.createKeywordMapper({"support.function":i,"constant.language":t,"support.type":r,keyword:e},"identifier");this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",regex:"\\(\\*",next:"comment"},{token:"string",regex:'".*?"'},{token:"support.type",regex:"\\b(POSIX file|POSIX path|(date|time) string|quoted form)\\b"},{token:"support.function",regex:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{token:"constant.language",regex:"\\b(text item delimiters|current application|missing value)\\b"},{token:"keyword",regex:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference))\\b"},{token:o,regex:"[a-zA-Z][a-zA-Z0-9_]*\\b"}],comment:[{token:"comment",regex:"\\*\\)",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()};r.inherits(n,o),t.AppleScriptHighlightRules=n}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,i){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,n=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,n),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,i){var r=e.getLine(i);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,i);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,i,r){var o=e.getLine(i);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,i);var n=o.match(this.foldingStartMarker);if(n){var a=n.index;if(n[1])return this.openingBracketBlock(e,n[1],i,a);var s=e.getCommentFoldRange(i,a+n[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,i):"all"!=t&&(s=null)),s}if("markbegin"!==t){var n=o.match(this.foldingStopMarker);if(n){var a=n.index+n[0].length;return n[1]?this.closingBracketBlock(e,n[1],i,a):e.getCommentFoldRange(i,a,-1)}}},this.getSectionRange=function(e,t){var i=e.getLine(t),r=i.search(/\S/),n=t,a=i.length;t+=1;for(var s=t,l=e.getLength();++tg)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=n)break;if(c.isMultiLine())t=c.end.row;else if(r==g)break}s=t}}return new o(n,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,i){for(var r=t.search(/\s*$/),n=e.getLength(),a=i,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++ia)return new o(a,r,c,t.length)}}.call(a.prototype)}),define("ace/mode/applescript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/applescript_highlight_rules","ace/mode/folding/cstyle"],function(e,t,i){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,n=(e("../tokenizer").Tokenizer,e("./applescript_highlight_rules").AppleScriptHighlightRules),a=e("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=n,this.foldingRules=new a};r.inherits(s,o),function(){this.lineCommentStart="--",this.blockComment={start:"(*",end:"*)"},this.$id="ace/mode/applescript"}.call(s.prototype),t.Mode=s}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-asciidoc.js b/www/js/vendor/ace/mode-asciidoc.js index e80868238..183162f44 100755 --- a/www/js/vendor/ace/mode-asciidoc.js +++ b/www/js/vendor/ace/mode-asciidoc.js @@ -1,342 +1 @@ -define("ace/mode/asciidoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var AsciidocHighlightRules = function() { - var identifierRe = "[a-zA-Z\u00a1-\uffff]+\\b"; - - this.$rules = { - "start": [ - {token: "empty", regex: /$/}, - {token: "literal", regex: /^\.{4,}\s*$/, next: "listingBlock"}, - {token: "literal", regex: /^-{4,}\s*$/, next: "literalBlock"}, - {token: "string", regex: /^\+{4,}\s*$/, next: "passthroughBlock"}, - {token: "keyword", regex: /^={4,}\s*$/}, - {token: "text", regex: /^\s*$/}, - {token: "empty", regex: "", next: "dissallowDelimitedBlock"} - ], - - "dissallowDelimitedBlock": [ - {include: "paragraphEnd"}, - {token: "comment", regex: '^//.+$'}, - {token: "keyword", regex: "^(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION):"}, - - {include: "listStart"}, - {token: "literal", regex: /^\s+.+$/, next: "indentedBlock"}, - {token: "empty", regex: "", next: "text"} - ], - - "paragraphEnd": [ - {token: "doc.comment", regex: /^\/{4,}\s*$/, next: "commentBlock"}, - {token: "tableBlock", regex: /^\s*[|!]=+\s*$/, next: "tableBlock"}, - {token: "keyword", regex: /^(?:--|''')\s*$/, next: "start"}, - {token: "option", regex: /^\[.*\]\s*$/, next: "start"}, - {token: "pageBreak", regex: /^>{3,}$/, next: "start"}, - {token: "literal", regex: /^\.{4,}\s*$/, next: "listingBlock"}, - {token: "titleUnderline", regex: /^(?:={2,}|-{2,}|~{2,}|\^{2,}|\+{2,})\s*$/, next: "start"}, - {token: "singleLineTitle", regex: /^={1,5}\s+\S.*$/, next: "start"}, - - {token: "otherBlock", regex: /^(?:\*{2,}|_{2,})\s*$/, next: "start"}, - {token: "optionalTitle", regex: /^\.[^.\s].+$/, next: "start"} - ], - - "listStart": [ - {token: "keyword", regex: /^\s*(?:\d+\.|[a-zA-Z]\.|[ixvmIXVM]+\)|\*{1,5}|-|\.{1,5})\s/, next: "listText"}, - {token: "meta.tag", regex: /^.+(?::{2,4}|;;)(?: |$)/, next: "listText"}, - {token: "support.function.list.callout", regex: /^(?:<\d+>|\d+>|>) /, next: "text"}, - {token: "keyword", regex: /^\+\s*$/, next: "start"} - ], - - "text": [ - {token: ["link", "variable.language"], regex: /((?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+)(\[.*?\])/}, - {token: "link", regex: /(?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+/}, - {token: "link", regex: /\b[\w\.\/\-]+@[\w\.\/\-]+\b/}, - {include: "macros"}, - {include: "paragraphEnd"}, - {token: "literal", regex:/\+{3,}/, next:"smallPassthrough"}, - {token: "escape", regex: /\((?:C|TM|R)\)|\.{3}|->|<-|=>|<=|&#(?:\d+|x[a-fA-F\d]+);|(?: |^)--(?=\s+\S)/}, - {token: "escape", regex: /\\[_*'`+#]|\\{2}[_*'`+#]{2}/}, - {token: "keyword", regex: /\s\+$/}, - {token: "text", regex: identifierRe}, - {token: ["keyword", "string", "keyword"], - regex: /(<<[\w\d\-$]+,)(.*?)(>>|$)/}, - {token: "keyword", regex: /<<[\w\d\-$]+,?|>>/}, - {token: "constant.character", regex: /\({2,3}.*?\){2,3}/}, - {token: "keyword", regex: /\[\[.+?\]\]/}, - {token: "support", regex: /^\[{3}[\w\d =\-]+\]{3}/}, - - {include: "quotes"}, - {token: "empty", regex: /^\s*$/, next: "start"} - ], - - "listText": [ - {include: "listStart"}, - {include: "text"} - ], - - "indentedBlock": [ - {token: "literal", regex: /^[\s\w].+$/, next: "indentedBlock"}, - {token: "literal", regex: "", next: "start"} - ], - - "listingBlock": [ - {token: "literal", regex: /^\.{4,}\s*$/, next: "dissallowDelimitedBlock"}, - {token: "constant.numeric", regex: '<\\d+>'}, - {token: "literal", regex: '[^<]+'}, - {token: "literal", regex: '<'} - ], - "literalBlock": [ - {token: "literal", regex: /^-{4,}\s*$/, next: "dissallowDelimitedBlock"}, - {token: "constant.numeric", regex: '<\\d+>'}, - {token: "literal", regex: '[^<]+'}, - {token: "literal", regex: '<'} - ], - "passthroughBlock": [ - {token: "literal", regex: /^\+{4,}\s*$/, next: "dissallowDelimitedBlock"}, - {token: "literal", regex: identifierRe + "|\\d+"}, - {include: "macros"}, - {token: "literal", regex: "."} - ], - - "smallPassthrough": [ - {token: "literal", regex: /[+]{3,}/, next: "dissallowDelimitedBlock"}, - {token: "literal", regex: /^\s*$/, next: "dissallowDelimitedBlock"}, - {token: "literal", regex: identifierRe + "|\\d+"}, - {include: "macros"} - ], - - "commentBlock": [ - {token: "doc.comment", regex: /^\/{4,}\s*$/, next: "dissallowDelimitedBlock"}, - {token: "doc.comment", regex: '^.*$'} - ], - "tableBlock": [ - {token: "tableBlock", regex: /^\s*\|={3,}\s*$/, next: "dissallowDelimitedBlock"}, - {token: "tableBlock", regex: /^\s*!={3,}\s*$/, next: "innerTableBlock"}, - {token: "tableBlock", regex: /\|/}, - {include: "text", noEscape: true} - ], - "innerTableBlock": [ - {token: "tableBlock", regex: /^\s*!={3,}\s*$/, next: "tableBlock"}, - {token: "tableBlock", regex: /^\s*|={3,}\s*$/, next: "dissallowDelimitedBlock"}, - {token: "tableBlock", regex: /\!/} - ], - "macros": [ - {token: "macro", regex: /{[\w\-$]+}/}, - {token: ["text", "string", "text", "constant.character", "text"], regex: /({)([\w\-$]+)(:)?(.+)?(})/}, - {token: ["text", "markup.list.macro", "keyword", "string"], regex: /(\w+)(footnote(?:ref)?::?)([^\s\[]+)?(\[.*?\])?/}, - {token: ["markup.list.macro", "keyword", "string"], regex: /([a-zA-Z\-][\w\.\/\-]*::?)([^\s\[]+)(\[.*?\])?/}, - {token: ["markup.list.macro", "keyword"], regex: /([a-zA-Z\-][\w\.\/\-]+::?)(\[.*?\])/}, - {token: "keyword", regex: /^:.+?:(?= |$)/} - ], - - "quotes": [ - {token: "string.italic", regex: /__[^_\s].*?__/}, - {token: "string.italic", regex: quoteRule("_")}, - - {token: "keyword.bold", regex: /\*\*[^*\s].*?\*\*/}, - {token: "keyword.bold", regex: quoteRule("\\*")}, - - {token: "literal", regex: quoteRule("\\+")}, - {token: "literal", regex: /\+\+[^+\s].*?\+\+/}, - {token: "literal", regex: /\$\$.+?\$\$/}, - {token: "literal", regex: quoteRule("`")}, - - {token: "keyword", regex: quoteRule("^")}, - {token: "keyword", regex: quoteRule("~")}, - {token: "keyword", regex: /##?/}, - {token: "keyword", regex: /(?:\B|^)``|\b''/} - ] - - }; - - function quoteRule(ch) { - var prefix = /\w/.test(ch) ? "\\b" : "(?:\\B|^)"; - return prefix + ch + "[^" + ch + "].*?" + ch + "(?![\\w*])"; - } - - var tokenMap = { - macro: "constant.character", - tableBlock: "doc.comment", - titleUnderline: "markup.heading", - singleLineTitle: "markup.heading", - pageBreak: "string", - option: "string.regexp", - otherBlock: "markup.list", - literal: "support.function", - optionalTitle: "constant.numeric", - escape: "constant.language.escape", - link: "markup.underline.list" - }; - - for (var state in this.$rules) { - var stateRules = this.$rules[state]; - for (var i = stateRules.length; i--; ) { - var rule = stateRules[i]; - if (rule.include || typeof rule == "string") { - var args = [i, 1].concat(this.$rules[rule.include || rule]); - if (rule.noEscape) { - args = args.filter(function(x) { - return !x.next; - }); - } - stateRules.splice.apply(stateRules, args); - } else if (rule.token in tokenMap) { - rule.token = tokenMap[rule.token]; - } - } - } -}; -oop.inherits(AsciidocHighlightRules, TextHighlightRules); - -exports.AsciidocHighlightRules = AsciidocHighlightRules; -}); - -define("ace/mode/folding/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - this.foldingStartMarker = /^(?:\|={10,}|[\.\/=\-~^+]{4,}\s*$|={1,5} )/; - this.singleLineHeadingRe = /^={1,5}(?=\s+\S)/; - - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - if (!this.foldingStartMarker.test(line)) - return "" - - if (line[0] == "=") { - if (this.singleLineHeadingRe.test(line)) - return "start"; - if (session.getLine(row - 1).length != session.getLine(row).length) - return ""; - return "start"; - } - if (session.bgTokenizer.getState(row) == "dissallowDelimitedBlock") - return "end"; - return "start"; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var line = session.getLine(row); - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - if (!line.match(this.foldingStartMarker)) - return; - - var token; - function getTokenType(row) { - token = session.getTokens(row)[0]; - return token && token.type; - } - - var levels = ["=","-","~","^","+"]; - var heading = "markup.heading"; - var singleLineHeadingRe = this.singleLineHeadingRe; - function getLevel() { - var match = token.value.match(singleLineHeadingRe); - if (match) - return match[0].length; - var level = levels.indexOf(token.value[0]) + 1; - if (level == 1) { - if (session.getLine(row - 1).length != session.getLine(row).length) - return Infinity; - } - return level; - } - - if (getTokenType(row) == heading) { - var startHeadingLevel = getLevel(); - while (++row < maxRow) { - if (getTokenType(row) != heading) - continue; - var level = getLevel(); - if (level <= startHeadingLevel) - break; - } - - var isSingleLineHeading = token && token.value.match(this.singleLineHeadingRe); - endRow = isSingleLineHeading ? row - 1 : row - 2; - - if (endRow > startRow) { - while (endRow > startRow && (!getTokenType(endRow) || token.value[0] == "[")) - endRow--; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - } else { - var state = session.bgTokenizer.getState(row); - if (state == "dissallowDelimitedBlock") { - while (row -- > 0) { - if (session.bgTokenizer.getState(row).lastIndexOf("Block") == -1) - break; - } - endRow = row + 1; - if (endRow < startRow) { - var endColumn = session.getLine(row).length; - return new Range(endRow, 5, startRow, startColumn - 5); - } - } else { - while (++row < maxRow) { - if (session.bgTokenizer.getState(row) == "dissallowDelimitedBlock") - break; - } - endRow = row; - if (endRow > startRow) { - var endColumn = session.getLine(row).length; - return new Range(startRow, 5, endRow, endColumn - 5); - } - } - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/asciidoc_highlight_rules","ace/mode/folding/asciidoc"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var AsciidocHighlightRules = require("./asciidoc_highlight_rules").AsciidocHighlightRules; -var AsciidocFoldMode = require("./folding/asciidoc").FoldMode; - -var Mode = function() { - this.HighlightRules = AsciidocHighlightRules; - - this.foldingRules = new AsciidocFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.type = "text"; - this.getNextLineIndent = function(state, line, tab) { - if (state == "listblock") { - var match = /^((?:.+)?)([-+*][ ]+)/.exec(line); - if (match) { - return new Array(match[1].length + 1).join(" ") + match[2]; - } else { - return ""; - } - } else { - return this.$getIndent(line); - } - }; - this.$id = "ace/mode/asciidoc"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/asciidoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){function e(e){var t=/\w/.test(e)?"\\b":"(?:\\B|^)";return t+e+"[^"+e+"].*?"+e+"(?![\\w*])"}var t="[a-zA-Z¡-￿]+\\b";this.$rules={start:[{token:"empty",regex:/$/},{token:"literal",regex:/^\.{4,}\s*$/,next:"listingBlock"},{token:"literal",regex:/^-{4,}\s*$/,next:"literalBlock"},{token:"string",regex:/^\+{4,}\s*$/,next:"passthroughBlock"},{token:"keyword",regex:/^={4,}\s*$/},{token:"text",regex:/^\s*$/},{token:"empty",regex:"",next:"dissallowDelimitedBlock"}],dissallowDelimitedBlock:[{include:"paragraphEnd"},{token:"comment",regex:"^//.+$"},{token:"keyword",regex:"^(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION):"},{include:"listStart"},{token:"literal",regex:/^\s+.+$/,next:"indentedBlock"},{token:"empty",regex:"",next:"text"}],paragraphEnd:[{token:"doc.comment",regex:/^\/{4,}\s*$/,next:"commentBlock"},{token:"tableBlock",regex:/^\s*[|!]=+\s*$/,next:"tableBlock"},{token:"keyword",regex:/^(?:--|''')\s*$/,next:"start"},{token:"option",regex:/^\[.*\]\s*$/,next:"start"},{token:"pageBreak",regex:/^>{3,}$/,next:"start"},{token:"literal",regex:/^\.{4,}\s*$/,next:"listingBlock"},{token:"titleUnderline",regex:/^(?:={2,}|-{2,}|~{2,}|\^{2,}|\+{2,})\s*$/,next:"start"},{token:"singleLineTitle",regex:/^={1,5}\s+\S.*$/,next:"start"},{token:"otherBlock",regex:/^(?:\*{2,}|_{2,})\s*$/,next:"start"},{token:"optionalTitle",regex:/^\.[^.\s].+$/,next:"start"}],listStart:[{token:"keyword",regex:/^\s*(?:\d+\.|[a-zA-Z]\.|[ixvmIXVM]+\)|\*{1,5}|-|\.{1,5})\s/,next:"listText"},{token:"meta.tag",regex:/^.+(?::{2,4}|;;)(?: |$)/,next:"listText"},{token:"support.function.list.callout",regex:/^(?:<\d+>|\d+>|>) /,next:"text"},{token:"keyword",regex:/^\+\s*$/,next:"start"}],text:[{token:["link","variable.language"],regex:/((?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+)(\[.*?\])/},{token:"link",regex:/(?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+/},{token:"link",regex:/\b[\w\.\/\-]+@[\w\.\/\-]+\b/},{include:"macros"},{include:"paragraphEnd"},{token:"literal",regex:/\+{3,}/,next:"smallPassthrough"},{token:"escape",regex:/\((?:C|TM|R)\)|\.{3}|->|<-|=>|<=|&#(?:\d+|x[a-fA-F\d]+);|(?: |^)--(?=\s+\S)/},{token:"escape",regex:/\\[_*'`+#]|\\{2}[_*'`+#]{2}/},{token:"keyword",regex:/\s\+$/},{token:"text",regex:t},{token:["keyword","string","keyword"],regex:/(<<[\w\d\-$]+,)(.*?)(>>|$)/},{token:"keyword",regex:/<<[\w\d\-$]+,?|>>/},{token:"constant.character",regex:/\({2,3}.*?\){2,3}/},{token:"keyword",regex:/\[\[.+?\]\]/},{token:"support",regex:/^\[{3}[\w\d =\-]+\]{3}/},{include:"quotes"},{token:"empty",regex:/^\s*$/,next:"start"}],listText:[{include:"listStart"},{include:"text"}],indentedBlock:[{token:"literal",regex:/^[\s\w].+$/,next:"indentedBlock"},{token:"literal",regex:"",next:"start"}],listingBlock:[{token:"literal",regex:/^\.{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"constant.numeric",regex:"<\\d+>"},{token:"literal",regex:"[^<]+"},{token:"literal",regex:"<"}],literalBlock:[{token:"literal",regex:/^-{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"constant.numeric",regex:"<\\d+>"},{token:"literal",regex:"[^<]+"},{token:"literal",regex:"<"}],passthroughBlock:[{token:"literal",regex:/^\+{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"literal",regex:t+"|\\d+"},{include:"macros"},{token:"literal",regex:"."}],smallPassthrough:[{token:"literal",regex:/[+]{3,}/,next:"dissallowDelimitedBlock"},{token:"literal",regex:/^\s*$/,next:"dissallowDelimitedBlock"},{token:"literal",regex:t+"|\\d+"},{include:"macros"}],commentBlock:[{token:"doc.comment",regex:/^\/{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"doc.comment",regex:"^.*$"}],tableBlock:[{token:"tableBlock",regex:/^\s*\|={3,}\s*$/,next:"dissallowDelimitedBlock"},{token:"tableBlock",regex:/^\s*!={3,}\s*$/,next:"innerTableBlock"},{token:"tableBlock",regex:/\|/},{include:"text",noEscape:!0}],innerTableBlock:[{token:"tableBlock",regex:/^\s*!={3,}\s*$/,next:"tableBlock"},{token:"tableBlock",regex:/^\s*|={3,}\s*$/,next:"dissallowDelimitedBlock"},{token:"tableBlock",regex:/\!/}],macros:[{token:"macro",regex:/{[\w\-$]+}/},{token:["text","string","text","constant.character","text"],regex:/({)([\w\-$]+)(:)?(.+)?(})/},{token:["text","markup.list.macro","keyword","string"],regex:/(\w+)(footnote(?:ref)?::?)([^\s\[]+)?(\[.*?\])?/},{token:["markup.list.macro","keyword","string"],regex:/([a-zA-Z\-][\w\.\/\-]*::?)([^\s\[]+)(\[.*?\])?/},{token:["markup.list.macro","keyword"],regex:/([a-zA-Z\-][\w\.\/\-]+::?)(\[.*?\])/},{token:"keyword",regex:/^:.+?:(?= |$)/}],quotes:[{token:"string.italic",regex:/__[^_\s].*?__/},{token:"string.italic",regex:e("_")},{token:"keyword.bold",regex:/\*\*[^*\s].*?\*\*/},{token:"keyword.bold",regex:e("\\*")},{token:"literal",regex:e("\\+")},{token:"literal",regex:/\+\+[^+\s].*?\+\+/},{token:"literal",regex:/\$\$.+?\$\$/},{token:"literal",regex:e("`")},{token:"keyword",regex:e("^")},{token:"keyword",regex:e("~")},{token:"keyword",regex:/##?/},{token:"keyword",regex:/(?:\B|^)``|\b''/}]};var n={macro:"constant.character",tableBlock:"doc.comment",titleUnderline:"markup.heading",singleLineTitle:"markup.heading",pageBreak:"string",option:"string.regexp",otherBlock:"markup.list",literal:"support.function",optionalTitle:"constant.numeric",escape:"constant.language.escape",link:"markup.underline.list"};for(var o in this.$rules)for(var r=this.$rules[o],i=r.length;i--;){var l=r[i];if(l.include||"string"==typeof l){var a=[i,1].concat(this.$rules[l.include||l]);l.noEscape&&(a=a.filter(function(e){return!e.next})),r.splice.apply(r,a)}else l.token in n&&(l.token=n[l.token])}};o.inherits(i,r),t.AsciidocHighlightRules=i}),define("ace/mode/folding/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./fold_mode").FoldMode,i=e("../../range").Range,l=t.FoldMode=function(){};o.inherits(l,r),function(){this.foldingStartMarker=/^(?:\|={10,}|[\.\/=\-~^+]{4,}\s*$|={1,5} )/,this.singleLineHeadingRe=/^={1,5}(?=\s+\S)/,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);return this.foldingStartMarker.test(o)?"="==o[0]?this.singleLineHeadingRe.test(o)?"start":e.getLine(n-1).length!=e.getLine(n).length?"":"start":"dissallowDelimitedBlock"==e.bgTokenizer.getState(n)?"end":"start":""},this.getFoldWidgetRange=function(e,t,n){function o(t){return c=e.getTokens(t)[0],c&&c.type}function r(){var t=c.value.match(u);if(t)return t[0].length;var o=d.indexOf(c.value[0])+1;return 1==o&&e.getLine(n-1).length!=e.getLine(n).length?1/0:o}var l=e.getLine(n),a=l.length,s=e.getLength(),g=n,k=n;if(l.match(this.foldingStartMarker)){var c,d=["=","-","~","^","+"],x="markup.heading",u=this.singleLineHeadingRe;if(o(n)==x){for(var h=r();++ng)for(;k>g&&(!o(k)||"["==c.value[0]);)k--;if(k>g){var f=e.getLine(k).length;return new i(g,a,k,f)}}else{var w=e.bgTokenizer.getState(n);if("dissallowDelimitedBlock"==w){for(;n-- >0&&e.bgTokenizer.getState(n).lastIndexOf("Block")!=-1;);if(k=n+1,kg){var f=e.getLine(n).length;return new i(g,5,k,f-5)}}}}}}.call(l.prototype)}),define("ace/mode/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/asciidoc_highlight_rules","ace/mode/folding/asciidoc"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./asciidoc_highlight_rules").AsciidocHighlightRules,l=e("./folding/asciidoc").FoldMode,a=function(){this.HighlightRules=i,this.foldingRules=new l};o.inherits(a,r),function(){this.type="text",this.getNextLineIndent=function(e,t,n){if("listblock"==e){var o=/^((?:.+)?)([-+*][ ]+)/.exec(t);return o?new Array(o[1].length+1).join(" ")+o[2]:""}return this.$getIndent(t)},this.$id="ace/mode/asciidoc"}.call(a.prototype),t.Mode=a}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-assembly_x86.js b/www/js/vendor/ace/mode-assembly_x86.js index 2cfffae6c..978dae538 100755 --- a/www/js/vendor/ace/mode-assembly_x86.js +++ b/www/js/vendor/ace/mode-assembly_x86.js @@ -1,185 +1 @@ -define("ace/mode/assembly_x86_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var AssemblyX86HighlightRules = function() { - - this.$rules = { start: - [ { token: 'keyword.control.assembly', - regex: '\\b(?:aaa|aad|aam|aas|adc|add|addpd|addps|addsd|addss|addsubpd|addsubps|aesdec|aesdeclast|aesenc|aesenclast|aesimc|aeskeygenassist|and|andpd|andps|andnpd|andnps|arpl|blendpd|blendps|blendvpd|blendvps|bound|bsf|bsr|bswap|bt|btc|btr|bts|cbw|cwde|cdqe|clc|cld|cflush|clts|cmc|cmov(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|cmp|cmppd|cmpps|cmps|cnpsb|cmpsw|cmpsd|cmpsq|cmpss|cmpxchg|cmpxchg8b|cmpxchg16b|comisd|comiss|cpuid|crc32|cvtdq2pd|cvtdq2ps|cvtpd2dq|cvtpd2pi|cvtpd2ps|cvtpi2pd|cvtpi2ps|cvtps2dq|cvtps2pd|cvtps2pi|cvtsd2si|cvtsd2ss|cvts2sd|cvtsi2ss|cvtss2sd|cvtss2si|cvttpd2dq|cvtpd2pi|cvttps2dq|cvttps2pi|cvttps2dq|cvttps2pi|cvttsd2si|cvttss2si|cwd|cdq|cqo|daa|das|dec|div|divpd|divps|divsd|divss|dppd|dpps|emms|enter|extractps|f2xm1|fabs|fadd|faddp|fiadd|fbld|fbstp|fchs|fclex|fnclex|fcmov(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|fcom|fcmop|fcompp|fcomi|fcomip|fucomi|fucomip|fcos|fdecstp|fdiv|fdivp|fidiv|fdivr|fdivrp|fidivr|ffree|ficom|ficomp|fild|fincstp|finit|fnint|fist|fistp|fisttp|fld|fld1|fldl2t|fldl2e|fldpi|fldlg2|fldln2|fldz|fldcw|fldenv|fmul|fmulp|fimul|fnop|fpatan|fprem|fprem1|fptan|frndint|frstor|fsave|fnsave|fscale|fsin|fsincos|fsqrt|fst|fstp|fstcw|fnstcw|fstenv|fnstenv|fsts|fnstsw|fsub|fsubp|fisub|fsubr|fsubrp|fisubr|ftst|fucom|fucomp|fucompp|fxam|fxch|fxrstor|fxsave|fxtract|fyl2x|fyl2xp1|haddpd|haddps|husbpd|hsubps|idiv|imul|in|inc|ins|insb|insw|insd|insertps|int|into|invd|invplg|invpcid|iret|iretd|iretq|lahf|lar|lddqu|ldmxcsr|lds|les|lfs|lgs|lss|lea|leave|lfence|lgdt|lidt|llgdt|lmsw|lock|lods|lodsb|lodsw|lodsd|lodsq|lsl|ltr|maskmovdqu|maskmovq|maxpd|maxps|maxsd|maxss|mfence|minpd|minps|minsd|minss|monitor|mov|movapd|movaps|movbe|movd|movq|movddup|movdqa|movdqu|movq2q|movhlps|movhpd|movhps|movlhps|movlpd|movlps|movmskpd|movmskps|movntdqa|movntdq|movnti|movntpd|movntps|movntq|movq|movq2dq|movs|movsb|movsw|movsd|movsq|movsd|movshdup|movsldup|movss|movsx|movsxd|movupd|movups|movzx|mpsadbw|mul|mulpd|mulps|mulsd|mulss|mwait|neg|not|or|orpd|orps|out|outs|outsb|outsw|outsd|pabsb|pabsw|pabsd|packsswb|packssdw|packusdw|packuswbpaddb|paddw|paddd|paddq|paddsb|paddsw|paddusb|paddusw|palignr|pand|pandn|pause|pavgb|pavgw|pblendvb|pblendw|pclmulqdq|pcmpeqb|pcmpeqw|pcmpeqd|pcmpeqq|pcmpestri|pcmpestrm|pcmptb|pcmptgw|pcmpgtd|pcmpgtq|pcmpistri|pcmpisrm|pextrb|pextrd|pextrq|pextrw|phaddw|phaddd|phaddsw|phinposuw|phsubw|phsubd|phsubsw|pinsrb|pinsrd|pinsrq|pinsrw|pmaddubsw|pmadddwd|pmaxsb|pmaxsd|pmaxsw|pmaxsw|pmaxub|pmaxud|pmaxuw|pminsb|pminsd|pminsw|pminub|pminud|pminuw|pmovmskb|pmovsx|pmovzx|pmuldq|pmulhrsw|pmulhuw|pmulhw|pmulld|pmullw|pmuludw|pop|popa|popad|popcnt|popf|popfd|popfq|por|prefetch|psadbw|pshufb|pshufd|pshufhw|pshuflw|pshufw|psignb|psignw|psignd|pslldq|psllw|pslld|psllq|psraw|psrad|psrldq|psrlw|psrld|psrlq|psubb|psubw|psubd|psubq|psubsb|psubsw|psubusb|psubusw|test|ptest|punpckhbw|punpckhwd|punpckhdq|punpckhddq|punpcklbw|punpcklwd|punpckldq|punpckldqd|push|pusha|pushad|pushf|pushfd|pxor|prcl|rcr|rol|ror|rcpps|rcpss|rdfsbase|rdgsbase|rdmsr|rdpmc|rdrand|rdtsc|rdtscp|rep|repe|repz|repne|repnz|roundpd|roundps|roundsd|roundss|rsm|rsqrps|rsqrtss|sahf|sal|sar|shl|shr|sbb|scas|scasb|scasw|scasd|set(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|sfence|sgdt|shld|shrd|shufpd|shufps|sidt|sldt|smsw|sqrtpd|sqrtps|sqrtsd|sqrtss|stc|std|stmxcsr|stos|stosb|stosw|stosd|stosq|str|sub|subpd|subps|subsd|subss|swapgs|syscall|sysenter|sysexit|sysret|teset|ucomisd|ucomiss|ud2|unpckhpd|unpckhps|unpcklpd|unpcklps|vbroadcast|vcvtph2ps|vcvtp2sph|verr|verw|vextractf128|vinsertf128|vmaskmov|vpermilpd|vpermilps|vperm2f128|vtestpd|vtestps|vzeroall|vzeroupper|wait|fwait|wbinvd|wrfsbase|wrgsbase|wrmsr|xadd|xchg|xgetbv|xlat|xlatb|xor|xorpd|xorps|xrstor|xsave|xsaveopt|xsetbv|lzcnt|extrq|insertq|movntsd|movntss|vfmaddpd|vfmaddps|vfmaddsd|vfmaddss|vfmaddsubbpd|vfmaddsubps|vfmsubaddpd|vfmsubaddps|vfmsubpd|vfmsubps|vfmsubsd|vfnmaddpd|vfnmaddps|vfnmaddsd|vfnmaddss|vfnmsubpd|vfnmusbps|vfnmusbsd|vfnmusbss|cvt|xor|cli|sti|hlt|nop|lock|wait|enter|leave|ret|loop(?:n?e|n?z)?|call|j(?:mp|n?e|ge?|ae?|le?|be?|n?o|n?z))\\b', - caseInsensitive: true }, - { token: 'variable.parameter.register.assembly', - regex: '\\b(?:CS|DS|ES|FS|GS|SS|RAX|EAX|RBX|EBX|RCX|ECX|RDX|EDX|RCX|RIP|EIP|IP|RSP|ESP|SP|RSI|ESI|SI|RDI|EDI|DI|RFLAGS|EFLAGS|FLAGS|R8-15|(?:Y|X)MM(?:[0-9]|10|11|12|13|14|15)|(?:A|B|C|D)(?:X|H|L)|CR(?:[0-4]|DR(?:[0-7]|TR6|TR7|EFER)))\\b', - caseInsensitive: true }, - { token: 'constant.character.decimal.assembly', - regex: '\\b[0-9]+\\b' }, - { token: 'constant.character.hexadecimal.assembly', - regex: '\\b0x[A-F0-9]+\\b', - caseInsensitive: true }, - { token: 'constant.character.hexadecimal.assembly', - regex: '\\b[A-F0-9]+h\\b', - caseInsensitive: true }, - { token: 'string.assembly', regex: /'([^\\']|\\.)*'/ }, - { token: 'string.assembly', regex: /"([^\\"]|\\.)*"/ }, - { token: 'support.function.directive.assembly', - regex: '^\\[', - push: - [ { token: 'support.function.directive.assembly', - regex: '\\]$', - next: 'pop' }, - { defaultToken: 'support.function.directive.assembly' } ] }, - { token: - [ 'support.function.directive.assembly', - 'support.function.directive.assembly', - 'entity.name.function.assembly' ], - regex: '(^struc)( )([_a-zA-Z][_a-zA-Z0-9]*)' }, - { token: 'support.function.directive.assembly', - regex: '^endstruc\\b' }, - { token: - [ 'support.function.directive.assembly', - 'entity.name.function.assembly', - 'support.function.directive.assembly', - 'constant.character.assembly' ], - regex: '^(%macro )([_a-zA-Z][_a-zA-Z0-9]*)( )([0-9]+)' }, - { token: 'support.function.directive.assembly', - regex: '^%endmacro' }, - { token: - [ 'text', - 'support.function.directive.assembly', - 'text', - 'entity.name.function.assembly' ], - regex: '(\\s*)(%define|%xdefine|%idefine|%undef|%assign|%defstr|%strcat|%strlen|%substr|%00|%0|%rotate|%rep|%endrep|%include|\\$\\$|\\$|%unmacro|%if|%elif|%else|%endif|%(?:el)?ifdef|%(?:el)?ifmacro|%(?:el)?ifctx|%(?:el)?ifidn|%(?:el)?ifidni|%(?:el)?ifid|%(?:el)?ifnum|%(?:el)?ifstr|%(?:el)?iftoken|%(?:el)?ifempty|%(?:el)?ifenv|%pathsearch|%depend|%use|%push|%pop|%repl|%arg|%stacksize|%local|%error|%warning|%fatal|%line|%!|%comment|%endcomment|__NASM_VERSION_ID__|__NASM_VER__|__FILE__|__LINE__|__BITS__|__OUTPUT_FORMAT__|__DATE__|__TIME__|__DATE_NUM__|_TIME__NUM__|__UTC_DATE__|__UTC_TIME__|__UTC_DATE_NUM__|__UTC_TIME_NUM__|__POSIX_TIME__|__PASS__|ISTRUC|AT|IEND|BITS 16|BITS 32|BITS 64|USE16|USE32|__SECT__|ABSOLUTE|EXTERN|GLOBAL|COMMON|CPU|FLOAT)\\b( ?)((?:[_a-zA-Z][_a-zA-Z0-9]*)?)', - caseInsensitive: true }, - { token: 'support.function.directive.assembly', - regex: '\\b(?:d[bwdqtoy]|res[bwdqto]|equ|times|align|alignb|sectalign|section|ptr|byte|word|dword|qword|incbin)\\b', - caseInsensitive: true }, - { token: 'entity.name.function.assembly', regex: '^\\s*%%[\\w.]+?:$' }, - { token: 'entity.name.function.assembly', regex: '^\\s*%\\$[\\w.]+?:$' }, - { token: 'entity.name.function.assembly', regex: '^[\\w.]+?:' }, - { token: 'entity.name.function.assembly', regex: '^[\\w.]+?\\b' }, - { token: 'comment.assembly', regex: ';.*$' } ] - } - - this.normalizeRules(); -}; - -AssemblyX86HighlightRules.metaData = { fileTypes: [ 'asm' ], - name: 'Assembly x86', - scopeName: 'source.assembly' } - - -oop.inherits(AssemblyX86HighlightRules, TextHighlightRules); - -exports.AssemblyX86HighlightRules = AssemblyX86HighlightRules; -}); - -define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/assembly_x86",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/assembly_x86_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var AssemblyX86HighlightRules = require("./assembly_x86_highlight_rules").AssemblyX86HighlightRules; -var FoldMode = require("./folding/coffee").FoldMode; - -var Mode = function() { - this.HighlightRules = AssemblyX86HighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = ";"; - this.$id = "ace/mode/assembly_x86"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/assembly_x86_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(s,e,t){"use strict";var d=s("../lib/oop"),p=s("./text_highlight_rules").TextHighlightRules,n=function(){this.$rules={start:[{token:"keyword.control.assembly",regex:"\\b(?:aaa|aad|aam|aas|adc|add|addpd|addps|addsd|addss|addsubpd|addsubps|aesdec|aesdeclast|aesenc|aesenclast|aesimc|aeskeygenassist|and|andpd|andps|andnpd|andnps|arpl|blendpd|blendps|blendvpd|blendvps|bound|bsf|bsr|bswap|bt|btc|btr|bts|cbw|cwde|cdqe|clc|cld|cflush|clts|cmc|cmov(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|cmp|cmppd|cmpps|cmps|cnpsb|cmpsw|cmpsd|cmpsq|cmpss|cmpxchg|cmpxchg8b|cmpxchg16b|comisd|comiss|cpuid|crc32|cvtdq2pd|cvtdq2ps|cvtpd2dq|cvtpd2pi|cvtpd2ps|cvtpi2pd|cvtpi2ps|cvtps2dq|cvtps2pd|cvtps2pi|cvtsd2si|cvtsd2ss|cvts2sd|cvtsi2ss|cvtss2sd|cvtss2si|cvttpd2dq|cvtpd2pi|cvttps2dq|cvttps2pi|cvttps2dq|cvttps2pi|cvttsd2si|cvttss2si|cwd|cdq|cqo|daa|das|dec|div|divpd|divps|divsd|divss|dppd|dpps|emms|enter|extractps|f2xm1|fabs|fadd|faddp|fiadd|fbld|fbstp|fchs|fclex|fnclex|fcmov(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|fcom|fcmop|fcompp|fcomi|fcomip|fucomi|fucomip|fcos|fdecstp|fdiv|fdivp|fidiv|fdivr|fdivrp|fidivr|ffree|ficom|ficomp|fild|fincstp|finit|fnint|fist|fistp|fisttp|fld|fld1|fldl2t|fldl2e|fldpi|fldlg2|fldln2|fldz|fldcw|fldenv|fmul|fmulp|fimul|fnop|fpatan|fprem|fprem1|fptan|frndint|frstor|fsave|fnsave|fscale|fsin|fsincos|fsqrt|fst|fstp|fstcw|fnstcw|fstenv|fnstenv|fsts|fnstsw|fsub|fsubp|fisub|fsubr|fsubrp|fisubr|ftst|fucom|fucomp|fucompp|fxam|fxch|fxrstor|fxsave|fxtract|fyl2x|fyl2xp1|haddpd|haddps|husbpd|hsubps|idiv|imul|in|inc|ins|insb|insw|insd|insertps|int|into|invd|invplg|invpcid|iret|iretd|iretq|lahf|lar|lddqu|ldmxcsr|lds|les|lfs|lgs|lss|lea|leave|lfence|lgdt|lidt|llgdt|lmsw|lock|lods|lodsb|lodsw|lodsd|lodsq|lsl|ltr|maskmovdqu|maskmovq|maxpd|maxps|maxsd|maxss|mfence|minpd|minps|minsd|minss|monitor|mov|movapd|movaps|movbe|movd|movq|movddup|movdqa|movdqu|movq2q|movhlps|movhpd|movhps|movlhps|movlpd|movlps|movmskpd|movmskps|movntdqa|movntdq|movnti|movntpd|movntps|movntq|movq|movq2dq|movs|movsb|movsw|movsd|movsq|movsd|movshdup|movsldup|movss|movsx|movsxd|movupd|movups|movzx|mpsadbw|mul|mulpd|mulps|mulsd|mulss|mwait|neg|not|or|orpd|orps|out|outs|outsb|outsw|outsd|pabsb|pabsw|pabsd|packsswb|packssdw|packusdw|packuswbpaddb|paddw|paddd|paddq|paddsb|paddsw|paddusb|paddusw|palignr|pand|pandn|pause|pavgb|pavgw|pblendvb|pblendw|pclmulqdq|pcmpeqb|pcmpeqw|pcmpeqd|pcmpeqq|pcmpestri|pcmpestrm|pcmptb|pcmptgw|pcmpgtd|pcmpgtq|pcmpistri|pcmpisrm|pextrb|pextrd|pextrq|pextrw|phaddw|phaddd|phaddsw|phinposuw|phsubw|phsubd|phsubsw|pinsrb|pinsrd|pinsrq|pinsrw|pmaddubsw|pmadddwd|pmaxsb|pmaxsd|pmaxsw|pmaxsw|pmaxub|pmaxud|pmaxuw|pminsb|pminsd|pminsw|pminub|pminud|pminuw|pmovmskb|pmovsx|pmovzx|pmuldq|pmulhrsw|pmulhuw|pmulhw|pmulld|pmullw|pmuludw|pop|popa|popad|popcnt|popf|popfd|popfq|por|prefetch|psadbw|pshufb|pshufd|pshufhw|pshuflw|pshufw|psignb|psignw|psignd|pslldq|psllw|pslld|psllq|psraw|psrad|psrldq|psrlw|psrld|psrlq|psubb|psubw|psubd|psubq|psubsb|psubsw|psubusb|psubusw|test|ptest|punpckhbw|punpckhwd|punpckhdq|punpckhddq|punpcklbw|punpcklwd|punpckldq|punpckldqd|push|pusha|pushad|pushf|pushfd|pxor|prcl|rcr|rol|ror|rcpps|rcpss|rdfsbase|rdgsbase|rdmsr|rdpmc|rdrand|rdtsc|rdtscp|rep|repe|repz|repne|repnz|roundpd|roundps|roundsd|roundss|rsm|rsqrps|rsqrtss|sahf|sal|sar|shl|shr|sbb|scas|scasb|scasw|scasd|set(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|sfence|sgdt|shld|shrd|shufpd|shufps|sidt|sldt|smsw|sqrtpd|sqrtps|sqrtsd|sqrtss|stc|std|stmxcsr|stos|stosb|stosw|stosd|stosq|str|sub|subpd|subps|subsd|subss|swapgs|syscall|sysenter|sysexit|sysret|teset|ucomisd|ucomiss|ud2|unpckhpd|unpckhps|unpcklpd|unpcklps|vbroadcast|vcvtph2ps|vcvtp2sph|verr|verw|vextractf128|vinsertf128|vmaskmov|vpermilpd|vpermilps|vperm2f128|vtestpd|vtestps|vzeroall|vzeroupper|wait|fwait|wbinvd|wrfsbase|wrgsbase|wrmsr|xadd|xchg|xgetbv|xlat|xlatb|xor|xorpd|xorps|xrstor|xsave|xsaveopt|xsetbv|lzcnt|extrq|insertq|movntsd|movntss|vfmaddpd|vfmaddps|vfmaddsd|vfmaddss|vfmaddsubbpd|vfmaddsubps|vfmsubaddpd|vfmsubaddps|vfmsubpd|vfmsubps|vfmsubsd|vfnmaddpd|vfnmaddps|vfnmaddsd|vfnmaddss|vfnmsubpd|vfnmusbps|vfnmusbsd|vfnmusbss|cvt|xor|cli|sti|hlt|nop|lock|wait|enter|leave|ret|loop(?:n?e|n?z)?|call|j(?:mp|n?e|ge?|ae?|le?|be?|n?o|n?z))\\b",caseInsensitive:!0},{token:"variable.parameter.register.assembly",regex:"\\b(?:CS|DS|ES|FS|GS|SS|RAX|EAX|RBX|EBX|RCX|ECX|RDX|EDX|RCX|RIP|EIP|IP|RSP|ESP|SP|RSI|ESI|SI|RDI|EDI|DI|RFLAGS|EFLAGS|FLAGS|R8-15|(?:Y|X)MM(?:[0-9]|10|11|12|13|14|15)|(?:A|B|C|D)(?:X|H|L)|CR(?:[0-4]|DR(?:[0-7]|TR6|TR7|EFER)))\\b",caseInsensitive:!0},{token:"constant.character.decimal.assembly",regex:"\\b[0-9]+\\b"},{token:"constant.character.hexadecimal.assembly",regex:"\\b0x[A-F0-9]+\\b",caseInsensitive:!0},{token:"constant.character.hexadecimal.assembly",regex:"\\b[A-F0-9]+h\\b",caseInsensitive:!0},{token:"string.assembly",regex:/'([^\\']|\\.)*'/},{token:"string.assembly",regex:/"([^\\"]|\\.)*"/},{token:"support.function.directive.assembly",regex:"^\\[",push:[{token:"support.function.directive.assembly",regex:"\\]$",next:"pop"},{defaultToken:"support.function.directive.assembly"}]},{token:["support.function.directive.assembly","support.function.directive.assembly","entity.name.function.assembly"],regex:"(^struc)( )([_a-zA-Z][_a-zA-Z0-9]*)"},{token:"support.function.directive.assembly",regex:"^endstruc\\b"},{token:["support.function.directive.assembly","entity.name.function.assembly","support.function.directive.assembly","constant.character.assembly"],regex:"^(%macro )([_a-zA-Z][_a-zA-Z0-9]*)( )([0-9]+)"},{token:"support.function.directive.assembly",regex:"^%endmacro"},{token:["text","support.function.directive.assembly","text","entity.name.function.assembly"],regex:"(\\s*)(%define|%xdefine|%idefine|%undef|%assign|%defstr|%strcat|%strlen|%substr|%00|%0|%rotate|%rep|%endrep|%include|\\$\\$|\\$|%unmacro|%if|%elif|%else|%endif|%(?:el)?ifdef|%(?:el)?ifmacro|%(?:el)?ifctx|%(?:el)?ifidn|%(?:el)?ifidni|%(?:el)?ifid|%(?:el)?ifnum|%(?:el)?ifstr|%(?:el)?iftoken|%(?:el)?ifempty|%(?:el)?ifenv|%pathsearch|%depend|%use|%push|%pop|%repl|%arg|%stacksize|%local|%error|%warning|%fatal|%line|%!|%comment|%endcomment|__NASM_VERSION_ID__|__NASM_VER__|__FILE__|__LINE__|__BITS__|__OUTPUT_FORMAT__|__DATE__|__TIME__|__DATE_NUM__|_TIME__NUM__|__UTC_DATE__|__UTC_TIME__|__UTC_DATE_NUM__|__UTC_TIME_NUM__|__POSIX_TIME__|__PASS__|ISTRUC|AT|IEND|BITS 16|BITS 32|BITS 64|USE16|USE32|__SECT__|ABSOLUTE|EXTERN|GLOBAL|COMMON|CPU|FLOAT)\\b( ?)((?:[_a-zA-Z][_a-zA-Z0-9]*)?)",caseInsensitive:!0},{token:"support.function.directive.assembly",regex:"\\b(?:d[bwdqtoy]|res[bwdqto]|equ|times|align|alignb|sectalign|section|ptr|byte|word|dword|qword|incbin)\\b",caseInsensitive:!0},{token:"entity.name.function.assembly",regex:"^\\s*%%[\\w.]+?:$"},{token:"entity.name.function.assembly",regex:"^\\s*%\\$[\\w.]+?:$"},{token:"entity.name.function.assembly",regex:"^[\\w.]+?:"},{token:"entity.name.function.assembly",regex:"^[\\w.]+?\\b"},{token:"comment.assembly",regex:";.*$"}]},this.normalizeRules()};n.metaData={fileTypes:["asm"],name:"Assembly x86",scopeName:"source.assembly"},d.inherits(n,p),e.AssemblyX86HighlightRules=n}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(s,e,t){"use strict";var d=s("../../lib/oop"),p=s("./fold_mode").FoldMode,n=s("../../range").Range,i=e.FoldMode=function(){};d.inherits(i,p),function(){this.getFoldWidgetRange=function(s,e,t){var d=this.indentationBlock(s,t);if(d)return d;var p=/\S/,i=s.getLine(t),a=i.search(p);if(a!=-1&&"#"==i[a]){for(var o=i.length,r=s.getLength(),c=t,m=t;++tc){var f=s.getLine(m).length;return new n(c,o,m,f)}}},this.getFoldWidget=function(s,e,t){var d=s.getLine(t),p=d.search(/\S/),n=s.getLine(t+1),i=s.getLine(t-1),a=i.search(/\S/),o=n.search(/\S/);if(p==-1)return s.foldWidgets[t-1]=a!=-1&&a|:=|<|>|\\*|\\/|\\+|:|\\?|\\-' }, - { token: 'punctuation.ahk', - regex: '#|`|::|,|\\{|\\}|\\(|\\)|\\%' }, - { token: - [ 'punctuation.quote.double', - 'string.quoted.ahk', - 'punctuation.quote.double' ], - regex: '(")((?:[^"]|"")*)(")' }, - { token: [ 'label.ahk', 'punctuation.definition.label.ahk' ], - regex: '^([^: ]+)(:)(?!:)' } ] } - - this.normalizeRules(); -}; - -AutoHotKeyHighlightRules.metaData = { name: 'AutoHotKey', - scopeName: 'source.ahk', - fileTypes: [ 'ahk' ], - foldingStartMarker: '^\\s*/\\*|^(?![^{]*?;|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|;|/\\*(?!.*?\\*/.*\\S))', - foldingStopMarker: '^\\s*\\*/|^\\s*\\}' } - - -oop.inherits(AutoHotKeyHighlightRules, TextHighlightRules); - -exports.AutoHotKeyHighlightRules = AutoHotKeyHighlightRules; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/autohotkey",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/autohotkey_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var AutoHotKeyHighlightRules = require("./autohotkey_highlight_rules").AutoHotKeyHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = AutoHotKeyHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = ";"; - this.blockComment = {start: "/*", end: "*/"}; - this.$id = "ace/mode/autohotkey"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/autohotkey_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var o=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,l=function(){var e="And|ByRef|Case|Const|ContinueCase|ContinueLoop|Default|Dim|Do|Else|ElseIf|EndFunc|EndIf|EndSelect|EndSwitch|EndWith|Enum|Exit|ExitLoop|False|For|Func|Global|If|In|Local|Next|Not|Or|ReDim|Return|Select|Step|Switch|Then|To|True|Until|WEnd|While|With|Abs|ACos|AdlibDisable|AdlibEnable|Asc|AscW|ASin|Assign|ATan|AutoItSetOption|AutoItWinGetTitle|AutoItWinSetTitle|Beep|Binary|BinaryLen|BinaryMid|BinaryToString|BitAND|BitNOT|BitOR|BitRotate|BitShift|BitXOR|BlockInput|Break|Call|CDTray|Ceiling|Chr|ChrW|ClipGet|ClipPut|ConsoleRead|ConsoleWrite|ConsoleWriteError|ControlClick|ControlCommand|ControlDisable|ControlEnable|ControlFocus|ControlGetFocus|ControlGetHandle|ControlGetPos|ControlGetText|ControlHide|ControlListView|ControlMove|ControlSend|ControlSetText|ControlShow|ControlTreeView|Cos|Dec|DirCopy|DirCreate|DirGetSize|DirMove|DirRemove|DllCall|DllCallbackFree|DllCallbackGetPtr|DllCallbackRegister|DllClose|DllOpen|DllStructCreate|DllStructGetData|DllStructGetPtr|DllStructGetSize|DllStructSetData|DriveGetDrive|DriveGetFileSystem|DriveGetLabel|DriveGetSerial|DriveGetType|DriveMapAdd|DriveMapDel|DriveMapGet|DriveSetLabel|DriveSpaceFree|DriveSpaceTotal|DriveStatus|EnvGet|EnvSet|EnvUpdate|Eval|Execute|Exp|FileChangeDir|FileClose|FileCopy|FileCreateNTFSLink|FileCreateShortcut|FileDelete|FileExists|FileFindFirstFile|FileFindNextFile|FileGetAttrib|FileGetLongName|FileGetShortcut|FileGetShortName|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileOpen|FileOpenDialog|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileSaveDialog|FileSelectFolder|FileSetAttrib|FileSetTime|FileWrite|FileWriteLine|Floor|FtpSetProxy|GUICreate|GUICtrlCreateAvi|GUICtrlCreateButton|GUICtrlCreateCheckbox|GUICtrlCreateCombo|GUICtrlCreateContextMenu|GUICtrlCreateDate|GUICtrlCreateDummy|GUICtrlCreateEdit|GUICtrlCreateGraphic|GUICtrlCreateGroup|GUICtrlCreateIcon|GUICtrlCreateInput|GUICtrlCreateLabel|GUICtrlCreateList|GUICtrlCreateListView|GUICtrlCreateListViewItem|GUICtrlCreateMenu|GUICtrlCreateMenuItem|GUICtrlCreateMonthCal|GUICtrlCreateObj|GUICtrlCreatePic|GUICtrlCreateProgress|GUICtrlCreateRadio|GUICtrlCreateSlider|GUICtrlCreateTab|GUICtrlCreateTabItem|GUICtrlCreateTreeView|GUICtrlCreateTreeViewItem|GUICtrlCreateUpdown|GUICtrlDelete|GUICtrlGetHandle|GUICtrlGetState|GUICtrlRead|GUICtrlRecvMsg|GUICtrlRegisterListViewSort|GUICtrlSendMsg|GUICtrlSendToDummy|GUICtrlSetBkColor|GUICtrlSetColor|GUICtrlSetCursor|GUICtrlSetData|GUICtrlSetFont|GUICtrlSetDefColor|GUICtrlSetDefBkColor|GUICtrlSetGraphic|GUICtrlSetImage|GUICtrlSetLimit|GUICtrlSetOnEvent|GUICtrlSetPos|GUICtrlSetResizing|GUICtrlSetState|GUICtrlSetStyle|GUICtrlSetTip|GUIDelete|GUIGetCursorInfo|GUIGetMsg|GUIGetStyle|GUIRegisterMsg|GUISetAccelerators()|GUISetBkColor|GUISetCoord|GUISetCursor|GUISetFont|GUISetHelp|GUISetIcon|GUISetOnEvent|GUISetState|GUISetStyle|GUIStartGroup|GUISwitch|Hex|HotKeySet|HttpSetProxy|HWnd|InetGet|InetGetSize|IniDelete|IniRead|IniReadSection|IniReadSectionNames|IniRenameSection|IniWrite|IniWriteSection|InputBox|Int|IsAdmin|IsArray|IsBinary|IsBool|IsDeclared|IsDllStruct|IsFloat|IsHWnd|IsInt|IsKeyword|IsNumber|IsObj|IsPtr|IsString|Log|MemGetStats|Mod|MouseClick|MouseClickDrag|MouseDown|MouseGetCursor|MouseGetPos|MouseMove|MouseUp|MouseWheel|MsgBox|Number|ObjCreate|ObjEvent|ObjGet|ObjName|Opt|Ping|PixelChecksum|PixelGetColor|PixelSearch|PluginClose|PluginOpen|ProcessClose|ProcessExists|ProcessGetStats|ProcessList|ProcessSetPriority|ProcessWait|ProcessWaitClose|ProgressOff|ProgressOn|ProgressSet|Ptr|Random|RegDelete|RegEnumKey|RegEnumVal|RegRead|RegWrite|Round|Run|RunAs|RunAsWait|RunWait|Send|SendKeepActive|SetError|SetExtended|ShellExecute|ShellExecuteWait|Shutdown|Sin|Sleep|SoundPlay|SoundSetWaveVolume|SplashImageOn|SplashOff|SplashTextOn|Sqrt|SRandom|StatusbarGetText|StderrRead|StdinWrite|StdioClose|StdoutRead|String|StringAddCR|StringCompare|StringFormat|StringInStr|StringIsAlNum|StringIsAlpha|StringIsASCII|StringIsDigit|StringIsFloat|StringIsInt|StringIsLower|StringIsSpace|StringIsUpper|StringIsXDigit|StringLeft|StringLen|StringLower|StringMid|StringRegExp|StringRegExpReplace|StringReplace|StringRight|StringSplit|StringStripCR|StringStripWS|StringToBinary|StringTrimLeft|StringTrimRight|StringUpper|Tan|TCPAccept|TCPCloseSocket|TCPConnect|TCPListen|TCPNameToIP|TCPRecv|TCPSend|TCPShutdown|TCPStartup|TimerDiff|TimerInit|ToolTip|TrayCreateItem|TrayCreateMenu|TrayGetMsg|TrayItemDelete|TrayItemGetHandle|TrayItemGetState|TrayItemGetText|TrayItemSetOnEvent|TrayItemSetState|TrayItemSetText|TraySetClick|TraySetIcon|TraySetOnEvent|TraySetPauseIcon|TraySetState|TraySetToolTip|TrayTip|UBound|UDPBind|UDPCloseSocket|UDPOpen|UDPRecv|UDPSend|UDPShutdown|UDPStartup|VarGetType|WinActivate|WinActive|WinClose|WinExists|WinFlash|WinGetCaretPos|WinGetClassList|WinGetClientSize|WinGetHandle|WinGetPos|WinGetProcess|WinGetState|WinGetText|WinGetTitle|WinKill|WinList|WinMenuSelectItem|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinSetOnTop|WinSetState|WinSetTitle|WinSetTrans|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive|ArrayAdd|ArrayBinarySearch|ArrayConcatenate|ArrayDelete|ArrayDisplay|ArrayFindAll|ArrayInsert|ArrayMax|ArrayMaxIndex|ArrayMin|ArrayMinIndex|ArrayPop|ArrayPush|ArrayReverse|ArraySearch|ArraySort|ArraySwap|ArrayToClip|ArrayToString|ArrayTrim|ChooseColor|ChooseFont|ClipBoard_ChangeChain|ClipBoard_Close|ClipBoard_CountFormats|ClipBoard_Empty|ClipBoard_EnumFormats|ClipBoard_FormatStr|ClipBoard_GetData|ClipBoard_GetDataEx|ClipBoard_GetFormatName|ClipBoard_GetOpenWindow|ClipBoard_GetOwner|ClipBoard_GetPriorityFormat|ClipBoard_GetSequenceNumber|ClipBoard_GetViewer|ClipBoard_IsFormatAvailable|ClipBoard_Open|ClipBoard_RegisterFormat|ClipBoard_SetData|ClipBoard_SetDataEx|ClipBoard_SetViewer|ClipPutFile|ColorConvertHSLtoRGB|ColorConvertRGBtoHSL|ColorGetBlue|ColorGetGreen|ColorGetRed|Date_Time_CompareFileTime|Date_Time_DOSDateTimeToArray|Date_Time_DOSDateTimeToFileTime|Date_Time_DOSDateTimeToStr|Date_Time_DOSDateToArray|Date_Time_DOSDateToStr|Date_Time_DOSTimeToArray|Date_Time_DOSTimeToStr|Date_Time_EncodeFileTime|Date_Time_EncodeSystemTime|Date_Time_FileTimeToArray|Date_Time_FileTimeToDOSDateTime|Date_Time_FileTimeToLocalFileTime|Date_Time_FileTimeToStr|Date_Time_FileTimeToSystemTime|Date_Time_GetFileTime|Date_Time_GetLocalTime|Date_Time_GetSystemTime|Date_Time_GetSystemTimeAdjustment|Date_Time_GetSystemTimeAsFileTime|Date_Time_GetSystemTimes|Date_Time_GetTickCount|Date_Time_GetTimeZoneInformation|Date_Time_LocalFileTimeToFileTime|Date_Time_SetFileTime|Date_Time_SetLocalTime|Date_Time_SetSystemTime|Date_Time_SetSystemTimeAdjustment|Date_Time_SetTimeZoneInformation|Date_Time_SystemTimeToArray|Date_Time_SystemTimeToDateStr|Date_Time_SystemTimeToDateTimeStr|Date_Time_SystemTimeToFileTime|Date_Time_SystemTimeToTimeStr|Date_Time_SystemTimeToTzSpecificLocalTime|Date_Time_TzSpecificLocalTimeToSystemTime|DateAdd|DateDayOfWeek|DateDaysInMonth|DateDiff|DateIsLeapYear|DateIsValid|DateTimeFormat|DateTimeSplit|DateToDayOfWeek|DateToDayOfWeekISO|DateToDayValue|DateToMonth|DayValueToDate|DebugBugReportEnv|DebugOut|DebugSetup|Degree|EventLog__Backup|EventLog__Clear|EventLog__Close|EventLog__Count|EventLog__DeregisterSource|EventLog__Full|EventLog__Notify|EventLog__Oldest|EventLog__Open|EventLog__OpenBackup|EventLog__Read|EventLog__RegisterSource|EventLog__Report|FileCountLines|FileCreate|FileListToArray|FilePrint|FileReadToArray|FileWriteFromArray|FileWriteLog|FileWriteToLine|GDIPlus_ArrowCapCreate|GDIPlus_ArrowCapDispose|GDIPlus_ArrowCapGetFillState|GDIPlus_ArrowCapGetHeight|GDIPlus_ArrowCapGetMiddleInset|GDIPlus_ArrowCapGetWidth|GDIPlus_ArrowCapSetFillState|GDIPlus_ArrowCapSetHeight|GDIPlus_ArrowCapSetMiddleInset|GDIPlus_ArrowCapSetWidth|GDIPlus_BitmapCloneArea|GDIPlus_BitmapCreateFromFile|GDIPlus_BitmapCreateFromGraphics|GDIPlus_BitmapCreateFromHBITMAP|GDIPlus_BitmapCreateHBITMAPFromBitmap|GDIPlus_BitmapDispose|GDIPlus_BitmapLockBits|GDIPlus_BitmapUnlockBits|GDIPlus_BrushClone|GDIPlus_BrushCreateSolid|GDIPlus_BrushDispose|GDIPlus_BrushGetType|GDIPlus_CustomLineCapDispose|GDIPlus_Decoders|GDIPlus_DecodersGetCount|GDIPlus_DecodersGetSize|GDIPlus_Encoders|GDIPlus_EncodersGetCLSID|GDIPlus_EncodersGetCount|GDIPlus_EncodersGetParamList|GDIPlus_EncodersGetParamListSize|GDIPlus_EncodersGetSize|GDIPlus_FontCreate|GDIPlus_FontDispose|GDIPlus_FontFamilyCreate|GDIPlus_FontFamilyDispose|GDIPlus_GraphicsClear|GDIPlus_GraphicsCreateFromHDC|GDIPlus_GraphicsCreateFromHWND|GDIPlus_GraphicsDispose|GDIPlus_GraphicsDrawArc|GDIPlus_GraphicsDrawBezier|GDIPlus_GraphicsDrawClosedCurve|GDIPlus_GraphicsDrawCurve|GDIPlus_GraphicsDrawEllipse|GDIPlus_GraphicsDrawImage|GDIPlus_GraphicsDrawImageRect|GDIPlus_GraphicsDrawImageRectRect|GDIPlus_GraphicsDrawLine|GDIPlus_GraphicsDrawPie|GDIPlus_GraphicsDrawPolygon|GDIPlus_GraphicsDrawRect|GDIPlus_GraphicsDrawString|GDIPlus_GraphicsDrawStringEx|GDIPlus_GraphicsFillClosedCurve|GDIPlus_GraphicsFillEllipse|GDIPlus_GraphicsFillPie|GDIPlus_GraphicsFillRect|GDIPlus_GraphicsGetDC|GDIPlus_GraphicsGetSmoothingMode|GDIPlus_GraphicsMeasureString|GDIPlus_GraphicsReleaseDC|GDIPlus_GraphicsSetSmoothingMode|GDIPlus_GraphicsSetTransform|GDIPlus_ImageDispose|GDIPlus_ImageGetGraphicsContext|GDIPlus_ImageGetHeight|GDIPlus_ImageGetWidth|GDIPlus_ImageLoadFromFile|GDIPlus_ImageSaveToFile|GDIPlus_ImageSaveToFileEx|GDIPlus_MatrixCreate|GDIPlus_MatrixDispose|GDIPlus_MatrixRotate|GDIPlus_ParamAdd|GDIPlus_ParamInit|GDIPlus_PenCreate|GDIPlus_PenDispose|GDIPlus_PenGetAlignment|GDIPlus_PenGetColor|GDIPlus_PenGetCustomEndCap|GDIPlus_PenGetDashCap|GDIPlus_PenGetDashStyle|GDIPlus_PenGetEndCap|GDIPlus_PenGetWidth|GDIPlus_PenSetAlignment|GDIPlus_PenSetColor|GDIPlus_PenSetCustomEndCap|GDIPlus_PenSetDashCap|GDIPlus_PenSetDashStyle|GDIPlus_PenSetEndCap|GDIPlus_PenSetWidth|GDIPlus_RectFCreate|GDIPlus_Shutdown|GDIPlus_Startup|GDIPlus_StringFormatCreate|GDIPlus_StringFormatDispose|GetIP|GUICtrlAVI_Close|GUICtrlAVI_Create|GUICtrlAVI_Destroy|GUICtrlAVI_Open|GUICtrlAVI_OpenEx|GUICtrlAVI_Play|GUICtrlAVI_Seek|GUICtrlAVI_Show|GUICtrlAVI_Stop|GUICtrlButton_Click|GUICtrlButton_Create|GUICtrlButton_Destroy|GUICtrlButton_Enable|GUICtrlButton_GetCheck|GUICtrlButton_GetFocus|GUICtrlButton_GetIdealSize|GUICtrlButton_GetImage|GUICtrlButton_GetImageList|GUICtrlButton_GetState|GUICtrlButton_GetText|GUICtrlButton_GetTextMargin|GUICtrlButton_SetCheck|GUICtrlButton_SetFocus|GUICtrlButton_SetImage|GUICtrlButton_SetImageList|GUICtrlButton_SetSize|GUICtrlButton_SetState|GUICtrlButton_SetStyle|GUICtrlButton_SetText|GUICtrlButton_SetTextMargin|GUICtrlButton_Show|GUICtrlComboBox_AddDir|GUICtrlComboBox_AddString|GUICtrlComboBox_AutoComplete|GUICtrlComboBox_BeginUpdate|GUICtrlComboBox_Create|GUICtrlComboBox_DeleteString|GUICtrlComboBox_Destroy|GUICtrlComboBox_EndUpdate|GUICtrlComboBox_FindString|GUICtrlComboBox_FindStringExact|GUICtrlComboBox_GetComboBoxInfo|GUICtrlComboBox_GetCount|GUICtrlComboBox_GetCurSel|GUICtrlComboBox_GetDroppedControlRect|GUICtrlComboBox_GetDroppedControlRectEx|GUICtrlComboBox_GetDroppedState|GUICtrlComboBox_GetDroppedWidth|GUICtrlComboBox_GetEditSel|GUICtrlComboBox_GetEditText|GUICtrlComboBox_GetExtendedUI|GUICtrlComboBox_GetHorizontalExtent|GUICtrlComboBox_GetItemHeight|GUICtrlComboBox_GetLBText|GUICtrlComboBox_GetLBTextLen|GUICtrlComboBox_GetList|GUICtrlComboBox_GetListArray|GUICtrlComboBox_GetLocale|GUICtrlComboBox_GetLocaleCountry|GUICtrlComboBox_GetLocaleLang|GUICtrlComboBox_GetLocalePrimLang|GUICtrlComboBox_GetLocaleSubLang|GUICtrlComboBox_GetMinVisible|GUICtrlComboBox_GetTopIndex|GUICtrlComboBox_InitStorage|GUICtrlComboBox_InsertString|GUICtrlComboBox_LimitText|GUICtrlComboBox_ReplaceEditSel|GUICtrlComboBox_ResetContent|GUICtrlComboBox_SelectString|GUICtrlComboBox_SetCurSel|GUICtrlComboBox_SetDroppedWidth|GUICtrlComboBox_SetEditSel|GUICtrlComboBox_SetEditText|GUICtrlComboBox_SetExtendedUI|GUICtrlComboBox_SetHorizontalExtent|GUICtrlComboBox_SetItemHeight|GUICtrlComboBox_SetMinVisible|GUICtrlComboBox_SetTopIndex|GUICtrlComboBox_ShowDropDown|GUICtrlComboBoxEx_AddDir|GUICtrlComboBoxEx_AddString|GUICtrlComboBoxEx_BeginUpdate|GUICtrlComboBoxEx_Create|GUICtrlComboBoxEx_CreateSolidBitMap|GUICtrlComboBoxEx_DeleteString|GUICtrlComboBoxEx_Destroy|GUICtrlComboBoxEx_EndUpdate|GUICtrlComboBoxEx_FindStringExact|GUICtrlComboBoxEx_GetComboBoxInfo|GUICtrlComboBoxEx_GetComboControl|GUICtrlComboBoxEx_GetCount|GUICtrlComboBoxEx_GetCurSel|GUICtrlComboBoxEx_GetDroppedControlRect|GUICtrlComboBoxEx_GetDroppedControlRectEx|GUICtrlComboBoxEx_GetDroppedState|GUICtrlComboBoxEx_GetDroppedWidth|GUICtrlComboBoxEx_GetEditControl|GUICtrlComboBoxEx_GetEditSel|GUICtrlComboBoxEx_GetEditText|GUICtrlComboBoxEx_GetExtendedStyle|GUICtrlComboBoxEx_GetExtendedUI|GUICtrlComboBoxEx_GetImageList|GUICtrlComboBoxEx_GetItem|GUICtrlComboBoxEx_GetItemEx|GUICtrlComboBoxEx_GetItemHeight|GUICtrlComboBoxEx_GetItemImage|GUICtrlComboBoxEx_GetItemIndent|GUICtrlComboBoxEx_GetItemOverlayImage|GUICtrlComboBoxEx_GetItemParam|GUICtrlComboBoxEx_GetItemSelectedImage|GUICtrlComboBoxEx_GetItemText|GUICtrlComboBoxEx_GetItemTextLen|GUICtrlComboBoxEx_GetList|GUICtrlComboBoxEx_GetListArray|GUICtrlComboBoxEx_GetLocale|GUICtrlComboBoxEx_GetLocaleCountry|GUICtrlComboBoxEx_GetLocaleLang|GUICtrlComboBoxEx_GetLocalePrimLang|GUICtrlComboBoxEx_GetLocaleSubLang|GUICtrlComboBoxEx_GetMinVisible|GUICtrlComboBoxEx_GetTopIndex|GUICtrlComboBoxEx_InitStorage|GUICtrlComboBoxEx_InsertString|GUICtrlComboBoxEx_LimitText|GUICtrlComboBoxEx_ReplaceEditSel|GUICtrlComboBoxEx_ResetContent|GUICtrlComboBoxEx_SetCurSel|GUICtrlComboBoxEx_SetDroppedWidth|GUICtrlComboBoxEx_SetEditSel|GUICtrlComboBoxEx_SetEditText|GUICtrlComboBoxEx_SetExtendedStyle|GUICtrlComboBoxEx_SetExtendedUI|GUICtrlComboBoxEx_SetImageList|GUICtrlComboBoxEx_SetItem|GUICtrlComboBoxEx_SetItemEx|GUICtrlComboBoxEx_SetItemHeight|GUICtrlComboBoxEx_SetItemImage|GUICtrlComboBoxEx_SetItemIndent|GUICtrlComboBoxEx_SetItemOverlayImage|GUICtrlComboBoxEx_SetItemParam|GUICtrlComboBoxEx_SetItemSelectedImage|GUICtrlComboBoxEx_SetMinVisible|GUICtrlComboBoxEx_SetTopIndex|GUICtrlComboBoxEx_ShowDropDown|GUICtrlDTP_Create|GUICtrlDTP_Destroy|GUICtrlDTP_GetMCColor|GUICtrlDTP_GetMCFont|GUICtrlDTP_GetMonthCal|GUICtrlDTP_GetRange|GUICtrlDTP_GetRangeEx|GUICtrlDTP_GetSystemTime|GUICtrlDTP_GetSystemTimeEx|GUICtrlDTP_SetFormat|GUICtrlDTP_SetMCColor|GUICtrlDTP_SetMCFont|GUICtrlDTP_SetRange|GUICtrlDTP_SetRangeEx|GUICtrlDTP_SetSystemTime|GUICtrlDTP_SetSystemTimeEx|GUICtrlEdit_AppendText|GUICtrlEdit_BeginUpdate|GUICtrlEdit_CanUndo|GUICtrlEdit_CharFromPos|GUICtrlEdit_Create|GUICtrlEdit_Destroy|GUICtrlEdit_EmptyUndoBuffer|GUICtrlEdit_EndUpdate|GUICtrlEdit_Find|GUICtrlEdit_FmtLines|GUICtrlEdit_GetFirstVisibleLine|GUICtrlEdit_GetLimitText|GUICtrlEdit_GetLine|GUICtrlEdit_GetLineCount|GUICtrlEdit_GetMargins|GUICtrlEdit_GetModify|GUICtrlEdit_GetPasswordChar|GUICtrlEdit_GetRECT|GUICtrlEdit_GetRECTEx|GUICtrlEdit_GetSel|GUICtrlEdit_GetText|GUICtrlEdit_GetTextLen|GUICtrlEdit_HideBalloonTip|GUICtrlEdit_InsertText|GUICtrlEdit_LineFromChar|GUICtrlEdit_LineIndex|GUICtrlEdit_LineLength|GUICtrlEdit_LineScroll|GUICtrlEdit_PosFromChar|GUICtrlEdit_ReplaceSel|GUICtrlEdit_Scroll|GUICtrlEdit_SetLimitText|GUICtrlEdit_SetMargins|GUICtrlEdit_SetModify|GUICtrlEdit_SetPasswordChar|GUICtrlEdit_SetReadOnly|GUICtrlEdit_SetRECT|GUICtrlEdit_SetRECTEx|GUICtrlEdit_SetRECTNP|GUICtrlEdit_SetRectNPEx|GUICtrlEdit_SetSel|GUICtrlEdit_SetTabStops|GUICtrlEdit_SetText|GUICtrlEdit_ShowBalloonTip|GUICtrlEdit_Undo|GUICtrlHeader_AddItem|GUICtrlHeader_ClearFilter|GUICtrlHeader_ClearFilterAll|GUICtrlHeader_Create|GUICtrlHeader_CreateDragImage|GUICtrlHeader_DeleteItem|GUICtrlHeader_Destroy|GUICtrlHeader_EditFilter|GUICtrlHeader_GetBitmapMargin|GUICtrlHeader_GetImageList|GUICtrlHeader_GetItem|GUICtrlHeader_GetItemAlign|GUICtrlHeader_GetItemBitmap|GUICtrlHeader_GetItemCount|GUICtrlHeader_GetItemDisplay|GUICtrlHeader_GetItemFlags|GUICtrlHeader_GetItemFormat|GUICtrlHeader_GetItemImage|GUICtrlHeader_GetItemOrder|GUICtrlHeader_GetItemParam|GUICtrlHeader_GetItemRect|GUICtrlHeader_GetItemRectEx|GUICtrlHeader_GetItemText|GUICtrlHeader_GetItemWidth|GUICtrlHeader_GetOrderArray|GUICtrlHeader_GetUnicodeFormat|GUICtrlHeader_HitTest|GUICtrlHeader_InsertItem|GUICtrlHeader_Layout|GUICtrlHeader_OrderToIndex|GUICtrlHeader_SetBitmapMargin|GUICtrlHeader_SetFilterChangeTimeout|GUICtrlHeader_SetHotDivider|GUICtrlHeader_SetImageList|GUICtrlHeader_SetItem|GUICtrlHeader_SetItemAlign|GUICtrlHeader_SetItemBitmap|GUICtrlHeader_SetItemDisplay|GUICtrlHeader_SetItemFlags|GUICtrlHeader_SetItemFormat|GUICtrlHeader_SetItemImage|GUICtrlHeader_SetItemOrder|GUICtrlHeader_SetItemParam|GUICtrlHeader_SetItemText|GUICtrlHeader_SetItemWidth|GUICtrlHeader_SetOrderArray|GUICtrlHeader_SetUnicodeFormat|GUICtrlIpAddress_ClearAddress|GUICtrlIpAddress_Create|GUICtrlIpAddress_Destroy|GUICtrlIpAddress_Get|GUICtrlIpAddress_GetArray|GUICtrlIpAddress_GetEx|GUICtrlIpAddress_IsBlank|GUICtrlIpAddress_Set|GUICtrlIpAddress_SetArray|GUICtrlIpAddress_SetEx|GUICtrlIpAddress_SetFocus|GUICtrlIpAddress_SetFont|GUICtrlIpAddress_SetRange|GUICtrlIpAddress_ShowHide|GUICtrlListBox_AddFile|GUICtrlListBox_AddString|GUICtrlListBox_BeginUpdate|GUICtrlListBox_Create|GUICtrlListBox_DeleteString|GUICtrlListBox_Destroy|GUICtrlListBox_Dir|GUICtrlListBox_EndUpdate|GUICtrlListBox_FindInText|GUICtrlListBox_FindString|GUICtrlListBox_GetAnchorIndex|GUICtrlListBox_GetCaretIndex|GUICtrlListBox_GetCount|GUICtrlListBox_GetCurSel|GUICtrlListBox_GetHorizontalExtent|GUICtrlListBox_GetItemData|GUICtrlListBox_GetItemHeight|GUICtrlListBox_GetItemRect|GUICtrlListBox_GetItemRectEx|GUICtrlListBox_GetListBoxInfo|GUICtrlListBox_GetLocale|GUICtrlListBox_GetLocaleCountry|GUICtrlListBox_GetLocaleLang|GUICtrlListBox_GetLocalePrimLang|GUICtrlListBox_GetLocaleSubLang|GUICtrlListBox_GetSel|GUICtrlListBox_GetSelCount|GUICtrlListBox_GetSelItems|GUICtrlListBox_GetSelItemsText|GUICtrlListBox_GetText|GUICtrlListBox_GetTextLen|GUICtrlListBox_GetTopIndex|GUICtrlListBox_InitStorage|GUICtrlListBox_InsertString|GUICtrlListBox_ItemFromPoint|GUICtrlListBox_ReplaceString|GUICtrlListBox_ResetContent|GUICtrlListBox_SelectString|GUICtrlListBox_SelItemRange|GUICtrlListBox_SelItemRangeEx|GUICtrlListBox_SetAnchorIndex|GUICtrlListBox_SetCaretIndex|GUICtrlListBox_SetColumnWidth|GUICtrlListBox_SetCurSel|GUICtrlListBox_SetHorizontalExtent|GUICtrlListBox_SetItemData|GUICtrlListBox_SetItemHeight|GUICtrlListBox_SetLocale|GUICtrlListBox_SetSel|GUICtrlListBox_SetTabStops|GUICtrlListBox_SetTopIndex|GUICtrlListBox_Sort|GUICtrlListBox_SwapString|GUICtrlListBox_UpdateHScroll|GUICtrlListView_AddArray|GUICtrlListView_AddColumn|GUICtrlListView_AddItem|GUICtrlListView_AddSubItem|GUICtrlListView_ApproximateViewHeight|GUICtrlListView_ApproximateViewRect|GUICtrlListView_ApproximateViewWidth|GUICtrlListView_Arrange|GUICtrlListView_BeginUpdate|GUICtrlListView_CancelEditLabel|GUICtrlListView_ClickItem|GUICtrlListView_CopyItems|GUICtrlListView_Create|GUICtrlListView_CreateDragImage|GUICtrlListView_CreateSolidBitMap|GUICtrlListView_DeleteAllItems|GUICtrlListView_DeleteColumn|GUICtrlListView_DeleteItem|GUICtrlListView_DeleteItemsSelected|GUICtrlListView_Destroy|GUICtrlListView_DrawDragImage|GUICtrlListView_EditLabel|GUICtrlListView_EnableGroupView|GUICtrlListView_EndUpdate|GUICtrlListView_EnsureVisible|GUICtrlListView_FindInText|GUICtrlListView_FindItem|GUICtrlListView_FindNearest|GUICtrlListView_FindParam|GUICtrlListView_FindText|GUICtrlListView_GetBkColor|GUICtrlListView_GetBkImage|GUICtrlListView_GetCallbackMask|GUICtrlListView_GetColumn|GUICtrlListView_GetColumnCount|GUICtrlListView_GetColumnOrder|GUICtrlListView_GetColumnOrderArray|GUICtrlListView_GetColumnWidth|GUICtrlListView_GetCounterPage|GUICtrlListView_GetEditControl|GUICtrlListView_GetExtendedListViewStyle|GUICtrlListView_GetGroupInfo|GUICtrlListView_GetGroupViewEnabled|GUICtrlListView_GetHeader|GUICtrlListView_GetHotCursor|GUICtrlListView_GetHotItem|GUICtrlListView_GetHoverTime|GUICtrlListView_GetImageList|GUICtrlListView_GetISearchString|GUICtrlListView_GetItem|GUICtrlListView_GetItemChecked|GUICtrlListView_GetItemCount|GUICtrlListView_GetItemCut|GUICtrlListView_GetItemDropHilited|GUICtrlListView_GetItemEx|GUICtrlListView_GetItemFocused|GUICtrlListView_GetItemGroupID|GUICtrlListView_GetItemImage|GUICtrlListView_GetItemIndent|GUICtrlListView_GetItemParam|GUICtrlListView_GetItemPosition|GUICtrlListView_GetItemPositionX|GUICtrlListView_GetItemPositionY|GUICtrlListView_GetItemRect|GUICtrlListView_GetItemRectEx|GUICtrlListView_GetItemSelected|GUICtrlListView_GetItemSpacing|GUICtrlListView_GetItemSpacingX|GUICtrlListView_GetItemSpacingY|GUICtrlListView_GetItemState|GUICtrlListView_GetItemStateImage|GUICtrlListView_GetItemText|GUICtrlListView_GetItemTextArray|GUICtrlListView_GetItemTextString|GUICtrlListView_GetNextItem|GUICtrlListView_GetNumberOfWorkAreas|GUICtrlListView_GetOrigin|GUICtrlListView_GetOriginX|GUICtrlListView_GetOriginY|GUICtrlListView_GetOutlineColor|GUICtrlListView_GetSelectedColumn|GUICtrlListView_GetSelectedCount|GUICtrlListView_GetSelectedIndices|GUICtrlListView_GetSelectionMark|GUICtrlListView_GetStringWidth|GUICtrlListView_GetSubItemRect|GUICtrlListView_GetTextBkColor|GUICtrlListView_GetTextColor|GUICtrlListView_GetToolTips|GUICtrlListView_GetTopIndex|GUICtrlListView_GetUnicodeFormat|GUICtrlListView_GetView|GUICtrlListView_GetViewDetails|GUICtrlListView_GetViewLarge|GUICtrlListView_GetViewList|GUICtrlListView_GetViewRect|GUICtrlListView_GetViewSmall|GUICtrlListView_GetViewTile|GUICtrlListView_HideColumn|GUICtrlListView_HitTest|GUICtrlListView_InsertColumn|GUICtrlListView_InsertGroup|GUICtrlListView_InsertItem|GUICtrlListView_JustifyColumn|GUICtrlListView_MapIDToIndex|GUICtrlListView_MapIndexToID|GUICtrlListView_RedrawItems|GUICtrlListView_RegisterSortCallBack|GUICtrlListView_RemoveAllGroups|GUICtrlListView_RemoveGroup|GUICtrlListView_Scroll|GUICtrlListView_SetBkColor|GUICtrlListView_SetBkImage|GUICtrlListView_SetCallBackMask|GUICtrlListView_SetColumn|GUICtrlListView_SetColumnOrder|GUICtrlListView_SetColumnOrderArray|GUICtrlListView_SetColumnWidth|GUICtrlListView_SetExtendedListViewStyle|GUICtrlListView_SetGroupInfo|GUICtrlListView_SetHotItem|GUICtrlListView_SetHoverTime|GUICtrlListView_SetIconSpacing|GUICtrlListView_SetImageList|GUICtrlListView_SetItem|GUICtrlListView_SetItemChecked|GUICtrlListView_SetItemCount|GUICtrlListView_SetItemCut|GUICtrlListView_SetItemDropHilited|GUICtrlListView_SetItemEx|GUICtrlListView_SetItemFocused|GUICtrlListView_SetItemGroupID|GUICtrlListView_SetItemImage|GUICtrlListView_SetItemIndent|GUICtrlListView_SetItemParam|GUICtrlListView_SetItemPosition|GUICtrlListView_SetItemPosition32|GUICtrlListView_SetItemSelected|GUICtrlListView_SetItemState|GUICtrlListView_SetItemStateImage|GUICtrlListView_SetItemText|GUICtrlListView_SetOutlineColor|GUICtrlListView_SetSelectedColumn|GUICtrlListView_SetSelectionMark|GUICtrlListView_SetTextBkColor|GUICtrlListView_SetTextColor|GUICtrlListView_SetToolTips|GUICtrlListView_SetUnicodeFormat|GUICtrlListView_SetView|GUICtrlListView_SetWorkAreas|GUICtrlListView_SimpleSort|GUICtrlListView_SortItems|GUICtrlListView_SubItemHitTest|GUICtrlListView_UnRegisterSortCallBack|GUICtrlMenu_AddMenuItem|GUICtrlMenu_AppendMenu|GUICtrlMenu_CheckMenuItem|GUICtrlMenu_CheckRadioItem|GUICtrlMenu_CreateMenu|GUICtrlMenu_CreatePopup|GUICtrlMenu_DeleteMenu|GUICtrlMenu_DestroyMenu|GUICtrlMenu_DrawMenuBar|GUICtrlMenu_EnableMenuItem|GUICtrlMenu_FindItem|GUICtrlMenu_FindParent|GUICtrlMenu_GetItemBmp|GUICtrlMenu_GetItemBmpChecked|GUICtrlMenu_GetItemBmpUnchecked|GUICtrlMenu_GetItemChecked|GUICtrlMenu_GetItemCount|GUICtrlMenu_GetItemData|GUICtrlMenu_GetItemDefault|GUICtrlMenu_GetItemDisabled|GUICtrlMenu_GetItemEnabled|GUICtrlMenu_GetItemGrayed|GUICtrlMenu_GetItemHighlighted|GUICtrlMenu_GetItemID|GUICtrlMenu_GetItemInfo|GUICtrlMenu_GetItemRect|GUICtrlMenu_GetItemRectEx|GUICtrlMenu_GetItemState|GUICtrlMenu_GetItemStateEx|GUICtrlMenu_GetItemSubMenu|GUICtrlMenu_GetItemText|GUICtrlMenu_GetItemType|GUICtrlMenu_GetMenu|GUICtrlMenu_GetMenuBackground|GUICtrlMenu_GetMenuBarInfo|GUICtrlMenu_GetMenuContextHelpID|GUICtrlMenu_GetMenuData|GUICtrlMenu_GetMenuDefaultItem|GUICtrlMenu_GetMenuHeight|GUICtrlMenu_GetMenuInfo|GUICtrlMenu_GetMenuStyle|GUICtrlMenu_GetSystemMenu|GUICtrlMenu_InsertMenuItem|GUICtrlMenu_InsertMenuItemEx|GUICtrlMenu_IsMenu|GUICtrlMenu_LoadMenu|GUICtrlMenu_MapAccelerator|GUICtrlMenu_MenuItemFromPoint|GUICtrlMenu_RemoveMenu|GUICtrlMenu_SetItemBitmaps|GUICtrlMenu_SetItemBmp|GUICtrlMenu_SetItemBmpChecked|GUICtrlMenu_SetItemBmpUnchecked|GUICtrlMenu_SetItemChecked|GUICtrlMenu_SetItemData|GUICtrlMenu_SetItemDefault|GUICtrlMenu_SetItemDisabled|GUICtrlMenu_SetItemEnabled|GUICtrlMenu_SetItemGrayed|GUICtrlMenu_SetItemHighlighted|GUICtrlMenu_SetItemID|GUICtrlMenu_SetItemInfo|GUICtrlMenu_SetItemState|GUICtrlMenu_SetItemSubMenu|GUICtrlMenu_SetItemText|GUICtrlMenu_SetItemType|GUICtrlMenu_SetMenu|GUICtrlMenu_SetMenuBackground|GUICtrlMenu_SetMenuContextHelpID|GUICtrlMenu_SetMenuData|GUICtrlMenu_SetMenuDefaultItem|GUICtrlMenu_SetMenuHeight|GUICtrlMenu_SetMenuInfo|GUICtrlMenu_SetMenuStyle|GUICtrlMenu_TrackPopupMenu|GUICtrlMonthCal_Create|GUICtrlMonthCal_Destroy|GUICtrlMonthCal_GetColor|GUICtrlMonthCal_GetColorArray|GUICtrlMonthCal_GetCurSel|GUICtrlMonthCal_GetCurSelStr|GUICtrlMonthCal_GetFirstDOW|GUICtrlMonthCal_GetFirstDOWStr|GUICtrlMonthCal_GetMaxSelCount|GUICtrlMonthCal_GetMaxTodayWidth|GUICtrlMonthCal_GetMinReqHeight|GUICtrlMonthCal_GetMinReqRect|GUICtrlMonthCal_GetMinReqRectArray|GUICtrlMonthCal_GetMinReqWidth|GUICtrlMonthCal_GetMonthDelta|GUICtrlMonthCal_GetMonthRange|GUICtrlMonthCal_GetMonthRangeMax|GUICtrlMonthCal_GetMonthRangeMaxStr|GUICtrlMonthCal_GetMonthRangeMin|GUICtrlMonthCal_GetMonthRangeMinStr|GUICtrlMonthCal_GetMonthRangeSpan|GUICtrlMonthCal_GetRange|GUICtrlMonthCal_GetRangeMax|GUICtrlMonthCal_GetRangeMaxStr|GUICtrlMonthCal_GetRangeMin|GUICtrlMonthCal_GetRangeMinStr|GUICtrlMonthCal_GetSelRange|GUICtrlMonthCal_GetSelRangeMax|GUICtrlMonthCal_GetSelRangeMaxStr|GUICtrlMonthCal_GetSelRangeMin|GUICtrlMonthCal_GetSelRangeMinStr|GUICtrlMonthCal_GetToday|GUICtrlMonthCal_GetTodayStr|GUICtrlMonthCal_GetUnicodeFormat|GUICtrlMonthCal_HitTest|GUICtrlMonthCal_SetColor|GUICtrlMonthCal_SetCurSel|GUICtrlMonthCal_SetDayState|GUICtrlMonthCal_SetFirstDOW|GUICtrlMonthCal_SetMaxSelCount|GUICtrlMonthCal_SetMonthDelta|GUICtrlMonthCal_SetRange|GUICtrlMonthCal_SetSelRange|GUICtrlMonthCal_SetToday|GUICtrlMonthCal_SetUnicodeFormat|GUICtrlRebar_AddBand|GUICtrlRebar_AddToolBarBand|GUICtrlRebar_BeginDrag|GUICtrlRebar_Create|GUICtrlRebar_DeleteBand|GUICtrlRebar_Destroy|GUICtrlRebar_DragMove|GUICtrlRebar_EndDrag|GUICtrlRebar_GetBandBackColor|GUICtrlRebar_GetBandBorders|GUICtrlRebar_GetBandBordersEx|GUICtrlRebar_GetBandChildHandle|GUICtrlRebar_GetBandChildSize|GUICtrlRebar_GetBandCount|GUICtrlRebar_GetBandForeColor|GUICtrlRebar_GetBandHeaderSize|GUICtrlRebar_GetBandID|GUICtrlRebar_GetBandIdealSize|GUICtrlRebar_GetBandLength|GUICtrlRebar_GetBandLParam|GUICtrlRebar_GetBandMargins|GUICtrlRebar_GetBandMarginsEx|GUICtrlRebar_GetBandRect|GUICtrlRebar_GetBandRectEx|GUICtrlRebar_GetBandStyle|GUICtrlRebar_GetBandStyleBreak|GUICtrlRebar_GetBandStyleChildEdge|GUICtrlRebar_GetBandStyleFixedBMP|GUICtrlRebar_GetBandStyleFixedSize|GUICtrlRebar_GetBandStyleGripperAlways|GUICtrlRebar_GetBandStyleHidden|GUICtrlRebar_GetBandStyleHideTitle|GUICtrlRebar_GetBandStyleNoGripper|GUICtrlRebar_GetBandStyleTopAlign|GUICtrlRebar_GetBandStyleUseChevron|GUICtrlRebar_GetBandStyleVariableHeight|GUICtrlRebar_GetBandText|GUICtrlRebar_GetBarHeight|GUICtrlRebar_GetBKColor|GUICtrlRebar_GetColorScheme|GUICtrlRebar_GetRowCount|GUICtrlRebar_GetRowHeight|GUICtrlRebar_GetTextColor|GUICtrlRebar_GetToolTips|GUICtrlRebar_GetUnicodeFormat|GUICtrlRebar_HitTest|GUICtrlRebar_IDToIndex|GUICtrlRebar_MaximizeBand|GUICtrlRebar_MinimizeBand|GUICtrlRebar_MoveBand|GUICtrlRebar_SetBandBackColor|GUICtrlRebar_SetBandForeColor|GUICtrlRebar_SetBandHeaderSize|GUICtrlRebar_SetBandID|GUICtrlRebar_SetBandIdealSize|GUICtrlRebar_SetBandLength|GUICtrlRebar_SetBandLParam|GUICtrlRebar_SetBandStyle|GUICtrlRebar_SetBandStyleBreak|GUICtrlRebar_SetBandStyleChildEdge|GUICtrlRebar_SetBandStyleFixedBMP|GUICtrlRebar_SetBandStyleFixedSize|GUICtrlRebar_SetBandStyleGripperAlways|GUICtrlRebar_SetBandStyleHidden|GUICtrlRebar_SetBandStyleHideTitle|GUICtrlRebar_SetBandStyleNoGripper|GUICtrlRebar_SetBandStyleTopAlign|GUICtrlRebar_SetBandStyleUseChevron|GUICtrlRebar_SetBandStyleVariableHeight|GUICtrlRebar_SetBandText|GUICtrlRebar_SetBKColor|GUICtrlRebar_SetColorScheme|GUICtrlRebar_SetTextColor|GUICtrlRebar_SetToolTips|GUICtrlRebar_SetUnicodeFormat|GUICtrlRebar_ShowBand|GUICtrlSlider_ClearSel|GUICtrlSlider_ClearTics|GUICtrlSlider_Create|GUICtrlSlider_Destroy|GUICtrlSlider_GetBuddy|GUICtrlSlider_GetChannelRect|GUICtrlSlider_GetLineSize|GUICtrlSlider_GetNumTics|GUICtrlSlider_GetPageSize|GUICtrlSlider_GetPos|GUICtrlSlider_GetPTics|GUICtrlSlider_GetRange|GUICtrlSlider_GetRangeMax|GUICtrlSlider_GetRangeMin|GUICtrlSlider_GetSel|GUICtrlSlider_GetSelEnd|GUICtrlSlider_GetSelStart|GUICtrlSlider_GetThumbLength|GUICtrlSlider_GetThumbRect|GUICtrlSlider_GetThumbRectEx|GUICtrlSlider_GetTic|GUICtrlSlider_GetTicPos|GUICtrlSlider_GetToolTips|GUICtrlSlider_GetUnicodeFormat|GUICtrlSlider_SetBuddy|GUICtrlSlider_SetLineSize|GUICtrlSlider_SetPageSize|GUICtrlSlider_SetPos|GUICtrlSlider_SetRange|GUICtrlSlider_SetRangeMax|GUICtrlSlider_SetRangeMin|GUICtrlSlider_SetSel|GUICtrlSlider_SetSelEnd|GUICtrlSlider_SetSelStart|GUICtrlSlider_SetThumbLength|GUICtrlSlider_SetTic|GUICtrlSlider_SetTicFreq|GUICtrlSlider_SetTipSide|GUICtrlSlider_SetToolTips|GUICtrlSlider_SetUnicodeFormat|GUICtrlStatusBar_Create|GUICtrlStatusBar_Destroy|GUICtrlStatusBar_EmbedControl|GUICtrlStatusBar_GetBorders|GUICtrlStatusBar_GetBordersHorz|GUICtrlStatusBar_GetBordersRect|GUICtrlStatusBar_GetBordersVert|GUICtrlStatusBar_GetCount|GUICtrlStatusBar_GetHeight|GUICtrlStatusBar_GetIcon|GUICtrlStatusBar_GetParts|GUICtrlStatusBar_GetRect|GUICtrlStatusBar_GetRectEx|GUICtrlStatusBar_GetText|GUICtrlStatusBar_GetTextFlags|GUICtrlStatusBar_GetTextLength|GUICtrlStatusBar_GetTextLengthEx|GUICtrlStatusBar_GetTipText|GUICtrlStatusBar_GetUnicodeFormat|GUICtrlStatusBar_GetWidth|GUICtrlStatusBar_IsSimple|GUICtrlStatusBar_Resize|GUICtrlStatusBar_SetBkColor|GUICtrlStatusBar_SetIcon|GUICtrlStatusBar_SetMinHeight|GUICtrlStatusBar_SetParts|GUICtrlStatusBar_SetSimple|GUICtrlStatusBar_SetText|GUICtrlStatusBar_SetTipText|GUICtrlStatusBar_SetUnicodeFormat|GUICtrlStatusBar_ShowHide|GUICtrlTab_Create|GUICtrlTab_DeleteAllItems|GUICtrlTab_DeleteItem|GUICtrlTab_DeselectAll|GUICtrlTab_Destroy|GUICtrlTab_FindTab|GUICtrlTab_GetCurFocus|GUICtrlTab_GetCurSel|GUICtrlTab_GetDisplayRect|GUICtrlTab_GetDisplayRectEx|GUICtrlTab_GetExtendedStyle|GUICtrlTab_GetImageList|GUICtrlTab_GetItem|GUICtrlTab_GetItemCount|GUICtrlTab_GetItemImage|GUICtrlTab_GetItemParam|GUICtrlTab_GetItemRect|GUICtrlTab_GetItemRectEx|GUICtrlTab_GetItemState|GUICtrlTab_GetItemText|GUICtrlTab_GetRowCount|GUICtrlTab_GetToolTips|GUICtrlTab_GetUnicodeFormat|GUICtrlTab_HighlightItem|GUICtrlTab_HitTest|GUICtrlTab_InsertItem|GUICtrlTab_RemoveImage|GUICtrlTab_SetCurFocus|GUICtrlTab_SetCurSel|GUICtrlTab_SetExtendedStyle|GUICtrlTab_SetImageList|GUICtrlTab_SetItem|GUICtrlTab_SetItemImage|GUICtrlTab_SetItemParam|GUICtrlTab_SetItemSize|GUICtrlTab_SetItemState|GUICtrlTab_SetItemText|GUICtrlTab_SetMinTabWidth|GUICtrlTab_SetPadding|GUICtrlTab_SetToolTips|GUICtrlTab_SetUnicodeFormat|GUICtrlToolbar_AddBitmap|GUICtrlToolbar_AddButton|GUICtrlToolbar_AddButtonSep|GUICtrlToolbar_AddString|GUICtrlToolbar_ButtonCount|GUICtrlToolbar_CheckButton|GUICtrlToolbar_ClickAccel|GUICtrlToolbar_ClickButton|GUICtrlToolbar_ClickIndex|GUICtrlToolbar_CommandToIndex|GUICtrlToolbar_Create|GUICtrlToolbar_Customize|GUICtrlToolbar_DeleteButton|GUICtrlToolbar_Destroy|GUICtrlToolbar_EnableButton|GUICtrlToolbar_FindToolbar|GUICtrlToolbar_GetAnchorHighlight|GUICtrlToolbar_GetBitmapFlags|GUICtrlToolbar_GetButtonBitmap|GUICtrlToolbar_GetButtonInfo|GUICtrlToolbar_GetButtonInfoEx|GUICtrlToolbar_GetButtonParam|GUICtrlToolbar_GetButtonRect|GUICtrlToolbar_GetButtonRectEx|GUICtrlToolbar_GetButtonSize|GUICtrlToolbar_GetButtonState|GUICtrlToolbar_GetButtonStyle|GUICtrlToolbar_GetButtonText|GUICtrlToolbar_GetColorScheme|GUICtrlToolbar_GetDisabledImageList|GUICtrlToolbar_GetExtendedStyle|GUICtrlToolbar_GetHotImageList|GUICtrlToolbar_GetHotItem|GUICtrlToolbar_GetImageList|GUICtrlToolbar_GetInsertMark|GUICtrlToolbar_GetInsertMarkColor|GUICtrlToolbar_GetMaxSize|GUICtrlToolbar_GetMetrics|GUICtrlToolbar_GetPadding|GUICtrlToolbar_GetRows|GUICtrlToolbar_GetString|GUICtrlToolbar_GetStyle|GUICtrlToolbar_GetStyleAltDrag|GUICtrlToolbar_GetStyleCustomErase|GUICtrlToolbar_GetStyleFlat|GUICtrlToolbar_GetStyleList|GUICtrlToolbar_GetStyleRegisterDrop|GUICtrlToolbar_GetStyleToolTips|GUICtrlToolbar_GetStyleTransparent|GUICtrlToolbar_GetStyleWrapable|GUICtrlToolbar_GetTextRows|GUICtrlToolbar_GetToolTips|GUICtrlToolbar_GetUnicodeFormat|GUICtrlToolbar_HideButton|GUICtrlToolbar_HighlightButton|GUICtrlToolbar_HitTest|GUICtrlToolbar_IndexToCommand|GUICtrlToolbar_InsertButton|GUICtrlToolbar_InsertMarkHitTest|GUICtrlToolbar_IsButtonChecked|GUICtrlToolbar_IsButtonEnabled|GUICtrlToolbar_IsButtonHidden|GUICtrlToolbar_IsButtonHighlighted|GUICtrlToolbar_IsButtonIndeterminate|GUICtrlToolbar_IsButtonPressed|GUICtrlToolbar_LoadBitmap|GUICtrlToolbar_LoadImages|GUICtrlToolbar_MapAccelerator|GUICtrlToolbar_MoveButton|GUICtrlToolbar_PressButton|GUICtrlToolbar_SetAnchorHighlight|GUICtrlToolbar_SetBitmapSize|GUICtrlToolbar_SetButtonBitMap|GUICtrlToolbar_SetButtonInfo|GUICtrlToolbar_SetButtonInfoEx|GUICtrlToolbar_SetButtonParam|GUICtrlToolbar_SetButtonSize|GUICtrlToolbar_SetButtonState|GUICtrlToolbar_SetButtonStyle|GUICtrlToolbar_SetButtonText|GUICtrlToolbar_SetButtonWidth|GUICtrlToolbar_SetCmdID|GUICtrlToolbar_SetColorScheme|GUICtrlToolbar_SetDisabledImageList|GUICtrlToolbar_SetDrawTextFlags|GUICtrlToolbar_SetExtendedStyle|GUICtrlToolbar_SetHotImageList|GUICtrlToolbar_SetHotItem|GUICtrlToolbar_SetImageList|GUICtrlToolbar_SetIndent|GUICtrlToolbar_SetIndeterminate|GUICtrlToolbar_SetInsertMark|GUICtrlToolbar_SetInsertMarkColor|GUICtrlToolbar_SetMaxTextRows|GUICtrlToolbar_SetMetrics|GUICtrlToolbar_SetPadding|GUICtrlToolbar_SetParent|GUICtrlToolbar_SetRows|GUICtrlToolbar_SetStyle|GUICtrlToolbar_SetStyleAltDrag|GUICtrlToolbar_SetStyleCustomErase|GUICtrlToolbar_SetStyleFlat|GUICtrlToolbar_SetStyleList|GUICtrlToolbar_SetStyleRegisterDrop|GUICtrlToolbar_SetStyleToolTips|GUICtrlToolbar_SetStyleTransparent|GUICtrlToolbar_SetStyleWrapable|GUICtrlToolbar_SetToolTips|GUICtrlToolbar_SetUnicodeFormat|GUICtrlToolbar_SetWindowTheme|GUICtrlTreeView_Add|GUICtrlTreeView_AddChild|GUICtrlTreeView_AddChildFirst|GUICtrlTreeView_AddFirst|GUICtrlTreeView_BeginUpdate|GUICtrlTreeView_ClickItem|GUICtrlTreeView_Create|GUICtrlTreeView_CreateDragImage|GUICtrlTreeView_CreateSolidBitMap|GUICtrlTreeView_Delete|GUICtrlTreeView_DeleteAll|GUICtrlTreeView_DeleteChildren|GUICtrlTreeView_Destroy|GUICtrlTreeView_DisplayRect|GUICtrlTreeView_DisplayRectEx|GUICtrlTreeView_EditText|GUICtrlTreeView_EndEdit|GUICtrlTreeView_EndUpdate|GUICtrlTreeView_EnsureVisible|GUICtrlTreeView_Expand|GUICtrlTreeView_ExpandedOnce|GUICtrlTreeView_FindItem|GUICtrlTreeView_FindItemEx|GUICtrlTreeView_GetBkColor|GUICtrlTreeView_GetBold|GUICtrlTreeView_GetChecked|GUICtrlTreeView_GetChildCount|GUICtrlTreeView_GetChildren|GUICtrlTreeView_GetCount|GUICtrlTreeView_GetCut|GUICtrlTreeView_GetDropTarget|GUICtrlTreeView_GetEditControl|GUICtrlTreeView_GetExpanded|GUICtrlTreeView_GetFirstChild|GUICtrlTreeView_GetFirstItem|GUICtrlTreeView_GetFirstVisible|GUICtrlTreeView_GetFocused|GUICtrlTreeView_GetHeight|GUICtrlTreeView_GetImageIndex|GUICtrlTreeView_GetImageListIconHandle|GUICtrlTreeView_GetIndent|GUICtrlTreeView_GetInsertMarkColor|GUICtrlTreeView_GetISearchString|GUICtrlTreeView_GetItemByIndex|GUICtrlTreeView_GetItemHandle|GUICtrlTreeView_GetItemParam|GUICtrlTreeView_GetLastChild|GUICtrlTreeView_GetLineColor|GUICtrlTreeView_GetNext|GUICtrlTreeView_GetNextChild|GUICtrlTreeView_GetNextSibling|GUICtrlTreeView_GetNextVisible|GUICtrlTreeView_GetNormalImageList|GUICtrlTreeView_GetParentHandle|GUICtrlTreeView_GetParentParam|GUICtrlTreeView_GetPrev|GUICtrlTreeView_GetPrevChild|GUICtrlTreeView_GetPrevSibling|GUICtrlTreeView_GetPrevVisible|GUICtrlTreeView_GetScrollTime|GUICtrlTreeView_GetSelected|GUICtrlTreeView_GetSelectedImageIndex|GUICtrlTreeView_GetSelection|GUICtrlTreeView_GetSiblingCount|GUICtrlTreeView_GetState|GUICtrlTreeView_GetStateImageIndex|GUICtrlTreeView_GetStateImageList|GUICtrlTreeView_GetText|GUICtrlTreeView_GetTextColor|GUICtrlTreeView_GetToolTips|GUICtrlTreeView_GetTree|GUICtrlTreeView_GetUnicodeFormat|GUICtrlTreeView_GetVisible|GUICtrlTreeView_GetVisibleCount|GUICtrlTreeView_HitTest|GUICtrlTreeView_HitTestEx|GUICtrlTreeView_HitTestItem|GUICtrlTreeView_Index|GUICtrlTreeView_InsertItem|GUICtrlTreeView_IsFirstItem|GUICtrlTreeView_IsParent|GUICtrlTreeView_Level|GUICtrlTreeView_SelectItem|GUICtrlTreeView_SelectItemByIndex|GUICtrlTreeView_SetBkColor|GUICtrlTreeView_SetBold|GUICtrlTreeView_SetChecked|GUICtrlTreeView_SetCheckedByIndex|GUICtrlTreeView_SetChildren|GUICtrlTreeView_SetCut|GUICtrlTreeView_SetDropTarget|GUICtrlTreeView_SetFocused|GUICtrlTreeView_SetHeight|GUICtrlTreeView_SetIcon|GUICtrlTreeView_SetImageIndex|GUICtrlTreeView_SetIndent|GUICtrlTreeView_SetInsertMark|GUICtrlTreeView_SetInsertMarkColor|GUICtrlTreeView_SetItemHeight|GUICtrlTreeView_SetItemParam|GUICtrlTreeView_SetLineColor|GUICtrlTreeView_SetNormalImageList|GUICtrlTreeView_SetScrollTime|GUICtrlTreeView_SetSelected|GUICtrlTreeView_SetSelectedImageIndex|GUICtrlTreeView_SetState|GUICtrlTreeView_SetStateImageIndex|GUICtrlTreeView_SetStateImageList|GUICtrlTreeView_SetText|GUICtrlTreeView_SetTextColor|GUICtrlTreeView_SetToolTips|GUICtrlTreeView_SetUnicodeFormat|GUICtrlTreeView_Sort|GUIImageList_Add|GUIImageList_AddBitmap|GUIImageList_AddIcon|GUIImageList_AddMasked|GUIImageList_BeginDrag|GUIImageList_Copy|GUIImageList_Create|GUIImageList_Destroy|GUIImageList_DestroyIcon|GUIImageList_DragEnter|GUIImageList_DragLeave|GUIImageList_DragMove|GUIImageList_Draw|GUIImageList_DrawEx|GUIImageList_Duplicate|GUIImageList_EndDrag|GUIImageList_GetBkColor|GUIImageList_GetIcon|GUIImageList_GetIconHeight|GUIImageList_GetIconSize|GUIImageList_GetIconSizeEx|GUIImageList_GetIconWidth|GUIImageList_GetImageCount|GUIImageList_GetImageInfoEx|GUIImageList_Remove|GUIImageList_ReplaceIcon|GUIImageList_SetBkColor|GUIImageList_SetIconSize|GUIImageList_SetImageCount|GUIImageList_Swap|GUIScrollBars_EnableScrollBar|GUIScrollBars_GetScrollBarInfoEx|GUIScrollBars_GetScrollBarRect|GUIScrollBars_GetScrollBarRGState|GUIScrollBars_GetScrollBarXYLineButton|GUIScrollBars_GetScrollBarXYThumbBottom|GUIScrollBars_GetScrollBarXYThumbTop|GUIScrollBars_GetScrollInfo|GUIScrollBars_GetScrollInfoEx|GUIScrollBars_GetScrollInfoMax|GUIScrollBars_GetScrollInfoMin|GUIScrollBars_GetScrollInfoPage|GUIScrollBars_GetScrollInfoPos|GUIScrollBars_GetScrollInfoTrackPos|GUIScrollBars_GetScrollPos|GUIScrollBars_GetScrollRange|GUIScrollBars_Init|GUIScrollBars_ScrollWindow|GUIScrollBars_SetScrollInfo|GUIScrollBars_SetScrollInfoMax|GUIScrollBars_SetScrollInfoMin|GUIScrollBars_SetScrollInfoPage|GUIScrollBars_SetScrollInfoPos|GUIScrollBars_SetScrollRange|GUIScrollBars_ShowScrollBar|GUIToolTip_Activate|GUIToolTip_AddTool|GUIToolTip_AdjustRect|GUIToolTip_BitsToTTF|GUIToolTip_Create|GUIToolTip_DelTool|GUIToolTip_Destroy|GUIToolTip_EnumTools|GUIToolTip_GetBubbleHeight|GUIToolTip_GetBubbleSize|GUIToolTip_GetBubbleWidth|GUIToolTip_GetCurrentTool|GUIToolTip_GetDelayTime|GUIToolTip_GetMargin|GUIToolTip_GetMarginEx|GUIToolTip_GetMaxTipWidth|GUIToolTip_GetText|GUIToolTip_GetTipBkColor|GUIToolTip_GetTipTextColor|GUIToolTip_GetTitleBitMap|GUIToolTip_GetTitleText|GUIToolTip_GetToolCount|GUIToolTip_GetToolInfo|GUIToolTip_HitTest|GUIToolTip_NewToolRect|GUIToolTip_Pop|GUIToolTip_PopUp|GUIToolTip_SetDelayTime|GUIToolTip_SetMargin|GUIToolTip_SetMaxTipWidth|GUIToolTip_SetTipBkColor|GUIToolTip_SetTipTextColor|GUIToolTip_SetTitle|GUIToolTip_SetToolInfo|GUIToolTip_SetWindowTheme|GUIToolTip_ToolExists|GUIToolTip_ToolToArray|GUIToolTip_TrackActivate|GUIToolTip_TrackPosition|GUIToolTip_TTFToBits|GUIToolTip_Update|GUIToolTip_UpdateTipText|HexToString|IE_Example|IE_Introduction|IE_VersionInfo|IEAction|IEAttach|IEBodyReadHTML|IEBodyReadText|IEBodyWriteHTML|IECreate|IECreateEmbedded|IEDocGetObj|IEDocInsertHTML|IEDocInsertText|IEDocReadHTML|IEDocWriteHTML|IEErrorHandlerDeRegister|IEErrorHandlerRegister|IEErrorNotify|IEFormElementCheckBoxSelect|IEFormElementGetCollection|IEFormElementGetObjByName|IEFormElementGetValue|IEFormElementOptionSelect|IEFormElementRadioSelect|IEFormElementSetValue|IEFormGetCollection|IEFormGetObjByName|IEFormImageClick|IEFormReset|IEFormSubmit|IEFrameGetCollection|IEFrameGetObjByName|IEGetObjById|IEGetObjByName|IEHeadInsertEventScript|IEImgClick|IEImgGetCollection|IEIsFrameSet|IELinkClickByIndex|IELinkClickByText|IELinkGetCollection|IELoadWait|IELoadWaitTimeout|IENavigate|IEPropertyGet|IEPropertySet|IEQuit|IETableGetCollection|IETableWriteToArray|IETagNameAllGetCollection|IETagNameGetCollection|Iif|INetExplorerCapable|INetGetSource|INetMail|INetSmtpMail|IsPressed|MathCheckDiv|Max|MemGlobalAlloc|MemGlobalFree|MemGlobalLock|MemGlobalSize|MemGlobalUnlock|MemMoveMemory|MemMsgBox|MemShowError|MemVirtualAlloc|MemVirtualAllocEx|MemVirtualFree|MemVirtualFreeEx|Min|MouseTrap|NamedPipes_CallNamedPipe|NamedPipes_ConnectNamedPipe|NamedPipes_CreateNamedPipe|NamedPipes_CreatePipe|NamedPipes_DisconnectNamedPipe|NamedPipes_GetNamedPipeHandleState|NamedPipes_GetNamedPipeInfo|NamedPipes_PeekNamedPipe|NamedPipes_SetNamedPipeHandleState|NamedPipes_TransactNamedPipe|NamedPipes_WaitNamedPipe|Net_Share_ConnectionEnum|Net_Share_FileClose|Net_Share_FileEnum|Net_Share_FileGetInfo|Net_Share_PermStr|Net_Share_ResourceStr|Net_Share_SessionDel|Net_Share_SessionEnum|Net_Share_SessionGetInfo|Net_Share_ShareAdd|Net_Share_ShareCheck|Net_Share_ShareDel|Net_Share_ShareEnum|Net_Share_ShareGetInfo|Net_Share_ShareSetInfo|Net_Share_StatisticsGetSvr|Net_Share_StatisticsGetWrk|Now|NowCalc|NowCalcDate|NowDate|NowTime|PathFull|PathMake|PathSplit|ProcessGetName|ProcessGetPriority|Radian|ReplaceStringInFile|RunDOS|ScreenCapture_Capture|ScreenCapture_CaptureWnd|ScreenCapture_SaveImage|ScreenCapture_SetBMPFormat|ScreenCapture_SetJPGQuality|ScreenCapture_SetTIFColorDepth|ScreenCapture_SetTIFCompression|Security__AdjustTokenPrivileges|Security__GetAccountSid|Security__GetLengthSid|Security__GetTokenInformation|Security__ImpersonateSelf|Security__IsValidSid|Security__LookupAccountName|Security__LookupAccountSid|Security__LookupPrivilegeValue|Security__OpenProcessToken|Security__OpenThreadToken|Security__OpenThreadTokenEx|Security__SetPrivilege|Security__SidToStringSid|Security__SidTypeStr|Security__StringSidToSid|SendMessage|SendMessageA|SetDate|SetTime|Singleton|SoundClose|SoundLength|SoundOpen|SoundPause|SoundPlay|SoundPos|SoundResume|SoundSeek|SoundStatus|SoundStop|SQLite_Changes|SQLite_Close|SQLite_Display2DResult|SQLite_Encode|SQLite_ErrCode|SQLite_ErrMsg|SQLite_Escape|SQLite_Exec|SQLite_FetchData|SQLite_FetchNames|SQLite_GetTable|SQLite_GetTable2d|SQLite_LastInsertRowID|SQLite_LibVersion|SQLite_Open|SQLite_Query|SQLite_QueryFinalize|SQLite_QueryReset|SQLite_QuerySingleRow|SQLite_SaveMode|SQLite_SetTimeout|SQLite_Shutdown|SQLite_SQLiteExe|SQLite_Startup|SQLite_TotalChanges|StringAddComma|StringBetween|StringEncrypt|StringInsert|StringProper|StringRepeat|StringReverse|StringSplit|StringToHex|TCPIpToName|TempFile|TicksToTime|Timer_Diff|Timer_GetTimerID|Timer_Init|Timer_KillAllTimers|Timer_KillTimer|Timer_SetTimer|TimeToTicks|VersionCompare|viClose|viExecCommand|viFindGpib|viGpibBusReset|viGTL|viOpen|viSetAttribute|viSetTimeout|WeekNumberISO|WinAPI_AttachConsole|WinAPI_AttachThreadInput|WinAPI_Beep|WinAPI_BitBlt|WinAPI_CallNextHookEx|WinAPI_Check|WinAPI_ClientToScreen|WinAPI_CloseHandle|WinAPI_CommDlgExtendedError|WinAPI_CopyIcon|WinAPI_CreateBitmap|WinAPI_CreateCompatibleBitmap|WinAPI_CreateCompatibleDC|WinAPI_CreateEvent|WinAPI_CreateFile|WinAPI_CreateFont|WinAPI_CreateFontIndirect|WinAPI_CreateProcess|WinAPI_CreateSolidBitmap|WinAPI_CreateSolidBrush|WinAPI_CreateWindowEx|WinAPI_DefWindowProc|WinAPI_DeleteDC|WinAPI_DeleteObject|WinAPI_DestroyIcon|WinAPI_DestroyWindow|WinAPI_DrawEdge|WinAPI_DrawFrameControl|WinAPI_DrawIcon|WinAPI_DrawIconEx|WinAPI_DrawText|WinAPI_EnableWindow|WinAPI_EnumDisplayDevices|WinAPI_EnumWindows|WinAPI_EnumWindowsPopup|WinAPI_EnumWindowsTop|WinAPI_ExpandEnvironmentStrings|WinAPI_ExtractIconEx|WinAPI_FatalAppExit|WinAPI_FillRect|WinAPI_FindExecutable|WinAPI_FindWindow|WinAPI_FlashWindow|WinAPI_FlashWindowEx|WinAPI_FloatToInt|WinAPI_FlushFileBuffers|WinAPI_FormatMessage|WinAPI_FrameRect|WinAPI_FreeLibrary|WinAPI_GetAncestor|WinAPI_GetAsyncKeyState|WinAPI_GetClassName|WinAPI_GetClientHeight|WinAPI_GetClientRect|WinAPI_GetClientWidth|WinAPI_GetCurrentProcess|WinAPI_GetCurrentProcessID|WinAPI_GetCurrentThread|WinAPI_GetCurrentThreadId|WinAPI_GetCursorInfo|WinAPI_GetDC|WinAPI_GetDesktopWindow|WinAPI_GetDeviceCaps|WinAPI_GetDIBits|WinAPI_GetDlgCtrlID|WinAPI_GetDlgItem|WinAPI_GetFileSizeEx|WinAPI_GetFocus|WinAPI_GetForegroundWindow|WinAPI_GetIconInfo|WinAPI_GetLastError|WinAPI_GetLastErrorMessage|WinAPI_GetModuleHandle|WinAPI_GetMousePos|WinAPI_GetMousePosX|WinAPI_GetMousePosY|WinAPI_GetObject|WinAPI_GetOpenFileName|WinAPI_GetOverlappedResult|WinAPI_GetParent|WinAPI_GetProcessAffinityMask|WinAPI_GetSaveFileName|WinAPI_GetStdHandle|WinAPI_GetStockObject|WinAPI_GetSysColor|WinAPI_GetSysColorBrush|WinAPI_GetSystemMetrics|WinAPI_GetTextExtentPoint32|WinAPI_GetWindow|WinAPI_GetWindowDC|WinAPI_GetWindowHeight|WinAPI_GetWindowLong|WinAPI_GetWindowRect|WinAPI_GetWindowText|WinAPI_GetWindowThreadProcessId|WinAPI_GetWindowWidth|WinAPI_GetXYFromPoint|WinAPI_GlobalMemStatus|WinAPI_GUIDFromString|WinAPI_GUIDFromStringEx|WinAPI_HiWord|WinAPI_InProcess|WinAPI_IntToFloat|WinAPI_InvalidateRect|WinAPI_IsClassName|WinAPI_IsWindow|WinAPI_IsWindowVisible|WinAPI_LoadBitmap|WinAPI_LoadImage|WinAPI_LoadLibrary|WinAPI_LoadLibraryEx|WinAPI_LoadShell32Icon|WinAPI_LoadString|WinAPI_LocalFree|WinAPI_LoWord|WinAPI_MakeDWord|WinAPI_MAKELANGID|WinAPI_MAKELCID|WinAPI_MakeLong|WinAPI_MessageBeep|WinAPI_Mouse_Event|WinAPI_MoveWindow|WinAPI_MsgBox|WinAPI_MulDiv|WinAPI_MultiByteToWideChar|WinAPI_MultiByteToWideCharEx|WinAPI_OpenProcess|WinAPI_PointFromRect|WinAPI_PostMessage|WinAPI_PrimaryLangId|WinAPI_PtInRect|WinAPI_ReadFile|WinAPI_ReadProcessMemory|WinAPI_RectIsEmpty|WinAPI_RedrawWindow|WinAPI_RegisterWindowMessage|WinAPI_ReleaseCapture|WinAPI_ReleaseDC|WinAPI_ScreenToClient|WinAPI_SelectObject|WinAPI_SetBkColor|WinAPI_SetCapture|WinAPI_SetCursor|WinAPI_SetDefaultPrinter|WinAPI_SetDIBits|WinAPI_SetEvent|WinAPI_SetFocus|WinAPI_SetFont|WinAPI_SetHandleInformation|WinAPI_SetLastError|WinAPI_SetParent|WinAPI_SetProcessAffinityMask|WinAPI_SetSysColors|WinAPI_SetTextColor|WinAPI_SetWindowLong|WinAPI_SetWindowPos|WinAPI_SetWindowsHookEx|WinAPI_SetWindowText|WinAPI_ShowCursor|WinAPI_ShowError|WinAPI_ShowMsg|WinAPI_ShowWindow|WinAPI_StringFromGUID|WinAPI_SubLangId|WinAPI_SystemParametersInfo|WinAPI_TwipsPerPixelX|WinAPI_TwipsPerPixelY|WinAPI_UnhookWindowsHookEx|WinAPI_UpdateLayeredWindow|WinAPI_UpdateWindow|WinAPI_ValidateClassName|WinAPI_WaitForInputIdle|WinAPI_WaitForMultipleObjects|WinAPI_WaitForSingleObject|WinAPI_WideCharToMultiByte|WinAPI_WindowFromPoint|WinAPI_WriteConsole|WinAPI_WriteFile|WinAPI_WriteProcessMemory|WinNet_AddConnection|WinNet_AddConnection2|WinNet_AddConnection3|WinNet_CancelConnection|WinNet_CancelConnection2|WinNet_CloseEnum|WinNet_ConnectionDialog|WinNet_ConnectionDialog1|WinNet_DisconnectDialog|WinNet_DisconnectDialog1|WinNet_EnumResource|WinNet_GetConnection|WinNet_GetConnectionPerformance|WinNet_GetLastError|WinNet_GetNetworkInformation|WinNet_GetProviderName|WinNet_GetResourceInformation|WinNet_GetResourceParent|WinNet_GetUniversalName|WinNet_GetUser|WinNet_OpenEnum|WinNet_RestoreConnection|WinNet_UseConnection|Word_VersionInfo|WordAttach|WordCreate|WordDocAdd|WordDocAddLink|WordDocAddPicture|WordDocClose|WordDocFindReplace|WordDocGetCollection|WordDocLinkGetCollection|WordDocOpen|WordDocPrint|WordDocPropertyGet|WordDocPropertySet|WordDocSave|WordDocSaveAs|WordErrorHandlerDeRegister|WordErrorHandlerRegister|WordErrorNotify|WordMacroRun|WordPropertyGet|WordPropertySet|WordQuit|ce|comments-end|comments-start|cs|include|include-once|NoTrayIcon|RequireAdmin|AutoIt3Wrapper_Au3Check_Parameters|AutoIt3Wrapper_Au3Check_Stop_OnWarning|AutoIt3Wrapper_Change2CUI|AutoIt3Wrapper_Compression|AutoIt3Wrapper_cvsWrapper_Parameters|AutoIt3Wrapper_Icon|AutoIt3Wrapper_Outfile|AutoIt3Wrapper_Outfile_Type|AutoIt3Wrapper_Plugin_Funcs|AutoIt3Wrapper_Res_Comment|AutoIt3Wrapper_Res_Description|AutoIt3Wrapper_Res_Field|AutoIt3Wrapper_Res_File_Add|AutoIt3Wrapper_Res_Fileversion|AutoIt3Wrapper_Res_FileVersion_AutoIncrement|AutoIt3Wrapper_Res_Icon_Add|AutoIt3Wrapper_Res_Language|AutoIt3Wrapper_Res_LegalCopyright|AutoIt3Wrapper_res_requestedExecutionLevel|AutoIt3Wrapper_Res_SaveSource|AutoIt3Wrapper_Run_After|AutoIt3Wrapper_Run_Au3check|AutoIt3Wrapper_Run_Before|AutoIt3Wrapper_Run_cvsWrapper|AutoIt3Wrapper_Run_Debug_Mode|AutoIt3Wrapper_Run_Obfuscator|AutoIt3Wrapper_Run_Tidy|AutoIt3Wrapper_Tidy_Stop_OnError|AutoIt3Wrapper_UseAnsi|AutoIt3Wrapper_UseUpx|AutoIt3Wrapper_UseX64|AutoIt3Wrapper_Version|EndRegion|forceref|Obfuscator_Ignore_Funcs|Obfuscator_Ignore_Variables|Obfuscator_Parameters|Region|Tidy_Parameters",t="AppDataCommonDir|AppDataDir|AutoItExe|AutoItPID|AutoItUnicode|AutoItVersion|AutoItX64|COM_EventObj|CommonFilesDir|Compiled|ComputerName|ComSpec|CR|CRLF|DesktopCommonDir|DesktopDepth|DesktopDir|DesktopHeight|DesktopRefresh|DesktopWidth|DocumentsCommonDir|error|exitCode|exitMethod|extended|FavoritesCommonDir|FavoritesDir|GUI_CtrlHandle|GUI_CtrlId|GUI_DragFile|GUI_DragId|GUI_DropId|GUI_WinHandle|HomeDrive|HomePath|HomeShare|HotKeyPressed|HOUR|InetGetActive|InetGetBytesRead|IPAddress1|IPAddress2|IPAddress3|IPAddress4|KBLayout|LF|LogonDNSDomain|LogonDomain|LogonServer|MDAY|MIN|MON|MyDocumentsDir|NumParams|OSBuild|OSLang|OSServicePack|OSTYPE|OSVersion|ProcessorArch|ProgramFilesDir|ProgramsCommonDir|ProgramsDir|ScriptDir|ScriptFullPath|ScriptLineNumber|ScriptName|SEC|StartMenuCommonDir|StartMenuDir|StartupCommonDir|StartupDir|SW_DISABLE|SW_ENABLE|SW_HIDE|SW_LOCK|SW_MAXIMIZE|SW_MINIMIZE|SW_RESTORE|SW_SHOW|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWMINNOACTIVE|SW_SHOWNA|SW_SHOWNOACTIVATE|SW_SHOWNORMAL|SW_UNLOCK|SystemDir|TAB|TempDir|TRAY_ID|TrayIconFlashing|TrayIconVisible|UserName|UserProfileDir|WDAY|WindowsDir|WorkingDir|YDAY|YEAR"; +this.$rules={start:[{token:"comment.line.ahk",regex:"(?:^| );.*$"},{token:"comment.block.ahk",regex:"/\\*",push:[{token:"comment.block.ahk",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.ahk"}]},{token:"doc.comment.ahk",regex:"#cs",push:[{token:"doc.comment.ahk",regex:"#ce",next:"pop"},{defaultToken:"doc.comment.ahk"}]},{token:"keyword.command.ahk",regex:"(?:\\b|^)(?:allowsamelinecomments|clipboardtimeout|commentflag|errorstdout|escapechar|hotkeyinterval|hotkeymodifiertimeout|hotstring|include|includeagain|installkeybdhook|installmousehook|keyhistory|ltrim|maxhotkeysperinterval|maxmem|maxthreads|maxthreadsbuffer|maxthreadsperhotkey|noenv|notrayicon|persistent|singleinstance|usehook|winactivateforce|autotrim|blockinput|click|clipwait|continue|control|controlclick|controlfocus|controlget|controlgetfocus|controlgetpos|controlgettext|controlmove|controlsend|controlsendraw|controlsettext|coordmode|critical|detecthiddentext|detecthiddenwindows|drive|driveget|drivespacefree|edit|endrepeat|envadd|envdiv|envget|envmult|envset|envsub|envupdate|exit|exitapp|fileappend|filecopy|filecopydir|filecreatedir|filecreateshortcut|filedelete|filegetattrib|filegetshortcut|filegetsize|filegettime|filegetversion|fileinstall|filemove|filemovedir|fileread|filereadline|filerecycle|filerecycleempty|fileremovedir|fileselectfile|fileselectfolder|filesetattrib|filesettime|formattime|getkeystate|gosub|goto|groupactivate|groupadd|groupclose|groupdeactivate|gui|guicontrol|guicontrolget|hideautoitwin|hotkey|ifequal|ifexist|ifgreater|ifgreaterorequal|ifinstring|ifless|iflessorequal|ifmsgbox|ifnotequal|ifnotexist|ifnotinstring|ifwinactive|ifwinexist|ifwinnotactive|ifwinnotexist|imagesearch|inidelete|iniread|iniwrite|input|inputbox|keyhistory|keywait|listhotkeys|listlines|listvars|menu|mouseclick|mouseclickdrag|mousegetpos|mousemove|msgbox|onexit|outputdebug|pause|pixelgetcolor|pixelsearch|postmessage|process|progress|random|regdelete|regread|regwrite|reload|repeat|run|runas|runwait|send|sendevent|sendinput|sendmode|sendplay|sendmessage|sendraw|setbatchlines|setcapslockstate|setcontroldelay|setdefaultmousespeed|setenv|setformat|setkeydelay|setmousedelay|setnumlockstate|setscrolllockstate|setstorecapslockmode|settimer|settitlematchmode|setwindelay|setworkingdir|shutdown|sleep|sort|soundbeep|soundget|soundgetwavevolume|soundplay|soundset|soundsetwavevolume|splashimage|splashtextoff|splashtexton|splitpath|statusbargettext|statusbarwait|stringcasesense|stringgetpos|stringleft|stringlen|stringlower|stringmid|stringreplace|stringright|stringsplit|stringtrimleft|stringtrimright|stringupper|suspend|sysget|thread|tooltip|transform|traytip|urldownloadtofile|while|winactivate|winactivatebottom|winclose|winget|wingetactivestats|wingetactivetitle|wingetclass|wingetpos|wingettext|wingettitle|winhide|winkill|winmaximize|winmenuselectitem|winminimize|winminimizeall|winminimizeallundo|winmove|winrestore|winset|winsettitle|winshow|winwait|winwaitactive|winwaitclose|winwaitnotactive)\\b",caseInsensitive:!0},{token:"keyword.control.ahk",regex:"(?:\\b|^)(?:if|else|return|loop|break|for|while|global|local|byref)\\b",caseInsensitive:!0},{token:"support.function.ahk",regex:"(?:\\b|^)(?:abs|acos|asc|asin|atan|ceil|chr|cos|dllcall|exp|fileexist|floor|getkeystate|il_add|il_create|il_destroy|instr|substr|isfunc|islabel|ln|log|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|onmessage|numget|numput|registercallback|regexmatch|regexreplace|round|sin|tan|sqrt|strlen|sb_seticon|sb_setparts|sb_settext|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist)\\b",caseInsensitive:!0},{token:"variable.predefined.ahk",regex:"(?:\\b|^)(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|programfiles|a_programfiles|a_programs|a_programscommon|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel)\\b",caseInsensitive:!0},{token:"support.constant.ahk",regex:"(?:\\b|^)(?:shift|lshift|rshift|alt|lalt|ralt|control|lcontrol|rcontrol|ctrl|lctrl|rctrl|lwin|rwin|appskey|altdown|altup|shiftdown|shiftup|ctrldown|ctrlup|lwindown|lwinup|rwindown|rwinup|lbutton|rbutton|mbutton|wheelup|wheelleft|wheelright|wheeldown|xbutton1|xbutton2|joy1|joy2|joy3|joy4|joy5|joy6|joy7|joy8|joy9|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy30|joy31|joy32|joyx|joyy|joyz|joyr|joyu|joyv|joypov|joyname|joybuttons|joyaxes|joyinfo|space|tab|enter|escape|esc|backspace|bs|delete|del|insert|ins|pgup|pgdn|home|end|up|down|left|right|printscreen|ctrlbreak|pause|scrolllock|capslock|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadmult|numpadadd|numpadsub|numpaddiv|numpaddot|numpaddel|numpadins|numpadclear|numpadup|numpaddown|numpadleft|numpadright|numpadhome|numpadend|numpadpgup|numpadpgdn|numpadenter|f1|f2|f3|f4|f5|f6|f7|f8|f9|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f20|f21|f22|f23|f24|browser_back|browser_forward|browser_refresh|browser_stop|browser_search|browser_favorites|browser_home|volume_mute|volume_down|volume_up|media_next|media_prev|media_stop|media_play_pause|launch_mail|launch_media|launch_app1|launch_app2)\\b",caseInsensitive:!0},{token:"variable.parameter",regex:"(?:\\b|^)(?:pixel|mouse|screen|relative|rgb|ltrim|rtrim|join|low|belownormal|normal|abovenormal|high|realtime|ahk_id|ahk_pid|ahk_class|ahk_group|between|contains|in|is|integer|float|integerfast|floatfast|number|digit|xdigit|alpha|upper|lower|alnum|time|date|not|or|and|alwaysontop|topmost|top|bottom|transparent|transcolor|redraw|region|id|idlast|processname|minmax|controllist|count|list|capacity|statuscd|eject|lock|unlock|label|filesystem|label|setlabel|serial|type|status|static|seconds|minutes|hours|days|read|parse|logoff|close|error|single|tray|add|rename|check|uncheck|togglecheck|enable|disable|toggleenable|default|nodefault|standard|nostandard|color|delete|deleteall|icon|noicon|tip|click|show|mainwindow|nomainwindow|useerrorlevel|text|picture|pic|groupbox|button|checkbox|radio|dropdownlist|ddl|combobox|listbox|listview|datetime|monthcal|updown|slider|tab|tab2|statusbar|treeview|iconsmall|tile|report|sortdesc|nosort|nosorthdr|grid|hdr|autosize|range|xm|ym|ys|xs|xp|yp|font|resize|owner|submit|nohide|minimize|maximize|restore|noactivate|na|cancel|destroy|center|margin|maxsize|minsize|owndialogs|guiescape|guiclose|guisize|guicontextmenu|guidropfiles|tabstop|section|altsubmit|wrap|hscroll|vscroll|border|top|bottom|buttons|expand|first|imagelist|lines|wantctrla|wantf2|vis|visfirst|number|uppercase|lowercase|limit|password|multi|wantreturn|group|background|bold|italic|strike|underline|norm|backgroundtrans|theme|caption|delimiter|minimizebox|maximizebox|sysmenu|toolwindow|flash|style|exstyle|check3|checked|checkedgray|readonly|password|hidden|left|right|center|notab|section|move|focus|hide|choose|choosestring|text|pos|enabled|disabled|visible|lastfound|lastfoundexist|alttab|shiftalttab|alttabmenu|alttabandmenu|alttabmenudismiss|notimers|interrupt|priority|waitclose|blind|raw|unicode|deref|pow|bitnot|bitand|bitor|bitxor|bitshiftleft|bitshiftright|yes|no|ok|cancel|abort|retry|ignore|tryagain|on|off|all|hkey_local_machine|hkey_users|hkey_current_user|hkey_classes_root|hkey_current_config|hklm|hku|hkcu|hkcr|hkcc|reg_sz|reg_expand_sz|reg_multi_sz|reg_dword|reg_qword|reg_binary|reg_link|reg_resource_list|reg_full_resource_descriptor|reg_resource_requirements_list|reg_dword_big_endian)\\b",caseInsensitive:!0},{keywordMap:{"constant.language":e},regex:"\\w+\\b"},{keywordMap:{"variable.function":t},regex:"@\\w+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"keyword.operator.ahk",regex:"=|==|<>|:=|<|>|\\*|\\/|\\+|:|\\?|\\-"},{token:"punctuation.ahk",regex:"#|`|::|,|\\{|\\}|\\(|\\)|\\%"},{token:["punctuation.quote.double","string.quoted.ahk","punctuation.quote.double"],regex:'(")((?:[^"]|"")*)(")'},{token:["label.ahk","punctuation.definition.label.ahk"],regex:"^([^: ]+)(:)(?!:)"}]},this.normalizeRules()};l.metaData={name:"AutoHotKey",scopeName:"source.ahk",fileTypes:["ahk"],foldingStartMarker:"^\\s*/\\*|^(?![^{]*?;|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|;|/\\*(?!.*?\\*/.*\\S))",foldingStopMarker:"^\\s*\\*/|^\\s*\\}"},o.inherits(l,i),t.AutoHotKeyHighlightRules=l}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,r){"use strict";var o=e("../../lib/oop"),i=e("../../range").Range,l=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(a,l),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,r){var o=e.getLine(r);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var i=this._getFoldWidgetBase(e,t,r);return!i&&this.startRegionRe.test(o)?"start":i},this.getFoldWidgetRange=function(e,t,r,o){var i=e.getLine(r);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,r);var l=i.match(this.foldingStartMarker);if(l){var a=l.index;if(l[1])return this.openingBracketBlock(e,l[1],r,a);var n=e.getCommentFoldRange(r,a+l[0].length,1);return n&&!n.isMultiLine()&&(o?n=this.getSectionRange(e,r):"all"!=t&&(n=null)),n}if("markbegin"!==t){var l=i.match(this.foldingStopMarker);if(l){var a=l.index+l[0].length;return l[1]?this.closingBracketBlock(e,l[1],r,a):e.getCommentFoldRange(r,a,-1)}}},this.getSectionRange=function(e,t){var r=e.getLine(t),o=r.search(/\S/),l=t,a=r.length;t+=1;for(var n=t,I=e.getLength();++tG)break;var _=this.getFoldWidgetRange(e,"all",t);if(_){if(_.start.row<=l)break;if(_.isMultiLine())t=_.end.row;else if(o==G)break}n=t}}return new i(l,a,n,e.getLine(n).length)},this.getCommentRegionBlock=function(e,t,r){for(var o=t.search(/\s*$/),l=e.getLength(),a=r,n=/^\s*(?:\/\*|\/\/)#(end)?region\b/,I=1;++ra)return new i(a,o,_,t.length)}}.call(a.prototype)}),define("ace/mode/autohotkey",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/autohotkey_highlight_rules","ace/mode/folding/cstyle"],function(e,t,r){"use strict";var o=e("../lib/oop"),i=e("./text").Mode,l=e("./autohotkey_highlight_rules").AutoHotKeyHighlightRules,a=e("./folding/cstyle").FoldMode,n=function(){this.HighlightRules=l,this.foldingRules=new a};o.inherits(n,i),function(){this.lineCommentStart=";",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/autohotkey"}.call(n.prototype),t.Mode=n}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-batchfile.js b/www/js/vendor/ace/mode-batchfile.js index b7ece3be0..d7ada2e09 100755 --- a/www/js/vendor/ace/mode-batchfile.js +++ b/www/js/vendor/ace/mode-batchfile.js @@ -1,223 +1 @@ -define("ace/mode/batchfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var BatchFileHighlightRules = function() { - - this.$rules = { start: - [ { token: 'keyword.command.dosbatch', - regex: '\\b(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\\b', - caseInsensitive: true }, - { token: 'keyword.control.statement.dosbatch', - regex: '\\b(?:goto|call|exit)\\b', - caseInsensitive: true }, - { token: 'keyword.control.conditional.if.dosbatch', - regex: '\\bif\\s+not\\s+(?:exist|defined|errorlevel|cmdextversion)\\b', - caseInsensitive: true }, - { token: 'keyword.control.conditional.dosbatch', - regex: '\\b(?:if|else)\\b', - caseInsensitive: true }, - { token: 'keyword.control.repeat.dosbatch', - regex: '\\bfor\\b', - caseInsensitive: true }, - { token: 'keyword.operator.dosbatch', - regex: '\\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\\b' }, - { token: ['doc.comment', 'comment'], - regex: '(?:^|\\b)(rem)($|\\s.*$)', - caseInsensitive: true }, - { token: 'comment.line.colons.dosbatch', - regex: '::.*$' }, - { include: 'variable' }, - { token: 'punctuation.definition.string.begin.shell', - regex: '"', - push: [ - { token: 'punctuation.definition.string.end.shell', regex: '"', next: 'pop' }, - { include: 'variable' }, - { defaultToken: 'string.quoted.double.dosbatch' } ] }, - { token: 'keyword.operator.pipe.dosbatch', regex: '[|]' }, - { token: 'keyword.operator.redirect.shell', - regex: '&>|\\d*>&\\d*|\\d*(?:>>|>|<)|\\d*<&|\\d*<>' } ], - variable: [ - { token: 'constant.numeric', regex: '%%\\w+|%[*\\d]|%\\w+%'}, - { token: 'constant.numeric', regex: '%~\\d+'}, - { token: ['markup.list', 'constant.other', 'markup.list'], - regex: '(%)(\\w+)(%?)' }]} - - this.normalizeRules(); -}; - -BatchFileHighlightRules.metaData = { name: 'Batch File', - scopeName: 'source.dosbatch', - fileTypes: [ 'bat' ] } - - -oop.inherits(BatchFileHighlightRules, TextHighlightRules); - -exports.BatchFileHighlightRules = BatchFileHighlightRules; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/batchfile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/batchfile_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var BatchFileHighlightRules = require("./batchfile_highlight_rules").BatchFileHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = BatchFileHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "::"; - this.blockComment = ""; - this.$id = "ace/mode/batchfile"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/batchfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,i){"use strict";var o=e("../lib/oop"),n=e("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{token:"keyword.command.dosbatch",regex:"\\b(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\\b",caseInsensitive:!0},{token:"keyword.control.statement.dosbatch",regex:"\\b(?:goto|call|exit)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.if.dosbatch",regex:"\\bif\\s+not\\s+(?:exist|defined|errorlevel|cmdextversion)\\b",caseInsensitive:!0},{token:"keyword.control.conditional.dosbatch",regex:"\\b(?:if|else)\\b",caseInsensitive:!0},{token:"keyword.control.repeat.dosbatch",regex:"\\bfor\\b",caseInsensitive:!0},{token:"keyword.operator.dosbatch",regex:"\\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\\b"},{token:["doc.comment","comment"],regex:"(?:^|\\b)(rem)($|\\s.*$)",caseInsensitive:!0},{token:"comment.line.colons.dosbatch",regex:"::.*$"},{include:"variable"},{token:"punctuation.definition.string.begin.shell",regex:'"',push:[{token:"punctuation.definition.string.end.shell",regex:'"',next:"pop"},{include:"variable"},{defaultToken:"string.quoted.double.dosbatch"}]},{token:"keyword.operator.pipe.dosbatch",regex:"[|]"},{token:"keyword.operator.redirect.shell",regex:"&>|\\d*>&\\d*|\\d*(?:>>|>|<)|\\d*<&|\\d*<>"}],variable:[{token:"constant.numeric",regex:"%%\\w+|%[*\\d]|%\\w+%"},{token:"constant.numeric",regex:"%~\\d+"},{token:["markup.list","constant.other","markup.list"],regex:"(%)(\\w+)(%?)"}]},this.normalizeRules()};r.metaData={name:"Batch File",scopeName:"source.dosbatch",fileTypes:["bat"]},o.inherits(r,n),t.BatchFileHighlightRules=r}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,i){"use strict";var o=e("../../lib/oop"),n=e("../../range").Range,r=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(s,r),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,i){var o=e.getLine(i);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var n=this._getFoldWidgetBase(e,t,i);return!n&&this.startRegionRe.test(o)?"start":n},this.getFoldWidgetRange=function(e,t,i,o){var n=e.getLine(i);if(this.startRegionRe.test(n))return this.getCommentRegionBlock(e,n,i);var r=n.match(this.foldingStartMarker);if(r){var s=r.index;if(r[1])return this.openingBracketBlock(e,r[1],i,s);var a=e.getCommentFoldRange(i,s+r[0].length,1);return a&&!a.isMultiLine()&&(o?a=this.getSectionRange(e,i):"all"!=t&&(a=null)),a}if("markbegin"!==t){var r=n.match(this.foldingStopMarker);if(r){var s=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],i,s):e.getCommentFoldRange(i,s,-1)}}},this.getSectionRange=function(e,t){var i=e.getLine(t),o=i.search(/\S/),r=t,s=i.length;t+=1;for(var a=t,l=e.getLength();++tc)break;var d=this.getFoldWidgetRange(e,"all",t);if(d){if(d.start.row<=r)break;if(d.isMultiLine())t=d.end.row;else if(o==c)break}a=t}}return new n(r,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,i){for(var o=t.search(/\s*$/),r=e.getLength(),s=i,a=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++is)return new n(s,o,d,t.length)}}.call(s.prototype)}),define("ace/mode/batchfile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/batchfile_highlight_rules","ace/mode/folding/cstyle"],function(e,t,i){"use strict";var o=e("../lib/oop"),n=e("./text").Mode,r=e("./batchfile_highlight_rules").BatchFileHighlightRules,s=e("./folding/cstyle").FoldMode,a=function(){this.HighlightRules=r,this.foldingRules=new s};o.inherits(a,n),function(){this.lineCommentStart="::",this.blockComment="",this.$id="ace/mode/batchfile"}.call(a.prototype),t.Mode=a}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-c9search.js b/www/js/vendor/ace/mode-c9search.js index 7c73d6536..a552e2ff7 100755 --- a/www/js/vendor/ace/mode-c9search.js +++ b/www/js/vendor/ace/mode-c9search.js @@ -1,275 +1 @@ -define("ace/mode/c9search_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -function safeCreateRegexp(source, flag) { - try { - return new RegExp(source, flag); - } catch(e) {} -} - -var C9SearchHighlightRules = function() { - this.$rules = { - "start" : [ - { - tokenNames : ["c9searchresults.constant.numeric", "c9searchresults.text", "c9searchresults.text", "c9searchresults.keyword"], - regex : "(^\\s+[0-9]+)(:\\s)(.+)", - onMatch : function(val, state, stack) { - var values = this.splitRegex.exec(val); - var types = this.tokenNames; - var tokens = [{ - type: types[0], - value: values[1] - },{ - type: types[1], - value: values[2] - }]; - - var regex = stack[1]; - var str = values[3]; - - var m; - var last = 0; - if (regex && regex.exec) { - regex.lastIndex = 0; - while (m = regex.exec(str)) { - var skipped = str.substring(last, m.index); - last = regex.lastIndex; - if (skipped) - tokens.push({type: types[2], value: skipped}); - if (m[0]) - tokens.push({type: types[3], value: m[0]}); - else if (!skipped) - break; - } - } - if (last < str.length) - tokens.push({type: types[2], value: str.substr(last)}); - return tokens; - } - }, - { - token : ["string", "text"], // single line - regex : "(\\S.*)(:$)" - }, - { - regex : "Searching for .*$", - onMatch: function(val, state, stack) { - var parts = val.split("\x01"); - if (parts.length < 3) - return "text"; - - var options, search, replace; - - var i = 0; - var tokens = [{ - value: parts[i++] + "'", - type: "text" - }, { - value: search = parts[i++], - type: "text" // "c9searchresults.keyword" - }, { - value: "'" + parts[i++], - type: "text" - }]; - if (parts[2] !== " in") { - replace = parts[i]; - tokens.push({ - value: "'" + parts[i++] + "'", - type: "text" - }, { - value: parts[i++], - type: "text" - }); - } - tokens.push({ - value: " " + parts[i++] + " ", - type: "text" - }); - if (parts[i+1]) { - options = parts[i+1]; - tokens.push({ - value: "(" + parts[i+1] + ")", - type: "text" - }); - i += 1; - } else { - i -= 1; - } - while (i++ < parts.length) { - parts[i] && tokens.push({ - value: parts[i], - type: "text" - }); - } - - if (replace) { - search = replace; - options = ""; - } - - if (search) { - if (!/regex/.test(options)) - search = lang.escapeRegExp(search); - if (/whole/.test(options)) - search = "\\b" + search + "\\b"; - } - - var regex = search && safeCreateRegexp( - "(" + search + ")", - / sensitive/.test(options) ? "g" : "ig" - ); - if (regex) { - stack[0] = state; - stack[1] = regex; - } - - return tokens; - } - }, - { - regex : "\\d+", - token: "constant.numeric" - } - ] - }; -}; - -oop.inherits(C9SearchHighlightRules, TextHighlightRules); - -exports.C9SearchHighlightRules = C9SearchHighlightRules; - -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/folding/c9search",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /^(\S.*\:|Searching for.*)$/; - this.foldingStopMarker = /^(\s+|Found.*)$/; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var lines = session.doc.getAllLines(row); - var line = lines[row]; - var level1 = /^(Found.*|Searching for.*)$/; - var level2 = /^(\S.*\:|\s*)$/; - var re = level1.test(line) ? level1 : level2; - - var startRow = row; - var endRow = row; - - if (this.foldingStartMarker.test(line)) { - for (var i = row + 1, l = session.getLength(); i < l; i++) { - if (re.test(lines[i])) - break; - } - endRow = i; - } - else if (this.foldingStopMarker.test(line)) { - for (var i = row - 1; i >= 0; i--) { - line = lines[i]; - if (re.test(line)) - break; - } - startRow = i; - } - if (startRow != endRow) { - var col = line.length; - if (re === level1) - col = line.search(/\(Found[^)]+\)$|$/); - return new Range(startRow, col, endRow, 0); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/c9search",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c9search_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/c9search"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var C9SearchHighlightRules = require("./c9search_highlight_rules").C9SearchHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var C9StyleFoldMode = require("./folding/c9search").FoldMode; - -var Mode = function() { - this.HighlightRules = C9SearchHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.foldingRules = new C9StyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/c9search"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/c9search_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function r(e,t){try{return new RegExp(e,t)}catch(e){}}var i=e("../lib/oop"),o=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{tokenNames:["c9searchresults.constant.numeric","c9searchresults.text","c9searchresults.text","c9searchresults.keyword"],regex:"(^\\s+[0-9]+)(:\\s)(.+)",onMatch:function(e,t,n){var r,i=this.splitRegex.exec(e),o=this.tokenNames,s=[{type:o[0],value:i[1]},{type:o[1],value:i[2]}],a=n[1],c=i[3],u=0;if(a&&a.exec)for(a.lastIndex=0;r=a.exec(c);){var h=c.substring(u,r.index);if(u=a.lastIndex,h&&s.push({type:o[2],value:h}),r[0])s.push({type:o[3],value:r[0]});else if(!h)break}return u=0&&(o=r[l],!c.test(o));l--);u=l}if(u!=h){var d=o.length;return c===s&&(d=o.search(/\(Found[^)]+\)$|$/)),new i(u,d,h,0)}}}.call(s.prototype)}),define("ace/mode/c9search",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c9search_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/c9search"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,o=e("./c9search_highlight_rules").C9SearchHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./folding/c9search").FoldMode,c=function(){this.HighlightRules=o,this.$outdent=new s,this.foldingRules=new a};r.inherits(c,i),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c9search"}.call(c.prototype),t.Mode=c}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-c_cpp.js b/www/js/vendor/ace/mode-c_cpp.js index 97f3dec5d..a9eef8b1d 100755 --- a/www/js/vendor/ace/mode-c_cpp.js +++ b/www/js/vendor/ace/mode-c_cpp.js @@ -1,849 +1 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b" - -var c_cppHighlightRules = function() { - - var keywordControls = ( - "break|case|continue|default|do|else|for|goto|if|_Pragma|" + - "return|switch|while|catch|operator|try|throw|using" - ); - - var storageType = ( - "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + - "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" + - "class|wchar_t|template" - ); - - var storageModifiers = ( - "const|extern|register|restrict|static|volatile|inline|private|" + - "protected|public|friend|explicit|virtual|export|mutable|typename|" + - "constexpr|new|delete" - ); - - var keywordOperators = ( - "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + - "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" - ); - - var builtinConstants = ( - "NULL|true|false|TRUE|FALSE" - ); - - var keywordMapper = this.$keywords = this.createKeywordMapper({ - "keyword.control" : keywordControls, - "storage.type" : storageType, - "storage.modifier" : storageModifiers, - "keyword.operator" : keywordOperators, - "variable.language": "this", - "constant.language": builtinConstants - }, "identifier"); - - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b"; - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "//", - next : "singleLineComment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // multi line string start - regex : '["].*\\\\$', - next : "qqstring" - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "string", // multi line string start - regex : "['].*\\\\$", - next : "qstring" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" - }, { - token : "keyword", // pre-compiler directives - regex : "#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b", - next : "directive" - }, { - token : "keyword", // special case pre-compiler directive - regex : "(?:#\\s*endif)\\b" - }, { - token : "support.function.C99.c", - regex : cFunctions - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)" - }, { - token : "punctuation.operator", - regex : "\\?|\\:|\\,|\\;|\\." - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - "singleLineComment" : [ - { - token : "comment", - regex : /\\$/, - next : "singleLineComment" - }, { - token : "comment", - regex : /$/, - next : "start" - }, { - defaultToken: "comment" - } - ], - "qqstring" : [ - { - token : "string", - regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', - next : "start" - }, { - defaultToken : "string" - } - ], - "qstring" : [ - { - token : "string", - regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", - next : "start" - }, { - defaultToken : "string" - } - ], - "directive" : [ - { - token : "constant.other.multiline", - regex : /\\/ - }, - { - token : "constant.other.multiline", - regex : /.*\\/ - }, - { - token : "constant.other", - regex : "\\s*<.+?>", - next : "start" - }, - { - token : "constant.other", // single line - regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', - next : "start" - }, - { - token : "constant.other", // single line - regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", - next : "start" - }, - { - token : "constant.other", - regex : /[^\\\/]+/, - next : "start" - } - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); -}; - -oop.inherits(c_cppHighlightRules, TextHighlightRules); - -exports.c_cppHighlightRules = c_cppHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = c_cppHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/c_cpp"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(i,o),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,s=t.cFunctions="\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b",a=function(){var e="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",t="asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|class|wchar_t|template",n="const|extern|register|restrict|static|volatile|inline|private|protected|public|friend|explicit|virtual|export|mutable|typename|constexpr|new|delete",r="and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eqconst_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace",i="NULL|true|false|TRUE|FALSE",a=this.$keywords=this.createKeywordMapper({"keyword.control":e,"storage.type":t,"storage.modifier":n,"keyword.operator":r,"variable.language":"this","constant.language":i},"identifier");this.$rules={start:[{token:"comment",regex:"//",next:"singleLineComment"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b",next:"directive"},{token:"keyword",regex:"(?:#\\s*endif)\\b"},{token:"support.function.C99.c",regex:s},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],singleLineComment:[{token:"comment",regex:/\\$/,next:"singleLineComment"},{token:"comment",regex:/$/,next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{defaultToken:"string"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{defaultToken:"string"}],directive:[{token:"constant.other.multiline",regex:/\\/},{token:"constant.other.multiline",regex:/.*\\/},{token:"constant.other",regex:"\\s*<.+?>",next:"start"},{token:"constant.other",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(o,"doc-",[o.getEndRule("start")])};r.inherits(a,i),t.c_cppHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,s=e.findMatchingBracket({row:t,column:i});if(!s||s.row==t)return 0;var a=this.$getIndent(e.getLine(s.row));e.replace(new r(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],u={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?r=u[t]:void(r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,i){var s=n.getCursorPosition(),l=o.doc.getLine(s.row);if("{"==i){g(n);var c=n.getSelectionRange(),u=o.doc.getTextRange(c);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(l[s.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var f=l.substring(s.column,s.column+1);if("}"==f){var m=o.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(null!==m&&d.isAutoInsertedClosing(s,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var h="";d.isMaybeInsertedClosing(s,l)&&(h=a.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var f=l.substring(s.column,s.column+1);if("}"===f){var p=o.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!p)return null;var x=this.$getIndent(o.getLine(p.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var b=x+o.getTabString();return{text:"\n"+b+"\n"+x+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var s=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==s){g(n);var a=o.doc.getLine(i.start.row),l=a.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"("+s+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var a=n.getCursorPosition(),l=r.doc.getLine(a.row),c=l.substring(a.column,a.column+1);if(")"==c){var u=r.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==u&&d.isAutoInsertedClosing(a,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(")"==a)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"["+s+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var a=n.getCursorPosition(),l=r.doc.getLine(a.row),c=l.substring(a.column,a.column+1);if("]"==c){var u=r.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==u&&d.isAutoInsertedClosing(a,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if("]"==a)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var i=o,s=n.getSelectionRange(),a=r.doc.getTextRange(s);if(""!==a&&"'"!==a&&'"'!=a&&n.getWrapBehavioursEnabled())return{text:i+a+i,selection:!1};var l=n.getCursorPosition(),c=r.doc.getLine(l.row),u=c.substring(l.column-1,l.column),d=c.substring(l.column,l.column+1),f=r.getTokenAt(l.row,l.column),m=r.getTokenAt(l.row,l.column+1);if("\\"==u&&f&&/escape/.test(f.type))return null;var h,p=f&&/string/.test(f.type),x=!m||/string/.test(m.type);if(d==i)h=p!==x;else{if(p&&!x)return null;if(p&&x)return null;var b=r.$mode.tokenRe;b.lastIndex=0;var k=b.test(u);b.lastIndex=0;var v=b.test(u);if(k||v)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(a==i)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){var o=new s(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var i=o.match(this.foldingStartMarker);if(i){var s=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,s);var a=e.getCommentFoldRange(n,s+i[0].length,1);return a&&!a.isMultiLine()&&(r?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),i=t,s=n.length;t+=1;for(var a=t,l=e.getLength();++tc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=i)break;if(u.isMultiLine())t=u.end.row;else if(r==c)break}a=t}}return new o(i,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++ns)return new o(s,r,u,t.length)}}.call(s.prototype)}),define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./c_cpp_highlight_rules").c_cppHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=(e("../range").Range,e("./behaviour/cstyle").CstyleBehaviour),l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new s,this.$behaviour=new a,this.foldingRules=new l};r.inherits(c,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens,s=o.state;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e){var a=t.match(/^.*[\{\(\[]\s*$/);a&&(r+=n)}else if("doc-start"==e){if("start"==s)return"";var a=t.match(/^\s*(\/?)\*/);a&&(a[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp"}.call(c.prototype),t.Mode=c}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-cirru.js b/www/js/vendor/ace/mode-cirru.js index 3de898a00..68606e70b 100755 --- a/www/js/vendor/ace/mode-cirru.js +++ b/www/js/vendor/ace/mode-cirru.js @@ -1,202 +1 @@ -define("ace/mode/cirru_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var CirruHighlightRules = function() { - this.$rules = { - start: [{ - token: 'constant.numeric', - regex: /[\d\.]+/ - }, { - token: 'comment.line.double-dash', - regex: /--/, - next: 'comment', - }, { - token: 'storage.modifier', - regex: /\(/, - }, { - token: 'storage.modifier', - regex: /\,/, - next: 'line', - }, { - token: 'support.function', - regex: /[^\(\)\"\s]+/, - next: 'line' - }, { - token: 'string.quoted.double', - regex: /"/, - next: 'string', - }, { - token: 'storage.modifier', - regex: /\)/, - }], - comment: [{ - token: 'comment.line.double-dash', - regex: /\ +[^\n]+/, - next: 'start', - }], - string: [{ - token: 'string.quoted.double', - regex: /"/, - next: 'line', - }, { - token: 'constant.character.escape', - regex: /\\/, - next: 'escape', - }, { - token: 'string.quoted.double', - regex: /[^\\\"]+/, - }], - escape: [{ - token: 'constant.character.escape', - regex: /./, - next: 'string', - }], - line: [{ - token: 'constant.numeric', - regex: /[\d\.]+/ - }, { - token: 'markup.raw', - regex: /^\s*/, - next: 'start', - }, { - token: 'storage.modifier', - regex: /\$/, - next: 'start', - }, { - token: 'variable.parameter', - regex: /[^\(\)\"\s]+/ - }, { - token: 'storage.modifier', - regex: /\(/, - next: 'start' - }, { - token: 'storage.modifier', - regex: /\)/, - }, { - token: 'markup.raw', - regex: /^\ */, - next: 'start', - }, { - token: 'string.quoted.double', - regex: /"/, - next: 'string', - }] - } - -}; - -oop.inherits(CirruHighlightRules, TextHighlightRules); - -exports.CirruHighlightRules = CirruHighlightRules; -}); - -define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/cirru",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cirru_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CirruHighlightRules = require("./cirru_highlight_rules").CirruHighlightRules; -var CoffeeFoldMode = require("./folding/coffee").FoldMode; - -var Mode = function() { - this.HighlightRules = CirruHighlightRules; - this.foldingRules = new CoffeeFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "--"; - this.$id = "ace/mode/cirru"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/cirru_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var i=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,n=function(){this.$rules={start:[{token:"constant.numeric",regex:/[\d\.]+/},{token:"comment.line.double-dash",regex:/--/,next:"comment"},{token:"storage.modifier",regex:/\(/},{token:"storage.modifier",regex:/\,/,next:"line"},{token:"support.function",regex:/[^\(\)\"\s]+/,next:"line"},{token:"string.quoted.double",regex:/"/,next:"string"},{token:"storage.modifier",regex:/\)/}],comment:[{token:"comment.line.double-dash",regex:/\ +[^\n]+/,next:"start"}],string:[{token:"string.quoted.double",regex:/"/,next:"line"},{token:"constant.character.escape",regex:/\\/,next:"escape"},{token:"string.quoted.double",regex:/[^\\\"]+/}],escape:[{token:"constant.character.escape",regex:/./,next:"string"}],line:[{token:"constant.numeric",regex:/[\d\.]+/},{token:"markup.raw",regex:/^\s*/,next:"start"},{token:"storage.modifier",regex:/\$/,next:"start"},{token:"variable.parameter",regex:/[^\(\)\"\s]+/},{token:"storage.modifier",regex:/\(/,next:"start"},{token:"storage.modifier",regex:/\)/},{token:"markup.raw",regex:/^\ */,next:"start"},{token:"string.quoted.double",regex:/"/,next:"string"}]}};i.inherits(n,o),t.CirruHighlightRules=n}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,r){"use strict";var i=e("../../lib/oop"),o=e("./fold_mode").FoldMode,n=e("../../range").Range,s=t.FoldMode=function(){};i.inherits(s,o),function(){this.getFoldWidgetRange=function(e,t,r){var i=this.indentationBlock(e,r);if(i)return i;var o=/\S/,s=e.getLine(r),g=s.search(o);if(g!=-1&&"#"==s[g]){for(var a=s.length,d=e.getLength(),l=r,c=r;++rl){var f=e.getLine(c).length;return new n(l,a,c,f)}}},this.getFoldWidget=function(e,t,r){var i=e.getLine(r),o=i.search(/\S/),n=e.getLine(r+1),s=e.getLine(r-1),g=s.search(/\S/),a=n.search(/\S/);if(o==-1)return e.foldWidgets[r-1]=g!=-1&&g ->> .. / < <= = ' + - '== > > >= >= accessor aclone ' + - 'add-classpath add-watch agent agent-errors aget alength alias all-ns ' + - 'alter alter-meta! alter-var-root amap ancestors and apply areduce ' + - 'array-map aset aset-boolean aset-byte aset-char aset-double aset-float ' + - 'aset-int aset-long aset-short assert assoc assoc! assoc-in associative? ' + - 'atom await await-for await1 bases bean bigdec bigint binding bit-and ' + - 'bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left ' + - 'bit-shift-right bit-test bit-xor boolean boolean-array booleans ' + - 'bound-fn bound-fn* butlast byte byte-array bytes cast char char-array ' + - 'char-escape-string char-name-string char? chars chunk chunk-append ' + - 'chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? ' + - 'class class? clear-agent-errors clojure-version coll? comment commute ' + - 'comp comparator compare compare-and-set! compile complement concat cond ' + - 'condp conj conj! cons constantly construct-proxy contains? count ' + - 'counted? create-ns create-struct cycle dec decimal? declare definline ' + - 'defmacro defmethod defmulti defn defn- defonce defstruct delay delay? ' + - 'deliver deref derive descendants destructure disj disj! dissoc dissoc! ' + - 'distinct distinct? doall doc dorun doseq dosync dotimes doto double ' + - 'double-array doubles drop drop-last drop-while empty empty? ensure ' + - 'enumeration-seq eval even? every? false? ffirst file-seq filter find ' + - 'find-doc find-ns find-var first float float-array float? floats flush ' + - 'fn fn? fnext for force format future future-call future-cancel ' + - 'future-cancelled? future-done? future? gen-class gen-interface gensym ' + - 'get get-in get-method get-proxy-class get-thread-bindings get-validator ' + - 'hash hash-map hash-set identical? identity if-let if-not ifn? import ' + - 'in-ns inc init-proxy instance? int int-array integer? interleave intern ' + - 'interpose into into-array ints io! isa? iterate iterator-seq juxt key ' + - 'keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list ' + - 'list* list? load load-file load-reader load-string loaded-libs locking ' + - 'long long-array longs loop macroexpand macroexpand-1 make-array ' + - 'make-hierarchy map map? mapcat max max-key memfn memoize merge ' + - 'merge-with meta method-sig methods min min-key mod name namespace neg? ' + - 'newline next nfirst nil? nnext not not-any? not-empty not-every? not= ' + - 'ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ' + - 'ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? ' + - 'or parents partial partition pcalls peek persistent! pmap pop pop! ' + - 'pop-thread-bindings pos? pr pr-str prefer-method prefers ' + - 'primitives-classnames print print-ctor print-doc print-dup print-method ' + - 'print-namespace-doc print-simple print-special-doc print-str printf ' + - 'println println-str prn prn-str promise proxy proxy-call-with-super ' + - 'proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot ' + - 'rand rand-int range ratio? rational? rationalize re-find re-groups ' + - 're-matcher re-matches re-pattern re-seq read read-line read-string ' + - 'reduce ref ref-history-count ref-max-history ref-min-history ref-set ' + - 'refer refer-clojure release-pending-sends rem remove remove-method ' + - 'remove-ns remove-watch repeat repeatedly replace replicate require ' + - 'reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq ' + - 'rsubseq second select-keys send send-off seq seq? seque sequence ' + - 'sequential? set set-validator! set? short short-array shorts ' + - 'shutdown-agents slurp some sort sort-by sorted-map sorted-map-by ' + - 'sorted-set sorted-set-by sorted? special-form-anchor special-symbol? ' + - 'split-at split-with str stream? string? struct struct-map subs subseq ' + - 'subvec supers swap! symbol symbol? sync syntax-symbol-anchor take ' + - 'take-last take-nth take-while test the-ns time to-array to-array-2d ' + - 'trampoline transient tree-seq true? type unchecked-add unchecked-dec ' + - 'unchecked-divide unchecked-inc unchecked-multiply unchecked-negate ' + - 'unchecked-remainder unchecked-subtract underive unquote ' + - 'unquote-splicing update-in update-proxy use val vals var-get var-set ' + - 'var? vary-meta vec vector vector? when when-first when-let when-not ' + - 'while with-bindings with-bindings* with-in-str with-loading-context ' + - 'with-local-vars with-meta with-open with-out-str with-precision xml-seq ' + - 'zero? zipmap' - ); - - var keywords = ('throw try var ' + - 'def do fn if let loop monitor-enter monitor-exit new quote recur set!' - ); - - var buildinConstants = ("true false nil"); - - var keywordMapper = this.createKeywordMapper({ - "keyword": keywords, - "constant.language": buildinConstants, - "support.function": builtinFunctions - }, "identifier", false, " "); - - this.$rules = { - "start" : [ - { - token : "comment", - regex : ";.*$" - }, { - token : "keyword", //parens - regex : "[\\(|\\)]" - }, { - token : "keyword", //lists - regex : "[\\'\\(]" - }, { - token : "keyword", //vectors - regex : "[\\[|\\]]" - }, { - token : "keyword", //sets and maps - regex : "[\\{|\\}|\\#\\{|\\#\\}]" - }, { - token : "keyword", // ampersands - regex : '[\\&]' - }, { - token : "keyword", // metadata - regex : '[\\#\\^\\{]' - }, { - token : "keyword", // anonymous fn syntactic sugar - regex : '[\\%]' - }, { - token : "keyword", // deref reader macro - regex : '[@]' - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "constant.language", - regex : '[!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+||=|!=|<=|>=|<>|<|>|!|&&]' - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b" - }, { - token : "string", // single line - regex : '"', - next: "string" - }, { - token : "constant", // symbol - regex : /:[^()\[\]{}'"\^%`,;\s]+/ - }, { - token : "string.regexp", //Regular Expressions - regex : '/#"(?:\\.|(?:\\\")|[^\""\n])*"/g' - } - - ], - "string" : [ - { - token : "constant.language.escape", - regex : "\\\\.|\\\\$" - }, { - token : "string", - regex : '[^"\\\\]+' - }, { - token : "string", - regex : '"', - next : "start" - } - ] - }; -}; - -oop.inherits(ClojureHighlightRules, TextHighlightRules); - -exports.ClojureHighlightRules = ClojureHighlightRules; -}); - -define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingParensOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\)/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\))/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - var match = line.match(/^(\s+)/); - if (match) { - return match[1]; - } - - return ""; - }; - -}).call(MatchingParensOutdent.prototype); - -exports.MatchingParensOutdent = MatchingParensOutdent; -}); - -define("ace/mode/clojure",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/clojure_highlight_rules","ace/mode/matching_parens_outdent"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var ClojureHighlightRules = require("./clojure_highlight_rules").ClojureHighlightRules; -var MatchingParensOutdent = require("./matching_parens_outdent").MatchingParensOutdent; - -var Mode = function() { - this.HighlightRules = ClojureHighlightRules; - this.$outdent = new MatchingParensOutdent(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = ";"; - this.minorIndentFunctions = ["defn", "defn-", "defmacro", "def", "deftest", "testing"]; - - this.$toIndent = function(str) { - return str.split('').map(function(ch) { - if (/\s/.exec(ch)) { - return ch; - } else { - return ' '; - } - }).join(''); - }; - - this.$calculateIndent = function(line, tab) { - var baseIndent = this.$getIndent(line); - var delta = 0; - var isParen, ch; - for (var i = line.length - 1; i >= 0; i--) { - ch = line[i]; - if (ch === '(') { - delta--; - isParen = true; - } else if (ch === '(' || ch === '[' || ch === '{') { - delta--; - isParen = false; - } else if (ch === ')' || ch === ']' || ch === '}') { - delta++; - } - if (delta < 0) { - break; - } - } - if (delta < 0 && isParen) { - i += 1; - var iBefore = i; - var fn = ''; - while (true) { - ch = line[i]; - if (ch === ' ' || ch === '\t') { - if(this.minorIndentFunctions.indexOf(fn) !== -1) { - return this.$toIndent(line.substring(0, iBefore - 1) + tab); - } else { - return this.$toIndent(line.substring(0, i + 1)); - } - } else if (ch === undefined) { - return this.$toIndent(line.substring(0, iBefore - 1) + tab); - } - fn += line[i]; - i++; - } - } else if(delta < 0 && !isParen) { - return this.$toIndent(line.substring(0, i+1)); - } else if(delta > 0) { - baseIndent = baseIndent.substring(0, baseIndent.length - tab.length); - return baseIndent; - } else { - return baseIndent; - } - }; - - this.getNextLineIndent = function(state, line, tab) { - return this.$calculateIndent(line, tab); - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/clojure"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/clojure_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),s=e("./text_highlight_rules").TextHighlightRules,a=function(){var e="* *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *e *err* *file* *flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *use-context-classloader* *warn-on-reflection* + - -> ->> .. / < <= = == > > >= >= accessor aclone add-classpath add-watch agent agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* butlast byte byte-array bytes cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec decimal? declare definline defmacro defmethod defmulti defn defn- defonce defstruct delay delay? deliver deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall doc dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq eval even? every? false? ffirst file-seq filter find find-doc find-ns find-var first float float-array float? floats flush fn fn? fnext for force format future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator hash hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map? mapcat max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod name namespace neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? or parents partial partition pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-doc print-dup print-method print-namespace-doc print-simple print-special-doc print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string reduce ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure release-pending-sends rem remove remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq rsubseq second select-keys send send-off seq seq? seque sequence sequential? set set-validator! set? short short-array shorts shutdown-agents slurp some sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-form-anchor special-symbol? split-at split-with str stream? string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync syntax-symbol-anchor take take-last take-nth take-while test the-ns time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-dec unchecked-divide unchecked-inc unchecked-multiply unchecked-negate unchecked-remainder unchecked-subtract underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision xml-seq zero? zipmap",t="throw try var def do fn if let loop monitor-enter monitor-exit new quote recur set!",n="true false nil",r=this.createKeywordMapper({keyword:t,"constant.language":n,"support.function":e},"identifier",!1," ");this.$rules={start:[{token:"comment",regex:";.*$"},{token:"keyword",regex:"[\\(|\\)]"},{token:"keyword",regex:"[\\'\\(]"},{token:"keyword",regex:"[\\[|\\]]"},{token:"keyword",regex:"[\\{|\\}|\\#\\{|\\#\\}]"},{token:"keyword",regex:"[\\&]"},{token:"keyword",regex:"[\\#\\^\\{]"},{token:"keyword",regex:"[\\%]"},{token:"keyword",regex:"[@]"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language",regex:"[!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+||=|!=|<=|>=|<>|<|>|!|&&]"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"},{token:"string",regex:'"',next:"string"},{token:"constant",regex:/:[^()\[\]{}'"\^%`,;\s]+/},{token:"string.regexp",regex:'/#"(?:\\.|(?:\\")|[^""\n])*"/g'}],string:[{token:"constant.language.escape",regex:"\\\\.|\\\\$"},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:'"',next:"start"}]}};r.inherits(a,s),t.ClojureHighlightRules=a}),define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,s=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\)/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),s=n.match(/^(\s*\))/);if(!s)return 0;var a=s[1].length,o=e.findMatchingBracket({row:t,column:a});if(!o||o.row==t)return 0;var i=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,a-1),i)},this.$getIndent=function(e){var t=e.match(/^(\s+)/);return t?t[1]:""}}).call(s.prototype),t.MatchingParensOutdent=s}),define("ace/mode/clojure",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/clojure_highlight_rules","ace/mode/matching_parens_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),s=e("./text").Mode,a=e("./clojure_highlight_rules").ClojureHighlightRules,o=e("./matching_parens_outdent").MatchingParensOutdent,i=function(){this.HighlightRules=a,this.$outdent=new o};r.inherits(i,s),function(){this.lineCommentStart=";",this.minorIndentFunctions=["defn","defn-","defmacro","def","deftest","testing"],this.$toIndent=function(e){return e.split("").map(function(e){return/\s/.exec(e)?e:" "}).join("")},this.$calculateIndent=function(e,t){for(var n,r,s=this.$getIndent(e),a=0,o=e.length-1;o>=0&&(r=e[o],"("===r?(a--,n=!0):"("===r||"["===r||"{"===r?(a--,n=!1):")"!==r&&"]"!==r&&"}"!==r||a++,!(a<0));o--);if(!(a<0&&n))return a<0&&!n?this.$toIndent(e.substring(0,o+1)):a>0?s=s.substring(0,s.length-t.length):s;o+=1;for(var i=o,c="";;){if(r=e[o]," "===r||"\t"===r)return this.minorIndentFunctions.indexOf(c)!==-1?this.$toIndent(e.substring(0,i-1)+t):this.$toIndent(e.substring(0,o+1));if(void 0===r)return this.$toIndent(e.substring(0,i-1)+t);c+=e[o],o++}},this.getNextLineIndent=function(e,t,n){return this.$calculateIndent(t,n)},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/clojure"}.call(i.prototype),t.Mode=i}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-cobol.js b/www/js/vendor/ace/mode-cobol.js index bde8df9ef..5fc752c57 100755 --- a/www/js/vendor/ace/mode-cobol.js +++ b/www/js/vendor/ace/mode-cobol.js @@ -1,94 +1 @@ -define("ace/mode/cobol_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var CobolHighlightRules = function() { -var keywords = "ACCEPT|MERGE|SUM|ADD||MESSAGE|TABLE|ADVANCING|MODE|TAPE|" + -"AFTER|MULTIPLY|TEST|ALL|NEGATIVE|TEXT|ALPHABET|NEXT|THAN|" + -"ALSO|NO|THEN|ALTERNATE|NOT|THROUGH|AND|NUMBER|THRU|ANY|OCCURS|" + -"TIME|ARE|OF|TO|AREA|OFF|TOP||ASCENDING|OMITTED|TRUE|ASSIGN|ON|TYPE|AT|OPEN|" + -"UNIT|AUTHOR|OR|UNTIL|BEFORE|OTHER|UP|BLANK|OUTPUT|USE|BLOCK|PAGE|USING|BOTTOM|" + -"PERFORM|VALUE|BY|PIC|VALUES|CALL|PICTURE|WHEN|CANCEL|PLUS|WITH|CD|POINTER|WRITE|" + -"CHARACTER|POSITION||ZERO|CLOSE|POSITIVE|ZEROS|COLUMN|PROCEDURE|ZEROES|COMMA|PROGRAM|" + -"COMMON|PROGRAM-ID|COMMUNICATION|QUOTE|COMP|RANDOM|COMPUTE|READ|CONTAINS|RECEIVE|CONFIGURATION|" + -"RECORD|CONTINUE|REDEFINES|CONTROL|REFERENCE|COPY|REMAINDER|COUNT|REPLACE|DATA|REPORT|DATE|RESERVE|" + -"DAY|RESET|DELETE|RETURN|DESTINATION|REWIND|DISABLE|REWRITE|DISPLAY|RIGHT|DIVIDE|RUN|DOWN|SAME|" + -"ELSE|SEARCH|ENABLE|SECTION|END|SELECT|ENVIRONMENT|SENTENCE|EQUAL|SET|ERROR|SIGN|EXIT|SEQUENTIAL|" + -"EXTERNAL|SIZE|FLASE|SORT|FILE|SOURCE|LENGTH|SPACE|LESS|STANDARD|LIMIT|START|LINE|STOP|LOCK|STRING|LOW-VALUE|SUBTRACT"; - - var builtinConstants = ( - "true|false|null" - ); - - var builtinFunctions = ( - "count|min|max|avg|sum|rank|now|coalesce|main" - ); - - var keywordMapper = this.createKeywordMapper({ - "support.function": builtinFunctions, - "keyword": keywords, - "constant.language": builtinConstants - }, "identifier", true); - - this.$rules = { - "start" : [ { - token : "comment", - regex : "\\*.*$" - }, { - token : "string", // " string - regex : '".*?"' - }, { - token : "string", // ' string - regex : "'.*?'" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" - }, { - token : "paren.lparen", - regex : "[\\(]" - }, { - token : "paren.rparen", - regex : "[\\)]" - }, { - token : "text", - regex : "\\s+" - } ] - }; -}; - -oop.inherits(CobolHighlightRules, TextHighlightRules); - -exports.CobolHighlightRules = CobolHighlightRules; -}); - -define("ace/mode/cobol",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cobol_highlight_rules","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CobolHighlightRules = require("./cobol_highlight_rules").CobolHighlightRules; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = CobolHighlightRules; -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "*"; - - this.$id = "ace/mode/cobol"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/cobol_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(E,e,T){"use strict";var R=E("../lib/oop"),t=E("./text_highlight_rules").TextHighlightRules,A=function(){var E="ACCEPT|MERGE|SUM|ADD||MESSAGE|TABLE|ADVANCING|MODE|TAPE|AFTER|MULTIPLY|TEST|ALL|NEGATIVE|TEXT|ALPHABET|NEXT|THAN|ALSO|NO|THEN|ALTERNATE|NOT|THROUGH|AND|NUMBER|THRU|ANY|OCCURS|TIME|ARE|OF|TO|AREA|OFF|TOP||ASCENDING|OMITTED|TRUE|ASSIGN|ON|TYPE|AT|OPEN|UNIT|AUTHOR|OR|UNTIL|BEFORE|OTHER|UP|BLANK|OUTPUT|USE|BLOCK|PAGE|USING|BOTTOM|PERFORM|VALUE|BY|PIC|VALUES|CALL|PICTURE|WHEN|CANCEL|PLUS|WITH|CD|POINTER|WRITE|CHARACTER|POSITION||ZERO|CLOSE|POSITIVE|ZEROS|COLUMN|PROCEDURE|ZEROES|COMMA|PROGRAM|COMMON|PROGRAM-ID|COMMUNICATION|QUOTE|COMP|RANDOM|COMPUTE|READ|CONTAINS|RECEIVE|CONFIGURATION|RECORD|CONTINUE|REDEFINES|CONTROL|REFERENCE|COPY|REMAINDER|COUNT|REPLACE|DATA|REPORT|DATE|RESERVE|DAY|RESET|DELETE|RETURN|DESTINATION|REWIND|DISABLE|REWRITE|DISPLAY|RIGHT|DIVIDE|RUN|DOWN|SAME|ELSE|SEARCH|ENABLE|SECTION|END|SELECT|ENVIRONMENT|SENTENCE|EQUAL|SET|ERROR|SIGN|EXIT|SEQUENTIAL|EXTERNAL|SIZE|FLASE|SORT|FILE|SOURCE|LENGTH|SPACE|LESS|STANDARD|LIMIT|START|LINE|STOP|LOCK|STRING|LOW-VALUE|SUBTRACT",e="true|false|null",T="count|min|max|avg|sum|rank|now|coalesce|main",R=this.createKeywordMapper({"support.function":T,keyword:E,"constant.language":e},"identifier",!0);this.$rules={start:[{token:"comment",regex:"\\*.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:R,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};R.inherits(A,t),e.CobolHighlightRules=A}),define("ace/mode/cobol",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cobol_highlight_rules","ace/range"],function(E,e,T){"use strict";var R=E("../lib/oop"),t=E("./text").Mode,A=E("./cobol_highlight_rules").CobolHighlightRules,o=(E("../range").Range,function(){this.HighlightRules=A});R.inherits(o,t),function(){this.lineCommentStart="*",this.$id="ace/mode/cobol"}.call(o.prototype),e.Mode=o}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-coffee.js b/www/js/vendor/ace/mode-coffee.js index cc24cc41c..66dd4e80c 100755 --- a/www/js/vendor/ace/mode-coffee.js +++ b/www/js/vendor/ace/mode-coffee.js @@ -1,412 +1 @@ -define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - - var oop = require("../lib/oop"); - var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - - oop.inherits(CoffeeHighlightRules, TextHighlightRules); - - function CoffeeHighlightRules() { - var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"; - - var keywords = ( - "this|throw|then|try|typeof|super|switch|return|break|by|continue|" + - "catch|class|in|instanceof|is|isnt|if|else|extends|for|own|" + - "finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" + - "or|on|unless|until|and|yes" - ); - - var langConstant = ( - "true|false|null|undefined|NaN|Infinity" - ); - - var illegal = ( - "case|const|default|function|var|void|with|enum|export|implements|" + - "interface|let|package|private|protected|public|static|yield|" + - "__hasProp|slice|bind|indexOf" - ); - - var supportClass = ( - "Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + - "SyntaxError|TypeError|URIError|" + - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray" - ); - - var supportFunction = ( - "Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" + - "encodeURIComponent|decodeURI|decodeURIComponent|String|" - ); - - var variableLanguage = ( - "window|arguments|prototype|document" - ); - - var keywordMapper = this.createKeywordMapper({ - "keyword": keywords, - "constant.language": langConstant, - "invalid.illegal": illegal, - "language.support.class": supportClass, - "language.support.function": supportFunction, - "variable.language": variableLanguage - }, "identifier"); - - var functionRule = { - token: ["paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type"], - regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()\"'\/])*?)(\))(\s*))?([\-=]>)/.source - }; - - var stringEscape = /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/; - - this.$rules = { - start : [ - { - token : "constant.numeric", - regex : "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)" - }, { - stateName: "qdoc", - token : "string", regex : "'''", next : [ - {token : "string", regex : "'''", next : "start"}, - {token : "constant.language.escape", regex : stringEscape}, - {defaultToken: "string"} - ] - }, { - stateName: "qqdoc", - token : "string", - regex : '"""', - next : [ - {token : "string", regex : '"""', next : "start"}, - {token : "paren.string", regex : '#{', push : "start"}, - {token : "constant.language.escape", regex : stringEscape}, - {defaultToken: "string"} - ] - }, { - stateName: "qstring", - token : "string", regex : "'", next : [ - {token : "string", regex : "'", next : "start"}, - {token : "constant.language.escape", regex : stringEscape}, - {defaultToken: "string"} - ] - }, { - stateName: "qqstring", - token : "string.start", regex : '"', next : [ - {token : "string.end", regex : '"', next : "start"}, - {token : "paren.string", regex : '#{', push : "start"}, - {token : "constant.language.escape", regex : stringEscape}, - {defaultToken: "string"} - ] - }, { - stateName: "js", - token : "string", regex : "`", next : [ - {token : "string", regex : "`", next : "start"}, - {token : "constant.language.escape", regex : stringEscape}, - {defaultToken: "string"} - ] - }, { - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift() || ""; - if (this.next.indexOf("string") != -1) - return "paren.string"; - } - return "paren"; - } - }, { - token : "string.regex", - regex : "///", - next : "heregex" - }, { - token : "string.regex", - regex : /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/ - }, { - token : "comment", - regex : "###(?!#)", - next : "comment" - }, { - token : "comment", - regex : "#.*" - }, { - token : ["punctuation.operator", "text", "identifier"], - regex : "(\\.)(\\s*)(" + illegal + ")" - }, { - token : "punctuation.operator", - regex : "\\." - }, { - token : ["keyword", "text", "language.support.class", - "text", "keyword", "text", "language.support.class"], - regex : "(class)(\\s+)(" + identifier + ")(?:(\\s+)(extends)(\\s+)(" + identifier + "))?" - }, { - token : ["entity.name.function", "text", "keyword.operator", "text"].concat(functionRule.token), - regex : "(" + identifier + ")(\\s*)([=:])(\\s*)" + functionRule.regex - }, - functionRule, - { - token : "variable", - regex : "@(?:" + identifier + ")?" - }, { - token: keywordMapper, - regex : identifier - }, { - token : "punctuation.operator", - regex : "\\,|\\." - }, { - token : "storage.type", - regex : "[\\-=]>" - }, { - token : "keyword.operator", - regex : "(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])" - }, { - token : "paren.lparen", - regex : "[({[]" - }, { - token : "paren.rparen", - regex : "[\\]})]" - }, { - token : "text", - regex : "\\s+" - }], - - - heregex : [{ - token : "string.regex", - regex : '.*?///[imgy]{0,4}', - next : "start" - }, { - token : "comment.regex", - regex : "\\s+(?:#.*)?" - }, { - token : "string.regex", - regex : "\\S+" - }], - - comment : [{ - token : "comment", - regex : '###', - next : "start" - }, { - defaultToken : "comment" - }] - }; - this.normalizeRules(); - } - - exports.CoffeeHighlightRules = CoffeeHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/coffee",["require","exports","module","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/worker/worker_client","ace/lib/oop"], function(require, exports, module) { -"use strict"; - -var Rules = require("./coffee_highlight_rules").CoffeeHighlightRules; -var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var FoldMode = require("./folding/coffee").FoldMode; -var Range = require("../range").Range; -var TextMode = require("./text").Mode; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var oop = require("../lib/oop"); - -function Mode() { - this.HighlightRules = Rules; - this.$outdent = new Outdent(); - this.foldingRules = new FoldMode(); -} - -oop.inherits(Mode, TextMode); - -(function() { - var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|(?:swi|ca)tch(?:\s+[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/; - var commentLine = /^(\s*)#/; - var hereComment = /^\s*###(?!#)/; - var indentation = /^\s*/; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - - if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') && - state === 'start' && indenter.test(line)) - indent += tab; - return indent; - }; - - this.toggleCommentLines = function(state, doc, startRow, endRow){ - console.log("toggle"); - var range = new Range(0, 0, 0, 0); - for (var i = startRow; i <= endRow; ++i) { - var line = doc.getLine(i); - if (hereComment.test(line)) - continue; - - if (commentLine.test(line)) - line = line.replace(commentLine, '$1'); - else - line = line.replace(indentation, '$&#'); - - range.end.row = range.start.row = i; - range.end.column = line.length + 1; - doc.replace(range, line); - } - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/coffee_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("error", function(e) { - session.setAnnotations([e.data]); - }); - - worker.on("ok", function(e) { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/coffee"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";function r(){var e="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",t="this|throw|then|try|typeof|super|switch|return|break|by|continue|catch|class|in|instanceof|is|isnt|if|else|extends|for|own|finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|or|on|unless|until|and|yes",n="true|false|null|undefined|NaN|Infinity",r="case|const|default|function|var|void|with|enum|export|implements|interface|let|package|private|protected|public|static|yield|__hasProp|slice|bind|indexOf",o="Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray",a="Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|String|",i="window|arguments|prototype|document",s=this.createKeywordMapper({keyword:t,"constant.language":n,"invalid.illegal":r,"language.support.class":o,"language.support.function":a,"variable.language":i},"identifier"),g={token:["paren.lparen","variable.parameter","paren.rparen","text","storage.type"],regex:/(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()\"'\/])*?)(\))(\s*))?([\-=]>)/.source},c=/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;this.$rules={start:[{token:"constant.numeric",regex:"(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},{stateName:"qdoc",token:"string",regex:"'''",next:[{token:"string",regex:"'''",next:"start"},{token:"constant.language.escape",regex:c},{defaultToken:"string"}]},{stateName:"qqdoc",token:"string",regex:'"""',next:[{token:"string",regex:'"""',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:c},{defaultToken:"string"}]},{stateName:"qstring",token:"string",regex:"'",next:[{token:"string",regex:"'",next:"start"},{token:"constant.language.escape",regex:c},{defaultToken:"string"}]},{stateName:"qqstring",token:"string.start",regex:'"',next:[{token:"string.end",regex:'"',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:c},{defaultToken:"string"}]},{stateName:"js",token:"string",regex:"`",next:[{token:"string",regex:"`",next:"start"},{token:"constant.language.escape",regex:c},{defaultToken:"string"}]},{regex:"[{}]",onMatch:function(e,t,n){return this.next="","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift()||"",this.next.indexOf("string")!=-1)?"paren.string":"paren"}},{token:"string.regex",regex:"///",next:"heregex"},{token:"string.regex",regex:/(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/},{token:"comment",regex:"###(?!#)",next:"comment"},{token:"comment",regex:"#.*"},{token:["punctuation.operator","text","identifier"],regex:"(\\.)(\\s*)("+r+")"},{token:"punctuation.operator",regex:"\\."},{token:["keyword","text","language.support.class","text","keyword","text","language.support.class"],regex:"(class)(\\s+)("+e+")(?:(\\s+)(extends)(\\s+)("+e+"))?"},{token:["entity.name.function","text","keyword.operator","text"].concat(g.token),regex:"("+e+")(\\s*)([=:])(\\s*)"+g.regex},g,{token:"variable",regex:"@(?:"+e+")?"},{token:s,regex:e},{token:"punctuation.operator",regex:"\\,|\\."},{token:"storage.type",regex:"[\\-=]>"},{token:"keyword.operator",regex:"(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"},{token:"paren.lparen",regex:"[({[]"},{token:"paren.rparen",regex:"[\\]})]"},{token:"text",regex:"\\s+"}],heregex:[{token:"string.regex",regex:".*?///[imgy]{0,4}",next:"start"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",regex:"\\S+"}],comment:[{token:"comment",regex:"###",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()}var o=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules;o.inherits(r,a),t.CoffeeHighlightRules=r}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var a=o[1].length,i=e.findMatchingBracket({row:t,column:a});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new r(t,0,t,a-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("./fold_mode").FoldMode,a=e("../../range").Range,i=t.FoldMode=function(){};r.inherits(i,o),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var o=/\S/,i=e.getLine(n),s=i.search(o);if(s!=-1&&"#"==i[s]){for(var g=i.length,c=e.getLength(),l=n,u=n;++nl){var d=e.getLine(u).length;return new a(l,g,u,d)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),o=r.search(/\S/),a=e.getLine(n+1),i=e.getLine(n-1),s=i.search(/\S/),g=a.search(/\S/);if(o==-1)return e.foldWidgets[n-1]=s!=-1&&s|\b(?:else|try|(?:swi|ca)tch(?:\s+[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/,t=/^(\s*)#/,n=/^\s*###(?!#)/,r=/^\s*/;this.getNextLineIndent=function(t,n,r){var o=this.$getIndent(n),a=this.getTokenizer().getLineTokens(n,t).tokens;return a.length&&"comment"===a[a.length-1].type||"start"!==t||!e.test(n)||(o+=r),o},this.toggleCommentLines=function(e,o,a,i){console.log("toggle");for(var g=new s(0,0,0,0),c=a;c<=i;++c){var l=o.getLine(c);n.test(l)||(l=t.test(l)?l.replace(t,"$1"):l.replace(r,"$&#"),g.end.row=g.start.row=c,g.end.column=l.length+1,o.replace(g,l))}},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c(["ace"],"ace/mode/coffee_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations([t.data])}),t.on("ok",function(t){e.clearAnnotations()}),t},this.$id="ace/mode/coffee"}.call(r.prototype),t.Mode=r}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-coldfusion.js b/www/js/vendor/ace/mode-coldfusion.js index 4fe7bc51b..05bcf5827 100755 --- a/www/js/vendor/ace/mode-coldfusion.js +++ b/www/js/vendor/ace/mode-coldfusion.js @@ -1,2477 +1,2 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = CssHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.foldingRules = "cStyle"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("csslint", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/css"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === " -1; -} - -(function() { - - this.getFoldWidget = function(session, foldStyle, row) { - var tag = this._getFirstTagInLine(session, row); - - if (!tag) - return ""; - - if (tag.closing || (!tag.tagName && tag.selfClosing)) - return foldStyle == "markbeginend" ? "end" : ""; - - if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) - return ""; - - if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) - return ""; - - return "start"; - }; - this._getFirstTagInLine = function(session, row) { - var tokens = session.getTokens(row); - var tag = new Tag(); - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (is(token, "tag-open")) { - tag.end.column = tag.start.column + token.value.length; - tag.closing = is(token, "end-tag-open"); - token = tokens[++i]; - if (!token) - return null; - tag.tagName = token.value; - tag.end.column += token.value.length; - for (i++; i < tokens.length; i++) { - token = tokens[i]; - tag.end.column += token.value.length; - if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - break; - } - } - return tag; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - return tag; - } - tag.start.column += token.value.length; - } - - return null; - }; - - this._findEndTagInLine = function(session, row, tagName, startColumn) { - var tokens = session.getTokens(row); - var column = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - column += token.value.length; - if (column < startColumn) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var firstTag = this._getFirstTagInLine(session, row); - - if (!firstTag) - return null; - - var isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var MixedFoldMode = require("./mixed").FoldMode; -var XmlFoldMode = require("./xml").FoldMode; -var CStyleFoldMode = require("./cstyle").FoldMode; - -var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { - MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { - "js-": new CStyleFoldMode(), - "css-": new CStyleFoldMode() - }); -}; - -oop.inherits(FoldMode, MixedFoldMode); - -}); - -define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var TokenIterator = require("../token_iterator").TokenIterator; - -var commonAttributes = [ - "accesskey", - "class", - "contenteditable", - "contextmenu", - "dir", - "draggable", - "dropzone", - "hidden", - "id", - "inert", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "lang", - "spellcheck", - "style", - "tabindex", - "title", - "translate" -]; - -var eventAttributes = [ - "onabort", - "onblur", - "oncancel", - "oncanplay", - "oncanplaythrough", - "onchange", - "onclick", - "onclose", - "oncontextmenu", - "oncuechange", - "ondblclick", - "ondrag", - "ondragend", - "ondragenter", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onended", - "onerror", - "onfocus", - "oninput", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeyup", - "onload", - "onloadeddata", - "onloadedmetadata", - "onloadstart", - "onmousedown", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onpause", - "onplay", - "onplaying", - "onprogress", - "onratechange", - "onreset", - "onscroll", - "onseeked", - "onseeking", - "onselect", - "onshow", - "onstalled", - "onsubmit", - "onsuspend", - "ontimeupdate", - "onvolumechange", - "onwaiting" -]; - -var globalAttributes = commonAttributes.concat(eventAttributes); - -var attributeMap = { - "html": ["manifest"], - "head": [], - "title": [], - "base": ["href", "target"], - "link": ["href", "hreflang", "rel", "media", "type", "sizes"], - "meta": ["http-equiv", "name", "content", "charset"], - "style": ["type", "media", "scoped"], - "script": ["charset", "type", "src", "defer", "async"], - "noscript": ["href"], - "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], - "section": [], - "nav": [], - "article": ["pubdate"], - "aside": [], - "h1": [], - "h2": [], - "h3": [], - "h4": [], - "h5": [], - "h6": [], - "header": [], - "footer": [], - "address": [], - "main": [], - "p": [], - "hr": [], - "pre": [], - "blockquote": ["cite"], - "ol": ["start", "reversed"], - "ul": [], - "li": ["value"], - "dl": [], - "dt": [], - "dd": [], - "figure": [], - "figcaption": [], - "div": [], - "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], - "em": [], - "strong": [], - "small": [], - "s": [], - "cite": [], - "q": ["cite"], - "dfn": [], - "abbr": [], - "data": [], - "time": ["datetime"], - "code": [], - "var": [], - "samp": [], - "kbd": [], - "sub": [], - "sup": [], - "i": [], - "b": [], - "u": [], - "mark": [], - "ruby": [], - "rt": [], - "rp": [], - "bdi": [], - "bdo": [], - "span": [], - "br": [], - "wbr": [], - "ins": ["cite", "datetime"], - "del": ["cite", "datetime"], - "img": ["alt", "src", "height", "width", "usemap", "ismap"], - "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], - "embed": ["src", "height", "width", "type"], - "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], - "param": ["name", "value"], - "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], - "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], - "source": ["src", "type", "media"], - "track": ["kind", "src", "srclang", "label", "default"], - "canvas": ["width", "height"], - "map": ["name"], - "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], - "svg": [], - "math": [], - "table": ["summary"], - "caption": [], - "colgroup": ["span"], - "col": ["span"], - "tbody": [], - "thead": [], - "tfoot": [], - "tr": [], - "td": ["headers", "rowspan", "colspan"], - "th": ["headers", "rowspan", "colspan", "scope"], - "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], - "fieldset": ["disabled", "form", "name"], - "legend": [], - "label": ["form", "for"], - "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], - "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], - "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], - "datalist": [], - "optgroup": ["disabled", "label"], - "option": ["disabled", "selected", "label", "value"], - "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], - "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], - "output": ["for", "form", "name"], - "progress": ["value", "max"], - "meter": ["value", "min", "max", "low", "high", "optimum"], - "details": ["open"], - "summary": [], - "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], - "menu": ["type", "label"], - "dialog": ["open"] -}; - -var elements = Object.keys(attributeMap); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -function findTagName(session, pos) { - var iterator = new TokenIterator(session, pos.row, pos.column); - var token = iterator.getCurrentToken(); - while (token && !is(token, "tag-name")){ - token = iterator.stepBackward(); - } - if (token) - return token.value; -} - -var HtmlCompletions = function() { - -}; - -(function() { - - this.getCompletions = function(state, session, pos, prefix) { - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) - return this.getTagCompletions(state, session, pos, prefix); - if (is(token, "tag-whitespace") || is(token, "attribute-name")) - return this.getAttributeCompetions(state, session, pos, prefix); - - return []; - }; - - this.getTagCompletions = function(state, session, pos, prefix) { - return elements.map(function(element){ - return { - value: element, - meta: "tag", - score: Number.MAX_VALUE - }; - }); - }; - - this.getAttributeCompetions = function(state, session, pos, prefix) { - var tagName = findTagName(session, pos); - if (!tagName) - return []; - var attributes = globalAttributes; - if (tagName in attributeMap) { - attributes = attributes.concat(attributeMap[tagName]); - } - return attributes.map(function(attribute){ - return { - caption: attribute, - snippet: attribute + '="$0"', - meta: "attribute", - score: Number.MAX_VALUE - }; - }); - }; - -}).call(HtmlCompletions.prototype); - -exports.HtmlCompletions = HtmlCompletions; -}); - -define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var CssMode = require("./css").Mode; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; -var HtmlFoldMode = require("./folding/html").FoldMode; -var HtmlCompletions = require("./html_completions").HtmlCompletions; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; -var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; - -var Mode = function(options) { - this.fragmentContext = options && options.fragmentContext; - this.HighlightRules = HtmlHighlightRules; - this.$behaviour = new XmlBehaviour(); - this.$completer = new HtmlCompletions(); - - this.createModeDelegates({ - "js-": JavaScriptMode, - "css-": CssMode - }); - - this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.blockComment = {start: ""}; - - this.voidElements = lang.arrayToMap(voidElements); - - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - this.checkOutdent = function(state, line, input) { - return false; - }; - - this.getCompletions = function(state, session, pos, prefix) { - return this.$completer.getCompletions(state, session, pos, prefix); - }; - - this.createWorker = function(session) { - if (this.constructor != Mode) - return; - var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - if (this.fragmentContext) - worker.call("setOptions", [{context: this.fragmentContext}]); - - worker.on("error", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/html"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/coldfusion_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; - -var ColdfusionHighlightRules = function() { - HtmlHighlightRules.call(this); - - this.embedTagRules(JavaScriptHighlightRules, "cfjs-", "cfscript"); - - this.normalizeRules(); -}; - -oop.inherits(ColdfusionHighlightRules, HtmlHighlightRules); - -exports.ColdfusionHighlightRules = ColdfusionHighlightRules; -}); - -define("ace/mode/coldfusion",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/html","ace/mode/coldfusion_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var HtmlMode = require("./html").Mode; -var ColdfusionHighlightRules = require("./coldfusion_highlight_rules").ColdfusionHighlightRules; - -var voidElements = "cfabort|cfapplication|cfargument|cfassociate|cfbreak|cfcache|cfcollection|cfcookie|cfdbinfo|cfdirectory|cfdump|cfelse|cfelseif|cferror|cfexchangecalendar|cfexchangeconnection|cfexchangecontact|cfexchangefilter|cfexchangetask|cfexit|cffeed|cffile|cfflush|cfftp|cfheader|cfhtmlhead|cfhttpparam|cfimage|cfimport|cfinclude|cfindex|cfinsert|cfinvokeargument|cflocation|cflog|cfmailparam|cfNTauthenticate|cfobject|cfobjectcache|cfparam|cfpdfformparam|cfprint|cfprocparam|cfprocresult|cfproperty|cfqueryparam|cfregistry|cfreportparam|cfrethrow|cfreturn|cfschedule|cfsearch|cfset|cfsetting|cfthrow|cfzipparam)".split("|"); - -var Mode = function() { - HtmlMode.call(this); - - this.HighlightRules = ColdfusionHighlightRules; -}; -oop.inherits(Mode, HtmlMode); - -(function() { - this.voidElements = oop.mixin(lang.arrayToMap(voidElements), this.voidElements); - - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - this.$id = "ace/mode/coldfusion"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};o.inherits(i,r),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",o="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},r.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[r.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[r.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(r,"doc-",[r.getEndRule("no_regex")]),this.normalizeRules()};o.inherits(a,i),t.JavaScriptHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),r=n.match(/^(\s*\})/);if(!r)return 0;var i=r[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new o(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var o,r=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],u={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?o=u[t]:void(o=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,r,i){var a=n.getCursorPosition(),l=r.doc.getLine(a.row);if("{"==i){g(n);var c=n.getSelectionRange(),u=r.doc.getTextRange(c);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(d.isSaneInsertion(n,r))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var m=l.substring(a.column,a.column+1);if("}"==m){var p=r.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==p&&d.isAutoInsertedClosing(a,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var h="";d.isMaybeInsertedClosing(a,l)&&(h=s.stringRepeat("}",o.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=l.substring(a.column,a.column+1);if("}"===m){var f=r.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!f)return null;var x=this.$getIndent(r.getLine(f.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var b=x+r.getTabString();return{text:"\n"+b+"\n"+x+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,i){var a=r.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){g(n);var s=r.doc.getLine(i.start.row),l=s.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,o,r){if("("==r){g(n);var i=n.getSelectionRange(),a=o.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,")"),{text:"()",selection:[1,1]}}else if(")"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if(")"==c){var u=o.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"("==i){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(")"==s)return r.end.column++,r}}),this.add("brackets","insertion",function(e,t,n,o,r){if("["==r){g(n);var i=n.getSelectionRange(),a=o.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if("]"==c){var u=o.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"["==i){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if("]"==s)return r.end.column++,r}}),this.add("string_dquotes","insertion",function(e,t,n,o,r){if('"'==r||"'"==r){g(n);var i=r,a=n.getSelectionRange(),s=o.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var l=n.getCursorPosition(),c=o.doc.getLine(l.row),u=c.substring(l.column-1,l.column),d=c.substring(l.column,l.column+1),m=o.getTokenAt(l.row,l.column),p=o.getTokenAt(l.row,l.column+1);if("\\"==u&&m&&/escape/.test(m.type))return null;var h,f=m&&/string/.test(m.type),x=!p||/string/.test(p.type);if(d==i)h=f!==x;else{if(f&&!x)return null;if(f&&x)return null;var b=o.$mode.tokenRe;b.lastIndex=0;var k=b.test(u);b.lastIndex=0;var v=b.test(u);if(k||v)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==i||"'"==i)){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(s==i)return r.end.column++,r}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),o=new a(t,n.row,n.column);if(!this.$matchTokenType(o.getCurrentToken()||"text",l)){var r=new a(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return o.stepForward(),o.getCurrentTokenRow()!==n.row||this.$matchTokenType(o.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=r.row,o.autoInsertedLineEnd=n+i.substr(r.column),o.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=r.row,o.maybeInsertedLineStart=i.substr(0,r.column)+n,o.maybeInsertedLineEnd=i.substr(r.column),o.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return o.autoInsertedBrackets>0&&e.row===o.autoInsertedRow&&n===o.autoInsertedLineEnd[0]&&t.substr(e.column)===o.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return o.maybeInsertedBrackets>0&&e.row===o.maybeInsertedRow&&t.substr(e.column)===o.maybeInsertedLineEnd&&t.substr(0,e.column)==o.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},r.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(o)?"start":r},this.getFoldWidgetRange=function(e,t,n,o){var r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);var i=r.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(o?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=r.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),o=n.search(/\S/),i=t,a=n.length;t+=1;for(var s=t,l=e.getLength();++tc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=i)break;if(u.isMultiLine())t=u.end.row;else if(o==c)break}s=t}}return new r(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++na)return new r(a,o,u,t.length)}}.call(a.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new c};o.inherits(u,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),i=r.tokens,a=r.state;if(i.length&&"comment"==i[i.length-1].type)return o;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(o+=n)}else if("doc-start"==e){if("start"==a||"no_regex"==a)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(o+=" "),o+="* ")}return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(u.prototype),t.Mode=u}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),i=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",c=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",u=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",m=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":s,"support.type":i,"support.constant.color":l,"support.constant.fonts":c},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+u+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};o.inherits(m,r),t.CssHighlightRules=m}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),i=e("../../token_iterator").TokenIterator,a=function(){this.inherit(r),this.add("colon","insertion",function(e,t,n,o,r){if(":"===r){var a=n.getCursorPosition(),s=new i(o,a.row,a.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var c=o.doc.getLine(a.row),u=c.substring(a.column,a.column+1); +if(":"===u)return{text:"",selection:[1,1]};if(!c.substring(a.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&":"===a){var s=n.getCursorPosition(),l=new i(o,s.row,s.column),c=l.getCurrentToken();if(c&&c.value.match(/\s+/)&&(c=l.stepBackward()),c&&"support.type"===c.type){var u=o.doc.getLine(r.start.row),g=u.substring(r.end.column,r.end.column+1);if(";"===g)return r.end.column++,r}}}),this.add("semicolon","insertion",function(e,t,n,o,r){if(";"===r){var i=n.getCursorPosition(),a=o.doc.getLine(i.row),s=a.substring(i.column,i.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};o.inherits(a,r),t.CssBehaviour=a}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/css").CssBehaviour,c=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new c};o.inherits(u,r),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e).tokens;if(r.length&&"comment"==r[r.length-1].type)return o;var i=t.match(/^.*\{\s*$/);return i&&(o+=n),o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(u.prototype),t.Mode=u}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===i&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(r.prototype),o.inherits(i,r),t.XmlHighlightRules=i}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./css_highlight_rules").CssHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=r.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),c=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(i,"css-","style"),this.embedTagRules(a,"js-","script"),this.constructor===c&&this.normalizeRules()};o.inherits(c,s),t.HtmlHighlightRules=c}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if('"'==i||"'"==i){var s=i,l=r.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var c=n.getCursorPosition(),u=r.doc.getLine(c.row),g=u.substring(c.column,c.column+1),d=new a(r,c.row,c.column),m=d.getCurrentToken();if(g==s&&(o(m,"attribute-value")||o(m,"string")))return{text:"",selection:[1,1]};if(m||(m=d.stepBackward()),!m)return;for(;o(m,"tag-whitespace")||o(m,"whitespace");)m=d.stepBackward();var p=!g||g.match(/\s/);if(o(m,"attribute-equals")&&(p||">"==g)||o(m,"decl-attribute-equals")&&(p||"?"==g))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==i||"'"==i)){var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(s==i)return r.end.column++,r}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(">"==i){var s=n.getCursorPosition(),l=new a(r,s.row,s.column),c=l.getCurrentToken()||l.stepBackward();if(!c||!(o(c,"tag-name")||o(c,"tag-whitespace")||o(c,"attribute-name")||o(c,"attribute-equals")||o(c,"attribute-value")))return;if(o(c,"reference.attribute-value"))return;if(o(c,"attribute-value")){var u=c.value.charAt(0);if('"'==u||"'"==u){var g=c.value.charAt(c.value.length-1),d=l.getCurrentTokenColumn()+c.value.length;if(d>s.column||d==s.column&&u!=g)return}}for(;!o(c,"tag-name");)c=l.stepBackward();var m=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn();if(o(l.stepBackward(),"end-tag-open"))return;var h=c.value;if(m==s.row&&(h=h.substring(0,s.column-p)),this.voidElements.hasOwnProperty(h.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,o,r){if("\n"==r){var i=n.getCursorPosition(),s=o.getLine(i.row),l=new a(o,i.row,i.column),c=l.getCurrentToken();if(c&&c.type.indexOf("tag-close")!==-1){for(;c&&c.type.indexOf("tag-name")===-1;)c=l.stepBackward();if(!c)return;var u=c.value,g=l.getCurrentTokenRow();if(c=l.stepBackward(),!c||c.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[u]){var d=o.getTokenAt(i.row,i.column+1),s=o.getLine(g),m=this.$getIndent(s),p=m+o.getTabString();return d&&"-1}var r=e("../../lib/oop"),i=(e("../../lib/lang"),e("../../range").Range),a=e("./fold_mode").FoldMode,s=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(e,t){a.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(l,a);var c=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var o=this._getFirstTagInLine(e,n);return o?o.closing||!o.tagName&&o.selfClosing?"markbeginend"==t?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,o.tagName,o.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new c,i=0;i"==a.value;break}return r}if(o(a,"tag-close"))return r.selfClosing="/>"==a.value,r;r.start.column+=a.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var i=e.getTokens(t),a=0,s=0;s"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(t&&n.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,n){var o=this._getFirstTagInLine(e,n);if(!o)return null;var r,a=o.closing||o.selfClosing,l=[];if(a)for(var c=new s(e,n,o.end.column),u={row:n,column:o.start.column};r=this._readTagBackward(c);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,i.fromPoints(r.start,r.end)}if(r.closing)l.push(r);else if(this._pop(l,r),0==l.length)return r.start.column+=r.tagName.length+2,i.fromPoints(r.start,u)}else for(var c=new s(e,n,o.start.column),g={row:n,column:o.start.column+o.tagName.length+2};r=this._readTagForward(c);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,i.fromPoints(r.start,r.end)}if(r.closing){if(this._pop(l,r),0==l.length)return i.fromPoints(g,r.start)}else l.push(r)}}}).call(l.prototype)}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./mixed").FoldMode,i=e("./xml").FoldMode,a=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){r.call(this,new i(e,t),{"js-":new a,"css-":new a})};o.inherits(s,r)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}function r(e,t){for(var n=new i(e,t.row,t.column),r=n.getCurrentToken();r&&!o(r,"tag-name");)r=n.stepBackward();if(r)return r.value}var i=e("../token_iterator").TokenIterator,a=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=a.concat(s),c={html:["manifest"],head:[],title:[],base:["href","target"],link:["href","hreflang","rel","media","type","sizes"],meta:["http-equiv","name","content","charset"],style:["type","media","scoped"],script:["charset","type","src","defer","async"],noscript:["href"],body:["onafterprint","onbeforeprint","onbeforeunload","onhashchange","onmessage","onoffline","onpopstate","onredo","onresize","onstorage","onundo","onunload"],section:[],nav:[],article:["pubdate"],aside:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],footer:[],address:[],main:[],p:[],hr:[],pre:[],blockquote:["cite"],ol:["start","reversed"],ul:[],li:["value"],dl:[],dt:[],dd:[],figure:[],figcaption:[],div:[],a:["href","target","ping","rel","media","hreflang","type"],em:[],strong:[],small:[],s:[],cite:[],q:["cite"],dfn:[],abbr:[],data:[],time:["datetime"],code:[],var:[],samp:[],kbd:[],sub:[],sup:[],i:[],b:[],u:[],mark:[],ruby:[],rt:[],rp:[],bdi:[],bdo:[],span:[],br:[],wbr:[],ins:["cite","datetime"],del:["cite","datetime"],img:["alt","src","height","width","usemap","ismap"],iframe:["name","src","height","width","sandbox","seamless"],embed:["src","height","width","type"],object:["param","data","type","height","width","usemap","name","form","classid"],param:["name","value"],video:["src","autobuffer","autoplay","loop","controls","width","height","poster"],audio:["src","autobuffer","autoplay","loop","controls"],source:["src","type","media"],track:["kind","src","srclang","label","default"],canvas:["width","height"],map:["name"],area:["shape","coords","href","hreflang","alt","target","media","rel","ping","type"],svg:[],math:[],table:["summary"],caption:[],colgroup:["span"],col:["span"],tbody:[],thead:[],tfoot:[],tr:[],td:["headers","rowspan","colspan"],th:["headers","rowspan","colspan","scope"],form:["accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],fieldset:["disabled","form","name"],legend:[],label:["form","for"],input:["type","accept","alt","autocomplete","checked","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","multiple","pattern","placeholder","readonly","required","size","src","step","width","files","value"],button:["autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","value","type"],select:["autofocus","disabled","form","multiple","name","size"],datalist:[],optgroup:["disabled","label"],option:["disabled","selected","label","value"],textarea:["autofocus","disabled","form","maxlength","name","placeholder","readonly","required","rows","cols","wrap"],keygen:["autofocus","challenge","disabled","form","keytype","name"],output:["for","form","name"],progress:["value","max"],meter:["value","min","max","low","high","optimum"],details:["open"],summary:[],command:["type","label","icon","disabled","checked","radiogroup","command"],menu:["type","label"],dialog:["open"]},u=Object.keys(c),g=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);return i?o(i,"tag-name")||o(i,"tag-open")||o(i,"end-tag-open")?this.getTagCompletions(e,t,n,r):o(i,"tag-whitespace")||o(i,"attribute-name")?this.getAttributeCompetions(e,t,n,r):[]:[]},this.getTagCompletions=function(e,t,n,o){return u.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompetions=function(e,t,n,o){var i=r(t,n);if(!i)return[];var a=l;return i in c&&(a=a.concat(c[i])),a.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})}}).call(g.prototype),t.HtmlCompletions=g}),define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./text").Mode,a=e("./javascript").Mode,s=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,c=e("./behaviour/xml").XmlBehaviour,u=e("./folding/html").FoldMode,g=e("./html_completions").HtmlCompletions,d=e("../worker/worker_client").WorkerClient,m=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],p=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],h=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new c,this.$completer=new g,this.createModeDelegates({"js-":a,"css-":s}),this.foldingRules=new u(this.voidElements,r.arrayToMap(p))};o.inherits(h,i),function(){this.blockComment={start:""},this.voidElements=r.arrayToMap(m),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,o){return this.$completer.getCompletions(e,t,n,o)},this.createWorker=function(e){if(this.constructor==h){var t=new d(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(h.prototype),t.Mode=h}),define("ace/mode/coldfusion_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./html_highlight_rules").HtmlHighlightRules,a=function(){i.call(this),this.embedTagRules(r,"cfjs-","cfscript"),this.normalizeRules()};o.inherits(a,i),t.ColdfusionHighlightRules=a}),define("ace/mode/coldfusion",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/html","ace/mode/coldfusion_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./html").Mode,a=e("./coldfusion_highlight_rules").ColdfusionHighlightRules,s="cfabort|cfapplication|cfargument|cfassociate|cfbreak|cfcache|cfcollection|cfcookie|cfdbinfo|cfdirectory|cfdump|cfelse|cfelseif|cferror|cfexchangecalendar|cfexchangeconnection|cfexchangecontact|cfexchangefilter|cfexchangetask|cfexit|cffeed|cffile|cfflush|cfftp|cfheader|cfhtmlhead|cfhttpparam|cfimage|cfimport|cfinclude|cfindex|cfinsert|cfinvokeargument|cflocation|cflog|cfmailparam|cfNTauthenticate|cfobject|cfobjectcache|cfparam|cfpdfformparam|cfprint|cfprocparam|cfprocresult|cfproperty|cfqueryparam|cfregistry|cfreportparam|cfrethrow|cfreturn|cfschedule|cfsearch|cfset|cfsetting|cfthrow|cfzipparam)".split("|"),l=function(){i.call(this),this.HighlightRules=a};o.inherits(l,i),function(){this.voidElements=o.mixin(r.arrayToMap(s),this.voidElements),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.$id="ace/mode/coldfusion"}.call(l.prototype),t.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-csharp.js b/www/js/vendor/ace/mode-csharp.js index ecb08a737..96e28c3e9 100755 --- a/www/js/vendor/ace/mode-csharp.js +++ b/www/js/vendor/ace/mode-csharp.js @@ -1,847 +1 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/csharp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var CSharpHighlightRules = function() { - var keywordMapper = this.createKeywordMapper({ - "variable.language": "this", - "keyword": "abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic", - "constant.language": "null|true|false" - }, "identifier"); - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "\\/\\/.*$" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment" - }, { - token : "string", // character - regex : /'(?:.|\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n]))'/ - }, { - token : "string", start : '"', end : '"|$', next: [ - {token: "constant.language.escape", regex: /\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n])/}, - {token: "invalid", regex: /\\./} - ] - }, { - token : "string", start : '@"', end : '"', next:[ - {token: "constant.language.escape", regex: '""'} - ] - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" - }, { - token : "keyword", - regex : "^\\s*#(if|else|elif|endif|define|undef|warning|error|line|region|endregion|pragma)" - }, { - token : "punctuation.operator", - regex : "\\?|\\:|\\,|\\;|\\." - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); - this.normalizeRules(); -}; - -oop.inherits(CSharpHighlightRules, TextHighlightRules); - -exports.CSharpHighlightRules = CSharpHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/folding/csharp",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var CFoldMode = require("./cstyle").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, CFoldMode); - -(function() { - this.usingRe = /^\s*using \S/; - - this.getFoldWidgetRangeBase = this.getFoldWidgetRange; - this.getFoldWidgetBase = this.getFoldWidget; - - this.getFoldWidget = function(session, foldStyle, row) { - var fw = this.getFoldWidgetBase(session, foldStyle, row); - if (!fw) { - var line = session.getLine(row); - if (/^\s*#region\b/.test(line)) - return "start"; - var usingRe = this.usingRe; - if (usingRe.test(line)) { - var prev = session.getLine(row - 1); - var next = session.getLine(row + 1); - if (!usingRe.test(prev) && usingRe.test(next)) - return "start" - } - } - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.getFoldWidgetRangeBase(session, foldStyle, row); - if (range) - return range; - - var line = session.getLine(row); - if (this.usingRe.test(line)) - return this.getUsingStatementBlock(session, line, row); - - if (/^\s*#region\b/.test(line)) - return this.getRegionBlock(session, line, row); - }; - - this.getUsingStatementBlock = function(session, line, row) { - var startColumn = line.match(this.usingRe)[0].length - 1; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - if (/^\s*$/.test(line)) - continue; - if (!this.usingRe.test(line)) - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - - this.getRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) - continue; - if (m[1]) - depth--; - else - depth++; - - if (!depth) - break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/csharp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csharp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/csharp"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CSharpHighlightRules = require("./csharp_highlight_rules").CSharpHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/csharp").FoldMode; - -var Mode = function() { - this.HighlightRules = CSharpHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - - this.createWorker = function(session) { - return null; - }; - - this.$id = "ace/mode/csharp"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},o.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(o,i),o.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},o.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},o.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=o}),define("ace/mode/csharp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"variable.language":"this",keyword:"abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic","constant.language":"null|true|false"},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:/'(?:.|\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n]))'/},{token:"string",start:'"',end:'"|$',next:[{token:"constant.language.escape",regex:/\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n])/},{token:"invalid",regex:/\\./}]},{token:"string",start:'@"',end:'"',next:[{token:"constant.language.escape",regex:'""'}]},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"keyword",regex:"^\\s*#(if|else|elif|endif|define|undef|warning|error|line|region|endregion|pragma)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(s,o),t.CSharpHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var o=i[1].length,s=e.findMatchingBracket({row:t,column:o});if(!s||s.row==t)return 0;var a=this.$getIndent(e.getLine(s.row));e.replace(new r(t,0,t,o-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,i=e("../../lib/oop"),o=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],l={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,l.rangeCount!=e.multiSelect.rangeCount&&(l={rangeCount:e.multiSelect.rangeCount})),l[t]?r=l[t]:void(r=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,i,o){var s=n.getCursorPosition(),u=i.doc.getLine(s.row);if("{"==o){g(n);var c=n.getSelectionRange(),l=i.doc.getTextRange(c);if(""!==l&&"{"!==l&&n.getWrapBehavioursEnabled())return{text:"{"+l+"}",selection:!1};if(d.isSaneInsertion(n,i))return/[\]\}\)]/.test(u[s.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,i,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,i,"{"),{text:"{",selection:[1,1]})}else if("}"==o){g(n);var h=u.substring(s.column,s.column+1);if("}"==h){var f=i.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(null!==f&&d.isAutoInsertedClosing(s,u,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==o||"\r\n"==o){g(n);var m="";d.isMaybeInsertedClosing(s,u)&&(m=a.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var h=u.substring(s.column,s.column+1);if("}"===h){var p=i.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!p)return null;var b=this.$getIndent(i.getLine(p.row))}else{if(!m)return void d.clearMaybeInsertedClosing();var b=this.$getIndent(u)}var k=b+i.getTabString();return{text:"\n"+k+"\n"+b+m,selection:[1,k.length,1,k.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,i,o){var s=i.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){g(n);var a=i.doc.getLine(o.start.row),u=a.substring(o.end.column,o.end.column+1);if("}"==u)return o.end.column++,o;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,i){if("("==i){g(n);var o=n.getSelectionRange(),s=r.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"("+s+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==i){g(n);var a=n.getCursorPosition(),u=r.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if(")"==c){var l=r.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==l&&d.isAutoInsertedClosing(a,u,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"("==o){g(n);var s=r.doc.getLine(i.start.row),a=s.substring(i.start.column+1,i.start.column+2);if(")"==a)return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if("["==i){g(n);var o=n.getSelectionRange(),s=r.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"["+s+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==i){g(n);var a=n.getCursorPosition(),u=r.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if("]"==c){var l=r.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==l&&d.isAutoInsertedClosing(a,u,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"["==o){g(n);var s=r.doc.getLine(i.start.row),a=s.substring(i.start.column+1,i.start.column+2);if("]"==a)return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){if('"'==i||"'"==i){g(n);var o=i,s=n.getSelectionRange(),a=r.doc.getTextRange(s);if(""!==a&&"'"!==a&&'"'!=a&&n.getWrapBehavioursEnabled())return{text:o+a+o,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),l=c.substring(u.column-1,u.column),d=c.substring(u.column,u.column+1),h=r.getTokenAt(u.row,u.column),f=r.getTokenAt(u.row,u.column+1);if("\\"==l&&h&&/escape/.test(h.type))return null;var m,p=h&&/string/.test(h.type),b=!f||/string/.test(f.type);if(d==o)m=p!==b;else{if(p&&!b)return null;if(p&&b)return null;var k=r.$mode.tokenRe;k.lastIndex=0;var v=k.test(l);k.lastIndex=0;var x=k.test(l);if(v||x)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;m=!0}return{text:m?o+o:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&('"'==o||"'"==o)){g(n);var s=r.doc.getLine(i.start.row),a=s.substring(i.start.column+1,i.start.column+2);if(a==o)return i.end.column++,i}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isAutoInsertedClosing(i,o,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=i.row,r.autoInsertedLineEnd=n+o.substr(i.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isMaybeInsertedClosing(i,o)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=i.row,r.maybeInsertedLineStart=o.substr(0,i.column)+n,r.maybeInsertedLineEnd=o.substr(i.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},i.inherits(d,o),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,o),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var o=i.match(this.foldingStartMarker);if(o){var s=o.index;if(o[1])return this.openingBracketBlock(e,o[1],n,s);var a=e.getCommentFoldRange(n,s+o[0].length,1);return a&&!a.isMultiLine()&&(r?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t){var o=i.match(this.foldingStopMarker);if(o){var s=o.index+o[0].length;return o[1]?this.closingBracketBlock(e,o[1],n,s):e.getCommentFoldRange(n,s,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),o=t,s=n.length;t+=1;for(var a=t,u=e.getLength();++tc)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=o)break;if(l.isMultiLine())t=l.end.row;else if(r==c)break}a=t}}return new i(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/)#(end)?region\b/,u=1;++ns)return new i(s,r,l,t.length)}}.call(s.prototype)}),define("ace/mode/folding/csharp",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./cstyle").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,o),function(){this.usingRe=/^\s*using \S/,this.getFoldWidgetRangeBase=this.getFoldWidgetRange,this.getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=this.getFoldWidgetBase(e,t,n);if(!r){var i=e.getLine(n);if(/^\s*#region\b/.test(i))return"start";var o=this.usingRe;if(o.test(i)){var s=e.getLine(n-1),a=e.getLine(n+1);if(!o.test(s)&&o.test(a))return"start"}}return r},this.getFoldWidgetRange=function(e,t,n){var r=this.getFoldWidgetRangeBase(e,t,n);if(r)return r;var i=e.getLine(n);return this.usingRe.test(i)?this.getUsingStatementBlock(e,i,n):/^\s*#region\b/.test(i)?this.getRegionBlock(e,i,n):void 0},this.getUsingStatementBlock=function(e,t,n){for(var r=t.match(this.usingRe)[0].length-1,o=e.getLength(),s=n,a=n;++ns){var u=e.getLine(a).length;return new i(s,r,a,u)}},this.getRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*#(end)?region\b/,u=1;++ns)return new i(s,r,l,t.length)}}.call(s.prototype)}),define("ace/mode/csharp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csharp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/csharp"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,o=e("./csharp_highlight_rules").CSharpHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/csharp").FoldMode,c=function(){this.HighlightRules=o,this.$outdent=new s,this.$behaviour=new a,this.foldingRules=new u};r.inherits(c,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),o=i.tokens;if(o.length&&"comment"==o[o.length-1].type)return r;if("start"==e){var s=t.match(/^.*[\{\(\[]\s*$/);s&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){return null},this.$id="ace/mode/csharp"}.call(c.prototype),t.Mode=c}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-css.js b/www/js/vendor/ace/mode-css.js index 3d9e8c97d..f3aa5cb55 100755 --- a/www/js/vendor/ace/mode-css.js +++ b/www/js/vendor/ace/mode-css.js @@ -1,828 +1 @@ -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = CssHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.foldingRules = "cStyle"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("csslint", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/css"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),i=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",c=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",u=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",d=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",g=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",p=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":s,"support.type":i,"support.constant.color":l,"support.constant.fonts":c},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+u+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:d},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:g},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};r.inherits(p,o),t.CssHighlightRules=p}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],u={},d=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?r=u[t]:void(r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},g=function(){this.add("braces","insertion",function(e,t,n,o,i){var a=n.getCursorPosition(),l=o.doc.getLine(a.row);if("{"==i){d(n);var c=n.getSelectionRange(),u=o.doc.getTextRange(c);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(g.isSaneInsertion(n,o))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(g.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(g.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){d(n);var p=l.substring(a.column,a.column+1);if("}"==p){var m=o.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==m&&g.isAutoInsertedClosing(a,l,i))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){d(n);var h="";g.isMaybeInsertedClosing(a,l)&&(h=s.stringRepeat("}",r.maybeInsertedBrackets),g.clearMaybeInsertedClosing());var p=l.substring(a.column,a.column+1);if("}"===p){var b=o.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!b)return null;var f=this.$getIndent(o.getLine(b.row))}else{if(!h)return void g.clearMaybeInsertedClosing();var f=this.$getIndent(l)}var k=f+o.getTabString();return{text:"\n"+k+"\n"+f+h,selection:[1,k.length,1,k.length]}}g.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){d(n);var s=o.doc.getLine(i.start.row),l=s.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){d(n);var i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(g.isSaneInsertion(n,r))return g.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){d(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if(")"==c){var u=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==u&&g.isAutoInsertedClosing(s,l,o))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){d(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){d(n);var i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(g.isSaneInsertion(n,r))return g.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){d(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if("]"==c){var u=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==u&&g.isAutoInsertedClosing(s,l,o))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){d(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){d(n);var i=o,a=n.getSelectionRange(),s=r.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var l=n.getCursorPosition(),c=r.doc.getLine(l.row),u=c.substring(l.column-1,l.column),g=c.substring(l.column,l.column+1),p=r.getTokenAt(l.row,l.column),m=r.getTokenAt(l.row,l.column+1);if("\\"==u&&p&&/escape/.test(p.type))return null;var h,b=p&&/string/.test(p.type),f=!m||/string/.test(m.type);if(g==i)h=b!==f;else{if(b&&!f)return null;if(b&&f)return null;var k=r.$mode.tokenRe;k.lastIndex=0;var v=k.test(u);k.lastIndex=0;var x=k.test(u);if(v||x)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;h=!0}return{text:h?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){d(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(s==i)return o.end.column++,o}})};g.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){var o=new a(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},g.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},g.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},g.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},g.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},g.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},g.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},g.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(g,i),t.CstyleBehaviour=g}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),i=e("../../token_iterator").TokenIterator,a=function(){this.inherit(o),this.add("colon","insertion",function(e,t,n,r,o){if(":"===o){var a=n.getCursorPosition(),s=new i(r,a.row,a.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var c=r.doc.getLine(a.row),u=c.substring(a.column,a.column+1);if(":"===u)return{text:"",selection:[1,1]};if(!c.substring(a.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&":"===a){var s=n.getCursorPosition(),l=new i(r,s.row,s.column),c=l.getCurrentToken();if(c&&c.value.match(/\s+/)&&(c=l.stepBackward()),c&&"support.type"===c.type){var u=r.doc.getLine(o.start.row),d=u.substring(o.end.column,o.end.column+1);if(";"===d)return o.end.column++,o}}}),this.add("semicolon","insertion",function(e,t,n,r,o){if(";"===o){var i=n.getCursorPosition(),a=r.doc.getLine(i.row),s=a.substring(i.column,i.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};r.inherits(a,o),t.CssBehaviour=a}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var i=o.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),i=t,a=n.length;t+=1;for(var s=t,l=e.getLength();++tc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=i)break;if(u.isMultiLine())t=u.end.row;else if(r==c)break}s=t}}return new o(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++na)return new o(a,r,u,t.length)}}.call(a.prototype)}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/css").CssBehaviour,c=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new c};r.inherits(u,o),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e).tokens;if(o.length&&"comment"==o[o.length-1].type)return r;var i=t.match(/^.*\{\s*$/);return i&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(u.prototype),t.Mode=u}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-curly.js b/www/js/vendor/ace/mode-curly.js index a2e4aa4ab..ef99787bd 100755 --- a/www/js/vendor/ace/mode-curly.js +++ b/www/js/vendor/ace/mode-curly.js @@ -1,2483 +1,2 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = CssHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.foldingRules = "cStyle"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("csslint", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/css"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === " -1; -} - -(function() { - - this.getFoldWidget = function(session, foldStyle, row) { - var tag = this._getFirstTagInLine(session, row); - - if (!tag) - return ""; - - if (tag.closing || (!tag.tagName && tag.selfClosing)) - return foldStyle == "markbeginend" ? "end" : ""; - - if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) - return ""; - - if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) - return ""; - - return "start"; - }; - this._getFirstTagInLine = function(session, row) { - var tokens = session.getTokens(row); - var tag = new Tag(); - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (is(token, "tag-open")) { - tag.end.column = tag.start.column + token.value.length; - tag.closing = is(token, "end-tag-open"); - token = tokens[++i]; - if (!token) - return null; - tag.tagName = token.value; - tag.end.column += token.value.length; - for (i++; i < tokens.length; i++) { - token = tokens[i]; - tag.end.column += token.value.length; - if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - break; - } - } - return tag; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - return tag; - } - tag.start.column += token.value.length; - } - - return null; - }; - - this._findEndTagInLine = function(session, row, tagName, startColumn) { - var tokens = session.getTokens(row); - var column = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - column += token.value.length; - if (column < startColumn) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var firstTag = this._getFirstTagInLine(session, row); - - if (!firstTag) - return null; - - var isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var MixedFoldMode = require("./mixed").FoldMode; -var XmlFoldMode = require("./xml").FoldMode; -var CStyleFoldMode = require("./cstyle").FoldMode; - -var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { - MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { - "js-": new CStyleFoldMode(), - "css-": new CStyleFoldMode() - }); -}; - -oop.inherits(FoldMode, MixedFoldMode); - -}); - -define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var TokenIterator = require("../token_iterator").TokenIterator; - -var commonAttributes = [ - "accesskey", - "class", - "contenteditable", - "contextmenu", - "dir", - "draggable", - "dropzone", - "hidden", - "id", - "inert", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "lang", - "spellcheck", - "style", - "tabindex", - "title", - "translate" -]; - -var eventAttributes = [ - "onabort", - "onblur", - "oncancel", - "oncanplay", - "oncanplaythrough", - "onchange", - "onclick", - "onclose", - "oncontextmenu", - "oncuechange", - "ondblclick", - "ondrag", - "ondragend", - "ondragenter", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onended", - "onerror", - "onfocus", - "oninput", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeyup", - "onload", - "onloadeddata", - "onloadedmetadata", - "onloadstart", - "onmousedown", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onpause", - "onplay", - "onplaying", - "onprogress", - "onratechange", - "onreset", - "onscroll", - "onseeked", - "onseeking", - "onselect", - "onshow", - "onstalled", - "onsubmit", - "onsuspend", - "ontimeupdate", - "onvolumechange", - "onwaiting" -]; - -var globalAttributes = commonAttributes.concat(eventAttributes); - -var attributeMap = { - "html": ["manifest"], - "head": [], - "title": [], - "base": ["href", "target"], - "link": ["href", "hreflang", "rel", "media", "type", "sizes"], - "meta": ["http-equiv", "name", "content", "charset"], - "style": ["type", "media", "scoped"], - "script": ["charset", "type", "src", "defer", "async"], - "noscript": ["href"], - "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], - "section": [], - "nav": [], - "article": ["pubdate"], - "aside": [], - "h1": [], - "h2": [], - "h3": [], - "h4": [], - "h5": [], - "h6": [], - "header": [], - "footer": [], - "address": [], - "main": [], - "p": [], - "hr": [], - "pre": [], - "blockquote": ["cite"], - "ol": ["start", "reversed"], - "ul": [], - "li": ["value"], - "dl": [], - "dt": [], - "dd": [], - "figure": [], - "figcaption": [], - "div": [], - "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], - "em": [], - "strong": [], - "small": [], - "s": [], - "cite": [], - "q": ["cite"], - "dfn": [], - "abbr": [], - "data": [], - "time": ["datetime"], - "code": [], - "var": [], - "samp": [], - "kbd": [], - "sub": [], - "sup": [], - "i": [], - "b": [], - "u": [], - "mark": [], - "ruby": [], - "rt": [], - "rp": [], - "bdi": [], - "bdo": [], - "span": [], - "br": [], - "wbr": [], - "ins": ["cite", "datetime"], - "del": ["cite", "datetime"], - "img": ["alt", "src", "height", "width", "usemap", "ismap"], - "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], - "embed": ["src", "height", "width", "type"], - "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], - "param": ["name", "value"], - "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], - "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], - "source": ["src", "type", "media"], - "track": ["kind", "src", "srclang", "label", "default"], - "canvas": ["width", "height"], - "map": ["name"], - "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], - "svg": [], - "math": [], - "table": ["summary"], - "caption": [], - "colgroup": ["span"], - "col": ["span"], - "tbody": [], - "thead": [], - "tfoot": [], - "tr": [], - "td": ["headers", "rowspan", "colspan"], - "th": ["headers", "rowspan", "colspan", "scope"], - "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], - "fieldset": ["disabled", "form", "name"], - "legend": [], - "label": ["form", "for"], - "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], - "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], - "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], - "datalist": [], - "optgroup": ["disabled", "label"], - "option": ["disabled", "selected", "label", "value"], - "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], - "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], - "output": ["for", "form", "name"], - "progress": ["value", "max"], - "meter": ["value", "min", "max", "low", "high", "optimum"], - "details": ["open"], - "summary": [], - "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], - "menu": ["type", "label"], - "dialog": ["open"] -}; - -var elements = Object.keys(attributeMap); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -function findTagName(session, pos) { - var iterator = new TokenIterator(session, pos.row, pos.column); - var token = iterator.getCurrentToken(); - while (token && !is(token, "tag-name")){ - token = iterator.stepBackward(); - } - if (token) - return token.value; -} - -var HtmlCompletions = function() { - -}; - -(function() { - - this.getCompletions = function(state, session, pos, prefix) { - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) - return this.getTagCompletions(state, session, pos, prefix); - if (is(token, "tag-whitespace") || is(token, "attribute-name")) - return this.getAttributeCompetions(state, session, pos, prefix); - - return []; - }; - - this.getTagCompletions = function(state, session, pos, prefix) { - return elements.map(function(element){ - return { - value: element, - meta: "tag", - score: Number.MAX_VALUE - }; - }); - }; - - this.getAttributeCompetions = function(state, session, pos, prefix) { - var tagName = findTagName(session, pos); - if (!tagName) - return []; - var attributes = globalAttributes; - if (tagName in attributeMap) { - attributes = attributes.concat(attributeMap[tagName]); - } - return attributes.map(function(attribute){ - return { - caption: attribute, - snippet: attribute + '="$0"', - meta: "attribute", - score: Number.MAX_VALUE - }; - }); - }; - -}).call(HtmlCompletions.prototype); - -exports.HtmlCompletions = HtmlCompletions; -}); - -define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var CssMode = require("./css").Mode; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; -var HtmlFoldMode = require("./folding/html").FoldMode; -var HtmlCompletions = require("./html_completions").HtmlCompletions; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; -var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; - -var Mode = function(options) { - this.fragmentContext = options && options.fragmentContext; - this.HighlightRules = HtmlHighlightRules; - this.$behaviour = new XmlBehaviour(); - this.$completer = new HtmlCompletions(); - - this.createModeDelegates({ - "js-": JavaScriptMode, - "css-": CssMode - }); - - this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.blockComment = {start: ""}; - - this.voidElements = lang.arrayToMap(voidElements); - - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - this.checkOutdent = function(state, line, input) { - return false; - }; - - this.getCompletions = function(state, session, pos, prefix) { - return this.$completer.getCompletions(state, session, pos, prefix); - }; - - this.createWorker = function(session) { - if (this.constructor != Mode) - return; - var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - if (this.fragmentContext) - worker.call("setOptions", [{context: this.fragmentContext}]); - - worker.on("error", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/html"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/curly_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; - - -var CurlyHighlightRules = function() { - HtmlHighlightRules.call(this); - - this.$rules["start"].unshift({ - token: "variable", - regex: "{{", - push: "curly-start" - }); - - this.$rules["curly-start"] = [{ - token: "variable", - regex: "}}", - next: "pop" - }]; - - this.normalizeRules(); -}; - -oop.inherits(CurlyHighlightRules, HtmlHighlightRules); - -exports.CurlyHighlightRules = CurlyHighlightRules; - -}); - -define("ace/mode/curly",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/matching_brace_outdent","ace/mode/html_highlight_rules","ace/mode/folding/html","ace/mode/curly_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var HtmlMode = require("./html").Mode; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var HtmlFoldMode = require("./folding/html").FoldMode; -var CurlyHighlightRules = require("./curly_highlight_rules").CurlyHighlightRules; - -var Mode = function() { - HtmlMode.call(this); - this.HighlightRules = CurlyHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.foldingRules = new HtmlFoldMode(); -}; -oop.inherits(Mode, HtmlMode); - -(function() { - this.$id = "ace/mode/curly"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};o.inherits(i,r),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",o="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},r.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[r.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[r.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(r,"doc-",[r.getEndRule("no_regex")]),this.normalizeRules()};o.inherits(a,i),t.JavaScriptHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),r=n.match(/^(\s*\})/);if(!r)return 0;var i=r[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new o(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var o,r=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?o=c[t]:void(o=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,r,i){var a=n.getCursorPosition(),l=r.doc.getLine(a.row);if("{"==i){g(n);var u=n.getSelectionRange(),c=r.doc.getTextRange(u);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return{text:"{"+c+"}",selection:!1};if(d.isSaneInsertion(n,r))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var m=l.substring(a.column,a.column+1);if("}"==m){var p=r.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==p&&d.isAutoInsertedClosing(a,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var h="";d.isMaybeInsertedClosing(a,l)&&(h=s.stringRepeat("}",o.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=l.substring(a.column,a.column+1);if("}"===m){var f=r.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!f)return null;var x=this.$getIndent(r.getLine(f.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var b=x+r.getTabString();return{text:"\n"+b+"\n"+x+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,i){var a=r.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){g(n);var s=r.doc.getLine(i.start.row),l=s.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,o,r){if("("==r){g(n);var i=n.getSelectionRange(),a=o.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,")"),{text:"()",selection:[1,1]}}else if(")"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=o.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"("==i){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(")"==s)return r.end.column++,r}}),this.add("brackets","insertion",function(e,t,n,o,r){if("["==r){g(n);var i=n.getSelectionRange(),a=o.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=o.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"["==i){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if("]"==s)return r.end.column++,r}}),this.add("string_dquotes","insertion",function(e,t,n,o,r){if('"'==r||"'"==r){g(n);var i=r,a=n.getSelectionRange(),s=o.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var l=n.getCursorPosition(),u=o.doc.getLine(l.row),c=u.substring(l.column-1,l.column),d=u.substring(l.column,l.column+1),m=o.getTokenAt(l.row,l.column),p=o.getTokenAt(l.row,l.column+1);if("\\"==c&&m&&/escape/.test(m.type))return null;var h,f=m&&/string/.test(m.type),x=!p||/string/.test(p.type);if(d==i)h=f!==x;else{if(f&&!x)return null;if(f&&x)return null;var b=o.$mode.tokenRe;b.lastIndex=0;var k=b.test(c);b.lastIndex=0;var v=b.test(c);if(k||v)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==i||"'"==i)){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(s==i)return r.end.column++,r}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),o=new a(t,n.row,n.column);if(!this.$matchTokenType(o.getCurrentToken()||"text",l)){var r=new a(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return o.stepForward(),o.getCurrentTokenRow()!==n.row||this.$matchTokenType(o.getCurrentToken()||"text",u)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=r.row,o.autoInsertedLineEnd=n+i.substr(r.column),o.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=r.row,o.maybeInsertedLineStart=i.substr(0,r.column)+n,o.maybeInsertedLineEnd=i.substr(r.column),o.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return o.autoInsertedBrackets>0&&e.row===o.autoInsertedRow&&n===o.autoInsertedLineEnd[0]&&t.substr(e.column)===o.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return o.maybeInsertedBrackets>0&&e.row===o.maybeInsertedRow&&t.substr(e.column)===o.maybeInsertedLineEnd&&t.substr(0,e.column)==o.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},r.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(o)?"start":r},this.getFoldWidgetRange=function(e,t,n,o){var r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);var i=r.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(o?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=r.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),o=n.search(/\S/),i=t,a=n.length;t+=1;for(var s=t,l=e.getLength();++tu)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=i)break;if(c.isMultiLine())t=c.end.row;else if(o==u)break}s=t}}return new r(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++na)return new r(a,o,c,t.length)}}.call(a.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),i=r.tokens,a=r.state;if(i.length&&"comment"==i[i.length-1].type)return o;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(o+=n)}else if("doc-start"==e){if("start"==a||"no_regex"==a)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(o+=" "),o+="* ")}return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(c.prototype),t.Mode=c}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),i=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",u=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",m=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":s,"support.type":i,"support.constant.color":l,"support.constant.fonts":u},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};o.inherits(m,r),t.CssHighlightRules=m}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),i=e("../../token_iterator").TokenIterator,a=function(){this.inherit(r),this.add("colon","insertion",function(e,t,n,o,r){if(":"===r){var a=n.getCursorPosition(),s=new i(o,a.row,a.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var u=o.doc.getLine(a.row),c=u.substring(a.column,a.column+1); +if(":"===c)return{text:"",selection:[1,1]};if(!u.substring(a.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&":"===a){var s=n.getCursorPosition(),l=new i(o,s.row,s.column),u=l.getCurrentToken();if(u&&u.value.match(/\s+/)&&(u=l.stepBackward()),u&&"support.type"===u.type){var c=o.doc.getLine(r.start.row),g=c.substring(r.end.column,r.end.column+1);if(";"===g)return r.end.column++,r}}}),this.add("semicolon","insertion",function(e,t,n,o,r){if(";"===r){var i=n.getCursorPosition(),a=o.doc.getLine(i.row),s=a.substring(i.column,i.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};o.inherits(a,r),t.CssBehaviour=a}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e).tokens;if(r.length&&"comment"==r[r.length-1].type)return o;var i=t.match(/^.*\{\s*$/);return i&&(o+=n),o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===i&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(r.prototype),o.inherits(i,r),t.XmlHighlightRules=i}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./css_highlight_rules").CssHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=r.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),u=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(i,"css-","style"),this.embedTagRules(a,"js-","script"),this.constructor===u&&this.normalizeRules()};o.inherits(u,s),t.HtmlHighlightRules=u}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if('"'==i||"'"==i){var s=i,l=r.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),g=c.substring(u.column,u.column+1),d=new a(r,u.row,u.column),m=d.getCurrentToken();if(g==s&&(o(m,"attribute-value")||o(m,"string")))return{text:"",selection:[1,1]};if(m||(m=d.stepBackward()),!m)return;for(;o(m,"tag-whitespace")||o(m,"whitespace");)m=d.stepBackward();var p=!g||g.match(/\s/);if(o(m,"attribute-equals")&&(p||">"==g)||o(m,"decl-attribute-equals")&&(p||"?"==g))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==i||"'"==i)){var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(s==i)return r.end.column++,r}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(">"==i){var s=n.getCursorPosition(),l=new a(r,s.row,s.column),u=l.getCurrentToken()||l.stepBackward();if(!u||!(o(u,"tag-name")||o(u,"tag-whitespace")||o(u,"attribute-name")||o(u,"attribute-equals")||o(u,"attribute-value")))return;if(o(u,"reference.attribute-value"))return;if(o(u,"attribute-value")){var c=u.value.charAt(0);if('"'==c||"'"==c){var g=u.value.charAt(u.value.length-1),d=l.getCurrentTokenColumn()+u.value.length;if(d>s.column||d==s.column&&c!=g)return}}for(;!o(u,"tag-name");)u=l.stepBackward();var m=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn();if(o(l.stepBackward(),"end-tag-open"))return;var h=u.value;if(m==s.row&&(h=h.substring(0,s.column-p)),this.voidElements.hasOwnProperty(h.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,o,r){if("\n"==r){var i=n.getCursorPosition(),s=o.getLine(i.row),l=new a(o,i.row,i.column),u=l.getCurrentToken();if(u&&u.type.indexOf("tag-close")!==-1){for(;u&&u.type.indexOf("tag-name")===-1;)u=l.stepBackward();if(!u)return;var c=u.value,g=l.getCurrentTokenRow();if(u=l.stepBackward(),!u||u.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]){var d=o.getTokenAt(i.row,i.column+1),s=o.getLine(g),m=this.$getIndent(s),p=m+o.getTabString();return d&&"-1}var r=e("../../lib/oop"),i=(e("../../lib/lang"),e("../../range").Range),a=e("./fold_mode").FoldMode,s=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(e,t){a.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(l,a);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var o=this._getFirstTagInLine(e,n);return o?o.closing||!o.tagName&&o.selfClosing?"markbeginend"==t?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,o.tagName,o.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new u,i=0;i"==a.value;break}return r}if(o(a,"tag-close"))return r.selfClosing="/>"==a.value,r;r.start.column+=a.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var i=e.getTokens(t),a=0,s=0;s"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(t&&n.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,n){var o=this._getFirstTagInLine(e,n);if(!o)return null;var r,a=o.closing||o.selfClosing,l=[];if(a)for(var u=new s(e,n,o.end.column),c={row:n,column:o.start.column};r=this._readTagBackward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,i.fromPoints(r.start,r.end)}if(r.closing)l.push(r);else if(this._pop(l,r),0==l.length)return r.start.column+=r.tagName.length+2,i.fromPoints(r.start,c)}else for(var u=new s(e,n,o.start.column),g={row:n,column:o.start.column+o.tagName.length+2};r=this._readTagForward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,i.fromPoints(r.start,r.end)}if(r.closing){if(this._pop(l,r),0==l.length)return i.fromPoints(g,r.start)}else l.push(r)}}}).call(l.prototype)}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./mixed").FoldMode,i=e("./xml").FoldMode,a=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){r.call(this,new i(e,t),{"js-":new a,"css-":new a})};o.inherits(s,r)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}function r(e,t){for(var n=new i(e,t.row,t.column),r=n.getCurrentToken();r&&!o(r,"tag-name");)r=n.stepBackward();if(r)return r.value}var i=e("../token_iterator").TokenIterator,a=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=a.concat(s),u={html:["manifest"],head:[],title:[],base:["href","target"],link:["href","hreflang","rel","media","type","sizes"],meta:["http-equiv","name","content","charset"],style:["type","media","scoped"],script:["charset","type","src","defer","async"],noscript:["href"],body:["onafterprint","onbeforeprint","onbeforeunload","onhashchange","onmessage","onoffline","onpopstate","onredo","onresize","onstorage","onundo","onunload"],section:[],nav:[],article:["pubdate"],aside:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],footer:[],address:[],main:[],p:[],hr:[],pre:[],blockquote:["cite"],ol:["start","reversed"],ul:[],li:["value"],dl:[],dt:[],dd:[],figure:[],figcaption:[],div:[],a:["href","target","ping","rel","media","hreflang","type"],em:[],strong:[],small:[],s:[],cite:[],q:["cite"],dfn:[],abbr:[],data:[],time:["datetime"],code:[],var:[],samp:[],kbd:[],sub:[],sup:[],i:[],b:[],u:[],mark:[],ruby:[],rt:[],rp:[],bdi:[],bdo:[],span:[],br:[],wbr:[],ins:["cite","datetime"],del:["cite","datetime"],img:["alt","src","height","width","usemap","ismap"],iframe:["name","src","height","width","sandbox","seamless"],embed:["src","height","width","type"],object:["param","data","type","height","width","usemap","name","form","classid"],param:["name","value"],video:["src","autobuffer","autoplay","loop","controls","width","height","poster"],audio:["src","autobuffer","autoplay","loop","controls"],source:["src","type","media"],track:["kind","src","srclang","label","default"],canvas:["width","height"],map:["name"],area:["shape","coords","href","hreflang","alt","target","media","rel","ping","type"],svg:[],math:[],table:["summary"],caption:[],colgroup:["span"],col:["span"],tbody:[],thead:[],tfoot:[],tr:[],td:["headers","rowspan","colspan"],th:["headers","rowspan","colspan","scope"],form:["accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],fieldset:["disabled","form","name"],legend:[],label:["form","for"],input:["type","accept","alt","autocomplete","checked","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","multiple","pattern","placeholder","readonly","required","size","src","step","width","files","value"],button:["autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","value","type"],select:["autofocus","disabled","form","multiple","name","size"],datalist:[],optgroup:["disabled","label"],option:["disabled","selected","label","value"],textarea:["autofocus","disabled","form","maxlength","name","placeholder","readonly","required","rows","cols","wrap"],keygen:["autofocus","challenge","disabled","form","keytype","name"],output:["for","form","name"],progress:["value","max"],meter:["value","min","max","low","high","optimum"],details:["open"],summary:[],command:["type","label","icon","disabled","checked","radiogroup","command"],menu:["type","label"],dialog:["open"]},c=Object.keys(u),g=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);return i?o(i,"tag-name")||o(i,"tag-open")||o(i,"end-tag-open")?this.getTagCompletions(e,t,n,r):o(i,"tag-whitespace")||o(i,"attribute-name")?this.getAttributeCompetions(e,t,n,r):[]:[]},this.getTagCompletions=function(e,t,n,o){return c.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompetions=function(e,t,n,o){var i=r(t,n);if(!i)return[];var a=l;return i in u&&(a=a.concat(u[i])),a.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})}}).call(g.prototype),t.HtmlCompletions=g}),define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./text").Mode,a=e("./javascript").Mode,s=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,g=e("./html_completions").HtmlCompletions,d=e("../worker/worker_client").WorkerClient,m=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],p=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],h=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new u,this.$completer=new g,this.createModeDelegates({"js-":a,"css-":s}),this.foldingRules=new c(this.voidElements,r.arrayToMap(p))};o.inherits(h,i),function(){this.blockComment={start:""},this.voidElements=r.arrayToMap(m),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,o){return this.$completer.getCompletions(e,t,n,o)},this.createWorker=function(e){if(this.constructor==h){var t=new d(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(h.prototype),t.Mode=h}),define("ace/mode/curly_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./html_highlight_rules").HtmlHighlightRules,i=function(){r.call(this),this.$rules.start.unshift({token:"variable",regex:"{{",push:"curly-start"}),this.$rules["curly-start"]=[{token:"variable",regex:"}}",next:"pop"}],this.normalizeRules()};o.inherits(i,r),t.CurlyHighlightRules=i}),define("ace/mode/curly",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/matching_brace_outdent","ace/mode/html_highlight_rules","ace/mode/folding/html","ace/mode/curly_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./html").Mode,i=e("./matching_brace_outdent").MatchingBraceOutdent,a=(e("./html_highlight_rules").HtmlHighlightRules,e("./folding/html").FoldMode),s=e("./curly_highlight_rules").CurlyHighlightRules,l=function(){r.call(this),this.HighlightRules=s,this.$outdent=new i,this.foldingRules=new a};o.inherits(l,r),function(){this.$id="ace/mode/curly"}.call(l.prototype),t.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-d.js b/www/js/vendor/ace/mode-d.js index 3b4df25fb..bb0bf4d06 100755 --- a/www/js/vendor/ace/mode-d.js +++ b/www/js/vendor/ace/mode-d.js @@ -1,513 +1 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/d_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DHighlightRules = function() { - - var keywords = ( - "this|super|import|module|body|mixin|__traits|invariant|alias|asm|delete|"+ - "typeof|typeid|sizeof|cast|new|in|is|typedef|__vector|__parameters" - ); - - var keywordControls = ( - "break|case|continue|default|do|else|for|foreach|foreach_reverse|goto|if|" + - "return|switch|while|catch|try|throw|finally|version|assert|unittest|with" - ); - - var types = ( - "auto|bool|char|dchar|wchar|byte|ubyte|float|double|real|" + - "cfloat|creal|cdouble|cent|ifloat|ireal|idouble|" + - "int|long|short|void|uint|ulong|ushort|ucent|" + - "function|delegate|string|wstring|dstring|size_t|ptrdiff_t|hash_t|Object" - ); - - var modifiers = ( - "abstract|align|debug|deprecated|export|extern|const|final|in|inout|out|" + - "ref|immutable|lazy|nothrow|override|package|pragma|private|protected|" + - "public|pure|scope|shared|__gshared|synchronized|static|volatile" - ); - - var storages = ( - "class|struct|union|template|interface|enum|macro" - ); - - var stringEscapesSeq = { - token: "constant.language.escape", - regex: "\\\\(?:(?:x[0-9A-F]{2})|(?:[0-7]{1,3})|(?:['\"\\?0abfnrtv\\\\])|" + - "(?:u[0-9a-fA-F]{4})|(?:U[0-9a-fA-F]{8}))" - }; - - var builtinConstants = ( - "null|true|false|"+ - "__DATE__|__EOF__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__|"+ - "__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__" - ); - - var operators = ( - "/|/\\=|&|&\\=|&&|\\|\\|\\=|\\|\\||\\-|\\-\\=|\\-\\-|\\+|" + - "\\+\\=|\\+\\+|\\<|\\<\\=|\\<\\<|\\<\\<\\=|\\<\\>|\\<\\>\\=|\\>|\\>\\=|\\>\\>\\=|" + - "\\>\\>\\>\\=|\\>\\>|\\>\\>\\>|\\!|\\!\\=|\\!\\<\\>|\\!\\<\\>\\=|\\!\\<|\\!\\<\\=|" + - "\\!\\>|\\!\\>\\=|\\?|\\$|\\=|\\=\\=|\\*|\\*\\=|%|%\\=|" + - "\\^|\\^\\=|\\^\\^|\\^\\^\\=|~|~\\=|\\=\\>|#" - ); - - var keywordMapper = this.$keywords = this.createKeywordMapper({ - "keyword.modifier" : modifiers, - "keyword.control" : keywordControls, - "keyword.type" : types, - "keyword": keywords, - "keyword.storage": storages, - "punctation": "\\.|\\,|;|\\.\\.|\\.\\.\\.", - "keyword.operator" : operators, - "constant.language": builtinConstants - }, "identifier"); - - var identifierRe = "[a-zA-Z_\u00a1-\uffff][a-zA-Z\\d_\u00a1-\uffff]*\\b"; - - this.$rules = { - "start" : [ - { //-------------------------------------------------------- COMMENTS - token : "comment", - regex : "\\/\\/.*$" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "star-comment" - }, { - token: "comment.shebang", - regex: "^\s*#!.*" - }, { - token : "comment", - regex : "\\/\\+", - next: "plus-comment" - }, { //-------------------------------------------------------- STRINGS - onMatch: function(value, currentState, state) { - state.unshift(this.next, value.substr(2)); - return "string"; - }, - regex: 'q"(?:[\\[\\(\\{\\<]+)', - next: 'operator-heredoc-string' - }, { - onMatch: function(value, currentState, state) { - state.unshift(this.next, value.substr(2)); - return "string"; - }, - regex: 'q"(?:[a-zA-Z_]+)$', - next: 'identifier-heredoc-string' - }, { - token : "string", // multi line string start - regex : '[xr]?"', - next : "quote-string" - }, { - token : "string", // multi line string start - regex : '[xr]?`', - next : "backtick-string" - }, { - token : "string", // single line - regex : "[xr]?['](?:(?:\\\\.)|(?:[^'\\\\]))*?['][cdw]?" - }, { //-------------------------------------------------------- RULES - token: ["keyword", "text", "paren.lparen"], - regex: /(asm)(\s*)({)/, - next: "d-asm" - }, { - token: ["keyword", "text", "paren.lparen", "constant.language"], - regex: "(__traits)(\\s*)(\\()("+identifierRe+")" - }, { // import|module abc - token: ["keyword", "text", "variable.module"], - regex: "(import|module)(\\s+)((?:"+identifierRe+"\\.?)*)" - }, { // storage Name - token: ["keyword.storage", "text", "entity.name.type"], - regex: "("+storages+")(\\s*)("+identifierRe+")" - }, { // alias|typedef foo bar; - token: ["keyword", "text", "variable.storage", "text"], - regex: "(alias|typedef)(\\s*)("+identifierRe+")(\\s*)" - }, { //-------------------------------------------------------- OTHERS - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F_]+(l|ul|u|f|F|L|U|UL)?\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d[\\d_]*(?:(?:\\.[\\d_]*)?(?:[eE][+-]?[\\d_]+)?)?(l|ul|u|f|F|L|U|UL)?\\b" - }, { - token: "entity.other.attribute-name", - regex: "@"+identifierRe - }, { - token : keywordMapper, - regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b" - }, { - token : "keyword.operator", - regex : operators - }, { - token : "punctuation.operator", - regex : "\\?|\\:|\\,|\\;|\\.|\\:" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "star-comment" : [ - { - token : "comment", // closing comment - regex : "\\*\\/", - next : "start" - }, { - defaultToken: 'comment' - } - ], - "plus-comment" : [ - { - token : "comment", // closing comment - regex : "\\+\\/", - next : "start" - }, { - defaultToken: 'comment' - } - ], - - "quote-string" : [ - stringEscapesSeq, - { - token : "string", - regex : '"[cdw]?', - next : "start" - }, { - defaultToken: 'string' - } - ], - - "backtick-string" : [ - stringEscapesSeq, - { - token : "string", - regex : '`[cdw]?', - next : "start" - }, { - defaultToken: 'string' - } - ], - - "operator-heredoc-string": [ - { - onMatch: function(value, currentState, state) { - value = value.substring(value.length-2, value.length-1); - var map = {'>':'<',']':'[',')':'(','}':'{'}; - if(Object.keys(map).indexOf(value) != -1) - value = map[value]; - if(value != state[1]) return "string"; - state.shift(); - state.shift(); - - return "string"; - }, - regex: '(?:[\\]\\)}>]+)"', - next: 'start' - }, { - token: 'string', - regex: '[^\\]\\)}>]+' - } - ], - - "identifier-heredoc-string": [ - { - onMatch: function(value, currentState, state) { - value = value.substring(0, value.length-1); - if(value != state[1]) return "string"; - state.shift(); - state.shift(); - - return "string"; - }, - regex: '^(?:[A-Za-z_][a-zA-Z0-9]+)"', - next: 'start' - }, { - token: 'string', - regex: '[^\\]\\)}>]+' - } - ], - - "d-asm": [ - { - token: "paren.rparen", - regex: "\\}", - next: "start" - }, { - token: 'keyword.instruction', - regex: '[a-zA-Z]+', - next: 'd-asm-instruction' - }, { - token: "text", - regex: "\\s+" - } - ], - 'd-asm-instruction': [ - { - token: 'constant.language', - regex: /AL|AH|AX|EAX|BL|BH|BX|EBX|CL|CH|CX|ECX|DL|DH|DX|EDX|BP|EBP|SP|ESP|DI|EDI|SI|ESI/i - }, { - token: 'identifier', - regex: '[a-zA-Z]+' - }, { - token: 'string', - regex: '".*"' - }, { - token: 'comment', - regex: '//.*$' - }, { - token: 'constant.numeric', - regex: '[0-9.xA-F]+' - }, { - token: 'punctuation.operator', - regex: '\\,' - }, { - token: 'punctuation.operator', - regex: ';', - next: 'd-asm' - }, { - token: 'text', - regex: '\\s+' - } - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); -}; - -DHighlightRules.metaData = { - comment: 'D language', - fileTypes: [ 'd', 'di' ], - firstLineMatch: '^#!.*\\b[glr]?dmd\\b.', - foldingStartMarker: '(?x)/\\*\\*(?!\\*)|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))', - foldingStopMarker: '(? indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/d",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/d_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var DHighlightRules = require("./d_highlight_rules").DHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = DHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$id = "ace/mode/d"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(i,o),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/d_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(){var e="this|super|import|module|body|mixin|__traits|invariant|alias|asm|delete|typeof|typeid|sizeof|cast|new|in|is|typedef|__vector|__parameters",t="break|case|continue|default|do|else|for|foreach|foreach_reverse|goto|if|return|switch|while|catch|try|throw|finally|version|assert|unittest|with",n="auto|bool|char|dchar|wchar|byte|ubyte|float|double|real|cfloat|creal|cdouble|cent|ifloat|ireal|idouble|int|long|short|void|uint|ulong|ushort|ucent|function|delegate|string|wstring|dstring|size_t|ptrdiff_t|hash_t|Object",r="abstract|align|debug|deprecated|export|extern|const|final|in|inout|out|ref|immutable|lazy|nothrow|override|package|pragma|private|protected|public|pure|scope|shared|__gshared|synchronized|static|volatile",i="class|struct|union|template|interface|enum|macro",a={token:"constant.language.escape",regex:"\\\\(?:(?:x[0-9A-F]{2})|(?:[0-7]{1,3})|(?:['\"\\?0abfnrtv\\\\])|(?:u[0-9a-fA-F]{4})|(?:U[0-9a-fA-F]{8}))"},s="null|true|false|__DATE__|__EOF__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__|__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__",g="/|/\\=|&|&\\=|&&|\\|\\|\\=|\\|\\||\\-|\\-\\=|\\-\\-|\\+|\\+\\=|\\+\\+|\\<|\\<\\=|\\<\\<|\\<\\<\\=|\\<\\>|\\<\\>\\=|\\>|\\>\\=|\\>\\>\\=|\\>\\>\\>\\=|\\>\\>|\\>\\>\\>|\\!|\\!\\=|\\!\\<\\>|\\!\\<\\>\\=|\\!\\<|\\!\\<\\=|\\!\\>|\\!\\>\\=|\\?|\\$|\\=|\\=\\=|\\*|\\*\\=|%|%\\=|\\^|\\^\\=|\\^\\^|\\^\\^\\=|~|~\\=|\\=\\>|#",l=this.$keywords=this.createKeywordMapper({"keyword.modifier":r,"keyword.control":t,"keyword.type":n,keyword:e,"keyword.storage":i,punctation:"\\.|\\,|;|\\.\\.|\\.\\.\\.","keyword.operator":g,"constant.language":s},"identifier"),c="[a-zA-Z_¡-￿][a-zA-Z\\d_¡-￿]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"star-comment"},{token:"comment.shebang",regex:"^s*#!.*"},{token:"comment",regex:"\\/\\+",next:"plus-comment"},{onMatch:function(e,t,n){return n.unshift(this.next,e.substr(2)),"string"},regex:'q"(?:[\\[\\(\\{\\<]+)',next:"operator-heredoc-string"},{onMatch:function(e,t,n){return n.unshift(this.next,e.substr(2)),"string"},regex:'q"(?:[a-zA-Z_]+)$',next:"identifier-heredoc-string"},{token:"string",regex:'[xr]?"',next:"quote-string"},{token:"string",regex:"[xr]?`",next:"backtick-string"},{token:"string",regex:"[xr]?['](?:(?:\\\\.)|(?:[^'\\\\]))*?['][cdw]?"},{token:["keyword","text","paren.lparen"],regex:/(asm)(\s*)({)/,next:"d-asm"},{token:["keyword","text","paren.lparen","constant.language"],regex:"(__traits)(\\s*)(\\()("+c+")"},{token:["keyword","text","variable.module"],regex:"(import|module)(\\s+)((?:"+c+"\\.?)*)"},{token:["keyword.storage","text","entity.name.type"],regex:"("+i+")(\\s*)("+c+")"},{token:["keyword","text","variable.storage","text"],regex:"(alias|typedef)(\\s*)("+c+")(\\s*)"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F_]+(l|ul|u|f|F|L|U|UL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d[\\d_]*(?:(?:\\.[\\d_]*)?(?:[eE][+-]?[\\d_]+)?)?(l|ul|u|f|F|L|U|UL)?\\b"},{token:"entity.other.attribute-name",regex:"@"+c},{token:l,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:g},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.|\\:"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],"star-comment":[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],"plus-comment":[{token:"comment",regex:"\\+\\/",next:"start"},{defaultToken:"comment"}],"quote-string":[a,{token:"string",regex:'"[cdw]?',next:"start"},{defaultToken:"string"}],"backtick-string":[a,{token:"string",regex:"`[cdw]?",next:"start"},{defaultToken:"string"}],"operator-heredoc-string":[{onMatch:function(e,t,n){e=e.substring(e.length-2,e.length-1);var r={">":"<","]":"[",")":"(","}":"{"};return Object.keys(r).indexOf(e)!=-1&&(e=r[e]),e!=n[1]?"string":(n.shift(),n.shift(),"string")},regex:'(?:[\\]\\)}>]+)"',next:"start"},{token:"string",regex:"[^\\]\\)}>]+"}],"identifier-heredoc-string":[{onMatch:function(e,t,n){return e=e.substring(0,e.length-1),e!=n[1]?"string":(n.shift(),n.shift(),"string")},regex:'^(?:[A-Za-z_][a-zA-Z0-9]+)"',next:"start"},{token:"string",regex:"[^\\]\\)}>]+"}],"d-asm":[{token:"paren.rparen",regex:"\\}",next:"start"},{token:"keyword.instruction",regex:"[a-zA-Z]+",next:"d-asm-instruction"},{token:"text",regex:"\\s+"}],"d-asm-instruction":[{token:"constant.language",regex:/AL|AH|AX|EAX|BL|BH|BX|EBX|CL|CH|CX|ECX|DL|DH|DX|EDX|BP|EBP|SP|ESP|DI|EDI|SI|ESI/i},{token:"identifier",regex:"[a-zA-Z]+"},{token:"string",regex:'".*"'},{token:"comment",regex:"//.*$"},{token:"constant.numeric",regex:"[0-9.xA-F]+"},{token:"punctuation.operator",regex:"\\,"},{token:"punctuation.operator",regex:";",next:"d-asm"},{token:"text",regex:"\\s+"}]},this.embedRules(o,"doc-",[o.getEndRule("start")])};a.metaData={comment:"D language",fileTypes:["d","di"],firstLineMatch:"^#!.*\\b[glr]?dmd\\b.",foldingStartMarker:"(?x)/\\*\\*(?!\\*)|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))",foldingStopMarker:"(?l)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=i)break;if(c.isMultiLine())t=c.end.row;else if(r==l)break}s=t}}return new o(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,g=1;++na)return new o(a,r,c,t.length)}}.call(a.prototype)}),define("ace/mode/d",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/d_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./d_highlight_rules").DHighlightRules,a=e("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=i,this.foldingRules=new a};r.inherits(s,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/d"}.call(s.prototype),t.Mode=s}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-dart.js b/www/js/vendor/ace/mode-dart.js index 274d9ae5b..08703208a 100755 --- a/www/js/vendor/ace/mode-dart.js +++ b/www/js/vendor/ace/mode-dart.js @@ -1,1053 +1 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b" - -var c_cppHighlightRules = function() { - - var keywordControls = ( - "break|case|continue|default|do|else|for|goto|if|_Pragma|" + - "return|switch|while|catch|operator|try|throw|using" - ); - - var storageType = ( - "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + - "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" + - "class|wchar_t|template" - ); - - var storageModifiers = ( - "const|extern|register|restrict|static|volatile|inline|private|" + - "protected|public|friend|explicit|virtual|export|mutable|typename|" + - "constexpr|new|delete" - ); - - var keywordOperators = ( - "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + - "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" - ); - - var builtinConstants = ( - "NULL|true|false|TRUE|FALSE" - ); - - var keywordMapper = this.$keywords = this.createKeywordMapper({ - "keyword.control" : keywordControls, - "storage.type" : storageType, - "storage.modifier" : storageModifiers, - "keyword.operator" : keywordOperators, - "variable.language": "this", - "constant.language": builtinConstants - }, "identifier"); - - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b"; - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "//", - next : "singleLineComment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // multi line string start - regex : '["].*\\\\$', - next : "qqstring" - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "string", // multi line string start - regex : "['].*\\\\$", - next : "qstring" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" - }, { - token : "keyword", // pre-compiler directives - regex : "#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b", - next : "directive" - }, { - token : "keyword", // special case pre-compiler directive - regex : "(?:#\\s*endif)\\b" - }, { - token : "support.function.C99.c", - regex : cFunctions - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)" - }, { - token : "punctuation.operator", - regex : "\\?|\\:|\\,|\\;|\\." - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - "singleLineComment" : [ - { - token : "comment", - regex : /\\$/, - next : "singleLineComment" - }, { - token : "comment", - regex : /$/, - next : "start" - }, { - defaultToken: "comment" - } - ], - "qqstring" : [ - { - token : "string", - regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', - next : "start" - }, { - defaultToken : "string" - } - ], - "qstring" : [ - { - token : "string", - regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", - next : "start" - }, { - defaultToken : "string" - } - ], - "directive" : [ - { - token : "constant.other.multiline", - regex : /\\/ - }, - { - token : "constant.other.multiline", - regex : /.*\\/ - }, - { - token : "constant.other", - regex : "\\s*<.+?>", - next : "start" - }, - { - token : "constant.other", // single line - regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', - next : "start" - }, - { - token : "constant.other", // single line - regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", - next : "start" - }, - { - token : "constant.other", - regex : /[^\\\/]+/, - next : "start" - } - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); -}; - -oop.inherits(c_cppHighlightRules, TextHighlightRules); - -exports.c_cppHighlightRules = c_cppHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = c_cppHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/c_cpp"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/dart_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DartHighlightRules = function() { - - var constantLanguage = "true|false|null"; - var variableLanguage = "this|super"; - var keywordControl = "try|catch|finally|throw|rethrow|assert|break|case|continue|default|do|else|for|if|in|return|switch|while|new|deferred|async|await"; - var keywordDeclaration = "abstract|class|extends|external|factory|implements|get|native|operator|set|typedef|with|enum"; - var storageModifier = "static|final|const"; - var storageType = "void|bool|num|int|double|dynamic|var|String"; - - var keywordMapper = this.createKeywordMapper({ - "constant.language.dart": constantLanguage, - "variable.language.dart": variableLanguage, - "keyword.control.dart": keywordControl, - "keyword.declaration.dart": keywordDeclaration, - "storage.modifier.dart": storageModifier, - "storage.type.primitive.dart": storageType - }, "identifier"); - - var stringfill = { - token : "string", - regex : ".+" - }; - - this.$rules = - { - "start": [ - { - token : "comment", - regex : /\/\/.*$/ - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, - { - token: ["meta.preprocessor.script.dart"], - regex: "^(#!.*)$" - }, - { - token: "keyword.other.import.dart", - regex: "(?:\\b)(?:library|import|export|part|of|show|hide)(?:\\b)" - }, - { - token : ["keyword.other.import.dart", "text"], - regex : "(?:\\b)(prefix)(\\s*:)" - }, - { - regex: "\\bas\\b", - token: "keyword.cast.dart" - }, - { - regex: "\\?|:", - token: "keyword.control.ternary.dart" - }, - { - regex: "(?:\\b)(is\\!?)(?:\\b)", - token: ["keyword.operator.dart"] - }, - { - regex: "(<<|>>>?|~|\\^|\\||&)", - token: ["keyword.operator.bitwise.dart"] - }, - { - regex: "((?:&|\\^|\\||<<|>>>?)=)", - token: ["keyword.operator.assignment.bitwise.dart"] - }, - { - regex: "(===?|!==?|<=?|>=?)", - token: ["keyword.operator.comparison.dart"] - }, - { - regex: "((?:[+*/%-]|\\~)=)", - token: ["keyword.operator.assignment.arithmetic.dart"] - }, - { - regex: "=", - token: "keyword.operator.assignment.dart" - }, - { - token : "string", - regex : "'''", - next : "qdoc" - }, - { - token : "string", - regex : '"""', - next : "qqdoc" - }, - { - token : "string", - regex : "'", - next : "qstring" - }, - { - token : "string", - regex : '"', - next : "qqstring" - }, - { - regex: "(\\-\\-|\\+\\+)", - token: ["keyword.operator.increment-decrement.dart"] - }, - { - regex: "(\\-|\\+|\\*|\\/|\\~\\/|%)", - token: ["keyword.operator.arithmetic.dart"] - }, - { - regex: "(!|&&|\\|\\|)", - token: ["keyword.operator.logical.dart"] - }, - { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, - { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, - { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - "qdoc" : [ - { - token : "string", - regex : ".*?'''", - next : "start" - }, stringfill], - - "qqdoc" : [ - { - token : "string", - regex : '.*?"""', - next : "start" - }, stringfill], - - "qstring" : [ - { - token : "string", - regex : "[^\\\\']*(?:\\\\.[^\\\\']*)*'", - next : "start" - }, stringfill], - - "qqstring" : [ - { - token : "string", - regex : '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"', - next : "start" - }, stringfill] -} - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); -}; - -oop.inherits(DartHighlightRules, TextHighlightRules); - -exports.DartHighlightRules = DartHighlightRules; -}); - -define("ace/mode/dart",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/dart_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var CMode = require("./c_cpp").Mode; -var DartHighlightRules = require("./dart_highlight_rules").DartHighlightRules; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - CMode.call(this); - this.HighlightRules = DartHighlightRules; - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, CMode); - -(function() { - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$id = "ace/mode/dart"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(i,o),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,s=t.cFunctions="\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b",a=function(){var e="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",t="asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|class|wchar_t|template",n="const|extern|register|restrict|static|volatile|inline|private|protected|public|friend|explicit|virtual|export|mutable|typename|constexpr|new|delete",r="and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eqconst_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace",i="NULL|true|false|TRUE|FALSE",a=this.$keywords=this.createKeywordMapper({"keyword.control":e,"storage.type":t,"storage.modifier":n,"keyword.operator":r,"variable.language":"this","constant.language":i},"identifier");this.$rules={start:[{token:"comment",regex:"//",next:"singleLineComment"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b",next:"directive"},{token:"keyword",regex:"(?:#\\s*endif)\\b"},{token:"support.function.C99.c",regex:s},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],singleLineComment:[{token:"comment",regex:/\\$/,next:"singleLineComment"},{token:"comment",regex:/$/,next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{defaultToken:"string"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{defaultToken:"string"}],directive:[{token:"constant.other.multiline",regex:/\\/},{token:"constant.other.multiline",regex:/.*\\/},{token:"constant.other",regex:"\\s*<.+?>",next:"start"},{token:"constant.other",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(o,"doc-",[o.getEndRule("start")])};r.inherits(a,i),t.c_cppHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,s=e.findMatchingBracket({row:t,column:i});if(!s||s.row==t)return 0;var a=this.$getIndent(e.getLine(s.row));e.replace(new r(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],g={},u=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,g.rangeCount!=e.multiSelect.rangeCount&&(g={rangeCount:e.multiSelect.rangeCount})),g[t]?r=g[t]:void(r=g[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,i){var s=n.getCursorPosition(),l=o.doc.getLine(s.row);if("{"==i){u(n);var c=n.getSelectionRange(),g=o.doc.getTextRange(c);if(""!==g&&"{"!==g&&n.getWrapBehavioursEnabled())return{text:"{"+g+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(l[s.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){u(n);var f=l.substring(s.column,s.column+1);if("}"==f){var m=o.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(null!==m&&d.isAutoInsertedClosing(s,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){u(n);var h="";d.isMaybeInsertedClosing(s,l)&&(h=a.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var f=l.substring(s.column,s.column+1);if("}"===f){var p=o.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!p)return null;var x=this.$getIndent(o.getLine(p.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var k=x+o.getTabString();return{text:"\n"+k+"\n"+x+h,selection:[1,k.length,1,k.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var s=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==s){u(n);var a=o.doc.getLine(i.start.row),l=a.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){u(n);var i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"("+s+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){u(n);var a=n.getCursorPosition(),l=r.doc.getLine(a.row),c=l.substring(a.column,a.column+1);if(")"==c){var g=r.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==g&&d.isAutoInsertedClosing(a,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){u(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(")"==a)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){u(n);var i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"["+s+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){u(n);var a=n.getCursorPosition(),l=r.doc.getLine(a.row),c=l.substring(a.column,a.column+1);if("]"==c){var g=r.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==g&&d.isAutoInsertedClosing(a,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){u(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if("]"==a)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){u(n);var i=o,s=n.getSelectionRange(),a=r.doc.getTextRange(s);if(""!==a&&"'"!==a&&'"'!=a&&n.getWrapBehavioursEnabled())return{text:i+a+i,selection:!1};var l=n.getCursorPosition(),c=r.doc.getLine(l.row),g=c.substring(l.column-1,l.column),d=c.substring(l.column,l.column+1),f=r.getTokenAt(l.row,l.column),m=r.getTokenAt(l.row,l.column+1);if("\\"==g&&f&&/escape/.test(f.type))return null;var h,p=f&&/string/.test(f.type),x=!m||/string/.test(m.type);if(d==i)h=p!==x;else{if(p&&!x)return null;if(p&&x)return null;var k=r.$mode.tokenRe;k.lastIndex=0;var b=k.test(g);k.lastIndex=0;var w=k.test(g);if(b||w)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){u(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(a==i)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){var o=new s(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var i=o.match(this.foldingStartMarker);if(i){var s=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,s);var a=e.getCommentFoldRange(n,s+i[0].length,1);return a&&!a.isMultiLine()&&(r?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),i=t,s=n.length;t+=1;for(var a=t,l=e.getLength();++tc)break;var g=this.getFoldWidgetRange(e,"all",t);if(g){if(g.start.row<=i)break;if(g.isMultiLine())t=g.end.row;else if(r==c)break}a=t}}return new o(i,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++ns)return new o(s,r,g,t.length)}}.call(s.prototype)}),define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./c_cpp_highlight_rules").c_cppHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=(e("../range").Range,e("./behaviour/cstyle").CstyleBehaviour),l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new s,this.$behaviour=new a,this.foldingRules=new l};r.inherits(c,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens,s=o.state;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e){var a=t.match(/^.*[\{\(\[]\s*$/);a&&(r+=n)}else if("doc-start"==e){if("start"==s)return"";var a=t.match(/^\s*(\/?)\*/);a&&(a[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp"}.call(c.prototype),t.Mode=c}),define("ace/mode/dart_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="true|false|null",t="this|super",n="try|catch|finally|throw|rethrow|assert|break|case|continue|default|do|else|for|if|in|return|switch|while|new|deferred|async|await",r="abstract|class|extends|external|factory|implements|get|native|operator|set|typedef|with|enum",i="static|final|const",s="void|bool|num|int|double|dynamic|var|String",a=this.createKeywordMapper({"constant.language.dart":e,"variable.language.dart":t,"keyword.control.dart":n,"keyword.declaration.dart":r,"storage.modifier.dart":i,"storage.type.primitive.dart":s},"identifier"),l={token:"string",regex:".+"};this.$rules={start:[{token:"comment",regex:/\/\/.*$/},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:["meta.preprocessor.script.dart"],regex:"^(#!.*)$"},{token:"keyword.other.import.dart",regex:"(?:\\b)(?:library|import|export|part|of|show|hide)(?:\\b)"},{token:["keyword.other.import.dart","text"],regex:"(?:\\b)(prefix)(\\s*:)"},{regex:"\\bas\\b",token:"keyword.cast.dart"},{regex:"\\?|:",token:"keyword.control.ternary.dart"},{regex:"(?:\\b)(is\\!?)(?:\\b)",token:["keyword.operator.dart"]},{regex:"(<<|>>>?|~|\\^|\\||&)",token:["keyword.operator.bitwise.dart"]},{regex:"((?:&|\\^|\\||<<|>>>?)=)",token:["keyword.operator.assignment.bitwise.dart"]},{regex:"(===?|!==?|<=?|>=?)",token:["keyword.operator.comparison.dart"]},{regex:"((?:[+*/%-]|\\~)=)",token:["keyword.operator.assignment.arithmetic.dart"]},{regex:"=",token:"keyword.operator.assignment.dart"},{token:"string",regex:"'''",next:"qdoc"},{token:"string",regex:'"""',next:"qqdoc"},{token:"string",regex:"'",next:"qstring"},{token:"string",regex:'"',next:"qqstring"},{regex:"(\\-\\-|\\+\\+)",token:["keyword.operator.increment-decrement.dart"]},{regex:"(\\-|\\+|\\*|\\/|\\~\\/|%)",token:["keyword.operator.arithmetic.dart"]},{regex:"(!|&&|\\|\\|)",token:["keyword.operator.logical.dart"]},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],qdoc:[{token:"string",regex:".*?'''",next:"start"},l],qqdoc:[{token:"string",regex:'.*?"""',next:"start"},l],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",next:"start"},l],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',next:"start"},l]},this.embedRules(o,"doc-",[o.getEndRule("start")])};r.inherits(s,i),t.DartHighlightRules=s}),define("ace/mode/dart",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/dart_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./c_cpp").Mode,i=e("./dart_highlight_rules").DartHighlightRules,s=e("./folding/cstyle").FoldMode,a=function(){o.call(this),this.HighlightRules=i,this.foldingRules=new s};r.inherits(a,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/dart"}.call(a.prototype),t.Mode=a}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-diff.js b/www/js/vendor/ace/mode-diff.js index 00afaf06e..a98a75403 100755 --- a/www/js/vendor/ace/mode-diff.js +++ b/www/js/vendor/ace/mode-diff.js @@ -1,139 +1 @@ -define("ace/mode/diff_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DiffHighlightRules = function() { - - this.$rules = { - "start" : [{ - regex: "^(?:\\*{15}|={67}|-{3}|\\+{3})$", - token: "punctuation.definition.separator.diff", - "name": "keyword" - }, { //diff.range.unified - regex: "^(@@)(\\s*.+?\\s*)(@@)(.*)$", - token: [ - "constant", - "constant.numeric", - "constant", - "comment.doc.tag" - ] - }, { //diff.range.normal - regex: "^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$", - token: [ - "constant.numeric", - "punctuation.definition.range.diff", - "constant.function", - "constant.numeric", - "punctuation.definition.range.diff", - "invalid" - ], - "name": "meta." - }, { - regex: "^(\\-{3}|\\+{3}|\\*{3})( .+)$", - token: [ - "constant.numeric", - "meta.tag" - ] - }, { // added - regex: "^([!+>])(.*?)(\\s*)$", - token: [ - "support.constant", - "text", - "invalid" - ] - }, { // removed - regex: "^([<\\-])(.*?)(\\s*)$", - token: [ - "support.function", - "string", - "invalid" - ] - }, { - regex: "^(diff)(\\s+--\\w+)?(.+?)( .+)?$", - token: ["variable", "variable", "keyword", "variable"] - }, { - regex: "^Index.+$", - token: "variable" - }, { - regex: "^\\s+$", - token: "text" - }, { - regex: "\\s*$", - token: "invalid" - }, { - defaultToken: "invisible", - caseInsensitive: true - } - ] - }; -}; - -oop.inherits(DiffHighlightRules, TextHighlightRules); - -exports.DiffHighlightRules = DiffHighlightRules; -}); - -define("ace/mode/folding/diff",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function(levels, flag) { - this.regExpList = levels; - this.flag = flag; - this.foldingStartMarker = RegExp("^(" + levels.join("|") + ")", this.flag); -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - this.getFoldWidgetRange = function(session, foldStyle, row) { - var line = session.getLine(row); - var start = {row: row, column: line.length}; - - var regList = this.regExpList; - for (var i = 1; i <= regList.length; i++) { - var re = RegExp("^(" + regList.slice(0, i).join("|") + ")", this.flag); - if (re.test(line)) - break; - } - - for (var l = session.getLength(); ++row < l; ) { - line = session.getLine(row); - if (re.test(line)) - break; - } - if (row == start.row + 1) - return; - return Range.fromPoints(start, {row: row - 1, column: line.length}); - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/diff",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/diff_highlight_rules","ace/mode/folding/diff"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var HighlightRules = require("./diff_highlight_rules").DiffHighlightRules; -var FoldMode = require("./folding/diff").FoldMode; - -var Mode = function() { - this.HighlightRules = HighlightRules; - this.foldingRules = new FoldMode(["diff", "index", "\\+{3}", "@@|\\*{5}"], "i"); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.$id = "ace/mode/diff"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/diff_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,i,t){"use strict";var n=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{regex:"^(?:\\*{15}|={67}|-{3}|\\+{3})$",token:"punctuation.definition.separator.diff",name:"keyword"},{regex:"^(@@)(\\s*.+?\\s*)(@@)(.*)$",token:["constant","constant.numeric","constant","comment.doc.tag"]},{regex:"^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$",token:["constant.numeric","punctuation.definition.range.diff","constant.function","constant.numeric","punctuation.definition.range.diff","invalid"],name:"meta."},{regex:"^(\\-{3}|\\+{3}|\\*{3})( .+)$",token:["constant.numeric","meta.tag"]},{regex:"^([!+>])(.*?)(\\s*)$",token:["support.constant","text","invalid"]},{regex:"^([<\\-])(.*?)(\\s*)$",token:["support.function","string","invalid"]},{regex:"^(diff)(\\s+--\\w+)?(.+?)( .+)?$",token:["variable","variable","keyword","variable"]},{regex:"^Index.+$",token:"variable"},{regex:"^\\s+$",token:"text"},{regex:"\\s*$",token:"invalid"},{defaultToken:"invisible",caseInsensitive:!0}]}};n.inherits(r,o),i.DiffHighlightRules=r}),define("ace/mode/folding/diff",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,i,t){"use strict";var n=e("../../lib/oop"),o=e("./fold_mode").FoldMode,r=e("../../range").Range,a=i.FoldMode=function(e,i){this.regExpList=e,this.flag=i,this.foldingStartMarker=RegExp("^("+e.join("|")+")",this.flag)};n.inherits(a,o),function(){this.getFoldWidgetRange=function(e,i,t){for(var n=e.getLine(t),o={row:t,column:n.length},a=this.regExpList,d=1;d<=a.length;d++){var f=RegExp("^("+a.slice(0,d).join("|")+")",this.flag);if(f.test(n))break}for(var l=e.getLength();++t=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = CssHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.foldingRules = "cStyle"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("csslint", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/css"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === " -1; -} - -(function() { - - this.getFoldWidget = function(session, foldStyle, row) { - var tag = this._getFirstTagInLine(session, row); - - if (!tag) - return ""; - - if (tag.closing || (!tag.tagName && tag.selfClosing)) - return foldStyle == "markbeginend" ? "end" : ""; - - if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) - return ""; - - if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) - return ""; - - return "start"; - }; - this._getFirstTagInLine = function(session, row) { - var tokens = session.getTokens(row); - var tag = new Tag(); - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (is(token, "tag-open")) { - tag.end.column = tag.start.column + token.value.length; - tag.closing = is(token, "end-tag-open"); - token = tokens[++i]; - if (!token) - return null; - tag.tagName = token.value; - tag.end.column += token.value.length; - for (i++; i < tokens.length; i++) { - token = tokens[i]; - tag.end.column += token.value.length; - if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - break; - } - } - return tag; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - return tag; - } - tag.start.column += token.value.length; - } - - return null; - }; - - this._findEndTagInLine = function(session, row, tagName, startColumn) { - var tokens = session.getTokens(row); - var column = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - column += token.value.length; - if (column < startColumn) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var firstTag = this._getFirstTagInLine(session, row); - - if (!firstTag) - return null; - - var isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var MixedFoldMode = require("./mixed").FoldMode; -var XmlFoldMode = require("./xml").FoldMode; -var CStyleFoldMode = require("./cstyle").FoldMode; - -var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { - MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { - "js-": new CStyleFoldMode(), - "css-": new CStyleFoldMode() - }); -}; - -oop.inherits(FoldMode, MixedFoldMode); - -}); - -define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var TokenIterator = require("../token_iterator").TokenIterator; - -var commonAttributes = [ - "accesskey", - "class", - "contenteditable", - "contextmenu", - "dir", - "draggable", - "dropzone", - "hidden", - "id", - "inert", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "lang", - "spellcheck", - "style", - "tabindex", - "title", - "translate" -]; - -var eventAttributes = [ - "onabort", - "onblur", - "oncancel", - "oncanplay", - "oncanplaythrough", - "onchange", - "onclick", - "onclose", - "oncontextmenu", - "oncuechange", - "ondblclick", - "ondrag", - "ondragend", - "ondragenter", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onended", - "onerror", - "onfocus", - "oninput", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeyup", - "onload", - "onloadeddata", - "onloadedmetadata", - "onloadstart", - "onmousedown", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onpause", - "onplay", - "onplaying", - "onprogress", - "onratechange", - "onreset", - "onscroll", - "onseeked", - "onseeking", - "onselect", - "onshow", - "onstalled", - "onsubmit", - "onsuspend", - "ontimeupdate", - "onvolumechange", - "onwaiting" -]; - -var globalAttributes = commonAttributes.concat(eventAttributes); - -var attributeMap = { - "html": ["manifest"], - "head": [], - "title": [], - "base": ["href", "target"], - "link": ["href", "hreflang", "rel", "media", "type", "sizes"], - "meta": ["http-equiv", "name", "content", "charset"], - "style": ["type", "media", "scoped"], - "script": ["charset", "type", "src", "defer", "async"], - "noscript": ["href"], - "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], - "section": [], - "nav": [], - "article": ["pubdate"], - "aside": [], - "h1": [], - "h2": [], - "h3": [], - "h4": [], - "h5": [], - "h6": [], - "header": [], - "footer": [], - "address": [], - "main": [], - "p": [], - "hr": [], - "pre": [], - "blockquote": ["cite"], - "ol": ["start", "reversed"], - "ul": [], - "li": ["value"], - "dl": [], - "dt": [], - "dd": [], - "figure": [], - "figcaption": [], - "div": [], - "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], - "em": [], - "strong": [], - "small": [], - "s": [], - "cite": [], - "q": ["cite"], - "dfn": [], - "abbr": [], - "data": [], - "time": ["datetime"], - "code": [], - "var": [], - "samp": [], - "kbd": [], - "sub": [], - "sup": [], - "i": [], - "b": [], - "u": [], - "mark": [], - "ruby": [], - "rt": [], - "rp": [], - "bdi": [], - "bdo": [], - "span": [], - "br": [], - "wbr": [], - "ins": ["cite", "datetime"], - "del": ["cite", "datetime"], - "img": ["alt", "src", "height", "width", "usemap", "ismap"], - "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], - "embed": ["src", "height", "width", "type"], - "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], - "param": ["name", "value"], - "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], - "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], - "source": ["src", "type", "media"], - "track": ["kind", "src", "srclang", "label", "default"], - "canvas": ["width", "height"], - "map": ["name"], - "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], - "svg": [], - "math": [], - "table": ["summary"], - "caption": [], - "colgroup": ["span"], - "col": ["span"], - "tbody": [], - "thead": [], - "tfoot": [], - "tr": [], - "td": ["headers", "rowspan", "colspan"], - "th": ["headers", "rowspan", "colspan", "scope"], - "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], - "fieldset": ["disabled", "form", "name"], - "legend": [], - "label": ["form", "for"], - "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], - "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], - "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], - "datalist": [], - "optgroup": ["disabled", "label"], - "option": ["disabled", "selected", "label", "value"], - "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], - "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], - "output": ["for", "form", "name"], - "progress": ["value", "max"], - "meter": ["value", "min", "max", "low", "high", "optimum"], - "details": ["open"], - "summary": [], - "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], - "menu": ["type", "label"], - "dialog": ["open"] -}; - -var elements = Object.keys(attributeMap); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -function findTagName(session, pos) { - var iterator = new TokenIterator(session, pos.row, pos.column); - var token = iterator.getCurrentToken(); - while (token && !is(token, "tag-name")){ - token = iterator.stepBackward(); - } - if (token) - return token.value; -} - -var HtmlCompletions = function() { - -}; - -(function() { - - this.getCompletions = function(state, session, pos, prefix) { - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) - return this.getTagCompletions(state, session, pos, prefix); - if (is(token, "tag-whitespace") || is(token, "attribute-name")) - return this.getAttributeCompetions(state, session, pos, prefix); - - return []; - }; - - this.getTagCompletions = function(state, session, pos, prefix) { - return elements.map(function(element){ - return { - value: element, - meta: "tag", - score: Number.MAX_VALUE - }; - }); - }; - - this.getAttributeCompetions = function(state, session, pos, prefix) { - var tagName = findTagName(session, pos); - if (!tagName) - return []; - var attributes = globalAttributes; - if (tagName in attributeMap) { - attributes = attributes.concat(attributeMap[tagName]); - } - return attributes.map(function(attribute){ - return { - caption: attribute, - snippet: attribute + '="$0"', - meta: "attribute", - score: Number.MAX_VALUE - }; - }); - }; - -}).call(HtmlCompletions.prototype); - -exports.HtmlCompletions = HtmlCompletions; -}); - -define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var CssMode = require("./css").Mode; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; -var HtmlFoldMode = require("./folding/html").FoldMode; -var HtmlCompletions = require("./html_completions").HtmlCompletions; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; -var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; - -var Mode = function(options) { - this.fragmentContext = options && options.fragmentContext; - this.HighlightRules = HtmlHighlightRules; - this.$behaviour = new XmlBehaviour(); - this.$completer = new HtmlCompletions(); - - this.createModeDelegates({ - "js-": JavaScriptMode, - "css-": CssMode - }); - - this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.blockComment = {start: ""}; - - this.voidElements = lang.arrayToMap(voidElements); - - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - this.checkOutdent = function(state, line, input) { - return false; - }; - - this.getCompletions = function(state, session, pos, prefix) { - return this.$completer.getCompletions(state, session, pos, prefix); - }; - - this.createWorker = function(session) { - if (this.constructor != Mode) - return; - var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - if (this.fragmentContext) - worker.call("setOptions", [{context: this.fragmentContext}]); - - worker.on("error", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/html"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/django",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { - -var oop = require("../lib/oop"); -var HtmlMode = require("./html").Mode; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DjangoHighlightRules = function(){ - this.$rules = { - 'start': [{ - token: "string", - regex: '".*?"' - }, { - token: "string", - regex: "'.*?'" - }, { - token: "constant", - regex: '[0-9]+' - }, { - token: "variable", - regex: "[-_a-zA-Z0-9:]+" - }], - 'comment': [{ - token : "comment.block", - merge: true, - regex : ".+?" - }], - 'tag': [{ - token: "entity.name.function", - regex: "[a-zA-Z][_a-zA-Z0-9]*", - next: "start" - }] - }; -}; - -oop.inherits(DjangoHighlightRules, TextHighlightRules) - -var DjangoHtmlHighlightRules = function() { - this.$rules = new HtmlHighlightRules().getRules(); - - for (var i in this.$rules) { - this.$rules[i].unshift({ - token: "comment.line", - regex: "\\{#.*?#\\}" - }, { - token: "comment.block", - regex: "\\{\\%\\s*comment\\s*\\%\\}", - merge: true, - next: "django-comment" - }, { - token: "constant.language", - regex: "\\{\\{", - next: "django-start" - }, { - token: "constant.language", - regex: "\\{\\%", - next: "django-tag" - }); - this.embedRules(DjangoHighlightRules, "django-", [{ - token: "comment.block", - regex: "\\{\\%\\s*endcomment\\s*\\%\\}", - merge: true, - next: "start" - }, { - token: "constant.language", - regex: "\\%\\}", - next: "start" - }, { - token: "constant.language", - regex: "\\}\\}", - next: "start" - }]); - } -}; - -oop.inherits(DjangoHtmlHighlightRules, HtmlHighlightRules); - -var Mode = function() { - HtmlMode.call(this); - this.HighlightRules = DjangoHtmlHighlightRules; -}; -oop.inherits(Mode, HtmlMode); - -(function() { - this.$id = "ace/mode/django"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},a.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};o.inherits(a,r),a.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},a.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},a.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=a}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",o="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",a="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},r.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[r.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[r.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:a},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(r,"doc-",[r.getEndRule("no_regex")]),this.normalizeRules()};o.inherits(i,a),t.JavaScriptHighlightRules=i}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),r=n.match(/^(\s*\})/);if(!r)return 0;var a=r[1].length,i=e.findMatchingBracket({row:t,column:a});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new o(t,0,t,a-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var o,r=e("../../lib/oop"),a=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?o=c[t]:void(o=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,r,a){var i=n.getCursorPosition(),l=r.doc.getLine(i.row);if("{"==a){g(n);var u=n.getSelectionRange(),c=r.doc.getTextRange(u);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return{text:"{"+c+"}",selection:!1};if(d.isSaneInsertion(n,r))return/[\]\}\)]/.test(l[i.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if("}"==a){g(n);var m=l.substring(i.column,i.column+1);if("}"==m){var p=r.$findOpeningBracket("}",{column:i.column+1,row:i.row});if(null!==p&&d.isAutoInsertedClosing(i,l,a))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==a||"\r\n"==a){g(n);var h="";d.isMaybeInsertedClosing(i,l)&&(h=s.stringRepeat("}",o.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=l.substring(i.column,i.column+1);if("}"===m){var f=r.findMatchingBracket({row:i.row,column:i.column+1},"}");if(!f)return null;var x=this.$getIndent(r.getLine(f.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var b=x+r.getTabString();return{text:"\n"+b+"\n"+x+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,a){var i=r.doc.getTextRange(a);if(!a.isMultiLine()&&"{"==i){g(n);var s=r.doc.getLine(a.start.row),l=s.substring(a.end.column,a.end.column+1);if("}"==l)return a.end.column++,a;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,o,r){if("("==r){g(n);var a=n.getSelectionRange(),i=o.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"("+i+")",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,")"),{text:"()",selection:[1,1]}}else if(")"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=o.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&"("==a){g(n);var i=o.doc.getLine(r.start.row),s=i.substring(r.start.column+1,r.start.column+2);if(")"==s)return r.end.column++,r}}),this.add("brackets","insertion",function(e,t,n,o,r){if("["==r){g(n);var a=n.getSelectionRange(),i=o.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"["+i+"]",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=o.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&"["==a){g(n);var i=o.doc.getLine(r.start.row),s=i.substring(r.start.column+1,r.start.column+2);if("]"==s)return r.end.column++,r}}),this.add("string_dquotes","insertion",function(e,t,n,o,r){if('"'==r||"'"==r){g(n);var a=r,i=n.getSelectionRange(),s=o.doc.getTextRange(i);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:a+s+a,selection:!1};var l=n.getCursorPosition(),u=o.doc.getLine(l.row),c=u.substring(l.column-1,l.column),d=u.substring(l.column,l.column+1),m=o.getTokenAt(l.row,l.column),p=o.getTokenAt(l.row,l.column+1);if("\\"==c&&m&&/escape/.test(m.type))return null;var h,f=m&&/string/.test(m.type),x=!p||/string/.test(p.type);if(d==a)h=f!==x;else{if(f&&!x)return null;if(f&&x)return null;var b=o.$mode.tokenRe;b.lastIndex=0;var k=b.test(c);b.lastIndex=0;var v=b.test(c);if(k||v)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?a+a:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==a||"'"==a)){g(n);var i=o.doc.getLine(r.start.row),s=i.substring(r.start.column+1,r.start.column+2);if(s==a)return r.end.column++,r}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),o=new i(t,n.row,n.column);if(!this.$matchTokenType(o.getCurrentToken()||"text",l)){var r=new i(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return o.stepForward(),o.getCurrentTokenRow()!==n.row||this.$matchTokenType(o.getCurrentToken()||"text",u)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),a=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,a,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=r.row,o.autoInsertedLineEnd=n+a.substr(r.column),o.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),a=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,a)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=r.row,o.maybeInsertedLineStart=a.substr(0,r.column)+n,o.maybeInsertedLineEnd=a.substr(r.column),o.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return o.autoInsertedBrackets>0&&e.row===o.autoInsertedRow&&n===o.autoInsertedLineEnd[0]&&t.substr(e.column)===o.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return o.maybeInsertedBrackets>0&&e.row===o.maybeInsertedRow&&t.substr(e.column)===o.maybeInsertedLineEnd&&t.substr(0,e.column)==o.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},r.inherits(d,a),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../range").Range,a=e("./fold_mode").FoldMode,i=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(i,a),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(o)?"start":r},this.getFoldWidgetRange=function(e,t,n,o){var r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);var a=r.match(this.foldingStartMarker);if(a){var i=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,i);var s=e.getCommentFoldRange(n,i+a[0].length,1);return s&&!s.isMultiLine()&&(o?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var a=r.match(this.foldingStopMarker);if(a){var i=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,i):e.getCommentFoldRange(n,i,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),o=n.search(/\S/),a=t,i=n.length;t+=1;for(var s=t,l=e.getLength();++tu)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=a)break;if(c.isMultiLine())t=c.end.row;else if(o==u)break}s=t}}return new r(a,i,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),a=e.getLength(),i=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++ni)return new r(i,o,c,t.length)}}.call(i.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),a=r.tokens,i=r.state;if(a.length&&"comment"==a[a.length-1].type)return o;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(o+=n)}else if("doc-start"==e){if("start"==i||"no_regex"==i)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(o+=" "),o+="* ")}return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(c.prototype),t.Mode=c}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),a=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",i=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",u=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",m=function(){var e=this.createKeywordMapper({"support.function":i,"support.constant":s,"support.type":a,"support.constant.color":l,"support.constant.fonts":u},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};o.inherits(m,r),t.CssHighlightRules=m}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),a=e("../../token_iterator").TokenIterator,i=function(){this.inherit(r),this.add("colon","insertion",function(e,t,n,o,r){if(":"===r){var i=n.getCursorPosition(),s=new a(o,i.row,i.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var u=o.doc.getLine(i.row),c=u.substring(i.column,i.column+1); +if(":"===c)return{text:"",selection:[1,1]};if(!u.substring(i.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&":"===i){var s=n.getCursorPosition(),l=new a(o,s.row,s.column),u=l.getCurrentToken();if(u&&u.value.match(/\s+/)&&(u=l.stepBackward()),u&&"support.type"===u.type){var c=o.doc.getLine(r.start.row),g=c.substring(r.end.column,r.end.column+1);if(";"===g)return r.end.column++,r}}}),this.add("semicolon","insertion",function(e,t,n,o,r){if(";"===r){var a=n.getCursorPosition(),i=o.doc.getLine(a.row),s=i.substring(a.column,a.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};o.inherits(i,r),t.CssBehaviour=i}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,a=e("./css_highlight_rules").CssHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e).tokens;if(r.length&&"comment"==r[r.length-1].type)return o;var a=t.match(/^.*\{\s*$/);return a&&(o+=n),o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,a=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===a&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(r.prototype),o.inherits(a,r),t.XmlHighlightRules=a}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),a=e("./css_highlight_rules").CssHighlightRules,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=r.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),u=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(a,"css-","style"),this.embedTagRules(i,"js-","script"),this.constructor===u&&this.normalizeRules()};o.inherits(u,s),t.HtmlHighlightRules=u}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),a=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,s=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,r,a){if('"'==a||"'"==a){var s=a,l=r.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),g=c.substring(u.column,u.column+1),d=new i(r,u.row,u.column),m=d.getCurrentToken();if(g==s&&(o(m,"attribute-value")||o(m,"string")))return{text:"",selection:[1,1]};if(m||(m=d.stepBackward()),!m)return;for(;o(m,"tag-whitespace")||o(m,"whitespace");)m=d.stepBackward();var p=!g||g.match(/\s/);if(o(m,"attribute-equals")&&(p||">"==g)||o(m,"decl-attribute-equals")&&(p||"?"==g))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==a||"'"==a)){var i=o.doc.getLine(r.start.row),s=i.substring(r.start.column+1,r.start.column+2);if(s==a)return r.end.column++,r}}),this.add("autoclosing","insertion",function(e,t,n,r,a){if(">"==a){var s=n.getCursorPosition(),l=new i(r,s.row,s.column),u=l.getCurrentToken()||l.stepBackward();if(!u||!(o(u,"tag-name")||o(u,"tag-whitespace")||o(u,"attribute-name")||o(u,"attribute-equals")||o(u,"attribute-value")))return;if(o(u,"reference.attribute-value"))return;if(o(u,"attribute-value")){var c=u.value.charAt(0);if('"'==c||"'"==c){var g=u.value.charAt(u.value.length-1),d=l.getCurrentTokenColumn()+u.value.length;if(d>s.column||d==s.column&&c!=g)return}}for(;!o(u,"tag-name");)u=l.stepBackward();var m=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn();if(o(l.stepBackward(),"end-tag-open"))return;var h=u.value;if(m==s.row&&(h=h.substring(0,s.column-p)),this.voidElements.hasOwnProperty(h.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,o,r){if("\n"==r){var a=n.getCursorPosition(),s=o.getLine(a.row),l=new i(o,a.row,a.column),u=l.getCurrentToken();if(u&&u.type.indexOf("tag-close")!==-1){for(;u&&u.type.indexOf("tag-name")===-1;)u=l.stepBackward();if(!u)return;var c=u.value,g=l.getCurrentTokenRow();if(u=l.stepBackward(),!u||u.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]){var d=o.getTokenAt(a.row,a.column+1),s=o.getLine(g),m=this.$getIndent(s),p=m+o.getTabString();return d&&"-1}var r=e("../../lib/oop"),a=(e("../../lib/lang"),e("../../range").Range),i=e("./fold_mode").FoldMode,s=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(e,t){i.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(l,i);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var o=this._getFirstTagInLine(e,n);return o?o.closing||!o.tagName&&o.selfClosing?"markbeginend"==t?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,o.tagName,o.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new u,a=0;a"==i.value;break}return r}if(o(i,"tag-close"))return r.selfClosing="/>"==i.value,r;r.start.column+=i.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var a=e.getTokens(t),i=0,s=0;s"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(t&&n.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,n){var o=this._getFirstTagInLine(e,n);if(!o)return null;var r,i=o.closing||o.selfClosing,l=[];if(i)for(var u=new s(e,n,o.end.column),c={row:n,column:o.start.column};r=this._readTagBackward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,a.fromPoints(r.start,r.end)}if(r.closing)l.push(r);else if(this._pop(l,r),0==l.length)return r.start.column+=r.tagName.length+2,a.fromPoints(r.start,c)}else for(var u=new s(e,n,o.start.column),g={row:n,column:o.start.column+o.tagName.length+2};r=this._readTagForward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,a.fromPoints(r.start,r.end)}if(r.closing){if(this._pop(l,r),0==l.length)return a.fromPoints(g,r.start)}else l.push(r)}}}).call(l.prototype)}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./mixed").FoldMode,a=e("./xml").FoldMode,i=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){r.call(this,new a(e,t),{"js-":new i,"css-":new i})};o.inherits(s,r)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}function r(e,t){for(var n=new a(e,t.row,t.column),r=n.getCurrentToken();r&&!o(r,"tag-name");)r=n.stepBackward();if(r)return r.value}var a=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=i.concat(s),u={html:["manifest"],head:[],title:[],base:["href","target"],link:["href","hreflang","rel","media","type","sizes"],meta:["http-equiv","name","content","charset"],style:["type","media","scoped"],script:["charset","type","src","defer","async"],noscript:["href"],body:["onafterprint","onbeforeprint","onbeforeunload","onhashchange","onmessage","onoffline","onpopstate","onredo","onresize","onstorage","onundo","onunload"],section:[],nav:[],article:["pubdate"],aside:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],footer:[],address:[],main:[],p:[],hr:[],pre:[],blockquote:["cite"],ol:["start","reversed"],ul:[],li:["value"],dl:[],dt:[],dd:[],figure:[],figcaption:[],div:[],a:["href","target","ping","rel","media","hreflang","type"],em:[],strong:[],small:[],s:[],cite:[],q:["cite"],dfn:[],abbr:[],data:[],time:["datetime"],code:[],var:[],samp:[],kbd:[],sub:[],sup:[],i:[],b:[],u:[],mark:[],ruby:[],rt:[],rp:[],bdi:[],bdo:[],span:[],br:[],wbr:[],ins:["cite","datetime"],del:["cite","datetime"],img:["alt","src","height","width","usemap","ismap"],iframe:["name","src","height","width","sandbox","seamless"],embed:["src","height","width","type"],object:["param","data","type","height","width","usemap","name","form","classid"],param:["name","value"],video:["src","autobuffer","autoplay","loop","controls","width","height","poster"],audio:["src","autobuffer","autoplay","loop","controls"],source:["src","type","media"],track:["kind","src","srclang","label","default"],canvas:["width","height"],map:["name"],area:["shape","coords","href","hreflang","alt","target","media","rel","ping","type"],svg:[],math:[],table:["summary"],caption:[],colgroup:["span"],col:["span"],tbody:[],thead:[],tfoot:[],tr:[],td:["headers","rowspan","colspan"],th:["headers","rowspan","colspan","scope"],form:["accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],fieldset:["disabled","form","name"],legend:[],label:["form","for"],input:["type","accept","alt","autocomplete","checked","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","multiple","pattern","placeholder","readonly","required","size","src","step","width","files","value"],button:["autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","value","type"],select:["autofocus","disabled","form","multiple","name","size"],datalist:[],optgroup:["disabled","label"],option:["disabled","selected","label","value"],textarea:["autofocus","disabled","form","maxlength","name","placeholder","readonly","required","rows","cols","wrap"],keygen:["autofocus","challenge","disabled","form","keytype","name"],output:["for","form","name"],progress:["value","max"],meter:["value","min","max","low","high","optimum"],details:["open"],summary:[],command:["type","label","icon","disabled","checked","radiogroup","command"],menu:["type","label"],dialog:["open"]},c=Object.keys(u),g=function(){};(function(){this.getCompletions=function(e,t,n,r){var a=t.getTokenAt(n.row,n.column);return a?o(a,"tag-name")||o(a,"tag-open")||o(a,"end-tag-open")?this.getTagCompletions(e,t,n,r):o(a,"tag-whitespace")||o(a,"attribute-name")?this.getAttributeCompetions(e,t,n,r):[]:[]},this.getTagCompletions=function(e,t,n,o){return c.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompetions=function(e,t,n,o){var a=r(t,n);if(!a)return[];var i=l;return a in u&&(i=i.concat(u[a])),i.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})}}).call(g.prototype),t.HtmlCompletions=g}),define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),a=e("./text").Mode,i=e("./javascript").Mode,s=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,g=e("./html_completions").HtmlCompletions,d=e("../worker/worker_client").WorkerClient,m=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],p=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],h=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new u,this.$completer=new g,this.createModeDelegates({"js-":i,"css-":s}),this.foldingRules=new c(this.voidElements,r.arrayToMap(p))};o.inherits(h,a),function(){this.blockComment={start:""},this.voidElements=r.arrayToMap(m),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,o){return this.$completer.getCompletions(e,t,n,o)},this.createWorker=function(e){if(this.constructor==h){var t=new d(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(h.prototype),t.Mode=h}),define("ace/mode/django",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var o=e("../lib/oop"),r=e("./html").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant",regex:"[0-9]+"},{token:"variable",regex:"[-_a-zA-Z0-9:]+"}],comment:[{token:"comment.block",merge:!0,regex:".+?"}],tag:[{token:"entity.name.function",regex:"[a-zA-Z][_a-zA-Z0-9]*",next:"start"}]}};o.inherits(s,i);var l=function(){this.$rules=(new a).getRules();for(var e in this.$rules)this.$rules[e].unshift({token:"comment.line",regex:"\\{#.*?#\\}"},{token:"comment.block",regex:"\\{\\%\\s*comment\\s*\\%\\}",merge:!0,next:"django-comment"},{token:"constant.language",regex:"\\{\\{",next:"django-start"},{token:"constant.language",regex:"\\{\\%",next:"django-tag"}),this.embedRules(s,"django-",[{token:"comment.block",regex:"\\{\\%\\s*endcomment\\s*\\%\\}",merge:!0,next:"start"},{token:"constant.language",regex:"\\%\\}",next:"start"},{token:"constant.language",regex:"\\}\\}",next:"start"}])};o.inherits(l,a);var u=function(){r.call(this),this.HighlightRules=l};o.inherits(u,r),function(){this.$id="ace/mode/django"}.call(u.prototype),t.Mode=u}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-dockerfile.js b/www/js/vendor/ace/mode-dockerfile.js index 77e58defa..87d0c5dfe 100755 --- a/www/js/vendor/ace/mode-dockerfile.js +++ b/www/js/vendor/ace/mode-dockerfile.js @@ -1,803 +1 @@ -define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var reservedKeywords = exports.reservedKeywords = ( - '!|{|}|case|do|done|elif|else|'+ - 'esac|fi|for|if|in|then|until|while|'+ - '&|;|export|local|read|typeset|unset|'+ - 'elif|select|set' - ); - -var languageConstructs = exports.languageConstructs = ( - '[|]|alias|bg|bind|break|builtin|'+ - 'cd|command|compgen|complete|continue|'+ - 'dirs|disown|echo|enable|eval|exec|'+ - 'exit|fc|fg|getopts|hash|help|history|'+ - 'jobs|kill|let|logout|popd|printf|pushd|'+ - 'pwd|return|set|shift|shopt|source|'+ - 'suspend|test|times|trap|type|ulimit|'+ - 'umask|unalias|wait' -); - -var ShHighlightRules = function() { - var keywordMapper = this.createKeywordMapper({ - "keyword": reservedKeywords, - "support.function.builtin": languageConstructs, - "invalid.deprecated": "debugger" - }, "identifier"); - - var integer = "(?:(?:[1-9]\\d*)|(?:0))"; - - var fraction = "(?:\\.\\d+)"; - var intPart = "(?:\\d+)"; - var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; - var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")"; - var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; - var fileDescriptor = "(?:&" + intPart + ")"; - - var variableName = "[a-zA-Z_][a-zA-Z0-9_]*"; - var variable = "(?:(?:\\$" + variableName + ")|(?:" + variableName + "=))"; - - var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))"; - - var func = "(?:" + variableName + "\\s*\\(\\))"; - - this.$rules = { - "start" : [{ - token : "constant", - regex : /\\./ - }, { - token : ["text", "comment"], - regex : /(^|\s)(#.*)$/ - }, { - token : "string", - regex : '"', - push : [{ - token : "constant.language.escape", - regex : /\\(?:[$abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/ - }, { - token : "constant", - regex : /\$\w+/ - }, { - token : "string", - regex : '"', - next: "pop" - }, { - defaultToken: "string" - }] - }, { - regex : "<<<", - token : "keyword.operator" - }, { - stateName: "heredoc", - regex : "(<<)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)", - onMatch : function(value, currentState, stack) { - var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; - var tokens = value.split(this.splitRegex); - stack.push(next, tokens[4]); - return [ - {type:"constant", value: tokens[1]}, - {type:"text", value: tokens[2]}, - {type:"string", value: tokens[3]}, - {type:"support.class", value: tokens[4]}, - {type:"string", value: tokens[5]} - ]; - }, - rules: { - heredoc: [{ - onMatch: function(value, currentState, stack) { - if (value === stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack[0] || "start"; - return "support.class"; - } - this.next = ""; - return "string"; - }, - regex: ".*$", - next: "start" - }], - indentedHeredoc: [{ - token: "string", - regex: "^\t+" - }, { - onMatch: function(value, currentState, stack) { - if (value === stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack[0] || "start"; - return "support.class"; - } - this.next = ""; - return "string"; - }, - regex: ".*$", - next: "start" - }] - } - }, { - regex : "$", - token : "empty", - next : function(currentState, stack) { - if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") - return stack[0]; - return currentState; - } - }, { - token : "variable.language", - regex : builtinVariable - }, { - token : "variable", - regex : variable - }, { - token : "support.function", - regex : func - }, { - token : "support.function", - regex : fileDescriptor - }, { - token : "string", // ' string - start : "'", end : "'" - }, { - token : "constant.numeric", // float - regex : floatNumber - }, { - token : "constant.numeric", // integer - regex : integer + "\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b" - }, { - token : "keyword.operator", - regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=" - }, { - token : "paren.lparen", - regex : "[\\[\\(\\{]" - }, { - token : "paren.rparen", - regex : "[\\]\\)\\}]" - } ] - }; - - this.normalizeRules(); -}; - -oop.inherits(ShHighlightRules, TextHighlightRules); - -exports.ShHighlightRules = ShHighlightRules; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules; -var Range = require("../range").Range; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; - -var Mode = function() { - this.HighlightRules = ShHighlightRules; - this.foldingRules = new CStyleFoldMode(); - this.$behaviour = new CstyleBehaviour(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - - this.lineCommentStart = "#"; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[\:]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - var outdents = { - "pass": 1, - "return": 1, - "raise": 1, - "break": 1, - "continue": 1 - }; - - this.checkOutdent = function(state, line, input) { - if (input !== "\r\n" && input !== "\r" && input !== "\n") - return false; - - var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; - - if (!tokens) - return false; - do { - var last = tokens.pop(); - } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); - - if (!last) - return false; - - return (last.type == "keyword" && outdents[last.value]); - }; - - this.autoOutdent = function(state, doc, row) { - - row += 1; - var indent = this.$getIndent(doc.getLine(row)); - var tab = doc.getTabString(); - if (indent.slice(-tab.length) == tab) - doc.remove(new Range(row, indent.length-tab.length, row, indent.length)); - }; - - this.$id = "ace/mode/sh"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/dockerfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/sh_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules; - -var DockerfileHighlightRules = function() { - ShHighlightRules.call(this); - - var startRules = this.$rules.start; - for (var i = 0; i < startRules.length; i++) { - if (startRules[i].token == "variable.language") { - startRules.splice(i, 0, { - token: "constant.language", - regex: "(?:^(?:FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD|COPY)\\b)", - caseInsensitive: true - }); - break; - } - } - -}; - -oop.inherits(DockerfileHighlightRules, ShHighlightRules); - -exports.DockerfileHighlightRules = DockerfileHighlightRules; -}); - -define("ace/mode/dockerfile",["require","exports","module","ace/lib/oop","ace/mode/sh","ace/mode/dockerfile_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var ShMode = require("./sh").Mode; -var DockerfileHighlightRules = require("./dockerfile_highlight_rules").DockerfileHighlightRules; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - ShMode.call(this); - - this.HighlightRules = DockerfileHighlightRules; - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, ShMode); - -(function() { - this.$id = "ace/mode/dockerfile"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=t.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set",s=t.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",a=function(){var e=this.createKeywordMapper({keyword:o,"support.function.builtin":s,"invalid.deprecated":"debugger"},"identifier"),t="(?:(?:[1-9]\\d*)|(?:0))",n="(?:\\.\\d+)",r="(?:\\d+)",i="(?:(?:"+r+"?"+n+")|(?:"+r+"\\.))",a="(?:(?:"+i+"|"+r+"))",l="(?:"+a+"|"+i+")",u="(?:&"+r+")",c="[a-zA-Z_][a-zA-Z0-9_]*",g="(?:(?:\\$"+c+")|(?:"+c+"=))",d="(?:\\$(?:SHLVL|\\$|\\!|\\?))",h="(?:"+c+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"constant",regex:/\$\w+/},{token:"string",regex:'"',next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(e,t,n){var r="-"==e[2]?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[4]),[{type:"constant",value:i[1]},{type:"text",value:i[2]},{type:"string",value:i[3]},{type:"support.class",value:i[4]},{type:"string",value:i[5]}]},rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^\t+"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return"heredoc"===t[0]||"indentedHeredoc"===t[0]?t[0]:e}},{token:"variable.language",regex:d},{token:"variable",regex:g},{token:"support.function",regex:h},{token:"support.function",regex:u},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:l},{token:"constant.numeric",regex:t+"\\b"},{token:e,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"}]},this.normalizeRules()};r.inherits(a,i),t.ShHighlightRules=a}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,o),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var o=i.match(this.foldingStartMarker);if(o){var s=o.index;if(o[1])return this.openingBracketBlock(e,o[1],n,s);var a=e.getCommentFoldRange(n,s+o[0].length,1);return a&&!a.isMultiLine()&&(r?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t){var o=i.match(this.foldingStopMarker);if(o){var s=o.index+o[0].length;return o[1]?this.closingBracketBlock(e,o[1],n,s):e.getCommentFoldRange(n,s,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),o=t,s=n.length;t+=1;for(var a=t,l=e.getLength();++tu)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=o)break;if(c.isMultiLine())t=c.end.row;else if(r==u)break}a=t}}return new i(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++ns)return new i(s,r,c,t.length)}}.call(s.prototype)}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,i=e("../../lib/oop"),o=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?r=c[t]:void(r=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,i,o){var s=n.getCursorPosition(),l=i.doc.getLine(s.row);if("{"==o){g(n);var u=n.getSelectionRange(),c=i.doc.getTextRange(u);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return{text:"{"+c+"}",selection:!1};if(d.isSaneInsertion(n,i))return/[\]\}\)]/.test(l[s.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,i,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,i,"{"),{text:"{",selection:[1,1]})}else if("}"==o){g(n);var h=l.substring(s.column,s.column+1);if("}"==h){var f=i.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(null!==f&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==o||"\r\n"==o){g(n);var m="";d.isMaybeInsertedClosing(s,l)&&(m=a.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var h=l.substring(s.column,s.column+1);if("}"===h){var p=i.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!p)return null;var k=this.$getIndent(i.getLine(p.row))}else{if(!m)return void d.clearMaybeInsertedClosing();var k=this.$getIndent(l)}var b=k+i.getTabString();return{text:"\n"+b+"\n"+k+m,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,i,o){var s=i.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){g(n);var a=i.doc.getLine(o.start.row),l=a.substring(o.end.column,o.end.column+1);if("}"==l)return o.end.column++,o;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,i){if("("==i){g(n);var o=n.getSelectionRange(),s=r.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"("+s+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==i){g(n);var a=n.getCursorPosition(),l=r.doc.getLine(a.row),u=l.substring(a.column,a.column+1);if(")"==u){var c=r.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==c&&d.isAutoInsertedClosing(a,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"("==o){g(n);var s=r.doc.getLine(i.start.row),a=s.substring(i.start.column+1,i.start.column+2);if(")"==a)return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if("["==i){g(n);var o=n.getSelectionRange(),s=r.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"["+s+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==i){g(n);var a=n.getCursorPosition(),l=r.doc.getLine(a.row),u=l.substring(a.column,a.column+1);if("]"==u){var c=r.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==c&&d.isAutoInsertedClosing(a,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"["==o){g(n);var s=r.doc.getLine(i.start.row),a=s.substring(i.start.column+1,i.start.column+2);if("]"==a)return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){if('"'==i||"'"==i){g(n);var o=i,s=n.getSelectionRange(),a=r.doc.getTextRange(s);if(""!==a&&"'"!==a&&'"'!=a&&n.getWrapBehavioursEnabled())return{text:o+a+o,selection:!1};var l=n.getCursorPosition(),u=r.doc.getLine(l.row),c=u.substring(l.column-1,l.column),d=u.substring(l.column,l.column+1),h=r.getTokenAt(l.row,l.column),f=r.getTokenAt(l.row,l.column+1);if("\\"==c&&h&&/escape/.test(h.type))return null;var m,p=h&&/string/.test(h.type),k=!f||/string/.test(f.type);if(d==o)m=p!==k;else{if(p&&!k)return null;if(p&&k)return null;var b=r.$mode.tokenRe;b.lastIndex=0;var v=b.test(c);b.lastIndex=0;var x=b.test(c);if(v||x)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;m=!0}return{text:m?o+o:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&('"'==o||"'"==o)){g(n);var s=r.doc.getLine(i.start.row),a=s.substring(i.start.column+1,i.start.column+2);if(a==o)return i.end.column++,i}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",u)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isAutoInsertedClosing(i,o,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=i.row,r.autoInsertedLineEnd=n+o.substr(i.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isMaybeInsertedClosing(i,o)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=i.row,r.maybeInsertedLineStart=o.substr(0,i.column)+n,r.maybeInsertedLineEnd=o.substr(i.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},i.inherits(d,o),t.CstyleBehaviour=d}),define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,o=e("./sh_highlight_rules").ShHighlightRules,s=e("../range").Range,a=e("./folding/cstyle").FoldMode,l=e("./behaviour/cstyle").CstyleBehaviour,u=function(){this.HighlightRules=o,this.foldingRules=new a,this.$behaviour=new l};r.inherits(u,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),o=i.tokens;if(o.length&&"comment"==o[o.length-1].type)return r;if("start"==e){var s=t.match(/^.*[\{\(\[\:]\s*$/);s&&(r+=n)}return r};var e={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(t,n,r){if("\r\n"!==r&&"\r"!==r&&"\n"!==r)return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var o=i.pop();while(o&&("comment"==o.type||"text"==o.type&&o.value.match(/^\s+$/)));return!!o&&"keyword"==o.type&&e[o.value]},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new s(n,r.length-i.length,n,r.length))},this.$id="ace/mode/sh"}.call(u.prototype),t.Mode=u}),define("ace/mode/dockerfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/sh_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./sh_highlight_rules").ShHighlightRules,o=function(){i.call(this);for(var e=this.$rules.start,t=0;t/ - }, { - token : "punctuation.operator", - regex : /,|;/ - }, { - token : "paren.lparen", - regex : /[\[{]/ - }, { - token : "paren.rparen", - regex : /[\]}]/ - }, { - token: "comment", - regex: /^#!.*$/ - }, { - token: function(value) { - if (keywords.hasOwnProperty(value.toLowerCase())) { - return "keyword"; - } - else if (attributes.hasOwnProperty(value.toLowerCase())) { - return "variable"; - } - else { - return "text"; - } - }, - regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - merge : true, - next : "start" - }, { - token : "comment", // comment spanning whole line - merge : true, - regex : ".+" - } - ], - "qqstring" : [ - { - token : "string", - regex : '[^"\\\\]+', - merge : true - }, { - token : "string", - regex : "\\\\$", - next : "qqstring", - merge : true - }, { - token : "string", - regex : '"|$', - next : "start", - merge : true - } - ], - "qstring" : [ - { - token : "string", - regex : "[^'\\\\]+", - merge : true - }, { - token : "string", - regex : "\\\\$", - next : "qstring", - merge : true - }, { - token : "string", - regex : "'|$", - next : "start", - merge : true - } - ] - }; -}; - -oop.inherits(DotHighlightRules, TextHighlightRules); - -exports.DotHighlightRules = DotHighlightRules; - -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/dot",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matching_brace_outdent","ace/mode/dot_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var DotHighlightRules = require("./dot_highlight_rules").DotHighlightRules; -var DotFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = DotHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.foldingRules = new DotFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = ["//", "#"]; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/dot"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var o=i[1].length,a=e.findMatchingBracket({row:t,column:o});if(!a||a.row==t)return 0;var l=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,o-1),l)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},o.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(o,i),o.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},o.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},o.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=o}),define("ace/mode/dot_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/doc_comment_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),o=e("./text_highlight_rules").TextHighlightRules,a=(e("./doc_comment_highlight_rules").DocCommentHighlightRules,function(){var e=i.arrayToMap("strict|node|edge|graph|digraph|subgraph".split("|")),t=i.arrayToMap("damping|k|url|area|arrowhead|arrowsize|arrowtail|aspect|bb|bgcolor|center|charset|clusterrank|color|colorscheme|comment|compound|concentrate|constraint|decorate|defaultdist|dim|dimen|dir|diredgeconstraints|distortion|dpi|edgeurl|edgehref|edgetarget|edgetooltip|epsilon|esep|fillcolor|fixedsize|fontcolor|fontname|fontnames|fontpath|fontsize|forcelabels|gradientangle|group|headurl|head_lp|headclip|headhref|headlabel|headport|headtarget|headtooltip|height|href|id|image|imagepath|imagescale|label|labelurl|label_scheme|labelangle|labeldistance|labelfloat|labelfontcolor|labelfontname|labelfontsize|labelhref|labeljust|labelloc|labeltarget|labeltooltip|landscape|layer|layerlistsep|layers|layerselect|layersep|layout|len|levels|levelsgap|lhead|lheight|lp|ltail|lwidth|margin|maxiter|mclimit|mindist|minlen|mode|model|mosek|nodesep|nojustify|normalize|nslimit|nslimit1|ordering|orientation|outputorder|overlap|overlap_scaling|pack|packmode|pad|page|pagedir|pencolor|penwidth|peripheries|pin|pos|quadtree|quantum|rank|rankdir|ranksep|ratio|rects|regular|remincross|repulsiveforce|resolution|root|rotate|rotation|samehead|sametail|samplepoints|scale|searchsize|sep|shape|shapefile|showboxes|sides|size|skew|smoothing|sortv|splines|start|style|stylesheet|tailurl|tail_lp|tailclip|tailhref|taillabel|tailport|tailtarget|tailtooltip|target|tooltip|truecolor|vertices|viewport|voro_margin|weight|width|xlabel|xlp|z".split("|"));this.$rules={start:[{token:"comment",regex:/\/\/.*$/},{token:"comment",regex:/#.*$/},{token:"comment",merge:!0,regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/[+\-]?\d+(?:(?:\.\d*)?(?:[eE][+\-]?\d+)?)?\b/},{token:"keyword.operator",regex:/\+|=|\->/},{token:"punctuation.operator",regex:/,|;/},{token:"paren.lparen",regex:/[\[{]/},{token:"paren.rparen",regex:/[\]}]/},{token:"comment",regex:/^#!.*$/},{token:function(n){return e.hasOwnProperty(n.toLowerCase())?"keyword":t.hasOwnProperty(n.toLowerCase())?"variable":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}],qstring:[{token:"string",regex:"[^'\\\\]+",merge:!0},{token:"string",regex:"\\\\$",next:"qstring",merge:!0},{token:"string",regex:"'|$",next:"start",merge:!0}]}});r.inherits(a,o),t.DotHighlightRules=a}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,o),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var o=i.match(this.foldingStartMarker);if(o){var a=o.index;if(o[1])return this.openingBracketBlock(e,o[1],n,a);var l=e.getCommentFoldRange(n,a+o[0].length,1);return l&&!l.isMultiLine()&&(r?l=this.getSectionRange(e,n):"all"!=t&&(l=null)),l}if("markbegin"!==t){var o=i.match(this.foldingStopMarker);if(o){var a=o.index+o[0].length;return o[1]?this.closingBracketBlock(e,o[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),o=t,a=n.length;t+=1;for(var l=t,s=e.getLength();++tg)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=o)break;if(c.isMultiLine())t=c.end.row;else if(r==g)break}l=t}}return new i(o,a,l,e.getLine(l).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),o=e.getLength(),a=n,l=/^\s*(?:\/\*|\/\/)#(end)?region\b/,s=1;++na)return new i(a,r,c,t.length)}}.call(a.prototype)}),define("ace/mode/dot",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matching_brace_outdent","ace/mode/dot_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,o=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./dot_highlight_rules").DotHighlightRules,l=e("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=a,this.$outdent=new o,this.foldingRules=new l};r.inherits(s,i),function(){this.lineCommentStart=["//","#"],this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),o=i.tokens;if(i.state,o.length&&"comment"==o[o.length-1].type)return r;if("start"==e){var a=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);a&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/dot"}.call(s.prototype),t.Mode=s}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-eiffel.js b/www/js/vendor/ace/mode-eiffel.js index 2c89395bd..b0c3ba8fc 100755 --- a/www/js/vendor/ace/mode-eiffel.js +++ b/www/js/vendor/ace/mode-eiffel.js @@ -1,128 +1 @@ -define("ace/mode/eiffel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var EiffelHighlightRules = function() { - var keywords = "across|agent|alias|all|attached|as|assign|attribute|check|" + - "class|convert|create|debug|deferred|detachable|do|else|elseif|end|" + - "ensure|expanded|export|external|feature|from|frozen|if|inherit|" + - "inspect|invariant|like|local|loop|not|note|obsolete|old|once|" + - "Precursor|redefine|rename|require|rescue|retry|select|separate|" + - "some|then|undefine|until|variant|when"; - - var operatorKeywords = "and|implies|or|xor"; - - var languageConstants = "Void"; - - var booleanConstants = "True|False"; - - var languageVariables = "Current|Result"; - - var keywordMapper = this.createKeywordMapper({ - "constant.language": languageConstants, - "constant.language.boolean": booleanConstants, - "variable.language": languageVariables, - "keyword.operator": operatorKeywords, - "keyword": keywords - }, "identifier", true); - - var simpleString = /(?:[^"%\b\f\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)+?/; - - this.$rules = { - "start": [{ - token : "string.quoted.other", // Aligned-verbatim-strings (verbatim option not supported) - regex : /"\[/, - next: "aligned_verbatim_string" - }, { - token : "string.quoted.other", // Non-aligned-verbatim-strings (verbatim option not supported) - regex : /"\{/, - next: "non-aligned_verbatim_string" - }, { - token : "string.quoted.double", - regex : /"(?:[^%\b\f\n\r\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)*?"/ - }, { - token : "comment.line.double-dash", - regex : /--.*/ - }, { - token : "constant.character", - regex : /'(?:[^%\b\f\n\r\t\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)'/ - }, { - token : "constant.numeric", // hexa | octal | bin - regex : /\b0(?:[xX][\da-fA-F](?:_*[\da-fA-F])*|[cC][0-7](?:_*[0-7])*|[bB][01](?:_*[01])*)\b/ - }, { - token : "constant.numeric", - regex : /(?:\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?[eE][+-]?)?\d(?:_*\d)*|\d(?:_*\d)*\.?/ - }, { - token : "paren.lparen", - regex : /[\[({]|<<|\|\(/ - }, { - token : "paren.rparen", - regex : /[\])}]|>>|\|\)/ - }, { - token : "keyword.operator", // punctuation - regex : /:=|->|\.(?=\w)|[;,:?]/ - }, { - token : "keyword.operator", - regex : /\\\\|\|\.\.\||\.\.|\/[~\/]?|[><\/]=?|[-+*^=~]/ - }, { - token : function (v) { - var result = keywordMapper (v); - if (result === "identifier" && v === v.toUpperCase ()) { - result = "entity.name.type"; - } - return result; - }, - regex : /[a-zA-Z][a-zA-Z\d_]*\b/ - }, { - token : "text", - regex : /\s+/ - } - ], - "aligned_verbatim_string" : [{ - token : "string", - regex : /]"/, - next : "start" - }, { - token : "string", - regex : simpleString - } - ], - "non-aligned_verbatim_string" : [{ - token : "string.quoted.other", - regex : /}"/, - next : "start" - }, { - token : "string.quoted.other", - regex : simpleString - } - ]}; -}; - -oop.inherits(EiffelHighlightRules, TextHighlightRules); - -exports.EiffelHighlightRules = EiffelHighlightRules; -}); - -define("ace/mode/eiffel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/eiffel_highlight_rules","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var EiffelHighlightRules = require("./eiffel_highlight_rules").EiffelHighlightRules; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = EiffelHighlightRules; -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "--"; - this.$id = "ace/mode/eiffel"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/eiffel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="across|agent|alias|all|attached|as|assign|attribute|check|class|convert|create|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|Precursor|redefine|rename|require|rescue|retry|select|separate|some|then|undefine|until|variant|when",t="and|implies|or|xor",r="Void",n="True|False",i="Current|Result",o=this.createKeywordMapper({"constant.language":r,"constant.language.boolean":n,"variable.language":i,"keyword.operator":t,keyword:e},"identifier",!0),a=/(?:[^"%\b\f\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)+?/;this.$rules={start:[{token:"string.quoted.other",regex:/"\[/,next:"aligned_verbatim_string"},{token:"string.quoted.other",regex:/"\{/,next:"non-aligned_verbatim_string"},{token:"string.quoted.double",regex:/"(?:[^%\b\f\n\r\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)*?"/},{token:"comment.line.double-dash",regex:/--.*/},{token:"constant.character",regex:/'(?:[^%\b\f\n\r\t\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)'/},{token:"constant.numeric",regex:/\b0(?:[xX][\da-fA-F](?:_*[\da-fA-F])*|[cC][0-7](?:_*[0-7])*|[bB][01](?:_*[01])*)\b/},{token:"constant.numeric",regex:/(?:\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?[eE][+-]?)?\d(?:_*\d)*|\d(?:_*\d)*\.?/},{token:"paren.lparen",regex:/[\[({]|<<|\|\(/},{token:"paren.rparen",regex:/[\])}]|>>|\|\)/},{token:"keyword.operator",regex:/:=|->|\.(?=\w)|[;,:?]/},{token:"keyword.operator",regex:/\\\\|\|\.\.\||\.\.|\/[~\/]?|[><\/]=?|[-+*^=~]/},{token:function(e){var t=o(e);return"identifier"===t&&e===e.toUpperCase()&&(t="entity.name.type"),t},regex:/[a-zA-Z][a-zA-Z\d_]*\b/},{token:"text",regex:/\s+/}],aligned_verbatim_string:[{token:"string",regex:/]"/,next:"start"},{token:"string",regex:a}],"non-aligned_verbatim_string":[{token:"string.quoted.other",regex:/}"/,next:"start"},{token:"string.quoted.other",regex:a}]}};n.inherits(o,i),t.EiffelHighlightRules=o}),define("ace/mode/eiffel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/eiffel_highlight_rules","ace/range"],function(e,t,r){"use strict";var n=e("../lib/oop"),i=e("./text").Mode,o=e("./eiffel_highlight_rules").EiffelHighlightRules,a=(e("../range").Range,function(){this.HighlightRules=o});n.inherits(a,i),function(){this.lineCommentStart="--",this.$id="ace/mode/eiffel"}.call(a.prototype),t.Mode=a}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-ejs.js b/www/js/vendor/ace/mode-ejs.js index 9134209f1..85e495ec5 100755 --- a/www/js/vendor/ace/mode-ejs.js +++ b/www/js/vendor/ace/mode-ejs.js @@ -1,2950 +1,3 @@ -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = CssHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.foldingRules = "cStyle"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("csslint", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/css"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === " -1; -} - -(function() { - - this.getFoldWidget = function(session, foldStyle, row) { - var tag = this._getFirstTagInLine(session, row); - - if (!tag) - return ""; - - if (tag.closing || (!tag.tagName && tag.selfClosing)) - return foldStyle == "markbeginend" ? "end" : ""; - - if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) - return ""; - - if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) - return ""; - - return "start"; - }; - this._getFirstTagInLine = function(session, row) { - var tokens = session.getTokens(row); - var tag = new Tag(); - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (is(token, "tag-open")) { - tag.end.column = tag.start.column + token.value.length; - tag.closing = is(token, "end-tag-open"); - token = tokens[++i]; - if (!token) - return null; - tag.tagName = token.value; - tag.end.column += token.value.length; - for (i++; i < tokens.length; i++) { - token = tokens[i]; - tag.end.column += token.value.length; - if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - break; - } - } - return tag; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - return tag; - } - tag.start.column += token.value.length; - } - - return null; - }; - - this._findEndTagInLine = function(session, row, tagName, startColumn) { - var tokens = session.getTokens(row); - var column = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - column += token.value.length; - if (column < startColumn) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var firstTag = this._getFirstTagInLine(session, row); - - if (!firstTag) - return null; - - var isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var MixedFoldMode = require("./mixed").FoldMode; -var XmlFoldMode = require("./xml").FoldMode; -var CStyleFoldMode = require("./cstyle").FoldMode; - -var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { - MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { - "js-": new CStyleFoldMode(), - "css-": new CStyleFoldMode() - }); -}; - -oop.inherits(FoldMode, MixedFoldMode); - -}); - -define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var TokenIterator = require("../token_iterator").TokenIterator; - -var commonAttributes = [ - "accesskey", - "class", - "contenteditable", - "contextmenu", - "dir", - "draggable", - "dropzone", - "hidden", - "id", - "inert", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "lang", - "spellcheck", - "style", - "tabindex", - "title", - "translate" -]; - -var eventAttributes = [ - "onabort", - "onblur", - "oncancel", - "oncanplay", - "oncanplaythrough", - "onchange", - "onclick", - "onclose", - "oncontextmenu", - "oncuechange", - "ondblclick", - "ondrag", - "ondragend", - "ondragenter", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onended", - "onerror", - "onfocus", - "oninput", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeyup", - "onload", - "onloadeddata", - "onloadedmetadata", - "onloadstart", - "onmousedown", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onpause", - "onplay", - "onplaying", - "onprogress", - "onratechange", - "onreset", - "onscroll", - "onseeked", - "onseeking", - "onselect", - "onshow", - "onstalled", - "onsubmit", - "onsuspend", - "ontimeupdate", - "onvolumechange", - "onwaiting" -]; - -var globalAttributes = commonAttributes.concat(eventAttributes); - -var attributeMap = { - "html": ["manifest"], - "head": [], - "title": [], - "base": ["href", "target"], - "link": ["href", "hreflang", "rel", "media", "type", "sizes"], - "meta": ["http-equiv", "name", "content", "charset"], - "style": ["type", "media", "scoped"], - "script": ["charset", "type", "src", "defer", "async"], - "noscript": ["href"], - "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], - "section": [], - "nav": [], - "article": ["pubdate"], - "aside": [], - "h1": [], - "h2": [], - "h3": [], - "h4": [], - "h5": [], - "h6": [], - "header": [], - "footer": [], - "address": [], - "main": [], - "p": [], - "hr": [], - "pre": [], - "blockquote": ["cite"], - "ol": ["start", "reversed"], - "ul": [], - "li": ["value"], - "dl": [], - "dt": [], - "dd": [], - "figure": [], - "figcaption": [], - "div": [], - "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], - "em": [], - "strong": [], - "small": [], - "s": [], - "cite": [], - "q": ["cite"], - "dfn": [], - "abbr": [], - "data": [], - "time": ["datetime"], - "code": [], - "var": [], - "samp": [], - "kbd": [], - "sub": [], - "sup": [], - "i": [], - "b": [], - "u": [], - "mark": [], - "ruby": [], - "rt": [], - "rp": [], - "bdi": [], - "bdo": [], - "span": [], - "br": [], - "wbr": [], - "ins": ["cite", "datetime"], - "del": ["cite", "datetime"], - "img": ["alt", "src", "height", "width", "usemap", "ismap"], - "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], - "embed": ["src", "height", "width", "type"], - "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], - "param": ["name", "value"], - "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], - "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], - "source": ["src", "type", "media"], - "track": ["kind", "src", "srclang", "label", "default"], - "canvas": ["width", "height"], - "map": ["name"], - "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], - "svg": [], - "math": [], - "table": ["summary"], - "caption": [], - "colgroup": ["span"], - "col": ["span"], - "tbody": [], - "thead": [], - "tfoot": [], - "tr": [], - "td": ["headers", "rowspan", "colspan"], - "th": ["headers", "rowspan", "colspan", "scope"], - "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], - "fieldset": ["disabled", "form", "name"], - "legend": [], - "label": ["form", "for"], - "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], - "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], - "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], - "datalist": [], - "optgroup": ["disabled", "label"], - "option": ["disabled", "selected", "label", "value"], - "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], - "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], - "output": ["for", "form", "name"], - "progress": ["value", "max"], - "meter": ["value", "min", "max", "low", "high", "optimum"], - "details": ["open"], - "summary": [], - "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], - "menu": ["type", "label"], - "dialog": ["open"] -}; - -var elements = Object.keys(attributeMap); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -function findTagName(session, pos) { - var iterator = new TokenIterator(session, pos.row, pos.column); - var token = iterator.getCurrentToken(); - while (token && !is(token, "tag-name")){ - token = iterator.stepBackward(); - } - if (token) - return token.value; -} - -var HtmlCompletions = function() { - -}; - -(function() { - - this.getCompletions = function(state, session, pos, prefix) { - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) - return this.getTagCompletions(state, session, pos, prefix); - if (is(token, "tag-whitespace") || is(token, "attribute-name")) - return this.getAttributeCompetions(state, session, pos, prefix); - - return []; - }; - - this.getTagCompletions = function(state, session, pos, prefix) { - return elements.map(function(element){ - return { - value: element, - meta: "tag", - score: Number.MAX_VALUE - }; - }); - }; - - this.getAttributeCompetions = function(state, session, pos, prefix) { - var tagName = findTagName(session, pos); - if (!tagName) - return []; - var attributes = globalAttributes; - if (tagName in attributeMap) { - attributes = attributes.concat(attributeMap[tagName]); - } - return attributes.map(function(attribute){ - return { - caption: attribute, - snippet: attribute + '="$0"', - meta: "attribute", - score: Number.MAX_VALUE - }; - }); - }; - -}).call(HtmlCompletions.prototype); - -exports.HtmlCompletions = HtmlCompletions; -}); - -define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var CssMode = require("./css").Mode; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; -var HtmlFoldMode = require("./folding/html").FoldMode; -var HtmlCompletions = require("./html_completions").HtmlCompletions; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; -var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; - -var Mode = function(options) { - this.fragmentContext = options && options.fragmentContext; - this.HighlightRules = HtmlHighlightRules; - this.$behaviour = new XmlBehaviour(); - this.$completer = new HtmlCompletions(); - - this.createModeDelegates({ - "js-": JavaScriptMode, - "css-": CssMode - }); - - this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.blockComment = {start: ""}; - - this.voidElements = lang.arrayToMap(voidElements); - - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - this.checkOutdent = function(state, line, input) { - return false; - }; - - this.getCompletions = function(state, session, pos, prefix) { - return this.$completer.getCompletions(state, session, pos, prefix); - }; - - this.createWorker = function(session) { - if (this.constructor != Mode) - return; - var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - if (this.fragmentContext) - worker.call("setOptions", [{context: this.fragmentContext}]); - - worker.on("error", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/html"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var constantOtherSymbol = exports.constantOtherSymbol = { - token : "constant.other.symbol.ruby", // symbol - regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" -}; - -var qString = exports.qString = { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" -}; - -var qqString = exports.qqString = { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' -}; - -var tString = exports.tString = { - token : "string", // backtick string - regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]" -}; - -var constantNumericHex = exports.constantNumericHex = { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b" -}; - -var constantNumericFloat = exports.constantNumericFloat = { - token : "constant.numeric", // float - regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b" -}; - -var RubyHighlightRules = function() { - - var builtinFunctions = ( - "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" + - "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" + - "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" + - "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" + - "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" + - "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" + - "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" + - "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" + - "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" + - "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" + - "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" + - "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" + - "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" + - "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" + - "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" + - "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" + - "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" + - "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" + - "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" + - "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" + - "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" + - "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" + - "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" + - "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" + - "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" + - "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" + - "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" + - "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" + - "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" + - "has_many|has_one|belongs_to|has_and_belongs_to_many" - ); - - var keywords = ( - "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" + - "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" + - "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield" - ); - - var buildinConstants = ( - "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" + - "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING" - ); - - var builtinVariables = ( - "\$DEBUG|\$defout|\$FILENAME|\$LOAD_PATH|\$SAFE|\$stdin|\$stdout|\$stderr|\$VERBOSE|" + - "$!|root_url|flash|session|cookies|params|request|response|logger|self" - ); - - var keywordMapper = this.$keywords = this.createKeywordMapper({ - "keyword": keywords, - "constant.language": buildinConstants, - "variable.language": builtinVariables, - "support.function": builtinFunctions, - "invalid.deprecated": "debugger" // TODO is this a remnant from js mode? - }, "identifier"); - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "#.*$" - }, { - token : "comment", // multi line comment - regex : "^=begin(?:$|\\s.*$)", - next : "comment" - }, { - token : "string.regexp", - regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" - }, - - [{ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren.lparen"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.start", - regex : /"/, - push : [{ - token : "constant.language.escape", - regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/ - }, { - token : "paren.start", - regex : /\#{/, - push : "start" - }, { - token : "string.end", - regex : /"/, - next : "pop" - }, { - defaultToken: "string" - }] - }, { - token : "string.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/ - }, { - token : "paren.start", - regex : /\#{/, - push : "start" - }, { - token : "string.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string" - }] - }, { - token : "string.start", - regex : /'/, - push : [{ - token : "constant.language.escape", - regex : /\\['\\]/ - }, { - token : "string.end", - regex : /'/, - next : "pop" - }, { - defaultToken: "string" - }] - }], - - { - token : "text", // namespaces aren't symbols - regex : "::" - }, { - token : "variable.instance", // instance variable - regex : "@{1,2}[a-zA-Z_\\d]+" - }, { - token : "support.class", // class name - regex : "[A-Z][a-zA-Z_\\d]+" - }, - - constantOtherSymbol, - constantNumericHex, - constantNumericFloat, - - { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "punctuation.separator.key-value", - regex : "=>" - }, { - stateName: "heredoc", - onMatch : function(value, currentState, stack) { - var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; - var tokens = value.split(this.splitRegex); - stack.push(next, tokens[3]); - return [ - {type:"constant", value: tokens[1]}, - {type:"string", value: tokens[2]}, - {type:"support.class", value: tokens[3]}, - {type:"string", value: tokens[4]} - ]; - }, - regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)", - rules: { - heredoc: [{ - onMatch: function(value, currentState, stack) { - if (value === stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack[0] || "start"; - return "support.class"; - } - this.next = ""; - return "string"; - }, - regex: ".*$", - next: "start" - }], - indentedHeredoc: [{ - token: "string", - regex: "^ +" - }, { - onMatch: function(value, currentState, stack) { - if (value === stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack[0] || "start"; - return "support.class"; - } - this.next = ""; - return "string"; - }, - regex: ".*$", - next: "start" - }] - } - }, { - regex : "$", - token : "empty", - next : function(currentState, stack) { - if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") - return stack[0]; - return currentState; - } - }, { - token : "keyword.operator", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : "^=end(?:$|\\s.*$)", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ] - }; - - this.normalizeRules(); -}; - -oop.inherits(RubyHighlightRules, TextHighlightRules); - -exports.RubyHighlightRules = RubyHighlightRules; -}); - -define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/coffee"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var FoldMode = require("./folding/coffee").FoldMode; - -var Mode = function() { - this.HighlightRules = RubyHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - - this.lineCommentStart = "#"; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/); - var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/); - var startingConditional = line.match(/^\s*(if|else)\s*/) - if (match || startingClassOrMethod || startingDoBlock || startingConditional) { - indent += tab; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return /^\s+(end|else)$/.test(line + input) || this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, session, row) { - var line = session.getLine(row); - if (/}/.test(line)) - return this.$outdent.autoOutdent(session, row); - var indent = this.$getIndent(line); - var prevLine = session.getLine(row - 1); - var prevIndent = this.$getIndent(prevLine); - var tab = session.getTabString(); - if (prevIndent.length <= indent.length) { - if (indent.slice(-tab.length) == tab) - session.remove(new Range(row, indent.length-tab.length, row, indent.length)); - } - }; - - this.$id = "ace/mode/ruby"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/ejs",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/javascript_highlight_rules","ace/lib/oop","ace/mode/html","ace/mode/javascript","ace/mode/css","ace/mode/ruby"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; - -var EjsHighlightRules = function(start, end) { - HtmlHighlightRules.call(this); - - if (!start) - start = "(?:<%|<\\?|{{)"; - if (!end) - end = "(?:%>|\\?>|}})"; - - for (var i in this.$rules) { - this.$rules[i].unshift({ - token : "markup.list.meta.tag", - regex : start + "(?![>}])[-=]?", - push : "ejs-start" - }); - } - - this.embedRules(JavaScriptHighlightRules, "ejs-"); - - this.$rules["ejs-start"].unshift({ - token : "markup.list.meta.tag", - regex : "-?" + end, - next : "pop" - }, { - token: "comment", - regex: "//.*?" + end, - next: "pop" - }); - - this.$rules["ejs-no_regex"].unshift({ - token : "markup.list.meta.tag", - regex : "-?" + end, - next : "pop" - }, { - token: "comment", - regex: "//.*?" + end, - next: "pop" - }); - - this.normalizeRules(); -}; - - -oop.inherits(EjsHighlightRules, HtmlHighlightRules); - -exports.EjsHighlightRules = EjsHighlightRules; - - -var oop = require("../lib/oop"); -var HtmlMode = require("./html").Mode; -var JavaScriptMode = require("./javascript").Mode; -var CssMode = require("./css").Mode; -var RubyMode = require("./ruby").Mode; - -var Mode = function() { - HtmlMode.call(this); - this.HighlightRules = EjsHighlightRules; - this.createModeDelegates({ - "js-": JavaScriptMode, - "css-": CssMode, - "ejs-": JavaScriptMode - }); -}; -oop.inherits(Mode, HtmlMode); - -(function() { - - this.$id = "ace/mode/ejs"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),a=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",i=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",c=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",u=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",m=function(){var e=this.createKeywordMapper({"support.function":i,"support.constant":s,"support.type":a,"support.constant.color":l,"support.constant.fonts":c},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+u+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};r.inherits(m,o),t.CssHighlightRules=m}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},a.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(a,o),a.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},a.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},a.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=a}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",a="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+r+")(\\.)(prototype)(\\.)("+r+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:r},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:a},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(i,a),t.JavaScriptHighlightRules=i}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===a&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(o.prototype),r.inherits(a,o),t.XmlHighlightRules=a}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/lang"),a=e("./css_highlight_rules").CssHighlightRules,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=o.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),c=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(a,"css-","style"),this.embedTagRules(i,"js-","script"),this.constructor===c&&this.normalizeRules()};r.inherits(c,s),t.HtmlHighlightRules=c}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var a=o[1].length,i=e.findMatchingBracket({row:t,column:a});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new r(t,0,t,a-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),a=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],u={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?r=u[t]:void(r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,a){var i=n.getCursorPosition(),l=o.doc.getLine(i.row);if("{"==a){g(n);var c=n.getSelectionRange(),u=o.doc.getTextRange(c);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(l[i.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==a){g(n);var m=l.substring(i.column,i.column+1);if("}"==m){var p=o.$findOpeningBracket("}",{column:i.column+1,row:i.row});if(null!==p&&d.isAutoInsertedClosing(i,l,a))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==a||"\r\n"==a){g(n);var h="";d.isMaybeInsertedClosing(i,l)&&(h=s.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=l.substring(i.column,i.column+1);if("}"===m){var f=o.findMatchingBracket({row:i.row,column:i.column+1},"}");if(!f)return null;var x=this.$getIndent(o.getLine(f.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var b=x+o.getTabString();return{text:"\n"+b+"\n"+x+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,a){var i=o.doc.getTextRange(a);if(!a.isMultiLine()&&"{"==i){g(n);var s=o.doc.getLine(a.start.row),l=s.substring(a.end.column,a.end.column+1);if("}"==l)return a.end.column++,a;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var a=n.getSelectionRange(),i=r.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"("+i+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if(")"==c){var u=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==a){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var a=n.getSelectionRange(),i=r.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"["+i+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if("]"==c){var u=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==a){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var a=o,i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:a+s+a,selection:!1};var l=n.getCursorPosition(),c=r.doc.getLine(l.row),u=c.substring(l.column-1,l.column),d=c.substring(l.column,l.column+1),m=r.getTokenAt(l.row,l.column),p=r.getTokenAt(l.row,l.column+1);if("\\"==u&&m&&/escape/.test(m.type))return null;var h,f=m&&/string/.test(m.type),x=!p||/string/.test(p.type);if(d==a)h=f!==x;else{if(f&&!x)return null;if(f&&x)return null;var b=r.$mode.tokenRe;b.lastIndex=0;var k=b.test(u);b.lastIndex=0;var _=b.test(u);if(k||_)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?a+a:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==a||"'"==a)){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(s==a)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new i(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){ +var o=new i(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),a=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,a,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+a.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),a=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,a)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=a.substr(0,o.column)+n,r.maybeInsertedLineEnd=a.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,a),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,a=e("./fold_mode").FoldMode,i=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(i,a),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var a=o.match(this.foldingStartMarker);if(a){var i=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,i);var s=e.getCommentFoldRange(n,i+a[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var a=o.match(this.foldingStopMarker);if(a){var i=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,i):e.getCommentFoldRange(n,i,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),a=t,i=n.length;t+=1;for(var s=t,l=e.getLength();++tc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=a)break;if(u.isMultiLine())t=u.end.row;else if(r==c)break}s=t}}return new o(a,i,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),a=e.getLength(),i=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++ni)return new o(i,r,u,t.length)}}.call(i.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new l,this.foldingRules=new c};r.inherits(u,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),a=o.tokens,i=o.state;if(a.length&&"comment"==a[a.length-1].type)return r;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(r+=n)}else if("doc-start"==e){if("start"==i||"no_regex"==i)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(u.prototype),t.Mode=u}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),a=e("../../token_iterator").TokenIterator,i=function(){this.inherit(o),this.add("colon","insertion",function(e,t,n,r,o){if(":"===o){var i=n.getCursorPosition(),s=new a(r,i.row,i.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var c=r.doc.getLine(i.row),u=c.substring(i.column,i.column+1);if(":"===u)return{text:"",selection:[1,1]};if(!c.substring(i.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&":"===i){var s=n.getCursorPosition(),l=new a(r,s.row,s.column),c=l.getCurrentToken();if(c&&c.value.match(/\s+/)&&(c=l.stepBackward()),c&&"support.type"===c.type){var u=r.doc.getLine(o.start.row),g=u.substring(o.end.column,o.end.column+1);if(";"===g)return o.end.column++,o}}}),this.add("semicolon","insertion",function(e,t,n,r,o){if(";"===o){var a=n.getCursorPosition(),i=r.doc.getLine(a.row),s=i.substring(a.column,a.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};r.inherits(i,o),t.CssBehaviour=i}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,a=e("./css_highlight_rules").CssHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/css").CssBehaviour,c=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new l,this.foldingRules=new c};r.inherits(u,o),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e).tokens;if(o.length&&"comment"==o[o.length-1].type)return r;var a=t.match(/^.*\{\s*$/);return a&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(u.prototype),t.Mode=u}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function r(e,t){return e.type.lastIndexOf(t+".xml")>-1}var o=e("../../lib/oop"),a=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,s=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,o,a){if('"'==a||"'"==a){var s=a,l=o.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var c=n.getCursorPosition(),u=o.doc.getLine(c.row),g=u.substring(c.column,c.column+1),d=new i(o,c.row,c.column),m=d.getCurrentToken();if(g==s&&(r(m,"attribute-value")||r(m,"string")))return{text:"",selection:[1,1]};if(m||(m=d.stepBackward()),!m)return;for(;r(m,"tag-whitespace")||r(m,"whitespace");)m=d.stepBackward();var p=!g||g.match(/\s/);if(r(m,"attribute-equals")&&(p||">"==g)||r(m,"decl-attribute-equals")&&(p||"?"==g))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==a||"'"==a)){var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(s==a)return o.end.column++,o}}),this.add("autoclosing","insertion",function(e,t,n,o,a){if(">"==a){var s=n.getCursorPosition(),l=new i(o,s.row,s.column),c=l.getCurrentToken()||l.stepBackward();if(!c||!(r(c,"tag-name")||r(c,"tag-whitespace")||r(c,"attribute-name")||r(c,"attribute-equals")||r(c,"attribute-value")))return;if(r(c,"reference.attribute-value"))return;if(r(c,"attribute-value")){var u=c.value.charAt(0);if('"'==u||"'"==u){var g=c.value.charAt(c.value.length-1),d=l.getCurrentTokenColumn()+c.value.length;if(d>s.column||d==s.column&&u!=g)return}}for(;!r(c,"tag-name");)c=l.stepBackward();var m=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn();if(r(l.stepBackward(),"end-tag-open"))return;var h=c.value;if(m==s.row&&(h=h.substring(0,s.column-p)),this.voidElements.hasOwnProperty(h.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,o){if("\n"==o){var a=n.getCursorPosition(),s=r.getLine(a.row),l=new i(r,a.row,a.column),c=l.getCurrentToken();if(c&&c.type.indexOf("tag-close")!==-1){for(;c&&c.type.indexOf("tag-name")===-1;)c=l.stepBackward();if(!c)return;var u=c.value,g=l.getCurrentTokenRow();if(c=l.stepBackward(),!c||c.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[u]){var d=r.getTokenAt(a.row,a.column+1),s=r.getLine(g),m=this.$getIndent(s),p=m+r.getTabString();return d&&"-1}var o=e("../../lib/oop"),a=(e("../../lib/lang"),e("../../range").Range),i=e("./fold_mode").FoldMode,s=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(e,t){i.call(this),this.voidElements=e||{},this.optionalEndTags=o.mixin({},this.voidElements),t&&o.mixin(this.optionalEndTags,t)};o.inherits(l,i);var c=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?"markbeginend"==t?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),o=new c,a=0;a"==i.value;break}return o}if(r(i,"tag-close"))return o.selfClosing="/>"==i.value,o;o.start.column+=i.value.length}return null},this._findEndTagInLine=function(e,t,n,o){for(var a=e.getTokens(t),i=0,s=0;s"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(t&&n.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,n){var r=this._getFirstTagInLine(e,n);if(!r)return null;var o,i=r.closing||r.selfClosing,l=[];if(i)for(var c=new s(e,n,r.end.column),u={row:n,column:r.start.column};o=this._readTagBackward(c);){if(o.selfClosing){if(l.length)continue;return o.start.column+=o.tagName.length+2,o.end.column-=2,a.fromPoints(o.start,o.end)}if(o.closing)l.push(o);else if(this._pop(l,o),0==l.length)return o.start.column+=o.tagName.length+2,a.fromPoints(o.start,u)}else for(var c=new s(e,n,r.start.column),g={row:n,column:r.start.column+r.tagName.length+2};o=this._readTagForward(c);){if(o.selfClosing){if(l.length)continue;return o.start.column+=o.tagName.length+2,o.end.column-=2,a.fromPoints(o.start,o.end)}if(o.closing){if(this._pop(l,o),0==l.length)return a.fromPoints(g,o.start)}else l.push(o)}}}).call(l.prototype)}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("./mixed").FoldMode,a=e("./xml").FoldMode,i=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){o.call(this,new a(e,t),{"js-":new i,"css-":new i})};r.inherits(s,o)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function r(e,t){return e.type.lastIndexOf(t+".xml")>-1}function o(e,t){for(var n=new a(e,t.row,t.column),o=n.getCurrentToken();o&&!r(o,"tag-name");)o=n.stepBackward();if(o)return o.value}var a=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=i.concat(s),c={html:["manifest"],head:[],title:[],base:["href","target"],link:["href","hreflang","rel","media","type","sizes"],meta:["http-equiv","name","content","charset"],style:["type","media","scoped"],script:["charset","type","src","defer","async"],noscript:["href"],body:["onafterprint","onbeforeprint","onbeforeunload","onhashchange","onmessage","onoffline","onpopstate","onredo","onresize","onstorage","onundo","onunload"],section:[],nav:[],article:["pubdate"],aside:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],footer:[],address:[],main:[],p:[],hr:[],pre:[],blockquote:["cite"],ol:["start","reversed"],ul:[],li:["value"],dl:[],dt:[],dd:[],figure:[],figcaption:[],div:[],a:["href","target","ping","rel","media","hreflang","type"],em:[],strong:[],small:[],s:[],cite:[],q:["cite"],dfn:[],abbr:[],data:[],time:["datetime"],code:[],var:[],samp:[],kbd:[],sub:[],sup:[],i:[],b:[],u:[],mark:[],ruby:[],rt:[],rp:[],bdi:[],bdo:[],span:[],br:[],wbr:[],ins:["cite","datetime"],del:["cite","datetime"],img:["alt","src","height","width","usemap","ismap"],iframe:["name","src","height","width","sandbox","seamless"],embed:["src","height","width","type"],object:["param","data","type","height","width","usemap","name","form","classid"],param:["name","value"],video:["src","autobuffer","autoplay","loop","controls","width","height","poster"],audio:["src","autobuffer","autoplay","loop","controls"],source:["src","type","media"],track:["kind","src","srclang","label","default"],canvas:["width","height"],map:["name"],area:["shape","coords","href","hreflang","alt","target","media","rel","ping","type"],svg:[],math:[],table:["summary"],caption:[],colgroup:["span"],col:["span"],tbody:[],thead:[],tfoot:[],tr:[],td:["headers","rowspan","colspan"],th:["headers","rowspan","colspan","scope"],form:["accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],fieldset:["disabled","form","name"],legend:[],label:["form","for"],input:["type","accept","alt","autocomplete","checked","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","multiple","pattern","placeholder","readonly","required","size","src","step","width","files","value"],button:["autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","value","type"],select:["autofocus","disabled","form","multiple","name","size"],datalist:[],optgroup:["disabled","label"],option:["disabled","selected","label","value"],textarea:["autofocus","disabled","form","maxlength","name","placeholder","readonly","required","rows","cols","wrap"],keygen:["autofocus","challenge","disabled","form","keytype","name"],output:["for","form","name"],progress:["value","max"],meter:["value","min","max","low","high","optimum"],details:["open"],summary:[],command:["type","label","icon","disabled","checked","radiogroup","command"],menu:["type","label"],dialog:["open"]},u=Object.keys(c),g=function(){};(function(){this.getCompletions=function(e,t,n,o){var a=t.getTokenAt(n.row,n.column);return a?r(a,"tag-name")||r(a,"tag-open")||r(a,"end-tag-open")?this.getTagCompletions(e,t,n,o):r(a,"tag-whitespace")||r(a,"attribute-name")?this.getAttributeCompetions(e,t,n,o):[]:[]},this.getTagCompletions=function(e,t,n,r){return u.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompetions=function(e,t,n,r){var a=o(t,n);if(!a)return[];var i=l;return a in c&&(i=i.concat(c[a])),i.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})}}).call(g.prototype),t.HtmlCompletions=g}),define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/lang"),a=e("./text").Mode,i=e("./javascript").Mode,s=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,c=e("./behaviour/xml").XmlBehaviour,u=e("./folding/html").FoldMode,g=e("./html_completions").HtmlCompletions,d=e("../worker/worker_client").WorkerClient,m=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],p=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],h=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new c,this.$completer=new g,this.createModeDelegates({"js-":i,"css-":s}),this.foldingRules=new u(this.voidElements,o.arrayToMap(p))};r.inherits(h,a),function(){this.blockComment={start:""},this.voidElements=o.arrayToMap(m),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor==h){var t=new d(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(h.prototype),t.Mode=h}),define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=t.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"},i=(t.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},t.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},t.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"},t.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"}),s=t.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"},l=function(){var e="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many",t="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield",n="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING",r="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",o=this.$keywords=this.createKeywordMapper({keyword:t,"constant.language":n,"variable.language":r,"support.function":e,"invalid.deprecated":"debugger"},"identifier");this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment",regex:"^=begin(?:$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},[{regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren.lparen"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.start",regex:/"/,push:[{token:"constant.language.escape",regex:/\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/},{token:"paren.start",regex:/\#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:/\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/},{token:"paren.start",regex:/\#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/'/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]}],{token:"text",regex:"::"},{token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]+"},a,i,s,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(e,t,n){var r="-"==e[2]?"indentedHeredoc":"heredoc",o=e.split(this.splitRegex);return n.push(r,o[3]),[{type:"constant",value:o[1]},{type:"string",value:o[2]},{type:"support.class",value:o[3]},{type:"string",value:o[4]}]},regex:"(<<-?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return"heredoc"===t[0]||"indentedHeredoc"===t[0]?t[0]:e}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"^=end(?:$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}]},this.normalizeRules()};r.inherits(l,o),t.RubyHighlightRules=l}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("./fold_mode").FoldMode,a=e("../../range").Range,i=t.FoldMode=function(){};r.inherits(i,o),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var o=/\S/,i=e.getLine(n),s=i.search(o);if(s!=-1&&"#"==i[s]){for(var l=i.length,c=e.getLength(),u=n,g=n;++nu){var m=e.getLine(g).length;return new a(u,l,g,m)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),o=r.search(/\S/),a=e.getLine(n+1),i=e.getLine(n-1),s=i.search(/\S/),l=a.search(/\S/);if(o==-1)return e.foldWidgets[n-1]=s!=-1&&s|\\?>|}})");for(var n in this.$rules)this.$rules[n].unshift({ +token:"markup.list.meta.tag",regex:e+"(?![>}])[-=]?",push:"ejs-start"});this.embedRules(a,"ejs-"),this.$rules["ejs-start"].unshift({token:"markup.list.meta.tag",regex:"-?"+t,next:"pop"},{token:"comment",regex:"//.*?"+t,next:"pop"}),this.$rules["ejs-no_regex"].unshift({token:"markup.list.meta.tag",regex:"-?"+t,next:"pop"},{token:"comment",regex:"//.*?"+t,next:"pop"}),this.normalizeRules()};r.inherits(i,o),t.EjsHighlightRules=i;var r=e("../lib/oop"),s=e("./html").Mode,l=e("./javascript").Mode,c=e("./css").Mode,u=(e("./ruby").Mode,function(){s.call(this),this.HighlightRules=i,this.createModeDelegates({"js-":l,"css-":c,"ejs-":l})});r.inherits(u,s),function(){this.$id="ace/mode/ejs"}.call(u.prototype),t.Mode=u}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-elixir.js b/www/js/vendor/ace/mode-elixir.js index 3cad82ac5..b6302a0b4 100755 --- a/www/js/vendor/ace/mode-elixir.js +++ b/www/js/vendor/ace/mode-elixir.js @@ -1,493 +1 @@ -define("ace/mode/elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var ElixirHighlightRules = function() { - - this.$rules = { start: - [ { token: - [ 'meta.module.elixir', - 'keyword.control.module.elixir', - 'meta.module.elixir', - 'entity.name.type.module.elixir' ], - regex: '^(\\s*)(defmodule)(\\s+)((?:[A-Z]\\w*\\s*\\.\\s*)*[A-Z]\\w*)' }, - { token: 'comment.documentation.heredoc', - regex: '@(?:module|type)?doc (?:~[a-z])?"""', - push: - [ { token: 'comment.documentation.heredoc', - regex: '\\s*"""', - next: 'pop' }, - { include: '#interpolated_elixir' }, - { include: '#escaped_char' }, - { defaultToken: 'comment.documentation.heredoc' } ], - comment: '@doc with heredocs is treated as documentation' }, - { token: 'comment.documentation.heredoc', - regex: '@(?:module|type)?doc ~[A-Z]"""', - push: - [ { token: 'comment.documentation.heredoc', - regex: '\\s*"""', - next: 'pop' }, - { defaultToken: 'comment.documentation.heredoc' } ], - comment: '@doc with heredocs is treated as documentation' }, - { token: 'comment.documentation.heredoc', - regex: '@(?:module|type)?doc (?:~[a-z])?\'\'\'', - push: - [ { token: 'comment.documentation.heredoc', - regex: '\\s*\'\'\'', - next: 'pop' }, - { include: '#interpolated_elixir' }, - { include: '#escaped_char' }, - { defaultToken: 'comment.documentation.heredoc' } ], - comment: '@doc with heredocs is treated as documentation' }, - { token: 'comment.documentation.heredoc', - regex: '@(?:module|type)?doc ~[A-Z]\'\'\'', - push: - [ { token: 'comment.documentation.heredoc', - regex: '\\s*\'\'\'', - next: 'pop' }, - { defaultToken: 'comment.documentation.heredoc' } ], - comment: '@doc with heredocs is treated as documentation' }, - { token: 'comment.documentation.false', - regex: '@(?:module|type)?doc false', - comment: '@doc false is treated as documentation' }, - { token: 'comment.documentation.string', - regex: '@(?:module|type)?doc "', - push: - [ { token: 'comment.documentation.string', - regex: '"', - next: 'pop' }, - { include: '#interpolated_elixir' }, - { include: '#escaped_char' }, - { defaultToken: 'comment.documentation.string' } ], - comment: '@doc with string is treated as documentation' }, - { token: 'keyword.control.elixir', - regex: '\\b(?:do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defdelegate|defcallback|defmacrocallback|defexception|defoverridable|exit|after|rescue|catch|else|raise|throw|import|require|alias|use|quote|unquote|super)\\b(?![?!])', - TODO: 'FIXME: regexp doesn\'t have js equivalent', - originalRegex: '(?_?\\h)*|\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?|0b[01]+|0o[0-7]+)\\b' }, - { token: 'punctuation.definition.constant.elixir', - regex: ':\'', - push: - [ { token: 'punctuation.definition.constant.elixir', - regex: '\'', - next: 'pop' }, - { include: '#interpolated_elixir' }, - { include: '#escaped_char' }, - { defaultToken: 'constant.other.symbol.single-quoted.elixir' } ] }, - { token: 'punctuation.definition.constant.elixir', - regex: ':"', - push: - [ { token: 'punctuation.definition.constant.elixir', - regex: '"', - next: 'pop' }, - { include: '#interpolated_elixir' }, - { include: '#escaped_char' }, - { defaultToken: 'constant.other.symbol.double-quoted.elixir' } ] }, - { token: 'punctuation.definition.string.begin.elixir', - regex: '(?:\'\'\')', - TODO: 'FIXME: regexp doesn\'t have js equivalent', - originalRegex: '(?>\'\'\')', - push: - [ { token: 'punctuation.definition.string.end.elixir', - regex: '^\\s*\'\'\'', - next: 'pop' }, - { include: '#interpolated_elixir' }, - { include: '#escaped_char' }, - { defaultToken: 'support.function.variable.quoted.single.heredoc.elixir' } ], - comment: 'Single-quoted heredocs' }, - { token: 'punctuation.definition.string.begin.elixir', - regex: '\'', - push: - [ { token: 'punctuation.definition.string.end.elixir', - regex: '\'', - next: 'pop' }, - { include: '#interpolated_elixir' }, - { include: '#escaped_char' }, - { defaultToken: 'support.function.variable.quoted.single.elixir' } ], - comment: 'single quoted string (allows for interpolation)' }, - { token: 'punctuation.definition.string.begin.elixir', - regex: '(?:""")', - TODO: 'FIXME: regexp doesn\'t have js equivalent', - originalRegex: '(?>""")', - push: - [ { token: 'punctuation.definition.string.end.elixir', - regex: '^\\s*"""', - next: 'pop' }, - { include: '#interpolated_elixir' }, - { include: '#escaped_char' }, - { defaultToken: 'string.quoted.double.heredoc.elixir' } ], - comment: 'Double-quoted heredocs' }, - { token: 'punctuation.definition.string.begin.elixir', - regex: '"', - push: - [ { token: 'punctuation.definition.string.end.elixir', - regex: '"', - next: 'pop' }, - { include: '#interpolated_elixir' }, - { include: '#escaped_char' }, - { defaultToken: 'string.quoted.double.elixir' } ], - comment: 'double quoted string (allows for interpolation)' }, - { token: 'punctuation.definition.string.begin.elixir', - regex: '~[a-z](?:""")', - TODO: 'FIXME: regexp doesn\'t have js equivalent', - originalRegex: '~[a-z](?>""")', - push: - [ { token: 'punctuation.definition.string.end.elixir', - regex: '^\\s*"""', - next: 'pop' }, - { include: '#interpolated_elixir' }, - { include: '#escaped_char' }, - { defaultToken: 'string.quoted.double.heredoc.elixir' } ], - comment: 'Double-quoted heredocs sigils' }, - { token: 'punctuation.definition.string.begin.elixir', - regex: '~[a-z]\\{', - push: - [ { token: 'punctuation.definition.string.end.elixir', - regex: '\\}[a-z]*', - next: 'pop' }, - { include: '#interpolated_elixir' }, - { include: '#escaped_char' }, - { defaultToken: 'string.interpolated.elixir' } ], - comment: 'sigil (allow for interpolation)' }, - { token: 'punctuation.definition.string.begin.elixir', - regex: '~[a-z]\\[', - push: - [ { token: 'punctuation.definition.string.end.elixir', - regex: '\\][a-z]*', - next: 'pop' }, - { include: '#interpolated_elixir' }, - { include: '#escaped_char' }, - { defaultToken: 'string.interpolated.elixir' } ], - comment: 'sigil (allow for interpolation)' }, - { token: 'punctuation.definition.string.begin.elixir', - regex: '~[a-z]\\<', - push: - [ { token: 'punctuation.definition.string.end.elixir', - regex: '\\>[a-z]*', - next: 'pop' }, - { include: '#interpolated_elixir' }, - { include: '#escaped_char' }, - { defaultToken: 'string.interpolated.elixir' } ], - comment: 'sigil (allow for interpolation)' }, - { token: 'punctuation.definition.string.begin.elixir', - regex: '~[a-z]\\(', - push: - [ { token: 'punctuation.definition.string.end.elixir', - regex: '\\)[a-z]*', - next: 'pop' }, - { include: '#interpolated_elixir' }, - { include: '#escaped_char' }, - { defaultToken: 'string.interpolated.elixir' } ], - comment: 'sigil (allow for interpolation)' }, - { token: 'punctuation.definition.string.begin.elixir', - regex: '~[a-z][^\\w]', - push: - [ { token: 'punctuation.definition.string.end.elixir', - regex: '[^\\w][a-z]*', - next: 'pop' }, - { include: '#interpolated_elixir' }, - { include: '#escaped_char' }, - { include: '#escaped_char' }, - { defaultToken: 'string.interpolated.elixir' } ], - comment: 'sigil (allow for interpolation)' }, - { token: 'punctuation.definition.string.begin.elixir', - regex: '~[A-Z](?:""")', - TODO: 'FIXME: regexp doesn\'t have js equivalent', - originalRegex: '~[A-Z](?>""")', - push: - [ { token: 'punctuation.definition.string.end.elixir', - regex: '^\\s*"""', - next: 'pop' }, - { defaultToken: 'string.quoted.other.literal.upper.elixir' } ], - comment: 'Double-quoted heredocs sigils' }, - { token: 'punctuation.definition.string.begin.elixir', - regex: '~[A-Z]\\{', - push: - [ { token: 'punctuation.definition.string.end.elixir', - regex: '\\}[a-z]*', - next: 'pop' }, - { defaultToken: 'string.quoted.other.literal.upper.elixir' } ], - comment: 'sigil (without interpolation)' }, - { token: 'punctuation.definition.string.begin.elixir', - regex: '~[A-Z]\\[', - push: - [ { token: 'punctuation.definition.string.end.elixir', - regex: '\\][a-z]*', - next: 'pop' }, - { defaultToken: 'string.quoted.other.literal.upper.elixir' } ], - comment: 'sigil (without interpolation)' }, - { token: 'punctuation.definition.string.begin.elixir', - regex: '~[A-Z]\\<', - push: - [ { token: 'punctuation.definition.string.end.elixir', - regex: '\\>[a-z]*', - next: 'pop' }, - { defaultToken: 'string.quoted.other.literal.upper.elixir' } ], - comment: 'sigil (without interpolation)' }, - { token: 'punctuation.definition.string.begin.elixir', - regex: '~[A-Z]\\(', - push: - [ { token: 'punctuation.definition.string.end.elixir', - regex: '\\)[a-z]*', - next: 'pop' }, - { defaultToken: 'string.quoted.other.literal.upper.elixir' } ], - comment: 'sigil (without interpolation)' }, - { token: 'punctuation.definition.string.begin.elixir', - regex: '~[A-Z][^\\w]', - push: - [ { token: 'punctuation.definition.string.end.elixir', - regex: '[^\\w][a-z]*', - next: 'pop' }, - { defaultToken: 'string.quoted.other.literal.upper.elixir' } ], - comment: 'sigil (without interpolation)' }, - { token: ['punctuation.definition.constant.elixir', 'constant.other.symbol.elixir'], - regex: '(:)([a-zA-Z_][\\w@]*(?:[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(?:\\^\\^)?)', - TODO: 'FIXME: regexp doesn\'t have js equivalent', - originalRegex: '(?[a-zA-Z_][\\w@]*(?>[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(\\^\\^)?)', - comment: 'symbols' }, - { token: 'punctuation.definition.constant.elixir', - regex: '(?:[a-zA-Z_][\\w@]*(?:[?!])?):(?!:)', - TODO: 'FIXME: regexp doesn\'t have js equivalent', - originalRegex: '(?>[a-zA-Z_][\\w@]*(?>[?!])?)(:)(?!:)', - comment: 'symbols' }, - { token: - [ 'punctuation.definition.comment.elixir', - 'comment.line.number-sign.elixir' ], - regex: '(#)(.*)' }, - { token: 'constant.numeric.elixir', - regex: '\\?(?:\\\\(?:x[\\da-fA-F]{1,2}(?![\\da-fA-F])\\b|[^xMC])|[^\\s\\\\])', - TODO: 'FIXME: regexp doesn\'t have js equivalent', - originalRegex: '(?=?' }, - { token: 'keyword.operator.bitwise.elixir', - regex: '\\|{3}|&{3}|\\^{3}|<{3}|>{3}|~{3}' }, - { token: 'keyword.operator.logical.elixir', - regex: '!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b', - originalRegex: '(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b' }, - { token: 'keyword.operator.arithmetic.elixir', - regex: '\\*|\\+|\\-|/' }, - { token: 'keyword.operator.other.elixir', - regex: '\\||\\+\\+|\\-\\-|\\*\\*|\\\\\\\\|\\<\\-|\\<\\>|\\<\\<|\\>\\>|\\:\\:|\\.\\.|\\|>|~|=>' }, - { token: 'keyword.operator.assignment.elixir', regex: '=' }, - { token: 'punctuation.separator.other.elixir', regex: ':' }, - { token: 'punctuation.separator.statement.elixir', - regex: '\\;' }, - { token: 'punctuation.separator.object.elixir', regex: ',' }, - { token: 'punctuation.separator.method.elixir', regex: '\\.' }, - { token: 'punctuation.section.scope.elixir', regex: '\\{|\\}' }, - { token: 'punctuation.section.array.elixir', regex: '\\[|\\]' }, - { token: 'punctuation.section.function.elixir', - regex: '\\(|\\)' } ], - '#escaped_char': - [ { token: 'constant.character.escape.elixir', - regex: '\\\\(?:x[\\da-fA-F]{1,2}|.)' } ], - '#interpolated_elixir': - [ { token: - [ 'source.elixir.embedded.source', - 'source.elixir.embedded.source.empty' ], - regex: '(#\\{)(\\})' }, - { todo: - { token: 'punctuation.section.embedded.elixir', - regex: '#\\{', - push: - [ { token: 'punctuation.section.embedded.elixir', - regex: '\\}', - next: 'pop' }, - { include: '#nest_curly_and_self' }, - { include: '$self' }, - { defaultToken: 'source.elixir.embedded.source' } ] } } ], - '#nest_curly_and_self': - [ { token: 'punctuation.section.scope.elixir', - regex: '\\{', - push: - [ { token: 'punctuation.section.scope.elixir', - regex: '\\}', - next: 'pop' }, - { include: '#nest_curly_and_self' } ] }, - { include: '$self' } ], - '#regex_sub': - [ { include: '#interpolated_elixir' }, - { include: '#escaped_char' }, - { token: - [ 'punctuation.definition.arbitrary-repitition.elixir', - 'string.regexp.arbitrary-repitition.elixir', - 'string.regexp.arbitrary-repitition.elixir', - 'punctuation.definition.arbitrary-repitition.elixir' ], - regex: '(\\{)(\\d+)((?:,\\d+)?)(\\})' }, - { token: 'punctuation.definition.character-class.elixir', - regex: '\\[(?:\\^?\\])?', - push: - [ { token: 'punctuation.definition.character-class.elixir', - regex: '\\]', - next: 'pop' }, - { include: '#escaped_char' }, - { defaultToken: 'string.regexp.character-class.elixir' } ] }, - { token: 'punctuation.definition.group.elixir', - regex: '\\(', - push: - [ { token: 'punctuation.definition.group.elixir', - regex: '\\)', - next: 'pop' }, - { include: '#regex_sub' }, - { defaultToken: 'string.regexp.group.elixir' } ] }, - { token: - [ 'punctuation.definition.comment.elixir', - 'comment.line.number-sign.elixir' ], - regex: '(?:^|\\s)(#)(\\s[[a-zA-Z0-9,. \\t?!-][^\\x00-\\x7F]]*$)', - originalRegex: '(?<=^|\\s)(#)\\s[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$', - comment: 'We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.' } ] } - - this.normalizeRules(); -}; - -ElixirHighlightRules.metaData = { comment: 'Textmate bundle for Elixir Programming Language.', - fileTypes: [ 'ex', 'exs' ], - firstLineMatch: '^#!/.*\\belixir', - foldingStartMarker: '(after|else|catch|rescue|\\-\\>|\\{|\\[|do)\\s*$', - foldingStopMarker: '^\\s*((\\}|\\]|after|else|catch|rescue)\\s*$|end\\b)', - keyEquivalent: '^~E', - name: 'Elixir', - scopeName: 'source.elixir' } - - -oop.inherits(ElixirHighlightRules, TextHighlightRules); - -exports.ElixirHighlightRules = ElixirHighlightRules; -}); - -define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/elixir",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elixir_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var ElixirHighlightRules = require("./elixir_highlight_rules").ElixirHighlightRules; -var FoldMode = require("./folding/coffee").FoldMode; - -var Mode = function() { - this.HighlightRules = ElixirHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "#"; - this.$id = "ace/mode/elixir" -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,i,t){"use strict";var n=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{token:["meta.module.elixir","keyword.control.module.elixir","meta.module.elixir","entity.name.type.module.elixir"],regex:"^(\\s*)(defmodule)(\\s+)((?:[A-Z]\\w*\\s*\\.\\s*)*[A-Z]\\w*)"},{token:"comment.documentation.heredoc",regex:'@(?:module|type)?doc (?:~[a-z])?"""',push:[{token:"comment.documentation.heredoc",regex:'\\s*"""',next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"comment.documentation.heredoc"}],comment:"@doc with heredocs is treated as documentation"},{token:"comment.documentation.heredoc",regex:'@(?:module|type)?doc ~[A-Z]"""',push:[{token:"comment.documentation.heredoc",regex:'\\s*"""',next:"pop"},{defaultToken:"comment.documentation.heredoc"}],comment:"@doc with heredocs is treated as documentation"},{token:"comment.documentation.heredoc",regex:"@(?:module|type)?doc (?:~[a-z])?'''",push:[{token:"comment.documentation.heredoc",regex:"\\s*'''",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"comment.documentation.heredoc"}],comment:"@doc with heredocs is treated as documentation"},{token:"comment.documentation.heredoc",regex:"@(?:module|type)?doc ~[A-Z]'''",push:[{token:"comment.documentation.heredoc",regex:"\\s*'''",next:"pop"},{defaultToken:"comment.documentation.heredoc"}],comment:"@doc with heredocs is treated as documentation"},{token:"comment.documentation.false",regex:"@(?:module|type)?doc false",comment:"@doc false is treated as documentation"},{token:"comment.documentation.string",regex:'@(?:module|type)?doc "',push:[{token:"comment.documentation.string",regex:'"',next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"comment.documentation.string"}],comment:"@doc with string is treated as documentation"},{token:"keyword.control.elixir",regex:"\\b(?:do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defdelegate|defcallback|defmacrocallback|defexception|defoverridable|exit|after|rescue|catch|else|raise|throw|import|require|alias|use|quote|unquote|super)\\b(?![?!])",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?_?\\h)*|\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?|0b[01]+|0o[0-7]+)\\b"},{token:"punctuation.definition.constant.elixir",regex:":'",push:[{token:"punctuation.definition.constant.elixir",regex:"'",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"constant.other.symbol.single-quoted.elixir"}]},{token:"punctuation.definition.constant.elixir",regex:':"',push:[{token:"punctuation.definition.constant.elixir",regex:'"',next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"constant.other.symbol.double-quoted.elixir"}]},{token:"punctuation.definition.string.begin.elixir",regex:"(?:''')",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?>''')",push:[{token:"punctuation.definition.string.end.elixir",regex:"^\\s*'''",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"support.function.variable.quoted.single.heredoc.elixir"}],comment:"Single-quoted heredocs"},{token:"punctuation.definition.string.begin.elixir",regex:"'",push:[{token:"punctuation.definition.string.end.elixir",regex:"'",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"support.function.variable.quoted.single.elixir"}],comment:"single quoted string (allows for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:'(?:""")',TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:'(?>""")',push:[{token:"punctuation.definition.string.end.elixir",regex:'^\\s*"""',next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.quoted.double.heredoc.elixir"}],comment:"Double-quoted heredocs"},{token:"punctuation.definition.string.begin.elixir",regex:'"',push:[{token:"punctuation.definition.string.end.elixir",regex:'"',next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.quoted.double.elixir"}],comment:"double quoted string (allows for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:'~[a-z](?:""")',TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:'~[a-z](?>""")',push:[{token:"punctuation.definition.string.end.elixir",regex:'^\\s*"""',next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.quoted.double.heredoc.elixir"}],comment:"Double-quoted heredocs sigils"},{token:"punctuation.definition.string.begin.elixir",regex:"~[a-z]\\{",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\}[a-z]*",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.interpolated.elixir"}],comment:"sigil (allow for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[a-z]\\[",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\][a-z]*",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.interpolated.elixir"}],comment:"sigil (allow for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[a-z]\\<",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\>[a-z]*",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.interpolated.elixir"}],comment:"sigil (allow for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[a-z]\\(",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\)[a-z]*",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{defaultToken:"string.interpolated.elixir"}],comment:"sigil (allow for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[a-z][^\\w]",push:[{token:"punctuation.definition.string.end.elixir",regex:"[^\\w][a-z]*",next:"pop"},{include:"#interpolated_elixir"},{include:"#escaped_char"},{include:"#escaped_char"},{defaultToken:"string.interpolated.elixir"}],comment:"sigil (allow for interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:'~[A-Z](?:""")',TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:'~[A-Z](?>""")',push:[{token:"punctuation.definition.string.end.elixir",regex:'^\\s*"""',next:"pop"},{defaultToken:"string.quoted.other.literal.upper.elixir"}],comment:"Double-quoted heredocs sigils"},{token:"punctuation.definition.string.begin.elixir",regex:"~[A-Z]\\{",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\}[a-z]*",next:"pop"},{defaultToken:"string.quoted.other.literal.upper.elixir"}],comment:"sigil (without interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[A-Z]\\[",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\][a-z]*",next:"pop"},{defaultToken:"string.quoted.other.literal.upper.elixir"}],comment:"sigil (without interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[A-Z]\\<",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\>[a-z]*",next:"pop"},{defaultToken:"string.quoted.other.literal.upper.elixir"}],comment:"sigil (without interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[A-Z]\\(",push:[{token:"punctuation.definition.string.end.elixir",regex:"\\)[a-z]*",next:"pop"},{defaultToken:"string.quoted.other.literal.upper.elixir"}],comment:"sigil (without interpolation)"},{token:"punctuation.definition.string.begin.elixir",regex:"~[A-Z][^\\w]",push:[{token:"punctuation.definition.string.end.elixir",regex:"[^\\w][a-z]*",next:"pop"},{defaultToken:"string.quoted.other.literal.upper.elixir"}],comment:"sigil (without interpolation)"},{token:["punctuation.definition.constant.elixir","constant.other.symbol.elixir"],regex:"(:)([a-zA-Z_][\\w@]*(?:[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(?:\\^\\^)?)",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?[a-zA-Z_][\\w@]*(?>[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(\\^\\^)?)",comment:"symbols"},{token:"punctuation.definition.constant.elixir",regex:"(?:[a-zA-Z_][\\w@]*(?:[?!])?):(?!:)",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?>[a-zA-Z_][\\w@]*(?>[?!])?)(:)(?!:)",comment:"symbols"},{token:["punctuation.definition.comment.elixir","comment.line.number-sign.elixir"],regex:"(#)(.*)"},{token:"constant.numeric.elixir",regex:"\\?(?:\\\\(?:x[\\da-fA-F]{1,2}(?![\\da-fA-F])\\b|[^xMC])|[^\\s\\\\])",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?=?"},{token:"keyword.operator.bitwise.elixir",regex:"\\|{3}|&{3}|\\^{3}|<{3}|>{3}|~{3}"},{token:"keyword.operator.logical.elixir",regex:"!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b",originalRegex:"(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b"},{token:"keyword.operator.arithmetic.elixir",regex:"\\*|\\+|\\-|/"},{token:"keyword.operator.other.elixir",regex:"\\||\\+\\+|\\-\\-|\\*\\*|\\\\\\\\|\\<\\-|\\<\\>|\\<\\<|\\>\\>|\\:\\:|\\.\\.|\\|>|~|=>"},{token:"keyword.operator.assignment.elixir",regex:"="},{token:"punctuation.separator.other.elixir",regex:":"},{token:"punctuation.separator.statement.elixir",regex:"\\;"},{token:"punctuation.separator.object.elixir",regex:","},{token:"punctuation.separator.method.elixir",regex:"\\."},{token:"punctuation.section.scope.elixir",regex:"\\{|\\}"},{token:"punctuation.section.array.elixir",regex:"\\[|\\]"},{token:"punctuation.section.function.elixir",regex:"\\(|\\)"}],"#escaped_char":[{token:"constant.character.escape.elixir",regex:"\\\\(?:x[\\da-fA-F]{1,2}|.)"}],"#interpolated_elixir":[{token:["source.elixir.embedded.source","source.elixir.embedded.source.empty"],regex:"(#\\{)(\\})"},{todo:{token:"punctuation.section.embedded.elixir",regex:"#\\{",push:[{token:"punctuation.section.embedded.elixir",regex:"\\}",next:"pop"},{include:"#nest_curly_and_self"},{include:"$self"},{defaultToken:"source.elixir.embedded.source"}]}}],"#nest_curly_and_self":[{token:"punctuation.section.scope.elixir",regex:"\\{",push:[{token:"punctuation.section.scope.elixir",regex:"\\}",next:"pop"},{include:"#nest_curly_and_self"}]},{include:"$self"}],"#regex_sub":[{include:"#interpolated_elixir"},{include:"#escaped_char"},{token:["punctuation.definition.arbitrary-repitition.elixir","string.regexp.arbitrary-repitition.elixir","string.regexp.arbitrary-repitition.elixir","punctuation.definition.arbitrary-repitition.elixir"],regex:"(\\{)(\\d+)((?:,\\d+)?)(\\})"},{token:"punctuation.definition.character-class.elixir",regex:"\\[(?:\\^?\\])?",push:[{token:"punctuation.definition.character-class.elixir",regex:"\\]",next:"pop"},{include:"#escaped_char"},{defaultToken:"string.regexp.character-class.elixir"}]},{token:"punctuation.definition.group.elixir",regex:"\\(",push:[{token:"punctuation.definition.group.elixir",regex:"\\)",next:"pop"},{include:"#regex_sub"},{defaultToken:"string.regexp.group.elixir"}]},{token:["punctuation.definition.comment.elixir","comment.line.number-sign.elixir"],regex:"(?:^|\\s)(#)(\\s[[a-zA-Z0-9,. \\t?!-][^\\x00-\\x7F]]*$)",originalRegex:"(?<=^|\\s)(#)\\s[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$",comment:"We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags."}]},this.normalizeRules()};r.metaData={comment:"Textmate bundle for Elixir Programming Language.",fileTypes:["ex","exs"],firstLineMatch:"^#!/.*\\belixir",foldingStartMarker:"(after|else|catch|rescue|\\-\\>|\\{|\\[|do)\\s*$",foldingStopMarker:"^\\s*((\\}|\\]|after|else|catch|rescue)\\s*$|end\\b)",keyEquivalent:"^~E",name:"Elixir",scopeName:"source.elixir"},n.inherits(r,o),i.ElixirHighlightRules=r}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,i,t){"use strict";var n=e("../../lib/oop"),o=e("./fold_mode").FoldMode,r=e("../../range").Range,a=i.FoldMode=function(){};n.inherits(a,o),function(){this.getFoldWidgetRange=function(e,i,t){var n=this.indentationBlock(e,t);if(n)return n;var o=/\S/,a=e.getLine(t),l=a.search(o);if(l!=-1&&"#"==a[l]){for(var d=a.length,c=e.getLength(),u=t,s=t;++tu){var p=e.getLine(s).length;return new r(u,d,s,p)}}},this.getFoldWidget=function(e,i,t){var n=e.getLine(t),o=n.search(/\S/),r=e.getLine(t+1),a=e.getLine(t-1),l=a.search(/\S/),d=r.search(/\S/);if(o==-1)return e.foldWidgets[t-1]=l!=-1&&l|<-|\u2192/ - }, { - token : "keyword.operator", - regex : /[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]+/ - }, { - token : "operator.punctuation", - regex : /[,;`]/ - }, { - regex : largeRe + idRe + "+\\.?", - token : function(value) { - if (value[value.length - 1] == ".") - return "entity.name.function"; - return "constant.language"; - } - }, { - regex : "^" + smallRe + idRe + "+", - token : function(value) { - return "constant.language"; - } - }, { - token : keywordMapper, - regex : "[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b" - }, { - regex: "{-#?", - token: "comment.start", - onMatch: function(value, currentState, stack) { - this.next = value.length == 2 ? "blockComment" : "docComment"; - return this.token; - } - }, { - token: "variable.language", - regex: /\[markdown\|/, - next: "markdown" - }, { - token: "paren.lparen", - regex: /[\[({]/ - }, { - token: "paren.rparen", - regex: /[\])}]/ - }, ], - markdown: [{ - regex: /\|\]/, - next: "start" - }, { - defaultToken : "string" - }], - blockComment: [{ - regex: "{-", - token: "comment.start", - push: "blockComment" - }, { - regex: "-}", - token: "comment.end", - next: "pop" - }, { - defaultToken: "comment" - }], - docComment: [{ - regex: "{-", - token: "comment.start", - push: "docComment" - }, { - regex: "-}", - token: "comment.end", - next: "pop" - }, { - defaultToken: "doc.comment" - }], - string: [{ - token: "constant.language.escape", - regex: escapeRe, - }, { - token: "text", - regex: /\\(\s|$)/, - next: "stringGap" - }, { - token: "string.end", - regex: '"', - next: "start" - }], - stringGap: [{ - token: "text", - regex: /\\/, - next: "string" - }, { - token: "error", - regex: "", - next: "start" - }], - }; - - this.normalizeRules(); -}; - -oop.inherits(ElmHighlightRules, TextHighlightRules); - -exports.ElmHighlightRules = ElmHighlightRules; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/elm",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elm_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var HighlightRules = require("./elm_highlight_rules").ElmHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = HighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "--"; - this.blockComment = {start: "{-", end: "-}"}; - this.$id = "ace/mode/elm"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/elm_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){var e=this.createKeywordMapper({keyword:"as|case|class|data|default|deriving|do|else|export|foreign|hiding|jsevent|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|open|then|type|where|_|port|λ"},"identifier"),t=/\\(\d+|['"\\&trnbvf])/,n=/[a-z_]/.source,o=/[A-Z]/.source,r=/[a-z_A-Z0-9\']/.source;this.$rules={start:[{token:"string.start",regex:'"',next:"string"},{token:"string.character",regex:"'(?:"+t.source+"|.)'?"},{regex:/0(?:[xX][0-9A-Fa-f]+|[oO][0-7]+)|\d+(\.\d+)?([eE][-+]?\d*)?/,token:"constant.numeric"},{token:"keyword",regex:/\.\.|\||:|=|\\|\"|->|<-|\u2192/},{token:"keyword.operator",regex:/[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]+/},{token:"operator.punctuation",regex:/[,;`]/},{regex:o+r+"+\\.?",token:function(e){return"."==e[e.length-1]?"entity.name.function":"constant.language"}},{regex:"^"+n+r+"+",token:function(e){return"constant.language"}},{token:e,regex:"[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b"},{regex:"{-#?",token:"comment.start",onMatch:function(e,t,n){return this.next=2==e.length?"blockComment":"docComment",this.token}},{token:"variable.language",regex:/\[markdown\|/,next:"markdown"},{token:"paren.lparen",regex:/[\[({]/},{token:"paren.rparen",regex:/[\])}]/}],markdown:[{regex:/\|\]/,next:"start"},{defaultToken:"string"}],blockComment:[{regex:"{-",token:"comment.start",push:"blockComment"},{regex:"-}",token:"comment.end",next:"pop"},{defaultToken:"comment"}],docComment:[{regex:"{-",token:"comment.start",push:"docComment"},{regex:"-}",token:"comment.end",next:"pop"},{defaultToken:"doc.comment"}],string:[{token:"constant.language.escape",regex:t},{token:"text",regex:/\\(\s|$)/,next:"stringGap"},{token:"string.end",regex:'"',next:"start"}],stringGap:[{token:"text",regex:/\\/,next:"string"},{token:"error",regex:"",next:"start"}]},this.normalizeRules()};o.inherits(i,r),t.ElmHighlightRules=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(o)?"start":r},this.getFoldWidgetRange=function(e,t,n,o){var r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);var i=r.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(o?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=r.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),o=n.search(/\S/),i=t,a=n.length;t+=1;for(var s=t,g=e.getLength();++tl)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=i)break;if(c.isMultiLine())t=c.end.row;else if(o==l)break}s=t}}return new r(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,g=1;++na)return new r(a,o,c,t.length)}}.call(a.prototype)}),define("ace/mode/elm",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elm_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./elm_highlight_rules").ElmHighlightRules,a=e("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=i,this.foldingRules=new a};o.inherits(s,r),function(){this.lineCommentStart="--",this.blockComment={start:"{-",end:"-}"},this.$id="ace/mode/elm"}.call(s.prototype),t.Mode=s}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-erlang.js b/www/js/vendor/ace/mode-erlang.js index 7e3d3d4c3..b57aa9217 100755 --- a/www/js/vendor/ace/mode-erlang.js +++ b/www/js/vendor/ace/mode-erlang.js @@ -1,1002 +1 @@ -define("ace/mode/erlang_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var ErlangHighlightRules = function() { - - this.$rules = { start: - [ { include: '#module-directive' }, - { include: '#import-export-directive' }, - { include: '#behaviour-directive' }, - { include: '#record-directive' }, - { include: '#define-directive' }, - { include: '#macro-directive' }, - { include: '#directive' }, - { include: '#function' }, - { include: '#everything-else' } ], - '#atom': - [ { token: 'punctuation.definition.symbol.begin.erlang', - regex: '\'', - push: - [ { token: 'punctuation.definition.symbol.end.erlang', - regex: '\'', - next: 'pop' }, - { token: - [ 'punctuation.definition.escape.erlang', - 'constant.other.symbol.escape.erlang', - 'punctuation.definition.escape.erlang', - 'constant.other.symbol.escape.erlang', - 'constant.other.symbol.escape.erlang' ], - regex: '(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' }, - { token: 'invalid.illegal.atom.erlang', regex: '\\\\\\^?.?' }, - { defaultToken: 'constant.other.symbol.quoted.single.erlang' } ] }, - { token: 'constant.other.symbol.unquoted.erlang', - regex: '[a-z][a-zA-Z\\d@_]*' } ], - '#behaviour-directive': - [ { token: - [ 'meta.directive.behaviour.erlang', - 'punctuation.section.directive.begin.erlang', - 'meta.directive.behaviour.erlang', - 'keyword.control.directive.behaviour.erlang', - 'meta.directive.behaviour.erlang', - 'punctuation.definition.parameters.begin.erlang', - 'meta.directive.behaviour.erlang', - 'entity.name.type.class.behaviour.definition.erlang', - 'meta.directive.behaviour.erlang', - 'punctuation.definition.parameters.end.erlang', - 'meta.directive.behaviour.erlang', - 'punctuation.section.directive.end.erlang' ], - regex: '^(\\s*)(-)(\\s*)(behaviour)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)' } ], - '#binary': - [ { token: 'punctuation.definition.binary.begin.erlang', - regex: '<<', - push: - [ { token: 'punctuation.definition.binary.end.erlang', - regex: '>>', - next: 'pop' }, - { token: - [ 'punctuation.separator.binary.erlang', - 'punctuation.separator.value-size.erlang' ], - regex: '(,)|(:)' }, - { include: '#internal-type-specifiers' }, - { include: '#everything-else' }, - { defaultToken: 'meta.structure.binary.erlang' } ] } ], - '#character': - [ { token: - [ 'punctuation.definition.character.erlang', - 'punctuation.definition.escape.erlang', - 'constant.character.escape.erlang', - 'punctuation.definition.escape.erlang', - 'constant.character.escape.erlang', - 'constant.character.escape.erlang' ], - regex: '(\\$)(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' }, - { token: 'invalid.illegal.character.erlang', - regex: '\\$\\\\\\^?.?' }, - { token: - [ 'punctuation.definition.character.erlang', - 'constant.character.erlang' ], - regex: '(\\$)(\\S)' }, - { token: 'invalid.illegal.character.erlang', regex: '\\$.?' } ], - '#comment': - [ { token: 'punctuation.definition.comment.erlang', - regex: '%.*$', - push_: - [ { token: 'comment.line.percentage.erlang', - regex: '$', - next: 'pop' }, - { defaultToken: 'comment.line.percentage.erlang' } ] } ], - '#define-directive': - [ { token: - [ 'meta.directive.define.erlang', - 'punctuation.section.directive.begin.erlang', - 'meta.directive.define.erlang', - 'keyword.control.directive.define.erlang', - 'meta.directive.define.erlang', - 'punctuation.definition.parameters.begin.erlang', - 'meta.directive.define.erlang', - 'entity.name.function.macro.definition.erlang', - 'meta.directive.define.erlang', - 'punctuation.separator.parameters.erlang' ], - regex: '^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(,)', - push: - [ { token: - [ 'punctuation.definition.parameters.end.erlang', - 'meta.directive.define.erlang', - 'punctuation.section.directive.end.erlang' ], - regex: '(\\))(\\s*)(\\.)', - next: 'pop' }, - { include: '#everything-else' }, - { defaultToken: 'meta.directive.define.erlang' } ] }, - { token: 'meta.directive.define.erlang', - regex: '(?=^\\s*-\\s*define\\s*\\(\\s*[a-zA-Z\\d@_]+\\s*\\()', - push: - [ { token: - [ 'punctuation.definition.parameters.end.erlang', - 'meta.directive.define.erlang', - 'punctuation.section.directive.end.erlang' ], - regex: '(\\))(\\s*)(\\.)', - next: 'pop' }, - { token: - [ 'text', - 'punctuation.section.directive.begin.erlang', - 'text', - 'keyword.control.directive.define.erlang', - 'text', - 'punctuation.definition.parameters.begin.erlang', - 'text', - 'entity.name.function.macro.definition.erlang', - 'text', - 'punctuation.definition.parameters.begin.erlang' ], - regex: '^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\()', - push: - [ { token: - [ 'punctuation.definition.parameters.end.erlang', - 'text', - 'punctuation.separator.parameters.erlang' ], - regex: '(\\))(\\s*)(,)', - next: 'pop' }, - { token: 'punctuation.separator.parameters.erlang', regex: ',' }, - { include: '#everything-else' } ] }, - { token: 'punctuation.separator.define.erlang', - regex: '\\|\\||\\||:|;|,|\\.|->' }, - { include: '#everything-else' }, - { defaultToken: 'meta.directive.define.erlang' } ] } ], - '#directive': - [ { token: - [ 'meta.directive.erlang', - 'punctuation.section.directive.begin.erlang', - 'meta.directive.erlang', - 'keyword.control.directive.erlang', - 'meta.directive.erlang', - 'punctuation.definition.parameters.begin.erlang' ], - regex: '^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\(?)', - push: - [ { token: - [ 'punctuation.definition.parameters.end.erlang', - 'meta.directive.erlang', - 'punctuation.section.directive.end.erlang' ], - regex: '(\\)?)(\\s*)(\\.)', - next: 'pop' }, - { include: '#everything-else' }, - { defaultToken: 'meta.directive.erlang' } ] }, - { token: - [ 'meta.directive.erlang', - 'punctuation.section.directive.begin.erlang', - 'meta.directive.erlang', - 'keyword.control.directive.erlang', - 'meta.directive.erlang', - 'punctuation.section.directive.end.erlang' ], - regex: '^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\.)' } ], - '#everything-else': - [ { include: '#comment' }, - { include: '#record-usage' }, - { include: '#macro-usage' }, - { include: '#expression' }, - { include: '#keyword' }, - { include: '#textual-operator' }, - { include: '#function-call' }, - { include: '#tuple' }, - { include: '#list' }, - { include: '#binary' }, - { include: '#parenthesized-expression' }, - { include: '#character' }, - { include: '#number' }, - { include: '#atom' }, - { include: '#string' }, - { include: '#symbolic-operator' }, - { include: '#variable' } ], - '#expression': - [ { token: 'keyword.control.if.erlang', - regex: '\\bif\\b', - push: - [ { token: 'keyword.control.end.erlang', - regex: '\\bend\\b', - next: 'pop' }, - { include: '#internal-expression-punctuation' }, - { include: '#everything-else' }, - { defaultToken: 'meta.expression.if.erlang' } ] }, - { token: 'keyword.control.case.erlang', - regex: '\\bcase\\b', - push: - [ { token: 'keyword.control.end.erlang', - regex: '\\bend\\b', - next: 'pop' }, - { include: '#internal-expression-punctuation' }, - { include: '#everything-else' }, - { defaultToken: 'meta.expression.case.erlang' } ] }, - { token: 'keyword.control.receive.erlang', - regex: '\\breceive\\b', - push: - [ { token: 'keyword.control.end.erlang', - regex: '\\bend\\b', - next: 'pop' }, - { include: '#internal-expression-punctuation' }, - { include: '#everything-else' }, - { defaultToken: 'meta.expression.receive.erlang' } ] }, - { token: - [ 'keyword.control.fun.erlang', - 'text', - 'entity.name.type.class.module.erlang', - 'text', - 'punctuation.separator.module-function.erlang', - 'text', - 'entity.name.function.erlang', - 'text', - 'punctuation.separator.function-arity.erlang' ], - regex: '\\b(fun)(\\s*)(?:([a-z][a-zA-Z\\d@_]*)(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*)(\\s*)(/)' }, - { token: 'keyword.control.fun.erlang', - regex: '\\bfun\\b', - push: - [ { token: 'keyword.control.end.erlang', - regex: '\\bend\\b', - next: 'pop' }, - { token: 'text', - regex: '(?=\\()', - push: - [ { token: 'punctuation.separator.clauses.erlang', - regex: ';|(?=\\bend\\b)', - next: 'pop' }, - { include: '#internal-function-parts' } ] }, - { include: '#everything-else' }, - { defaultToken: 'meta.expression.fun.erlang' } ] }, - { token: 'keyword.control.try.erlang', - regex: '\\btry\\b', - push: - [ { token: 'keyword.control.end.erlang', - regex: '\\bend\\b', - next: 'pop' }, - { include: '#internal-expression-punctuation' }, - { include: '#everything-else' }, - { defaultToken: 'meta.expression.try.erlang' } ] }, - { token: 'keyword.control.begin.erlang', - regex: '\\bbegin\\b', - push: - [ { token: 'keyword.control.end.erlang', - regex: '\\bend\\b', - next: 'pop' }, - { include: '#internal-expression-punctuation' }, - { include: '#everything-else' }, - { defaultToken: 'meta.expression.begin.erlang' } ] }, - { token: 'keyword.control.query.erlang', - regex: '\\bquery\\b', - push: - [ { token: 'keyword.control.end.erlang', - regex: '\\bend\\b', - next: 'pop' }, - { include: '#everything-else' }, - { defaultToken: 'meta.expression.query.erlang' } ] } ], - '#function': - [ { token: - [ 'meta.function.erlang', - 'entity.name.function.definition.erlang', - 'meta.function.erlang' ], - regex: '^(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(?=\\()', - push: - [ { token: 'punctuation.terminator.function.erlang', - regex: '\\.', - next: 'pop' }, - { token: [ 'text', 'entity.name.function.erlang', 'text' ], - regex: '^(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(?=\\()' }, - { token: 'text', - regex: '(?=\\()', - push: - [ { token: 'punctuation.separator.clauses.erlang', - regex: ';|(?=\\.)', - next: 'pop' }, - { include: '#parenthesized-expression' }, - { include: '#internal-function-parts' } ] }, - { include: '#everything-else' }, - { defaultToken: 'meta.function.erlang' } ] } ], - '#function-call': - [ { token: 'meta.function-call.erlang', - regex: '(?=(?:[a-z][a-zA-Z\\d@_]*|\'[^\']*\')\\s*(?:\\(|:\\s*(?:[a-z][a-zA-Z\\d@_]*|\'[^\']*\')\\s*\\())', - push: - [ { token: 'punctuation.definition.parameters.end.erlang', - regex: '\\)', - next: 'pop' }, - { token: - [ 'entity.name.type.class.module.erlang', - 'text', - 'punctuation.separator.module-function.erlang', - 'text', - 'entity.name.function.guard.erlang', - 'text', - 'punctuation.definition.parameters.begin.erlang' ], - regex: '(?:(erlang)(\\s*)(:)(\\s*))?(is_atom|is_binary|is_constant|is_float|is_function|is_integer|is_list|is_number|is_pid|is_port|is_reference|is_tuple|is_record|abs|element|hd|length|node|round|self|size|tl|trunc)(\\s*)(\\()', - push: - [ { token: 'text', regex: '(?=\\))', next: 'pop' }, - { token: 'punctuation.separator.parameters.erlang', regex: ',' }, - { include: '#everything-else' } ] }, - { token: - [ 'entity.name.type.class.module.erlang', - 'text', - 'punctuation.separator.module-function.erlang', - 'text', - 'entity.name.function.erlang', - 'text', - 'punctuation.definition.parameters.begin.erlang' ], - regex: '(?:([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(\\()', - push: - [ { token: 'text', regex: '(?=\\))', next: 'pop' }, - { token: 'punctuation.separator.parameters.erlang', regex: ',' }, - { include: '#everything-else' } ] }, - { defaultToken: 'meta.function-call.erlang' } ] } ], - '#import-export-directive': - [ { token: - [ 'meta.directive.import.erlang', - 'punctuation.section.directive.begin.erlang', - 'meta.directive.import.erlang', - 'keyword.control.directive.import.erlang', - 'meta.directive.import.erlang', - 'punctuation.definition.parameters.begin.erlang', - 'meta.directive.import.erlang', - 'entity.name.type.class.module.erlang', - 'meta.directive.import.erlang', - 'punctuation.separator.parameters.erlang' ], - regex: '^(\\s*)(-)(\\s*)(import)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(,)', - push: - [ { token: - [ 'punctuation.definition.parameters.end.erlang', - 'meta.directive.import.erlang', - 'punctuation.section.directive.end.erlang' ], - regex: '(\\))(\\s*)(\\.)', - next: 'pop' }, - { include: '#internal-function-list' }, - { defaultToken: 'meta.directive.import.erlang' } ] }, - { token: - [ 'meta.directive.export.erlang', - 'punctuation.section.directive.begin.erlang', - 'meta.directive.export.erlang', - 'keyword.control.directive.export.erlang', - 'meta.directive.export.erlang', - 'punctuation.definition.parameters.begin.erlang' ], - regex: '^(\\s*)(-)(\\s*)(export)(\\s*)(\\()', - push: - [ { token: - [ 'punctuation.definition.parameters.end.erlang', - 'meta.directive.export.erlang', - 'punctuation.section.directive.end.erlang' ], - regex: '(\\))(\\s*)(\\.)', - next: 'pop' }, - { include: '#internal-function-list' }, - { defaultToken: 'meta.directive.export.erlang' } ] } ], - '#internal-expression-punctuation': - [ { token: - [ 'punctuation.separator.clause-head-body.erlang', - 'punctuation.separator.clauses.erlang', - 'punctuation.separator.expressions.erlang' ], - regex: '(->)|(;)|(,)' } ], - '#internal-function-list': - [ { token: 'punctuation.definition.list.begin.erlang', - regex: '\\[', - push: - [ { token: 'punctuation.definition.list.end.erlang', - regex: '\\]', - next: 'pop' }, - { token: - [ 'entity.name.function.erlang', - 'text', - 'punctuation.separator.function-arity.erlang' ], - regex: '([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(/)', - push: - [ { token: 'punctuation.separator.list.erlang', - regex: ',|(?=\\])', - next: 'pop' }, - { include: '#everything-else' } ] }, - { include: '#everything-else' }, - { defaultToken: 'meta.structure.list.function.erlang' } ] } ], - '#internal-function-parts': - [ { token: 'text', - regex: '(?=\\()', - push: - [ { token: 'punctuation.separator.clause-head-body.erlang', - regex: '->', - next: 'pop' }, - { token: 'punctuation.definition.parameters.begin.erlang', - regex: '\\(', - push: - [ { token: 'punctuation.definition.parameters.end.erlang', - regex: '\\)', - next: 'pop' }, - { token: 'punctuation.separator.parameters.erlang', regex: ',' }, - { include: '#everything-else' } ] }, - { token: 'punctuation.separator.guards.erlang', regex: ',|;' }, - { include: '#everything-else' } ] }, - { token: 'punctuation.separator.expressions.erlang', - regex: ',' }, - { include: '#everything-else' } ], - '#internal-record-body': - [ { token: 'punctuation.definition.class.record.begin.erlang', - regex: '\\{', - push: - [ { token: 'meta.structure.record.erlang', - regex: '(?=\\})', - next: 'pop' }, - { token: - [ 'variable.other.field.erlang', - 'variable.language.omitted.field.erlang', - 'text', - 'keyword.operator.assignment.erlang' ], - regex: '(?:([a-z][a-zA-Z\\d@_]*|\'[^\']*\')|(_))(\\s*)(=|::)', - push: - [ { token: 'punctuation.separator.class.record.erlang', - regex: ',|(?=\\})', - next: 'pop' }, - { include: '#everything-else' } ] }, - { token: - [ 'variable.other.field.erlang', - 'text', - 'punctuation.separator.class.record.erlang' ], - regex: '([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)((?:,)?)' }, - { include: '#everything-else' }, - { defaultToken: 'meta.structure.record.erlang' } ] } ], - '#internal-type-specifiers': - [ { token: 'punctuation.separator.value-type.erlang', - regex: '/', - push: - [ { token: 'text', regex: '(?=,|:|>>)', next: 'pop' }, - { token: - [ 'storage.type.erlang', - 'storage.modifier.signedness.erlang', - 'storage.modifier.endianness.erlang', - 'storage.modifier.unit.erlang', - 'punctuation.separator.type-specifiers.erlang' ], - regex: '(integer|float|binary|bytes|bitstring|bits)|(signed|unsigned)|(big|little|native)|(unit)|(-)' } ] } ], - '#keyword': - [ { token: 'keyword.control.erlang', - regex: '\\b(?:after|begin|case|catch|cond|end|fun|if|let|of|query|try|receive|when)\\b' } ], - '#list': - [ { token: 'punctuation.definition.list.begin.erlang', - regex: '\\[', - push: - [ { token: 'punctuation.definition.list.end.erlang', - regex: '\\]', - next: 'pop' }, - { token: 'punctuation.separator.list.erlang', - regex: '\\||\\|\\||,' }, - { include: '#everything-else' }, - { defaultToken: 'meta.structure.list.erlang' } ] } ], - '#macro-directive': - [ { token: - [ 'meta.directive.ifdef.erlang', - 'punctuation.section.directive.begin.erlang', - 'meta.directive.ifdef.erlang', - 'keyword.control.directive.ifdef.erlang', - 'meta.directive.ifdef.erlang', - 'punctuation.definition.parameters.begin.erlang', - 'meta.directive.ifdef.erlang', - 'entity.name.function.macro.erlang', - 'meta.directive.ifdef.erlang', - 'punctuation.definition.parameters.end.erlang', - 'meta.directive.ifdef.erlang', - 'punctuation.section.directive.end.erlang' ], - regex: '^(\\s*)(-)(\\s*)(ifdef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' }, - { token: - [ 'meta.directive.ifndef.erlang', - 'punctuation.section.directive.begin.erlang', - 'meta.directive.ifndef.erlang', - 'keyword.control.directive.ifndef.erlang', - 'meta.directive.ifndef.erlang', - 'punctuation.definition.parameters.begin.erlang', - 'meta.directive.ifndef.erlang', - 'entity.name.function.macro.erlang', - 'meta.directive.ifndef.erlang', - 'punctuation.definition.parameters.end.erlang', - 'meta.directive.ifndef.erlang', - 'punctuation.section.directive.end.erlang' ], - regex: '^(\\s*)(-)(\\s*)(ifndef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' }, - { token: - [ 'meta.directive.undef.erlang', - 'punctuation.section.directive.begin.erlang', - 'meta.directive.undef.erlang', - 'keyword.control.directive.undef.erlang', - 'meta.directive.undef.erlang', - 'punctuation.definition.parameters.begin.erlang', - 'meta.directive.undef.erlang', - 'entity.name.function.macro.erlang', - 'meta.directive.undef.erlang', - 'punctuation.definition.parameters.end.erlang', - 'meta.directive.undef.erlang', - 'punctuation.section.directive.end.erlang' ], - regex: '^(\\s*)(-)(\\s*)(undef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' } ], - '#macro-usage': - [ { token: - [ 'keyword.operator.macro.erlang', - 'meta.macro-usage.erlang', - 'entity.name.function.macro.erlang' ], - regex: '(\\?\\??)(\\s*)([a-zA-Z\\d@_]+)' } ], - '#module-directive': - [ { token: - [ 'meta.directive.module.erlang', - 'punctuation.section.directive.begin.erlang', - 'meta.directive.module.erlang', - 'keyword.control.directive.module.erlang', - 'meta.directive.module.erlang', - 'punctuation.definition.parameters.begin.erlang', - 'meta.directive.module.erlang', - 'entity.name.type.class.module.definition.erlang', - 'meta.directive.module.erlang', - 'punctuation.definition.parameters.end.erlang', - 'meta.directive.module.erlang', - 'punctuation.section.directive.end.erlang' ], - regex: '^(\\s*)(-)(\\s*)(module)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)' } ], - '#number': - [ { token: 'text', - regex: '(?=\\d)', - push: - [ { token: 'text', regex: '(?!\\d)', next: 'pop' }, - { token: - [ 'constant.numeric.float.erlang', - 'punctuation.separator.integer-float.erlang', - 'constant.numeric.float.erlang', - 'punctuation.separator.float-exponent.erlang' ], - regex: '(\\d+)(\\.)(\\d+)((?:[eE][\\+\\-]?\\d+)?)' }, - { token: - [ 'constant.numeric.integer.binary.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.binary.erlang' ], - regex: '(2)(#)([0-1]+)' }, - { token: - [ 'constant.numeric.integer.base-3.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-3.erlang' ], - regex: '(3)(#)([0-2]+)' }, - { token: - [ 'constant.numeric.integer.base-4.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-4.erlang' ], - regex: '(4)(#)([0-3]+)' }, - { token: - [ 'constant.numeric.integer.base-5.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-5.erlang' ], - regex: '(5)(#)([0-4]+)' }, - { token: - [ 'constant.numeric.integer.base-6.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-6.erlang' ], - regex: '(6)(#)([0-5]+)' }, - { token: - [ 'constant.numeric.integer.base-7.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-7.erlang' ], - regex: '(7)(#)([0-6]+)' }, - { token: - [ 'constant.numeric.integer.octal.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.octal.erlang' ], - regex: '(8)(#)([0-7]+)' }, - { token: - [ 'constant.numeric.integer.base-9.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-9.erlang' ], - regex: '(9)(#)([0-8]+)' }, - { token: - [ 'constant.numeric.integer.decimal.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.decimal.erlang' ], - regex: '(10)(#)(\\d+)' }, - { token: - [ 'constant.numeric.integer.base-11.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-11.erlang' ], - regex: '(11)(#)([\\daA]+)' }, - { token: - [ 'constant.numeric.integer.base-12.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-12.erlang' ], - regex: '(12)(#)([\\da-bA-B]+)' }, - { token: - [ 'constant.numeric.integer.base-13.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-13.erlang' ], - regex: '(13)(#)([\\da-cA-C]+)' }, - { token: - [ 'constant.numeric.integer.base-14.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-14.erlang' ], - regex: '(14)(#)([\\da-dA-D]+)' }, - { token: - [ 'constant.numeric.integer.base-15.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-15.erlang' ], - regex: '(15)(#)([\\da-eA-E]+)' }, - { token: - [ 'constant.numeric.integer.hexadecimal.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.hexadecimal.erlang' ], - regex: '(16)(#)([\\da-fA-F]+)' }, - { token: - [ 'constant.numeric.integer.base-17.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-17.erlang' ], - regex: '(17)(#)([\\da-gA-G]+)' }, - { token: - [ 'constant.numeric.integer.base-18.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-18.erlang' ], - regex: '(18)(#)([\\da-hA-H]+)' }, - { token: - [ 'constant.numeric.integer.base-19.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-19.erlang' ], - regex: '(19)(#)([\\da-iA-I]+)' }, - { token: - [ 'constant.numeric.integer.base-20.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-20.erlang' ], - regex: '(20)(#)([\\da-jA-J]+)' }, - { token: - [ 'constant.numeric.integer.base-21.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-21.erlang' ], - regex: '(21)(#)([\\da-kA-K]+)' }, - { token: - [ 'constant.numeric.integer.base-22.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-22.erlang' ], - regex: '(22)(#)([\\da-lA-L]+)' }, - { token: - [ 'constant.numeric.integer.base-23.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-23.erlang' ], - regex: '(23)(#)([\\da-mA-M]+)' }, - { token: - [ 'constant.numeric.integer.base-24.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-24.erlang' ], - regex: '(24)(#)([\\da-nA-N]+)' }, - { token: - [ 'constant.numeric.integer.base-25.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-25.erlang' ], - regex: '(25)(#)([\\da-oA-O]+)' }, - { token: - [ 'constant.numeric.integer.base-26.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-26.erlang' ], - regex: '(26)(#)([\\da-pA-P]+)' }, - { token: - [ 'constant.numeric.integer.base-27.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-27.erlang' ], - regex: '(27)(#)([\\da-qA-Q]+)' }, - { token: - [ 'constant.numeric.integer.base-28.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-28.erlang' ], - regex: '(28)(#)([\\da-rA-R]+)' }, - { token: - [ 'constant.numeric.integer.base-29.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-29.erlang' ], - regex: '(29)(#)([\\da-sA-S]+)' }, - { token: - [ 'constant.numeric.integer.base-30.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-30.erlang' ], - regex: '(30)(#)([\\da-tA-T]+)' }, - { token: - [ 'constant.numeric.integer.base-31.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-31.erlang' ], - regex: '(31)(#)([\\da-uA-U]+)' }, - { token: - [ 'constant.numeric.integer.base-32.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-32.erlang' ], - regex: '(32)(#)([\\da-vA-V]+)' }, - { token: - [ 'constant.numeric.integer.base-33.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-33.erlang' ], - regex: '(33)(#)([\\da-wA-W]+)' }, - { token: - [ 'constant.numeric.integer.base-34.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-34.erlang' ], - regex: '(34)(#)([\\da-xA-X]+)' }, - { token: - [ 'constant.numeric.integer.base-35.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-35.erlang' ], - regex: '(35)(#)([\\da-yA-Y]+)' }, - { token: - [ 'constant.numeric.integer.base-36.erlang', - 'punctuation.separator.base-integer.erlang', - 'constant.numeric.integer.base-36.erlang' ], - regex: '(36)(#)([\\da-zA-Z]+)' }, - { token: 'invalid.illegal.integer.erlang', - regex: '\\d+#[\\da-zA-Z]+' }, - { token: 'constant.numeric.integer.decimal.erlang', - regex: '\\d+' } ] } ], - '#parenthesized-expression': - [ { token: 'punctuation.section.expression.begin.erlang', - regex: '\\(', - push: - [ { token: 'punctuation.section.expression.end.erlang', - regex: '\\)', - next: 'pop' }, - { include: '#everything-else' }, - { defaultToken: 'meta.expression.parenthesized' } ] } ], - '#record-directive': - [ { token: - [ 'meta.directive.record.erlang', - 'punctuation.section.directive.begin.erlang', - 'meta.directive.record.erlang', - 'keyword.control.directive.import.erlang', - 'meta.directive.record.erlang', - 'punctuation.definition.parameters.begin.erlang', - 'meta.directive.record.erlang', - 'entity.name.type.class.record.definition.erlang', - 'meta.directive.record.erlang', - 'punctuation.separator.parameters.erlang' ], - regex: '^(\\s*)(-)(\\s*)(record)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(,)', - push: - [ { token: - [ 'punctuation.definition.class.record.end.erlang', - 'meta.directive.record.erlang', - 'punctuation.definition.parameters.end.erlang', - 'meta.directive.record.erlang', - 'punctuation.section.directive.end.erlang' ], - regex: '(\\})(\\s*)(\\))(\\s*)(\\.)', - next: 'pop' }, - { include: '#internal-record-body' }, - { defaultToken: 'meta.directive.record.erlang' } ] } ], - '#record-usage': - [ { token: - [ 'keyword.operator.record.erlang', - 'meta.record-usage.erlang', - 'entity.name.type.class.record.erlang', - 'meta.record-usage.erlang', - 'punctuation.separator.record-field.erlang', - 'meta.record-usage.erlang', - 'variable.other.field.erlang' ], - regex: '(#)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(\\.)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')' }, - { token: - [ 'keyword.operator.record.erlang', - 'meta.record-usage.erlang', - 'entity.name.type.class.record.erlang' ], - regex: '(#)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')', - push: - [ { token: 'punctuation.definition.class.record.end.erlang', - regex: '\\}', - next: 'pop' }, - { include: '#internal-record-body' }, - { defaultToken: 'meta.record-usage.erlang' } ] } ], - '#string': - [ { token: 'punctuation.definition.string.begin.erlang', - regex: '"', - push: - [ { token: 'punctuation.definition.string.end.erlang', - regex: '"', - next: 'pop' }, - { token: - [ 'punctuation.definition.escape.erlang', - 'constant.character.escape.erlang', - 'punctuation.definition.escape.erlang', - 'constant.character.escape.erlang', - 'constant.character.escape.erlang' ], - regex: '(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' }, - { token: 'invalid.illegal.string.erlang', regex: '\\\\\\^?.?' }, - { token: - [ 'punctuation.definition.placeholder.erlang', - 'punctuation.separator.placeholder-parts.erlang', - 'constant.other.placeholder.erlang', - 'punctuation.separator.placeholder-parts.erlang', - 'punctuation.separator.placeholder-parts.erlang', - 'constant.other.placeholder.erlang', - 'punctuation.separator.placeholder-parts.erlang', - 'punctuation.separator.placeholder-parts.erlang', - 'punctuation.separator.placeholder-parts.erlang', - 'constant.other.placeholder.erlang', - 'constant.other.placeholder.erlang' ], - regex: '(~)(?:((?:\\-)?)(\\d+)|(\\*))?(?:(\\.)(?:(\\d+)|(\\*)))?(?:(\\.)(?:(\\*)|(.)))?([~cfegswpWPBX#bx\\+ni])' }, - { token: - [ 'punctuation.definition.placeholder.erlang', - 'punctuation.separator.placeholder-parts.erlang', - 'constant.other.placeholder.erlang', - 'constant.other.placeholder.erlang' ], - regex: '(~)((?:\\*)?)((?:\\d+)?)([~du\\-#fsacl])' }, - { token: 'invalid.illegal.string.erlang', regex: '~.?' }, - { defaultToken: 'string.quoted.double.erlang' } ] } ], - '#symbolic-operator': - [ { token: 'keyword.operator.symbolic.erlang', - regex: '\\+\\+|\\+|--|-|\\*|/=|/|=/=|=:=|==|=<|=|<-|<|>=|>|!|::' } ], - '#textual-operator': - [ { token: 'keyword.operator.textual.erlang', - regex: '\\b(?:andalso|band|and|bxor|xor|bor|orelse|or|bnot|not|bsl|bsr|div|rem)\\b' } ], - '#tuple': - [ { token: 'punctuation.definition.tuple.begin.erlang', - regex: '\\{', - push: - [ { token: 'punctuation.definition.tuple.end.erlang', - regex: '\\}', - next: 'pop' }, - { token: 'punctuation.separator.tuple.erlang', regex: ',' }, - { include: '#everything-else' }, - { defaultToken: 'meta.structure.tuple.erlang' } ] } ], - '#variable': - [ { token: [ 'variable.other.erlang', 'variable.language.omitted.erlang' ], - regex: '(_[a-zA-Z\\d@_]+|[A-Z][a-zA-Z\\d@_]*)|(_)' } ] } - - this.normalizeRules(); -}; - -ErlangHighlightRules.metaData = { comment: 'The recognition of function definitions and compiler directives (such as module, record and macro definitions) requires that each of the aforementioned constructs must be the first string inside a line (except for whitespace). Also, the function/module/record/macro names must be given unquoted. -- desp', - fileTypes: [ 'erl', 'hrl' ], - keyEquivalent: '^~E', - name: 'Erlang', - scopeName: 'source.erlang' } - - -oop.inherits(ErlangHighlightRules, TextHighlightRules); - -exports.ErlangHighlightRules = ErlangHighlightRules; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/erlang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/erlang_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var ErlangHighlightRules = require("./erlang_highlight_rules").ErlangHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = ErlangHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "%"; - this.blockComment = {start: "/*", end: "*/"}; - this.$id = "ace/mode/erlang"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/erlang_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,n,t){"use strict";var r=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{include:"#module-directive"},{include:"#import-export-directive"},{include:"#behaviour-directive"},{include:"#record-directive"},{include:"#define-directive"},{include:"#macro-directive"},{include:"#directive"},{include:"#function"},{include:"#everything-else"}],"#atom":[{token:"punctuation.definition.symbol.begin.erlang",regex:"'",push:[{token:"punctuation.definition.symbol.end.erlang",regex:"'",next:"pop"},{token:["punctuation.definition.escape.erlang","constant.other.symbol.escape.erlang","punctuation.definition.escape.erlang","constant.other.symbol.escape.erlang","constant.other.symbol.escape.erlang"],regex:"(\\\\)(?:([bdefnrstv\\\\'\"])|(\\^)([@-_])|([0-7]{1,3}))"},{token:"invalid.illegal.atom.erlang",regex:"\\\\\\^?.?"},{defaultToken:"constant.other.symbol.quoted.single.erlang"}]},{token:"constant.other.symbol.unquoted.erlang",regex:"[a-z][a-zA-Z\\d@_]*"}],"#behaviour-directive":[{token:["meta.directive.behaviour.erlang","punctuation.section.directive.begin.erlang","meta.directive.behaviour.erlang","keyword.control.directive.behaviour.erlang","meta.directive.behaviour.erlang","punctuation.definition.parameters.begin.erlang","meta.directive.behaviour.erlang","entity.name.type.class.behaviour.definition.erlang","meta.directive.behaviour.erlang","punctuation.definition.parameters.end.erlang","meta.directive.behaviour.erlang","punctuation.section.directive.end.erlang"],regex:"^(\\s*)(-)(\\s*)(behaviour)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)"}],"#binary":[{token:"punctuation.definition.binary.begin.erlang",regex:"<<",push:[{token:"punctuation.definition.binary.end.erlang",regex:">>",next:"pop"},{token:["punctuation.separator.binary.erlang","punctuation.separator.value-size.erlang"],regex:"(,)|(:)"},{include:"#internal-type-specifiers"},{include:"#everything-else"},{defaultToken:"meta.structure.binary.erlang"}]}],"#character":[{token:["punctuation.definition.character.erlang","punctuation.definition.escape.erlang","constant.character.escape.erlang","punctuation.definition.escape.erlang","constant.character.escape.erlang","constant.character.escape.erlang"],regex:"(\\$)(\\\\)(?:([bdefnrstv\\\\'\"])|(\\^)([@-_])|([0-7]{1,3}))"},{token:"invalid.illegal.character.erlang",regex:"\\$\\\\\\^?.?"},{token:["punctuation.definition.character.erlang","constant.character.erlang"],regex:"(\\$)(\\S)"},{token:"invalid.illegal.character.erlang",regex:"\\$.?"}],"#comment":[{token:"punctuation.definition.comment.erlang",regex:"%.*$",push_:[{token:"comment.line.percentage.erlang",regex:"$",next:"pop"},{defaultToken:"comment.line.percentage.erlang"}]}],"#define-directive":[{token:["meta.directive.define.erlang","punctuation.section.directive.begin.erlang","meta.directive.define.erlang","keyword.control.directive.define.erlang","meta.directive.define.erlang","punctuation.definition.parameters.begin.erlang","meta.directive.define.erlang","entity.name.function.macro.definition.erlang","meta.directive.define.erlang","punctuation.separator.parameters.erlang"],regex:"^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(,)",push:[{token:["punctuation.definition.parameters.end.erlang","meta.directive.define.erlang","punctuation.section.directive.end.erlang"],regex:"(\\))(\\s*)(\\.)",next:"pop"},{include:"#everything-else"},{defaultToken:"meta.directive.define.erlang"}]},{token:"meta.directive.define.erlang",regex:"(?=^\\s*-\\s*define\\s*\\(\\s*[a-zA-Z\\d@_]+\\s*\\()",push:[{token:["punctuation.definition.parameters.end.erlang","meta.directive.define.erlang","punctuation.section.directive.end.erlang"],regex:"(\\))(\\s*)(\\.)",next:"pop"},{token:["text","punctuation.section.directive.begin.erlang","text","keyword.control.directive.define.erlang","text","punctuation.definition.parameters.begin.erlang","text","entity.name.function.macro.definition.erlang","text","punctuation.definition.parameters.begin.erlang"],regex:"^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\()",push:[{token:["punctuation.definition.parameters.end.erlang","text","punctuation.separator.parameters.erlang"],regex:"(\\))(\\s*)(,)",next:"pop"},{token:"punctuation.separator.parameters.erlang",regex:","},{include:"#everything-else"}]},{token:"punctuation.separator.define.erlang",regex:"\\|\\||\\||:|;|,|\\.|->"},{include:"#everything-else"},{defaultToken:"meta.directive.define.erlang"}]}],"#directive":[{token:["meta.directive.erlang","punctuation.section.directive.begin.erlang","meta.directive.erlang","keyword.control.directive.erlang","meta.directive.erlang","punctuation.definition.parameters.begin.erlang"],regex:"^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\(?)",push:[{token:["punctuation.definition.parameters.end.erlang","meta.directive.erlang","punctuation.section.directive.end.erlang"],regex:"(\\)?)(\\s*)(\\.)",next:"pop"},{include:"#everything-else"},{defaultToken:"meta.directive.erlang"}]},{token:["meta.directive.erlang","punctuation.section.directive.begin.erlang","meta.directive.erlang","keyword.control.directive.erlang","meta.directive.erlang","punctuation.section.directive.end.erlang"],regex:"^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\.)"}],"#everything-else":[{include:"#comment"},{include:"#record-usage"},{include:"#macro-usage"},{include:"#expression"},{include:"#keyword"},{include:"#textual-operator"},{include:"#function-call"},{include:"#tuple"},{include:"#list"},{include:"#binary"},{include:"#parenthesized-expression"},{include:"#character"},{include:"#number"},{include:"#atom"},{include:"#string"},{include:"#symbolic-operator"},{include:"#variable"}],"#expression":[{token:"keyword.control.if.erlang",regex:"\\bif\\b",push:[{token:"keyword.control.end.erlang",regex:"\\bend\\b",next:"pop"},{include:"#internal-expression-punctuation"},{include:"#everything-else"},{defaultToken:"meta.expression.if.erlang"}]},{token:"keyword.control.case.erlang",regex:"\\bcase\\b",push:[{token:"keyword.control.end.erlang",regex:"\\bend\\b",next:"pop"},{include:"#internal-expression-punctuation"},{include:"#everything-else"},{defaultToken:"meta.expression.case.erlang"}]},{token:"keyword.control.receive.erlang",regex:"\\breceive\\b",push:[{token:"keyword.control.end.erlang",regex:"\\bend\\b",next:"pop"},{include:"#internal-expression-punctuation"},{include:"#everything-else"},{defaultToken:"meta.expression.receive.erlang"}]},{token:["keyword.control.fun.erlang","text","entity.name.type.class.module.erlang","text","punctuation.separator.module-function.erlang","text","entity.name.function.erlang","text","punctuation.separator.function-arity.erlang"],regex:"\\b(fun)(\\s*)(?:([a-z][a-zA-Z\\d@_]*)(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*)(\\s*)(/)"},{token:"keyword.control.fun.erlang",regex:"\\bfun\\b",push:[{token:"keyword.control.end.erlang",regex:"\\bend\\b",next:"pop"},{token:"text",regex:"(?=\\()",push:[{token:"punctuation.separator.clauses.erlang",regex:";|(?=\\bend\\b)",next:"pop"},{include:"#internal-function-parts"}]},{include:"#everything-else"},{defaultToken:"meta.expression.fun.erlang"}]},{token:"keyword.control.try.erlang",regex:"\\btry\\b",push:[{token:"keyword.control.end.erlang",regex:"\\bend\\b",next:"pop"},{include:"#internal-expression-punctuation"},{include:"#everything-else"},{defaultToken:"meta.expression.try.erlang"}]},{token:"keyword.control.begin.erlang",regex:"\\bbegin\\b",push:[{token:"keyword.control.end.erlang",regex:"\\bend\\b",next:"pop"},{include:"#internal-expression-punctuation"},{include:"#everything-else"},{defaultToken:"meta.expression.begin.erlang"}]},{token:"keyword.control.query.erlang",regex:"\\bquery\\b",push:[{token:"keyword.control.end.erlang",regex:"\\bend\\b",next:"pop"},{include:"#everything-else"},{defaultToken:"meta.expression.query.erlang"}]}],"#function":[{token:["meta.function.erlang","entity.name.function.definition.erlang","meta.function.erlang"],regex:"^(\\s*)([a-z][a-zA-Z\\d@_]*|'[^']*')(\\s*)(?=\\()",push:[{token:"punctuation.terminator.function.erlang",regex:"\\.",next:"pop"},{token:["text","entity.name.function.erlang","text"],regex:"^(\\s*)([a-z][a-zA-Z\\d@_]*|'[^']*')(\\s*)(?=\\()"},{token:"text",regex:"(?=\\()",push:[{token:"punctuation.separator.clauses.erlang",regex:";|(?=\\.)",next:"pop"},{include:"#parenthesized-expression"},{include:"#internal-function-parts"}]},{include:"#everything-else"},{defaultToken:"meta.function.erlang"}]}],"#function-call":[{token:"meta.function-call.erlang",regex:"(?=(?:[a-z][a-zA-Z\\d@_]*|'[^']*')\\s*(?:\\(|:\\s*(?:[a-z][a-zA-Z\\d@_]*|'[^']*')\\s*\\())",push:[{token:"punctuation.definition.parameters.end.erlang",regex:"\\)",next:"pop"},{token:["entity.name.type.class.module.erlang","text","punctuation.separator.module-function.erlang","text","entity.name.function.guard.erlang","text","punctuation.definition.parameters.begin.erlang"],regex:"(?:(erlang)(\\s*)(:)(\\s*))?(is_atom|is_binary|is_constant|is_float|is_function|is_integer|is_list|is_number|is_pid|is_port|is_reference|is_tuple|is_record|abs|element|hd|length|node|round|self|size|tl|trunc)(\\s*)(\\()",push:[{token:"text",regex:"(?=\\))",next:"pop"},{token:"punctuation.separator.parameters.erlang",regex:","},{include:"#everything-else"}]},{token:["entity.name.type.class.module.erlang","text","punctuation.separator.module-function.erlang","text","entity.name.function.erlang","text","punctuation.definition.parameters.begin.erlang"],regex:"(?:([a-z][a-zA-Z\\d@_]*|'[^']*')(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*|'[^']*')(\\s*)(\\()",push:[{token:"text",regex:"(?=\\))",next:"pop"},{token:"punctuation.separator.parameters.erlang",regex:","},{include:"#everything-else"}]},{defaultToken:"meta.function-call.erlang"}]}],"#import-export-directive":[{token:["meta.directive.import.erlang","punctuation.section.directive.begin.erlang","meta.directive.import.erlang","keyword.control.directive.import.erlang","meta.directive.import.erlang","punctuation.definition.parameters.begin.erlang","meta.directive.import.erlang","entity.name.type.class.module.erlang","meta.directive.import.erlang","punctuation.separator.parameters.erlang"],regex:"^(\\s*)(-)(\\s*)(import)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|'[^']*')(\\s*)(,)",push:[{token:["punctuation.definition.parameters.end.erlang","meta.directive.import.erlang","punctuation.section.directive.end.erlang"],regex:"(\\))(\\s*)(\\.)",next:"pop"},{include:"#internal-function-list"},{defaultToken:"meta.directive.import.erlang"}]},{token:["meta.directive.export.erlang","punctuation.section.directive.begin.erlang","meta.directive.export.erlang","keyword.control.directive.export.erlang","meta.directive.export.erlang","punctuation.definition.parameters.begin.erlang"],regex:"^(\\s*)(-)(\\s*)(export)(\\s*)(\\()",push:[{token:["punctuation.definition.parameters.end.erlang","meta.directive.export.erlang","punctuation.section.directive.end.erlang"],regex:"(\\))(\\s*)(\\.)",next:"pop"},{include:"#internal-function-list"},{defaultToken:"meta.directive.export.erlang"}]}],"#internal-expression-punctuation":[{token:["punctuation.separator.clause-head-body.erlang","punctuation.separator.clauses.erlang","punctuation.separator.expressions.erlang"],regex:"(->)|(;)|(,)"}],"#internal-function-list":[{token:"punctuation.definition.list.begin.erlang",regex:"\\[",push:[{token:"punctuation.definition.list.end.erlang",regex:"\\]",next:"pop"},{token:["entity.name.function.erlang","text","punctuation.separator.function-arity.erlang"],regex:"([a-z][a-zA-Z\\d@_]*|'[^']*')(\\s*)(/)",push:[{token:"punctuation.separator.list.erlang",regex:",|(?=\\])",next:"pop"},{include:"#everything-else"}]},{include:"#everything-else"},{defaultToken:"meta.structure.list.function.erlang"}]}],"#internal-function-parts":[{token:"text",regex:"(?=\\()",push:[{token:"punctuation.separator.clause-head-body.erlang",regex:"->",next:"pop"},{token:"punctuation.definition.parameters.begin.erlang",regex:"\\(",push:[{token:"punctuation.definition.parameters.end.erlang",regex:"\\)",next:"pop"},{token:"punctuation.separator.parameters.erlang",regex:","},{include:"#everything-else"}]},{token:"punctuation.separator.guards.erlang",regex:",|;"},{include:"#everything-else"}]},{token:"punctuation.separator.expressions.erlang",regex:","},{include:"#everything-else"}],"#internal-record-body":[{token:"punctuation.definition.class.record.begin.erlang",regex:"\\{",push:[{token:"meta.structure.record.erlang",regex:"(?=\\})",next:"pop"},{token:["variable.other.field.erlang","variable.language.omitted.field.erlang","text","keyword.operator.assignment.erlang"],regex:"(?:([a-z][a-zA-Z\\d@_]*|'[^']*')|(_))(\\s*)(=|::)",push:[{token:"punctuation.separator.class.record.erlang",regex:",|(?=\\})",next:"pop"},{include:"#everything-else"}]},{token:["variable.other.field.erlang","text","punctuation.separator.class.record.erlang"],regex:"([a-z][a-zA-Z\\d@_]*|'[^']*')(\\s*)((?:,)?)"},{include:"#everything-else"},{defaultToken:"meta.structure.record.erlang"}]}],"#internal-type-specifiers":[{token:"punctuation.separator.value-type.erlang",regex:"/",push:[{token:"text",regex:"(?=,|:|>>)",next:"pop"},{token:["storage.type.erlang","storage.modifier.signedness.erlang","storage.modifier.endianness.erlang","storage.modifier.unit.erlang","punctuation.separator.type-specifiers.erlang"],regex:"(integer|float|binary|bytes|bitstring|bits)|(signed|unsigned)|(big|little|native)|(unit)|(-)"}]}],"#keyword":[{token:"keyword.control.erlang",regex:"\\b(?:after|begin|case|catch|cond|end|fun|if|let|of|query|try|receive|when)\\b"}],"#list":[{token:"punctuation.definition.list.begin.erlang",regex:"\\[",push:[{token:"punctuation.definition.list.end.erlang",regex:"\\]",next:"pop"},{token:"punctuation.separator.list.erlang",regex:"\\||\\|\\||,"},{include:"#everything-else"},{defaultToken:"meta.structure.list.erlang"}]}],"#macro-directive":[{token:["meta.directive.ifdef.erlang","punctuation.section.directive.begin.erlang","meta.directive.ifdef.erlang","keyword.control.directive.ifdef.erlang","meta.directive.ifdef.erlang","punctuation.definition.parameters.begin.erlang","meta.directive.ifdef.erlang","entity.name.function.macro.erlang","meta.directive.ifdef.erlang","punctuation.definition.parameters.end.erlang","meta.directive.ifdef.erlang","punctuation.section.directive.end.erlang"],regex:"^(\\s*)(-)(\\s*)(ifdef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)"},{token:["meta.directive.ifndef.erlang","punctuation.section.directive.begin.erlang","meta.directive.ifndef.erlang","keyword.control.directive.ifndef.erlang","meta.directive.ifndef.erlang","punctuation.definition.parameters.begin.erlang","meta.directive.ifndef.erlang","entity.name.function.macro.erlang","meta.directive.ifndef.erlang","punctuation.definition.parameters.end.erlang","meta.directive.ifndef.erlang","punctuation.section.directive.end.erlang"],regex:"^(\\s*)(-)(\\s*)(ifndef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)"},{token:["meta.directive.undef.erlang","punctuation.section.directive.begin.erlang","meta.directive.undef.erlang","keyword.control.directive.undef.erlang","meta.directive.undef.erlang","punctuation.definition.parameters.begin.erlang","meta.directive.undef.erlang","entity.name.function.macro.erlang","meta.directive.undef.erlang","punctuation.definition.parameters.end.erlang","meta.directive.undef.erlang","punctuation.section.directive.end.erlang"],regex:"^(\\s*)(-)(\\s*)(undef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)"}],"#macro-usage":[{token:["keyword.operator.macro.erlang","meta.macro-usage.erlang","entity.name.function.macro.erlang"],regex:"(\\?\\??)(\\s*)([a-zA-Z\\d@_]+)"}],"#module-directive":[{token:["meta.directive.module.erlang","punctuation.section.directive.begin.erlang","meta.directive.module.erlang","keyword.control.directive.module.erlang","meta.directive.module.erlang","punctuation.definition.parameters.begin.erlang","meta.directive.module.erlang","entity.name.type.class.module.definition.erlang","meta.directive.module.erlang","punctuation.definition.parameters.end.erlang","meta.directive.module.erlang","punctuation.section.directive.end.erlang"],regex:"^(\\s*)(-)(\\s*)(module)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)"}],"#number":[{token:"text",regex:"(?=\\d)",push:[{token:"text",regex:"(?!\\d)",next:"pop"},{token:["constant.numeric.float.erlang","punctuation.separator.integer-float.erlang","constant.numeric.float.erlang","punctuation.separator.float-exponent.erlang"],regex:"(\\d+)(\\.)(\\d+)((?:[eE][\\+\\-]?\\d+)?)"},{token:["constant.numeric.integer.binary.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.binary.erlang"],regex:"(2)(#)([0-1]+)"},{token:["constant.numeric.integer.base-3.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-3.erlang"],regex:"(3)(#)([0-2]+)"},{token:["constant.numeric.integer.base-4.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-4.erlang"],regex:"(4)(#)([0-3]+)"},{token:["constant.numeric.integer.base-5.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-5.erlang"],regex:"(5)(#)([0-4]+)"},{token:["constant.numeric.integer.base-6.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-6.erlang"],regex:"(6)(#)([0-5]+)"},{token:["constant.numeric.integer.base-7.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-7.erlang"],regex:"(7)(#)([0-6]+)"},{token:["constant.numeric.integer.octal.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.octal.erlang"],regex:"(8)(#)([0-7]+)"},{token:["constant.numeric.integer.base-9.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-9.erlang"],regex:"(9)(#)([0-8]+)"},{token:["constant.numeric.integer.decimal.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.decimal.erlang"],regex:"(10)(#)(\\d+)"},{token:["constant.numeric.integer.base-11.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-11.erlang"],regex:"(11)(#)([\\daA]+)"},{token:["constant.numeric.integer.base-12.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-12.erlang"],regex:"(12)(#)([\\da-bA-B]+)"},{token:["constant.numeric.integer.base-13.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-13.erlang"],regex:"(13)(#)([\\da-cA-C]+)"},{token:["constant.numeric.integer.base-14.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-14.erlang"],regex:"(14)(#)([\\da-dA-D]+)"},{token:["constant.numeric.integer.base-15.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-15.erlang"],regex:"(15)(#)([\\da-eA-E]+)"},{token:["constant.numeric.integer.hexadecimal.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.hexadecimal.erlang"],regex:"(16)(#)([\\da-fA-F]+)"},{token:["constant.numeric.integer.base-17.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-17.erlang"],regex:"(17)(#)([\\da-gA-G]+)"},{token:["constant.numeric.integer.base-18.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-18.erlang"],regex:"(18)(#)([\\da-hA-H]+)"},{token:["constant.numeric.integer.base-19.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-19.erlang"],regex:"(19)(#)([\\da-iA-I]+)"},{token:["constant.numeric.integer.base-20.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-20.erlang"],regex:"(20)(#)([\\da-jA-J]+)"},{token:["constant.numeric.integer.base-21.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-21.erlang"],regex:"(21)(#)([\\da-kA-K]+)"},{token:["constant.numeric.integer.base-22.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-22.erlang"],regex:"(22)(#)([\\da-lA-L]+)"},{token:["constant.numeric.integer.base-23.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-23.erlang"],regex:"(23)(#)([\\da-mA-M]+)"},{token:["constant.numeric.integer.base-24.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-24.erlang"],regex:"(24)(#)([\\da-nA-N]+)"},{token:["constant.numeric.integer.base-25.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-25.erlang"],regex:"(25)(#)([\\da-oA-O]+)"},{token:["constant.numeric.integer.base-26.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-26.erlang"],regex:"(26)(#)([\\da-pA-P]+)"},{token:["constant.numeric.integer.base-27.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-27.erlang"],regex:"(27)(#)([\\da-qA-Q]+)"},{token:["constant.numeric.integer.base-28.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-28.erlang"],regex:"(28)(#)([\\da-rA-R]+)"},{token:["constant.numeric.integer.base-29.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-29.erlang"],regex:"(29)(#)([\\da-sA-S]+)"},{token:["constant.numeric.integer.base-30.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-30.erlang"],regex:"(30)(#)([\\da-tA-T]+)"},{token:["constant.numeric.integer.base-31.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-31.erlang"],regex:"(31)(#)([\\da-uA-U]+)"},{token:["constant.numeric.integer.base-32.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-32.erlang"],regex:"(32)(#)([\\da-vA-V]+)"},{token:["constant.numeric.integer.base-33.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-33.erlang"],regex:"(33)(#)([\\da-wA-W]+)"},{token:["constant.numeric.integer.base-34.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-34.erlang"],regex:"(34)(#)([\\da-xA-X]+)"},{token:["constant.numeric.integer.base-35.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-35.erlang"],regex:"(35)(#)([\\da-yA-Y]+)"},{token:["constant.numeric.integer.base-36.erlang","punctuation.separator.base-integer.erlang","constant.numeric.integer.base-36.erlang"],regex:"(36)(#)([\\da-zA-Z]+)"},{token:"invalid.illegal.integer.erlang",regex:"\\d+#[\\da-zA-Z]+"},{token:"constant.numeric.integer.decimal.erlang",regex:"\\d+"}]}],"#parenthesized-expression":[{token:"punctuation.section.expression.begin.erlang",regex:"\\(",push:[{token:"punctuation.section.expression.end.erlang",regex:"\\)",next:"pop"},{include:"#everything-else"},{defaultToken:"meta.expression.parenthesized"}]}],"#record-directive":[{token:["meta.directive.record.erlang","punctuation.section.directive.begin.erlang","meta.directive.record.erlang","keyword.control.directive.import.erlang","meta.directive.record.erlang","punctuation.definition.parameters.begin.erlang","meta.directive.record.erlang","entity.name.type.class.record.definition.erlang","meta.directive.record.erlang","punctuation.separator.parameters.erlang"],regex:"^(\\s*)(-)(\\s*)(record)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|'[^']*')(\\s*)(,)",push:[{token:["punctuation.definition.class.record.end.erlang","meta.directive.record.erlang","punctuation.definition.parameters.end.erlang","meta.directive.record.erlang","punctuation.section.directive.end.erlang"],regex:"(\\})(\\s*)(\\))(\\s*)(\\.)",next:"pop"},{include:"#internal-record-body"},{defaultToken:"meta.directive.record.erlang"}]}],"#record-usage":[{token:["keyword.operator.record.erlang","meta.record-usage.erlang","entity.name.type.class.record.erlang","meta.record-usage.erlang","punctuation.separator.record-field.erlang","meta.record-usage.erlang","variable.other.field.erlang"],regex:"(#)(\\s*)([a-z][a-zA-Z\\d@_]*|'[^']*')(\\s*)(\\.)(\\s*)([a-z][a-zA-Z\\d@_]*|'[^']*')"},{token:["keyword.operator.record.erlang","meta.record-usage.erlang","entity.name.type.class.record.erlang"],regex:"(#)(\\s*)([a-z][a-zA-Z\\d@_]*|'[^']*')",push:[{token:"punctuation.definition.class.record.end.erlang",regex:"\\}",next:"pop"},{include:"#internal-record-body"},{defaultToken:"meta.record-usage.erlang"}]}],"#string":[{token:"punctuation.definition.string.begin.erlang",regex:'"',push:[{token:"punctuation.definition.string.end.erlang",regex:'"',next:"pop"},{token:["punctuation.definition.escape.erlang","constant.character.escape.erlang","punctuation.definition.escape.erlang","constant.character.escape.erlang","constant.character.escape.erlang"],regex:"(\\\\)(?:([bdefnrstv\\\\'\"])|(\\^)([@-_])|([0-7]{1,3}))"},{token:"invalid.illegal.string.erlang",regex:"\\\\\\^?.?"},{token:["punctuation.definition.placeholder.erlang","punctuation.separator.placeholder-parts.erlang","constant.other.placeholder.erlang","punctuation.separator.placeholder-parts.erlang","punctuation.separator.placeholder-parts.erlang","constant.other.placeholder.erlang","punctuation.separator.placeholder-parts.erlang","punctuation.separator.placeholder-parts.erlang","punctuation.separator.placeholder-parts.erlang","constant.other.placeholder.erlang","constant.other.placeholder.erlang"],regex:"(~)(?:((?:\\-)?)(\\d+)|(\\*))?(?:(\\.)(?:(\\d+)|(\\*)))?(?:(\\.)(?:(\\*)|(.)))?([~cfegswpWPBX#bx\\+ni])"},{token:["punctuation.definition.placeholder.erlang","punctuation.separator.placeholder-parts.erlang","constant.other.placeholder.erlang","constant.other.placeholder.erlang"],regex:"(~)((?:\\*)?)((?:\\d+)?)([~du\\-#fsacl])"},{token:"invalid.illegal.string.erlang",regex:"~.?"},{defaultToken:"string.quoted.double.erlang"}]}],"#symbolic-operator":[{token:"keyword.operator.symbolic.erlang",regex:"\\+\\+|\\+|--|-|\\*|/=|/|=/=|=:=|==|=<|=|<-|<|>=|>|!|::"}],"#textual-operator":[{token:"keyword.operator.textual.erlang",regex:"\\b(?:andalso|band|and|bxor|xor|bor|orelse|or|bnot|not|bsl|bsr|div|rem)\\b"}],"#tuple":[{token:"punctuation.definition.tuple.begin.erlang",regex:"\\{",push:[{token:"punctuation.definition.tuple.end.erlang",regex:"\\}",next:"pop"},{token:"punctuation.separator.tuple.erlang",regex:","},{include:"#everything-else"},{defaultToken:"meta.structure.tuple.erlang"}]}],"#variable":[{token:["variable.other.erlang","variable.language.omitted.erlang"],regex:"(_[a-zA-Z\\d@_]+|[A-Z][a-zA-Z\\d@_]*)|(_)"}]},this.normalizeRules()};i.metaData={comment:"The recognition of function definitions and compiler directives (such as module, record and macro definitions) requires that each of the aforementioned constructs must be the first string inside a line (except for whitespace). Also, the function/module/record/macro names must be given unquoted. -- desp",fileTypes:["erl","hrl"],keyEquivalent:"^~E",name:"Erlang",scopeName:"source.erlang"},r.inherits(i,a),n.ErlangHighlightRules=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,n,t){"use strict";var r=e("../../lib/oop"),a=e("../../range").Range,i=e("./fold_mode").FoldMode,o=n.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(o,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,n,t){var r=e.getLine(t);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var a=this._getFoldWidgetBase(e,n,t);return!a&&this.startRegionRe.test(r)?"start":a},this.getFoldWidgetRange=function(e,n,t,r){var a=e.getLine(t);if(this.startRegionRe.test(a))return this.getCommentRegionBlock(e,a,t);var i=a.match(this.foldingStartMarker);if(i){var o=i.index;if(i[1])return this.openingBracketBlock(e,i[1],t,o);var g=e.getCommentFoldRange(t,o+i[0].length,1);return g&&!g.isMultiLine()&&(r?g=this.getSectionRange(e,t):"all"!=n&&(g=null)),g}if("markbegin"!==n){var i=a.match(this.foldingStopMarker);if(i){var o=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],t,o):e.getCommentFoldRange(t,o,-1)}}},this.getSectionRange=function(e,n){var t=e.getLine(n),r=t.search(/\S/),i=n,o=t.length;n+=1;for(var g=n,l=e.getLength();++nc)break;var s=this.getFoldWidgetRange(e,"all",n);if(s){if(s.start.row<=i)break;if(s.isMultiLine())n=s.end.row;else if(r==c)break}g=n}}return new a(i,o,g,e.getLine(g).length)},this.getCommentRegionBlock=function(e,n,t){for(var r=n.search(/\s*$/),i=e.getLength(),o=t,g=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++to)return new a(o,r,s,n.length)}}.call(o.prototype)}),define("ace/mode/erlang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/erlang_highlight_rules","ace/mode/folding/cstyle"],function(e,n,t){"use strict";var r=e("../lib/oop"),a=e("./text").Mode,i=e("./erlang_highlight_rules").ErlangHighlightRules,o=e("./folding/cstyle").FoldMode,g=function(){this.HighlightRules=i,this.foldingRules=new o};r.inherits(g,a),function(){this.lineCommentStart="%",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/erlang"}.call(g.prototype),n.Mode=g}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-forth.js b/www/js/vendor/ace/mode-forth.js index b5bdf61f8..028208906 100755 --- a/www/js/vendor/ace/mode-forth.js +++ b/www/js/vendor/ace/mode-forth.js @@ -1,290 +1 @@ -define("ace/mode/forth_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var ForthHighlightRules = function() { - - this.$rules = { start: [ { include: '#forth' } ], - '#comment': - [ { token: 'comment.line.double-dash.forth', - regex: '(?:^|\\s)--\\s.*$', - comment: 'line comments for iForth' }, - { token: 'comment.line.backslash.forth', - regex: '(?:^|\\s)\\\\[\\s\\S]*$', - comment: 'ANSI line comment' }, - { token: 'comment.line.backslash-g.forth', - regex: '(?:^|\\s)\\\\[Gg] .*$', - comment: 'gForth line comment' }, - { token: 'comment.block.forth', - regex: '(?:^|\\s)\\(\\*(?=\\s|$)', - push: - [ { token: 'comment.block.forth', - regex: '(?:^|\\s)\\*\\)(?=\\s|$)', - next: 'pop' }, - { defaultToken: 'comment.block.forth' } ], - comment: 'multiline comments for iForth' }, - { token: 'comment.block.documentation.forth', - regex: '\\bDOC\\b', - caseInsensitive: true, - push: - [ { token: 'comment.block.documentation.forth', - regex: '\\bENDDOC\\b', - caseInsensitive: true, - next: 'pop' }, - { defaultToken: 'comment.block.documentation.forth' } ], - comment: 'documentation comments for iForth' }, - { token: 'comment.line.parentheses.forth', - regex: '(?:^|\\s)\\.?\\( [^)]*\\)', - comment: 'ANSI line comment' } ], - '#constant': - [ { token: 'constant.language.forth', - regex: '(?:^|\\s)(?:TRUE|FALSE|BL|PI|CELL|C/L|R/O|W/O|R/W)(?=\\s|$)', - caseInsensitive: true}, - { token: 'constant.numeric.forth', - regex: '(?:^|\\s)[$#%]?[-+]?[0-9]+(?:\\.[0-9]*e-?[0-9]+|\\.?[0-9a-fA-F]*)(?=\\s|$)'}, - { token: 'constant.character.forth', - regex: '(?:^|\\s)(?:[&^]\\S|(?:"|\')\\S(?:"|\'))(?=\\s|$)'}], - '#forth': - [ { include: '#constant' }, - { include: '#comment' }, - { include: '#string' }, - { include: '#word' }, - { include: '#variable' }, - { include: '#storage' }, - { include: '#word-def' } ], - '#storage': - [ { token: 'storage.type.forth', - regex: '(?:^|\\s)(?:2CONSTANT|2VARIABLE|ALIAS|CONSTANT|CREATE-INTERPRET/COMPILE[:]?|CREATE|DEFER|FCONSTANT|FIELD|FVARIABLE|USER|VALUE|VARIABLE|VOCABULARY)(?=\\s|$)', - caseInsensitive: true}], - '#string': - [ { token: 'string.quoted.double.forth', - regex: '(ABORT" |BREAK" |\\." |C" |0"|S\\\\?" )([^"]+")', - caseInsensitive: true}, - { token: 'string.unquoted.forth', - regex: '(?:INCLUDE|NEEDS|REQUIRE|USE)[ ]\\S+(?=\\s|$)', - caseInsensitive: true}], - '#variable': - [ { token: 'variable.language.forth', - regex: '\\b(?:I|J)\\b', - caseInsensitive: true } ], - '#word': - [ { token: 'keyword.control.immediate.forth', - regex: '(?:^|\\s)\\[(?:\\?DO|\\+LOOP|AGAIN|BEGIN|DEFINED|DO|ELSE|ENDIF|FOR|IF|IFDEF|IFUNDEF|LOOP|NEXT|REPEAT|THEN|UNTIL|WHILE)\\](?=\\s|$)', - caseInsensitive: true}, - { token: 'keyword.other.immediate.forth', - regex: '(?:^|\\s)(?:COMPILE-ONLY|IMMEDIATE|IS|RESTRICT|TO|WHAT\'S|])(?=\\s|$)', - caseInsensitive: true}, - { token: 'keyword.control.compile-only.forth', - regex: '(?:^|\\s)(?:-DO|\\-LOOP|\\?DO|\\?LEAVE|\\+DO|\\+LOOP|ABORT\\"|AGAIN|AHEAD|BEGIN|CASE|DO|ELSE|ENDCASE|ENDIF|ENDOF|ENDTRY\\-IFERROR|ENDTRY|FOR|IF|IFERROR|LEAVE|LOOP|NEXT|RECOVER|REPEAT|RESTORE|THEN|TRY|U\\-DO|U\\+DO|UNTIL|WHILE)(?=\\s|$)', - caseInsensitive: true}, - { token: 'keyword.other.compile-only.forth', - regex: '(?:^|\\s)(?:\\?DUP-0=-IF|\\?DUP-IF|\\)|\\[|\\[\'\\]|\\[CHAR\\]|\\[COMPILE\\]|\\[IS\\]|\\[TO\\]||DEFERS|DOES>|INTERPRETATION>|OF|POSTPONE)(?=\\s|$)', - caseInsensitive: true}, - { token: 'keyword.other.non-immediate.forth', - regex: '(?:^|\\s)(?:\'|||CHAR|END-STRUCT|INCLUDE[D]?|LOAD|NEEDS|REQUIRE[D]?|REVISION|SEE|STRUCT|THRU|USE)(?=\\s|$)', - caseInsensitive: true}, - { token: 'keyword.other.warning.forth', - regex: '(?:^|\\s)(?:~~|BREAK:|BREAK"|DBG)(?=\\s|$)', - caseInsensitive: true}], - '#word-def': - [ { token: - [ 'keyword.other.compile-only.forth', - 'keyword.other.compile-only.forth', - 'meta.block.forth', - 'entity.name.function.forth' ], - regex: '(:NONAME)|(^:|\\s:)(\\s)(\\S+)(?=\\s|$)', - caseInsensitive: true, - push: - [ { token: 'keyword.other.compile-only.forth', - regex: ';(?:CODE)?', - caseInsensitive: true, - next: 'pop' }, - { include: '#constant' }, - { include: '#comment' }, - { include: '#string' }, - { include: '#word' }, - { include: '#variable' }, - { include: '#storage' }, - { defaultToken: 'meta.block.forth' } ] } ] } - - this.normalizeRules(); -}; - -ForthHighlightRules.metaData = { fileTypes: [ 'frt', 'fs', 'ldr' ], - foldingStartMarker: '/\\*\\*|\\{\\s*$', - foldingStopMarker: '\\*\\*/|^\\s*\\}', - keyEquivalent: '^~F', - name: 'Forth', - scopeName: 'source.forth' } - - -oop.inherits(ForthHighlightRules, TextHighlightRules); - -exports.ForthHighlightRules = ForthHighlightRules; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/forth",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/forth_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var ForthHighlightRules = require("./forth_highlight_rules").ForthHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = ForthHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "--"; - this.blockComment = {start: "/*", end: "*/"}; - this.$id = "ace/mode/forth"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/forth_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,o){"use strict";var n=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{include:"#forth"}],"#comment":[{token:"comment.line.double-dash.forth",regex:"(?:^|\\s)--\\s.*$",comment:"line comments for iForth"},{token:"comment.line.backslash.forth",regex:"(?:^|\\s)\\\\[\\s\\S]*$",comment:"ANSI line comment"},{token:"comment.line.backslash-g.forth",regex:"(?:^|\\s)\\\\[Gg] .*$",comment:"gForth line comment"},{token:"comment.block.forth",regex:"(?:^|\\s)\\(\\*(?=\\s|$)",push:[{token:"comment.block.forth",regex:"(?:^|\\s)\\*\\)(?=\\s|$)",next:"pop"},{defaultToken:"comment.block.forth"}],comment:"multiline comments for iForth"},{token:"comment.block.documentation.forth",regex:"\\bDOC\\b",caseInsensitive:!0,push:[{token:"comment.block.documentation.forth",regex:"\\bENDDOC\\b",caseInsensitive:!0,next:"pop"},{defaultToken:"comment.block.documentation.forth"}],comment:"documentation comments for iForth"},{token:"comment.line.parentheses.forth",regex:"(?:^|\\s)\\.?\\( [^)]*\\)",comment:"ANSI line comment"}],"#constant":[{token:"constant.language.forth",regex:"(?:^|\\s)(?:TRUE|FALSE|BL|PI|CELL|C/L|R/O|W/O|R/W)(?=\\s|$)",caseInsensitive:!0},{token:"constant.numeric.forth",regex:"(?:^|\\s)[$#%]?[-+]?[0-9]+(?:\\.[0-9]*e-?[0-9]+|\\.?[0-9a-fA-F]*)(?=\\s|$)"},{token:"constant.character.forth",regex:"(?:^|\\s)(?:[&^]\\S|(?:\"|')\\S(?:\"|'))(?=\\s|$)"}],"#forth":[{include:"#constant"},{include:"#comment"},{include:"#string"},{include:"#word"},{include:"#variable"},{include:"#storage"},{include:"#word-def"}],"#storage":[{token:"storage.type.forth",regex:"(?:^|\\s)(?:2CONSTANT|2VARIABLE|ALIAS|CONSTANT|CREATE-INTERPRET/COMPILE[:]?|CREATE|DEFER|FCONSTANT|FIELD|FVARIABLE|USER|VALUE|VARIABLE|VOCABULARY)(?=\\s|$)",caseInsensitive:!0}],"#string":[{token:"string.quoted.double.forth",regex:'(ABORT" |BREAK" |\\." |C" |0"|S\\\\?" )([^"]+")',caseInsensitive:!0},{token:"string.unquoted.forth",regex:"(?:INCLUDE|NEEDS|REQUIRE|USE)[ ]\\S+(?=\\s|$)",caseInsensitive:!0}],"#variable":[{token:"variable.language.forth",regex:"\\b(?:I|J)\\b",caseInsensitive:!0}],"#word":[{token:"keyword.control.immediate.forth",regex:"(?:^|\\s)\\[(?:\\?DO|\\+LOOP|AGAIN|BEGIN|DEFINED|DO|ELSE|ENDIF|FOR|IF|IFDEF|IFUNDEF|LOOP|NEXT|REPEAT|THEN|UNTIL|WHILE)\\](?=\\s|$)",caseInsensitive:!0},{token:"keyword.other.immediate.forth",regex:"(?:^|\\s)(?:COMPILE-ONLY|IMMEDIATE|IS|RESTRICT|TO|WHAT'S|])(?=\\s|$)",caseInsensitive:!0},{token:"keyword.control.compile-only.forth",regex:'(?:^|\\s)(?:-DO|\\-LOOP|\\?DO|\\?LEAVE|\\+DO|\\+LOOP|ABORT\\"|AGAIN|AHEAD|BEGIN|CASE|DO|ELSE|ENDCASE|ENDIF|ENDOF|ENDTRY\\-IFERROR|ENDTRY|FOR|IF|IFERROR|LEAVE|LOOP|NEXT|RECOVER|REPEAT|RESTORE|THEN|TRY|U\\-DO|U\\+DO|UNTIL|WHILE)(?=\\s|$)',caseInsensitive:!0},{token:"keyword.other.compile-only.forth",regex:"(?:^|\\s)(?:\\?DUP-0=-IF|\\?DUP-IF|\\)|\\[|\\['\\]|\\[CHAR\\]|\\[COMPILE\\]|\\[IS\\]|\\[TO\\]||DEFERS|DOES>|INTERPRETATION>|OF|POSTPONE)(?=\\s|$)",caseInsensitive:!0},{token:"keyword.other.non-immediate.forth",regex:"(?:^|\\s)(?:'|||CHAR|END-STRUCT|INCLUDE[D]?|LOAD|NEEDS|REQUIRE[D]?|REVISION|SEE|STRUCT|THRU|USE)(?=\\s|$)",caseInsensitive:!0},{token:"keyword.other.warning.forth",regex:'(?:^|\\s)(?:~~|BREAK:|BREAK"|DBG)(?=\\s|$)',caseInsensitive:!0}],"#word-def":[{token:["keyword.other.compile-only.forth","keyword.other.compile-only.forth","meta.block.forth","entity.name.function.forth"],regex:"(:NONAME)|(^:|\\s:)(\\s)(\\S+)(?=\\s|$)",caseInsensitive:!0,push:[{token:"keyword.other.compile-only.forth",regex:";(?:CODE)?",caseInsensitive:!0,next:"pop"},{include:"#constant"},{include:"#comment"},{include:"#string"},{include:"#word"},{include:"#variable"},{include:"#storage"},{defaultToken:"meta.block.forth"}]}]},this.normalizeRules()};r.metaData={fileTypes:["frt","fs","ldr"],foldingStartMarker:"/\\*\\*|\\{\\s*$",foldingStopMarker:"\\*\\*/|^\\s*\\}",keyEquivalent:"^~F",name:"Forth",scopeName:"source.forth"},n.inherits(r,i),t.ForthHighlightRules=r}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,o){"use strict";var n=e("../../lib/oop"),i=e("../../range").Range,r=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};n.inherits(s,r),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,o){var n=e.getLine(o);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var i=this._getFoldWidgetBase(e,t,o);return!i&&this.startRegionRe.test(n)?"start":i},this.getFoldWidgetRange=function(e,t,o,n){var i=e.getLine(o);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,o);var r=i.match(this.foldingStartMarker);if(r){var s=r.index;if(r[1])return this.openingBracketBlock(e,r[1],o,s);var l=e.getCommentFoldRange(o,s+r[0].length,1);return l&&!l.isMultiLine()&&(n?l=this.getSectionRange(e,o):"all"!=t&&(l=null)),l}if("markbegin"!==t){var r=i.match(this.foldingStopMarker);if(r){var s=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],o,s):e.getCommentFoldRange(o,s,-1)}}},this.getSectionRange=function(e,t){var o=e.getLine(t),n=o.search(/\S/),r=t,s=o.length;t+=1;for(var l=t,a=e.getLength();++tc)break;var h=this.getFoldWidgetRange(e,"all",t);if(h){if(h.start.row<=r)break;if(h.isMultiLine())t=h.end.row;else if(n==c)break}l=t}}return new i(r,s,l,e.getLine(l).length)},this.getCommentRegionBlock=function(e,t,o){for(var n=t.search(/\s*$/),r=e.getLength(),s=o,l=/^\s*(?:\/\*|\/\/)#(end)?region\b/,a=1;++os)return new i(s,n,h,t.length)}}.call(s.prototype)}),define("ace/mode/forth",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/forth_highlight_rules","ace/mode/folding/cstyle"],function(e,t,o){"use strict";var n=e("../lib/oop"),i=e("./text").Mode,r=e("./forth_highlight_rules").ForthHighlightRules,s=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=r,this.foldingRules=new s};n.inherits(l,i),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/forth"}.call(l.prototype),t.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-ftl.js b/www/js/vendor/ace/mode-ftl.js index 418fd2d84..90bdfcdd4 100755 --- a/www/js/vendor/ace/mode-ftl.js +++ b/www/js/vendor/ace/mode-ftl.js @@ -1,1020 +1 @@ -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/ftl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var FtlLangHighlightRules = function () { - - var stringBuiltIns = "\\?|substring|cap_first|uncap_first|capitalize|chop_linebreak|date|time|datetime|" - + "ends_with|html|groups|index_of|j_string|js_string|json_string|last_index_of|length|lower_case|" - + "left_pad|right_pad|contains|matches|number|replace|rtf|url|split|starts_with|string|trim|" - + "upper_case|word_list|xhtml|xml"; - var numberBuiltIns = "c|round|floor|ceiling"; - var dateBuiltIns = "iso_[a-z_]+"; - var seqBuiltIns = "first|last|seq_contains|seq_index_of|seq_last_index_of|reverse|size|sort|sort_by|chunk"; - var hashBuiltIns = "keys|values"; - var xmlBuiltIns = "children|parent|root|ancestors|node_name|node_type|node_namespace"; - var expertBuiltIns = "byte|double|float|int|long|short|number_to_date|number_to_time|number_to_datetime|" - + "eval|has_content|interpret|is_[a-z_]+|namespacenew"; - var allBuiltIns = stringBuiltIns + numberBuiltIns + dateBuiltIns + seqBuiltIns + hashBuiltIns - + xmlBuiltIns + expertBuiltIns; - - var deprecatedBuiltIns = "default|exists|if_exists|web_safe"; - - var variables = "data_model|error|globals|lang|locale|locals|main|namespace|node|current_node|" - + "now|output_encoding|template_name|url_escaping_charset|vars|version"; - - var operators = "gt|gte|lt|lte|as|in|using"; - - var reserved = "true|false"; - - var attributes = "encoding|parse|locale|number_format|date_format|time_format|datetime_format|time_zone|" - + "url_escaping_charset|classic_compatible|strip_whitespace|strip_text|strict_syntax|ns_prefixes|" - + "attributes"; - - this.$rules = { - "start" : [{ - token : "constant.character.entity", - regex : /&[^;]+;/ - }, { - token : "support.function", - regex : "\\?("+allBuiltIns+")" - }, { - token : "support.function.deprecated", - regex : "\\?("+deprecatedBuiltIns+")" - }, { - token : "language.variable", - regex : "\\.(?:"+variables+")" - }, { - token : "constant.language", - regex : "\\b("+reserved+")\\b" - }, { - token : "keyword.operator", - regex : "\\b(?:"+operators+")\\b" - }, { - token : "entity.other.attribute-name", - regex : attributes - }, { - token : "string", // - regex : /['"]/, - next : "qstring" - }, { - token : function(value) { - if (value.match("^[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?$")) { - return "constant.numeric"; - } else { - return "variable"; - } - }, - regex : /[\w.+\-]+/ - }, { - token : "keyword.operator", - regex : "!|\\.|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - }], - - "qstring" : [{ - token : "constant.character.escape", - regex : '\\\\[nrtvef\\\\"$]' - }, { - token : "string", - regex : /['"]/, - next : "start" - }, { - defaultToken : "string" - }] - }; -}; - -oop.inherits(FtlLangHighlightRules, TextHighlightRules); - -var FtlHighlightRules = function() { - HtmlHighlightRules.call(this); - - var directives = "assign|attempt|break|case|compress|default|elseif|else|escape|fallback|function|flush|" - + "ftl|global|if|import|include|list|local|lt|macro|nested|noescape|noparse|nt|recover|recurse|return|rt|" - + "setting|stop|switch|t|visit"; - - var startRules = [ - { - token : "comment", - regex : "<#--", - next : "ftl-dcomment" - }, { - token : "string.interpolated", - regex : "\\${", - push : "ftl-start" - }, { - token : "keyword.function", - regex : "", - next : "pop" - }, { - token : "string.interpolated", - regex : "}", - next : "pop" - } - ]; - - for (var key in this.$rules) - this.$rules[key].unshift.apply(this.$rules[key], startRules); - - this.embedRules(FtlLangHighlightRules, "ftl-", endRules, ["start"]); - - this.addRules({ - "ftl-dcomment" : [{ - token : "comment", - regex : ".*?-->", - next : "pop" - }, { - token : "comment", - regex : ".+" - }] - }); - - this.normalizeRules(); -}; - -oop.inherits(FtlHighlightRules, HtmlHighlightRules); - -exports.FtlHighlightRules = FtlHighlightRules; -}); - -define("ace/mode/ftl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ftl_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var FtlHighlightRules = require("./ftl_highlight_rules").FtlHighlightRules; - -var Mode = function() { - this.HighlightRules = FtlHighlightRules; -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.$id = "ace/mode/ftl"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),a=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",i=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",c=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",g=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",u=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":i,"support.constant":s,"support.type":a,"support.constant.color":l,"support.constant.fonts":c},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+g+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:g},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:u},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};r.inherits(d,o),t.CssHighlightRules=d}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},a.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(a,o),a.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},a.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},a.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=a}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",a="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+r+")(\\.)(prototype)(\\.)("+r+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:r},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:a},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(i,a),t.JavaScriptHighlightRules=i}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===a&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(o.prototype),r.inherits(a,o),t.XmlHighlightRules=a}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/lang"),a=e("./css_highlight_rules").CssHighlightRules,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=o.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),c=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(a,"css-","style"),this.embedTagRules(i,"js-","script"),this.constructor===c&&this.normalizeRules()};r.inherits(c,s),t.HtmlHighlightRules=c}),define("ace/mode/ftl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./html_highlight_rules").HtmlHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(){var e="\\?|substring|cap_first|uncap_first|capitalize|chop_linebreak|date|time|datetime|ends_with|html|groups|index_of|j_string|js_string|json_string|last_index_of|length|lower_case|left_pad|right_pad|contains|matches|number|replace|rtf|url|split|starts_with|string|trim|upper_case|word_list|xhtml|xml",t="c|round|floor|ceiling",n="iso_[a-z_]+",r="first|last|seq_contains|seq_index_of|seq_last_index_of|reverse|size|sort|sort_by|chunk",o="keys|values",a="children|parent|root|ancestors|node_name|node_type|node_namespace",i="byte|double|float|int|long|short|number_to_date|number_to_time|number_to_datetime|eval|has_content|interpret|is_[a-z_]+|namespacenew",s=e+t+n+r+o+a+i,l="default|exists|if_exists|web_safe",c="data_model|error|globals|lang|locale|locals|main|namespace|node|current_node|now|output_encoding|template_name|url_escaping_charset|vars|version",g="gt|gte|lt|lte|as|in|using",u="true|false",p="encoding|parse|locale|number_format|date_format|time_format|datetime_format|time_zone|url_escaping_charset|classic_compatible|strip_whitespace|strip_text|strict_syntax|ns_prefixes|attributes";this.$rules={start:[{token:"constant.character.entity",regex:/&[^;]+;/},{token:"support.function",regex:"\\?("+s+")"},{token:"support.function.deprecated",regex:"\\?("+l+")"},{token:"language.variable",regex:"\\.(?:"+c+")"},{token:"constant.language",regex:"\\b("+u+")\\b"},{token:"keyword.operator",regex:"\\b(?:"+g+")\\b"},{token:"entity.other.attribute-name",regex:p},{token:"string",regex:/['"]/,next:"qstring"},{token:function(e){return e.match("^[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?$")?"constant.numeric":"variable"},regex:/[\w.+\-]+/},{token:"keyword.operator",regex:"!|\\.|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^="},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qstring:[{token:"constant.character.escape",regex:'\\\\[nrtvef\\\\"$]'},{token:"string",regex:/['"]/,next:"start"},{defaultToken:"string"}]}};r.inherits(i,a);var s=function(){o.call(this);var e="assign|attempt|break|case|compress|default|elseif|else|escape|fallback|function|flush|ftl|global|if|import|include|list|local|lt|macro|nested|noescape|noparse|nt|recover|recurse|return|rt|setting|stop|switch|t|visit",t=[{token:"comment",regex:"<#--",next:"ftl-dcomment"},{token:"string.interpolated",regex:"\\${",push:"ftl-start"},{token:"keyword.function",regex:"",next:"pop"},{token:"string.interpolated",regex:"}",next:"pop"}];for(var r in this.$rules)this.$rules[r].unshift.apply(this.$rules[r],t);this.embedRules(i,"ftl-",n,["start"]),this.addRules({"ftl-dcomment":[{token:"comment",regex:".*?-->",next:"pop"},{token:"comment",regex:".+"}]}),this.normalizeRules()};r.inherits(s,o),t.FtlHighlightRules=s}),define("ace/mode/ftl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ftl_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,a=e("./ftl_highlight_rules").FtlHighlightRules,i=function(){this.HighlightRules=a};r.inherits(i,o),function(){this.$id="ace/mode/ftl"}.call(i.prototype),t.Mode=i}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-gcode.js b/www/js/vendor/ace/mode-gcode.js index 4757119cd..3de366e23 100755 --- a/www/js/vendor/ace/mode-gcode.js +++ b/www/js/vendor/ace/mode-gcode.js @@ -1,85 +1 @@ -define("ace/mode/gcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { - "use strict"; - - var oop = require("../lib/oop"); - var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - - var GcodeHighlightRules = function() { - - var keywords = ( - "IF|DO|WHILE|ENDWHILE|CALL|ENDIF|SUB|ENDSUB|GOTO|REPEAT|ENDREPEAT|CALL" - ); - - var builtinConstants = ( - "PI" - ); - - var builtinFunctions = ( - "ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN" - ); - var keywordMapper = this.createKeywordMapper({ - "support.function": builtinFunctions, - "keyword": keywords, - "constant.language": builtinConstants - }, "identifier", true); - - this.$rules = { - "start" : [ { - token : "comment", - regex : "\\(.*\\)" - }, { - token : "comment", // block number - regex : "([N])([0-9]+)" - }, { - token : "string", // " string - regex : "([G])([0-9]+\\.?[0-9]?)" - }, { - token : "string", // ' string - regex : "([M])([0-9]+\\.?[0-9]?)" - }, { - token : "constant.numeric", // float - regex : "([-+]?([0-9]*\\.?[0-9]+\\.?))|(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)" - }, { - token : keywordMapper, - regex : "[A-Z]" - }, { - token : "keyword.operator", - regex : "EQ|LT|GT|NE|GE|LE|OR|XOR" - }, { - token : "paren.lparen", - regex : "[\\[]" - }, { - token : "paren.rparen", - regex : "[\\]]" - }, { - token : "text", - regex : "\\s+" - } ] - }; - }; - - oop.inherits(GcodeHighlightRules, TextHighlightRules); - - exports.GcodeHighlightRules = GcodeHighlightRules; -}); - -define("ace/mode/gcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gcode_highlight_rules","ace/range"], function(require, exports, module) { - "use strict"; - - var oop = require("../lib/oop"); - var TextMode = require("./text").Mode; - var GcodeHighlightRules = require("./gcode_highlight_rules").GcodeHighlightRules; - var Range = require("../range").Range; - - var Mode = function() { - this.HighlightRules = GcodeHighlightRules; - }; - oop.inherits(Mode, TextMode); - - (function() { - this.$id = "ace/mode/gcode"; - }).call(Mode.prototype); - - exports.Mode = Mode; - -}); +define("ace/mode/gcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,o){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,n=function(){var e="IF|DO|WHILE|ENDWHILE|CALL|ENDIF|SUB|ENDSUB|GOTO|REPEAT|ENDREPEAT|CALL",t="PI",o="ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN",r=this.createKeywordMapper({"support.function":o,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"\\(.*\\)"},{token:"comment",regex:"([N])([0-9]+)"},{token:"string",regex:"([G])([0-9]+\\.?[0-9]?)"},{token:"string",regex:"([M])([0-9]+\\.?[0-9]?)"},{token:"constant.numeric",regex:"([-+]?([0-9]*\\.?[0-9]+\\.?))|(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)"},{token:r,regex:"[A-Z]"},{token:"keyword.operator",regex:"EQ|LT|GT|NE|GE|LE|OR|XOR"},{token:"paren.lparen",regex:"[\\[]"},{token:"paren.rparen",regex:"[\\]]"},{token:"text",regex:"\\s+"}]}};r.inherits(n,i),t.GcodeHighlightRules=n}),define("ace/mode/gcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gcode_highlight_rules","ace/range"],function(e,t,o){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,n=e("./gcode_highlight_rules").GcodeHighlightRules,g=(e("../range").Range,function(){this.HighlightRules=n});r.inherits(g,i),function(){this.$id="ace/mode/gcode"}.call(g.prototype),t.Mode=g}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-gherkin.js b/www/js/vendor/ace/mode-gherkin.js index bc379803b..e91491ca4 100755 --- a/www/js/vendor/ace/mode-gherkin.js +++ b/www/js/vendor/ace/mode-gherkin.js @@ -1,129 +1 @@ -define("ace/mode/gherkin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; - -var GherkinHighlightRules = function() { - this.$rules = { - start : [{ - token: 'constant.numeric', - regex: "(?:(?:[1-9]\\d*)|(?:0))" - }, { - token : "comment", - regex : "#.*$" - }, { - token : "keyword", - regex : "Feature:|Background:|Scenario:|Scenario\ Outline:|Examples:|Given|When|Then|And|But|\\*", - }, { - token : "string", // multi line """ string start - regex : '"{3}', - next : "qqstring3" - }, { - token : "string", // " string - regex : '"', - next : "qqstring" - }, { - token : "comment", - regex : "@[A-Za-z0-9]+", - next : "start" - }, { - token : "comment", - regex : "<.+>" - }, { - token : "comment", - regex : "\\| ", - next : "table-item" - }, { - token : "comment", - regex : "\\|$", - next : "start" - }], - "qqstring3" : [ { - token : "constant.language.escape", - regex : stringEscape - }, { - token : "string", // multi line """ string end - regex : '"{3}', - next : "start" - }, { - defaultToken : "string" - }], - "qqstring" : [{ - token : "constant.language.escape", - regex : stringEscape - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "start" - }, { - defaultToken: "string" - }], - "table-item" : [{ - token : "string", - regex : "[A-Za-z0-9 ]*", - next : "start" - }], - }; - -} - -oop.inherits(GherkinHighlightRules, TextHighlightRules); - -exports.GherkinHighlightRules = GherkinHighlightRules; -}); - -define("ace/mode/gherkin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gherkin_highlight_rules"], function(require, exports, module) { - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var GherkinHighlightRules = require("./gherkin_highlight_rules").GherkinHighlightRules; - -var Mode = function() { - this.HighlightRules = GherkinHighlightRules; -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "#"; - this.$id = "ace/mode/gherkin"; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var space2 = " "; - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - - console.log(state) - - if(line.match("[ ]*\\|")) { - indent += "| "; - } - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - - if (state == "start") { - if (line.match("Scenario:|Feature:|Scenario\ Outline:|Background:")) { - indent += space2; - } else if(line.match("(Given|Then).+(:)$|Examples:")) { - indent += space2; - } else if(line.match("\\*.+")) { - indent += "* "; - } - } - - - return indent; - }; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/gherkin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})",g=function(){this.$rules={start:[{token:"constant.numeric",regex:"(?:(?:[1-9]\\d*)|(?:0))"},{token:"comment",regex:"#.*$"},{token:"keyword",regex:"Feature:|Background:|Scenario:|Scenario Outline:|Examples:|Given|When|Then|And|But|\\*"},{token:"string",regex:'"{3}',next:"qqstring3"},{token:"string",regex:'"',next:"qqstring"},{token:"comment",regex:"@[A-Za-z0-9]+",next:"start"},{token:"comment",regex:"<.+>"},{token:"comment",regex:"\\| ",next:"table-item"},{token:"comment",regex:"\\|$",next:"start"}],qqstring3:[{token:"constant.language.escape",regex:o},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:o},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],"table-item":[{token:"string",regex:"[A-Za-z0-9 ]*",next:"start"}]}};i.inherits(g,r),t.GherkinHighlightRules=g}),define("ace/mode/gherkin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gherkin_highlight_rules"],function(e,t,n){var i=e("../lib/oop"),r=e("./text").Mode,o=e("./gherkin_highlight_rules").GherkinHighlightRules,g=function(){this.HighlightRules=o};i.inherits(g,r),function(){this.lineCommentStart="#",this.$id="ace/mode/gherkin",this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),r=" ",o=this.getTokenizer().getLineTokens(t,e),g=o.tokens;return console.log(e),t.match("[ ]*\\|")&&(i+="| "),g.length&&"comment"==g[g.length-1].type?i:("start"==e&&(t.match("Scenario:|Feature:|Scenario Outline:|Background:")?i+=r:t.match("(Given|Then).+(:)$|Examples:")?i+=r:t.match("\\*.+")&&(i+="* ")),i)}}.call(g.prototype),t.Mode=g}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-gitignore.js b/www/js/vendor/ace/mode-gitignore.js index b2031329d..9ce0d8b3f 100755 --- a/www/js/vendor/ace/mode-gitignore.js +++ b/www/js/vendor/ace/mode-gitignore.js @@ -1,51 +1 @@ -define("ace/mode/gitignore_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var GitignoreHighlightRules = function() { - this.$rules = { - "start" : [ - { - token : "comment", - regex : /^\s*#.*$/ - }, { - token : "keyword", // negated patterns - regex : /^\s*!.*$/ - } - ] - }; - - this.normalizeRules(); -}; - -GitignoreHighlightRules.metaData = { - fileTypes: ['gitignore'], - name: 'Gitignore' -}; - -oop.inherits(GitignoreHighlightRules, TextHighlightRules); - -exports.GitignoreHighlightRules = GitignoreHighlightRules; -}); - -define("ace/mode/gitignore",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gitignore_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var GitignoreHighlightRules = require("./gitignore_highlight_rules").GitignoreHighlightRules; - -var Mode = function() { - this.HighlightRules = GitignoreHighlightRules; -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "#"; - this.$id = "ace/mode/gitignore"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/gitignore_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,i,t){"use strict";var o=e("../lib/oop"),g=e("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{token:"comment",regex:/^\s*#.*$/},{token:"keyword",regex:/^\s*!.*$/}]},this.normalizeRules()};r.metaData={fileTypes:["gitignore"],name:"Gitignore"},o.inherits(r,g),i.GitignoreHighlightRules=r}),define("ace/mode/gitignore",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gitignore_highlight_rules"],function(e,i,t){"use strict";var o=e("../lib/oop"),g=e("./text").Mode,r=e("./gitignore_highlight_rules").GitignoreHighlightRules,l=function(){this.HighlightRules=r};o.inherits(l,g),function(){this.lineCommentStart="#",this.$id="ace/mode/gitignore"}.call(l.prototype),i.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-glsl.js b/www/js/vendor/ace/mode-glsl.js index efac2538d..4547a66d7 100755 --- a/www/js/vendor/ace/mode-glsl.js +++ b/www/js/vendor/ace/mode-glsl.js @@ -1,926 +1 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b" - -var c_cppHighlightRules = function() { - - var keywordControls = ( - "break|case|continue|default|do|else|for|goto|if|_Pragma|" + - "return|switch|while|catch|operator|try|throw|using" - ); - - var storageType = ( - "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + - "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" + - "class|wchar_t|template" - ); - - var storageModifiers = ( - "const|extern|register|restrict|static|volatile|inline|private|" + - "protected|public|friend|explicit|virtual|export|mutable|typename|" + - "constexpr|new|delete" - ); - - var keywordOperators = ( - "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + - "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" - ); - - var builtinConstants = ( - "NULL|true|false|TRUE|FALSE" - ); - - var keywordMapper = this.$keywords = this.createKeywordMapper({ - "keyword.control" : keywordControls, - "storage.type" : storageType, - "storage.modifier" : storageModifiers, - "keyword.operator" : keywordOperators, - "variable.language": "this", - "constant.language": builtinConstants - }, "identifier"); - - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b"; - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "//", - next : "singleLineComment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // multi line string start - regex : '["].*\\\\$', - next : "qqstring" - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "string", // multi line string start - regex : "['].*\\\\$", - next : "qstring" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" - }, { - token : "keyword", // pre-compiler directives - regex : "#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b", - next : "directive" - }, { - token : "keyword", // special case pre-compiler directive - regex : "(?:#\\s*endif)\\b" - }, { - token : "support.function.C99.c", - regex : cFunctions - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)" - }, { - token : "punctuation.operator", - regex : "\\?|\\:|\\,|\\;|\\." - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - "singleLineComment" : [ - { - token : "comment", - regex : /\\$/, - next : "singleLineComment" - }, { - token : "comment", - regex : /$/, - next : "start" - }, { - defaultToken: "comment" - } - ], - "qqstring" : [ - { - token : "string", - regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', - next : "start" - }, { - defaultToken : "string" - } - ], - "qstring" : [ - { - token : "string", - regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", - next : "start" - }, { - defaultToken : "string" - } - ], - "directive" : [ - { - token : "constant.other.multiline", - regex : /\\/ - }, - { - token : "constant.other.multiline", - regex : /.*\\/ - }, - { - token : "constant.other", - regex : "\\s*<.+?>", - next : "start" - }, - { - token : "constant.other", // single line - regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', - next : "start" - }, - { - token : "constant.other", // single line - regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", - next : "start" - }, - { - token : "constant.other", - regex : /[^\\\/]+/, - next : "start" - } - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); -}; - -oop.inherits(c_cppHighlightRules, TextHighlightRules); - -exports.c_cppHighlightRules = c_cppHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = c_cppHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/c_cpp"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/glsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/c_cpp_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; - -var glslHighlightRules = function() { - - var keywords = ( - "attribute|const|uniform|varying|break|continue|do|for|while|" + - "if|else|in|out|inout|float|int|void|bool|true|false|" + - "lowp|mediump|highp|precision|invariant|discard|return|mat2|mat3|" + - "mat4|vec2|vec3|vec4|ivec2|ivec3|ivec4|bvec2|bvec3|bvec4|sampler2D|" + - "samplerCube|struct" - ); - - var buildinConstants = ( - "radians|degrees|sin|cos|tan|asin|acos|atan|pow|" + - "exp|log|exp2|log2|sqrt|inversesqrt|abs|sign|floor|ceil|fract|mod|" + - "min|max|clamp|mix|step|smoothstep|length|distance|dot|cross|" + - "normalize|faceforward|reflect|refract|matrixCompMult|lessThan|" + - "lessThanEqual|greaterThan|greaterThanEqual|equal|notEqual|any|all|" + - "not|dFdx|dFdy|fwidth|texture2D|texture2DProj|texture2DLod|" + - "texture2DProjLod|textureCube|textureCubeLod|" + - "gl_MaxVertexAttribs|gl_MaxVertexUniformVectors|gl_MaxVaryingVectors|" + - "gl_MaxVertexTextureImageUnits|gl_MaxCombinedTextureImageUnits|" + - "gl_MaxTextureImageUnits|gl_MaxFragmentUniformVectors|gl_MaxDrawBuffers|" + - "gl_DepthRangeParameters|gl_DepthRange|" + - "gl_Position|gl_PointSize|" + - "gl_FragCoord|gl_FrontFacing|gl_PointCoord|gl_FragColor|gl_FragData" - ); - - var keywordMapper = this.createKeywordMapper({ - "variable.language": "this", - "keyword": keywords, - "constant.language": buildinConstants - }, "identifier"); - - this.$rules = new c_cppHighlightRules().$rules; - this.$rules.start.forEach(function(rule) { - if (typeof rule.token == "function") - rule.token = keywordMapper; - }) -}; - -oop.inherits(glslHighlightRules, c_cppHighlightRules); - -exports.glslHighlightRules = glslHighlightRules; -}); - -define("ace/mode/glsl",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/glsl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var CMode = require("./c_cpp").Mode; -var glslHighlightRules = require("./glsl_highlight_rules").glslHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = glslHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, CMode); - -(function() { - this.$id = "ace/mode/glsl"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(i,o),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=t.cFunctions="\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b",s=function(){var e="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",t="asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|class|wchar_t|template",n="const|extern|register|restrict|static|volatile|inline|private|protected|public|friend|explicit|virtual|export|mutable|typename|constexpr|new|delete",r="and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eqconst_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace",i="NULL|true|false|TRUE|FALSE",s=this.$keywords=this.createKeywordMapper({"keyword.control":e,"storage.type":t,"storage.modifier":n,"keyword.operator":r,"variable.language":"this","constant.language":i},"identifier");this.$rules={start:[{token:"comment",regex:"//",next:"singleLineComment"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b",next:"directive"},{token:"keyword",regex:"(?:#\\s*endif)\\b"},{token:"support.function.C99.c",regex:a},{token:s,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],singleLineComment:[{token:"comment",regex:/\\$/,next:"singleLineComment"},{token:"comment",regex:/$/,next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{defaultToken:"string"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{defaultToken:"string"}],directive:[{token:"constant.other.multiline",regex:/\\/},{token:"constant.other.multiline",regex:/.*\\/},{token:"constant.other",regex:"\\s*<.+?>",next:"start"},{token:"constant.other",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(o,"doc-",[o.getEndRule("start")])};r.inherits(s,i),t.c_cppHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],u={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?r=u[t]:void(r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,i){var a=n.getCursorPosition(),l=o.doc.getLine(a.row);if("{"==i){g(n);var c=n.getSelectionRange(),u=o.doc.getTextRange(c);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var f=l.substring(a.column,a.column+1);if("}"==f){var m=o.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==m&&d.isAutoInsertedClosing(a,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var h="";d.isMaybeInsertedClosing(a,l)&&(h=s.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var f=l.substring(a.column,a.column+1);if("}"===f){var p=o.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!p)return null;var x=this.$getIndent(o.getLine(p.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var b=x+o.getTabString();return{text:"\n"+b+"\n"+x+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){g(n);var s=o.doc.getLine(i.start.row),l=s.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if(")"==c){var u=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){g(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if("]"==c){var u=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){g(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var i=o,a=n.getSelectionRange(),s=r.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var l=n.getCursorPosition(),c=r.doc.getLine(l.row),u=c.substring(l.column-1,l.column),d=c.substring(l.column,l.column+1),f=r.getTokenAt(l.row,l.column),m=r.getTokenAt(l.row,l.column+1);if("\\"==u&&f&&/escape/.test(f.type))return null;var h,p=f&&/string/.test(f.type),x=!m||/string/.test(m.type);if(d==i)h=p!==x;else{if(p&&!x)return null;if(p&&x)return null;var b=r.$mode.tokenRe;b.lastIndex=0;var v=b.test(u);b.lastIndex=0;var k=b.test(u);if(v||k)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){g(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(s==i)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){var o=new a(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var i=o.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),i=t,a=n.length;t+=1;for(var s=t,l=e.getLength();++tc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=i)break;if(u.isMultiLine())t=u.end.row;else if(r==c)break}s=t}}return new o(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++na)return new o(a,r,u,t.length)}}.call(a.prototype)}),define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./c_cpp_highlight_rules").c_cppHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("./behaviour/cstyle").CstyleBehaviour),l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new s,this.foldingRules=new l};r.inherits(c,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens,a=o.state;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e){var s=t.match(/^.*[\{\(\[]\s*$/);s&&(r+=n)}else if("doc-start"==e){if("start"==a)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp"}.call(c.prototype),t.Mode=c}),define("ace/mode/glsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/c_cpp_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./c_cpp_highlight_rules").c_cppHighlightRules,i=function(){var e="attribute|const|uniform|varying|break|continue|do|for|while|if|else|in|out|inout|float|int|void|bool|true|false|lowp|mediump|highp|precision|invariant|discard|return|mat2|mat3|mat4|vec2|vec3|vec4|ivec2|ivec3|ivec4|bvec2|bvec3|bvec4|sampler2D|samplerCube|struct",t="radians|degrees|sin|cos|tan|asin|acos|atan|pow|exp|log|exp2|log2|sqrt|inversesqrt|abs|sign|floor|ceil|fract|mod|min|max|clamp|mix|step|smoothstep|length|distance|dot|cross|normalize|faceforward|reflect|refract|matrixCompMult|lessThan|lessThanEqual|greaterThan|greaterThanEqual|equal|notEqual|any|all|not|dFdx|dFdy|fwidth|texture2D|texture2DProj|texture2DLod|texture2DProjLod|textureCube|textureCubeLod|gl_MaxVertexAttribs|gl_MaxVertexUniformVectors|gl_MaxVaryingVectors|gl_MaxVertexTextureImageUnits|gl_MaxCombinedTextureImageUnits|gl_MaxTextureImageUnits|gl_MaxFragmentUniformVectors|gl_MaxDrawBuffers|gl_DepthRangeParameters|gl_DepthRange|gl_Position|gl_PointSize|gl_FragCoord|gl_FrontFacing|gl_PointCoord|gl_FragColor|gl_FragData",n=this.createKeywordMapper({"variable.language":"this",keyword:e,"constant.language":t},"identifier");this.$rules=(new o).$rules,this.$rules.start.forEach(function(e){"function"==typeof e.token&&(e.token=n)})};r.inherits(i,o),t.glslHighlightRules=i}),define("ace/mode/glsl",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/glsl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./c_cpp").Mode,i=e("./glsl_highlight_rules").glslHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("./behaviour/cstyle").CstyleBehaviour),l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new s,this.foldingRules=new l};r.inherits(c,o),function(){this.$id="ace/mode/glsl"}.call(c.prototype),t.Mode=c}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-golang.js b/www/js/vendor/ace/mode-golang.js index 44563b0d7..52ce1a6d9 100755 --- a/www/js/vendor/ace/mode-golang.js +++ b/www/js/vendor/ace/mode-golang.js @@ -1,751 +1 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/golang_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { - var oop = require("../lib/oop"); - var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; - var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - - var GolangHighlightRules = function() { - var keywords = ( - "else|break|case|return|goto|if|const|select|" + - "continue|struct|default|switch|for|range|" + - "func|import|package|chan|defer|fallthrough|go|interface|map|range|" + - "select|type|var" - ); - var builtinTypes = ( - "string|uint8|uint16|uint32|uint64|int8|int16|int32|int64|float32|" + - "float64|complex64|complex128|byte|rune|uint|int|uintptr|bool|error" - ); - var builtinFunctions = ( - "make|close|new|panic|recover" - ); - var builtinConstants = ("nil|true|false|iota"); - - var keywordMapper = this.createKeywordMapper({ - "keyword": keywords, - "constant.language": builtinConstants, - "support.function": builtinFunctions, - "support.type": builtinTypes - }, "identifier"); - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "\\/\\/.*$" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : '[`](?:[^`]*)[`]' - }, { - token : "string", // multi line string start - merge : true, - regex : '[`](?:[^`]*)$', - next : "bqstring" - }, { - token : "constant.numeric", // rune - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))[']" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=" - }, { - token : "punctuation.operator", - regex : "\\?|\\:|\\,|\\;|\\." - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - "bqstring" : [ - { - token : "string", - regex : '(?:[^`]*)`', - next : "start" - }, { - token : "string", - regex : '.+' - } - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); - }; - oop.inherits(GolangHighlightRules, TextHighlightRules); - - exports.GolangHighlightRules = GolangHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/golang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/golang_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var GolangHighlightRules = require("./golang_highlight_rules").GolangHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = GolangHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - };//end getNextLineIndent - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/golang"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(i,o),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/golang_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="else|break|case|return|goto|if|const|select|continue|struct|default|switch|for|range|func|import|package|chan|defer|fallthrough|go|interface|map|range|select|type|var",t="string|uint8|uint16|uint32|uint64|int8|int16|int32|int64|float32|float64|complex64|complex128|byte|rune|uint|int|uintptr|bool|error",n="make|close|new|panic|recover",r="nil|true|false|iota",i=this.createKeywordMapper({keyword:e,"constant.language":r,"support.function":n,"support.type":t},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"[`](?:[^`]*)[`]"},{token:"string",merge:!0,regex:"[`](?:[^`]*)$",next:"bqstring"},{token:"constant.numeric",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^="},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],bqstring:[{token:"string",regex:"(?:[^`]*)`",next:"start"},{token:"string",regex:".+"}]},this.embedRules(o,"doc-",[o.getEndRule("start")])};r.inherits(s,i),t.GolangHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,s=e.findMatchingBracket({row:t,column:i});if(!s||s.row==t)return 0;var a=this.$getIndent(e.getLine(s.row));e.replace(new r(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],l={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,l.rangeCount!=e.multiSelect.rangeCount&&(l={rangeCount:e.multiSelect.rangeCount})),l[t]?r=l[t]:void(r=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,i){var s=n.getCursorPosition(),u=o.doc.getLine(s.row);if("{"==i){g(n);var c=n.getSelectionRange(),l=o.doc.getTextRange(c);if(""!==l&&"{"!==l&&n.getWrapBehavioursEnabled())return{text:"{"+l+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(u[s.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var m=u.substring(s.column,s.column+1);if("}"==m){var h=o.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(null!==h&&d.isAutoInsertedClosing(s,u,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var f="";d.isMaybeInsertedClosing(s,u)&&(f=a.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=u.substring(s.column,s.column+1);if("}"===m){var p=o.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!p)return null;var b=this.$getIndent(o.getLine(p.row))}else{if(!f)return void d.clearMaybeInsertedClosing();var b=this.$getIndent(u)}var k=b+o.getTabString();return{text:"\n"+k+"\n"+b+f,selection:[1,k.length,1,k.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var s=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==s){g(n);var a=o.doc.getLine(i.start.row),u=a.substring(i.end.column,i.end.column+1);if("}"==u)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"("+s+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var a=n.getCursorPosition(),u=r.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if(")"==c){var l=r.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==l&&d.isAutoInsertedClosing(a,u,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(")"==a)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"["+s+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var a=n.getCursorPosition(),u=r.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if("]"==c){var l=r.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==l&&d.isAutoInsertedClosing(a,u,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if("]"==a)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var i=o,s=n.getSelectionRange(),a=r.doc.getTextRange(s);if(""!==a&&"'"!==a&&'"'!=a&&n.getWrapBehavioursEnabled())return{text:i+a+i,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),l=c.substring(u.column-1,u.column),d=c.substring(u.column,u.column+1),m=r.getTokenAt(u.row,u.column),h=r.getTokenAt(u.row,u.column+1);if("\\"==l&&m&&/escape/.test(m.type))return null;var f,p=m&&/string/.test(m.type),b=!h||/string/.test(h.type);if(d==i)f=p!==b;else{if(p&&!b)return null;if(p&&b)return null;var k=r.$mode.tokenRe;k.lastIndex=0;var x=k.test(l);k.lastIndex=0;var v=k.test(l);if(x||v)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;f=!0}return{text:f?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(a==i)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var o=new s(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var i=o.match(this.foldingStartMarker);if(i){var s=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,s);var a=e.getCommentFoldRange(n,s+i[0].length,1);return a&&!a.isMultiLine()&&(r?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),i=t,s=n.length;t+=1;for(var a=t,u=e.getLength();++tc)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=i)break;if(l.isMultiLine())t=l.end.row;else if(r==c)break}a=t}}return new o(i,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/)#(end)?region\b/,u=1;++ns)return new o(s,r,l,t.length)}}.call(s.prototype)}),define("ace/mode/golang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/golang_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){var r=e("../lib/oop"),o=e("./text").Mode,i=e("./golang_highlight_rules").GolangHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=(e("./behaviour/cstyle").CstyleBehaviour,e("./folding/cstyle").FoldMode),u=function(){this.HighlightRules=i,this.$outdent=new s,this.foldingRules=new a};r.inherits(u,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens;if(o.state,i.length&&"comment"==i[i.length-1].type)return r;if("start"==e){var s=t.match(/^.*[\{\(\[]\s*$/);s&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/golang"}.call(u.prototype),t.Mode=u}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-groovy.js b/www/js/vendor/ace/mode-groovy.js index 59ee57004..df5541b41 100755 --- a/www/js/vendor/ace/mode-groovy.js +++ b/www/js/vendor/ace/mode-groovy.js @@ -1,1217 +1 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/groovy_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var GroovyHighlightRules = function() { - - var keywords = ( - "assert|with|abstract|continue|for|new|switch|" + - "assert|default|goto|package|synchronized|" + - "boolean|do|if|private|this|" + - "break|double|implements|protected|throw|" + - "byte|else|import|public|throws|" + - "case|enum|instanceof|return|transient|" + - "catch|extends|int|short|try|" + - "char|final|interface|static|void|" + - "class|finally|long|strictfp|volatile|" + - "def|float|native|super|while" - ); - - var buildinConstants = ( - "null|Infinity|NaN|undefined" - ); - - var langClasses = ( - "AbstractMethodError|AssertionError|ClassCircularityError|"+ - "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+ - "ExceptionInInitializerError|IllegalAccessError|"+ - "IllegalThreadStateException|InstantiationError|InternalError|"+ - "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+ - "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+ - "SuppressWarnings|TypeNotPresentException|UnknownError|"+ - "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+ - "InstantiationException|IndexOutOfBoundsException|"+ - "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+ - "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+ - "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+ - "InterruptedException|NoSuchMethodException|IllegalAccessException|"+ - "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+ - "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+ - "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+ - "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+ - "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+ - "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+ - "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+ - "ArrayStoreException|ClassCastException|LinkageError|"+ - "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+ - "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+ - "Cloneable|Class|CharSequence|Comparable|String|Object" - ); - - var keywordMapper = this.createKeywordMapper({ - "variable.language": "this", - "keyword": keywords, - "support.function": langClasses, - "constant.language": buildinConstants - }, "identifier"); - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "\\/\\/.*$" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment" - }, { - token : "string.regexp", - regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" - }, { - token : "string", - regex : '"""', - next : "qqstring" - }, { - token : "string", - regex : "'''", - next : "qstring" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" - }, { - token : "lparen", - regex : "[[({]" - }, { - token : "rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : /\\(?:u[0-9A-Fa-f]{4}|.|$)/ - }, { - token : "constant.language.escape", - regex : /\$[\w\d]+/ - }, { - token : "constant.language.escape", - regex : /\$\{[^"\}]+\}?/ - }, { - token : "string", - regex : '"{3,5}', - next : "start" - }, { - token : "string", - regex : '.+?' - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : /\\(?:u[0-9A-Fa-f]{4}|.|$)/ - }, { - token : "string", - regex : "'{3,5}", - next : "start" - }, { - token : "string", - regex : ".+?" - } - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); -}; - -oop.inherits(GroovyHighlightRules, TextHighlightRules); - -exports.GroovyHighlightRules = GroovyHighlightRules; -}); - -define("ace/mode/groovy",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/groovy_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var JavaScriptMode = require("./javascript").Mode; -var GroovyHighlightRules = require("./groovy_highlight_rules").GroovyHighlightRules; - -var Mode = function() { - JavaScriptMode.call(this); - this.HighlightRules = GroovyHighlightRules; -}; -oop.inherits(Mode, JavaScriptMode); - -(function() { - - this.createWorker = function(session) { - return null; - }; - - this.$id = "ace/mode/groovy"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(i,o),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+r+")(\\.)(prototype)(\\.)("+r+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:r},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(a,i),t.JavaScriptHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),c=["text","paren.rparen","punctuation.operator"],l=["text","paren.rparen","punctuation.operator","comment"],u={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?r=u[t]:void(r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,i){var a=n.getCursorPosition(),c=o.doc.getLine(a.row);if("{"==i){g(n);var l=n.getSelectionRange(),u=o.doc.getTextRange(l);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(c[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var m=c.substring(a.column,a.column+1);if("}"==m){var p=o.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==p&&d.isAutoInsertedClosing(a,c,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var h="";d.isMaybeInsertedClosing(a,c)&&(h=s.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=c.substring(a.column,a.column+1);if("}"===m){var x=o.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!x)return null;var f=this.$getIndent(o.getLine(x.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var f=this.$getIndent(c)}var k=f+o.getTabString();return{text:"\n"+k+"\n"+f+h,selection:[1,k.length,1,k.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){g(n);var s=o.doc.getLine(i.start.row),c=s.substring(i.end.column,i.end.column+1);if("}"==c)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var s=n.getCursorPosition(),c=r.doc.getLine(s.row),l=c.substring(s.column,s.column+1);if(")"==l){var u=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,c,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){g(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var s=n.getCursorPosition(),c=r.doc.getLine(s.row),l=c.substring(s.column,s.column+1);if("]"==l){var u=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,c,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){g(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var i=o,a=n.getSelectionRange(),s=r.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var c=n.getCursorPosition(),l=r.doc.getLine(c.row),u=l.substring(c.column-1,c.column),d=l.substring(c.column,c.column+1),m=r.getTokenAt(c.row,c.column),p=r.getTokenAt(c.row,c.column+1);if("\\"==u&&m&&/escape/.test(m.type))return null;var h,x=m&&/string/.test(m.type),f=!p||/string/.test(p.type);if(d==i)h=x!==f;else{if(x&&!f)return null;if(x&&f)return null;var k=r.$mode.tokenRe;k.lastIndex=0;var b=k.test(u);k.lastIndex=0;var y=k.test(u);if(b||y)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){g(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(s==i)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",c)){var o=new a(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",c))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",l)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var i=o.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),i=t,a=n.length;t+=1;for(var s=t,c=e.getLength();++tl)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=i)break;if(u.isMultiLine())t=u.end.row;else if(r==l)break}s=t}}return new o(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,c=1;++na)return new o(a,r,u,t.length)}}.call(a.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),c=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new c,this.foldingRules=new l};r.inherits(u,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens,a=o.state;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(r+=n)}else if("doc-start"==e){if("start"==a||"no_regex"==a)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(u.prototype),t.Mode=u}),define("ace/mode/groovy_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(){var e="assert|with|abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|def|float|native|super|while",t="null|Infinity|NaN|undefined",n="AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object",r=this.createKeywordMapper({"variable.language":"this",keyword:e,"support.function":n,"constant.language":t},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'"""',next:"qqstring"},{token:"string",regex:"'''",next:"qstring"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],qqstring:[{token:"constant.language.escape",regex:/\\(?:u[0-9A-Fa-f]{4}|.|$)/},{token:"constant.language.escape",regex:/\$[\w\d]+/},{token:"constant.language.escape",regex:/\$\{[^"\}]+\}?/},{token:"string",regex:'"{3,5}',next:"start"},{token:"string",regex:".+?"}],qstring:[{token:"constant.language.escape",regex:/\\(?:u[0-9A-Fa-f]{4}|.|$)/},{token:"string",regex:"'{3,5}",next:"start"},{token:"string",regex:".+?"}]},this.embedRules(o,"doc-",[o.getEndRule("start")])};r.inherits(a,i),t.GroovyHighlightRules=a}),define("ace/mode/groovy",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/groovy_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./javascript").Mode,i=e("./groovy_highlight_rules").GroovyHighlightRules,a=function(){o.call(this),this.HighlightRules=i};r.inherits(a,o),function(){this.createWorker=function(e){return null},this.$id="ace/mode/groovy"}.call(a.prototype),t.Mode=a}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-haml.js b/www/js/vendor/ace/mode-haml.js index 8d421f276..354626efe 100755 --- a/www/js/vendor/ace/mode-haml.js +++ b/www/js/vendor/ace/mode-haml.js @@ -1,525 +1 @@ -define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var constantOtherSymbol = exports.constantOtherSymbol = { - token : "constant.other.symbol.ruby", // symbol - regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" -}; - -var qString = exports.qString = { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" -}; - -var qqString = exports.qqString = { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' -}; - -var tString = exports.tString = { - token : "string", // backtick string - regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]" -}; - -var constantNumericHex = exports.constantNumericHex = { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b" -}; - -var constantNumericFloat = exports.constantNumericFloat = { - token : "constant.numeric", // float - regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b" -}; - -var RubyHighlightRules = function() { - - var builtinFunctions = ( - "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" + - "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" + - "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" + - "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" + - "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" + - "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" + - "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" + - "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" + - "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" + - "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" + - "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" + - "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" + - "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" + - "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" + - "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" + - "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" + - "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" + - "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" + - "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" + - "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" + - "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" + - "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" + - "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" + - "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" + - "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" + - "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" + - "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" + - "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" + - "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" + - "has_many|has_one|belongs_to|has_and_belongs_to_many" - ); - - var keywords = ( - "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" + - "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" + - "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield" - ); - - var buildinConstants = ( - "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" + - "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING" - ); - - var builtinVariables = ( - "\$DEBUG|\$defout|\$FILENAME|\$LOAD_PATH|\$SAFE|\$stdin|\$stdout|\$stderr|\$VERBOSE|" + - "$!|root_url|flash|session|cookies|params|request|response|logger|self" - ); - - var keywordMapper = this.$keywords = this.createKeywordMapper({ - "keyword": keywords, - "constant.language": buildinConstants, - "variable.language": builtinVariables, - "support.function": builtinFunctions, - "invalid.deprecated": "debugger" // TODO is this a remnant from js mode? - }, "identifier"); - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "#.*$" - }, { - token : "comment", // multi line comment - regex : "^=begin(?:$|\\s.*$)", - next : "comment" - }, { - token : "string.regexp", - regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" - }, - - [{ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren.lparen"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.start", - regex : /"/, - push : [{ - token : "constant.language.escape", - regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/ - }, { - token : "paren.start", - regex : /\#{/, - push : "start" - }, { - token : "string.end", - regex : /"/, - next : "pop" - }, { - defaultToken: "string" - }] - }, { - token : "string.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/ - }, { - token : "paren.start", - regex : /\#{/, - push : "start" - }, { - token : "string.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string" - }] - }, { - token : "string.start", - regex : /'/, - push : [{ - token : "constant.language.escape", - regex : /\\['\\]/ - }, { - token : "string.end", - regex : /'/, - next : "pop" - }, { - defaultToken: "string" - }] - }], - - { - token : "text", // namespaces aren't symbols - regex : "::" - }, { - token : "variable.instance", // instance variable - regex : "@{1,2}[a-zA-Z_\\d]+" - }, { - token : "support.class", // class name - regex : "[A-Z][a-zA-Z_\\d]+" - }, - - constantOtherSymbol, - constantNumericHex, - constantNumericFloat, - - { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "punctuation.separator.key-value", - regex : "=>" - }, { - stateName: "heredoc", - onMatch : function(value, currentState, stack) { - var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; - var tokens = value.split(this.splitRegex); - stack.push(next, tokens[3]); - return [ - {type:"constant", value: tokens[1]}, - {type:"string", value: tokens[2]}, - {type:"support.class", value: tokens[3]}, - {type:"string", value: tokens[4]} - ]; - }, - regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)", - rules: { - heredoc: [{ - onMatch: function(value, currentState, stack) { - if (value === stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack[0] || "start"; - return "support.class"; - } - this.next = ""; - return "string"; - }, - regex: ".*$", - next: "start" - }], - indentedHeredoc: [{ - token: "string", - regex: "^ +" - }, { - onMatch: function(value, currentState, stack) { - if (value === stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack[0] || "start"; - return "support.class"; - } - this.next = ""; - return "string"; - }, - regex: ".*$", - next: "start" - }] - } - }, { - regex : "$", - token : "empty", - next : function(currentState, stack) { - if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") - return stack[0]; - return currentState; - } - }, { - token : "keyword.operator", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : "^=end(?:$|\\s.*$)", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ] - }; - - this.normalizeRules(); -}; - -oop.inherits(RubyHighlightRules, TextHighlightRules); - -exports.RubyHighlightRules = RubyHighlightRules; -}); - -define("ace/mode/haml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/ruby_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var RubyExports = require("./ruby_highlight_rules"); -var RubyHighlightRules = RubyExports.RubyHighlightRules; - -var HamlHighlightRules = function() { - - this.$rules = - { - "start": [ - { - token : "punctuation.section.comment", - regex : /^\s*\/.*/ - }, - { - token : "punctuation.section.comment", - regex : /^\s*#.*/ - }, - { - token: "string.quoted.double", - regex: "==.+?==" - }, - { - token: "keyword.other.doctype", - regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?" - }, - RubyExports.qString, - RubyExports.qqString, - RubyExports.tString, - { - token: ["entity.name.tag.haml"], - regex: /^\s*%[\w:]+/, - next: "tag_single" - }, - { - token: [ "meta.escape.haml" ], - regex: "^\\s*\\\\." - }, - RubyExports.constantNumericHex, - RubyExports.constantNumericFloat, - - RubyExports.constantOtherSymbol, - { - token: "text", - regex: "=|-|~", - next: "embedded_ruby" - } - ], - "tag_single": [ - { - token: "entity.other.attribute-name.class.haml", - regex: "\\.[\\w-]+" - }, - { - token: "entity.other.attribute-name.id.haml", - regex: "#[\\w-]+" - }, - { - token: "punctuation.section", - regex: "\\{", - next: "section" - }, - - RubyExports.constantOtherSymbol, - - { - token: "text", - regex: /\s/, - next: "start" - }, - { - token: "empty", - regex: "$|(?!\\.|#|\\{|\\[|=|-|~|\\/)", - next: "start" - } - ], - "section": [ - RubyExports.constantOtherSymbol, - - RubyExports.qString, - RubyExports.qqString, - RubyExports.tString, - - RubyExports.constantNumericHex, - RubyExports.constantNumericFloat, - { - token: "punctuation.section", - regex: "\\}", - next: "start" - } - ], - "embedded_ruby": [ - RubyExports.constantNumericHex, - RubyExports.constantNumericFloat, - { - token : "support.class", // class name - regex : "[A-Z][a-zA-Z_\\d]+" - }, - { - token : new RubyHighlightRules().getKeywords(), - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, - { - token : ["keyword", "text", "text"], - regex : "(?:do|\\{)(?: \\|[^|]+\\|)?$", - next : "start" - }, - { - token : ["text"], - regex : "^$", - next : "start" - }, - { - token : ["text"], - regex : "^(?!.*\\|\\s*$)", - next : "start" - } - ] -} - -}; - -oop.inherits(HamlHighlightRules, TextHighlightRules); - -exports.HamlHighlightRules = HamlHighlightRules; -}); - -define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/haml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haml_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var HamlHighlightRules = require("./haml_highlight_rules").HamlHighlightRules; -var FoldMode = require("./folding/coffee").FoldMode; - -var Mode = function() { - this.HighlightRules = HamlHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = ["//", "#"]; - - this.$id = "ace/mode/haml"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),s=e("./text_highlight_rules").TextHighlightRules,a=t.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"},o=(t.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},t.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},t.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"},t.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"}),i=t.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"},l=function(){var e="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many",t="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield",r="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING",n="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",s=this.$keywords=this.createKeywordMapper({keyword:t,"constant.language":r,"variable.language":n,"support.function":e,"invalid.deprecated":"debugger"},"identifier");this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment",regex:"^=begin(?:$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},[{regex:"[{}]",onMatch:function(e,t,r){return this.next="{"==e?this.nextState:"","{"==e&&r.length?(r.unshift("start",t),"paren.lparen"):"}"==e&&r.length&&(r.shift(),this.next=r.shift(),this.next.indexOf("string")!=-1)?"paren.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.start",regex:/"/,push:[{token:"constant.language.escape",regex:/\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/},{token:"paren.start",regex:/\#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:/\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/},{token:"paren.start",regex:/\#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/'/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]}],{token:"text",regex:"::"},{token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]+"},a,o,i,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:s,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(e,t,r){var n="-"==e[2]?"indentedHeredoc":"heredoc",s=e.split(this.splitRegex);return r.push(n,s[3]),[{type:"constant",value:s[1]},{type:"string",value:s[2]},{type:"support.class",value:s[3]},{type:"string",value:s[4]}]},regex:"(<<-?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(e,t,r){return e===r[1]?(r.shift(),r.shift(),this.next=r[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,r){return e===r[1]?(r.shift(),r.shift(),this.next=r[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return"heredoc"===t[0]||"indentedHeredoc"===t[0]?t[0]:e}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"^=end(?:$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}]},this.normalizeRules()};n.inherits(l,s),t.RubyHighlightRules=l}),define("ace/mode/haml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/ruby_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),s=e("./text_highlight_rules").TextHighlightRules,a=e("./ruby_highlight_rules"),o=a.RubyHighlightRules,i=function(){this.$rules={start:[{token:"punctuation.section.comment",regex:/^\s*\/.*/},{token:"punctuation.section.comment",regex:/^\s*#.*/},{token:"string.quoted.double",regex:"==.+?=="},{token:"keyword.other.doctype",regex:"^!!!\\s*(?:[a-zA-Z0-9-_]+)?"},a.qString,a.qqString,a.tString,{token:["entity.name.tag.haml"],regex:/^\s*%[\w:]+/,next:"tag_single"},{token:["meta.escape.haml"],regex:"^\\s*\\\\."},a.constantNumericHex,a.constantNumericFloat,a.constantOtherSymbol,{token:"text",regex:"=|-|~",next:"embedded_ruby"}],tag_single:[{token:"entity.other.attribute-name.class.haml",regex:"\\.[\\w-]+"},{token:"entity.other.attribute-name.id.haml",regex:"#[\\w-]+"},{token:"punctuation.section",regex:"\\{",next:"section"},a.constantOtherSymbol,{token:"text",regex:/\s/,next:"start"},{token:"empty",regex:"$|(?!\\.|#|\\{|\\[|=|-|~|\\/)",next:"start"}],section:[a.constantOtherSymbol,a.qString,a.qqString,a.tString,a.constantNumericHex,a.constantNumericFloat,{token:"punctuation.section",regex:"\\}",next:"start"}],embedded_ruby:[a.constantNumericHex,a.constantNumericFloat,{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]+"},{token:(new o).getKeywords(),regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:["keyword","text","text"],regex:"(?:do|\\{)(?: \\|[^|]+\\|)?$",next:"start"},{token:["text"],regex:"^$",next:"start"},{token:["text"],regex:"^(?!.*\\|\\s*$)",next:"start"}]}};n.inherits(i,s),t.HamlHighlightRules=i}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,r){"use strict";var n=e("../../lib/oop"),s=e("./fold_mode").FoldMode,a=e("../../range").Range,o=t.FoldMode=function(){};n.inherits(o,s),function(){this.getFoldWidgetRange=function(e,t,r){var n=this.indentationBlock(e,r);if(n)return n;var s=/\S/,o=e.getLine(r),i=o.search(s);if(i!=-1&&"#"==o[i]){for(var l=o.length,c=e.getLength(),_=r,g=r;++r_){var u=e.getLine(g).length;return new a(_,l,g,u)}}},this.getFoldWidget=function(e,t,r){var n=e.getLine(r),s=n.search(/\S/),a=e.getLine(r+1),o=e.getLine(r-1),i=o.search(/\S/),l=a.search(/\S/);if(s==-1)return e.foldWidgets[r-1]=i!=-1&&i=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = CssHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.foldingRules = "cStyle"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("csslint", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/css"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === " -1; -} - -(function() { - - this.getFoldWidget = function(session, foldStyle, row) { - var tag = this._getFirstTagInLine(session, row); - - if (!tag) - return ""; - - if (tag.closing || (!tag.tagName && tag.selfClosing)) - return foldStyle == "markbeginend" ? "end" : ""; - - if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) - return ""; - - if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) - return ""; - - return "start"; - }; - this._getFirstTagInLine = function(session, row) { - var tokens = session.getTokens(row); - var tag = new Tag(); - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (is(token, "tag-open")) { - tag.end.column = tag.start.column + token.value.length; - tag.closing = is(token, "end-tag-open"); - token = tokens[++i]; - if (!token) - return null; - tag.tagName = token.value; - tag.end.column += token.value.length; - for (i++; i < tokens.length; i++) { - token = tokens[i]; - tag.end.column += token.value.length; - if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - break; - } - } - return tag; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - return tag; - } - tag.start.column += token.value.length; - } - - return null; - }; - - this._findEndTagInLine = function(session, row, tagName, startColumn) { - var tokens = session.getTokens(row); - var column = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - column += token.value.length; - if (column < startColumn) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var firstTag = this._getFirstTagInLine(session, row); - - if (!firstTag) - return null; - - var isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var MixedFoldMode = require("./mixed").FoldMode; -var XmlFoldMode = require("./xml").FoldMode; -var CStyleFoldMode = require("./cstyle").FoldMode; - -var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { - MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { - "js-": new CStyleFoldMode(), - "css-": new CStyleFoldMode() - }); -}; - -oop.inherits(FoldMode, MixedFoldMode); - -}); - -define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var TokenIterator = require("../token_iterator").TokenIterator; - -var commonAttributes = [ - "accesskey", - "class", - "contenteditable", - "contextmenu", - "dir", - "draggable", - "dropzone", - "hidden", - "id", - "inert", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "lang", - "spellcheck", - "style", - "tabindex", - "title", - "translate" -]; - -var eventAttributes = [ - "onabort", - "onblur", - "oncancel", - "oncanplay", - "oncanplaythrough", - "onchange", - "onclick", - "onclose", - "oncontextmenu", - "oncuechange", - "ondblclick", - "ondrag", - "ondragend", - "ondragenter", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onended", - "onerror", - "onfocus", - "oninput", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeyup", - "onload", - "onloadeddata", - "onloadedmetadata", - "onloadstart", - "onmousedown", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onpause", - "onplay", - "onplaying", - "onprogress", - "onratechange", - "onreset", - "onscroll", - "onseeked", - "onseeking", - "onselect", - "onshow", - "onstalled", - "onsubmit", - "onsuspend", - "ontimeupdate", - "onvolumechange", - "onwaiting" -]; - -var globalAttributes = commonAttributes.concat(eventAttributes); - -var attributeMap = { - "html": ["manifest"], - "head": [], - "title": [], - "base": ["href", "target"], - "link": ["href", "hreflang", "rel", "media", "type", "sizes"], - "meta": ["http-equiv", "name", "content", "charset"], - "style": ["type", "media", "scoped"], - "script": ["charset", "type", "src", "defer", "async"], - "noscript": ["href"], - "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], - "section": [], - "nav": [], - "article": ["pubdate"], - "aside": [], - "h1": [], - "h2": [], - "h3": [], - "h4": [], - "h5": [], - "h6": [], - "header": [], - "footer": [], - "address": [], - "main": [], - "p": [], - "hr": [], - "pre": [], - "blockquote": ["cite"], - "ol": ["start", "reversed"], - "ul": [], - "li": ["value"], - "dl": [], - "dt": [], - "dd": [], - "figure": [], - "figcaption": [], - "div": [], - "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], - "em": [], - "strong": [], - "small": [], - "s": [], - "cite": [], - "q": ["cite"], - "dfn": [], - "abbr": [], - "data": [], - "time": ["datetime"], - "code": [], - "var": [], - "samp": [], - "kbd": [], - "sub": [], - "sup": [], - "i": [], - "b": [], - "u": [], - "mark": [], - "ruby": [], - "rt": [], - "rp": [], - "bdi": [], - "bdo": [], - "span": [], - "br": [], - "wbr": [], - "ins": ["cite", "datetime"], - "del": ["cite", "datetime"], - "img": ["alt", "src", "height", "width", "usemap", "ismap"], - "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], - "embed": ["src", "height", "width", "type"], - "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], - "param": ["name", "value"], - "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], - "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], - "source": ["src", "type", "media"], - "track": ["kind", "src", "srclang", "label", "default"], - "canvas": ["width", "height"], - "map": ["name"], - "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], - "svg": [], - "math": [], - "table": ["summary"], - "caption": [], - "colgroup": ["span"], - "col": ["span"], - "tbody": [], - "thead": [], - "tfoot": [], - "tr": [], - "td": ["headers", "rowspan", "colspan"], - "th": ["headers", "rowspan", "colspan", "scope"], - "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], - "fieldset": ["disabled", "form", "name"], - "legend": [], - "label": ["form", "for"], - "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], - "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], - "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], - "datalist": [], - "optgroup": ["disabled", "label"], - "option": ["disabled", "selected", "label", "value"], - "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], - "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], - "output": ["for", "form", "name"], - "progress": ["value", "max"], - "meter": ["value", "min", "max", "low", "high", "optimum"], - "details": ["open"], - "summary": [], - "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], - "menu": ["type", "label"], - "dialog": ["open"] -}; - -var elements = Object.keys(attributeMap); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -function findTagName(session, pos) { - var iterator = new TokenIterator(session, pos.row, pos.column); - var token = iterator.getCurrentToken(); - while (token && !is(token, "tag-name")){ - token = iterator.stepBackward(); - } - if (token) - return token.value; -} - -var HtmlCompletions = function() { - -}; - -(function() { - - this.getCompletions = function(state, session, pos, prefix) { - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) - return this.getTagCompletions(state, session, pos, prefix); - if (is(token, "tag-whitespace") || is(token, "attribute-name")) - return this.getAttributeCompetions(state, session, pos, prefix); - - return []; - }; - - this.getTagCompletions = function(state, session, pos, prefix) { - return elements.map(function(element){ - return { - value: element, - meta: "tag", - score: Number.MAX_VALUE - }; - }); - }; - - this.getAttributeCompetions = function(state, session, pos, prefix) { - var tagName = findTagName(session, pos); - if (!tagName) - return []; - var attributes = globalAttributes; - if (tagName in attributeMap) { - attributes = attributes.concat(attributeMap[tagName]); - } - return attributes.map(function(attribute){ - return { - caption: attribute, - snippet: attribute + '="$0"', - meta: "attribute", - score: Number.MAX_VALUE - }; - }); - }; - -}).call(HtmlCompletions.prototype); - -exports.HtmlCompletions = HtmlCompletions; -}); - -define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var CssMode = require("./css").Mode; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; -var HtmlFoldMode = require("./folding/html").FoldMode; -var HtmlCompletions = require("./html_completions").HtmlCompletions; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; -var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; - -var Mode = function(options) { - this.fragmentContext = options && options.fragmentContext; - this.HighlightRules = HtmlHighlightRules; - this.$behaviour = new XmlBehaviour(); - this.$completer = new HtmlCompletions(); - - this.createModeDelegates({ - "js-": JavaScriptMode, - "css-": CssMode - }); - - this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.blockComment = {start: ""}; - - this.voidElements = lang.arrayToMap(voidElements); - - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - this.checkOutdent = function(state, line, input) { - return false; - }; - - this.getCompletions = function(state, session, pos, prefix) { - return this.$completer.getCompletions(state, session, pos, prefix); - }; - - this.createWorker = function(session) { - if (this.constructor != Mode) - return; - var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - if (this.fragmentContext) - worker.call("setOptions", [{context: this.fragmentContext}]); - - worker.on("error", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/html"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/handlebars_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; - -function pop2(currentState, stack) { - stack.splice(0, 3); - return stack.shift() || "start"; -} -var HandlebarsHighlightRules = function() { - HtmlHighlightRules.call(this); - var hbs = { - regex : "(?={{)", - push : "handlebars" - }; - for (var key in this.$rules) { - this.$rules[key].unshift(hbs); - } - this.$rules.handlebars = [{ - token : "comment.start", - regex : "{{!--", - push : [{ - token : "comment.end", - regex : "--}}", - next : pop2 - }, { - defaultToken : "comment" - }] - }, { - token : "comment.start", - regex : "{{!", - push : [{ - token : "comment.end", - regex : "}}", - next : pop2 - }, { - defaultToken : "comment" - }] - }, { - token : "support.function", // unescaped variable - regex : "{{{", - push : [{ - token : "support.function", - regex : "}}}", - next : pop2 - }, { - token : "variable.parameter", - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*" - }] - }, { - token : "storage.type.start", // begin section - regex : "{{[#\\^/&]?", - push : [{ - token : "storage.type.end", - regex : "}}", - next : pop2 - }, { - token : "variable.parameter", - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*" - }] - }]; - - this.normalizeRules(); -}; - -oop.inherits(HandlebarsHighlightRules, HtmlHighlightRules); - -exports.HandlebarsHighlightRules = HandlebarsHighlightRules; -}); - -define("ace/mode/behaviour/html",["require","exports","module","ace/lib/oop","ace/mode/behaviour/xml"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var XmlBehaviour = require("../behaviour/xml").XmlBehaviour; - -var HtmlBehaviour = function () { - - XmlBehaviour.call(this); - -}; - -oop.inherits(HtmlBehaviour, XmlBehaviour); - -exports.HtmlBehaviour = HtmlBehaviour; -}); - -define("ace/mode/handlebars",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/handlebars_highlight_rules","ace/mode/behaviour/html","ace/mode/folding/html"], function(require, exports, module) { - "use strict"; - -var oop = require("../lib/oop"); -var HtmlMode = require("./html").Mode; -var HandlebarsHighlightRules = require("./handlebars_highlight_rules").HandlebarsHighlightRules; -var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour; -var HtmlFoldMode = require("./folding/html").FoldMode; - -var Mode = function() { - HtmlMode.call(this); - this.HighlightRules = HandlebarsHighlightRules; - this.$behaviour = new HtmlBehaviour(); - - - this.foldingRules = new HtmlFoldMode(); -}; - -oop.inherits(Mode, HtmlMode); - -(function() { - this.blockComment = {start: "{!--", end: "--}"}; - this.$id = "ace/mode/handlebars"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};o.inherits(i,r),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",o="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},r.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[r.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[r.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(r,"doc-",[r.getEndRule("no_regex")]),this.normalizeRules()};o.inherits(a,i),t.JavaScriptHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),r=n.match(/^(\s*\})/);if(!r)return 0;var i=r[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new o(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var o,r=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?o=c[t]:void(o=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,r,i){var a=n.getCursorPosition(),l=r.doc.getLine(a.row);if("{"==i){g(n);var u=n.getSelectionRange(),c=r.doc.getTextRange(u);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return{text:"{"+c+"}",selection:!1};if(d.isSaneInsertion(n,r))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var m=l.substring(a.column,a.column+1);if("}"==m){var p=r.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==p&&d.isAutoInsertedClosing(a,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var h="";d.isMaybeInsertedClosing(a,l)&&(h=s.stringRepeat("}",o.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=l.substring(a.column,a.column+1);if("}"===m){var f=r.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!f)return null;var x=this.$getIndent(r.getLine(f.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var b=x+r.getTabString();return{text:"\n"+b+"\n"+x+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,i){var a=r.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){g(n);var s=r.doc.getLine(i.start.row),l=s.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,o,r){if("("==r){g(n);var i=n.getSelectionRange(),a=o.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,")"),{text:"()",selection:[1,1]}}else if(")"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=o.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"("==i){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(")"==s)return r.end.column++,r}}),this.add("brackets","insertion",function(e,t,n,o,r){if("["==r){g(n);var i=n.getSelectionRange(),a=o.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=o.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"["==i){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if("]"==s)return r.end.column++,r}}),this.add("string_dquotes","insertion",function(e,t,n,o,r){if('"'==r||"'"==r){g(n);var i=r,a=n.getSelectionRange(),s=o.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var l=n.getCursorPosition(),u=o.doc.getLine(l.row),c=u.substring(l.column-1,l.column),d=u.substring(l.column,l.column+1),m=o.getTokenAt(l.row,l.column),p=o.getTokenAt(l.row,l.column+1);if("\\"==c&&m&&/escape/.test(m.type))return null;var h,f=m&&/string/.test(m.type),x=!p||/string/.test(p.type);if(d==i)h=f!==x;else{if(f&&!x)return null;if(f&&x)return null;var b=o.$mode.tokenRe;b.lastIndex=0;var k=b.test(c);b.lastIndex=0;var v=b.test(c);if(k||v)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==i||"'"==i)){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(s==i)return r.end.column++,r}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),o=new a(t,n.row,n.column);if(!this.$matchTokenType(o.getCurrentToken()||"text",l)){var r=new a(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return o.stepForward(),o.getCurrentTokenRow()!==n.row||this.$matchTokenType(o.getCurrentToken()||"text",u)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=r.row,o.autoInsertedLineEnd=n+i.substr(r.column),o.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=r.row,o.maybeInsertedLineStart=i.substr(0,r.column)+n,o.maybeInsertedLineEnd=i.substr(r.column),o.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return o.autoInsertedBrackets>0&&e.row===o.autoInsertedRow&&n===o.autoInsertedLineEnd[0]&&t.substr(e.column)===o.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return o.maybeInsertedBrackets>0&&e.row===o.maybeInsertedRow&&t.substr(e.column)===o.maybeInsertedLineEnd&&t.substr(0,e.column)==o.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},r.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(o)?"start":r},this.getFoldWidgetRange=function(e,t,n,o){var r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);var i=r.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(o?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=r.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),o=n.search(/\S/),i=t,a=n.length;t+=1;for(var s=t,l=e.getLength();++tu)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=i)break;if(c.isMultiLine())t=c.end.row;else if(o==u)break}s=t}}return new r(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++na)return new r(a,o,c,t.length)}}.call(a.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),i=r.tokens,a=r.state;if(i.length&&"comment"==i[i.length-1].type)return o;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(o+=n)}else if("doc-start"==e){if("start"==a||"no_regex"==a)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(o+=" "),o+="* ")}return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(c.prototype),t.Mode=c}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),i=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",u=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",m=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":s,"support.type":i,"support.constant.color":l,"support.constant.fonts":u},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};o.inherits(m,r),t.CssHighlightRules=m}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),i=e("../../token_iterator").TokenIterator,a=function(){this.inherit(r),this.add("colon","insertion",function(e,t,n,o,r){if(":"===r){var a=n.getCursorPosition(),s=new i(o,a.row,a.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var u=o.doc.getLine(a.row),c=u.substring(a.column,a.column+1); +if(":"===c)return{text:"",selection:[1,1]};if(!u.substring(a.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&":"===a){var s=n.getCursorPosition(),l=new i(o,s.row,s.column),u=l.getCurrentToken();if(u&&u.value.match(/\s+/)&&(u=l.stepBackward()),u&&"support.type"===u.type){var c=o.doc.getLine(r.start.row),g=c.substring(r.end.column,r.end.column+1);if(";"===g)return r.end.column++,r}}}),this.add("semicolon","insertion",function(e,t,n,o,r){if(";"===r){var i=n.getCursorPosition(),a=o.doc.getLine(i.row),s=a.substring(i.column,i.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};o.inherits(a,r),t.CssBehaviour=a}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e).tokens;if(r.length&&"comment"==r[r.length-1].type)return o;var i=t.match(/^.*\{\s*$/);return i&&(o+=n),o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===i&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(r.prototype),o.inherits(i,r),t.XmlHighlightRules=i}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./css_highlight_rules").CssHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=r.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),u=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(i,"css-","style"),this.embedTagRules(a,"js-","script"),this.constructor===u&&this.normalizeRules()};o.inherits(u,s),t.HtmlHighlightRules=u}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if('"'==i||"'"==i){var s=i,l=r.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),g=c.substring(u.column,u.column+1),d=new a(r,u.row,u.column),m=d.getCurrentToken();if(g==s&&(o(m,"attribute-value")||o(m,"string")))return{text:"",selection:[1,1]};if(m||(m=d.stepBackward()),!m)return;for(;o(m,"tag-whitespace")||o(m,"whitespace");)m=d.stepBackward();var p=!g||g.match(/\s/);if(o(m,"attribute-equals")&&(p||">"==g)||o(m,"decl-attribute-equals")&&(p||"?"==g))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==i||"'"==i)){var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(s==i)return r.end.column++,r}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(">"==i){var s=n.getCursorPosition(),l=new a(r,s.row,s.column),u=l.getCurrentToken()||l.stepBackward();if(!u||!(o(u,"tag-name")||o(u,"tag-whitespace")||o(u,"attribute-name")||o(u,"attribute-equals")||o(u,"attribute-value")))return;if(o(u,"reference.attribute-value"))return;if(o(u,"attribute-value")){var c=u.value.charAt(0);if('"'==c||"'"==c){var g=u.value.charAt(u.value.length-1),d=l.getCurrentTokenColumn()+u.value.length;if(d>s.column||d==s.column&&c!=g)return}}for(;!o(u,"tag-name");)u=l.stepBackward();var m=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn();if(o(l.stepBackward(),"end-tag-open"))return;var h=u.value;if(m==s.row&&(h=h.substring(0,s.column-p)),this.voidElements.hasOwnProperty(h.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,o,r){if("\n"==r){var i=n.getCursorPosition(),s=o.getLine(i.row),l=new a(o,i.row,i.column),u=l.getCurrentToken();if(u&&u.type.indexOf("tag-close")!==-1){for(;u&&u.type.indexOf("tag-name")===-1;)u=l.stepBackward();if(!u)return;var c=u.value,g=l.getCurrentTokenRow();if(u=l.stepBackward(),!u||u.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]){var d=o.getTokenAt(i.row,i.column+1),s=o.getLine(g),m=this.$getIndent(s),p=m+o.getTabString();return d&&"-1}var r=e("../../lib/oop"),i=(e("../../lib/lang"),e("../../range").Range),a=e("./fold_mode").FoldMode,s=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(e,t){a.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(l,a);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var o=this._getFirstTagInLine(e,n);return o?o.closing||!o.tagName&&o.selfClosing?"markbeginend"==t?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,o.tagName,o.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new u,i=0;i"==a.value;break}return r}if(o(a,"tag-close"))return r.selfClosing="/>"==a.value,r;r.start.column+=a.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var i=e.getTokens(t),a=0,s=0;s"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(t&&n.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,n){var o=this._getFirstTagInLine(e,n);if(!o)return null;var r,a=o.closing||o.selfClosing,l=[];if(a)for(var u=new s(e,n,o.end.column),c={row:n,column:o.start.column};r=this._readTagBackward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,i.fromPoints(r.start,r.end)}if(r.closing)l.push(r);else if(this._pop(l,r),0==l.length)return r.start.column+=r.tagName.length+2,i.fromPoints(r.start,c)}else for(var u=new s(e,n,o.start.column),g={row:n,column:o.start.column+o.tagName.length+2};r=this._readTagForward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,i.fromPoints(r.start,r.end)}if(r.closing){if(this._pop(l,r),0==l.length)return i.fromPoints(g,r.start)}else l.push(r)}}}).call(l.prototype)}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./mixed").FoldMode,i=e("./xml").FoldMode,a=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){r.call(this,new i(e,t),{"js-":new a,"css-":new a})};o.inherits(s,r)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}function r(e,t){for(var n=new i(e,t.row,t.column),r=n.getCurrentToken();r&&!o(r,"tag-name");)r=n.stepBackward();if(r)return r.value}var i=e("../token_iterator").TokenIterator,a=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=a.concat(s),u={html:["manifest"],head:[],title:[],base:["href","target"],link:["href","hreflang","rel","media","type","sizes"],meta:["http-equiv","name","content","charset"],style:["type","media","scoped"],script:["charset","type","src","defer","async"],noscript:["href"],body:["onafterprint","onbeforeprint","onbeforeunload","onhashchange","onmessage","onoffline","onpopstate","onredo","onresize","onstorage","onundo","onunload"],section:[],nav:[],article:["pubdate"],aside:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],footer:[],address:[],main:[],p:[],hr:[],pre:[],blockquote:["cite"],ol:["start","reversed"],ul:[],li:["value"],dl:[],dt:[],dd:[],figure:[],figcaption:[],div:[],a:["href","target","ping","rel","media","hreflang","type"],em:[],strong:[],small:[],s:[],cite:[],q:["cite"],dfn:[],abbr:[],data:[],time:["datetime"],code:[],var:[],samp:[],kbd:[],sub:[],sup:[],i:[],b:[],u:[],mark:[],ruby:[],rt:[],rp:[],bdi:[],bdo:[],span:[],br:[],wbr:[],ins:["cite","datetime"],del:["cite","datetime"],img:["alt","src","height","width","usemap","ismap"],iframe:["name","src","height","width","sandbox","seamless"],embed:["src","height","width","type"],object:["param","data","type","height","width","usemap","name","form","classid"],param:["name","value"],video:["src","autobuffer","autoplay","loop","controls","width","height","poster"],audio:["src","autobuffer","autoplay","loop","controls"],source:["src","type","media"],track:["kind","src","srclang","label","default"],canvas:["width","height"],map:["name"],area:["shape","coords","href","hreflang","alt","target","media","rel","ping","type"],svg:[],math:[],table:["summary"],caption:[],colgroup:["span"],col:["span"],tbody:[],thead:[],tfoot:[],tr:[],td:["headers","rowspan","colspan"],th:["headers","rowspan","colspan","scope"],form:["accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],fieldset:["disabled","form","name"],legend:[],label:["form","for"],input:["type","accept","alt","autocomplete","checked","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","multiple","pattern","placeholder","readonly","required","size","src","step","width","files","value"],button:["autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","value","type"],select:["autofocus","disabled","form","multiple","name","size"],datalist:[],optgroup:["disabled","label"],option:["disabled","selected","label","value"],textarea:["autofocus","disabled","form","maxlength","name","placeholder","readonly","required","rows","cols","wrap"],keygen:["autofocus","challenge","disabled","form","keytype","name"],output:["for","form","name"],progress:["value","max"],meter:["value","min","max","low","high","optimum"],details:["open"],summary:[],command:["type","label","icon","disabled","checked","radiogroup","command"],menu:["type","label"],dialog:["open"]},c=Object.keys(u),g=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);return i?o(i,"tag-name")||o(i,"tag-open")||o(i,"end-tag-open")?this.getTagCompletions(e,t,n,r):o(i,"tag-whitespace")||o(i,"attribute-name")?this.getAttributeCompetions(e,t,n,r):[]:[]},this.getTagCompletions=function(e,t,n,o){return c.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompetions=function(e,t,n,o){var i=r(t,n);if(!i)return[];var a=l;return i in u&&(a=a.concat(u[i])),a.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})}}).call(g.prototype),t.HtmlCompletions=g}),define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./text").Mode,a=e("./javascript").Mode,s=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,g=e("./html_completions").HtmlCompletions,d=e("../worker/worker_client").WorkerClient,m=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],p=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],h=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new u,this.$completer=new g,this.createModeDelegates({"js-":a,"css-":s}),this.foldingRules=new c(this.voidElements,r.arrayToMap(p))};o.inherits(h,i),function(){this.blockComment={start:""},this.voidElements=r.arrayToMap(m),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,o){return this.$completer.getCompletions(e,t,n,o)},this.createWorker=function(e){if(this.constructor==h){var t=new d(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(h.prototype),t.Mode=h}),define("ace/mode/handlebars_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";function o(e,t){return t.splice(0,3),t.shift()||"start"}var r=e("../lib/oop"),i=e("./html_highlight_rules").HtmlHighlightRules,a=function(){i.call(this);var e={regex:"(?={{)",push:"handlebars"};for(var t in this.$rules)this.$rules[t].unshift(e);this.$rules.handlebars=[{token:"comment.start",regex:"{{!--",push:[{token:"comment.end",regex:"--}}",next:o},{defaultToken:"comment"}]},{token:"comment.start",regex:"{{!",push:[{token:"comment.end",regex:"}}",next:o},{defaultToken:"comment"}]},{token:"support.function",regex:"{{{",push:[{token:"support.function",regex:"}}}",next:o},{token:"variable.parameter",regex:"[a-zA-Z_$][a-zA-Z0-9_$]*"}]},{token:"storage.type.start",regex:"{{[#\\^/&]?",push:[{token:"storage.type.end",regex:"}}",next:o},{token:"variable.parameter",regex:"[a-zA-Z_$][a-zA-Z0-9_$]*"}]}],this.normalizeRules()};r.inherits(a,i),t.HandlebarsHighlightRules=a}),define("ace/mode/behaviour/html",["require","exports","module","ace/lib/oop","ace/mode/behaviour/xml"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../behaviour/xml").XmlBehaviour,i=function(){r.call(this)};o.inherits(i,r),t.HtmlBehaviour=i}),define("ace/mode/handlebars",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/handlebars_highlight_rules","ace/mode/behaviour/html","ace/mode/folding/html"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./html").Mode,i=e("./handlebars_highlight_rules").HandlebarsHighlightRules,a=e("./behaviour/html").HtmlBehaviour,s=e("./folding/html").FoldMode,l=function(){r.call(this),this.HighlightRules=i,this.$behaviour=new a,this.foldingRules=new s};o.inherits(l,r),function(){this.blockComment={start:"{!--",end:"--}"},this.$id="ace/mode/handlebars"}.call(l.prototype),t.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-haskell.js b/www/js/vendor/ace/mode-haskell.js index 9ec2192c3..6e381320b 100755 --- a/www/js/vendor/ace/mode-haskell.js +++ b/www/js/vendor/ace/mode-haskell.js @@ -1,372 +1 @@ -define("ace/mode/haskell_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var HaskellHighlightRules = function() { - - this.$rules = { start: - [ { token: - [ 'punctuation.definition.entity.haskell', - 'keyword.operator.function.infix.haskell', - 'punctuation.definition.entity.haskell' ], - regex: '(`)([a-zA-Z_\']*?)(`)', - comment: 'In case this regex seems unusual for an infix operator, note that Haskell allows any ordinary function application (elem 4 [1..10]) to be rewritten as an infix expression (4 `elem` [1..10]).' }, - { token: 'constant.language.unit.haskell', regex: '\\(\\)' }, - { token: 'constant.language.empty-list.haskell', - regex: '\\[\\]' }, - { token: 'keyword.other.haskell', - regex: 'module', - push: - [ { token: 'keyword.other.haskell', regex: 'where', next: 'pop' }, - { include: '#module_name' }, - { include: '#module_exports' }, - { token: 'invalid', regex: '[a-z]+' }, - { defaultToken: 'meta.declaration.module.haskell' } ] }, - { token: 'keyword.other.haskell', - regex: '\\bclass\\b', - push: - [ { token: 'keyword.other.haskell', - regex: '\\bwhere\\b', - next: 'pop' }, - { token: 'support.class.prelude.haskell', - regex: '\\b(?:Monad|Functor|Eq|Ord|Read|Show|Num|(?:Frac|Ra)tional|Enum|Bounded|Real(?:Frac|Float)?|Integral|Floating)\\b' }, - { token: 'entity.other.inherited-class.haskell', - regex: '[A-Z][A-Za-z_\']*' }, - { token: 'variable.other.generic-type.haskell', - regex: '\\b[a-z][a-zA-Z0-9_\']*\\b' }, - { defaultToken: 'meta.declaration.class.haskell' } ] }, - { token: 'keyword.other.haskell', - regex: '\\binstance\\b', - push: - [ { token: 'keyword.other.haskell', - regex: '\\bwhere\\b|$', - next: 'pop' }, - { include: '#type_signature' }, - { defaultToken: 'meta.declaration.instance.haskell' } ] }, - { token: 'keyword.other.haskell', - regex: 'import', - push: - [ { token: 'meta.import.haskell', regex: '$|;', next: 'pop' }, - { token: 'keyword.other.haskell', regex: 'qualified|as|hiding' }, - { include: '#module_name' }, - { include: '#module_exports' }, - { defaultToken: 'meta.import.haskell' } ] }, - { token: [ 'keyword.other.haskell', 'meta.deriving.haskell' ], - regex: '(deriving)(\\s*\\()', - push: - [ { token: 'meta.deriving.haskell', regex: '\\)', next: 'pop' }, - { token: 'entity.other.inherited-class.haskell', - regex: '\\b[A-Z][a-zA-Z_\']*' }, - { defaultToken: 'meta.deriving.haskell' } ] }, - { token: 'keyword.other.haskell', - regex: '\\b(?:deriving|where|data|type|case|of|let|in|newtype|default)\\b' }, - { token: 'keyword.operator.haskell', regex: '\\binfix[lr]?\\b' }, - { token: 'keyword.control.haskell', - regex: '\\b(?:do|if|then|else)\\b' }, - { token: 'constant.numeric.float.haskell', - regex: '\\b(?:[0-9]+\\.[0-9]+(?:[eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\\b', - comment: 'Floats are always decimal' }, - { token: 'constant.numeric.haskell', - regex: '\\b(?:[0-9]+|0(?:[xX][0-9a-fA-F]+|[oO][0-7]+))\\b' }, - { token: - [ 'meta.preprocessor.c', - 'punctuation.definition.preprocessor.c', - 'meta.preprocessor.c' ], - regex: '^(\\s*)(#)(\\s*\\w+)', - comment: 'In addition to Haskell\'s "native" syntax, GHC permits the C preprocessor to be run on a source file.' }, - { include: '#pragma' }, - { token: 'punctuation.definition.string.begin.haskell', - regex: '"', - push: - [ { token: 'punctuation.definition.string.end.haskell', - regex: '"', - next: 'pop' }, - { token: 'constant.character.escape.haskell', - regex: '\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&])' }, - { token: 'constant.character.escape.octal.haskell', - regex: '\\\\o[0-7]+|\\\\x[0-9A-Fa-f]+|\\\\[0-9]+' }, - { token: 'constant.character.escape.control.haskell', - regex: '\\^[A-Z@\\[\\]\\\\\\^_]' }, - { defaultToken: 'string.quoted.double.haskell' } ] }, - { token: - [ 'punctuation.definition.string.begin.haskell', - 'string.quoted.single.haskell', - 'constant.character.escape.haskell', - 'constant.character.escape.octal.haskell', - 'constant.character.escape.hexadecimal.haskell', - 'constant.character.escape.control.haskell', - 'punctuation.definition.string.end.haskell' ], - regex: '(\')(?:([\\ -\\[\\]-~])|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_]))(\')' }, - { token: - [ 'meta.function.type-declaration.haskell', - 'entity.name.function.haskell', - 'meta.function.type-declaration.haskell', - 'keyword.other.double-colon.haskell' ], - regex: '^(\\s*)([a-z_][a-zA-Z0-9_\']*|\\([|!%$+\\-.,=]+\\))(\\s*)(::)', - push: - [ { token: 'meta.function.type-declaration.haskell', - regex: '$', - next: 'pop' }, - { include: '#type_signature' }, - { defaultToken: 'meta.function.type-declaration.haskell' } ] }, - { token: 'support.constant.haskell', - regex: '\\b(?:Just|Nothing|Left|Right|True|False|LT|EQ|GT|\\(\\)|\\[\\])\\b' }, - { token: 'constant.other.haskell', regex: '\\b[A-Z]\\w*\\b' }, - { include: '#comments' }, - { token: 'support.function.prelude.haskell', - regex: '\\b(?:abs|acos|acosh|all|and|any|appendFile|applyM|asTypeOf|asin|asinh|atan|atan2|atanh|break|catch|ceiling|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|div|divMod|drop|dropWhile|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromEnum|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|head|id|init|interact|ioError|isDenormalized|isIEEE|isInfinite|isNaN|isNegativeZero|iterate|last|lcm|length|lex|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|odd|or|otherwise|pi|pred|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|read|readFile|readIO|readList|readLn|readParen|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showList|showParen|showString|shows|showsPrec|significand|signum|sin|sinh|snd|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|toEnum|toInteger|toRational|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\\b' }, - { include: '#infix_op' }, - { token: 'keyword.operator.haskell', - regex: '[|!%$?~+:\\-.=\\\\]+', - comment: 'In case this regex seems overly general, note that Haskell permits the definition of new operators which can be nearly any string of punctuation characters, such as $%^&*.' }, - { token: 'punctuation.separator.comma.haskell', regex: ',' } ], - '#block_comment': - [ { token: 'punctuation.definition.comment.haskell', - regex: '\\{-(?!#)', - push: - [ { include: '#block_comment' }, - { token: 'punctuation.definition.comment.haskell', - regex: '-\\}', - next: 'pop' }, - { defaultToken: 'comment.block.haskell' } ] } ], - '#comments': - [ { token: 'punctuation.definition.comment.haskell', - regex: '--.*', - push_: - [ { token: 'comment.line.double-dash.haskell', - regex: '$', - next: 'pop' }, - { defaultToken: 'comment.line.double-dash.haskell' } ] }, - { include: '#block_comment' } ], - '#infix_op': - [ { token: 'entity.name.function.infix.haskell', - regex: '\\([|!%$+:\\-.=]+\\)|\\(,+\\)' } ], - '#module_exports': - [ { token: 'meta.declaration.exports.haskell', - regex: '\\(', - push: - [ { token: 'meta.declaration.exports.haskell', - regex: '\\)', - next: 'pop' }, - { token: 'entity.name.function.haskell', - regex: '\\b[a-z][a-zA-Z_\']*' }, - { token: 'storage.type.haskell', regex: '\\b[A-Z][A-Za-z_\']*' }, - { token: 'punctuation.separator.comma.haskell', regex: ',' }, - { include: '#infix_op' }, - { token: 'meta.other.unknown.haskell', - regex: '\\(.*?\\)', - comment: 'So named because I don\'t know what to call this.' }, - { defaultToken: 'meta.declaration.exports.haskell' } ] } ], - '#module_name': - [ { token: 'support.other.module.haskell', - regex: '[A-Z][A-Za-z._\']*' } ], - '#pragma': - [ { token: 'meta.preprocessor.haskell', - regex: '\\{-#', - push: - [ { token: 'meta.preprocessor.haskell', - regex: '#-\\}', - next: 'pop' }, - { token: 'keyword.other.preprocessor.haskell', - regex: '\\b(?:LANGUAGE|UNPACK|INLINE)\\b' }, - { defaultToken: 'meta.preprocessor.haskell' } ] } ], - '#type_signature': - [ { token: - [ 'meta.class-constraint.haskell', - 'entity.other.inherited-class.haskell', - 'meta.class-constraint.haskell', - 'variable.other.generic-type.haskell', - 'meta.class-constraint.haskell', - 'keyword.other.big-arrow.haskell' ], - regex: '(\\(\\s*)([A-Z][A-Za-z]*)(\\s+)([a-z][A-Za-z_\']*)(\\)\\s*)(=>)' }, - { include: '#pragma' }, - { token: 'keyword.other.arrow.haskell', regex: '->' }, - { token: 'keyword.other.big-arrow.haskell', regex: '=>' }, - { token: 'support.type.prelude.haskell', - regex: '\\b(?:Int(?:eger)?|Maybe|Either|Bool|Float|Double|Char|String|Ordering|ShowS|ReadS|FilePath|IO(?:Error)?)\\b' }, - { token: 'variable.other.generic-type.haskell', - regex: '\\b[a-z][a-zA-Z0-9_\']*\\b' }, - { token: 'storage.type.haskell', - regex: '\\b[A-Z][a-zA-Z0-9_\']*\\b' }, - { token: 'support.constant.unit.haskell', regex: '\\(\\)' }, - { include: '#comments' } ] } - - this.normalizeRules(); -}; - -HaskellHighlightRules.metaData = { fileTypes: [ 'hs' ], - keyEquivalent: '^~H', - name: 'Haskell', - scopeName: 'source.haskell' } - - -oop.inherits(HaskellHighlightRules, TextHighlightRules); - -exports.HaskellHighlightRules = HaskellHighlightRules; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/haskell",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haskell_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var HaskellHighlightRules = require("./haskell_highlight_rules").HaskellHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = HaskellHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "--"; - this.blockComment = {start: "/*", end: "*/"}; - this.$id = "ace/mode/haskell"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/haskell_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{token:["punctuation.definition.entity.haskell","keyword.operator.function.infix.haskell","punctuation.definition.entity.haskell"],regex:"(`)([a-zA-Z_']*?)(`)",comment:"In case this regex seems unusual for an infix operator, note that Haskell allows any ordinary function application (elem 4 [1..10]) to be rewritten as an infix expression (4 `elem` [1..10])."},{token:"constant.language.unit.haskell",regex:"\\(\\)"},{token:"constant.language.empty-list.haskell",regex:"\\[\\]"},{token:"keyword.other.haskell",regex:"module",push:[{token:"keyword.other.haskell",regex:"where",next:"pop"},{include:"#module_name"},{include:"#module_exports"},{token:"invalid",regex:"[a-z]+"},{defaultToken:"meta.declaration.module.haskell"}]},{token:"keyword.other.haskell",regex:"\\bclass\\b",push:[{token:"keyword.other.haskell",regex:"\\bwhere\\b",next:"pop"},{token:"support.class.prelude.haskell",regex:"\\b(?:Monad|Functor|Eq|Ord|Read|Show|Num|(?:Frac|Ra)tional|Enum|Bounded|Real(?:Frac|Float)?|Integral|Floating)\\b"},{token:"entity.other.inherited-class.haskell",regex:"[A-Z][A-Za-z_']*"},{token:"variable.other.generic-type.haskell",regex:"\\b[a-z][a-zA-Z0-9_']*\\b"},{defaultToken:"meta.declaration.class.haskell"}]},{token:"keyword.other.haskell",regex:"\\binstance\\b",push:[{token:"keyword.other.haskell",regex:"\\bwhere\\b|$",next:"pop"},{include:"#type_signature"},{defaultToken:"meta.declaration.instance.haskell"}]},{token:"keyword.other.haskell",regex:"import",push:[{token:"meta.import.haskell",regex:"$|;",next:"pop"},{token:"keyword.other.haskell",regex:"qualified|as|hiding"},{include:"#module_name"},{include:"#module_exports"},{defaultToken:"meta.import.haskell"}]},{token:["keyword.other.haskell","meta.deriving.haskell"],regex:"(deriving)(\\s*\\()",push:[{token:"meta.deriving.haskell",regex:"\\)",next:"pop"},{token:"entity.other.inherited-class.haskell",regex:"\\b[A-Z][a-zA-Z_']*"},{defaultToken:"meta.deriving.haskell"}]},{token:"keyword.other.haskell",regex:"\\b(?:deriving|where|data|type|case|of|let|in|newtype|default)\\b"},{token:"keyword.operator.haskell",regex:"\\binfix[lr]?\\b"},{token:"keyword.control.haskell",regex:"\\b(?:do|if|then|else)\\b"},{token:"constant.numeric.float.haskell",regex:"\\b(?:[0-9]+\\.[0-9]+(?:[eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\\b",comment:"Floats are always decimal"},{token:"constant.numeric.haskell",regex:"\\b(?:[0-9]+|0(?:[xX][0-9a-fA-F]+|[oO][0-7]+))\\b"},{token:["meta.preprocessor.c","punctuation.definition.preprocessor.c","meta.preprocessor.c"],regex:"^(\\s*)(#)(\\s*\\w+)",comment:'In addition to Haskell\'s "native" syntax, GHC permits the C preprocessor to be run on a source file.'},{include:"#pragma"},{token:"punctuation.definition.string.begin.haskell",regex:'"',push:[{token:"punctuation.definition.string.end.haskell",regex:'"',next:"pop"},{token:"constant.character.escape.haskell",regex:"\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&])"},{token:"constant.character.escape.octal.haskell",regex:"\\\\o[0-7]+|\\\\x[0-9A-Fa-f]+|\\\\[0-9]+"},{token:"constant.character.escape.control.haskell",regex:"\\^[A-Z@\\[\\]\\\\\\^_]"},{defaultToken:"string.quoted.double.haskell"}]},{token:["punctuation.definition.string.begin.haskell","string.quoted.single.haskell","constant.character.escape.haskell","constant.character.escape.octal.haskell","constant.character.escape.hexadecimal.haskell","constant.character.escape.control.haskell","punctuation.definition.string.end.haskell"],regex:"(')(?:([\\ -\\[\\]-~])|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_]))(')"},{token:["meta.function.type-declaration.haskell","entity.name.function.haskell","meta.function.type-declaration.haskell","keyword.other.double-colon.haskell"],regex:"^(\\s*)([a-z_][a-zA-Z0-9_']*|\\([|!%$+\\-.,=]+\\))(\\s*)(::)",push:[{token:"meta.function.type-declaration.haskell",regex:"$",next:"pop"},{include:"#type_signature"},{defaultToken:"meta.function.type-declaration.haskell"}]},{token:"support.constant.haskell",regex:"\\b(?:Just|Nothing|Left|Right|True|False|LT|EQ|GT|\\(\\)|\\[\\])\\b"},{token:"constant.other.haskell",regex:"\\b[A-Z]\\w*\\b"},{include:"#comments"},{token:"support.function.prelude.haskell",regex:"\\b(?:abs|acos|acosh|all|and|any|appendFile|applyM|asTypeOf|asin|asinh|atan|atan2|atanh|break|catch|ceiling|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|div|divMod|drop|dropWhile|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromEnum|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|head|id|init|interact|ioError|isDenormalized|isIEEE|isInfinite|isNaN|isNegativeZero|iterate|last|lcm|length|lex|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|odd|or|otherwise|pi|pred|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|read|readFile|readIO|readList|readLn|readParen|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showList|showParen|showString|shows|showsPrec|significand|signum|sin|sinh|snd|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|toEnum|toInteger|toRational|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\\b"},{include:"#infix_op"},{token:"keyword.operator.haskell",regex:"[|!%$?~+:\\-.=\\\\]+",comment:"In case this regex seems overly general, note that Haskell permits the definition of new operators which can be nearly any string of punctuation characters, such as $%^&*."},{token:"punctuation.separator.comma.haskell",regex:","}],"#block_comment":[{token:"punctuation.definition.comment.haskell",regex:"\\{-(?!#)",push:[{include:"#block_comment"},{token:"punctuation.definition.comment.haskell",regex:"-\\}",next:"pop"},{defaultToken:"comment.block.haskell"}]}],"#comments":[{token:"punctuation.definition.comment.haskell",regex:"--.*",push_:[{token:"comment.line.double-dash.haskell",regex:"$",next:"pop"},{defaultToken:"comment.line.double-dash.haskell"}]},{include:"#block_comment"}],"#infix_op":[{token:"entity.name.function.infix.haskell",regex:"\\([|!%$+:\\-.=]+\\)|\\(,+\\)"}],"#module_exports":[{token:"meta.declaration.exports.haskell",regex:"\\(",push:[{token:"meta.declaration.exports.haskell",regex:"\\)",next:"pop"},{token:"entity.name.function.haskell",regex:"\\b[a-z][a-zA-Z_']*"},{token:"storage.type.haskell",regex:"\\b[A-Z][A-Za-z_']*"},{token:"punctuation.separator.comma.haskell",regex:","},{include:"#infix_op"},{token:"meta.other.unknown.haskell",regex:"\\(.*?\\)",comment:"So named because I don't know what to call this."},{defaultToken:"meta.declaration.exports.haskell"}]}],"#module_name":[{token:"support.other.module.haskell",regex:"[A-Z][A-Za-z._']*"}],"#pragma":[{token:"meta.preprocessor.haskell",regex:"\\{-#",push:[{token:"meta.preprocessor.haskell",regex:"#-\\}",next:"pop"},{token:"keyword.other.preprocessor.haskell",regex:"\\b(?:LANGUAGE|UNPACK|INLINE)\\b"},{defaultToken:"meta.preprocessor.haskell"}]}],"#type_signature":[{token:["meta.class-constraint.haskell","entity.other.inherited-class.haskell","meta.class-constraint.haskell","variable.other.generic-type.haskell","meta.class-constraint.haskell","keyword.other.big-arrow.haskell"],regex:"(\\(\\s*)([A-Z][A-Za-z]*)(\\s+)([a-z][A-Za-z_']*)(\\)\\s*)(=>)"},{include:"#pragma"},{token:"keyword.other.arrow.haskell",regex:"->"},{token:"keyword.other.big-arrow.haskell",regex:"=>"},{token:"support.type.prelude.haskell",regex:"\\b(?:Int(?:eger)?|Maybe|Either|Bool|Float|Double|Char|String|Ordering|ShowS|ReadS|FilePath|IO(?:Error)?)\\b"},{token:"variable.other.generic-type.haskell",regex:"\\b[a-z][a-zA-Z0-9_']*\\b"},{token:"storage.type.haskell",regex:"\\b[A-Z][a-zA-Z0-9_']*\\b"},{token:"support.constant.unit.haskell",regex:"\\(\\)"},{include:"#comments"}]},this.normalizeRules()};r.metaData={fileTypes:["hs"],keyEquivalent:"^~H",name:"Haskell",scopeName:"source.haskell"},o.inherits(r,a),t.HaskellHighlightRules=r}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),a=e("../../range").Range,r=e("./fold_mode").FoldMode,l=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(l,r),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var a=this._getFoldWidgetBase(e,t,n);return!a&&this.startRegionRe.test(o)?"start":a},this.getFoldWidgetRange=function(e,t,n,o){var a=e.getLine(n);if(this.startRegionRe.test(a))return this.getCommentRegionBlock(e,a,n);var r=a.match(this.foldingStartMarker);if(r){var l=r.index;if(r[1])return this.openingBracketBlock(e,r[1],n,l);var i=e.getCommentFoldRange(n,l+r[0].length,1);return i&&!i.isMultiLine()&&(o?i=this.getSectionRange(e,n):"all"!=t&&(i=null)),i}if("markbegin"!==t){var r=a.match(this.foldingStopMarker);if(r){var l=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],n,l):e.getCommentFoldRange(n,l,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),o=n.search(/\S/),r=t,l=n.length;t+=1;for(var i=t,s=e.getLength();++th)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=r)break;if(c.isMultiLine())t=c.end.row;else if(o==h)break}i=t}}return new a(r,l,i,e.getLine(i).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),r=e.getLength(),l=n,i=/^\s*(?:\/\*|\/\/)#(end)?region\b/,s=1;++nl)return new a(l,o,c,t.length)}}.call(l.prototype)}),define("ace/mode/haskell",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haskell_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),a=e("./text").Mode,r=e("./haskell_highlight_rules").HaskellHighlightRules,l=e("./folding/cstyle").FoldMode,i=function(){this.HighlightRules=r,this.foldingRules=new l};o.inherits(i,a),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/haskell"}.call(i.prototype),t.Mode=i}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-haxe.js b/www/js/vendor/ace/mode-haxe.js index 98623c907..39bffd1a6 100755 --- a/www/js/vendor/ace/mode-haxe.js +++ b/www/js/vendor/ace/mode-haxe.js @@ -1,737 +1 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/haxe_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); - -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var HaxeHighlightRules = function() { - - var keywords = ( - "break|case|cast|catch|class|continue|default|else|enum|extends|for|function|if|implements|import|in|inline|interface|new|override|package|private|public|return|static|super|switch|this|throw|trace|try|typedef|untyped|var|while|Array|Void|Bool|Int|UInt|Float|Dynamic|String|List|Hash|IntHash|Error|Unknown|Type|Std" - ); - - var buildinConstants = ( - "null|true|false" - ); - - var keywordMapper = this.createKeywordMapper({ - "variable.language": "this", - "keyword": keywords, - "constant.language": buildinConstants - }, "identifier"); - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "\\/\\/.*$" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment" - }, { - token : "string.regexp", - regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" - }, { - token : "punctuation.operator", - regex : "\\?|\\:|\\,|\\;|\\." - }, { - token : "paren.lparen", - regex : "[[({<]" - }, { - token : "paren.rparen", - regex : "[\\])}>]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); -}; - -oop.inherits(HaxeHighlightRules, TextHighlightRules); - -exports.HaxeHighlightRules = HaxeHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/haxe",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haxe_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var HaxeHighlightRules = require("./haxe_highlight_rules").HaxeHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = HaxeHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/haxe"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(i,o),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/haxe_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="break|case|cast|catch|class|continue|default|else|enum|extends|for|function|if|implements|import|in|inline|interface|new|override|package|private|public|return|static|super|switch|this|throw|trace|try|typedef|untyped|var|while|Array|Void|Bool|Int|UInt|Float|Dynamic|String|List|Hash|IntHash|Error|Unknown|Type|Std",t="null|true|false",n=this.createKeywordMapper({"variable.language":"this",keyword:e,"constant.language":t},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:n,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({<]"},{token:"paren.rparen",regex:"[\\])}>]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}]},this.embedRules(o,"doc-",[o.getEndRule("start")])};r.inherits(s,i),t.HaxeHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,s=e.findMatchingBracket({row:t,column:i});if(!s||s.row==t)return 0;var a=this.$getIndent(e.getLine(s.row));e.replace(new r(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],l={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,l.rangeCount!=e.multiSelect.rangeCount&&(l={rangeCount:e.multiSelect.rangeCount})),l[t]?r=l[t]:void(r=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,i){var s=n.getCursorPosition(),u=o.doc.getLine(s.row);if("{"==i){g(n);var c=n.getSelectionRange(),l=o.doc.getTextRange(c);if(""!==l&&"{"!==l&&n.getWrapBehavioursEnabled())return{text:"{"+l+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(u[s.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var h=u.substring(s.column,s.column+1);if("}"==h){var m=o.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(null!==m&&d.isAutoInsertedClosing(s,u,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var f="";d.isMaybeInsertedClosing(s,u)&&(f=a.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var h=u.substring(s.column,s.column+1);if("}"===h){var b=o.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!b)return null;var p=this.$getIndent(o.getLine(b.row))}else{if(!f)return void d.clearMaybeInsertedClosing();var p=this.$getIndent(u)}var k=p+o.getTabString();return{text:"\n"+k+"\n"+p+f,selection:[1,k.length,1,k.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var s=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==s){g(n);var a=o.doc.getLine(i.start.row),u=a.substring(i.end.column,i.end.column+1);if("}"==u)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"("+s+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var a=n.getCursorPosition(),u=r.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if(")"==c){var l=r.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==l&&d.isAutoInsertedClosing(a,u,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(")"==a)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"["+s+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var a=n.getCursorPosition(),u=r.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if("]"==c){var l=r.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==l&&d.isAutoInsertedClosing(a,u,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if("]"==a)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var i=o,s=n.getSelectionRange(),a=r.doc.getTextRange(s);if(""!==a&&"'"!==a&&'"'!=a&&n.getWrapBehavioursEnabled())return{text:i+a+i,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),l=c.substring(u.column-1,u.column),d=c.substring(u.column,u.column+1),h=r.getTokenAt(u.row,u.column),m=r.getTokenAt(u.row,u.column+1);if("\\"==l&&h&&/escape/.test(h.type))return null;var f,b=h&&/string/.test(h.type),p=!m||/string/.test(m.type);if(d==i)f=b!==p;else{if(b&&!p)return null;if(b&&p)return null;var k=r.$mode.tokenRe;k.lastIndex=0;var x=k.test(l);k.lastIndex=0;var v=k.test(l);if(x||v)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;f=!0}return{text:f?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(a==i)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var o=new s(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var i=o.match(this.foldingStartMarker);if(i){var s=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,s);var a=e.getCommentFoldRange(n,s+i[0].length,1);return a&&!a.isMultiLine()&&(r?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),i=t,s=n.length;t+=1;for(var a=t,u=e.getLength();++tc)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=i)break;if(l.isMultiLine())t=l.end.row;else if(r==c)break}a=t}}return new o(i,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/)#(end)?region\b/,u=1;++ns)return new o(s,r,l,t.length)}}.call(s.prototype)}),define("ace/mode/haxe",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haxe_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./haxe_highlight_rules").HaxeHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new s,this.$behaviour=new a,this.foldingRules=new u};r.inherits(c,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e){var s=t.match(/^.*[\{\(\[]\s*$/);s&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/haxe"}.call(c.prototype),t.Mode=c}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-html.js b/www/js/vendor/ace/mode-html.js index 5118c42e0..3e32678e5 100755 --- a/www/js/vendor/ace/mode-html.js +++ b/www/js/vendor/ace/mode-html.js @@ -1,2427 +1,2 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = CssHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.foldingRules = "cStyle"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("csslint", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/css"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === " -1; -} - -(function() { - - this.getFoldWidget = function(session, foldStyle, row) { - var tag = this._getFirstTagInLine(session, row); - - if (!tag) - return ""; - - if (tag.closing || (!tag.tagName && tag.selfClosing)) - return foldStyle == "markbeginend" ? "end" : ""; - - if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) - return ""; - - if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) - return ""; - - return "start"; - }; - this._getFirstTagInLine = function(session, row) { - var tokens = session.getTokens(row); - var tag = new Tag(); - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (is(token, "tag-open")) { - tag.end.column = tag.start.column + token.value.length; - tag.closing = is(token, "end-tag-open"); - token = tokens[++i]; - if (!token) - return null; - tag.tagName = token.value; - tag.end.column += token.value.length; - for (i++; i < tokens.length; i++) { - token = tokens[i]; - tag.end.column += token.value.length; - if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - break; - } - } - return tag; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - return tag; - } - tag.start.column += token.value.length; - } - - return null; - }; - - this._findEndTagInLine = function(session, row, tagName, startColumn) { - var tokens = session.getTokens(row); - var column = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - column += token.value.length; - if (column < startColumn) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var firstTag = this._getFirstTagInLine(session, row); - - if (!firstTag) - return null; - - var isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var MixedFoldMode = require("./mixed").FoldMode; -var XmlFoldMode = require("./xml").FoldMode; -var CStyleFoldMode = require("./cstyle").FoldMode; - -var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { - MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { - "js-": new CStyleFoldMode(), - "css-": new CStyleFoldMode() - }); -}; - -oop.inherits(FoldMode, MixedFoldMode); - -}); - -define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var TokenIterator = require("../token_iterator").TokenIterator; - -var commonAttributes = [ - "accesskey", - "class", - "contenteditable", - "contextmenu", - "dir", - "draggable", - "dropzone", - "hidden", - "id", - "inert", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "lang", - "spellcheck", - "style", - "tabindex", - "title", - "translate" -]; - -var eventAttributes = [ - "onabort", - "onblur", - "oncancel", - "oncanplay", - "oncanplaythrough", - "onchange", - "onclick", - "onclose", - "oncontextmenu", - "oncuechange", - "ondblclick", - "ondrag", - "ondragend", - "ondragenter", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onended", - "onerror", - "onfocus", - "oninput", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeyup", - "onload", - "onloadeddata", - "onloadedmetadata", - "onloadstart", - "onmousedown", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onpause", - "onplay", - "onplaying", - "onprogress", - "onratechange", - "onreset", - "onscroll", - "onseeked", - "onseeking", - "onselect", - "onshow", - "onstalled", - "onsubmit", - "onsuspend", - "ontimeupdate", - "onvolumechange", - "onwaiting" -]; - -var globalAttributes = commonAttributes.concat(eventAttributes); - -var attributeMap = { - "html": ["manifest"], - "head": [], - "title": [], - "base": ["href", "target"], - "link": ["href", "hreflang", "rel", "media", "type", "sizes"], - "meta": ["http-equiv", "name", "content", "charset"], - "style": ["type", "media", "scoped"], - "script": ["charset", "type", "src", "defer", "async"], - "noscript": ["href"], - "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], - "section": [], - "nav": [], - "article": ["pubdate"], - "aside": [], - "h1": [], - "h2": [], - "h3": [], - "h4": [], - "h5": [], - "h6": [], - "header": [], - "footer": [], - "address": [], - "main": [], - "p": [], - "hr": [], - "pre": [], - "blockquote": ["cite"], - "ol": ["start", "reversed"], - "ul": [], - "li": ["value"], - "dl": [], - "dt": [], - "dd": [], - "figure": [], - "figcaption": [], - "div": [], - "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], - "em": [], - "strong": [], - "small": [], - "s": [], - "cite": [], - "q": ["cite"], - "dfn": [], - "abbr": [], - "data": [], - "time": ["datetime"], - "code": [], - "var": [], - "samp": [], - "kbd": [], - "sub": [], - "sup": [], - "i": [], - "b": [], - "u": [], - "mark": [], - "ruby": [], - "rt": [], - "rp": [], - "bdi": [], - "bdo": [], - "span": [], - "br": [], - "wbr": [], - "ins": ["cite", "datetime"], - "del": ["cite", "datetime"], - "img": ["alt", "src", "height", "width", "usemap", "ismap"], - "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], - "embed": ["src", "height", "width", "type"], - "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], - "param": ["name", "value"], - "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], - "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], - "source": ["src", "type", "media"], - "track": ["kind", "src", "srclang", "label", "default"], - "canvas": ["width", "height"], - "map": ["name"], - "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], - "svg": [], - "math": [], - "table": ["summary"], - "caption": [], - "colgroup": ["span"], - "col": ["span"], - "tbody": [], - "thead": [], - "tfoot": [], - "tr": [], - "td": ["headers", "rowspan", "colspan"], - "th": ["headers", "rowspan", "colspan", "scope"], - "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], - "fieldset": ["disabled", "form", "name"], - "legend": [], - "label": ["form", "for"], - "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], - "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], - "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], - "datalist": [], - "optgroup": ["disabled", "label"], - "option": ["disabled", "selected", "label", "value"], - "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], - "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], - "output": ["for", "form", "name"], - "progress": ["value", "max"], - "meter": ["value", "min", "max", "low", "high", "optimum"], - "details": ["open"], - "summary": [], - "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], - "menu": ["type", "label"], - "dialog": ["open"] -}; - -var elements = Object.keys(attributeMap); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -function findTagName(session, pos) { - var iterator = new TokenIterator(session, pos.row, pos.column); - var token = iterator.getCurrentToken(); - while (token && !is(token, "tag-name")){ - token = iterator.stepBackward(); - } - if (token) - return token.value; -} - -var HtmlCompletions = function() { - -}; - -(function() { - - this.getCompletions = function(state, session, pos, prefix) { - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) - return this.getTagCompletions(state, session, pos, prefix); - if (is(token, "tag-whitespace") || is(token, "attribute-name")) - return this.getAttributeCompetions(state, session, pos, prefix); - - return []; - }; - - this.getTagCompletions = function(state, session, pos, prefix) { - return elements.map(function(element){ - return { - value: element, - meta: "tag", - score: Number.MAX_VALUE - }; - }); - }; - - this.getAttributeCompetions = function(state, session, pos, prefix) { - var tagName = findTagName(session, pos); - if (!tagName) - return []; - var attributes = globalAttributes; - if (tagName in attributeMap) { - attributes = attributes.concat(attributeMap[tagName]); - } - return attributes.map(function(attribute){ - return { - caption: attribute, - snippet: attribute + '="$0"', - meta: "attribute", - score: Number.MAX_VALUE - }; - }); - }; - -}).call(HtmlCompletions.prototype); - -exports.HtmlCompletions = HtmlCompletions; -}); - -define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var CssMode = require("./css").Mode; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; -var HtmlFoldMode = require("./folding/html").FoldMode; -var HtmlCompletions = require("./html_completions").HtmlCompletions; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; -var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; - -var Mode = function(options) { - this.fragmentContext = options && options.fragmentContext; - this.HighlightRules = HtmlHighlightRules; - this.$behaviour = new XmlBehaviour(); - this.$completer = new HtmlCompletions(); - - this.createModeDelegates({ - "js-": JavaScriptMode, - "css-": CssMode - }); - - this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.blockComment = {start: ""}; - - this.voidElements = lang.arrayToMap(voidElements); - - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - this.checkOutdent = function(state, line, input) { - return false; - }; - - this.getCompletions = function(state, session, pos, prefix) { - return this.$completer.getCompletions(state, session, pos, prefix); - }; - - this.createWorker = function(session) { - if (this.constructor != Mode) - return; - var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - if (this.fragmentContext) - worker.call("setOptions", [{context: this.fragmentContext}]); - - worker.on("error", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/html"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},a.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};o.inherits(a,r),a.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},a.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},a.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=a}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",o="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",a="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},r.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[r.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[r.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:a},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(r,"doc-",[r.getEndRule("no_regex")]),this.normalizeRules()};o.inherits(i,a),t.JavaScriptHighlightRules=i}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),r=n.match(/^(\s*\})/);if(!r)return 0;var a=r[1].length,i=e.findMatchingBracket({row:t,column:a});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new o(t,0,t,a-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var o,r=e("../../lib/oop"),a=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?o=c[t]:void(o=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,r,a){var i=n.getCursorPosition(),l=r.doc.getLine(i.row);if("{"==a){g(n);var u=n.getSelectionRange(),c=r.doc.getTextRange(u);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return{text:"{"+c+"}",selection:!1};if(d.isSaneInsertion(n,r))return/[\]\}\)]/.test(l[i.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if("}"==a){g(n);var m=l.substring(i.column,i.column+1);if("}"==m){var p=r.$findOpeningBracket("}",{column:i.column+1,row:i.row});if(null!==p&&d.isAutoInsertedClosing(i,l,a))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==a||"\r\n"==a){g(n);var h="";d.isMaybeInsertedClosing(i,l)&&(h=s.stringRepeat("}",o.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=l.substring(i.column,i.column+1);if("}"===m){var f=r.findMatchingBracket({row:i.row,column:i.column+1},"}");if(!f)return null;var x=this.$getIndent(r.getLine(f.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var b=x+r.getTabString();return{text:"\n"+b+"\n"+x+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,a){var i=r.doc.getTextRange(a);if(!a.isMultiLine()&&"{"==i){g(n);var s=r.doc.getLine(a.start.row),l=s.substring(a.end.column,a.end.column+1);if("}"==l)return a.end.column++,a;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,o,r){if("("==r){g(n);var a=n.getSelectionRange(),i=o.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"("+i+")",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,")"),{text:"()",selection:[1,1]}}else if(")"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=o.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&"("==a){g(n);var i=o.doc.getLine(r.start.row),s=i.substring(r.start.column+1,r.start.column+2);if(")"==s)return r.end.column++,r}}),this.add("brackets","insertion",function(e,t,n,o,r){if("["==r){g(n);var a=n.getSelectionRange(),i=o.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"["+i+"]",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=o.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&"["==a){g(n);var i=o.doc.getLine(r.start.row),s=i.substring(r.start.column+1,r.start.column+2);if("]"==s)return r.end.column++,r}}),this.add("string_dquotes","insertion",function(e,t,n,o,r){if('"'==r||"'"==r){g(n);var a=r,i=n.getSelectionRange(),s=o.doc.getTextRange(i);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:a+s+a,selection:!1};var l=n.getCursorPosition(),u=o.doc.getLine(l.row),c=u.substring(l.column-1,l.column),d=u.substring(l.column,l.column+1),m=o.getTokenAt(l.row,l.column),p=o.getTokenAt(l.row,l.column+1);if("\\"==c&&m&&/escape/.test(m.type))return null;var h,f=m&&/string/.test(m.type),x=!p||/string/.test(p.type);if(d==a)h=f!==x;else{if(f&&!x)return null;if(f&&x)return null;var b=o.$mode.tokenRe;b.lastIndex=0;var k=b.test(c);b.lastIndex=0;var v=b.test(c);if(k||v)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?a+a:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==a||"'"==a)){g(n);var i=o.doc.getLine(r.start.row),s=i.substring(r.start.column+1,r.start.column+2);if(s==a)return r.end.column++,r}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),o=new i(t,n.row,n.column);if(!this.$matchTokenType(o.getCurrentToken()||"text",l)){var r=new i(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return o.stepForward(),o.getCurrentTokenRow()!==n.row||this.$matchTokenType(o.getCurrentToken()||"text",u)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),a=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,a,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=r.row,o.autoInsertedLineEnd=n+a.substr(r.column),o.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),a=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,a)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=r.row,o.maybeInsertedLineStart=a.substr(0,r.column)+n,o.maybeInsertedLineEnd=a.substr(r.column),o.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return o.autoInsertedBrackets>0&&e.row===o.autoInsertedRow&&n===o.autoInsertedLineEnd[0]&&t.substr(e.column)===o.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return o.maybeInsertedBrackets>0&&e.row===o.maybeInsertedRow&&t.substr(e.column)===o.maybeInsertedLineEnd&&t.substr(0,e.column)==o.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},r.inherits(d,a),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../range").Range,a=e("./fold_mode").FoldMode,i=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(i,a),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(o)?"start":r},this.getFoldWidgetRange=function(e,t,n,o){var r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);var a=r.match(this.foldingStartMarker);if(a){var i=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,i);var s=e.getCommentFoldRange(n,i+a[0].length,1);return s&&!s.isMultiLine()&&(o?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var a=r.match(this.foldingStopMarker);if(a){var i=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,i):e.getCommentFoldRange(n,i,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),o=n.search(/\S/),a=t,i=n.length;t+=1;for(var s=t,l=e.getLength();++tu)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=a)break;if(c.isMultiLine())t=c.end.row;else if(o==u)break}s=t}}return new r(a,i,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),a=e.getLength(),i=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++ni)return new r(i,o,c,t.length)}}.call(i.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),a=r.tokens,i=r.state;if(a.length&&"comment"==a[a.length-1].type)return o;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(o+=n)}else if("doc-start"==e){if("start"==i||"no_regex"==i)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(o+=" "),o+="* ")}return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(c.prototype),t.Mode=c}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),a=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",i=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",u=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",m=function(){var e=this.createKeywordMapper({"support.function":i,"support.constant":s,"support.type":a,"support.constant.color":l,"support.constant.fonts":u},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};o.inherits(m,r),t.CssHighlightRules=m}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),a=e("../../token_iterator").TokenIterator,i=function(){this.inherit(r),this.add("colon","insertion",function(e,t,n,o,r){if(":"===r){var i=n.getCursorPosition(),s=new a(o,i.row,i.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var u=o.doc.getLine(i.row),c=u.substring(i.column,i.column+1); +if(":"===c)return{text:"",selection:[1,1]};if(!u.substring(i.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&":"===i){var s=n.getCursorPosition(),l=new a(o,s.row,s.column),u=l.getCurrentToken();if(u&&u.value.match(/\s+/)&&(u=l.stepBackward()),u&&"support.type"===u.type){var c=o.doc.getLine(r.start.row),g=c.substring(r.end.column,r.end.column+1);if(";"===g)return r.end.column++,r}}}),this.add("semicolon","insertion",function(e,t,n,o,r){if(";"===r){var a=n.getCursorPosition(),i=o.doc.getLine(a.row),s=i.substring(a.column,a.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};o.inherits(i,r),t.CssBehaviour=i}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,a=e("./css_highlight_rules").CssHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e).tokens;if(r.length&&"comment"==r[r.length-1].type)return o;var a=t.match(/^.*\{\s*$/);return a&&(o+=n),o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,a=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===a&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(r.prototype),o.inherits(a,r),t.XmlHighlightRules=a}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),a=e("./css_highlight_rules").CssHighlightRules,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=r.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),u=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(a,"css-","style"),this.embedTagRules(i,"js-","script"),this.constructor===u&&this.normalizeRules()};o.inherits(u,s),t.HtmlHighlightRules=u}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),a=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,s=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,r,a){if('"'==a||"'"==a){var s=a,l=r.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),g=c.substring(u.column,u.column+1),d=new i(r,u.row,u.column),m=d.getCurrentToken();if(g==s&&(o(m,"attribute-value")||o(m,"string")))return{text:"",selection:[1,1]};if(m||(m=d.stepBackward()),!m)return;for(;o(m,"tag-whitespace")||o(m,"whitespace");)m=d.stepBackward();var p=!g||g.match(/\s/);if(o(m,"attribute-equals")&&(p||">"==g)||o(m,"decl-attribute-equals")&&(p||"?"==g))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==a||"'"==a)){var i=o.doc.getLine(r.start.row),s=i.substring(r.start.column+1,r.start.column+2);if(s==a)return r.end.column++,r}}),this.add("autoclosing","insertion",function(e,t,n,r,a){if(">"==a){var s=n.getCursorPosition(),l=new i(r,s.row,s.column),u=l.getCurrentToken()||l.stepBackward();if(!u||!(o(u,"tag-name")||o(u,"tag-whitespace")||o(u,"attribute-name")||o(u,"attribute-equals")||o(u,"attribute-value")))return;if(o(u,"reference.attribute-value"))return;if(o(u,"attribute-value")){var c=u.value.charAt(0);if('"'==c||"'"==c){var g=u.value.charAt(u.value.length-1),d=l.getCurrentTokenColumn()+u.value.length;if(d>s.column||d==s.column&&c!=g)return}}for(;!o(u,"tag-name");)u=l.stepBackward();var m=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn();if(o(l.stepBackward(),"end-tag-open"))return;var h=u.value;if(m==s.row&&(h=h.substring(0,s.column-p)),this.voidElements.hasOwnProperty(h.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,o,r){if("\n"==r){var a=n.getCursorPosition(),s=o.getLine(a.row),l=new i(o,a.row,a.column),u=l.getCurrentToken();if(u&&u.type.indexOf("tag-close")!==-1){for(;u&&u.type.indexOf("tag-name")===-1;)u=l.stepBackward();if(!u)return;var c=u.value,g=l.getCurrentTokenRow();if(u=l.stepBackward(),!u||u.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]){var d=o.getTokenAt(a.row,a.column+1),s=o.getLine(g),m=this.$getIndent(s),p=m+o.getTabString();return d&&"-1}var r=e("../../lib/oop"),a=(e("../../lib/lang"),e("../../range").Range),i=e("./fold_mode").FoldMode,s=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(e,t){i.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(l,i);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var o=this._getFirstTagInLine(e,n);return o?o.closing||!o.tagName&&o.selfClosing?"markbeginend"==t?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,o.tagName,o.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new u,a=0;a"==i.value;break}return r}if(o(i,"tag-close"))return r.selfClosing="/>"==i.value,r;r.start.column+=i.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var a=e.getTokens(t),i=0,s=0;s"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(t&&n.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,n){var o=this._getFirstTagInLine(e,n);if(!o)return null;var r,i=o.closing||o.selfClosing,l=[];if(i)for(var u=new s(e,n,o.end.column),c={row:n,column:o.start.column};r=this._readTagBackward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,a.fromPoints(r.start,r.end)}if(r.closing)l.push(r);else if(this._pop(l,r),0==l.length)return r.start.column+=r.tagName.length+2,a.fromPoints(r.start,c)}else for(var u=new s(e,n,o.start.column),g={row:n,column:o.start.column+o.tagName.length+2};r=this._readTagForward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,a.fromPoints(r.start,r.end)}if(r.closing){if(this._pop(l,r),0==l.length)return a.fromPoints(g,r.start)}else l.push(r)}}}).call(l.prototype)}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./mixed").FoldMode,a=e("./xml").FoldMode,i=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){r.call(this,new a(e,t),{"js-":new i,"css-":new i})};o.inherits(s,r)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}function r(e,t){for(var n=new a(e,t.row,t.column),r=n.getCurrentToken();r&&!o(r,"tag-name");)r=n.stepBackward();if(r)return r.value}var a=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=i.concat(s),u={html:["manifest"],head:[],title:[],base:["href","target"],link:["href","hreflang","rel","media","type","sizes"],meta:["http-equiv","name","content","charset"],style:["type","media","scoped"],script:["charset","type","src","defer","async"],noscript:["href"],body:["onafterprint","onbeforeprint","onbeforeunload","onhashchange","onmessage","onoffline","onpopstate","onredo","onresize","onstorage","onundo","onunload"],section:[],nav:[],article:["pubdate"],aside:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],footer:[],address:[],main:[],p:[],hr:[],pre:[],blockquote:["cite"],ol:["start","reversed"],ul:[],li:["value"],dl:[],dt:[],dd:[],figure:[],figcaption:[],div:[],a:["href","target","ping","rel","media","hreflang","type"],em:[],strong:[],small:[],s:[],cite:[],q:["cite"],dfn:[],abbr:[],data:[],time:["datetime"],code:[],var:[],samp:[],kbd:[],sub:[],sup:[],i:[],b:[],u:[],mark:[],ruby:[],rt:[],rp:[],bdi:[],bdo:[],span:[],br:[],wbr:[],ins:["cite","datetime"],del:["cite","datetime"],img:["alt","src","height","width","usemap","ismap"],iframe:["name","src","height","width","sandbox","seamless"],embed:["src","height","width","type"],object:["param","data","type","height","width","usemap","name","form","classid"],param:["name","value"],video:["src","autobuffer","autoplay","loop","controls","width","height","poster"],audio:["src","autobuffer","autoplay","loop","controls"],source:["src","type","media"],track:["kind","src","srclang","label","default"],canvas:["width","height"],map:["name"],area:["shape","coords","href","hreflang","alt","target","media","rel","ping","type"],svg:[],math:[],table:["summary"],caption:[],colgroup:["span"],col:["span"],tbody:[],thead:[],tfoot:[],tr:[],td:["headers","rowspan","colspan"],th:["headers","rowspan","colspan","scope"],form:["accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],fieldset:["disabled","form","name"],legend:[],label:["form","for"],input:["type","accept","alt","autocomplete","checked","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","multiple","pattern","placeholder","readonly","required","size","src","step","width","files","value"],button:["autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","value","type"],select:["autofocus","disabled","form","multiple","name","size"],datalist:[],optgroup:["disabled","label"],option:["disabled","selected","label","value"],textarea:["autofocus","disabled","form","maxlength","name","placeholder","readonly","required","rows","cols","wrap"],keygen:["autofocus","challenge","disabled","form","keytype","name"],output:["for","form","name"],progress:["value","max"],meter:["value","min","max","low","high","optimum"],details:["open"],summary:[],command:["type","label","icon","disabled","checked","radiogroup","command"],menu:["type","label"],dialog:["open"]},c=Object.keys(u),g=function(){};(function(){this.getCompletions=function(e,t,n,r){var a=t.getTokenAt(n.row,n.column);return a?o(a,"tag-name")||o(a,"tag-open")||o(a,"end-tag-open")?this.getTagCompletions(e,t,n,r):o(a,"tag-whitespace")||o(a,"attribute-name")?this.getAttributeCompetions(e,t,n,r):[]:[]},this.getTagCompletions=function(e,t,n,o){return c.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompetions=function(e,t,n,o){var a=r(t,n);if(!a)return[];var i=l;return a in u&&(i=i.concat(u[a])),i.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})}}).call(g.prototype),t.HtmlCompletions=g}),define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),a=e("./text").Mode,i=e("./javascript").Mode,s=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,g=e("./html_completions").HtmlCompletions,d=e("../worker/worker_client").WorkerClient,m=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],p=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],h=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new u,this.$completer=new g,this.createModeDelegates({"js-":i,"css-":s}),this.foldingRules=new c(this.voidElements,r.arrayToMap(p))};o.inherits(h,a),function(){this.blockComment={start:""},this.voidElements=r.arrayToMap(m),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,o){return this.$completer.getCompletions(e,t,n,o)},this.createWorker=function(e){if(this.constructor==h){var t=new d(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(h.prototype),t.Mode=h}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-html_ruby.js b/www/js/vendor/ace/mode-html_ruby.js index 2471e8ba5..fa235f93d 100755 --- a/www/js/vendor/ace/mode-html_ruby.js +++ b/www/js/vendor/ace/mode-html_ruby.js @@ -1,2955 +1,3 @@ -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var constantOtherSymbol = exports.constantOtherSymbol = { - token : "constant.other.symbol.ruby", // symbol - regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" -}; - -var qString = exports.qString = { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" -}; - -var qqString = exports.qqString = { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' -}; - -var tString = exports.tString = { - token : "string", // backtick string - regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]" -}; - -var constantNumericHex = exports.constantNumericHex = { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b" -}; - -var constantNumericFloat = exports.constantNumericFloat = { - token : "constant.numeric", // float - regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b" -}; - -var RubyHighlightRules = function() { - - var builtinFunctions = ( - "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" + - "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" + - "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" + - "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" + - "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" + - "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" + - "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" + - "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" + - "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" + - "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" + - "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" + - "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" + - "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" + - "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" + - "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" + - "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" + - "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" + - "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" + - "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" + - "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" + - "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" + - "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" + - "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" + - "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" + - "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" + - "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" + - "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" + - "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" + - "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" + - "has_many|has_one|belongs_to|has_and_belongs_to_many" - ); - - var keywords = ( - "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" + - "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" + - "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield" - ); - - var buildinConstants = ( - "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" + - "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING" - ); - - var builtinVariables = ( - "\$DEBUG|\$defout|\$FILENAME|\$LOAD_PATH|\$SAFE|\$stdin|\$stdout|\$stderr|\$VERBOSE|" + - "$!|root_url|flash|session|cookies|params|request|response|logger|self" - ); - - var keywordMapper = this.$keywords = this.createKeywordMapper({ - "keyword": keywords, - "constant.language": buildinConstants, - "variable.language": builtinVariables, - "support.function": builtinFunctions, - "invalid.deprecated": "debugger" // TODO is this a remnant from js mode? - }, "identifier"); - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "#.*$" - }, { - token : "comment", // multi line comment - regex : "^=begin(?:$|\\s.*$)", - next : "comment" - }, { - token : "string.regexp", - regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" - }, - - [{ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren.lparen"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.start", - regex : /"/, - push : [{ - token : "constant.language.escape", - regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/ - }, { - token : "paren.start", - regex : /\#{/, - push : "start" - }, { - token : "string.end", - regex : /"/, - next : "pop" - }, { - defaultToken: "string" - }] - }, { - token : "string.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/ - }, { - token : "paren.start", - regex : /\#{/, - push : "start" - }, { - token : "string.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string" - }] - }, { - token : "string.start", - regex : /'/, - push : [{ - token : "constant.language.escape", - regex : /\\['\\]/ - }, { - token : "string.end", - regex : /'/, - next : "pop" - }, { - defaultToken: "string" - }] - }], - - { - token : "text", // namespaces aren't symbols - regex : "::" - }, { - token : "variable.instance", // instance variable - regex : "@{1,2}[a-zA-Z_\\d]+" - }, { - token : "support.class", // class name - regex : "[A-Z][a-zA-Z_\\d]+" - }, - - constantOtherSymbol, - constantNumericHex, - constantNumericFloat, - - { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "punctuation.separator.key-value", - regex : "=>" - }, { - stateName: "heredoc", - onMatch : function(value, currentState, stack) { - var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; - var tokens = value.split(this.splitRegex); - stack.push(next, tokens[3]); - return [ - {type:"constant", value: tokens[1]}, - {type:"string", value: tokens[2]}, - {type:"support.class", value: tokens[3]}, - {type:"string", value: tokens[4]} - ]; - }, - regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)", - rules: { - heredoc: [{ - onMatch: function(value, currentState, stack) { - if (value === stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack[0] || "start"; - return "support.class"; - } - this.next = ""; - return "string"; - }, - regex: ".*$", - next: "start" - }], - indentedHeredoc: [{ - token: "string", - regex: "^ +" - }, { - onMatch: function(value, currentState, stack) { - if (value === stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack[0] || "start"; - return "support.class"; - } - this.next = ""; - return "string"; - }, - regex: ".*$", - next: "start" - }] - } - }, { - regex : "$", - token : "empty", - next : function(currentState, stack) { - if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") - return stack[0]; - return currentState; - } - }, { - token : "keyword.operator", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : "^=end(?:$|\\s.*$)", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ] - }; - - this.normalizeRules(); -}; - -oop.inherits(RubyHighlightRules, TextHighlightRules); - -exports.RubyHighlightRules = RubyHighlightRules; -}); - -define("ace/mode/html_ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/ruby_highlight_rules"], function(require, exports, module) { - "use strict"; - - var oop = require("../lib/oop"); - var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; - var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules; - - var HtmlRubyHighlightRules = function() { - HtmlHighlightRules.call(this); - - var startRules = [ - { - regex: "<%%|%%>", - token: "constant.language.escape" - }, { - token : "comment.start.erb", - regex : "<%#", - push : [{ - token : "comment.end.erb", - regex: "%>", - next: "pop", - defaultToken:"comment" - }] - }, { - token : "support.ruby_tag", - regex : "<%+(?!>)[-=]?", - push : "ruby-start" - } - ]; - - var endRules = [ - { - token : "support.ruby_tag", - regex : "%>", - next : "pop" - }, { - token: "comment", - regex: "#(?:[^%]|%[^>])*" - } - ]; - - for (var key in this.$rules) - this.$rules[key].unshift.apply(this.$rules[key], startRules); - - this.embedRules(RubyHighlightRules, "ruby-", endRules, ["start"]); - - this.normalizeRules(); - }; - - - oop.inherits(HtmlRubyHighlightRules, HtmlHighlightRules); - - exports.HtmlRubyHighlightRules = HtmlRubyHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = CssHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.foldingRules = "cStyle"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("csslint", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/css"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === " -1; -} - -(function() { - - this.getFoldWidget = function(session, foldStyle, row) { - var tag = this._getFirstTagInLine(session, row); - - if (!tag) - return ""; - - if (tag.closing || (!tag.tagName && tag.selfClosing)) - return foldStyle == "markbeginend" ? "end" : ""; - - if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) - return ""; - - if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) - return ""; - - return "start"; - }; - this._getFirstTagInLine = function(session, row) { - var tokens = session.getTokens(row); - var tag = new Tag(); - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (is(token, "tag-open")) { - tag.end.column = tag.start.column + token.value.length; - tag.closing = is(token, "end-tag-open"); - token = tokens[++i]; - if (!token) - return null; - tag.tagName = token.value; - tag.end.column += token.value.length; - for (i++; i < tokens.length; i++) { - token = tokens[i]; - tag.end.column += token.value.length; - if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - break; - } - } - return tag; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - return tag; - } - tag.start.column += token.value.length; - } - - return null; - }; - - this._findEndTagInLine = function(session, row, tagName, startColumn) { - var tokens = session.getTokens(row); - var column = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - column += token.value.length; - if (column < startColumn) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var firstTag = this._getFirstTagInLine(session, row); - - if (!firstTag) - return null; - - var isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var MixedFoldMode = require("./mixed").FoldMode; -var XmlFoldMode = require("./xml").FoldMode; -var CStyleFoldMode = require("./cstyle").FoldMode; - -var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { - MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { - "js-": new CStyleFoldMode(), - "css-": new CStyleFoldMode() - }); -}; - -oop.inherits(FoldMode, MixedFoldMode); - -}); - -define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var TokenIterator = require("../token_iterator").TokenIterator; - -var commonAttributes = [ - "accesskey", - "class", - "contenteditable", - "contextmenu", - "dir", - "draggable", - "dropzone", - "hidden", - "id", - "inert", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "lang", - "spellcheck", - "style", - "tabindex", - "title", - "translate" -]; - -var eventAttributes = [ - "onabort", - "onblur", - "oncancel", - "oncanplay", - "oncanplaythrough", - "onchange", - "onclick", - "onclose", - "oncontextmenu", - "oncuechange", - "ondblclick", - "ondrag", - "ondragend", - "ondragenter", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onended", - "onerror", - "onfocus", - "oninput", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeyup", - "onload", - "onloadeddata", - "onloadedmetadata", - "onloadstart", - "onmousedown", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onpause", - "onplay", - "onplaying", - "onprogress", - "onratechange", - "onreset", - "onscroll", - "onseeked", - "onseeking", - "onselect", - "onshow", - "onstalled", - "onsubmit", - "onsuspend", - "ontimeupdate", - "onvolumechange", - "onwaiting" -]; - -var globalAttributes = commonAttributes.concat(eventAttributes); - -var attributeMap = { - "html": ["manifest"], - "head": [], - "title": [], - "base": ["href", "target"], - "link": ["href", "hreflang", "rel", "media", "type", "sizes"], - "meta": ["http-equiv", "name", "content", "charset"], - "style": ["type", "media", "scoped"], - "script": ["charset", "type", "src", "defer", "async"], - "noscript": ["href"], - "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], - "section": [], - "nav": [], - "article": ["pubdate"], - "aside": [], - "h1": [], - "h2": [], - "h3": [], - "h4": [], - "h5": [], - "h6": [], - "header": [], - "footer": [], - "address": [], - "main": [], - "p": [], - "hr": [], - "pre": [], - "blockquote": ["cite"], - "ol": ["start", "reversed"], - "ul": [], - "li": ["value"], - "dl": [], - "dt": [], - "dd": [], - "figure": [], - "figcaption": [], - "div": [], - "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], - "em": [], - "strong": [], - "small": [], - "s": [], - "cite": [], - "q": ["cite"], - "dfn": [], - "abbr": [], - "data": [], - "time": ["datetime"], - "code": [], - "var": [], - "samp": [], - "kbd": [], - "sub": [], - "sup": [], - "i": [], - "b": [], - "u": [], - "mark": [], - "ruby": [], - "rt": [], - "rp": [], - "bdi": [], - "bdo": [], - "span": [], - "br": [], - "wbr": [], - "ins": ["cite", "datetime"], - "del": ["cite", "datetime"], - "img": ["alt", "src", "height", "width", "usemap", "ismap"], - "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], - "embed": ["src", "height", "width", "type"], - "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], - "param": ["name", "value"], - "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], - "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], - "source": ["src", "type", "media"], - "track": ["kind", "src", "srclang", "label", "default"], - "canvas": ["width", "height"], - "map": ["name"], - "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], - "svg": [], - "math": [], - "table": ["summary"], - "caption": [], - "colgroup": ["span"], - "col": ["span"], - "tbody": [], - "thead": [], - "tfoot": [], - "tr": [], - "td": ["headers", "rowspan", "colspan"], - "th": ["headers", "rowspan", "colspan", "scope"], - "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], - "fieldset": ["disabled", "form", "name"], - "legend": [], - "label": ["form", "for"], - "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], - "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], - "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], - "datalist": [], - "optgroup": ["disabled", "label"], - "option": ["disabled", "selected", "label", "value"], - "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], - "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], - "output": ["for", "form", "name"], - "progress": ["value", "max"], - "meter": ["value", "min", "max", "low", "high", "optimum"], - "details": ["open"], - "summary": [], - "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], - "menu": ["type", "label"], - "dialog": ["open"] -}; - -var elements = Object.keys(attributeMap); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -function findTagName(session, pos) { - var iterator = new TokenIterator(session, pos.row, pos.column); - var token = iterator.getCurrentToken(); - while (token && !is(token, "tag-name")){ - token = iterator.stepBackward(); - } - if (token) - return token.value; -} - -var HtmlCompletions = function() { - -}; - -(function() { - - this.getCompletions = function(state, session, pos, prefix) { - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) - return this.getTagCompletions(state, session, pos, prefix); - if (is(token, "tag-whitespace") || is(token, "attribute-name")) - return this.getAttributeCompetions(state, session, pos, prefix); - - return []; - }; - - this.getTagCompletions = function(state, session, pos, prefix) { - return elements.map(function(element){ - return { - value: element, - meta: "tag", - score: Number.MAX_VALUE - }; - }); - }; - - this.getAttributeCompetions = function(state, session, pos, prefix) { - var tagName = findTagName(session, pos); - if (!tagName) - return []; - var attributes = globalAttributes; - if (tagName in attributeMap) { - attributes = attributes.concat(attributeMap[tagName]); - } - return attributes.map(function(attribute){ - return { - caption: attribute, - snippet: attribute + '="$0"', - meta: "attribute", - score: Number.MAX_VALUE - }; - }); - }; - -}).call(HtmlCompletions.prototype); - -exports.HtmlCompletions = HtmlCompletions; -}); - -define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var CssMode = require("./css").Mode; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; -var HtmlFoldMode = require("./folding/html").FoldMode; -var HtmlCompletions = require("./html_completions").HtmlCompletions; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; -var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; - -var Mode = function(options) { - this.fragmentContext = options && options.fragmentContext; - this.HighlightRules = HtmlHighlightRules; - this.$behaviour = new XmlBehaviour(); - this.$completer = new HtmlCompletions(); - - this.createModeDelegates({ - "js-": JavaScriptMode, - "css-": CssMode - }); - - this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.blockComment = {start: ""}; - - this.voidElements = lang.arrayToMap(voidElements); - - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - this.checkOutdent = function(state, line, input) { - return false; - }; - - this.getCompletions = function(state, session, pos, prefix) { - return this.$completer.getCompletions(state, session, pos, prefix); - }; - - this.createWorker = function(session) { - if (this.constructor != Mode) - return; - var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - if (this.fragmentContext) - worker.call("setOptions", [{context: this.fragmentContext}]); - - worker.on("error", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/html"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/coffee"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var FoldMode = require("./folding/coffee").FoldMode; - -var Mode = function() { - this.HighlightRules = RubyHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - - this.lineCommentStart = "#"; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/); - var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/); - var startingConditional = line.match(/^\s*(if|else)\s*/) - if (match || startingClassOrMethod || startingDoBlock || startingConditional) { - indent += tab; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return /^\s+(end|else)$/.test(line + input) || this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, session, row) { - var line = session.getLine(row); - if (/}/.test(line)) - return this.$outdent.autoOutdent(session, row); - var indent = this.$getIndent(line); - var prevLine = session.getLine(row - 1); - var prevIndent = this.$getIndent(prevLine); - var tab = session.getTabString(); - if (prevIndent.length <= indent.length) { - if (indent.slice(-tab.length) == tab) - session.remove(new Range(row, indent.length-tab.length, row, indent.length)); - } - }; - - this.$id = "ace/mode/ruby"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/html_ruby",["require","exports","module","ace/lib/oop","ace/mode/html_ruby_highlight_rules","ace/mode/html","ace/mode/javascript","ace/mode/css","ace/mode/ruby"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var HtmlRubyHighlightRules = require("./html_ruby_highlight_rules").HtmlRubyHighlightRules; -var HtmlMode = require("./html").Mode; -var JavaScriptMode = require("./javascript").Mode; -var CssMode = require("./css").Mode; -var RubyMode = require("./ruby").Mode; - -var Mode = function() { - HtmlMode.call(this); - this.HighlightRules = HtmlRubyHighlightRules; - this.createModeDelegates({ - "js-": JavaScriptMode, - "css-": CssMode, - "ruby-": RubyMode - }); -}; -oop.inherits(Mode, HtmlMode); - -(function() { - - this.$id = "ace/mode/html_ruby"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),a=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",i=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",c=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",u=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",m=function(){var e=this.createKeywordMapper({"support.function":i,"support.constant":s,"support.type":a,"support.constant.color":l,"support.constant.fonts":c},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+u+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};r.inherits(m,o),t.CssHighlightRules=m}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},a.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(a,o),a.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},a.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},a.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=a}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",a="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+r+")(\\.)(prototype)(\\.)("+r+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:r},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:a},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(i,a),t.JavaScriptHighlightRules=i}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===a&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(o.prototype),r.inherits(a,o),t.XmlHighlightRules=a}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/lang"),a=e("./css_highlight_rules").CssHighlightRules,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=o.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),c=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(a,"css-","style"),this.embedTagRules(i,"js-","script"),this.constructor===c&&this.normalizeRules()};r.inherits(c,s),t.HtmlHighlightRules=c}),define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=t.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"},i=(t.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},t.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},t.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"},t.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"}),s=t.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"},l=function(){var e="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many",t="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield",n="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING",r="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",o=this.$keywords=this.createKeywordMapper({keyword:t,"constant.language":n,"variable.language":r,"support.function":e,"invalid.deprecated":"debugger"},"identifier");this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment",regex:"^=begin(?:$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},[{regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren.lparen"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.start",regex:/"/,push:[{token:"constant.language.escape",regex:/\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/},{token:"paren.start",regex:/\#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:/\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/},{token:"paren.start",regex:/\#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/'/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]}],{token:"text",regex:"::"},{token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]+"},a,i,s,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(e,t,n){ +var r="-"==e[2]?"indentedHeredoc":"heredoc",o=e.split(this.splitRegex);return n.push(r,o[3]),[{type:"constant",value:o[1]},{type:"string",value:o[2]},{type:"support.class",value:o[3]},{type:"string",value:o[4]}]},regex:"(<<-?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return"heredoc"===t[0]||"indentedHeredoc"===t[0]?t[0]:e}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"^=end(?:$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}]},this.normalizeRules()};r.inherits(l,o),t.RubyHighlightRules=l}),define("ace/mode/html_ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/ruby_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./html_highlight_rules").HtmlHighlightRules,a=e("./ruby_highlight_rules").RubyHighlightRules,i=function(){o.call(this);var e=[{regex:"<%%|%%>",token:"constant.language.escape"},{token:"comment.start.erb",regex:"<%#",push:[{token:"comment.end.erb",regex:"%>",next:"pop",defaultToken:"comment"}]},{token:"support.ruby_tag",regex:"<%+(?!>)[-=]?",push:"ruby-start"}],t=[{token:"support.ruby_tag",regex:"%>",next:"pop"},{token:"comment",regex:"#(?:[^%]|%[^>])*"}];for(var n in this.$rules)this.$rules[n].unshift.apply(this.$rules[n],e);this.embedRules(a,"ruby-",t,["start"]),this.normalizeRules()};r.inherits(i,o),t.HtmlRubyHighlightRules=i}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var a=o[1].length,i=e.findMatchingBracket({row:t,column:a});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new r(t,0,t,a-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),a=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],u={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?r=u[t]:void(r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,a){var i=n.getCursorPosition(),l=o.doc.getLine(i.row);if("{"==a){g(n);var c=n.getSelectionRange(),u=o.doc.getTextRange(c);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(l[i.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==a){g(n);var m=l.substring(i.column,i.column+1);if("}"==m){var h=o.$findOpeningBracket("}",{column:i.column+1,row:i.row});if(null!==h&&d.isAutoInsertedClosing(i,l,a))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==a||"\r\n"==a){g(n);var p="";d.isMaybeInsertedClosing(i,l)&&(p=s.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=l.substring(i.column,i.column+1);if("}"===m){var f=o.findMatchingBracket({row:i.row,column:i.column+1},"}");if(!f)return null;var x=this.$getIndent(o.getLine(f.row))}else{if(!p)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var b=x+o.getTabString();return{text:"\n"+b+"\n"+x+p,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,a){var i=o.doc.getTextRange(a);if(!a.isMultiLine()&&"{"==i){g(n);var s=o.doc.getLine(a.start.row),l=s.substring(a.end.column,a.end.column+1);if("}"==l)return a.end.column++,a;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var a=n.getSelectionRange(),i=r.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"("+i+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if(")"==c){var u=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==a){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var a=n.getSelectionRange(),i=r.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"["+i+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if("]"==c){var u=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==a){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var a=o,i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:a+s+a,selection:!1};var l=n.getCursorPosition(),c=r.doc.getLine(l.row),u=c.substring(l.column-1,l.column),d=c.substring(l.column,l.column+1),m=r.getTokenAt(l.row,l.column),h=r.getTokenAt(l.row,l.column+1);if("\\"==u&&m&&/escape/.test(m.type))return null;var p,f=m&&/string/.test(m.type),x=!h||/string/.test(h.type);if(d==a)p=f!==x;else{if(f&&!x)return null;if(f&&x)return null;var b=r.$mode.tokenRe;b.lastIndex=0;var k=b.test(u);b.lastIndex=0;var _=b.test(u);if(k||_)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;p=!0}return{text:p?a+a:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==a||"'"==a)){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(s==a)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new i(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){var o=new i(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),a=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,a,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+a.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),a=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,a)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=a.substr(0,o.column)+n,r.maybeInsertedLineEnd=a.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,a),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,a=e("./fold_mode").FoldMode,i=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(i,a),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var a=o.match(this.foldingStartMarker);if(a){var i=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,i);var s=e.getCommentFoldRange(n,i+a[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var a=o.match(this.foldingStopMarker);if(a){var i=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,i):e.getCommentFoldRange(n,i,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),a=t,i=n.length;t+=1;for(var s=t,l=e.getLength();++tc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=a)break;if(u.isMultiLine())t=u.end.row;else if(r==c)break}s=t}}return new o(a,i,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),a=e.getLength(),i=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++ni)return new o(i,r,u,t.length)}}.call(i.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new l,this.foldingRules=new c};r.inherits(u,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),a=o.tokens,i=o.state;if(a.length&&"comment"==a[a.length-1].type)return r;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(r+=n)}else if("doc-start"==e){if("start"==i||"no_regex"==i)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(u.prototype),t.Mode=u}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),a=e("../../token_iterator").TokenIterator,i=function(){this.inherit(o),this.add("colon","insertion",function(e,t,n,r,o){if(":"===o){var i=n.getCursorPosition(),s=new a(r,i.row,i.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var c=r.doc.getLine(i.row),u=c.substring(i.column,i.column+1);if(":"===u)return{text:"",selection:[1,1]};if(!c.substring(i.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&":"===i){var s=n.getCursorPosition(),l=new a(r,s.row,s.column),c=l.getCurrentToken();if(c&&c.value.match(/\s+/)&&(c=l.stepBackward()),c&&"support.type"===c.type){var u=r.doc.getLine(o.start.row),g=u.substring(o.end.column,o.end.column+1);if(";"===g)return o.end.column++,o}}}),this.add("semicolon","insertion",function(e,t,n,r,o){if(";"===o){var a=n.getCursorPosition(),i=r.doc.getLine(a.row),s=i.substring(a.column,a.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};r.inherits(i,o),t.CssBehaviour=i}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,a=e("./css_highlight_rules").CssHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/css").CssBehaviour,c=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new l,this.foldingRules=new c};r.inherits(u,o),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e).tokens;if(o.length&&"comment"==o[o.length-1].type)return r;var a=t.match(/^.*\{\s*$/);return a&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(u.prototype),t.Mode=u}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function r(e,t){return e.type.lastIndexOf(t+".xml")>-1}var o=e("../../lib/oop"),a=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,s=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,o,a){if('"'==a||"'"==a){var s=a,l=o.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var c=n.getCursorPosition(),u=o.doc.getLine(c.row),g=u.substring(c.column,c.column+1),d=new i(o,c.row,c.column),m=d.getCurrentToken();if(g==s&&(r(m,"attribute-value")||r(m,"string")))return{text:"",selection:[1,1]};if(m||(m=d.stepBackward()),!m)return;for(;r(m,"tag-whitespace")||r(m,"whitespace");)m=d.stepBackward();var h=!g||g.match(/\s/);if(r(m,"attribute-equals")&&(h||">"==g)||r(m,"decl-attribute-equals")&&(h||"?"==g))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==a||"'"==a)){var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(s==a)return o.end.column++,o}}),this.add("autoclosing","insertion",function(e,t,n,o,a){if(">"==a){var s=n.getCursorPosition(),l=new i(o,s.row,s.column),c=l.getCurrentToken()||l.stepBackward();if(!c||!(r(c,"tag-name")||r(c,"tag-whitespace")||r(c,"attribute-name")||r(c,"attribute-equals")||r(c,"attribute-value")))return;if(r(c,"reference.attribute-value"))return;if(r(c,"attribute-value")){var u=c.value.charAt(0);if('"'==u||"'"==u){var g=c.value.charAt(c.value.length-1),d=l.getCurrentTokenColumn()+c.value.length;if(d>s.column||d==s.column&&u!=g)return}}for(;!r(c,"tag-name");)c=l.stepBackward();var m=l.getCurrentTokenRow(),h=l.getCurrentTokenColumn();if(r(l.stepBackward(),"end-tag-open"))return;var p=c.value;if(m==s.row&&(p=p.substring(0,s.column-h)),this.voidElements.hasOwnProperty(p.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,o){if("\n"==o){var a=n.getCursorPosition(),s=r.getLine(a.row),l=new i(r,a.row,a.column),c=l.getCurrentToken();if(c&&c.type.indexOf("tag-close")!==-1){for(;c&&c.type.indexOf("tag-name")===-1;)c=l.stepBackward();if(!c)return;var u=c.value,g=l.getCurrentTokenRow();if(c=l.stepBackward(),!c||c.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[u]){var d=r.getTokenAt(a.row,a.column+1),s=r.getLine(g),m=this.$getIndent(s),h=m+r.getTabString();return d&&"-1}var o=e("../../lib/oop"),a=(e("../../lib/lang"),e("../../range").Range),i=e("./fold_mode").FoldMode,s=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(e,t){i.call(this),this.voidElements=e||{},this.optionalEndTags=o.mixin({},this.voidElements),t&&o.mixin(this.optionalEndTags,t)};o.inherits(l,i);var c=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?"markbeginend"==t?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),o=new c,a=0;a"==i.value;break}return o}if(r(i,"tag-close"))return o.selfClosing="/>"==i.value,o;o.start.column+=i.value.length}return null},this._findEndTagInLine=function(e,t,n,o){for(var a=e.getTokens(t),i=0,s=0;s"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(t&&n.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,n){var r=this._getFirstTagInLine(e,n);if(!r)return null;var o,i=r.closing||r.selfClosing,l=[];if(i)for(var c=new s(e,n,r.end.column),u={row:n,column:r.start.column};o=this._readTagBackward(c);){if(o.selfClosing){if(l.length)continue;return o.start.column+=o.tagName.length+2,o.end.column-=2,a.fromPoints(o.start,o.end)}if(o.closing)l.push(o);else if(this._pop(l,o),0==l.length)return o.start.column+=o.tagName.length+2,a.fromPoints(o.start,u)}else for(var c=new s(e,n,r.start.column),g={row:n,column:r.start.column+r.tagName.length+2};o=this._readTagForward(c);){if(o.selfClosing){if(l.length)continue;return o.start.column+=o.tagName.length+2,o.end.column-=2,a.fromPoints(o.start,o.end)}if(o.closing){if(this._pop(l,o),0==l.length)return a.fromPoints(g,o.start)}else l.push(o)}}}).call(l.prototype)}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("./mixed").FoldMode,a=e("./xml").FoldMode,i=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){o.call(this,new a(e,t),{"js-":new i,"css-":new i})};r.inherits(s,o)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function r(e,t){return e.type.lastIndexOf(t+".xml")>-1}function o(e,t){for(var n=new a(e,t.row,t.column),o=n.getCurrentToken();o&&!r(o,"tag-name");)o=n.stepBackward();if(o)return o.value}var a=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=i.concat(s),c={html:["manifest"],head:[],title:[],base:["href","target"],link:["href","hreflang","rel","media","type","sizes"],meta:["http-equiv","name","content","charset"],style:["type","media","scoped"],script:["charset","type","src","defer","async"],noscript:["href"],body:["onafterprint","onbeforeprint","onbeforeunload","onhashchange","onmessage","onoffline","onpopstate","onredo","onresize","onstorage","onundo","onunload"],section:[],nav:[],article:["pubdate"],aside:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],footer:[],address:[],main:[],p:[],hr:[],pre:[],blockquote:["cite"],ol:["start","reversed"],ul:[],li:["value"],dl:[],dt:[],dd:[],figure:[],figcaption:[],div:[],a:["href","target","ping","rel","media","hreflang","type"],em:[],strong:[],small:[],s:[],cite:[],q:["cite"],dfn:[],abbr:[],data:[],time:["datetime"],code:[],var:[],samp:[],kbd:[],sub:[],sup:[],i:[],b:[],u:[],mark:[],ruby:[],rt:[],rp:[],bdi:[],bdo:[],span:[],br:[],wbr:[],ins:["cite","datetime"],del:["cite","datetime"],img:["alt","src","height","width","usemap","ismap"],iframe:["name","src","height","width","sandbox","seamless"],embed:["src","height","width","type"],object:["param","data","type","height","width","usemap","name","form","classid"],param:["name","value"],video:["src","autobuffer","autoplay","loop","controls","width","height","poster"],audio:["src","autobuffer","autoplay","loop","controls"],source:["src","type","media"],track:["kind","src","srclang","label","default"],canvas:["width","height"],map:["name"],area:["shape","coords","href","hreflang","alt","target","media","rel","ping","type"],svg:[],math:[],table:["summary"],caption:[],colgroup:["span"],col:["span"],tbody:[],thead:[],tfoot:[],tr:[],td:["headers","rowspan","colspan"],th:["headers","rowspan","colspan","scope"],form:["accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],fieldset:["disabled","form","name"],legend:[],label:["form","for"],input:["type","accept","alt","autocomplete","checked","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","multiple","pattern","placeholder","readonly","required","size","src","step","width","files","value"],button:["autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","value","type"],select:["autofocus","disabled","form","multiple","name","size"],datalist:[],optgroup:["disabled","label"],option:["disabled","selected","label","value"],textarea:["autofocus","disabled","form","maxlength","name","placeholder","readonly","required","rows","cols","wrap"],keygen:["autofocus","challenge","disabled","form","keytype","name"],output:["for","form","name"],progress:["value","max"],meter:["value","min","max","low","high","optimum"],details:["open"],summary:[],command:["type","label","icon","disabled","checked","radiogroup","command"],menu:["type","label"],dialog:["open"]},u=Object.keys(c),g=function(){};(function(){this.getCompletions=function(e,t,n,o){var a=t.getTokenAt(n.row,n.column);return a?r(a,"tag-name")||r(a,"tag-open")||r(a,"end-tag-open")?this.getTagCompletions(e,t,n,o):r(a,"tag-whitespace")||r(a,"attribute-name")?this.getAttributeCompetions(e,t,n,o):[]:[]},this.getTagCompletions=function(e,t,n,r){return u.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompetions=function(e,t,n,r){var a=o(t,n);if(!a)return[];var i=l;return a in c&&(i=i.concat(c[a])),i.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})}}).call(g.prototype),t.HtmlCompletions=g}),define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/lang"),a=e("./text").Mode,i=e("./javascript").Mode,s=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,c=e("./behaviour/xml").XmlBehaviour,u=e("./folding/html").FoldMode,g=e("./html_completions").HtmlCompletions,d=e("../worker/worker_client").WorkerClient,m=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],h=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],p=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new c,this.$completer=new g,this.createModeDelegates({"js-":i,"css-":s}),this.foldingRules=new u(this.voidElements,o.arrayToMap(h))};r.inherits(p,a),function(){this.blockComment={start:""},this.voidElements=o.arrayToMap(m),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor==p){var t=new d(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(p.prototype),t.Mode=p}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("./fold_mode").FoldMode,a=e("../../range").Range,i=t.FoldMode=function(){};r.inherits(i,o),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var o=/\S/,i=e.getLine(n),s=i.search(o);if(s!=-1&&"#"==i[s]){for(var l=i.length,c=e.getLength(),u=n,g=n;++nu){var m=e.getLine(g).length;return new a(u,l,g,m)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),o=r.search(/\S/),a=e.getLine(n+1),i=e.getLine(n-1),s=i.search(/\S/),l=a.search(/\S/);if(o==-1)return e.foldWidgets[n-1]=s!=-1&&s startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/ini",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ini_highlight_rules","ace/mode/folding/ini"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var IniHighlightRules = require("./ini_highlight_rules").IniHighlightRules; -var FoldMode = require("./folding/ini").FoldMode; - -var Mode = function() { - this.HighlightRules = IniHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = ";"; - this.blockComment = {start: "/*", end: "*/"}; - this.$id = "ace/mode/ini"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/ini_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,i,n){"use strict";var t=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,r="\\\\(?:[\\\\0abtrn;#=:]|x[a-fA-F\\d]{4})",a=function(){this.$rules={start:[{token:"punctuation.definition.comment.ini",regex:"#.*",push_:[{token:"comment.line.number-sign.ini",regex:"$|^",next:"pop"},{defaultToken:"comment.line.number-sign.ini"}]},{token:"punctuation.definition.comment.ini",regex:";.*",push_:[{token:"comment.line.semicolon.ini",regex:"$|^",next:"pop"},{defaultToken:"comment.line.semicolon.ini"}]},{token:["keyword.other.definition.ini","text","punctuation.separator.key-value.ini"],regex:"\\b([a-zA-Z0-9_.-]+)\\b(\\s*)(=)"},{token:["punctuation.definition.entity.ini","constant.section.group-title.ini","punctuation.definition.entity.ini"],regex:"^(\\[)(.*?)(\\])"},{token:"punctuation.definition.string.begin.ini",regex:"'",push:[{token:"punctuation.definition.string.end.ini",regex:"'",next:"pop"},{token:"constant.language.escape",regex:r},{defaultToken:"string.quoted.single.ini"}]},{token:"punctuation.definition.string.begin.ini",regex:'"',push:[{token:"constant.language.escape",regex:r},{token:"punctuation.definition.string.end.ini",regex:'"',next:"pop"},{defaultToken:"string.quoted.double.ini"}]}]},this.normalizeRules()};a.metaData={fileTypes:["ini","conf"],keyEquivalent:"^~I",name:"Ini",scopeName:"source.ini"},t.inherits(a,o),i.IniHighlightRules=a}),define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,i,n){"use strict";var t=e("../../lib/oop"),o=e("../../range").Range,r=e("./fold_mode").FoldMode,a=i.FoldMode=function(){};t.inherits(a,r),function(){this.foldingStartMarker=/^\s*\[([^\])]*)]\s*(?:$|[;#])/,this.getFoldWidgetRange=function(e,i,n){var t=this.foldingStartMarker,r=e.getLine(n),a=r.match(t);if(a){for(var l=a[1]+".",u=r.length,s=e.getLength(),g=n,d=n;++ng){var c=e.getLine(d).length;return new o(g,u,d,c)}}}}.call(a.prototype)}),define("ace/mode/ini",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ini_highlight_rules","ace/mode/folding/ini"],function(e,i,n){"use strict";var t=e("../lib/oop"),o=e("./text").Mode,r=e("./ini_highlight_rules").IniHighlightRules,a=e("./folding/ini").FoldMode,l=function(){this.HighlightRules=r,this.foldingRules=new a};t.inherits(l,o),function(){this.lineCommentStart=";",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/ini"}.call(l.prototype),i.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-io.js b/www/js/vendor/ace/mode-io.js index 09b9f9c15..4bb669d4d 100755 --- a/www/js/vendor/ace/mode-io.js +++ b/www/js/vendor/ace/mode-io.js @@ -1,247 +1 @@ -define("ace/mode/io_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var IoHighlightRules = function() { - - this.$rules = { start: - [ { token: [ 'text', 'meta.empty-parenthesis.io' ], - regex: '(\\()(\\))', - comment: 'we match this to overload return inside () --Allan; scoping rules for what gets the scope have changed, so we now group the ) instead of the ( -- Rob' }, - { token: [ 'text', 'meta.comma-parenthesis.io' ], - regex: '(\\,)(\\))', - comment: 'We want to do the same for ,) -- Seckar; same as above -- Rob' }, - { token: 'keyword.control.io', - regex: '\\b(?:if|ifTrue|ifFalse|ifTrueIfFalse|for|loop|reverseForeach|foreach|map|continue|break|while|do|return)\\b' }, - { token: 'punctuation.definition.comment.io', - regex: '/\\*', - push: - [ { token: 'punctuation.definition.comment.io', - regex: '\\*/', - next: 'pop' }, - { defaultToken: 'comment.block.io' } ] }, - { token: 'punctuation.definition.comment.io', - regex: '//', - push: - [ { token: 'comment.line.double-slash.io', - regex: '$', - next: 'pop' }, - { defaultToken: 'comment.line.double-slash.io' } ] }, - { token: 'punctuation.definition.comment.io', - regex: '#', - push: - [ { token: 'comment.line.number-sign.io', regex: '$', next: 'pop' }, - { defaultToken: 'comment.line.number-sign.io' } ] }, - { token: 'variable.language.io', - regex: '\\b(?:self|sender|target|proto|protos|parent)\\b', - comment: 'I wonder if some of this isn\'t variable.other.language? --Allan; scoping this as variable.language to match Objective-C\'s handling of \'self\', which is inconsistent with C++\'s handling of \'this\' but perhaps intentionally so -- Rob' }, - { token: 'keyword.operator.io', - regex: '<=|>=|=|:=|\\*|\\||\\|\\||\\+|-|/|&|&&|>|<|\\?|@|@@|\\b(?:and|or)\\b' }, - { token: 'constant.other.io', regex: '\\bGL[\\w_]+\\b' }, - { token: 'support.class.io', regex: '\\b[A-Z](?:\\w+)?\\b' }, - { token: 'support.function.io', - regex: '\\b(?:clone|call|init|method|list|vector|block|\\w+(?=\\s*\\())\\b' }, - { token: 'support.function.open-gl.io', - regex: '\\bgl(?:u|ut)?[A-Z]\\w+\\b' }, - { token: 'punctuation.definition.string.begin.io', - regex: '"""', - push: - [ { token: 'punctuation.definition.string.end.io', - regex: '"""', - next: 'pop' }, - { token: 'constant.character.escape.io', regex: '\\\\.' }, - { defaultToken: 'string.quoted.triple.io' } ] }, - { token: 'punctuation.definition.string.begin.io', - regex: '"', - push: - [ { token: 'punctuation.definition.string.end.io', - regex: '"', - next: 'pop' }, - { token: 'constant.character.escape.io', regex: '\\\\.' }, - { defaultToken: 'string.quoted.double.io' } ] }, - { token: 'constant.numeric.io', - regex: '\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b' }, - { token: 'variable.other.global.io', regex: 'Lobby\\b' }, - { token: 'constant.language.io', - regex: '\\b(?:TRUE|true|FALSE|false|NULL|null|Null|Nil|nil|YES|NO)\\b' } ] } - - this.normalizeRules(); -}; - -IoHighlightRules.metaData = { fileTypes: [ 'io' ], - keyEquivalent: '^~I', - name: 'Io', - scopeName: 'source.io' } - - -oop.inherits(IoHighlightRules, TextHighlightRules); - -exports.IoHighlightRules = IoHighlightRules; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/io",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/io_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; -var IoHighlightRules = require("./io_highlight_rules").IoHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = IoHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$id = "ace/mode/io" -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/io_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,o){"use strict";var i=e("../lib/oop"),n=e("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{token:["text","meta.empty-parenthesis.io"],regex:"(\\()(\\))",comment:"we match this to overload return inside () --Allan; scoping rules for what gets the scope have changed, so we now group the ) instead of the ( -- Rob"},{token:["text","meta.comma-parenthesis.io"],regex:"(\\,)(\\))",comment:"We want to do the same for ,) -- Seckar; same as above -- Rob"},{token:"keyword.control.io",regex:"\\b(?:if|ifTrue|ifFalse|ifTrueIfFalse|for|loop|reverseForeach|foreach|map|continue|break|while|do|return)\\b"},{token:"punctuation.definition.comment.io",regex:"/\\*",push:[{token:"punctuation.definition.comment.io",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.io"}]},{token:"punctuation.definition.comment.io",regex:"//",push:[{token:"comment.line.double-slash.io",regex:"$",next:"pop"},{defaultToken:"comment.line.double-slash.io"}]},{token:"punctuation.definition.comment.io",regex:"#",push:[{token:"comment.line.number-sign.io",regex:"$",next:"pop"},{defaultToken:"comment.line.number-sign.io"}]},{token:"variable.language.io",regex:"\\b(?:self|sender|target|proto|protos|parent)\\b",comment:"I wonder if some of this isn't variable.other.language? --Allan; scoping this as variable.language to match Objective-C's handling of 'self', which is inconsistent with C++'s handling of 'this' but perhaps intentionally so -- Rob"},{token:"keyword.operator.io",regex:"<=|>=|=|:=|\\*|\\||\\|\\||\\+|-|/|&|&&|>|<|\\?|@|@@|\\b(?:and|or)\\b"},{token:"constant.other.io",regex:"\\bGL[\\w_]+\\b"},{token:"support.class.io",regex:"\\b[A-Z](?:\\w+)?\\b"},{token:"support.function.io",regex:"\\b(?:clone|call|init|method|list|vector|block|\\w+(?=\\s*\\())\\b"},{token:"support.function.open-gl.io",regex:"\\bgl(?:u|ut)?[A-Z]\\w+\\b"},{token:"punctuation.definition.string.begin.io",regex:'"""',push:[{token:"punctuation.definition.string.end.io",regex:'"""',next:"pop"},{token:"constant.character.escape.io",regex:"\\\\."},{defaultToken:"string.quoted.triple.io"}]},{token:"punctuation.definition.string.begin.io",regex:'"',push:[{token:"punctuation.definition.string.end.io",regex:'"',next:"pop"},{token:"constant.character.escape.io",regex:"\\\\."},{defaultToken:"string.quoted.double.io"}]},{token:"constant.numeric.io",regex:"\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b"},{token:"variable.other.global.io",regex:"Lobby\\b"},{token:"constant.language.io",regex:"\\b(?:TRUE|true|FALSE|false|NULL|null|Null|Nil|nil|YES|NO)\\b"}]},this.normalizeRules()};r.metaData={fileTypes:["io"],keyEquivalent:"^~I",name:"Io",scopeName:"source.io"},i.inherits(r,n),t.IoHighlightRules=r}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,o){"use strict";var i=e("../../lib/oop"),n=e("../../range").Range,r=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};i.inherits(a,r),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,o){var i=e.getLine(o);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var n=this._getFoldWidgetBase(e,t,o);return!n&&this.startRegionRe.test(i)?"start":n},this.getFoldWidgetRange=function(e,t,o,i){var n=e.getLine(o);if(this.startRegionRe.test(n))return this.getCommentRegionBlock(e,n,o);var r=n.match(this.foldingStartMarker);if(r){var a=r.index;if(r[1])return this.openingBracketBlock(e,r[1],o,a);var s=e.getCommentFoldRange(o,a+r[0].length,1);return s&&!s.isMultiLine()&&(i?s=this.getSectionRange(e,o):"all"!=t&&(s=null)),s}if("markbegin"!==t){var r=n.match(this.foldingStopMarker);if(r){var a=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],o,a):e.getCommentFoldRange(o,a,-1)}}},this.getSectionRange=function(e,t){var o=e.getLine(t),i=o.search(/\S/),r=t,a=o.length;t+=1;for(var s=t,l=e.getLength();++tg)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=r)break;if(c.isMultiLine())t=c.end.row;else if(i==g)break}s=t}}return new n(r,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,o){for(var i=t.search(/\s*$/),r=e.getLength(),a=o,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++oa)return new n(a,i,c,t.length)}}.call(a.prototype)}),define("ace/mode/io",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/io_highlight_rules","ace/mode/folding/cstyle"],function(e,t,o){"use strict";var i=e("../lib/oop"),n=e("./text").Mode,r=(e("../tokenizer").Tokenizer,e("./io_highlight_rules").IoHighlightRules),a=e("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=r,this.foldingRules=new a};i.inherits(s,n),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/io"}.call(s.prototype),t.Mode=s}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-jack.js b/www/js/vendor/ace/mode-jack.js index 988c9623d..eb172f0a1 100755 --- a/www/js/vendor/ace/mode-jack.js +++ b/www/js/vendor/ace/mode-jack.js @@ -1,696 +1 @@ -define("ace/mode/jack_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JackHighlightRules = function() { - this.$rules = { - "start" : [ - { - token : "string", - regex : '"', - next : "string2" - }, { - token : "string", - regex : "'", - next : "string1" - }, { - token : "constant.numeric", // hex - regex: "-?0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "(?:0|[-+]?[1-9][0-9]*)\\b" - }, { - token : "constant.binary", - regex : "<[0-9A-Fa-f][0-9A-Fa-f](\\s+[0-9A-Fa-f][0-9A-Fa-f])*>" - }, { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : "constant.language.null", - regex : "null\\b" - }, { - token : "storage.type", - regex: "(?:Integer|Boolean|Null|String|Buffer|Tuple|List|Object|Function|Coroutine|Form)\\b" - }, { - token : "keyword", - regex : "(?:return|abort|vars|for|delete|in|is|escape|exec|split|and|if|elif|else|while)\\b" - }, { - token : "language.builtin", - regex : "(?:lines|source|parse|read-stream|interval|substr|parseint|write|print|range|rand|inspect|bind|i-values|i-pairs|i-map|i-filter|i-chunk|i-all\\?|i-any\\?|i-collect|i-zip|i-merge|i-each)\\b" - }, { - token : "comment", - regex : "--.*$" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "storage.form", - regex : "@[a-z]+" - }, { - token : "constant.other.symbol", - regex : ':+[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?' - }, { - token : "variable", - regex : '[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?' - }, { - token : "keyword.operator", - regex : "\\|\\||\\^\\^|&&|!=|==|<=|<|>=|>|\\+|-|\\*|\\/|\\^|\\%|\\#|\\!" - }, { - token : "text", - regex : "\\s+" - } - ], - "string1" : [ - { - token : "constant.language.escape", - regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|['"\\\/bfnrt])/ - }, { - token : "string", - regex : "[^'\\\\]+" - }, { - token : "string", - regex : "'", - next : "start" - }, { - token : "string", - regex : "", - next : "start" - } - ], - "string2" : [ - { - token : "constant.language.escape", - regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|['"\\\/bfnrt])/ - }, { - token : "string", - regex : '[^"\\\\]+' - }, { - token : "string", - regex : '"', - next : "start" - }, { - token : "string", - regex : "", - next : "start" - } - ] - }; - -}; - -oop.inherits(JackHighlightRules, TextHighlightRules); - -exports.JackHighlightRules = JackHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/jack",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jack_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var HighlightRules = require("./jack_highlight_rules").JackHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = HighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "--"; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - - this.$id = "ace/mode/jack"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/jack_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"string",regex:'"',next:"string2"},{token:"string",regex:"'",next:"string1"},{token:"constant.numeric",regex:"-?0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"(?:0|[-+]?[1-9][0-9]*)\\b"},{token:"constant.binary",regex:"<[0-9A-Fa-f][0-9A-Fa-f](\\s+[0-9A-Fa-f][0-9A-Fa-f])*>"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"constant.language.null",regex:"null\\b"},{token:"storage.type",regex:"(?:Integer|Boolean|Null|String|Buffer|Tuple|List|Object|Function|Coroutine|Form)\\b"},{token:"keyword",regex:"(?:return|abort|vars|for|delete|in|is|escape|exec|split|and|if|elif|else|while)\\b"},{token:"language.builtin",regex:"(?:lines|source|parse|read-stream|interval|substr|parseint|write|print|range|rand|inspect|bind|i-values|i-pairs|i-map|i-filter|i-chunk|i-all\\?|i-any\\?|i-collect|i-zip|i-merge|i-each)\\b"},{token:"comment",regex:"--.*$"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"storage.form",regex:"@[a-z]+"},{token:"constant.other.symbol",regex:":+[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?"},{token:"variable",regex:"[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?"},{token:"keyword.operator",regex:"\\|\\||\\^\\^|&&|!=|==|<=|<|>=|>|\\+|-|\\*|\\/|\\^|\\%|\\#|\\!"},{token:"text",regex:"\\s+"}],string1:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|['"\\\/bfnrt])/},{token:"string",regex:"[^'\\\\]+"},{token:"string",regex:"'",next:"start"},{token:"string",regex:"",next:"start"}],string2:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|['"\\\/bfnrt])/},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:'"',next:"start"},{token:"string",regex:"",next:"start"}]}};r.inherits(o,i),t.JackHighlightRules=o}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var o=i[1].length,s=e.findMatchingBracket({row:t,column:o});if(!s||s.row==t)return 0;var a=this.$getIndent(e.getLine(s.row));e.replace(new r(t,0,t,o-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,i=e("../../lib/oop"),o=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],l={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,l.rangeCount!=e.multiSelect.rangeCount&&(l={rangeCount:e.multiSelect.rangeCount})),l[t]?r=l[t]:void(r=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,i,o){var s=n.getCursorPosition(),u=i.doc.getLine(s.row);if("{"==o){g(n);var c=n.getSelectionRange(),l=i.doc.getTextRange(c);if(""!==l&&"{"!==l&&n.getWrapBehavioursEnabled())return{text:"{"+l+"}",selection:!1};if(d.isSaneInsertion(n,i))return/[\]\}\)]/.test(u[s.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,i,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,i,"{"),{text:"{",selection:[1,1]})}else if("}"==o){g(n);var f=u.substring(s.column,s.column+1);if("}"==f){var h=i.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(null!==h&&d.isAutoInsertedClosing(s,u,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==o||"\r\n"==o){g(n);var m="";d.isMaybeInsertedClosing(s,u)&&(m=a.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var f=u.substring(s.column,s.column+1);if("}"===f){var b=i.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!b)return null;var k=this.$getIndent(i.getLine(b.row))}else{if(!m)return void d.clearMaybeInsertedClosing();var k=this.$getIndent(u)}var p=k+i.getTabString();return{text:"\n"+p+"\n"+k+m,selection:[1,p.length,1,p.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,i,o){var s=i.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){g(n);var a=i.doc.getLine(o.start.row),u=a.substring(o.end.column,o.end.column+1);if("}"==u)return o.end.column++,o;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,i){if("("==i){g(n);var o=n.getSelectionRange(),s=r.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"("+s+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==i){g(n);var a=n.getCursorPosition(),u=r.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if(")"==c){var l=r.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==l&&d.isAutoInsertedClosing(a,u,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"("==o){g(n);var s=r.doc.getLine(i.start.row),a=s.substring(i.start.column+1,i.start.column+2);if(")"==a)return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if("["==i){g(n);var o=n.getSelectionRange(),s=r.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"["+s+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==i){g(n);var a=n.getCursorPosition(),u=r.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if("]"==c){var l=r.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==l&&d.isAutoInsertedClosing(a,u,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"["==o){g(n);var s=r.doc.getLine(i.start.row),a=s.substring(i.start.column+1,i.start.column+2);if("]"==a)return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){if('"'==i||"'"==i){g(n);var o=i,s=n.getSelectionRange(),a=r.doc.getTextRange(s);if(""!==a&&"'"!==a&&'"'!=a&&n.getWrapBehavioursEnabled())return{text:o+a+o,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),l=c.substring(u.column-1,u.column),d=c.substring(u.column,u.column+1),f=r.getTokenAt(u.row,u.column),h=r.getTokenAt(u.row,u.column+1);if("\\"==l&&f&&/escape/.test(f.type))return null;var m,b=f&&/string/.test(f.type),k=!h||/string/.test(h.type);if(d==o)m=b!==k;else{if(b&&!k)return null;if(b&&k)return null;var p=r.$mode.tokenRe;p.lastIndex=0;var x=p.test(l);p.lastIndex=0;var v=p.test(l);if(x||v)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;m=!0}return{text:m?o+o:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&('"'==o||"'"==o)){g(n);var s=r.doc.getLine(i.start.row),a=s.substring(i.start.column+1,i.start.column+2);if(a==o)return i.end.column++,i}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isAutoInsertedClosing(i,o,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=i.row,r.autoInsertedLineEnd=n+o.substr(i.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isMaybeInsertedClosing(i,o)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=i.row,r.maybeInsertedLineStart=o.substr(0,i.column)+n,r.maybeInsertedLineEnd=o.substr(i.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},i.inherits(d,o),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,o),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var o=i.match(this.foldingStartMarker);if(o){var s=o.index;if(o[1])return this.openingBracketBlock(e,o[1],n,s);var a=e.getCommentFoldRange(n,s+o[0].length,1);return a&&!a.isMultiLine()&&(r?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t){var o=i.match(this.foldingStopMarker);if(o){var s=o.index+o[0].length;return o[1]?this.closingBracketBlock(e,o[1],n,s):e.getCommentFoldRange(n,s,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),o=t,s=n.length;t+=1;for(var a=t,u=e.getLength();++tc)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=o)break;if(l.isMultiLine())t=l.end.row;else if(r==c)break}a=t}}return new i(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/)#(end)?region\b/,u=1;++ns)return new i(s,r,l,t.length)}}.call(s.prototype)}),define("ace/mode/jack",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jack_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,o=e("./jack_highlight_rules").JackHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=o,this.$outdent=new s,this.$behaviour=new a,this.foldingRules=new u};r.inherits(c,i),function(){this.lineCommentStart="--",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if("start"==e){var i=t.match(/^.*[\{\(\[]\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/jack"}.call(c.prototype),t.Mode=c}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-jade.js b/www/js/vendor/ace/mode-jade.js index 2618a42e4..7a89a70ad 100755 --- a/www/js/vendor/ace/mode-jade.js +++ b/www/js/vendor/ace/mode-jade.js @@ -1,2039 +1,2 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; - -var escaped = function(ch) { - return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*"; -} - -function github_embed(tag, prefix) { - return { // Github style block - token : "support.function", - regex : "^\\s*```" + tag + "\\s*$", - push : prefix + "start" - }; -} - -var MarkdownHighlightRules = function() { - HtmlHighlightRules.call(this); - - this.$rules["start"].unshift({ - token : "empty_line", - regex : '^$', - next: "allowBlock" - }, { // h1 - token: "markup.heading.1", - regex: "^=+(?=\\s*$)" - }, { // h2 - token: "markup.heading.2", - regex: "^\\-+(?=\\s*$)" - }, { - token : function(value) { - return "markup.heading." + value.length; - }, - regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/, - next : "header" - }, - github_embed("(?:javascript|js)", "jscode-"), - github_embed("xml", "xmlcode-"), - github_embed("html", "htmlcode-"), - github_embed("css", "csscode-"), - { // Github style block - token : "support.function", - regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$", - next : "githubblock" - }, { // block quote - token : "string.blockquote", - regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", - next : "blockquote" - }, { // HR * - _ - token : "constant", - regex : "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$", - next: "allowBlock" - }, { // list - token : "markup.list", - regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", - next : "listblock-start" - }, { - include : "basic" - }); - - this.addRules({ - "basic" : [{ - token : "constant.language.escape", - regex : /\\[\\`*_{}\[\]()#+\-.!]/ - }, { // code span ` - token : "support.function", - regex : "(`+)(.*?[^`])(\\1)" - }, { // reference - token : ["text", "constant", "text", "url", "string", "text"], - regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$" - }, { // link by reference - token : ["text", "string", "text", "constant", "text"], - regex : "(\\[)(" + escaped("]") + ")(\\]\s*\\[)("+ escaped("]") + ")(\\])" - }, { // link by url - token : ["text", "string", "text", "markup.underline", "string", "text"], - regex : "(\\[)(" + // [ - escaped("]") + // link text - ")(\\]\\()"+ // ]( - '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href - '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" - "(\\))" // ) - }, { // strong ** __ - token : "string.strong", - regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)" - }, { // emphasis * _ - token : "string.emphasis", - regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)" - }, { // - token : ["text", "url", "text"], - regex : "(<)("+ - "(?:https?|ftp|dict):[^'\">\\s]+"+ - "|"+ - "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+ - ")(>)" - }], - "allowBlock": [ - {token : "support.function", regex : "^ {4}.+", next : "allowBlock"}, - {token : "empty", regex : "", next : "start"} - ], - - "header" : [{ - regex: "$", - next : "start" - }, { - include: "basic" - }, { - defaultToken : "heading" - } ], - - "listblock-start" : [{ - token : "support.variable", - regex : /(?:\[[ x]\])?/, - next : "listblock" - }], - - "listblock" : [ { // Lists only escape on completely blank lines. - token : "empty_line", - regex : "^$", - next : "start" - }, { // list - token : "markup.list", - regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", - next : "listblock-start" - }, { - include : "basic", noEscape: true - }, { // Github style block - token : "support.function", - regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$", - next : "githubblock" - }, { - defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly - } ], - - "blockquote" : [ { // Blockquotes only escape on blank lines. - token : "empty_line", - regex : "^\\s*$", - next : "start" - }, { // block quote - token : "string.blockquote", - regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", - next : "blockquote" - }, { - include : "basic", noEscape: true - }, { - defaultToken : "string.blockquote" - } ], - - "githubblock" : [ { - token : "support.function", - regex : "^\\s*```", - next : "start" - }, { - token : "support.function", - regex : ".+" - } ] - }); - - this.embedRules(JavaScriptHighlightRules, "jscode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.embedRules(HtmlHighlightRules, "htmlcode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.embedRules(CssHighlightRules, "csscode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.embedRules(XmlHighlightRules, "xmlcode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.normalizeRules(); -}; -oop.inherits(MarkdownHighlightRules, TextHighlightRules); - -exports.MarkdownHighlightRules = MarkdownHighlightRules; -}); - -define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var ScssHighlightRules = function() { - - var properties = lang.arrayToMap( (function () { - - var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|"); - - var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" + - "background-size|binding|border-bottom-colors|border-left-colors|" + - "border-right-colors|border-top-colors|border-end|border-end-color|" + - "border-end-style|border-end-width|border-image|border-start|" + - "border-start-color|border-start-style|border-start-width|box-align|" + - "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" + - "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" + - "column-rule-width|column-rule-style|column-rule-color|float-edge|" + - "font-feature-settings|font-language-override|force-broken-image-icon|" + - "image-region|margin-end|margin-start|opacity|outline|outline-color|" + - "outline-offset|outline-radius|outline-radius-bottomleft|" + - "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" + - "outline-style|outline-width|padding-end|padding-start|stack-sizing|" + - "tab-size|text-blink|text-decoration-color|text-decoration-line|" + - "text-decoration-style|transform|transform-origin|transition|" + - "transition-delay|transition-duration|transition-property|" + - "transition-timing-function|user-focus|user-input|user-modify|user-select|" + - "window-shadow|border-radius").split("|"); - - var properties = ("azimuth|background-attachment|background-color|background-image|" + - "background-position|background-repeat|background|border-bottom-color|" + - "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" + - "border-color|border-left-color|border-left-style|border-left-width|" + - "border-left|border-right-color|border-right-style|border-right-width|" + - "border-right|border-spacing|border-style|border-top-color|" + - "border-top-style|border-top-width|border-top|border-width|border|bottom|" + - "box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|" + - "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" + - "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" + - "font-stretch|font-style|font-variant|font-weight|font|height|left|" + - "letter-spacing|line-height|list-style-image|list-style-position|" + - "list-style-type|list-style|margin-bottom|margin-left|margin-right|" + - "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" + - "min-width|opacity|orphans|outline-color|" + - "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" + - "padding-left|padding-right|padding-top|padding|page-break-after|" + - "page-break-before|page-break-inside|page|pause-after|pause-before|" + - "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" + - "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" + - "stress|table-layout|text-align|text-decoration|text-indent|" + - "text-shadow|text-transform|top|unicode-bidi|vertical-align|" + - "visibility|voice-family|volume|white-space|widows|width|word-spacing|" + - "z-index").split("|"); - var ret = []; - for (var i=0, ln=browserPrefix.length; i|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - }, { - caseInsensitive: true - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - "qqstring" : [ - { - token : "string", - regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', - next : "start" - }, { - token : "string", - regex : '.+' - } - ], - "qstring" : [ - { - token : "string", - regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", - next : "start" - }, { - token : "string", - regex : '.+' - } - ] - }; -}; - -oop.inherits(ScssHighlightRules, TextHighlightRules); - -exports.ScssHighlightRules = ScssHighlightRules; - -}); - -define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var LessHighlightRules = function() { - - var properties = lang.arrayToMap( (function () { - - var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|"); - - var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" + - "background-size|binding|border-bottom-colors|border-left-colors|" + - "border-right-colors|border-top-colors|border-end|border-end-color|" + - "border-end-style|border-end-width|border-image|border-start|" + - "border-start-color|border-start-style|border-start-width|box-align|" + - "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" + - "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" + - "column-rule-width|column-rule-style|column-rule-color|float-edge|" + - "font-feature-settings|font-language-override|force-broken-image-icon|" + - "image-region|margin-end|margin-start|opacity|outline|outline-color|" + - "outline-offset|outline-radius|outline-radius-bottomleft|" + - "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" + - "outline-style|outline-width|padding-end|padding-start|stack-sizing|" + - "tab-size|text-blink|text-decoration-color|text-decoration-line|" + - "text-decoration-style|transform|transform-origin|transition|" + - "transition-delay|transition-duration|transition-property|" + - "transition-timing-function|user-focus|user-input|user-modify|user-select|" + - "window-shadow|border-radius").split("|"); - - var properties = ("azimuth|background-attachment|background-color|background-image|" + - "background-position|background-repeat|background|border-bottom-color|" + - "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" + - "border-color|border-left-color|border-left-style|border-left-width|" + - "border-left|border-right-color|border-right-style|border-right-width|" + - "border-right|border-spacing|border-style|border-top-color|" + - "border-top-style|border-top-width|border-top|border-width|border|" + - "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" + - "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" + - "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" + - "font-stretch|font-style|font-variant|font-weight|font|height|left|" + - "letter-spacing|line-height|list-style-image|list-style-position|" + - "list-style-type|list-style|margin-bottom|margin-left|margin-right|" + - "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" + - "min-width|opacity|orphans|outline-color|" + - "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" + - "padding-left|padding-right|padding-top|padding|page-break-after|" + - "page-break-before|page-break-inside|page|pause-after|pause-before|" + - "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" + - "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" + - "stress|table-layout|text-align|text-decoration|text-indent|" + - "text-shadow|text-transform|top|unicode-bidi|vertical-align|" + - "visibility|voice-family|volume|white-space|widows|width|word-spacing|" + - "z-index").split("|"); - var ret = []; - for (var i=0, ln=browserPrefix.length; i|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - }, { - caseInsensitive: true - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ] - }; -}; - -oop.inherits(LessHighlightRules, TextHighlightRules); - -exports.LessHighlightRules = LessHighlightRules; - -}); - -define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - - var oop = require("../lib/oop"); - var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - - oop.inherits(CoffeeHighlightRules, TextHighlightRules); - - function CoffeeHighlightRules() { - var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"; - - var keywords = ( - "this|throw|then|try|typeof|super|switch|return|break|by|continue|" + - "catch|class|in|instanceof|is|isnt|if|else|extends|for|own|" + - "finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" + - "or|on|unless|until|and|yes" - ); - - var langConstant = ( - "true|false|null|undefined|NaN|Infinity" - ); - - var illegal = ( - "case|const|default|function|var|void|with|enum|export|implements|" + - "interface|let|package|private|protected|public|static|yield|" + - "__hasProp|slice|bind|indexOf" - ); - - var supportClass = ( - "Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + - "SyntaxError|TypeError|URIError|" + - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray" - ); - - var supportFunction = ( - "Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" + - "encodeURIComponent|decodeURI|decodeURIComponent|String|" - ); - - var variableLanguage = ( - "window|arguments|prototype|document" - ); - - var keywordMapper = this.createKeywordMapper({ - "keyword": keywords, - "constant.language": langConstant, - "invalid.illegal": illegal, - "language.support.class": supportClass, - "language.support.function": supportFunction, - "variable.language": variableLanguage - }, "identifier"); - - var functionRule = { - token: ["paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type"], - regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()\"'\/])*?)(\))(\s*))?([\-=]>)/.source - }; - - var stringEscape = /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/; - - this.$rules = { - start : [ - { - token : "constant.numeric", - regex : "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)" - }, { - stateName: "qdoc", - token : "string", regex : "'''", next : [ - {token : "string", regex : "'''", next : "start"}, - {token : "constant.language.escape", regex : stringEscape}, - {defaultToken: "string"} - ] - }, { - stateName: "qqdoc", - token : "string", - regex : '"""', - next : [ - {token : "string", regex : '"""', next : "start"}, - {token : "paren.string", regex : '#{', push : "start"}, - {token : "constant.language.escape", regex : stringEscape}, - {defaultToken: "string"} - ] - }, { - stateName: "qstring", - token : "string", regex : "'", next : [ - {token : "string", regex : "'", next : "start"}, - {token : "constant.language.escape", regex : stringEscape}, - {defaultToken: "string"} - ] - }, { - stateName: "qqstring", - token : "string.start", regex : '"', next : [ - {token : "string.end", regex : '"', next : "start"}, - {token : "paren.string", regex : '#{', push : "start"}, - {token : "constant.language.escape", regex : stringEscape}, - {defaultToken: "string"} - ] - }, { - stateName: "js", - token : "string", regex : "`", next : [ - {token : "string", regex : "`", next : "start"}, - {token : "constant.language.escape", regex : stringEscape}, - {defaultToken: "string"} - ] - }, { - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift() || ""; - if (this.next.indexOf("string") != -1) - return "paren.string"; - } - return "paren"; - } - }, { - token : "string.regex", - regex : "///", - next : "heregex" - }, { - token : "string.regex", - regex : /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/ - }, { - token : "comment", - regex : "###(?!#)", - next : "comment" - }, { - token : "comment", - regex : "#.*" - }, { - token : ["punctuation.operator", "text", "identifier"], - regex : "(\\.)(\\s*)(" + illegal + ")" - }, { - token : "punctuation.operator", - regex : "\\." - }, { - token : ["keyword", "text", "language.support.class", - "text", "keyword", "text", "language.support.class"], - regex : "(class)(\\s+)(" + identifier + ")(?:(\\s+)(extends)(\\s+)(" + identifier + "))?" - }, { - token : ["entity.name.function", "text", "keyword.operator", "text"].concat(functionRule.token), - regex : "(" + identifier + ")(\\s*)([=:])(\\s*)" + functionRule.regex - }, - functionRule, - { - token : "variable", - regex : "@(?:" + identifier + ")?" - }, { - token: keywordMapper, - regex : identifier - }, { - token : "punctuation.operator", - regex : "\\,|\\." - }, { - token : "storage.type", - regex : "[\\-=]>" - }, { - token : "keyword.operator", - regex : "(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])" - }, { - token : "paren.lparen", - regex : "[({[]" - }, { - token : "paren.rparen", - regex : "[\\]})]" - }, { - token : "text", - regex : "\\s+" - }], - - - heregex : [{ - token : "string.regex", - regex : '.*?///[imgy]{0,4}', - next : "start" - }, { - token : "comment.regex", - regex : "\\s+(?:#.*)?" - }, { - token : "string.regex", - regex : "\\S+" - }], - - comment : [{ - token : "comment", - regex : '###', - next : "start" - }, { - defaultToken : "comment" - }] - }; - this.normalizeRules(); - } - - exports.CoffeeHighlightRules = CoffeeHighlightRules; -}); - -define("ace/mode/jade_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/markdown_highlight_rules","ace/mode/scss_highlight_rules","ace/mode/less_highlight_rules","ace/mode/coffee_highlight_rules","ace/mode/javascript_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules; -var SassHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; -var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules; -var CoffeeHighlightRules = require("./coffee_highlight_rules").CoffeeHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; - -function mixin_embed(tag, prefix) { - return { - token : "entity.name.function.jade", - regex : "^\\s*\\:" + tag, - next : prefix + "start" - }; -} - -var JadeHighlightRules = function() { - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = - { - "start": [ - { - token: "keyword.control.import.include.jade", - regex: "\\s*\\binclude\\b" - }, - { - token: "keyword.other.doctype.jade", - regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?" - }, - { - token : "punctuation.section.comment", - regex : "^\\s*\/\/(?:\\s*[^-\\s]|\\s+\\S)(?:.*$)" - }, - { - onMatch: function(value, currentState, stack) { - stack.unshift(this.next, value.length - 2, currentState); - return "comment"; - }, - regex: /^\s*\/\//, - next: "comment_block" - }, - mixin_embed("markdown", "markdown-"), - mixin_embed("sass", "sass-"), - mixin_embed("less", "less-"), - mixin_embed("coffee", "coffee-"), - { - token: [ "storage.type.function.jade", - "entity.name.function.jade", - "punctuation.definition.parameters.begin.jade", - "variable.parameter.function.jade", - "punctuation.definition.parameters.end.jade" - ], - regex: "^(\\s*mixin)( [\\w\\-]+)(\\s*\\()(.*?)(\\))" - }, - { - token: [ "storage.type.function.jade", "entity.name.function.jade"], - regex: "^(\\s*mixin)( [\\w\\-]+)" - }, - { - token: "source.js.embedded.jade", - regex: "^\\s*(?:-|=|!=)", - next: "js-start" - }, - { - token: "string.interpolated.jade", - regex: "[#!]\\{[^\\}]+\\}" - }, - { - token: "meta.tag.any.jade", - regex: /^\s*(?!\w+\:)(?:[\w]+|(?=\.|#)])/, - next: "tag_single" - }, - { - token: "suport.type.attribute.id.jade", - regex: "#\\w+" - }, - { - token: "suport.type.attribute.class.jade", - regex: "\\.\\w+" - }, - { - token: "punctuation", - regex: "\\s*(?:\\()", - next: "tag_attributes" - } - ], - "comment_block": [ - {regex: /^\s*/, onMatch: function(value, currentState, stack) { - if (value.length <= stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack.shift(); - return "text"; - } else { - this.next = ""; - return "comment"; - } - }, next: "start"}, - {defaultToken: "comment"} - ], - "tag_single": [ - { - token: "entity.other.attribute-name.class.jade", - regex: "\\.[\\w-]+" - }, - { - token: "entity.other.attribute-name.id.jade", - regex: "#[\\w-]+" - }, - { - token: ["text", "punctuation"], - regex: "($)|((?!\\.|#|=|-))", - next: "start" - } - ], - "tag_attributes": [ - { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, - { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, - { - token: "entity.other.attribute-name.jade", - regex: "\\b[a-zA-Z\\-:]+" - }, - { - token: ["entity.other.attribute-name.jade", "punctuation"], - regex: "\\b([a-zA-Z:\\.-]+)(=)", - next: "attribute_strings" - }, - { - token: "punctuation", - regex: "\\)", - next: "start" - } - ], - "attribute_strings": [ - { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, - { - token : "string", - regex : '"(?=.)', - next : "qqstring" - } - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : '[^"\\\\]+' - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "tag_attributes" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "[^'\\\\]+" - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "tag_attributes" - } - ] -}; - - this.embedRules(JavaScriptHighlightRules, "js-", [{ - token: "text", - regex: ".$", - next: "start" - }]); -}; - -oop.inherits(JadeHighlightRules, TextHighlightRules); - -exports.JadeHighlightRules = JadeHighlightRules; -}); - -define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/jade",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jade_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JadeHighlightRules = require("./jade_highlight_rules").JadeHighlightRules; -var FoldMode = require("./folding/coffee").FoldMode; - -var Mode = function() { - this.HighlightRules = JadeHighlightRules; - - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "//"; - this.$id = "ace/mode/jade"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},a.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};n.inherits(a,o),a.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},a.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},a.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=a}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",n="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",a="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+n+")(\\.)(prototype)(\\.)("+n+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\.)("+n+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+n+")(\\.)("+n+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+n+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+n+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:n},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:n},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,r){return this.next="{"==e?this.nextState:"","{"==e&&r.length?(r.unshift("start",t),"paren"):"}"==e&&r.length&&(r.shift(),this.next=r.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:a},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};n.inherits(i,a),t.JavaScriptHighlightRules=i}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===a&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,r){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+r+".tag-name.xml"],regex:"(<)("+r+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[r+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,r){return r.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+r+".tag-name.xml"],regex:"(|$))",next:r+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(o.prototype),n.inherits(a,o),t.XmlHighlightRules=a}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),a=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",i=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",g=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",u=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",p=function(){var e=this.createKeywordMapper({"support.function":i,"support.constant":s,"support.type":a,"support.constant.color":l,"support.constant.fonts":g},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:u},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};n.inherits(p,o),t.CssHighlightRules=p}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=e("../lib/lang"),a=e("./css_highlight_rules").CssHighlightRules,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=o.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),g=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var r=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(r?"."+r:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(a,"css-","style"),this.embedTagRules(i,"js-","script"),this.constructor===g&&this.normalizeRules()};n.inherits(g,s),t.HtmlHighlightRules=g}),define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,r){"use strict";function n(e,t){return{token:"support.function",regex:"^\\s*```"+e+"\\s*$",push:t+"start"}}var o=e("../lib/oop"),a=e("../lib/lang"),i=e("./text_highlight_rules").TextHighlightRules,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,l=e("./xml_highlight_rules").XmlHighlightRules,g=e("./html_highlight_rules").HtmlHighlightRules,c=e("./css_highlight_rules").CssHighlightRules,u=function(e){return"(?:[^"+a.escapeRegExp(e)+"\\\\]|\\\\.)*"},d=function(){g.call(this),this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(e){return"markup.heading."+e.length},regex:/^#{1,6}(?=\s*[^ #]|\s+#.)/,next:"header"},n("(?:javascript|js)","jscode-"),n("xml","xmlcode-"),n("html","htmlcode-"),n("css","csscode-"),{token:"support.function",regex:"^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",next:"githubblock"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+u("]")+")(\\]s*\\[)("+u("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\[)("+u("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+u('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:"(<)((?:https?|ftp|dict):[^'\">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)"}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},{token:"support.function",regex:"^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",next:"githubblock"},{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:[{token:"support.function",regex:"^\\s*```",next:"start"},{token:"support.function",regex:".+"}]}),this.embedRules(s,"jscode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.embedRules(g,"htmlcode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.embedRules(c,"csscode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.embedRules(l,"xmlcode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.normalizeRules()};o.inherits(d,i),t.MarkdownHighlightRules=d}),define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=e("../lib/lang"),a=e("./text_highlight_rules").TextHighlightRules,i=function(){var e=o.arrayToMap(function(){for(var e="-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-".split("|"),t="appearance|background-clip|background-inline-policy|background-origin|background-size|binding|border-bottom-colors|border-left-colors|border-right-colors|border-top-colors|border-end|border-end-color|border-end-style|border-end-width|border-image|border-start|border-start-color|border-start-style|border-start-width|box-align|box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|box-pack|box-sizing|column-count|column-gap|column-width|column-rule|column-rule-width|column-rule-style|column-rule-color|float-edge|font-feature-settings|font-language-override|force-broken-image-icon|image-region|margin-end|margin-start|opacity|outline|outline-color|outline-offset|outline-radius|outline-radius-bottomleft|outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|outline-style|outline-width|padding-end|padding-start|stack-sizing|tab-size|text-blink|text-decoration-color|text-decoration-line|text-decoration-style|transform|transform-origin|transition|transition-delay|transition-duration|transition-property|transition-timing-function|user-focus|user-input|user-modify|user-select|window-shadow|border-radius".split("|"),r="azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|"),n=[],o=0,a=e.length;o|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]}};n.inherits(i,a),t.ScssHighlightRules=i}),define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=e("../lib/lang"),a=e("./text_highlight_rules").TextHighlightRules,i=function(){var e=o.arrayToMap(function(){for(var e="-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-".split("|"),t="appearance|background-clip|background-inline-policy|background-origin|background-size|binding|border-bottom-colors|border-left-colors|border-right-colors|border-top-colors|border-end|border-end-color|border-end-style|border-end-width|border-image|border-start|border-start-color|border-start-style|border-start-width|box-align|box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|box-pack|box-sizing|column-count|column-gap|column-width|column-rule|column-rule-width|column-rule-style|column-rule-color|float-edge|font-feature-settings|font-language-override|force-broken-image-icon|image-region|margin-end|margin-start|opacity|outline|outline-color|outline-offset|outline-radius|outline-radius-bottomleft|outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|outline-style|outline-width|padding-end|padding-start|stack-sizing|tab-size|text-blink|text-decoration-color|text-decoration-line|text-decoration-style|transform|transform-origin|transition|transition-delay|transition-duration|transition-property|transition-timing-function|user-focus|user-input|user-modify|user-select|window-shadow|border-radius".split("|"),r="azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|"),n=[],o=0,a=e.length;o|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}]}};n.inherits(i,a),t.LessHighlightRules=i}),define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";function n(){var e="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",t="this|throw|then|try|typeof|super|switch|return|break|by|continue|catch|class|in|instanceof|is|isnt|if|else|extends|for|own|finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|or|on|unless|until|and|yes",r="true|false|null|undefined|NaN|Infinity",n="case|const|default|function|var|void|with|enum|export|implements|interface|let|package|private|protected|public|static|yield|__hasProp|slice|bind|indexOf",o="Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray",a="Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|encodeURIComponent|decodeURI|decodeURIComponent|String|",i="window|arguments|prototype|document",s=this.createKeywordMapper({keyword:t,"constant.language":r,"invalid.illegal":n,"language.support.class":o,"language.support.function":a,"variable.language":i},"identifier"),l={token:["paren.lparen","variable.parameter","paren.rparen","text","storage.type"],regex:/(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()\"'\/])*?)(\))(\s*))?([\-=]>)/.source},g=/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;this.$rules={start:[{token:"constant.numeric",regex:"(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},{stateName:"qdoc",token:"string",regex:"'''",next:[{token:"string",regex:"'''",next:"start"},{token:"constant.language.escape",regex:g},{defaultToken:"string"}]},{stateName:"qqdoc",token:"string",regex:'"""',next:[{token:"string",regex:'"""',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:g},{defaultToken:"string"}]},{stateName:"qstring",token:"string",regex:"'",next:[{token:"string",regex:"'",next:"start"},{token:"constant.language.escape",regex:g},{defaultToken:"string"}]},{stateName:"qqstring",token:"string.start",regex:'"',next:[{token:"string.end",regex:'"',next:"start"},{token:"paren.string",regex:"#{",push:"start"},{token:"constant.language.escape",regex:g},{defaultToken:"string"}]},{stateName:"js",token:"string",regex:"`",next:[{token:"string",regex:"`",next:"start"},{token:"constant.language.escape",regex:g},{defaultToken:"string"}]},{regex:"[{}]",onMatch:function(e,t,r){return this.next="","{"==e&&r.length?(r.unshift("start",t),"paren"):"}"==e&&r.length&&(r.shift(),this.next=r.shift()||"",this.next.indexOf("string")!=-1)?"paren.string":"paren"}},{token:"string.regex",regex:"///",next:"heregex"},{token:"string.regex",regex:/(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/},{token:"comment",regex:"###(?!#)",next:"comment"},{token:"comment",regex:"#.*"},{token:["punctuation.operator","text","identifier"],regex:"(\\.)(\\s*)("+n+")"},{token:"punctuation.operator",regex:"\\."},{token:["keyword","text","language.support.class","text","keyword","text","language.support.class"],regex:"(class)(\\s+)("+e+")(?:(\\s+)(extends)(\\s+)("+e+"))?"},{token:["entity.name.function","text","keyword.operator","text"].concat(l.token),regex:"("+e+")(\\s*)([=:])(\\s*)"+l.regex},l,{token:"variable",regex:"@(?:"+e+")?"},{token:s,regex:e},{token:"punctuation.operator",regex:"\\,|\\."},{token:"storage.type",regex:"[\\-=]>"},{token:"keyword.operator",regex:"(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"},{token:"paren.lparen",regex:"[({[]"},{token:"paren.rparen",regex:"[\\]})]"},{token:"text",regex:"\\s+"}],heregex:[{token:"string.regex",regex:".*?///[imgy]{0,4}",next:"start"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",regex:"\\S+"}],comment:[{token:"comment",regex:"###",next:"start"},{defaultToken:"comment"}]},this.normalizeRules()}var o=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules;o.inherits(n,a),t.CoffeeHighlightRules=n}),define("ace/mode/jade_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/markdown_highlight_rules","ace/mode/scss_highlight_rules","ace/mode/less_highlight_rules","ace/mode/coffee_highlight_rules","ace/mode/javascript_highlight_rules"],function(e,t,r){"use strict";function n(e,t){return{token:"entity.name.function.jade",regex:"^\\s*\\:"+e,next:t+"start"}}var o=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules,i=(e("./markdown_highlight_rules").MarkdownHighlightRules,e("./scss_highlight_rules").ScssHighlightRules,e("./less_highlight_rules").LessHighlightRules,e("./coffee_highlight_rules").CoffeeHighlightRules,e("./javascript_highlight_rules").JavaScriptHighlightRules),s=function(){var e="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={start:[{token:"keyword.control.import.include.jade",regex:"\\s*\\binclude\\b"},{token:"keyword.other.doctype.jade",regex:"^!!!\\s*(?:[a-zA-Z0-9-_]+)?"},{token:"punctuation.section.comment",regex:"^\\s*//(?:\\s*[^-\\s]|\\s+\\S)(?:.*$)"},{onMatch:function(e,t,r){return r.unshift(this.next,e.length-2,t),"comment"},regex:/^\s*\/\//,next:"comment_block"},n("markdown","markdown-"),n("sass","sass-"),n("less","less-"),n("coffee","coffee-"),{token:["storage.type.function.jade","entity.name.function.jade","punctuation.definition.parameters.begin.jade","variable.parameter.function.jade","punctuation.definition.parameters.end.jade"],regex:"^(\\s*mixin)( [\\w\\-]+)(\\s*\\()(.*?)(\\))"},{token:["storage.type.function.jade","entity.name.function.jade"],regex:"^(\\s*mixin)( [\\w\\-]+)"},{token:"source.js.embedded.jade",regex:"^\\s*(?:-|=|!=)",next:"js-start"},{token:"string.interpolated.jade",regex:"[#!]\\{[^\\}]+\\}"},{token:"meta.tag.any.jade",regex:/^\s*(?!\w+\:)(?:[\w]+|(?=\.|#)])/,next:"tag_single"},{token:"suport.type.attribute.id.jade",regex:"#\\w+"},{token:"suport.type.attribute.class.jade",regex:"\\.\\w+"},{token:"punctuation",regex:"\\s*(?:\\()",next:"tag_attributes"}],comment_block:[{regex:/^\s*/,onMatch:function(e,t,r){return e.length<=r[1]?(r.shift(),r.shift(),this.next=r.shift(),"text"):(this.next="","comment")},next:"start"},{defaultToken:"comment"}],tag_single:[{token:"entity.other.attribute-name.class.jade",regex:"\\.[\\w-]+"},{token:"entity.other.attribute-name.id.jade",regex:"#[\\w-]+"},{token:["text","punctuation"],regex:"($)|((?!\\.|#|=|-))",next:"start"}],tag_attributes:[{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"entity.other.attribute-name.jade",regex:"\\b[a-zA-Z\\-:]+"},{token:["entity.other.attribute-name.jade","punctuation"],regex:"\\b([a-zA-Z:\\.-]+)(=)",next:"attribute_strings"},{token:"punctuation",regex:"\\)",next:"start"}],attribute_strings:[{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"}],qqstring:[{token:"constant.language.escape",regex:e},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"tag_attributes"}],qstring:[{token:"constant.language.escape",regex:e},{token:"string",regex:"[^'\\\\]+"},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"tag_attributes"}]},this.embedRules(i,"js-",[{token:"text",regex:".$",next:"start"}])};o.inherits(s,a),t.JadeHighlightRules=s}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,r){"use strict";var n=e("../../lib/oop"),o=e("./fold_mode").FoldMode,a=e("../../range").Range,i=t.FoldMode=function(){};n.inherits(i,o),function(){this.getFoldWidgetRange=function(e,t,r){var n=this.indentationBlock(e,r);if(n)return n;var o=/\S/,i=e.getLine(r),s=i.search(o);if(s!=-1&&"#"==i[s]){for(var l=i.length,g=e.getLength(),c=r,u=r;++rc){var p=e.getLine(u).length;return new a(c,l,u,p)}}},this.getFoldWidget=function(e,t,r){var n=e.getLine(r),o=n.search(/\S/),a=e.getLine(r+1),i=e.getLine(r-1),s=i.search(/\S/),l=a.search(/\S/);if(o==-1)return e.foldWidgets[r-1]=s!=-1&&s=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaHighlightRules = function() { - var keywords = ( - "abstract|continue|for|new|switch|" + - "assert|default|goto|package|synchronized|" + - "boolean|do|if|private|this|" + - "break|double|implements|protected|throw|" + - "byte|else|import|public|throws|" + - "case|enum|instanceof|return|transient|" + - "catch|extends|int|short|try|" + - "char|final|interface|static|void|" + - "class|finally|long|strictfp|volatile|" + - "const|float|native|super|while" - ); - - var buildinConstants = ("null|Infinity|NaN|undefined"); - - - var langClasses = ( - "AbstractMethodError|AssertionError|ClassCircularityError|"+ - "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+ - "ExceptionInInitializerError|IllegalAccessError|"+ - "IllegalThreadStateException|InstantiationError|InternalError|"+ - "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+ - "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+ - "SuppressWarnings|TypeNotPresentException|UnknownError|"+ - "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+ - "InstantiationException|IndexOutOfBoundsException|"+ - "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+ - "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+ - "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+ - "InterruptedException|NoSuchMethodException|IllegalAccessException|"+ - "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+ - "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+ - "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+ - "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+ - "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+ - "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+ - "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+ - "ArrayStoreException|ClassCastException|LinkageError|"+ - "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+ - "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+ - "Cloneable|Class|CharSequence|Comparable|String|Object" - ); - - var keywordMapper = this.createKeywordMapper({ - "variable.language": "this", - "keyword": keywords, - "constant.language": buildinConstants, - "support.function": langClasses - }, "identifier"); - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "\\/\\/.*$" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" - }, { - token : "lparen", - regex : "[[({]" - }, { - token : "rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); -}; - -oop.inherits(JavaHighlightRules, TextHighlightRules); - -exports.JavaHighlightRules = JavaHighlightRules; -}); - -define("ace/mode/java",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/java_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var JavaScriptMode = require("./javascript").Mode; -var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules; - -var Mode = function() { - JavaScriptMode.call(this); - this.HighlightRules = JavaHighlightRules; -}; -oop.inherits(Mode, JavaScriptMode); - -(function() { - - this.createWorker = function(session) { - return null; - }; - - this.$id = "ace/mode/java"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},a.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(a,o),a.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},a.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},a.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=a}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",a="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+r+")(\\.)(prototype)(\\.)("+r+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:r},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:a},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(i,a),t.JavaScriptHighlightRules=i}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var a=o[1].length,i=e.findMatchingBracket({row:t,column:a});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new r(t,0,t,a-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),a=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),c=["text","paren.rparen","punctuation.operator"],l=["text","paren.rparen","punctuation.operator","comment"],u={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?r=u[t]:void(r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,a){var i=n.getCursorPosition(),c=o.doc.getLine(i.row);if("{"==a){g(n);var l=n.getSelectionRange(),u=o.doc.getTextRange(l);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(c[i.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==a){g(n);var m=c.substring(i.column,i.column+1);if("}"==m){var p=o.$findOpeningBracket("}",{column:i.column+1,row:i.row});if(null!==p&&d.isAutoInsertedClosing(i,c,a))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==a||"\r\n"==a){g(n);var h="";d.isMaybeInsertedClosing(i,c)&&(h=s.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=c.substring(i.column,i.column+1);if("}"===m){var x=o.findMatchingBracket({row:i.row,column:i.column+1},"}");if(!x)return null;var f=this.$getIndent(o.getLine(x.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var f=this.$getIndent(c)}var k=f+o.getTabString();return{text:"\n"+k+"\n"+f+h,selection:[1,k.length,1,k.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,a){var i=o.doc.getTextRange(a);if(!a.isMultiLine()&&"{"==i){g(n);var s=o.doc.getLine(a.start.row),c=s.substring(a.end.column,a.end.column+1);if("}"==c)return a.end.column++,a;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var a=n.getSelectionRange(),i=r.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"("+i+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var s=n.getCursorPosition(),c=r.doc.getLine(s.row),l=c.substring(s.column,s.column+1);if(")"==l){var u=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,c,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==a){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var a=n.getSelectionRange(),i=r.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"["+i+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var s=n.getCursorPosition(),c=r.doc.getLine(s.row),l=c.substring(s.column,s.column+1);if("]"==l){var u=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,c,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==a){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var a=o,i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:a+s+a,selection:!1};var c=n.getCursorPosition(),l=r.doc.getLine(c.row),u=l.substring(c.column-1,c.column),d=l.substring(c.column,c.column+1),m=r.getTokenAt(c.row,c.column),p=r.getTokenAt(c.row,c.column+1);if("\\"==u&&m&&/escape/.test(m.type))return null;var h,x=m&&/string/.test(m.type),f=!p||/string/.test(p.type);if(d==a)h=x!==f;else{if(x&&!f)return null;if(x&&f)return null;var k=r.$mode.tokenRe;k.lastIndex=0;var b=k.test(u);k.lastIndex=0;var y=k.test(u);if(b||y)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?a+a:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==a||"'"==a)){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(s==a)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new i(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",c)){var o=new i(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",c))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",l)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),a=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,a,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+a.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),a=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,a)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=a.substr(0,o.column)+n,r.maybeInsertedLineEnd=a.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,a),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,a=e("./fold_mode").FoldMode,i=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(i,a),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var a=o.match(this.foldingStartMarker);if(a){var i=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,i);var s=e.getCommentFoldRange(n,i+a[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var a=o.match(this.foldingStopMarker);if(a){var i=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,i):e.getCommentFoldRange(n,i,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),a=t,i=n.length;t+=1;for(var s=t,c=e.getLength();++tl)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=a)break;if(u.isMultiLine())t=u.end.row;else if(r==l)break}s=t}}return new o(a,i,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),a=e.getLength(),i=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,c=1;++ni)return new o(i,r,u,t.length)}}.call(i.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),c=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new c,this.foldingRules=new l};r.inherits(u,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),a=o.tokens,i=o.state;if(a.length&&"comment"==a[a.length-1].type)return r;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(r+=n)}else if("doc-start"==e){if("start"==i||"no_regex"==i)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(u.prototype),t.Mode=u}),define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(){var e="abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while",t="null|Infinity|NaN|undefined",n="AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object",r=this.createKeywordMapper({"variable.language":"this",keyword:e,"constant.language":t,"support.function":n},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}]},this.embedRules(o,"doc-",[o.getEndRule("start")])};r.inherits(i,a),t.JavaHighlightRules=i}),define("ace/mode/java",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/java_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./javascript").Mode,a=e("./java_highlight_rules").JavaHighlightRules,i=function(){o.call(this),this.HighlightRules=a};r.inherits(i,o),function(){this.createWorker=function(e){return null},this.$id="ace/mode/java"}.call(i.prototype),t.Mode=i}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-javascript.js b/www/js/vendor/ace/mode-javascript.js index df9e43754..9b46ef32a 100755 --- a/www/js/vendor/ace/mode-javascript.js +++ b/www/js/vendor/ace/mode-javascript.js @@ -1,1025 +1 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},a.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(a,o),a.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},a.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},a.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=a}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",a="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+r+")(\\.)(prototype)(\\.)("+r+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:r},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:a},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(i,a),t.JavaScriptHighlightRules=i}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var a=o[1].length,i=e.findMatchingBracket({row:t,column:a});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new r(t,0,t,a-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),a=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),c=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],l={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,l.rangeCount!=e.multiSelect.rangeCount&&(l={rangeCount:e.multiSelect.rangeCount})),l[t]?r=l[t]:void(r=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,a){var i=n.getCursorPosition(),c=o.doc.getLine(i.row);if("{"==a){g(n);var u=n.getSelectionRange(),l=o.doc.getTextRange(u);if(""!==l&&"{"!==l&&n.getWrapBehavioursEnabled())return{text:"{"+l+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(c[i.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==a){g(n);var m=c.substring(i.column,i.column+1);if("}"==m){var p=o.$findOpeningBracket("}",{column:i.column+1,row:i.row});if(null!==p&&d.isAutoInsertedClosing(i,c,a))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==a||"\r\n"==a){g(n);var f="";d.isMaybeInsertedClosing(i,c)&&(f=s.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=c.substring(i.column,i.column+1);if("}"===m){var h=o.findMatchingBracket({row:i.row,column:i.column+1},"}");if(!h)return null;var x=this.$getIndent(o.getLine(h.row))}else{if(!f)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(c)}var k=x+o.getTabString();return{text:"\n"+k+"\n"+x+f,selection:[1,k.length,1,k.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,a){var i=o.doc.getTextRange(a);if(!a.isMultiLine()&&"{"==i){g(n);var s=o.doc.getLine(a.start.row),c=s.substring(a.end.column,a.end.column+1);if("}"==c)return a.end.column++,a;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var a=n.getSelectionRange(),i=r.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"("+i+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var s=n.getCursorPosition(),c=r.doc.getLine(s.row),u=c.substring(s.column,s.column+1);if(")"==u){var l=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==l&&d.isAutoInsertedClosing(s,c,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==a){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var a=n.getSelectionRange(),i=r.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"["+i+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var s=n.getCursorPosition(),c=r.doc.getLine(s.row),u=c.substring(s.column,s.column+1);if("]"==u){var l=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==l&&d.isAutoInsertedClosing(s,c,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==a){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var a=o,i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:a+s+a,selection:!1};var c=n.getCursorPosition(),u=r.doc.getLine(c.row),l=u.substring(c.column-1,c.column),d=u.substring(c.column,c.column+1),m=r.getTokenAt(c.row,c.column),p=r.getTokenAt(c.row,c.column+1);if("\\"==l&&m&&/escape/.test(m.type))return null;var f,h=m&&/string/.test(m.type),x=!p||/string/.test(p.type);if(d==a)f=h!==x;else{if(h&&!x)return null;if(h&&x)return null;var k=r.$mode.tokenRe;k.lastIndex=0;var b=k.test(l);k.lastIndex=0;var y=k.test(l);if(b||y)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;f=!0}return{text:f?a+a:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==a||"'"==a)){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(s==a)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new i(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",c)){var o=new i(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",c))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",u)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),a=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,a,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+a.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),a=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,a)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=a.substr(0,o.column)+n,r.maybeInsertedLineEnd=a.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,a),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,a=e("./fold_mode").FoldMode,i=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(i,a),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var a=o.match(this.foldingStartMarker);if(a){var i=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,i);var s=e.getCommentFoldRange(n,i+a[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var a=o.match(this.foldingStopMarker);if(a){var i=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,i):e.getCommentFoldRange(n,i,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),a=t,i=n.length;t+=1;for(var s=t,c=e.getLength();++tu)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=a)break;if(l.isMultiLine())t=l.end.row;else if(r==u)break}s=t}}return new o(a,i,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),a=e.getLength(),i=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,c=1;++ni)return new o(i,r,l,t.length)}}.call(i.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),c=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new c,this.foldingRules=new u};r.inherits(l,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),a=o.tokens,i=o.state;if(a.length&&"comment"==a[a.length-1].type)return r;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(r+=n)}else if("doc-start"==e){if("start"==i||"no_regex"==i)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(l.prototype),t.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-json.js b/www/js/vendor/ace/mode-json.js index b76de4718..546cde6e0 100755 --- a/www/js/vendor/ace/mode-json.js +++ b/www/js/vendor/ace/mode-json.js @@ -1,668 +1 @@ -define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JsonHighlightRules = function() { - this.$rules = { - "start" : [ - { - token : "variable", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)' - }, { - token : "string", // single line - regex : '"', - next : "string" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : "invalid.illegal", // single quoted strings are not allowed - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "invalid.illegal", // comments are not allowed - regex : "\\/\\/.*$" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "string" : [ - { - token : "constant.language.escape", - regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/ - }, { - token : "string", - regex : '[^"\\\\]+' - }, { - token : "string", - regex : '"', - next : "start" - }, { - token : "string", - regex : "", - next : "start" - } - ] - }; - -}; - -oop.inherits(JsonHighlightRules, TextHighlightRules); - -exports.JsonHighlightRules = JsonHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var HighlightRules = require("./json_highlight_rules").JsonHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; -var WorkerClient = require("../worker/worker_client").WorkerClient; - -var Mode = function() { - this.HighlightRules = HighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/json_worker", "JsonWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("error", function(e) { - session.setAnnotations([e.data]); - }); - - worker.on("ok", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - - this.$id = "ace/mode/json"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"invalid.illegal",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"invalid.illegal",regex:"\\/\\/.*$"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:'"',next:"start"},{token:"string",regex:"",next:"start"}]}};r.inherits(i,o),t.JsonHighlightRules=i}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,s=e.findMatchingBracket({row:t,column:i});if(!s||s.row==t)return 0;var a=this.$getIndent(e.getLine(s.row));e.replace(new r(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],l={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,l.rangeCount!=e.multiSelect.rangeCount&&(l={rangeCount:e.multiSelect.rangeCount})),l[t]?r=l[t]:void(r=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,i){var s=n.getCursorPosition(),u=o.doc.getLine(s.row);if("{"==i){g(n);var c=n.getSelectionRange(),l=o.doc.getTextRange(c);if(""!==l&&"{"!==l&&n.getWrapBehavioursEnabled())return{text:"{"+l+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(u[s.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var f=u.substring(s.column,s.column+1);if("}"==f){var h=o.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(null!==h&&d.isAutoInsertedClosing(s,u,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var m="";d.isMaybeInsertedClosing(s,u)&&(m=a.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var f=u.substring(s.column,s.column+1);if("}"===f){var b=o.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!b)return null;var k=this.$getIndent(o.getLine(b.row))}else{if(!m)return void d.clearMaybeInsertedClosing();var k=this.$getIndent(u)}var v=k+o.getTabString();return{text:"\n"+v+"\n"+k+m,selection:[1,v.length,1,v.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var s=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==s){g(n);var a=o.doc.getLine(i.start.row),u=a.substring(i.end.column,i.end.column+1);if("}"==u)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"("+s+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var a=n.getCursorPosition(),u=r.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if(")"==c){var l=r.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==l&&d.isAutoInsertedClosing(a,u,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(")"==a)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"["+s+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var a=n.getCursorPosition(),u=r.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if("]"==c){var l=r.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==l&&d.isAutoInsertedClosing(a,u,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if("]"==a)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var i=o,s=n.getSelectionRange(),a=r.doc.getTextRange(s);if(""!==a&&"'"!==a&&'"'!=a&&n.getWrapBehavioursEnabled())return{text:i+a+i,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),l=c.substring(u.column-1,u.column),d=c.substring(u.column,u.column+1),f=r.getTokenAt(u.row,u.column),h=r.getTokenAt(u.row,u.column+1);if("\\"==l&&f&&/escape/.test(f.type))return null;var m,b=f&&/string/.test(f.type),k=!h||/string/.test(h.type);if(d==i)m=b!==k;else{if(b&&!k)return null;if(b&&k)return null;var v=r.$mode.tokenRe;v.lastIndex=0;var p=v.test(l);v.lastIndex=0;var I=v.test(l);if(p||I)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;m=!0}return{text:m?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(a==i)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var o=new s(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var i=o.match(this.foldingStartMarker);if(i){var s=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,s);var a=e.getCommentFoldRange(n,s+i[0].length,1);return a&&!a.isMultiLine()&&(r?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),i=t,s=n.length;t+=1;for(var a=t,u=e.getLength();++tc)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=i)break;if(l.isMultiLine())t=l.end.row;else if(r==c)break}a=t}}return new o(i,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/)#(end)?region\b/,u=1;++ns)return new o(s,r,l,t.length)}}.call(s.prototype)}),define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./json_highlight_rules").JsonHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,c=e("../worker/worker_client").WorkerClient,l=function(){this.HighlightRules=i,this.$outdent=new s,this.$behaviour=new a,this.foldingRules=new u};r.inherits(l,o),function(){this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t);if("start"==e){var o=t.match(/^.*[\{\(\[]\s*$/);o&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new c(["ace"],"ace/mode/json_worker","JsonWorker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations([t.data])}),t.on("ok",function(){e.clearAnnotations()}),t},this.$id="ace/mode/json"}.call(l.prototype),t.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-jsoniq.js b/www/js/vendor/ace/mode-jsoniq.js index a9ecba62f..cf9e86bc5 100755 --- a/www/js/vendor/ace/mode-jsoniq.js +++ b/www/js/vendor/ace/mode-jsoniq.js @@ -1,2954 +1,3 @@ -define("ace/mode/xquery/jsoniq_lexer",["require","exports","module"], function(require, exports, module) { -module.exports = (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0 ? JSONiqTokenizer.TOKEN[o] : null; - }; - - this.getExpectedTokenSet = function(e) - { - var expected; - if (e.getExpected() < 0) - { - expected = JSONiqTokenizer.getTokenSet(- e.getState()); - } - else - { - expected = [JSONiqTokenizer.TOKEN[e.getExpected()]]; - } - return expected; - }; - - this.getErrorMessage = function(e) - { - var tokenSet = this.getExpectedTokenSet(e); - var found = this.getOffendingToken(e); - var prefix = input.substring(0, e.getBegin()); - var lines = prefix.split("\n"); - var line = lines.length; - var column = lines[line - 1].length + 1; - var size = e.getEnd() - e.getBegin(); - return e.getMessage() - + (found == null ? "" : ", found " + found) - + "\nwhile expecting " - + (tokenSet.length == 1 ? tokenSet[0] : ("[" + tokenSet.join(", ") + "]")) - + "\n" - + (size == 0 || found != null ? "" : "after successfully scanning " + size + " characters beginning ") - + "at line " + line + ", column " + column + ":\n..." - + input.substring(e.getBegin(), Math.min(input.length, e.getBegin() + 64)) - + "..."; - }; - - this.parse_start = function() - { - eventHandler.startNonterminal("start", e0); - lookahead1W(14); // ModuleDecl | Annotation | OptionDecl | Operator | Variable | Tag | AttrTest | - switch (l1) - { - case 58: // '' | '=' | '>' - switch (l1) - { - case 61: // '>' - shift(61); // '>' - break; - case 53: // '/>' - shift(53); // '/>' - break; - case 29: // QName - shift(29); // QName - break; - case 60: // '=' - shift(60); // '=' - break; - case 37: // '"' - shift(37); // '"' - break; - case 41: // "'" - shift(41); // "'" - break; - default: - shift(35); // EOF - } - eventHandler.endNonterminal("StartTag", e0); - }; - - this.parse_TagContent = function() - { - eventHandler.startNonterminal("TagContent", e0); - lookahead1(11); // Tag | EndTag | PredefinedEntityRef | ElementContentChar | CharRef | EOF | - switch (l1) - { - case 25: // ElementContentChar - shift(25); // ElementContentChar - break; - case 9: // Tag - shift(9); // Tag - break; - case 10: // EndTag - shift(10); // EndTag - break; - case 58: // '' - switch (l1) - { - case 14: // CDataSectionContents - shift(14); // CDataSectionContents - break; - case 67: // ']]>' - shift(67); // ']]>' - break; - default: - shift(35); // EOF - } - eventHandler.endNonterminal("CData", e0); - }; - - this.parse_XMLComment = function() - { - eventHandler.startNonterminal("XMLComment", e0); - lookahead1(0); // DirCommentContents | EOF | '-->' - switch (l1) - { - case 12: // DirCommentContents - shift(12); // DirCommentContents - break; - case 50: // '-->' - shift(50); // '-->' - break; - default: - shift(35); // EOF - } - eventHandler.endNonterminal("XMLComment", e0); - }; - - this.parse_PI = function() - { - eventHandler.startNonterminal("PI", e0); - lookahead1(3); // DirPIContents | EOF | '?' | '?>' - switch (l1) - { - case 13: // DirPIContents - shift(13); // DirPIContents - break; - case 62: // '?' - shift(62); // '?' - break; - case 63: // '?>' - shift(63); // '?>' - break; - default: - shift(35); // EOF - } - eventHandler.endNonterminal("PI", e0); - }; - - this.parse_Pragma = function() - { - eventHandler.startNonterminal("Pragma", e0); - lookahead1(2); // PragmaContents | EOF | '#' | '#)' - switch (l1) - { - case 11: // PragmaContents - shift(11); // PragmaContents - break; - case 38: // '#' - shift(38); // '#' - break; - case 39: // '#)' - shift(39); // '#)' - break; - default: - shift(35); // EOF - } - eventHandler.endNonterminal("Pragma", e0); - }; - - this.parse_Comment = function() - { - eventHandler.startNonterminal("Comment", e0); - lookahead1(4); // CommentContents | EOF | '(:' | ':)' - switch (l1) - { - case 55: // ':)' - shift(55); // ':)' - break; - case 44: // '(:' - shift(44); // '(:' - break; - case 32: // CommentContents - shift(32); // CommentContents - break; - default: - shift(35); // EOF - } - eventHandler.endNonterminal("Comment", e0); - }; - - this.parse_CommentDoc = function() - { - eventHandler.startNonterminal("CommentDoc", e0); - lookahead1(6); // DocTag | DocCommentContents | EOF | '(:' | ':)' - switch (l1) - { - case 33: // DocTag - shift(33); // DocTag - break; - case 34: // DocCommentContents - shift(34); // DocCommentContents - break; - case 55: // ':)' - shift(55); // ':)' - break; - case 44: // '(:' - shift(44); // '(:' - break; - default: - shift(35); // EOF - } - eventHandler.endNonterminal("CommentDoc", e0); - }; - - this.parse_QuotString = function() - { - eventHandler.startNonterminal("QuotString", e0); - lookahead1(5); // JSONChar | JSONCharRef | JSONPredefinedCharRef | EOF | '"' - switch (l1) - { - case 3: // JSONPredefinedCharRef - shift(3); // JSONPredefinedCharRef - break; - case 2: // JSONCharRef - shift(2); // JSONCharRef - break; - case 1: // JSONChar - shift(1); // JSONChar - break; - case 37: // '"' - shift(37); // '"' - break; - default: - shift(35); // EOF - } - eventHandler.endNonterminal("QuotString", e0); - }; - - this.parse_AposString = function() - { - eventHandler.startNonterminal("AposString", e0); - lookahead1(7); // PredefinedEntityRef | EscapeApos | AposChar | CharRef | EOF | "'" - switch (l1) - { - case 21: // PredefinedEntityRef - shift(21); // PredefinedEntityRef - break; - case 31: // CharRef - shift(31); // CharRef - break; - case 23: // EscapeApos - shift(23); // EscapeApos - break; - case 24: // AposChar - shift(24); // AposChar - break; - case 41: // "'" - shift(41); // "'" - break; - default: - shift(35); // EOF - } - eventHandler.endNonterminal("AposString", e0); - }; - - this.parse_Prefix = function() - { - eventHandler.startNonterminal("Prefix", e0); - lookahead1W(13); // NCName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | - whitespace(); - parse_NCName(); - eventHandler.endNonterminal("Prefix", e0); - }; - - this.parse__EQName = function() - { - eventHandler.startNonterminal("_EQName", e0); - lookahead1W(12); // EQName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | - whitespace(); - parse_EQName(); - eventHandler.endNonterminal("_EQName", e0); - }; - - function parse_EQName() - { - eventHandler.startNonterminal("EQName", e0); - switch (l1) - { - case 80: // 'attribute' - shift(80); // 'attribute' - break; - case 94: // 'comment' - shift(94); // 'comment' - break; - case 118: // 'document-node' - shift(118); // 'document-node' - break; - case 119: // 'element' - shift(119); // 'element' - break; - case 122: // 'empty-sequence' - shift(122); // 'empty-sequence' - break; - case 143: // 'function' - shift(143); // 'function' - break; - case 150: // 'if' - shift(150); // 'if' - break; - case 163: // 'item' - shift(163); // 'item' - break; - case 183: // 'namespace-node' - shift(183); // 'namespace-node' - break; - case 189: // 'node' - shift(189); // 'node' - break; - case 214: // 'processing-instruction' - shift(214); // 'processing-instruction' - break; - case 224: // 'schema-attribute' - shift(224); // 'schema-attribute' - break; - case 225: // 'schema-element' - shift(225); // 'schema-element' - break; - case 241: // 'switch' - shift(241); // 'switch' - break; - case 242: // 'text' - shift(242); // 'text' - break; - case 251: // 'typeswitch' - shift(251); // 'typeswitch' - break; - default: - parse_FunctionName(); - } - eventHandler.endNonterminal("EQName", e0); - } - - function parse_FunctionName() - { - eventHandler.startNonterminal("FunctionName", e0); - switch (l1) - { - case 17: // EQName^Token - shift(17); // EQName^Token - break; - case 68: // 'after' - shift(68); // 'after' - break; - case 71: // 'ancestor' - shift(71); // 'ancestor' - break; - case 72: // 'ancestor-or-self' - shift(72); // 'ancestor-or-self' - break; - case 73: // 'and' - shift(73); // 'and' - break; - case 77: // 'as' - shift(77); // 'as' - break; - case 78: // 'ascending' - shift(78); // 'ascending' - break; - case 82: // 'before' - shift(82); // 'before' - break; - case 86: // 'case' - shift(86); // 'case' - break; - case 87: // 'cast' - shift(87); // 'cast' - break; - case 88: // 'castable' - shift(88); // 'castable' - break; - case 91: // 'child' - shift(91); // 'child' - break; - case 92: // 'collation' - shift(92); // 'collation' - break; - case 101: // 'copy' - shift(101); // 'copy' - break; - case 103: // 'count' - shift(103); // 'count' - break; - case 106: // 'declare' - shift(106); // 'declare' - break; - case 107: // 'default' - shift(107); // 'default' - break; - case 108: // 'delete' - shift(108); // 'delete' - break; - case 109: // 'descendant' - shift(109); // 'descendant' - break; - case 110: // 'descendant-or-self' - shift(110); // 'descendant-or-self' - break; - case 111: // 'descending' - shift(111); // 'descending' - break; - case 116: // 'div' - shift(116); // 'div' - break; - case 117: // 'document' - shift(117); // 'document' - break; - case 120: // 'else' - shift(120); // 'else' - break; - case 121: // 'empty' - shift(121); // 'empty' - break; - case 124: // 'end' - shift(124); // 'end' - break; - case 126: // 'eq' - shift(126); // 'eq' - break; - case 127: // 'every' - shift(127); // 'every' - break; - case 129: // 'except' - shift(129); // 'except' - break; - case 132: // 'first' - shift(132); // 'first' - break; - case 133: // 'following' - shift(133); // 'following' - break; - case 134: // 'following-sibling' - shift(134); // 'following-sibling' - break; - case 135: // 'for' - shift(135); // 'for' - break; - case 144: // 'ge' - shift(144); // 'ge' - break; - case 146: // 'group' - shift(146); // 'group' - break; - case 148: // 'gt' - shift(148); // 'gt' - break; - case 149: // 'idiv' - shift(149); // 'idiv' - break; - case 151: // 'import' - shift(151); // 'import' - break; - case 157: // 'insert' - shift(157); // 'insert' - break; - case 158: // 'instance' - shift(158); // 'instance' - break; - case 160: // 'intersect' - shift(160); // 'intersect' - break; - case 161: // 'into' - shift(161); // 'into' - break; - case 162: // 'is' - shift(162); // 'is' - break; - case 168: // 'last' - shift(168); // 'last' - break; - case 170: // 'le' - shift(170); // 'le' - break; - case 172: // 'let' - shift(172); // 'let' - break; - case 176: // 'lt' - shift(176); // 'lt' - break; - case 178: // 'mod' - shift(178); // 'mod' - break; - case 179: // 'modify' - shift(179); // 'modify' - break; - case 180: // 'module' - shift(180); // 'module' - break; - case 182: // 'namespace' - shift(182); // 'namespace' - break; - case 184: // 'ne' - shift(184); // 'ne' - break; - case 196: // 'only' - shift(196); // 'only' - break; - case 198: // 'or' - shift(198); // 'or' - break; - case 199: // 'order' - shift(199); // 'order' - break; - case 200: // 'ordered' - shift(200); // 'ordered' - break; - case 204: // 'parent' - shift(204); // 'parent' - break; - case 210: // 'preceding' - shift(210); // 'preceding' - break; - case 211: // 'preceding-sibling' - shift(211); // 'preceding-sibling' - break; - case 216: // 'rename' - shift(216); // 'rename' - break; - case 217: // 'replace' - shift(217); // 'replace' - break; - case 218: // 'return' - shift(218); // 'return' - break; - case 222: // 'satisfies' - shift(222); // 'satisfies' - break; - case 227: // 'self' - shift(227); // 'self' - break; - case 233: // 'some' - shift(233); // 'some' - break; - case 234: // 'stable' - shift(234); // 'stable' - break; - case 235: // 'start' - shift(235); // 'start' - break; - case 246: // 'to' - shift(246); // 'to' - break; - case 247: // 'treat' - shift(247); // 'treat' - break; - case 248: // 'try' - shift(248); // 'try' - break; - case 252: // 'union' - shift(252); // 'union' - break; - case 254: // 'unordered' - shift(254); // 'unordered' - break; - case 258: // 'validate' - shift(258); // 'validate' - break; - case 264: // 'where' - shift(264); // 'where' - break; - case 268: // 'with' - shift(268); // 'with' - break; - case 272: // 'xquery' - shift(272); // 'xquery' - break; - case 70: // 'allowing' - shift(70); // 'allowing' - break; - case 79: // 'at' - shift(79); // 'at' - break; - case 81: // 'base-uri' - shift(81); // 'base-uri' - break; - case 83: // 'boundary-space' - shift(83); // 'boundary-space' - break; - case 84: // 'break' - shift(84); // 'break' - break; - case 89: // 'catch' - shift(89); // 'catch' - break; - case 96: // 'construction' - shift(96); // 'construction' - break; - case 99: // 'context' - shift(99); // 'context' - break; - case 100: // 'continue' - shift(100); // 'continue' - break; - case 102: // 'copy-namespaces' - shift(102); // 'copy-namespaces' - break; - case 104: // 'decimal-format' - shift(104); // 'decimal-format' - break; - case 123: // 'encoding' - shift(123); // 'encoding' - break; - case 130: // 'exit' - shift(130); // 'exit' - break; - case 131: // 'external' - shift(131); // 'external' - break; - case 139: // 'ft-option' - shift(139); // 'ft-option' - break; - case 152: // 'in' - shift(152); // 'in' - break; - case 153: // 'index' - shift(153); // 'index' - break; - case 159: // 'integrity' - shift(159); // 'integrity' - break; - case 169: // 'lax' - shift(169); // 'lax' - break; - case 190: // 'nodes' - shift(190); // 'nodes' - break; - case 197: // 'option' - shift(197); // 'option' - break; - case 201: // 'ordering' - shift(201); // 'ordering' - break; - case 220: // 'revalidation' - shift(220); // 'revalidation' - break; - case 223: // 'schema' - shift(223); // 'schema' - break; - case 226: // 'score' - shift(226); // 'score' - break; - case 232: // 'sliding' - shift(232); // 'sliding' - break; - case 238: // 'strict' - shift(238); // 'strict' - break; - case 249: // 'tumbling' - shift(249); // 'tumbling' - break; - case 250: // 'type' - shift(250); // 'type' - break; - case 255: // 'updating' - shift(255); // 'updating' - break; - case 259: // 'value' - shift(259); // 'value' - break; - case 260: // 'variable' - shift(260); // 'variable' - break; - case 261: // 'version' - shift(261); // 'version' - break; - case 265: // 'while' - shift(265); // 'while' - break; - case 95: // 'constraint' - shift(95); // 'constraint' - break; - case 174: // 'loop' - shift(174); // 'loop' - break; - default: - shift(219); // 'returning' - } - eventHandler.endNonterminal("FunctionName", e0); - } - - function parse_NCName() - { - eventHandler.startNonterminal("NCName", e0); - switch (l1) - { - case 28: // NCName^Token - shift(28); // NCName^Token - break; - case 68: // 'after' - shift(68); // 'after' - break; - case 73: // 'and' - shift(73); // 'and' - break; - case 77: // 'as' - shift(77); // 'as' - break; - case 78: // 'ascending' - shift(78); // 'ascending' - break; - case 82: // 'before' - shift(82); // 'before' - break; - case 86: // 'case' - shift(86); // 'case' - break; - case 87: // 'cast' - shift(87); // 'cast' - break; - case 88: // 'castable' - shift(88); // 'castable' - break; - case 92: // 'collation' - shift(92); // 'collation' - break; - case 103: // 'count' - shift(103); // 'count' - break; - case 107: // 'default' - shift(107); // 'default' - break; - case 111: // 'descending' - shift(111); // 'descending' - break; - case 116: // 'div' - shift(116); // 'div' - break; - case 120: // 'else' - shift(120); // 'else' - break; - case 121: // 'empty' - shift(121); // 'empty' - break; - case 124: // 'end' - shift(124); // 'end' - break; - case 126: // 'eq' - shift(126); // 'eq' - break; - case 129: // 'except' - shift(129); // 'except' - break; - case 135: // 'for' - shift(135); // 'for' - break; - case 144: // 'ge' - shift(144); // 'ge' - break; - case 146: // 'group' - shift(146); // 'group' - break; - case 148: // 'gt' - shift(148); // 'gt' - break; - case 149: // 'idiv' - shift(149); // 'idiv' - break; - case 158: // 'instance' - shift(158); // 'instance' - break; - case 160: // 'intersect' - shift(160); // 'intersect' - break; - case 161: // 'into' - shift(161); // 'into' - break; - case 162: // 'is' - shift(162); // 'is' - break; - case 170: // 'le' - shift(170); // 'le' - break; - case 172: // 'let' - shift(172); // 'let' - break; - case 176: // 'lt' - shift(176); // 'lt' - break; - case 178: // 'mod' - shift(178); // 'mod' - break; - case 179: // 'modify' - shift(179); // 'modify' - break; - case 184: // 'ne' - shift(184); // 'ne' - break; - case 196: // 'only' - shift(196); // 'only' - break; - case 198: // 'or' - shift(198); // 'or' - break; - case 199: // 'order' - shift(199); // 'order' - break; - case 218: // 'return' - shift(218); // 'return' - break; - case 222: // 'satisfies' - shift(222); // 'satisfies' - break; - case 234: // 'stable' - shift(234); // 'stable' - break; - case 235: // 'start' - shift(235); // 'start' - break; - case 246: // 'to' - shift(246); // 'to' - break; - case 247: // 'treat' - shift(247); // 'treat' - break; - case 252: // 'union' - shift(252); // 'union' - break; - case 264: // 'where' - shift(264); // 'where' - break; - case 268: // 'with' - shift(268); // 'with' - break; - case 71: // 'ancestor' - shift(71); // 'ancestor' - break; - case 72: // 'ancestor-or-self' - shift(72); // 'ancestor-or-self' - break; - case 80: // 'attribute' - shift(80); // 'attribute' - break; - case 91: // 'child' - shift(91); // 'child' - break; - case 94: // 'comment' - shift(94); // 'comment' - break; - case 101: // 'copy' - shift(101); // 'copy' - break; - case 106: // 'declare' - shift(106); // 'declare' - break; - case 108: // 'delete' - shift(108); // 'delete' - break; - case 109: // 'descendant' - shift(109); // 'descendant' - break; - case 110: // 'descendant-or-self' - shift(110); // 'descendant-or-self' - break; - case 117: // 'document' - shift(117); // 'document' - break; - case 118: // 'document-node' - shift(118); // 'document-node' - break; - case 119: // 'element' - shift(119); // 'element' - break; - case 122: // 'empty-sequence' - shift(122); // 'empty-sequence' - break; - case 127: // 'every' - shift(127); // 'every' - break; - case 132: // 'first' - shift(132); // 'first' - break; - case 133: // 'following' - shift(133); // 'following' - break; - case 134: // 'following-sibling' - shift(134); // 'following-sibling' - break; - case 143: // 'function' - shift(143); // 'function' - break; - case 150: // 'if' - shift(150); // 'if' - break; - case 151: // 'import' - shift(151); // 'import' - break; - case 157: // 'insert' - shift(157); // 'insert' - break; - case 163: // 'item' - shift(163); // 'item' - break; - case 168: // 'last' - shift(168); // 'last' - break; - case 180: // 'module' - shift(180); // 'module' - break; - case 182: // 'namespace' - shift(182); // 'namespace' - break; - case 183: // 'namespace-node' - shift(183); // 'namespace-node' - break; - case 189: // 'node' - shift(189); // 'node' - break; - case 200: // 'ordered' - shift(200); // 'ordered' - break; - case 204: // 'parent' - shift(204); // 'parent' - break; - case 210: // 'preceding' - shift(210); // 'preceding' - break; - case 211: // 'preceding-sibling' - shift(211); // 'preceding-sibling' - break; - case 214: // 'processing-instruction' - shift(214); // 'processing-instruction' - break; - case 216: // 'rename' - shift(216); // 'rename' - break; - case 217: // 'replace' - shift(217); // 'replace' - break; - case 224: // 'schema-attribute' - shift(224); // 'schema-attribute' - break; - case 225: // 'schema-element' - shift(225); // 'schema-element' - break; - case 227: // 'self' - shift(227); // 'self' - break; - case 233: // 'some' - shift(233); // 'some' - break; - case 241: // 'switch' - shift(241); // 'switch' - break; - case 242: // 'text' - shift(242); // 'text' - break; - case 248: // 'try' - shift(248); // 'try' - break; - case 251: // 'typeswitch' - shift(251); // 'typeswitch' - break; - case 254: // 'unordered' - shift(254); // 'unordered' - break; - case 258: // 'validate' - shift(258); // 'validate' - break; - case 260: // 'variable' - shift(260); // 'variable' - break; - case 272: // 'xquery' - shift(272); // 'xquery' - break; - case 70: // 'allowing' - shift(70); // 'allowing' - break; - case 79: // 'at' - shift(79); // 'at' - break; - case 81: // 'base-uri' - shift(81); // 'base-uri' - break; - case 83: // 'boundary-space' - shift(83); // 'boundary-space' - break; - case 84: // 'break' - shift(84); // 'break' - break; - case 89: // 'catch' - shift(89); // 'catch' - break; - case 96: // 'construction' - shift(96); // 'construction' - break; - case 99: // 'context' - shift(99); // 'context' - break; - case 100: // 'continue' - shift(100); // 'continue' - break; - case 102: // 'copy-namespaces' - shift(102); // 'copy-namespaces' - break; - case 104: // 'decimal-format' - shift(104); // 'decimal-format' - break; - case 123: // 'encoding' - shift(123); // 'encoding' - break; - case 130: // 'exit' - shift(130); // 'exit' - break; - case 131: // 'external' - shift(131); // 'external' - break; - case 139: // 'ft-option' - shift(139); // 'ft-option' - break; - case 152: // 'in' - shift(152); // 'in' - break; - case 153: // 'index' - shift(153); // 'index' - break; - case 159: // 'integrity' - shift(159); // 'integrity' - break; - case 169: // 'lax' - shift(169); // 'lax' - break; - case 190: // 'nodes' - shift(190); // 'nodes' - break; - case 197: // 'option' - shift(197); // 'option' - break; - case 201: // 'ordering' - shift(201); // 'ordering' - break; - case 220: // 'revalidation' - shift(220); // 'revalidation' - break; - case 223: // 'schema' - shift(223); // 'schema' - break; - case 226: // 'score' - shift(226); // 'score' - break; - case 232: // 'sliding' - shift(232); // 'sliding' - break; - case 238: // 'strict' - shift(238); // 'strict' - break; - case 249: // 'tumbling' - shift(249); // 'tumbling' - break; - case 250: // 'type' - shift(250); // 'type' - break; - case 255: // 'updating' - shift(255); // 'updating' - break; - case 259: // 'value' - shift(259); // 'value' - break; - case 261: // 'version' - shift(261); // 'version' - break; - case 265: // 'while' - shift(265); // 'while' - break; - case 95: // 'constraint' - shift(95); // 'constraint' - break; - case 174: // 'loop' - shift(174); // 'loop' - break; - default: - shift(219); // 'returning' - } - eventHandler.endNonterminal("NCName", e0); - } - - function shift(t) - { - if (l1 == t) - { - whitespace(); - eventHandler.terminal(JSONiqTokenizer.TOKEN[l1], b1, e1 > size ? size : e1); - b0 = b1; e0 = e1; l1 = 0; - } - else - { - error(b1, e1, 0, l1, t); - } - } - - function whitespace() - { - if (e0 != b1) - { - b0 = e0; - e0 = b1; - eventHandler.whitespace(b0, e0); - } - } - - function matchW(set) - { - var code; - for (;;) - { - code = match(set); - if (code != 30) // S^WS - { - break; - } - } - return code; - } - - function lookahead1W(set) - { - if (l1 == 0) - { - l1 = matchW(set); - b1 = begin; - e1 = end; - } - } - - function lookahead1(set) - { - if (l1 == 0) - { - l1 = match(set); - b1 = begin; - e1 = end; - } - } - - function error(b, e, s, l, t) - { - throw new self.ParseException(b, e, s, l, t); - } - - var lk, b0, e0; - var l1, b1, e1; - var eventHandler; - - var input; - var size; - var begin; - var end; - - function match(tokenSetId) - { - var nonbmp = false; - begin = end; - var current = end; - var result = JSONiqTokenizer.INITIAL[tokenSetId]; - var state = 0; - - for (var code = result & 4095; code != 0; ) - { - var charclass; - var c0 = current < size ? input.charCodeAt(current) : 0; - ++current; - if (c0 < 0x80) - { - charclass = JSONiqTokenizer.MAP0[c0]; - } - else if (c0 < 0xd800) - { - var c1 = c0 >> 4; - charclass = JSONiqTokenizer.MAP1[(c0 & 15) + JSONiqTokenizer.MAP1[(c1 & 31) + JSONiqTokenizer.MAP1[c1 >> 5]]]; - } - else - { - if (c0 < 0xdc00) - { - var c1 = current < size ? input.charCodeAt(current) : 0; - if (c1 >= 0xdc00 && c1 < 0xe000) - { - ++current; - c0 = ((c0 & 0x3ff) << 10) + (c1 & 0x3ff) + 0x10000; - nonbmp = true; - } - } - var lo = 0, hi = 5; - for (var m = 3; ; m = (hi + lo) >> 1) - { - if (JSONiqTokenizer.MAP2[m] > c0) hi = m - 1; - else if (JSONiqTokenizer.MAP2[6 + m] < c0) lo = m + 1; - else {charclass = JSONiqTokenizer.MAP2[12 + m]; break;} - if (lo > hi) {charclass = 0; break;} - } - } - - state = code; - var i0 = (charclass << 12) + code - 1; - code = JSONiqTokenizer.TRANSITION[(i0 & 15) + JSONiqTokenizer.TRANSITION[i0 >> 4]]; - - if (code > 4095) - { - result = code; - code &= 4095; - end = current; - } - } - - result >>= 12; - if (result == 0) - { - end = current - 1; - var c1 = end < size ? input.charCodeAt(end) : 0; - if (c1 >= 0xdc00 && c1 < 0xe000) --end; - return error(begin, end, state, -1, -1); - } - - if (nonbmp) - { - for (var i = result >> 9; i > 0; --i) - { - --end; - var c1 = end < size ? input.charCodeAt(end) : 0; - if (c1 >= 0xdc00 && c1 < 0xe000) --end; - } - } - else - { - end -= result >> 9; - } - - return (result & 511) - 1; - } -} - -JSONiqTokenizer.getTokenSet = function(tokenSetId) -{ - var set = []; - var s = tokenSetId < 0 ? - tokenSetId : INITIAL[tokenSetId] & 4095; - for (var i = 0; i < 279; i += 32) - { - var j = i; - var i0 = (i >> 5) * 2066 + s - 1; - var i1 = i0 >> 2; - var i2 = i1 >> 2; - var f = JSONiqTokenizer.EXPECTED[(i0 & 3) + JSONiqTokenizer.EXPECTED[(i1 & 3) + JSONiqTokenizer.EXPECTED[(i2 & 3) + JSONiqTokenizer.EXPECTED[i2 >> 2]]]]; - for ( ; f != 0; f >>>= 1, ++j) - { - if ((f & 1) != 0) - { - set.push(JSONiqTokenizer.TOKEN[j]); - } - } - } - return set; -}; - -JSONiqTokenizer.MAP0 = -[ 67, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 37, 31, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 31, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 31, 62, 63, 64, 65, 37 -]; - -JSONiqTokenizer.MAP1 = -[ 108, 124, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 156, 181, 181, 181, 181, 181, 214, 215, 213, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 247, 261, 277, 293, 309, 347, 363, 379, 416, 416, 416, 408, 331, 323, 331, 323, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 433, 433, 433, 433, 433, 433, 433, 316, 331, 331, 331, 331, 331, 331, 331, 331, 394, 416, 416, 417, 415, 416, 416, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 330, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 67, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 37, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 37, 31, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 31, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 31, 62, 63, 64, 65, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 31, 31, 37, 37, 37, 37, 37, 37, 37, 66, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66 -]; - -JSONiqTokenizer.MAP2 = -[ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 37, 31, 37, 31, 31, 37 -]; - -JSONiqTokenizer.INITIAL = -[ 1, 2, 49155, 57348, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 -]; - -JSONiqTokenizer.TRANSITION = -[ 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 17408, 19288, 17439, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 22126, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17672, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 19469, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 36919, 18234, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18419, 18432, 18304, 18448, 18485, 18523, 18553, 18583, 18599, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 18825, 18841, 18871, 18906, 18944, 18960, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19074, 36169, 17439, 36866, 17466, 36890, 36866, 22314, 19105, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 22126, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17672, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 19469, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 36919, 18234, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18419, 18432, 18304, 18448, 18485, 18523, 18553, 18583, 18599, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 18825, 18841, 18871, 18906, 18944, 18960, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22182, 19288, 19121, 36866, 17466, 18345, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19273, 19552, 19304, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19332, 17423, 19363, 36866, 17466, 17537, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 18614, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 19391, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 19427, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36154, 19288, 19457, 36866, 17466, 17740, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22780, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22375, 22197, 18469, 36866, 17466, 36890, 36866, 21991, 24018, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 21331, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 19485, 19501, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19537, 22390, 19568, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19596, 19611, 19457, 36866, 17466, 36890, 36866, 18246, 19627, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22242, 20553, 19457, 36866, 17466, 36890, 36866, 18648, 30477, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36472, 19288, 19457, 36866, 17466, 17809, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 21770, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 19643, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 19672, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 20538, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 17975, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22345, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19726, 19742, 21529, 24035, 23112, 26225, 23511, 27749, 27397, 24035, 34360, 24035, 24036, 23114, 35166, 23114, 23114, 19758, 23511, 35247, 23511, 23511, 28447, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 24254, 19821, 23511, 23511, 23511, 23511, 23512, 19441, 36539, 24035, 24035, 24035, 24035, 19846, 19869, 23114, 23114, 23114, 28618, 32187, 19892, 23511, 23511, 23511, 34585, 20402, 36647, 24035, 24035, 24036, 23114, 33757, 23114, 23114, 23029, 20271, 23511, 27070, 23511, 23511, 30562, 24035, 24035, 29274, 26576, 23114, 23114, 31118, 23036, 29695, 23511, 23511, 32431, 23634, 30821, 24035, 23110, 19913, 23114, 23467, 31261, 23261, 34299, 19932, 24035, 32609, 19965, 35389, 19984, 27689, 19830, 29391, 29337, 20041, 22643, 35619, 33728, 20062, 20121, 20166, 35100, 26145, 20211, 23008, 19876, 20208, 20227, 25670, 20132, 26578, 27685, 20141, 20243, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36094, 19288, 19457, 36866, 17466, 21724, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22735, 19552, 20287, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22750, 19288, 21529, 24035, 23112, 28056, 23511, 29483, 28756, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 20327, 23511, 23511, 23511, 23511, 31156, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 24254, 20371, 23511, 23511, 23511, 23511, 27443, 20395, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 29457, 29700, 23511, 23511, 23511, 23511, 33444, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 28350, 20421, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 20447, 20475, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 20523, 22257, 20569, 20783, 21715, 17603, 20699, 20837, 20614, 20630, 21149, 20670, 21405, 17486, 17509, 17525, 18373, 19179, 20695, 20716, 20732, 20755, 19194, 18042, 21641, 20592, 20779, 20598, 21412, 17470, 17591, 20896, 17468, 17619, 20799, 20700, 21031, 20744, 20699, 20828, 18075, 21259, 20581, 20853, 18048, 20868, 20884, 17756, 17784, 17800, 17825, 17854, 21171, 21200, 20931, 20947, 21378, 20955, 20971, 18086, 20645, 21002, 20986, 18178, 17960, 18012, 18381, 18064, 29176, 21044, 21438, 21018, 21122, 21393, 21060, 21844, 21094, 20654, 17493, 18150, 18166, 18214, 25967, 20763, 21799, 21110, 21830, 21138, 21246, 21301, 18336, 18361, 21165, 21187, 20812, 21216, 21232, 21287, 21317, 18553, 21347, 21363, 21428, 21454, 21271, 21483, 21499, 21515, 21575, 21467, 18712, 21591, 21633, 21078, 18189, 18198, 20679, 21657, 21701, 21074, 21687, 21740, 21756, 21786, 21815, 21860, 21876, 21892, 21946, 21962, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36457, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 36813, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 21981, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 22151, 22007, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 27898, 17884, 18890, 17906, 17928, 22042, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 22070, 22112, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 22142, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36109, 19288, 18469, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22167, 19288, 19457, 36866, 17466, 17768, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22227, 36487, 22273, 36866, 17466, 36890, 36866, 19316, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18749, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 22304, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 19580, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22330, 19089, 19457, 36866, 17466, 18721, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22765, 19347, 19457, 36866, 17466, 36890, 36866, 18114, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34541, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 22540, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29908, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22561, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 23837, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22584, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36442, 19288, 21605, 24035, 23112, 28137, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 31568, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22690, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 27584, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 22659, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22360, 19552, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22675, 22811, 19457, 36866, 17466, 36890, 36866, 19133, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 22827, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36139, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36064, 19288, 22865, 22881, 32031, 22897, 22913, 22956, 29939, 24035, 24035, 24035, 23003, 23114, 23114, 23114, 23024, 22420, 23511, 23511, 23511, 23052, 29116, 23073, 29268, 24035, 25563, 26915, 23106, 23131, 23114, 23114, 23159, 23181, 23197, 23248, 23511, 23511, 23282, 23305, 22493, 32364, 24035, 33472, 30138, 26325, 31770, 33508, 27345, 33667, 23114, 23321, 23473, 23351, 35793, 36576, 23511, 23375, 22500, 24145, 24035, 29197, 20192, 24533, 23440, 23114, 19017, 23459, 22839, 23489, 23510, 23511, 33563, 23528, 32076, 25389, 24035, 26576, 23561, 23583, 23114, 32683, 22516, 23622, 23655, 23511, 23634, 35456, 37144, 23110, 23683, 34153, 20499, 32513, 25824, 23705, 24035, 24035, 23111, 23114, 19874, 27078, 33263, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 20507, 32241, 20150, 31862, 27464, 35108, 23727, 23007, 35895, 34953, 26578, 27685, 20141, 24569, 31691, 19787, 33967, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36427, 19552, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 27027, 26576, 23114, 23114, 23114, 31471, 23756, 22468, 23511, 23511, 23511, 34687, 23772, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 23788, 24035, 24035, 24035, 21559, 23828, 23114, 23114, 23114, 25086, 22839, 23853, 23511, 23511, 23511, 23876, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 31761, 23909, 23953, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36049, 19288, 21605, 30825, 23112, 23987, 23511, 24003, 31001, 27617, 24034, 24035, 24036, 24052, 24089, 23114, 23114, 22420, 24109, 24168, 23511, 23511, 29116, 24188, 27609, 20017, 29516, 24035, 26576, 24222, 19968, 23114, 24252, 33811, 22468, 24270, 33587, 23511, 24320, 27443, 22493, 24035, 24035, 24035, 24035, 24339, 23113, 23114, 23114, 23114, 28128, 28618, 29700, 23511, 23511, 23511, 28276, 34564, 20402, 24035, 24035, 32929, 24036, 23114, 23114, 23114, 24357, 23029, 22839, 23511, 23511, 23511, 24377, 25645, 24035, 34112, 24035, 26576, 23114, 26643, 23114, 32683, 22516, 23511, 25638, 23511, 23711, 24035, 24395, 27809, 23114, 24414, 20499, 24432, 30917, 23628, 24035, 30680, 23111, 23114, 30233, 27078, 25748, 24452, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 24475, 19829, 26577, 26597, 26154, 24519, 24556, 24596, 23007, 20046, 20132, 26578, 24634, 20141, 24569, 31691, 24679, 24727, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36412, 19288, 21605, 19943, 34861, 32618, 26027, 29483, 32016, 32050, 36233, 24776, 35574, 24801, 24819, 32671, 31289, 22420, 24868, 24886, 20087, 26849, 29116, 19803, 24035, 24035, 24035, 36228, 26576, 23114, 23114, 23114, 24981, 33811, 22468, 23511, 23511, 23511, 29028, 27443, 22493, 24923, 27965, 24035, 24035, 32797, 24946, 23443, 23114, 23114, 29636, 24997, 22849, 28252, 23511, 23511, 23511, 25042, 25110, 24035, 24035, 34085, 24036, 25133, 23114, 23114, 25152, 23029, 22839, 25169, 23511, 36764, 23511, 25645, 30403, 24035, 25186, 26576, 31806, 24093, 25212, 32683, 22516, 32713, 26245, 34293, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 32406, 23111, 23114, 28676, 30944, 27689, 25234, 24035, 23112, 19872, 37063, 23266, 24036, 23114, 30243, 20379, 26100, 29218, 20211, 30105, 25257, 25284, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 24834, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36034, 19288, 21671, 25314, 25072, 25330, 25346, 25362, 29939, 29951, 35288, 29984, 23812, 27216, 25405, 25424, 30456, 22584, 26292, 25461, 25480, 31592, 29116, 25516, 34963, 25545, 27007, 25579, 33937, 25614, 25661, 25686, 34872, 25702, 25718, 25734, 25769, 25795, 25811, 25840, 22493, 26533, 25856, 24035, 25876, 30763, 27481, 25909, 23114, 28987, 25936, 25954, 29700, 25983, 23511, 31412, 26043, 26063, 22568, 29241, 29592, 26116, 31216, 35383, 26170, 34783, 26194, 26221, 22839, 26241, 26261, 22477, 26283, 26308, 27306, 31035, 24655, 26576, 29854, 33386, 26341, 32683, 22516, 32153, 30926, 26361, 19996, 26381, 35463, 26397, 26424, 34646, 26478, 35605, 31386, 26494, 35567, 31964, 22940, 23689, 25218, 30309, 32289, 19830, 33605, 23112, 32109, 27733, 27084, 24496, 35886, 35221, 26525, 36602, 26549, 26558, 26574, 26594, 26613, 26629, 26666, 26700, 26578, 27685, 23740, 24285, 31691, 26733, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36397, 19552, 18991, 25887, 28117, 32618, 26776, 29483, 29939, 26802, 24035, 24035, 24036, 28664, 23114, 23114, 23114, 22420, 30297, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 25559, 26576, 23114, 23114, 23114, 30525, 33811, 22468, 23511, 23511, 23511, 28725, 27443, 22493, 24035, 24035, 27249, 24035, 24035, 23113, 23114, 23114, 26827, 23114, 28618, 29700, 23511, 23511, 26845, 23511, 34564, 20402, 24035, 24035, 26979, 24036, 23114, 23114, 23114, 24974, 23029, 22839, 23511, 23511, 23511, 26865, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 33305, 24035, 25598, 23114, 19874, 34253, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 26886, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 26931, 24569, 26439, 26947, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36019, 19288, 26995, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 27043, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 27061, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 29978, 24035, 24035, 23113, 23114, 33114, 23114, 23114, 30010, 29700, 23511, 35913, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 27155, 26576, 23114, 23114, 30447, 23036, 29695, 23511, 23511, 30935, 20099, 24152, 25529, 27100, 34461, 27121, 22625, 29156, 26009, 27137, 30422, 31903, 31655, 28870, 27171, 32439, 31731, 19830, 27232, 22612, 27265, 26786, 25494, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 20342, 27288, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 27322, 27339, 28020, 27361, 27382, 29939, 24035, 24035, 32581, 24036, 23114, 23114, 23114, 27425, 22420, 23511, 23511, 23511, 27442, 28306, 19803, 24035, 24035, 24035, 24035, 26710, 23114, 23114, 23114, 23114, 32261, 22468, 23511, 23511, 23511, 23511, 35719, 24694, 29510, 24035, 24035, 24035, 24035, 26717, 23114, 23114, 23114, 23114, 28618, 32217, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 27459, 23114, 23114, 23114, 36252, 23029, 20271, 23511, 23511, 23511, 28840, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 27480, 34483, 28401, 29761, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36382, 19288, 21605, 27497, 27517, 28504, 28898, 27569, 29939, 29401, 27600, 27323, 27633, 19025, 27662, 23114, 27705, 22420, 20483, 27721, 23511, 27765, 28306, 19803, 23540, 24035, 24610, 27781, 27805, 26650, 23114, 28573, 32990, 25920, 22468, 26870, 23511, 26684, 34262, 34737, 25057, 34622, 24035, 24035, 23971, 24206, 27825, 27847, 23114, 23114, 27865, 27885, 35766, 27914, 23511, 23511, 32766, 32844, 27934, 28795, 26909, 27955, 26092, 27988, 25445, 28005, 28036, 28052, 21965, 23511, 32196, 19897, 28072, 28102, 36534, 21541, 23801, 28153, 28180, 28197, 28221, 23036, 32695, 28251, 28268, 28292, 23667, 34825, 23930, 24580, 28322, 28344, 31627, 28366, 25996, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 35625, 33477, 33359, 27674, 28393, 33992, 24036, 23114, 30243, 19829, 28417, 28433, 28463, 23008, 19876, 20208, 23007, 20046, 20132, 28489, 28520, 20141, 24569, 31691, 19787, 28550, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 28589, 24035, 24035, 24035, 24035, 28608, 23114, 23114, 23114, 23114, 28618, 20431, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36004, 19288, 28634, 31951, 28565, 28702, 28718, 28741, 32544, 20175, 28792, 32086, 20105, 28811, 29059, 29862, 28856, 22420, 28886, 30354, 23359, 28922, 28306, 28952, 23888, 26320, 36506, 24035, 29331, 28968, 36609, 23114, 29003, 31661, 27061, 30649, 27366, 23511, 29023, 27918, 24694, 24035, 24035, 23893, 33094, 30867, 23113, 23114, 23114, 29044, 34184, 30010, 29700, 23511, 23511, 29081, 29102, 34585, 20402, 27789, 24035, 24035, 24036, 23114, 29132, 23114, 23114, 23029, 20271, 23511, 29153, 23511, 23511, 30562, 30174, 24035, 24035, 27409, 25438, 23114, 23114, 29172, 36668, 31332, 23511, 23511, 29192, 30144, 24035, 23110, 30203, 23114, 23467, 31544, 23261, 23628, 24035, 22545, 23111, 23114, 29213, 27078, 27689, 29234, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 29257, 23008, 19876, 20208, 28768, 29290, 29320, 34776, 29353, 20141, 22435, 29378, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36367, 19288, 21605, 34616, 19006, 32618, 31497, 31507, 36216, 20184, 24035, 34393, 29424, 34668, 23114, 34900, 29447, 22420, 30360, 23511, 37089, 29473, 28306, 19803, 29499, 24398, 24035, 24035, 26576, 31799, 29532, 29550, 23114, 33811, 22468, 32298, 29571, 31184, 23511, 23512, 37127, 36628, 29589, 24035, 24135, 24035, 23113, 29608, 23114, 27831, 29634, 28618, 29652, 30037, 23511, 24172, 29671, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 29555, 29690, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 29719, 24035, 23110, 29738, 23114, 23467, 34035, 29756, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 29777, 34364, 28181, 30243, 29799, 31920, 27272, 27185, 23008, 31126, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29828, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35989, 19552, 19687, 35139, 28649, 29878, 29894, 29924, 29939, 23224, 23085, 31969, 24036, 35173, 24752, 24803, 23114, 22420, 31190, 30318, 24870, 23511, 28306, 29967, 23967, 24035, 24035, 24035, 26576, 30000, 23114, 23114, 23114, 33811, 22468, 30026, 23511, 23511, 23511, 23512, 26078, 24035, 24035, 24035, 30053, 37137, 30071, 23114, 23114, 33368, 25136, 28618, 30723, 23511, 23511, 37096, 31356, 34585, 20402, 30092, 30127, 30160, 24036, 35740, 30219, 24960, 30259, 23029, 20271, 34042, 30285, 30342, 30376, 23289, 30055, 30400, 30419, 30438, 32640, 33532, 33514, 30472, 18792, 26267, 24323, 23057, 30493, 23639, 20008, 30196, 33188, 30517, 20075, 23511, 30541, 23628, 30578, 33928, 28776, 30594, 19874, 30610, 30637, 19830, 30677, 27646, 19872, 25779, 23266, 23232, 35016, 30243, 30696, 29812, 30712, 30746, 27206, 30779, 30807, 23007, 33395, 20132, 26578, 27685, 31703, 22928, 31691, 19787, 31079, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36352, 19288, 23335, 30841, 26131, 30888, 30904, 30986, 29939, 24035, 24704, 31017, 20025, 23114, 26178, 31051, 31095, 22420, 23511, 22524, 31142, 31172, 28534, 31206, 35497, 25196, 24035, 28592, 24503, 23114, 31239, 31285, 23114, 31305, 31321, 31355, 31372, 31407, 23511, 30556, 24694, 24035, 27501, 19805, 24035, 24035, 23113, 23114, 31428, 24066, 23114, 28618, 29700, 23511, 31837, 18809, 23511, 34585, 31448, 24035, 24035, 24035, 23090, 23114, 23114, 23114, 23114, 31619, 35038, 23511, 23511, 23511, 23511, 33714, 24035, 33085, 24035, 29431, 23114, 31467, 23114, 23143, 31487, 23511, 31523, 23511, 35195, 36783, 24035, 30111, 23567, 23114, 23467, 31543, 31560, 23628, 24035, 24035, 23111, 23114, 19874, 30953, 31584, 34508, 24035, 31608, 26345, 37055, 23266, 31643, 31677, 31719, 31747, 31786, 31822, 26898, 23008, 19876, 31859, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 31878, 31936, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35974, 19288, 21605, 27972, 35663, 31985, 29655, 32001, 36715, 24785, 25893, 23545, 31912, 19853, 19916, 25938, 24540, 22420, 31843, 29674, 29573, 32735, 28936, 19803, 24035, 24035, 32047, 24035, 26576, 23114, 23114, 27544, 23114, 33811, 22468, 23511, 23511, 32161, 23511, 23512, 32066, 24035, 33313, 24035, 24035, 24035, 23113, 27426, 32102, 23114, 23114, 28618, 32125, 23511, 32144, 23511, 23511, 33569, 20402, 24035, 27045, 24035, 24036, 23114, 23114, 28328, 23114, 30076, 32177, 23511, 23511, 30384, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23595, 32212, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 22635, 25753, 32233, 32257, 32277, 19829, 26577, 26597, 20211, 23008, 19876, 32322, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 32352, 35285, 32380, 34196, 33016, 30661, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 32404, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 32422, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 30269, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 19949, 24035, 23111, 32455, 19874, 31269, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36337, 19552, 19209, 21617, 26509, 32475, 32491, 32529, 29939, 24035, 32578, 25241, 32597, 23114, 32634, 29007, 32656, 22420, 23511, 32729, 26365, 32751, 28306, 32788, 32882, 24035, 24035, 32813, 36727, 23114, 33182, 23114, 27553, 33235, 32829, 23511, 32706, 23511, 28906, 28377, 26962, 32881, 32904, 32898, 32920, 24035, 32953, 23114, 32977, 26408, 23114, 28164, 33006, 23511, 33039, 35774, 23511, 32306, 20402, 33076, 30872, 24035, 24036, 25408, 33110, 28979, 23114, 23029, 20271, 35835, 33130, 33054, 23511, 30562, 33148, 24035, 24035, 33167, 23114, 23114, 33775, 23036, 20459, 23511, 23511, 25464, 24646, 24035, 24035, 22446, 23114, 23114, 25627, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 31391, 33204, 33220, 33251, 33287, 26577, 26597, 20211, 33329, 19876, 33345, 23007, 20046, 20132, 26578, 27685, 28473, 22599, 31691, 33411, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35959, 19288, 21907, 27243, 29843, 32618, 33427, 31507, 29939, 33460, 34090, 24035, 24036, 33493, 24416, 33530, 23114, 22420, 33548, 24379, 33585, 23511, 28306, 19803, 33603, 24202, 24035, 24035, 25593, 33749, 28205, 23114, 23114, 32388, 22468, 33853, 33060, 23511, 23511, 31339, 33621, 24035, 24035, 34397, 24618, 30757, 33663, 23114, 23114, 33683, 35684, 28618, 26678, 23511, 23511, 32506, 33699, 34585, 20402, 24035, 32562, 26973, 24036, 23114, 23114, 33377, 33773, 23029, 20271, 23511, 23511, 30621, 23511, 23860, 24035, 33791, 21553, 26576, 36558, 23114, 33809, 23036, 32857, 26047, 23511, 33827, 23634, 24035, 24035, 23110, 23114, 23114, 31252, 23511, 33845, 23628, 24035, 24459, 23111, 23114, 33869, 27078, 30791, 29783, 24035, 24742, 19872, 33895, 23266, 26462, 19710, 33879, 33919, 26577, 26597, 24123, 24930, 21930, 20208, 30501, 33953, 25268, 20252, 33983, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36322, 19552, 23390, 33634, 35154, 34008, 34024, 34058, 35544, 34106, 34128, 26811, 33151, 34144, 34169, 34212, 23114, 34228, 34244, 34278, 34315, 23511, 34331, 34347, 34380, 34413, 24035, 24663, 26576, 34429, 34453, 34477, 29534, 33811, 22468, 34499, 34524, 34557, 25170, 34580, 35436, 23937, 34601, 24035, 24341, 26453, 23113, 34638, 34662, 23114, 24236, 28618, 34684, 34703, 34729, 23511, 35352, 34753, 34799, 24035, 34815, 32558, 34848, 34888, 35814, 34923, 23165, 29137, 23606, 30326, 30730, 34939, 33023, 30562, 36848, 34979, 24035, 24847, 34996, 23114, 23114, 35032, 29695, 35054, 23511, 23511, 35091, 33296, 35124, 24296, 28235, 24361, 36276, 32772, 35067, 35189, 27301, 30855, 24852, 22452, 35211, 35237, 35316, 25500, 35270, 23405, 24304, 35304, 29362, 24036, 23114, 35332, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 35368, 28823, 23920, 32336, 35405, 20141, 24569, 31691, 35421, 35479, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35944, 22795, 21605, 33647, 35877, 35513, 30962, 35529, 34073, 35557, 24035, 24035, 20405, 31107, 23114, 23114, 23114, 35590, 34713, 23511, 23511, 23511, 35641, 19803, 29408, 32937, 25298, 24035, 35657, 23115, 27849, 24760, 35679, 26205, 22468, 23511, 35700, 24907, 24901, 35075, 31893, 34980, 24035, 24035, 24035, 24035, 23113, 35009, 23114, 23114, 23114, 28618, 35716, 30970, 23511, 23511, 23511, 34585, 23215, 24035, 24035, 24035, 24036, 35735, 23114, 23114, 23114, 27105, 35756, 35790, 23511, 23511, 23511, 35254, 35446, 24035, 24035, 31223, 35809, 23114, 23114, 23036, 36825, 35830, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 31031, 20355, 19872, 33903, 23266, 24036, 23114, 28686, 19829, 26577, 26597, 20211, 23008, 23424, 20208, 24711, 31065, 24486, 26578, 27685, 20141, 19773, 35851, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36307, 19288, 21605, 35494, 19702, 32618, 33437, 31507, 29939, 25117, 24035, 27939, 24036, 27869, 23114, 26829, 23114, 22420, 23494, 23511, 33132, 23511, 28306, 19803, 24035, 34832, 24035, 24035, 26576, 23114, 25153, 23114, 23114, 33811, 22468, 23511, 23511, 35911, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35929, 19288, 21605, 25860, 23112, 36185, 23511, 36201, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 26748, 24035, 24035, 24035, 24035, 24035, 36249, 23114, 23114, 23114, 23114, 28618, 28835, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 27151, 24035, 26760, 23114, 27989, 23114, 23114, 36268, 20271, 23511, 24436, 23511, 29703, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36292, 19288, 21605, 36503, 21922, 32618, 34534, 31507, 36522, 24035, 33793, 24035, 35864, 23114, 23114, 36555, 23417, 22420, 23511, 23511, 36574, 26020, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 36592, 24035, 24035, 36625, 24035, 24035, 23113, 23114, 32961, 23114, 23114, 29618, 29700, 23511, 29086, 23511, 23511, 34585, 20402, 36644, 24035, 24035, 24036, 29740, 23114, 23114, 23114, 29065, 36663, 31527, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 31451, 23112, 36684, 23511, 36700, 29939, 24035, 24035, 24035, 30185, 23114, 23114, 23114, 27526, 22420, 23511, 23511, 23511, 32865, 28306, 19803, 36743, 24035, 27017, 24035, 26576, 27535, 23114, 31432, 23114, 33811, 22468, 33271, 23511, 32128, 23511, 23512, 24694, 24035, 27196, 24035, 24035, 24035, 23113, 32459, 23114, 23114, 23114, 28618, 29700, 33829, 36762, 23511, 23511, 34585, 20402, 24035, 36746, 24035, 29722, 23114, 23114, 34437, 23114, 34907, 20271, 23511, 23511, 18801, 23511, 23206, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 36837, 24035, 24035, 33739, 23114, 23114, 25094, 23511, 23261, 23628, 24035, 36780, 23111, 24073, 19874, 27078, 35344, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22720, 19288, 36799, 36866, 17466, 36890, 36864, 21991, 22211, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 17631, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 36883, 36906, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22705, 19288, 19457, 36866, 17466, 36890, 36866, 19375, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36124, 19288, 36951, 36866, 17466, 36890, 36866, 21991, 22404, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18567, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 36979, 36995, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36139, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18027, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36139, 19288, 21529, 24035, 23112, 23033, 23511, 31507, 25377, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 37040, 23511, 23511, 23511, 23511, 28086, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 24254, 37079, 23511, 23511, 23511, 23511, 23512, 34766, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 37112, 37160, 18469, 36866, 17466, 36890, 36866, 17656, 37174, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18537, 22984, 17553, 17572, 22285, 18780, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 36883, 36906, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 127011, 110630, 114730, 106539, 127011, 127011, 127011, 53264, 18, 18, 0, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 0, 0, 127011, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2170880, 2170880, 2170880, 3002368, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2576384, 2215936, 2215936, 2215936, 2416640, 2424832, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2543616, 2215936, 2215936, 2215936, 2215936, 2215936, 2629632, 2215936, 2617344, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2691072, 2215936, 2707456, 2215936, 2715648, 2215936, 2723840, 2764800, 2215936, 2215936, 2797568, 2215936, 2822144, 2215936, 2215936, 2854912, 2215936, 2215936, 2215936, 2912256, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 180224, 0, 0, 2174976, 0, 0, 2170880, 2617344, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2691072, 2170880, 2707456, 2170880, 2715648, 2170880, 2723840, 2764800, 2170880, 2170880, 2797568, 2170880, 2170880, 2797568, 2170880, 2822144, 2170880, 2170880, 2854912, 2170880, 2170880, 2170880, 2912256, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2609152, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2654208, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 184599, 280, 0, 2174976, 0, 0, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 544, 0, 546, 0, 0, 2179072, 0, 0, 0, 552, 0, 0, 2170880, 2170880, 2170880, 3117056, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2158592, 2158592, 2232320, 2232320, 0, 2240512, 2240512, 0, 0, 0, 644, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3129344, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2400256, 2215936, 2215936, 2215936, 2215936, 2711552, 2170880, 2170880, 2170880, 2170880, 2170880, 2760704, 2768896, 2789376, 2813952, 2170880, 2170880, 2170880, 2875392, 2904064, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2453504, 2457600, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 167936, 0, 0, 0, 0, 2174976, 0, 0, 2215936, 2215936, 2514944, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2592768, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 32768, 0, 0, 0, 0, 0, 2174976, 32768, 0, 2633728, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2711552, 2215936, 2215936, 2215936, 2215936, 2215936, 2760704, 2768896, 2789376, 2813952, 2215936, 2215936, 2215936, 2875392, 2904064, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 0, 65819, 2215936, 2215936, 3031040, 2215936, 3055616, 2215936, 2215936, 2215936, 2215936, 3092480, 2215936, 2215936, 3125248, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3002368, 2215936, 2215936, 2170880, 2170880, 2494464, 2170880, 2170880, 0, 0, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3198976, 2215936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2379776, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2445312, 2170880, 2465792, 2473984, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2523136, 2170880, 2170880, 2641920, 2170880, 2170880, 2170880, 2699264, 2170880, 2727936, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2879488, 2170880, 2916352, 2170880, 2170880, 2170880, 2879488, 2170880, 2916352, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3026944, 2170880, 2170880, 3063808, 2170880, 2170880, 3112960, 2170880, 2170880, 3133440, 2170880, 2170880, 3112960, 2170880, 2170880, 3133440, 2170880, 2170880, 2170880, 3162112, 2170880, 2170880, 3182592, 3186688, 2170880, 2379776, 2215936, 2523136, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2596864, 2215936, 2621440, 2215936, 2215936, 2641920, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 548, 0, 0, 0, 0, 287, 2170880, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3117056, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2699264, 2215936, 2727936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2879488, 2215936, 2916352, 2215936, 2215936, 0, 0, 0, 0, 188416, 0, 2179072, 0, 0, 0, 0, 0, 287, 2170880, 0, 2171019, 2171019, 2171019, 2400395, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3031179, 2171019, 3055755, 2171019, 2171019, 2215936, 3133440, 2215936, 2215936, 2215936, 3162112, 2215936, 2215936, 3182592, 3186688, 2215936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2523275, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2597003, 2171019, 2621579, 2170880, 2170880, 2170880, 3162112, 2170880, 2170880, 3182592, 3186688, 2170880, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 24, 0, 4337664, 28, 2170880, 2170880, 2170880, 2629632, 2170880, 2170880, 2170880, 2170880, 2719744, 2744320, 2170880, 2170880, 2170880, 2834432, 2838528, 2170880, 2908160, 2170880, 2170880, 2936832, 2215936, 2215936, 2215936, 2215936, 2719744, 2744320, 2215936, 2215936, 2215936, 2834432, 2838528, 2215936, 2908160, 2215936, 2215936, 2936832, 2215936, 2215936, 2985984, 2215936, 2994176, 2215936, 2215936, 3014656, 2215936, 3059712, 3076096, 3088384, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2445312, 2215936, 2465792, 2473984, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2171166, 2171166, 2171166, 2171166, 2171166, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171019, 2171019, 2494603, 2171019, 2171019, 2215936, 2215936, 2215936, 3215360, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2379776, 2170880, 2170880, 2170880, 2170880, 2985984, 2170880, 2994176, 2170880, 2170880, 3016168, 2170880, 3059712, 3076096, 3088384, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 124, 124, 0, 128, 128, 2170880, 2170880, 2170880, 3215360, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2486272, 2170880, 2170880, 2506752, 2170880, 2170880, 2170880, 2535424, 2539520, 2170880, 2170880, 2588672, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2920448, 2170880, 2170880, 2170880, 2990080, 2170880, 2170880, 2170880, 2170880, 3051520, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3170304, 0, 2387968, 2392064, 2170880, 2170880, 2433024, 2170880, 2170880, 2170880, 3170304, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2486272, 2215936, 2215936, 2506752, 2215936, 2215936, 2215936, 2535424, 2539520, 2215936, 2215936, 2588672, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 136, 0, 2215936, 2215936, 2920448, 2215936, 2215936, 2215936, 2990080, 2215936, 2215936, 2215936, 2215936, 3051520, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3108864, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3026944, 2215936, 2215936, 3063808, 2215936, 2215936, 3112960, 2215936, 2215936, 2215936, 3170304, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2453504, 2457600, 2170880, 2170880, 2170880, 2486272, 2170880, 2170880, 2506752, 2170880, 2170880, 2170880, 2537049, 2539520, 2170880, 2170880, 2588672, 2170880, 2170880, 2170880, 1508, 2170880, 2170880, 2170880, 1512, 2170880, 2920448, 2170880, 2170880, 2170880, 2990080, 2170880, 2170880, 2170880, 2461696, 2170880, 2170880, 2170880, 2510848, 2170880, 2170880, 2170880, 2170880, 2580480, 2170880, 2605056, 2637824, 2170880, 2170880, 18, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2686976, 2748416, 2170880, 2170880, 2170880, 2924544, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3121152, 2170880, 2170880, 3145728, 3158016, 3166208, 2170880, 2420736, 2428928, 2170880, 2478080, 2170880, 2170880, 2170880, 2170880, 0, 0, 2170880, 2170880, 2170880, 2170880, 2646016, 2670592, 0, 0, 3145728, 3158016, 3166208, 2387968, 2392064, 2215936, 2215936, 2433024, 2215936, 2461696, 2215936, 2215936, 2215936, 2510848, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 0, 2170880, 2215936, 2215936, 2580480, 2215936, 2605056, 2637824, 2215936, 2215936, 2686976, 2748416, 2215936, 2215936, 2215936, 2924544, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 286, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 3121152, 2215936, 2215936, 3145728, 3158016, 3166208, 2387968, 2392064, 2170880, 2170880, 2433024, 2170880, 2461696, 2170880, 2170880, 2170880, 2510848, 2170880, 2170880, 1625, 2170880, 2170880, 2580480, 2170880, 2605056, 2637824, 2170880, 647, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2576384, 2170880, 2170880, 2170880, 2170880, 2170880, 2609152, 2170880, 2170880, 2686976, 0, 0, 2748416, 2170880, 2170880, 0, 2170880, 2924544, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 0, 0, 28, 28, 2170880, 3141632, 2215936, 2420736, 2428928, 2215936, 2478080, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2646016, 2670592, 2752512, 2756608, 2846720, 2961408, 2215936, 2998272, 2215936, 3010560, 2215936, 2215936, 2215936, 3141632, 2170880, 2420736, 2428928, 2752512, 2756608, 0, 2846720, 2961408, 2170880, 2998272, 2170880, 3010560, 2170880, 2170880, 2170880, 3141632, 2170880, 2170880, 2490368, 2215936, 2490368, 2215936, 2215936, 2215936, 2547712, 2555904, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 245760, 0, 3129344, 2170880, 2170880, 2490368, 2170880, 2170880, 2170880, 0, 0, 2547712, 2555904, 2170880, 2170880, 2170880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 45056, 0, 2584576, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2170880, 2170880, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 0, 1482, 97, 97, 97, 97, 97, 97, 97, 1354, 97, 97, 97, 97, 97, 97, 97, 97, 1148, 97, 97, 97, 97, 97, 97, 97, 2584576, 2170880, 2170880, 1512, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2441216, 2170880, 2527232, 2170880, 2600960, 2170880, 2850816, 2170880, 2170880, 2170880, 3022848, 2215936, 2441216, 2215936, 2527232, 2215936, 2600960, 2215936, 2850816, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 287, 2170880, 2215936, 3022848, 2170880, 2441216, 2170880, 2527232, 0, 0, 2170880, 2600960, 2170880, 0, 2850816, 2170880, 2170880, 2170880, 2170880, 2170880, 2523136, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2596864, 2170880, 2621440, 2170880, 2170880, 2641920, 2170880, 2170880, 2170880, 3022848, 2170880, 2519040, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2519040, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 2453504, 2457600, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2514944, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2592768, 2170880, 2170880, 2519040, 0, 2024, 2170880, 2170880, 0, 2170880, 2170880, 2170880, 2396160, 2170880, 2170880, 2170880, 2170880, 3018752, 2396160, 2215936, 2215936, 2215936, 2215936, 3018752, 2396160, 0, 2024, 2170880, 2170880, 2170880, 2170880, 3018752, 2170880, 2650112, 2965504, 2170880, 2215936, 2650112, 2965504, 2215936, 0, 0, 2170880, 2650112, 2965504, 2170880, 2551808, 2170880, 2551808, 2215936, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 141, 45, 45, 67, 67, 67, 67, 67, 224, 67, 67, 238, 67, 67, 67, 67, 67, 67, 67, 1288, 67, 67, 67, 67, 67, 67, 67, 67, 67, 469, 67, 67, 67, 67, 67, 67, 0, 2551808, 2170880, 2170880, 2215936, 0, 2170880, 2170880, 2215936, 0, 2170880, 2170880, 2215936, 0, 2170880, 2977792, 2977792, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 29, 102432, 127011, 110630, 114730, 106539, 127011, 127011, 127011, 53264, 18, 18, 49172, 0, 0, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 0, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 136, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 4256099, 4256099, 24, 24, 0, 28, 28, 2170880, 2461696, 2170880, 2170880, 2170880, 2510848, 2170880, 2170880, 0, 2170880, 2170880, 2580480, 2170880, 2605056, 2637824, 2170880, 2170880, 2170880, 2547712, 2555904, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3129344, 2215936, 2215936, 543, 543, 545, 545, 0, 0, 2179072, 0, 550, 551, 551, 0, 287, 2171166, 2171166, 18, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 645, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 149, 2584576, 2170880, 2170880, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2441216, 2170880, 2527232, 2170880, 2600960, 2519040, 0, 0, 2170880, 2170880, 0, 2170880, 2170880, 2170880, 2396160, 2170880, 2170880, 2170880, 2170880, 3018752, 2396160, 2215936, 2215936, 2215936, 2215936, 3018752, 2396160, 0, 0, 2170880, 2170880, 2170880, 2170880, 3018752, 2170880, 2650112, 2965504, 53264, 18, 49172, 57366, 24, 155648, 28, 102432, 155648, 155687, 114730, 106539, 0, 0, 155648, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 0, 0, 0, 0, 2220032, 0, 94208, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 208896, 18, 278528, 24, 24, 0, 28, 28, 53264, 18, 159765, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 0, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 139394, 28, 28, 102432, 131, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 32768, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 546, 0, 0, 2183168, 0, 0, 552, 832, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2170880, 2609152, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2654208, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3198976, 2215936, 0, 1084, 0, 1088, 0, 1092, 0, 0, 0, 0, 0, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 937, 0, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 644, 0, 0, 0, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 826, 0, 828, 0, 0, 2183168, 0, 0, 830, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2592768, 2170880, 2170880, 2170880, 2170880, 2633728, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2711552, 2170880, 2170880, 2170880, 2170880, 2170880, 2760704, 53264, 18, 49172, 57366, 24, 8192, 28, 172066, 172032, 110630, 172066, 106539, 0, 0, 172032, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 16384, 28, 28, 28, 28, 102432, 0, 98304, 0, 0, 2220032, 110630, 0, 0, 0, 0, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 45056, 0, 0, 0, 53264, 18, 49172, 57366, 25, 8192, 30, 102432, 0, 110630, 114730, 106539, 0, 0, 176219, 53264, 18, 18, 49172, 0, 57366, 0, 124, 124, 124, 0, 128, 128, 128, 128, 102432, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 0, 546, 0, 0, 2183168, 0, 65536, 552, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2646016, 2670592, 2752512, 2756608, 2846720, 2961408, 2170880, 2998272, 2170880, 3010560, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3198976, 2215936, 0, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 143, 45, 45, 67, 67, 67, 67, 67, 227, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1824, 67, 1826, 67, 67, 67, 67, 17, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 32768, 120, 121, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 67, 67, 37139, 37139, 24853, 24853, 0, 0, 2179072, 548, 0, 65820, 65820, 0, 287, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 2033, 45, 67, 67, 67, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 978, 0, 546, 70179, 0, 2183168, 0, 0, 552, 0, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1013, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 473, 67, 67, 67, 67, 483, 67, 67, 1025, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1119, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1359, 97, 97, 97, 67, 67, 1584, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 497, 67, 67, 1659, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1667, 45, 45, 45, 45, 45, 169, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1668, 45, 45, 45, 45, 67, 67, 1694, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 774, 67, 67, 1713, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 1723, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 1538, 45, 45, 45, 45, 45, 1559, 45, 45, 1561, 45, 45, 45, 45, 45, 45, 45, 687, 45, 45, 45, 45, 45, 45, 45, 45, 448, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1771, 1772, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 67, 67, 67, 67, 67, 1821, 67, 67, 67, 67, 67, 67, 1827, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 1614, 97, 97, 97, 97, 97, 603, 97, 97, 605, 97, 97, 608, 97, 97, 97, 97, 0, 1532, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 450, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 1839, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 1883, 97, 1885, 97, 0, 1888, 0, 97, 97, 0, 97, 97, 1848, 97, 97, 97, 97, 1852, 45, 45, 45, 45, 45, 45, 45, 384, 391, 45, 45, 45, 45, 45, 45, 45, 385, 45, 45, 45, 45, 45, 45, 45, 45, 1237, 45, 45, 45, 45, 45, 45, 67, 0, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 1951, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1963, 97, 2023, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 1994, 67, 1995, 67, 67, 67, 67, 67, 67, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 0, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 137, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2793472, 2805760, 2170880, 2830336, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3031040, 2170880, 3055616, 2170880, 2170880, 67, 67, 37139, 37139, 24853, 24853, 0, 0, 281, 549, 0, 65820, 65820, 0, 287, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 2031, 2032, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1769, 67, 0, 546, 70179, 549, 549, 0, 0, 552, 0, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1858, 45, 641, 0, 0, 0, 0, 41606, 926, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 456, 67, 0, 0, 0, 1313, 0, 0, 0, 1096, 1319, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1110, 97, 97, 97, 97, 67, 67, 67, 67, 1301, 1476, 0, 0, 0, 0, 1307, 1478, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1486, 97, 1487, 97, 1313, 1480, 0, 0, 0, 0, 1319, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 566, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1476, 0, 1478, 0, 1480, 0, 97, 97, 97, 97, 97, 97, 97, 45, 1853, 45, 1855, 45, 45, 45, 45, 53264, 18, 49172, 57366, 26, 8192, 31, 102432, 0, 110630, 114730, 106539, 0, 0, 225368, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 32768, 53264, 18, 18, 49172, 163840, 57366, 0, 24, 24, 229376, 0, 28, 28, 28, 229376, 102432, 0, 0, 0, 0, 2220167, 110630, 0, 0, 0, 114730, 106539, 0, 2171019, 2171019, 2171019, 2171019, 2592907, 2171019, 2171019, 2171019, 2171019, 2633867, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2654347, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3117195, 2171019, 2171019, 2171019, 2171019, 2240641, 0, 0, 0, 0, 0, 0, 0, 0, 368, 0, 140, 2171019, 2171019, 2171019, 2416779, 2424971, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2617483, 2171019, 2171019, 2642059, 2171019, 2171019, 2171019, 2699403, 2171019, 2728075, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3215499, 2215936, 2215936, 2215936, 2215936, 2215936, 2437120, 2215936, 2215936, 2171019, 2822283, 2171019, 2171019, 2855051, 2171019, 2171019, 2171019, 2912395, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3002507, 2171019, 2171019, 2215936, 2215936, 2494464, 2215936, 2215936, 2215936, 2171166, 2171166, 2416926, 2425118, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2576670, 2171166, 2617630, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2691358, 2171166, 2707742, 2171166, 2715934, 2171166, 2724126, 2765086, 2171166, 2171166, 2797854, 2171166, 2822430, 2171166, 2171166, 2855198, 2171166, 2171166, 2171166, 2912542, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2793758, 2806046, 2171166, 2830622, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3109150, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2543902, 2171166, 2171166, 2171166, 2171166, 2171166, 2629918, 2793611, 2805899, 2171019, 2830475, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 0, 546, 0, 0, 2183168, 0, 0, 552, 0, 2171166, 2171166, 2171166, 2400542, 2171166, 2171166, 2171166, 0, 2171166, 2171166, 2171166, 0, 2171166, 2920734, 2171166, 2171166, 2171166, 2990366, 2171166, 2171166, 2171166, 2171166, 3117342, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 0, 53264, 0, 18, 18, 4329472, 2232445, 0, 2240641, 4337664, 2711691, 2171019, 2171019, 2171019, 2171019, 2171019, 2760843, 2769035, 2789515, 2814091, 2171019, 2171019, 2171019, 2875531, 2904203, 2171019, 2171019, 3092619, 2171019, 2171019, 3125387, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3199115, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2453504, 2457600, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2793472, 2805760, 2215936, 2830336, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2494464, 2170880, 2170880, 2171166, 2171166, 2634014, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2711838, 2171166, 2171166, 2171166, 2171166, 2171166, 2760990, 2769182, 2789662, 2814238, 2171166, 2171166, 2171166, 2875678, 2904350, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3199262, 2171166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2379915, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2445451, 2171019, 2465931, 2474123, 2171019, 2171019, 3113099, 2171019, 2171019, 3133579, 2171019, 2171019, 2171019, 3162251, 2171019, 2171019, 3182731, 3186827, 2171019, 2379776, 2879627, 2171019, 2916491, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3027083, 2171019, 2171019, 3063947, 2699550, 2171166, 2728222, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2879774, 2171166, 2916638, 2171166, 2171166, 2171166, 2171166, 2171166, 2609438, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2654494, 2171166, 2171166, 2171166, 2171166, 2171166, 2445598, 2171166, 2466078, 2474270, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2523422, 2171019, 2437259, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2543755, 2171019, 2171019, 2171019, 2584715, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2908299, 2171019, 2171019, 2936971, 2171019, 2171019, 2986123, 2171019, 2994315, 2171019, 2171019, 3014795, 2171019, 3059851, 3076235, 3088523, 2171166, 2171166, 2986270, 2171166, 2994462, 2171166, 2171166, 3014942, 2171166, 3059998, 3076382, 3088670, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3027230, 2171166, 2171166, 3064094, 2171166, 2171166, 3113246, 2171166, 2171166, 3133726, 2506891, 2171019, 2171019, 2171019, 2535563, 2539659, 2171019, 2171019, 2588811, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2691211, 2171019, 2707595, 2171019, 2715787, 2171019, 2723979, 2764939, 2171019, 2171019, 2797707, 2215936, 2215936, 3170304, 0, 0, 0, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2453790, 2457886, 2171166, 2171166, 2171166, 2486558, 2171166, 2171166, 2507038, 2171166, 2171166, 2171166, 2535710, 2539806, 2171166, 2171166, 2588958, 2171166, 2171166, 2171166, 2171166, 2515230, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2593054, 2171166, 2171166, 2171166, 2171166, 3051806, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3170590, 0, 2388107, 2392203, 2171019, 2171019, 2433163, 2171019, 2461835, 2171019, 2171019, 2171019, 2510987, 2171019, 2171019, 2171019, 2171019, 2580619, 2171019, 2605195, 2637963, 2171019, 2171019, 2171019, 2920587, 2171019, 2171019, 2171019, 2990219, 2171019, 2171019, 2171019, 2171019, 3051659, 2171019, 2171019, 2171019, 2453643, 2457739, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2515083, 2171019, 2171019, 2171019, 2171019, 2646155, 2670731, 2752651, 2756747, 2846859, 2961547, 2171019, 2998411, 2171019, 3010699, 2171019, 2171019, 2687115, 2748555, 2171019, 2171019, 2171019, 2924683, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3121291, 2171019, 2171019, 2171019, 3170443, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2486272, 2215936, 2215936, 2506752, 3145867, 3158155, 3166347, 2387968, 2392064, 2215936, 2215936, 2433024, 2215936, 2461696, 2215936, 2215936, 2215936, 2510848, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 553, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 3121152, 2215936, 2215936, 3145728, 3158016, 3166208, 2388254, 2392350, 2171166, 2171166, 2433310, 2171166, 2461982, 2171166, 2171166, 2171166, 2511134, 2171166, 2171166, 0, 2171166, 2171166, 2580766, 2171166, 2605342, 2638110, 2171166, 2171166, 2171166, 2171166, 3031326, 2171166, 3055902, 2171166, 2171166, 2171166, 2171166, 3092766, 2171166, 2171166, 3125534, 2171166, 2171166, 2171166, 3162398, 2171166, 2171166, 3182878, 3186974, 2171166, 0, 0, 0, 2171019, 2171019, 2171019, 2171019, 3109003, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2215936, 2215936, 2215936, 2400256, 2215936, 2215936, 2215936, 2215936, 2171166, 2687262, 0, 0, 2748702, 2171166, 2171166, 0, 2171166, 2924830, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2597150, 2171166, 2621726, 2171166, 2171166, 2642206, 2171166, 2171166, 2171166, 2171166, 3121438, 2171166, 2171166, 3146014, 3158302, 3166494, 2171019, 2420875, 2429067, 2171019, 2478219, 2171019, 2171019, 2171019, 2171019, 2547851, 2556043, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3129483, 2215936, 2171019, 3141771, 2215936, 2420736, 2428928, 2215936, 2478080, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2646016, 2670592, 2752512, 2756608, 2846720, 2961408, 2215936, 2998272, 2215936, 3010560, 2215936, 2215936, 2215936, 3141632, 2171166, 2421022, 2429214, 2171166, 2478366, 2171166, 2171166, 2171166, 2171166, 0, 0, 2171166, 2171166, 2171166, 2171166, 2646302, 2670878, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 0, 45, 45, 45, 45, 45, 1405, 1406, 45, 45, 45, 45, 1409, 45, 45, 45, 45, 45, 1415, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1238, 45, 45, 45, 45, 67, 2752798, 2756894, 0, 2847006, 2961694, 2171166, 2998558, 2171166, 3010846, 2171166, 2171166, 2171166, 3141918, 2171019, 2171019, 2490507, 3129344, 2171166, 2171166, 2490654, 2171166, 2171166, 2171166, 0, 0, 2547998, 2556190, 2171166, 2171166, 2171166, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 45, 167, 45, 45, 45, 45, 185, 187, 45, 45, 198, 45, 45, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3129630, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2576523, 2171019, 2171019, 2171019, 2171019, 2171019, 2609291, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3002368, 2215936, 2215936, 2171166, 2171166, 2494750, 2171166, 2171166, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 147, 2584576, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2171166, 2171166, 2171166, 2171166, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 0, 0, 0, 2171166, 2171166, 2171166, 3002654, 2171166, 2171166, 2171019, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2175257, 0, 0, 2584862, 2171166, 2171166, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171019, 2441355, 2171019, 2527371, 2171019, 2601099, 2171019, 2850955, 2171019, 2171019, 2171019, 3022987, 2215936, 2441216, 2215936, 2527232, 2215936, 2600960, 2215936, 2850816, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 69632, 287, 2170880, 2215936, 3022848, 2171166, 2441502, 2171166, 2527518, 0, 0, 2171166, 2601246, 2171166, 0, 2851102, 2171166, 2171166, 2171166, 2171166, 2720030, 2744606, 2171166, 2171166, 2171166, 2834718, 2838814, 2171166, 2908446, 2171166, 2171166, 2937118, 3023134, 2171019, 2519179, 2171019, 2171019, 2171019, 2171019, 2171019, 2215936, 2519040, 2215936, 2215936, 2215936, 2215936, 2215936, 2171166, 2171166, 2171166, 3215646, 0, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2486411, 2171019, 2171019, 2171019, 2629771, 2171019, 2171019, 2171019, 2171019, 2719883, 2744459, 2171019, 2171019, 2171019, 2834571, 2838667, 2171019, 2519326, 0, 0, 2171166, 2171166, 0, 2171166, 2171166, 2171166, 2396299, 2171019, 2171019, 2171019, 2171019, 3018891, 2396160, 2215936, 2215936, 2215936, 2215936, 3018752, 2396446, 0, 0, 2171166, 2171166, 2171166, 2171166, 3019038, 2171019, 2650251, 2965643, 2171019, 2215936, 2650112, 2965504, 2215936, 0, 0, 2171166, 2650398, 2965790, 2171166, 2551947, 2171019, 2551808, 2215936, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 144, 45, 45, 67, 67, 67, 67, 67, 228, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1929, 97, 97, 97, 97, 0, 0, 0, 2552094, 2171166, 2171019, 2215936, 0, 2171166, 2171019, 2215936, 0, 2171166, 2171019, 2215936, 0, 2171166, 2977931, 2977792, 2978078, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 1321, 97, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 140, 0, 2379776, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2445312, 2170880, 2465792, 2473984, 2170880, 2170880, 2170880, 2584576, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 3162112, 2170880, 2170880, 3182592, 3186688, 2170880, 0, 140, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3002368, 2170880, 2170880, 2215936, 2215936, 2494464, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3215360, 544, 0, 0, 0, 544, 0, 546, 0, 0, 0, 546, 0, 0, 2183168, 0, 0, 552, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 0, 2170880, 2170880, 2170880, 0, 2170880, 2920448, 2170880, 2170880, 2170880, 2990080, 2170880, 2170880, 552, 0, 0, 0, 552, 0, 287, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2437120, 2170880, 2170880, 18, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 644, 0, 2215936, 2215936, 3170304, 544, 0, 546, 0, 552, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 0, 140, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 249856, 110630, 114730, 106539, 0, 0, 32768, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 151640, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2416640, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 253952, 110630, 114730, 106539, 0, 0, 32856, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 192512, 53264, 18, 18, 49172, 0, 57366, 0, 2232445, 184320, 2232445, 0, 2240641, 2240641, 184320, 2240641, 102432, 0, 0, 0, 221184, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3108864, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 0, 0, 0, 45056, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 24, 0, 127, 127, 53264, 18, 49172, 258071, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 32768, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 204800, 53264, 18, 49172, 57366, 24, 27, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 28, 33, 0, 33, 33, 33, 0, 0, 0, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 16384, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 2170880, 2170880, 2170880, 2416640, 67, 67, 37139, 37139, 24853, 24853, 0, 70179, 0, 0, 0, 65820, 65820, 369, 287, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 2030, 45, 45, 45, 45, 67, 1573, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1699, 67, 67, 67, 67, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1355, 97, 97, 97, 1358, 97, 97, 97, 641, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 1187, 45, 45, 45, 45, 45, 0, 1480, 0, 0, 0, 0, 1319, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 592, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1531, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1680, 45, 45, 45, 641, 0, 924, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1186, 45, 45, 45, 45, 45, 45, 67, 67, 37139, 37139, 24853, 24853, 0, 70179, 282, 0, 0, 65820, 65820, 369, 287, 97, 0, 0, 97, 97, 0, 97, 2028, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1767, 67, 67, 67, 0, 0, 0, 0, 0, 0, 1612, 97, 97, 97, 97, 97, 97, 0, 1785, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1790, 97, 0, 0, 2170880, 2170880, 3051520, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3170304, 241664, 2387968, 2392064, 2170880, 2170880, 2433024, 53264, 19, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 274432, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 270336, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 1134711, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 1126440, 1126440, 1126440, 0, 0, 1126400, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 36, 110630, 114730, 106539, 0, 0, 217088, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 94, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 96, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 24666, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 126, 28, 28, 28, 28, 102432, 53264, 122, 123, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 2170880, 2170880, 4256099, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 0, 1319, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1109, 97, 97, 97, 97, 1113, 132, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 146, 150, 45, 45, 45, 45, 45, 175, 45, 180, 45, 186, 45, 189, 45, 45, 203, 67, 256, 67, 67, 270, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 97, 293, 297, 97, 97, 97, 97, 97, 322, 97, 327, 97, 333, 97, 0, 0, 97, 2026, 0, 2027, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1685, 67, 67, 67, 67, 67, 67, 67, 1690, 67, 336, 97, 97, 350, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 2424832, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2617344, 2170880, 45, 439, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 525, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 622, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1524, 97, 97, 1527, 369, 648, 45, 45, 45, 45, 45, 45, 45, 45, 45, 659, 45, 45, 45, 45, 408, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1239, 45, 45, 45, 67, 729, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 762, 67, 746, 67, 67, 67, 67, 67, 67, 67, 67, 67, 759, 67, 67, 67, 67, 0, 0, 0, 1477, 0, 1086, 0, 0, 0, 1479, 0, 1090, 67, 67, 796, 67, 67, 799, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1291, 67, 67, 67, 811, 67, 67, 67, 67, 67, 816, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 833, 97, 97, 97, 97, 97, 97, 97, 97, 1380, 0, 0, 0, 45, 45, 45, 45, 45, 1185, 45, 45, 45, 45, 45, 45, 45, 386, 45, 45, 45, 45, 45, 45, 45, 45, 1810, 45, 45, 45, 45, 45, 45, 67, 97, 97, 844, 97, 97, 97, 97, 97, 97, 97, 97, 97, 857, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 97, 97, 97, 894, 97, 97, 897, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1382, 45, 45, 45, 97, 909, 97, 97, 97, 97, 97, 914, 97, 97, 97, 97, 97, 97, 97, 923, 67, 67, 1079, 67, 67, 67, 67, 67, 37689, 1085, 25403, 1089, 66365, 1093, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 148, 1114, 97, 97, 97, 97, 97, 97, 1122, 97, 97, 97, 97, 97, 97, 97, 97, 97, 606, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1173, 97, 97, 97, 97, 97, 12288, 0, 925, 0, 1179, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 145, 45, 45, 67, 67, 67, 67, 67, 1762, 67, 67, 67, 1766, 67, 67, 67, 67, 67, 67, 528, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 1934, 67, 67, 1255, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1035, 67, 67, 67, 67, 67, 67, 1297, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1111, 97, 97, 97, 97, 97, 97, 1327, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 33344, 97, 97, 97, 1335, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 1377, 97, 97, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 670, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 430, 45, 45, 45, 45, 67, 67, 1438, 67, 67, 1442, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1592, 67, 67, 67, 1451, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1458, 67, 67, 67, 67, 0, 0, 1305, 0, 0, 0, 0, 0, 1311, 0, 0, 0, 1317, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1322, 97, 97, 1491, 97, 97, 1495, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1551, 45, 1553, 45, 1504, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1513, 97, 97, 97, 97, 0, 45, 45, 45, 45, 1536, 45, 45, 45, 45, 1540, 45, 67, 67, 67, 67, 67, 1585, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1700, 67, 67, 67, 97, 1648, 97, 97, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1541, 0, 97, 97, 97, 97, 0, 1940, 0, 97, 97, 97, 97, 97, 97, 45, 45, 2011, 45, 45, 45, 2015, 67, 67, 2017, 67, 67, 67, 2021, 97, 67, 67, 812, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 97, 97, 97, 910, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 923, 0, 0, 0, 45, 45, 45, 45, 1184, 45, 45, 45, 45, 1188, 45, 45, 45, 45, 1414, 45, 45, 45, 1417, 45, 1419, 45, 45, 45, 45, 45, 443, 45, 45, 45, 45, 45, 45, 453, 45, 45, 67, 67, 67, 67, 1244, 67, 67, 67, 67, 1248, 67, 67, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 282, 41098, 65820, 97, 1324, 97, 97, 97, 97, 1328, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 930, 45, 45, 45, 45, 97, 97, 97, 97, 1378, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 975, 45, 45, 45, 45, 67, 67, 1923, 67, 1925, 67, 67, 1927, 67, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1985, 45, 45, 45, 45, 45, 45, 1560, 45, 45, 45, 45, 45, 45, 45, 45, 45, 946, 45, 45, 950, 45, 45, 45, 0, 97, 97, 97, 1939, 0, 0, 0, 97, 1943, 97, 97, 1945, 97, 45, 45, 45, 669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 990, 45, 45, 45, 67, 257, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 337, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 370, 2170880, 2170880, 2170880, 2416640, 401, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 459, 461, 67, 67, 67, 67, 67, 67, 67, 67, 475, 67, 480, 67, 67, 67, 67, 67, 67, 1054, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1698, 67, 67, 67, 67, 67, 484, 67, 67, 487, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1459, 67, 67, 97, 556, 558, 97, 97, 97, 97, 97, 97, 97, 97, 572, 97, 577, 97, 97, 0, 0, 1896, 97, 97, 97, 97, 97, 97, 1903, 45, 45, 45, 45, 983, 45, 45, 45, 45, 988, 45, 45, 45, 45, 45, 45, 1195, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1549, 45, 45, 45, 45, 45, 581, 97, 97, 584, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1153, 97, 97, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 662, 45, 45, 45, 684, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1004, 45, 45, 45, 67, 67, 67, 749, 67, 67, 67, 67, 67, 67, 67, 67, 67, 761, 67, 67, 67, 67, 67, 67, 1068, 67, 67, 67, 1071, 67, 67, 67, 67, 1076, 794, 795, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 544, 97, 97, 97, 97, 847, 97, 97, 97, 97, 97, 97, 97, 97, 97, 859, 97, 0, 0, 2025, 97, 20480, 97, 97, 2029, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1575, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1775, 67, 67, 67, 97, 97, 97, 97, 892, 893, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1515, 97, 993, 994, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 992, 67, 67, 67, 1284, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1607, 67, 67, 97, 1364, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 596, 97, 45, 1556, 1557, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 696, 45, 1596, 1597, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 499, 67, 97, 97, 97, 1621, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1346, 97, 97, 97, 97, 1740, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1678, 45, 45, 45, 45, 45, 67, 97, 97, 97, 97, 97, 97, 1836, 0, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1984, 97, 45, 45, 45, 45, 45, 45, 1808, 45, 45, 45, 45, 45, 45, 45, 45, 67, 739, 67, 67, 67, 67, 67, 744, 45, 45, 1909, 45, 45, 45, 45, 45, 45, 45, 67, 1917, 67, 1918, 67, 67, 67, 67, 67, 67, 1247, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 532, 67, 67, 67, 67, 67, 67, 1922, 67, 67, 67, 67, 67, 67, 67, 97, 1930, 97, 1931, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1576, 67, 67, 67, 67, 1580, 67, 67, 0, 97, 97, 1938, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 699, 45, 45, 45, 704, 45, 45, 45, 45, 45, 45, 45, 45, 987, 45, 45, 45, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 0, 0, 97, 97, 97, 2006, 97, 97, 97, 97, 0, 45, 1533, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1416, 45, 45, 45, 45, 45, 45, 45, 45, 722, 723, 45, 45, 45, 45, 45, 45, 2045, 67, 67, 67, 2047, 0, 0, 97, 97, 97, 2051, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 409, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1957, 45, 67, 67, 67, 67, 67, 1836, 97, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 45, 67, 67, 67, 1761, 67, 67, 67, 1764, 67, 67, 67, 67, 67, 67, 67, 494, 67, 67, 67, 67, 67, 67, 67, 67, 67, 787, 67, 67, 67, 67, 67, 67, 45, 45, 420, 45, 45, 422, 45, 45, 425, 45, 45, 45, 45, 45, 45, 45, 387, 45, 45, 45, 45, 397, 45, 45, 45, 67, 460, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 515, 67, 485, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 498, 67, 67, 67, 67, 67, 97, 0, 2039, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1426, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1689, 67, 67, 67, 97, 557, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 612, 97, 582, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 595, 97, 97, 97, 97, 97, 896, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 885, 97, 97, 97, 97, 97, 45, 939, 45, 45, 45, 45, 943, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1916, 67, 67, 67, 67, 67, 45, 67, 67, 67, 67, 67, 67, 67, 1015, 67, 67, 67, 67, 1019, 67, 67, 67, 67, 67, 67, 1271, 67, 67, 67, 67, 67, 67, 1277, 67, 67, 67, 67, 67, 67, 1287, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 804, 67, 67, 67, 67, 67, 1077, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2437120, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2543616, 2170880, 2170880, 2170880, 2170880, 2170880, 2629632, 1169, 97, 1171, 97, 97, 97, 97, 97, 97, 97, 12288, 0, 925, 0, 1179, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 936, 45, 45, 67, 67, 214, 67, 220, 67, 67, 233, 67, 243, 67, 248, 67, 67, 67, 67, 67, 67, 1298, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1617, 97, 0, 0, 0, 45, 45, 45, 1183, 45, 45, 45, 45, 45, 45, 45, 45, 45, 393, 45, 45, 45, 45, 45, 45, 67, 67, 1243, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1074, 67, 67, 1281, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 776, 1323, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 907, 45, 1412, 45, 45, 45, 45, 45, 45, 45, 1418, 45, 45, 45, 45, 45, 45, 686, 45, 45, 45, 690, 45, 45, 695, 45, 45, 67, 67, 67, 67, 67, 1465, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1712, 97, 97, 97, 97, 1741, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 426, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1924, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1983, 97, 97, 45, 45, 1987, 45, 1988, 45, 0, 97, 97, 97, 97, 0, 0, 0, 1942, 97, 97, 97, 97, 97, 45, 45, 45, 700, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 711, 45, 45, 153, 45, 45, 166, 45, 176, 45, 181, 45, 45, 188, 191, 196, 45, 204, 255, 258, 263, 67, 271, 67, 67, 0, 37139, 24853, 0, 0, 0, 282, 41098, 65820, 97, 97, 97, 294, 97, 300, 97, 97, 313, 97, 323, 97, 328, 97, 97, 335, 338, 343, 97, 351, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 41098, 0, 140, 45, 45, 45, 45, 1404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1411, 67, 67, 486, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1251, 67, 67, 501, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 513, 67, 67, 67, 67, 67, 67, 1443, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1263, 67, 67, 67, 67, 67, 97, 97, 583, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1526, 97, 598, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 610, 97, 97, 0, 97, 97, 1796, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1744, 45, 45, 45, 369, 0, 651, 45, 653, 45, 654, 45, 656, 45, 45, 45, 660, 45, 45, 45, 45, 1558, 45, 45, 45, 45, 45, 45, 45, 45, 1566, 45, 45, 681, 45, 683, 45, 45, 45, 45, 45, 45, 45, 45, 691, 692, 694, 45, 45, 45, 716, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 709, 45, 45, 712, 45, 714, 45, 45, 45, 718, 45, 45, 45, 45, 45, 45, 45, 726, 45, 45, 45, 733, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1691, 67, 67, 747, 67, 67, 67, 67, 67, 67, 67, 67, 67, 760, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 1613, 97, 97, 97, 97, 97, 97, 1509, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 67, 764, 67, 67, 67, 67, 768, 67, 770, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 1977, 67, 778, 779, 781, 67, 67, 67, 67, 67, 67, 788, 789, 67, 67, 792, 793, 67, 67, 67, 813, 67, 67, 67, 67, 67, 67, 67, 67, 67, 824, 37689, 544, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 836, 97, 838, 97, 839, 97, 841, 97, 97, 97, 845, 97, 97, 97, 97, 97, 97, 97, 97, 97, 858, 97, 97, 0, 1728, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 1802, 45, 97, 97, 862, 97, 97, 97, 97, 866, 97, 868, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1788, 97, 97, 97, 0, 0, 97, 97, 876, 877, 879, 97, 97, 97, 97, 97, 97, 886, 887, 97, 97, 890, 891, 97, 97, 97, 97, 97, 97, 97, 899, 97, 97, 97, 903, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1646, 97, 97, 97, 97, 911, 97, 97, 97, 97, 97, 97, 97, 97, 97, 922, 923, 45, 955, 45, 957, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 195, 45, 45, 45, 45, 45, 981, 982, 45, 45, 45, 45, 45, 45, 989, 45, 45, 45, 45, 45, 170, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 411, 45, 45, 45, 45, 45, 67, 1023, 67, 67, 67, 67, 67, 67, 1031, 67, 1033, 67, 67, 67, 67, 67, 67, 67, 817, 819, 67, 67, 67, 67, 67, 37689, 544, 67, 1065, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 516, 67, 67, 1078, 67, 67, 1081, 1082, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 0, 0, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2437406, 2171166, 2171166, 97, 1115, 97, 1117, 97, 97, 97, 97, 97, 97, 1125, 97, 1127, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 1644, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 1642, 97, 97, 97, 97, 97, 97, 625, 97, 97, 97, 97, 97, 97, 97, 97, 97, 316, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1159, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1502, 97, 97, 97, 97, 97, 1172, 97, 97, 1175, 1176, 97, 97, 12288, 0, 925, 0, 1179, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 935, 45, 45, 45, 1233, 45, 45, 45, 1236, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1873, 67, 67, 45, 45, 1218, 45, 45, 45, 1223, 45, 45, 45, 45, 45, 45, 45, 1230, 45, 45, 67, 67, 215, 219, 222, 67, 230, 67, 67, 244, 246, 249, 67, 67, 67, 67, 67, 67, 1882, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 1904, 45, 1905, 45, 67, 67, 67, 67, 67, 1258, 67, 1260, 67, 67, 67, 67, 67, 67, 67, 67, 67, 495, 67, 67, 67, 67, 67, 67, 67, 67, 1283, 67, 67, 67, 67, 67, 67, 67, 1290, 67, 67, 67, 67, 67, 67, 67, 818, 67, 67, 67, 67, 67, 67, 37689, 544, 67, 67, 1295, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2174976, 0, 0, 97, 97, 97, 1326, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1514, 97, 97, 97, 97, 97, 1338, 97, 1340, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1500, 97, 97, 1503, 97, 1363, 97, 97, 97, 97, 97, 97, 97, 1370, 97, 97, 97, 97, 97, 97, 97, 563, 97, 97, 97, 97, 97, 97, 578, 97, 1375, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 685, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1003, 45, 45, 45, 45, 67, 67, 67, 1463, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1778, 97, 97, 97, 97, 97, 1518, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 609, 97, 97, 97, 45, 1542, 45, 45, 45, 45, 45, 45, 45, 1548, 45, 45, 45, 45, 45, 1554, 45, 1570, 1571, 45, 67, 67, 67, 67, 67, 67, 1578, 67, 67, 67, 67, 67, 67, 67, 1055, 67, 67, 67, 67, 67, 1061, 67, 67, 1582, 67, 67, 67, 67, 67, 67, 67, 1588, 67, 67, 67, 67, 67, 1594, 67, 67, 67, 67, 67, 97, 2038, 0, 97, 97, 97, 97, 97, 2044, 45, 45, 45, 995, 45, 45, 45, 45, 1000, 45, 45, 45, 45, 45, 45, 45, 1809, 45, 1811, 45, 45, 45, 45, 45, 67, 1610, 1611, 67, 1476, 0, 1478, 0, 1480, 0, 97, 97, 97, 97, 97, 97, 1618, 1647, 1649, 97, 97, 97, 1652, 97, 1654, 1655, 97, 0, 45, 45, 45, 1658, 45, 45, 67, 67, 216, 67, 67, 67, 67, 234, 67, 67, 67, 67, 252, 254, 1845, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 945, 45, 947, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1881, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 1902, 45, 45, 45, 45, 45, 45, 1908, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1921, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 0, 97, 1937, 97, 97, 1940, 0, 0, 97, 97, 97, 97, 97, 97, 1947, 1948, 1949, 45, 45, 45, 1952, 45, 1954, 45, 45, 45, 45, 1959, 1960, 1961, 67, 67, 67, 67, 67, 67, 1455, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 757, 67, 67, 67, 67, 67, 67, 1964, 67, 1966, 67, 67, 67, 67, 1971, 1972, 1973, 97, 0, 0, 0, 97, 97, 1104, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 884, 97, 97, 97, 889, 97, 97, 1978, 97, 0, 0, 1981, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 736, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1018, 67, 67, 67, 45, 67, 67, 67, 67, 0, 2049, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 933, 45, 45, 45, 45, 1234, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 97, 97, 288, 97, 97, 97, 97, 97, 97, 317, 97, 97, 97, 97, 97, 97, 0, 0, 97, 1787, 97, 97, 97, 97, 0, 0, 45, 45, 378, 45, 45, 45, 45, 45, 390, 45, 45, 45, 45, 45, 45, 45, 424, 45, 45, 45, 431, 433, 45, 45, 45, 67, 1050, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 518, 67, 97, 97, 97, 1144, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 632, 97, 97, 97, 97, 97, 97, 97, 1367, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 855, 97, 97, 97, 97, 67, 97, 97, 97, 97, 97, 97, 1837, 0, 97, 97, 97, 97, 97, 0, 0, 0, 1897, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1208, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 724, 45, 45, 45, 45, 45, 97, 2010, 45, 45, 45, 45, 45, 45, 2016, 67, 67, 67, 67, 67, 67, 2022, 45, 2046, 67, 67, 67, 0, 0, 2050, 97, 97, 97, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 932, 45, 45, 45, 45, 45, 1222, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1227, 45, 45, 45, 45, 45, 133, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 45, 701, 702, 45, 45, 705, 706, 45, 45, 45, 45, 45, 45, 703, 45, 45, 45, 45, 45, 45, 45, 45, 45, 719, 45, 45, 45, 45, 45, 725, 45, 45, 45, 369, 649, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1216, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 834, 97, 97, 97, 97, 97, 97, 97, 1342, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1799, 97, 97, 45, 45, 45, 1569, 45, 45, 45, 1572, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 1306, 0, 67, 67, 67, 1598, 67, 67, 67, 67, 67, 67, 67, 67, 1606, 67, 67, 1609, 97, 97, 97, 1650, 97, 97, 1653, 97, 97, 97, 0, 45, 45, 1657, 45, 45, 45, 1206, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1421, 45, 45, 45, 1703, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 1711, 97, 97, 0, 1895, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 958, 45, 960, 45, 45, 45, 45, 45, 45, 45, 45, 1913, 45, 45, 1915, 67, 67, 67, 67, 67, 67, 67, 466, 67, 67, 67, 67, 67, 67, 481, 67, 45, 1749, 45, 45, 45, 45, 45, 45, 45, 45, 1755, 45, 45, 45, 45, 45, 173, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 974, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1773, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1886, 0, 0, 0, 97, 97, 67, 2035, 2036, 67, 67, 97, 0, 0, 97, 2041, 2042, 97, 97, 45, 45, 45, 45, 1662, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1397, 45, 45, 45, 45, 151, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 437, 205, 45, 67, 67, 67, 218, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1047, 67, 67, 67, 67, 97, 97, 97, 97, 298, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 870, 97, 97, 97, 97, 97, 97, 97, 97, 352, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 0, 0, 0, 0, 0, 365, 0, 41098, 0, 140, 45, 45, 45, 45, 45, 1427, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1435, 520, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1037, 617, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 923, 45, 1232, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1919, 67, 1759, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1021, 45, 154, 45, 162, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 964, 45, 45, 45, 206, 45, 67, 67, 67, 67, 221, 67, 229, 67, 67, 67, 67, 67, 67, 67, 67, 530, 67, 67, 67, 67, 67, 67, 67, 67, 755, 67, 67, 67, 67, 67, 67, 67, 67, 785, 67, 67, 67, 67, 67, 67, 67, 67, 802, 67, 67, 67, 807, 67, 67, 67, 97, 97, 97, 97, 353, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 0, 0, 0, 0, 0, 366, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 402, 45, 45, 45, 45, 45, 45, 45, 410, 45, 45, 45, 45, 45, 45, 45, 674, 45, 45, 45, 45, 45, 45, 45, 45, 389, 45, 394, 45, 45, 398, 45, 45, 45, 45, 441, 45, 45, 45, 45, 45, 447, 45, 45, 45, 454, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1768, 67, 67, 67, 67, 67, 488, 67, 67, 67, 67, 67, 67, 67, 496, 67, 67, 67, 67, 67, 67, 67, 1774, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 67, 67, 523, 67, 67, 527, 67, 67, 67, 67, 67, 533, 67, 67, 67, 540, 97, 97, 97, 585, 97, 97, 97, 97, 97, 97, 97, 593, 97, 97, 97, 97, 97, 97, 1784, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 0, 18, 18, 24, 24, 0, 28, 28, 97, 97, 620, 97, 97, 624, 97, 97, 97, 97, 97, 630, 97, 97, 97, 637, 713, 45, 45, 45, 45, 45, 45, 721, 45, 45, 45, 45, 45, 45, 45, 45, 1197, 45, 45, 45, 45, 45, 45, 45, 45, 730, 732, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1581, 67, 45, 67, 67, 67, 67, 1012, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1059, 67, 67, 67, 67, 67, 1024, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 775, 67, 67, 67, 67, 1066, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 479, 67, 67, 67, 67, 67, 67, 1080, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 0, 0, 0, 0, 287, 0, 0, 0, 287, 0, 2379776, 2170880, 2170880, 97, 97, 97, 1118, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 920, 97, 97, 0, 0, 0, 0, 45, 1181, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 432, 45, 45, 45, 45, 45, 45, 1219, 45, 45, 45, 45, 45, 45, 1226, 45, 45, 45, 45, 45, 45, 959, 45, 45, 45, 45, 45, 45, 45, 45, 45, 184, 45, 45, 45, 45, 202, 45, 1241, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1266, 67, 1268, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1279, 67, 67, 67, 67, 67, 272, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 67, 67, 67, 1286, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1293, 67, 67, 67, 1296, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 281, 94, 0, 0, 97, 97, 97, 1366, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1373, 97, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 0, 97, 1376, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 1384, 45, 45, 67, 208, 67, 67, 67, 67, 67, 67, 237, 67, 67, 67, 67, 67, 67, 67, 1069, 1070, 67, 67, 67, 67, 67, 67, 67, 0, 37140, 24854, 0, 0, 0, 0, 41098, 65821, 45, 1423, 45, 45, 45, 45, 45, 45, 67, 67, 1431, 67, 67, 67, 67, 67, 67, 67, 1083, 37689, 0, 25403, 0, 66365, 0, 0, 0, 1436, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1830, 67, 1452, 1453, 67, 67, 67, 67, 1456, 67, 67, 67, 67, 67, 67, 67, 67, 67, 771, 67, 67, 67, 67, 67, 67, 1461, 67, 67, 67, 1464, 67, 1466, 67, 67, 67, 67, 67, 67, 1470, 67, 67, 67, 67, 67, 67, 1587, 67, 67, 67, 67, 67, 67, 67, 67, 1595, 1489, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1129, 97, 1505, 1506, 97, 97, 97, 97, 1510, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1163, 1164, 97, 97, 97, 97, 97, 1516, 97, 97, 97, 1519, 97, 1521, 97, 97, 97, 97, 97, 97, 1525, 97, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 67, 67, 67, 67, 67, 1586, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1276, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1600, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1301, 0, 0, 0, 1307, 97, 97, 1620, 97, 97, 97, 97, 97, 97, 97, 1627, 97, 97, 97, 97, 97, 97, 913, 97, 97, 97, 97, 919, 97, 97, 97, 0, 97, 97, 97, 1781, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 1792, 1860, 45, 1862, 1863, 45, 1865, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1875, 67, 1877, 1878, 67, 1880, 67, 97, 97, 97, 97, 97, 1887, 0, 1889, 97, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 237568, 0, 367, 0, 97, 1893, 0, 0, 0, 97, 1898, 1899, 97, 1901, 97, 45, 45, 45, 45, 45, 2014, 45, 67, 67, 67, 67, 67, 2020, 67, 97, 1989, 45, 1990, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1996, 67, 1997, 67, 67, 67, 67, 67, 273, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 97, 97, 97, 97, 0, 0, 97, 97, 2005, 0, 97, 2007, 97, 97, 18, 0, 139621, 0, 0, 0, 642, 0, 133, 364, 0, 0, 367, 41606, 0, 97, 97, 2056, 2057, 0, 2059, 45, 67, 0, 97, 45, 67, 0, 97, 45, 45, 67, 209, 67, 67, 67, 223, 67, 67, 67, 67, 67, 67, 67, 67, 67, 786, 67, 67, 67, 791, 67, 67, 45, 45, 940, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 727, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1016, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 133, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 142, 45, 45, 67, 210, 67, 67, 67, 225, 67, 67, 239, 67, 67, 67, 250, 67, 67, 67, 67, 67, 464, 67, 67, 67, 67, 67, 476, 67, 67, 67, 67, 67, 67, 67, 1709, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 1843, 0, 67, 259, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 289, 97, 97, 97, 303, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 901, 97, 97, 97, 97, 97, 339, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 358, 0, 0, 0, 0, 0, 0, 41098, 0, 140, 45, 45, 45, 45, 45, 1953, 45, 1955, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1687, 1688, 67, 67, 67, 67, 45, 45, 405, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1203, 45, 458, 67, 67, 67, 67, 67, 67, 67, 67, 67, 470, 477, 67, 67, 67, 67, 67, 67, 67, 1970, 97, 97, 97, 1974, 0, 0, 0, 97, 1103, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1372, 97, 97, 97, 97, 67, 522, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 536, 67, 67, 67, 67, 67, 67, 1696, 67, 67, 67, 67, 67, 67, 67, 1701, 67, 555, 97, 97, 97, 97, 97, 97, 97, 97, 97, 567, 574, 97, 97, 97, 97, 97, 301, 97, 309, 97, 97, 97, 97, 97, 97, 97, 97, 97, 900, 97, 97, 97, 905, 97, 97, 97, 619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 633, 97, 97, 18, 0, 139621, 0, 0, 362, 0, 0, 0, 364, 0, 0, 367, 41606, 369, 649, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 663, 664, 67, 67, 67, 67, 750, 751, 67, 67, 67, 67, 758, 67, 67, 67, 67, 67, 67, 67, 1272, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1057, 1058, 67, 67, 67, 67, 67, 67, 67, 67, 797, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 512, 67, 67, 67, 97, 97, 97, 97, 895, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 902, 97, 97, 97, 97, 67, 67, 1051, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1062, 67, 67, 67, 67, 67, 491, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1302, 0, 0, 0, 1308, 97, 97, 97, 97, 1145, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1139, 97, 97, 97, 97, 1156, 97, 97, 97, 97, 97, 97, 1161, 97, 97, 97, 97, 97, 1166, 97, 97, 18, 640, 139621, 0, 641, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 67, 67, 67, 67, 1257, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 1305, 0, 0, 97, 97, 1337, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1630, 97, 67, 1474, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2380062, 2171166, 2171166, 97, 1529, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1228, 45, 45, 45, 45, 67, 67, 67, 67, 1707, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1891, 1739, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1198, 45, 1200, 45, 45, 45, 45, 97, 97, 1894, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 672, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1420, 45, 45, 45, 45, 67, 67, 1965, 67, 1967, 67, 67, 67, 97, 97, 97, 97, 0, 1976, 0, 97, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 97, 97, 1979, 0, 0, 97, 1982, 97, 97, 97, 1986, 45, 45, 45, 45, 45, 735, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1770, 67, 67, 2000, 97, 97, 97, 2002, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1798, 97, 97, 97, 45, 45, 45, 2034, 67, 67, 67, 67, 97, 0, 0, 2040, 97, 97, 97, 97, 45, 45, 45, 45, 1752, 45, 45, 45, 1753, 1754, 45, 45, 45, 45, 45, 45, 383, 45, 45, 45, 45, 45, 45, 45, 45, 45, 675, 45, 45, 45, 45, 45, 45, 438, 45, 45, 45, 45, 45, 445, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1430, 67, 67, 67, 67, 67, 67, 67, 67, 67, 524, 67, 67, 67, 67, 67, 531, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 1096, 97, 97, 97, 621, 97, 97, 97, 97, 97, 628, 97, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 665, 45, 45, 45, 45, 45, 45, 45, 45, 45, 676, 45, 45, 45, 45, 45, 942, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 707, 708, 45, 45, 45, 45, 763, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 809, 810, 67, 67, 67, 67, 783, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 1303, 0, 0, 0, 97, 861, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 613, 97, 45, 45, 956, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1215, 45, 67, 67, 67, 67, 1027, 67, 67, 67, 67, 1032, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 1097, 1064, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1075, 67, 1098, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 331, 97, 97, 97, 97, 1158, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 594, 97, 97, 1309, 0, 0, 0, 1315, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1374, 97, 45, 45, 1543, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1240, 67, 67, 1583, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1252, 67, 97, 97, 97, 1635, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1800, 97, 45, 45, 45, 97, 97, 1793, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1743, 45, 45, 45, 1746, 45, 0, 97, 97, 97, 97, 97, 1851, 97, 45, 45, 45, 45, 1856, 45, 45, 45, 45, 1864, 45, 45, 67, 67, 1869, 67, 67, 67, 67, 1874, 67, 0, 97, 97, 45, 67, 2058, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 45, 67, 211, 67, 67, 67, 67, 67, 67, 240, 67, 67, 67, 67, 67, 67, 67, 1444, 67, 67, 67, 67, 67, 67, 67, 67, 67, 509, 67, 67, 67, 67, 67, 67, 67, 67, 67, 268, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 290, 97, 97, 97, 305, 97, 97, 319, 97, 97, 97, 330, 97, 97, 18, 640, 139621, 0, 641, 0, 0, 0, 0, 364, 0, 643, 367, 41606, 97, 97, 348, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 380, 45, 45, 45, 45, 45, 45, 395, 45, 45, 45, 400, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 658, 45, 45, 45, 45, 45, 972, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 427, 45, 45, 45, 45, 45, 745, 67, 67, 67, 67, 67, 67, 67, 67, 756, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 1086, 25403, 1090, 66365, 1094, 0, 0, 97, 843, 97, 97, 97, 97, 97, 97, 97, 97, 854, 97, 97, 97, 97, 97, 97, 1121, 97, 97, 97, 97, 1126, 97, 97, 97, 97, 45, 980, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1400, 45, 67, 67, 67, 1011, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 1304, 0, 0, 0, 1190, 45, 45, 1193, 1194, 45, 45, 45, 45, 45, 1199, 45, 1201, 45, 45, 45, 45, 1911, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1579, 67, 67, 67, 67, 45, 1205, 45, 45, 45, 45, 45, 45, 45, 45, 1211, 45, 45, 45, 45, 45, 984, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1550, 45, 45, 45, 45, 45, 1217, 45, 45, 45, 45, 45, 45, 1225, 45, 45, 45, 45, 1229, 45, 45, 45, 1388, 45, 45, 45, 45, 45, 45, 1396, 45, 45, 45, 45, 45, 444, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1574, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1590, 67, 67, 67, 67, 67, 1254, 67, 67, 67, 67, 67, 1259, 67, 1261, 67, 67, 67, 67, 1265, 67, 67, 67, 67, 67, 67, 1708, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 67, 67, 67, 67, 1285, 67, 67, 67, 67, 1289, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 1087, 25403, 1091, 66365, 1095, 0, 0, 97, 97, 97, 97, 1339, 97, 1341, 97, 97, 97, 97, 1345, 97, 97, 97, 97, 97, 561, 97, 97, 97, 97, 97, 573, 97, 97, 97, 97, 97, 97, 1717, 97, 0, 97, 97, 97, 97, 97, 97, 97, 591, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1329, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1351, 97, 97, 97, 97, 97, 97, 1357, 97, 97, 97, 97, 97, 588, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 568, 97, 97, 97, 97, 97, 97, 97, 1365, 97, 97, 97, 97, 1369, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1356, 97, 97, 97, 97, 97, 97, 45, 45, 1403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1399, 45, 45, 45, 1413, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1669, 45, 1422, 45, 45, 1425, 45, 45, 1428, 45, 1429, 67, 67, 67, 67, 67, 67, 67, 67, 1468, 67, 67, 67, 67, 67, 67, 67, 67, 529, 67, 67, 67, 67, 67, 67, 539, 67, 67, 1475, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 97, 97, 1530, 97, 0, 45, 45, 1534, 45, 45, 45, 45, 45, 45, 45, 45, 1956, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1599, 67, 67, 1601, 67, 67, 67, 67, 67, 67, 67, 67, 67, 803, 67, 67, 67, 67, 67, 67, 1632, 97, 1634, 0, 97, 97, 97, 1640, 97, 97, 97, 1643, 97, 97, 1645, 97, 97, 97, 97, 97, 912, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1660, 1661, 45, 45, 45, 45, 1665, 1666, 45, 45, 45, 45, 45, 1670, 1692, 1693, 67, 67, 67, 67, 67, 1697, 67, 67, 67, 67, 67, 67, 67, 1702, 97, 97, 1714, 1715, 97, 97, 97, 97, 0, 1721, 1722, 97, 97, 97, 97, 97, 97, 1353, 97, 97, 97, 97, 97, 97, 97, 97, 1362, 1726, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 1734, 97, 97, 97, 97, 97, 848, 849, 97, 97, 97, 97, 856, 97, 97, 97, 97, 97, 354, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 45, 45, 1750, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1681, 45, 0, 1846, 97, 97, 97, 97, 97, 97, 45, 45, 1854, 45, 45, 45, 45, 1859, 67, 67, 67, 1879, 67, 67, 97, 97, 1884, 97, 97, 0, 0, 0, 97, 97, 97, 1105, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1344, 97, 97, 97, 1347, 97, 1892, 97, 0, 0, 0, 97, 97, 97, 1900, 97, 97, 45, 45, 45, 45, 45, 997, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1002, 45, 45, 1005, 1006, 45, 67, 67, 67, 67, 67, 1926, 67, 67, 1928, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1737, 97, 0, 97, 97, 97, 97, 0, 0, 0, 97, 97, 1944, 97, 97, 1946, 45, 45, 45, 1544, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 190, 45, 45, 45, 152, 155, 45, 163, 45, 45, 177, 179, 182, 45, 45, 45, 193, 197, 45, 45, 45, 1672, 45, 45, 45, 45, 45, 1677, 45, 1679, 45, 45, 45, 45, 996, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1212, 45, 45, 45, 45, 67, 260, 264, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 97, 295, 299, 302, 97, 310, 97, 97, 324, 326, 329, 97, 97, 97, 0, 97, 97, 1639, 0, 1641, 97, 97, 97, 97, 97, 97, 97, 97, 1511, 97, 97, 97, 97, 97, 97, 97, 97, 1523, 97, 97, 97, 97, 97, 97, 97, 97, 1719, 97, 97, 97, 97, 97, 97, 97, 97, 1720, 97, 97, 97, 97, 97, 97, 97, 312, 97, 97, 97, 97, 97, 97, 97, 97, 1123, 97, 97, 97, 97, 97, 97, 97, 340, 344, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 373, 375, 419, 45, 45, 45, 45, 45, 45, 45, 45, 45, 428, 45, 45, 435, 45, 45, 45, 1751, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1410, 45, 45, 45, 67, 67, 67, 505, 67, 67, 67, 67, 67, 67, 67, 67, 67, 514, 67, 67, 67, 67, 67, 67, 1969, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 45, 67, 0, 97, 45, 67, 0, 97, 2064, 2065, 0, 2066, 45, 521, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 534, 67, 67, 67, 67, 67, 67, 465, 67, 67, 67, 474, 67, 67, 67, 67, 67, 67, 67, 1467, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 1933, 0, 97, 97, 97, 602, 97, 97, 97, 97, 97, 97, 97, 97, 97, 611, 97, 97, 18, 640, 139621, 358, 641, 0, 0, 0, 0, 364, 0, 0, 367, 0, 618, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 631, 97, 97, 97, 97, 97, 881, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 569, 97, 97, 97, 97, 97, 369, 0, 45, 652, 45, 45, 45, 45, 45, 657, 45, 45, 45, 45, 45, 45, 1235, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1432, 67, 67, 67, 67, 67, 67, 67, 766, 67, 67, 67, 67, 67, 67, 67, 67, 773, 67, 67, 67, 0, 1305, 0, 1311, 0, 1317, 97, 97, 97, 97, 97, 97, 97, 1624, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 1724, 97, 97, 97, 777, 67, 67, 782, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 535, 67, 67, 67, 67, 67, 67, 67, 814, 67, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 97, 837, 97, 97, 97, 97, 97, 97, 1496, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 918, 97, 97, 97, 97, 0, 842, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1168, 97, 97, 97, 97, 864, 97, 97, 97, 97, 97, 97, 97, 97, 871, 97, 97, 97, 0, 1637, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1801, 45, 45, 97, 875, 97, 97, 880, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1151, 1152, 97, 97, 97, 67, 67, 67, 1040, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 790, 67, 67, 67, 1180, 0, 649, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 200, 45, 45, 67, 67, 67, 1454, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 806, 67, 67, 67, 0, 0, 0, 1481, 0, 1094, 0, 0, 97, 1483, 97, 97, 97, 97, 97, 97, 304, 97, 97, 318, 97, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 97, 97, 97, 1507, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1332, 97, 97, 97, 1619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1631, 97, 1633, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1381, 0, 0, 45, 45, 45, 45, 97, 97, 1727, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 626, 97, 97, 97, 97, 97, 97, 636, 45, 45, 1760, 67, 67, 67, 67, 67, 67, 67, 1765, 67, 67, 67, 67, 67, 67, 67, 1299, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1616, 97, 97, 1803, 45, 45, 45, 45, 1807, 45, 45, 45, 45, 45, 1813, 45, 45, 45, 67, 67, 1684, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 822, 67, 67, 37689, 544, 67, 67, 1818, 67, 67, 67, 67, 1822, 67, 67, 67, 67, 67, 1828, 67, 67, 67, 67, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 2012, 2013, 45, 45, 67, 67, 67, 2018, 2019, 67, 67, 97, 67, 97, 97, 97, 1833, 97, 97, 0, 0, 97, 97, 1840, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 1733, 97, 1735, 97, 97, 97, 0, 97, 97, 97, 1849, 97, 97, 97, 45, 45, 45, 45, 45, 1857, 45, 45, 45, 1910, 45, 1912, 45, 45, 1914, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1017, 67, 67, 1020, 67, 45, 1861, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1872, 67, 67, 67, 67, 67, 67, 752, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1446, 67, 67, 67, 67, 67, 1876, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1890, 97, 97, 97, 97, 97, 1134, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 570, 97, 97, 97, 97, 580, 1935, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1906, 45, 67, 67, 67, 67, 2048, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 931, 45, 45, 45, 45, 45, 45, 1674, 45, 1676, 45, 45, 45, 45, 45, 45, 45, 446, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1871, 67, 67, 67, 67, 0, 97, 97, 45, 67, 0, 97, 2060, 2061, 0, 2063, 45, 67, 0, 97, 45, 45, 156, 45, 45, 45, 45, 45, 45, 45, 45, 45, 192, 45, 45, 45, 45, 1673, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 429, 45, 45, 45, 45, 67, 67, 67, 269, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 349, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 374, 45, 45, 67, 67, 213, 217, 67, 67, 67, 67, 67, 242, 67, 247, 67, 253, 45, 45, 698, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 399, 45, 45, 0, 0, 0, 0, 925, 41606, 0, 929, 0, 0, 45, 45, 45, 45, 45, 45, 1391, 45, 45, 1395, 45, 45, 45, 45, 45, 45, 423, 45, 45, 45, 45, 45, 45, 45, 436, 45, 67, 67, 67, 67, 1041, 67, 1043, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1776, 67, 67, 97, 97, 97, 1099, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 888, 97, 97, 97, 1131, 97, 97, 97, 97, 1135, 97, 1137, 97, 97, 97, 97, 97, 97, 97, 1497, 97, 97, 97, 97, 97, 97, 97, 97, 97, 883, 97, 97, 97, 97, 97, 97, 1310, 0, 0, 0, 1316, 0, 0, 0, 0, 1100, 0, 0, 0, 97, 97, 97, 97, 97, 1107, 97, 97, 97, 97, 97, 97, 97, 97, 1343, 97, 97, 97, 97, 97, 97, 1348, 0, 0, 1317, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1112, 97, 45, 1804, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1868, 67, 1870, 67, 67, 67, 67, 67, 1817, 67, 67, 1819, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 823, 67, 37689, 544, 67, 97, 1832, 97, 97, 1834, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 0, 1732, 97, 97, 97, 97, 97, 97, 97, 850, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1177, 0, 0, 925, 0, 0, 0, 0, 97, 97, 97, 97, 0, 0, 1941, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1991, 1992, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1998, 134, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 45, 941, 45, 45, 944, 45, 45, 45, 45, 45, 45, 952, 45, 45, 207, 67, 67, 67, 67, 67, 226, 67, 67, 67, 67, 67, 67, 67, 67, 67, 820, 67, 67, 67, 67, 37689, 544, 369, 650, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1682, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 835, 97, 97, 97, 97, 97, 97, 97, 1522, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1725, 67, 67, 67, 1695, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1034, 67, 1036, 67, 67, 67, 265, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 97, 296, 97, 97, 97, 97, 314, 97, 97, 97, 97, 332, 334, 97, 97, 97, 97, 97, 1146, 1147, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1626, 97, 97, 97, 97, 97, 97, 345, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 372, 45, 45, 45, 1220, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1213, 45, 45, 45, 45, 404, 406, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 434, 45, 45, 45, 440, 45, 45, 45, 45, 45, 45, 45, 45, 451, 452, 45, 45, 45, 67, 1683, 67, 67, 67, 1686, 67, 67, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 67, 67, 490, 492, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1447, 67, 67, 1450, 67, 67, 67, 67, 67, 526, 67, 67, 67, 67, 67, 67, 67, 67, 537, 538, 67, 67, 67, 67, 67, 506, 67, 67, 508, 67, 67, 511, 67, 67, 67, 67, 0, 1476, 0, 0, 0, 0, 0, 1478, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1484, 97, 97, 97, 97, 97, 97, 865, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1499, 97, 97, 97, 97, 97, 97, 97, 97, 97, 587, 589, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 629, 97, 97, 97, 97, 97, 97, 97, 97, 97, 623, 97, 97, 97, 97, 97, 97, 97, 97, 634, 635, 97, 97, 97, 97, 97, 1160, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1628, 97, 97, 97, 97, 369, 0, 45, 45, 45, 45, 45, 655, 45, 45, 45, 45, 45, 45, 45, 45, 999, 45, 1001, 45, 45, 45, 45, 45, 45, 45, 45, 715, 45, 45, 45, 720, 45, 45, 45, 45, 45, 45, 45, 45, 728, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 97, 97, 97, 97, 97, 840, 97, 97, 97, 97, 97, 1174, 97, 97, 97, 97, 0, 0, 925, 0, 0, 0, 0, 0, 0, 0, 1100, 97, 97, 97, 97, 97, 97, 97, 97, 627, 97, 97, 97, 97, 97, 97, 97, 938, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 680, 45, 968, 45, 970, 45, 973, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 962, 45, 45, 45, 45, 45, 979, 45, 45, 45, 45, 45, 985, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1224, 45, 45, 45, 45, 45, 45, 45, 45, 688, 45, 45, 45, 45, 45, 45, 45, 1007, 1008, 67, 67, 67, 67, 67, 1014, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1045, 67, 67, 67, 67, 67, 67, 67, 1038, 67, 67, 67, 67, 67, 67, 1044, 67, 1046, 67, 1049, 67, 67, 67, 67, 67, 67, 800, 67, 67, 67, 67, 67, 67, 808, 67, 67, 0, 0, 0, 1102, 97, 97, 97, 97, 97, 1108, 97, 97, 97, 97, 97, 97, 306, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1371, 97, 97, 97, 97, 97, 97, 97, 97, 1132, 97, 97, 97, 97, 97, 97, 1138, 97, 1140, 97, 1143, 97, 97, 97, 97, 97, 1352, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 869, 97, 97, 97, 97, 97, 45, 1191, 45, 45, 45, 45, 45, 1196, 45, 45, 45, 45, 45, 45, 45, 45, 1407, 45, 45, 45, 45, 45, 45, 45, 45, 986, 45, 45, 45, 45, 45, 45, 991, 45, 67, 67, 67, 1256, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1048, 67, 67, 67, 97, 1336, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 615, 97, 1386, 45, 1387, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 455, 45, 457, 45, 45, 1424, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1433, 67, 1434, 67, 67, 67, 67, 67, 767, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1591, 67, 1593, 67, 67, 45, 45, 1805, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1814, 45, 45, 1816, 67, 67, 67, 67, 1820, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1829, 67, 67, 67, 67, 67, 815, 67, 67, 67, 67, 821, 67, 67, 67, 37689, 544, 67, 1831, 97, 97, 97, 97, 1835, 0, 0, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1731, 97, 97, 97, 97, 97, 97, 97, 97, 97, 853, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 97, 1850, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1547, 45, 45, 45, 45, 45, 45, 45, 45, 1664, 45, 45, 45, 45, 45, 45, 45, 45, 961, 45, 45, 45, 45, 965, 45, 967, 1907, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1920, 0, 1936, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 67, 67, 67, 67, 67, 67, 1763, 67, 67, 67, 67, 67, 67, 67, 67, 1056, 67, 67, 67, 67, 67, 67, 67, 67, 1273, 67, 67, 67, 67, 67, 67, 67, 67, 1457, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 28672, 97, 45, 67, 67, 67, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 2054, 97, 97, 291, 97, 97, 97, 97, 97, 97, 320, 97, 97, 97, 97, 97, 97, 307, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 12288, 0, 925, 926, 1179, 0, 45, 377, 45, 45, 45, 381, 45, 45, 392, 45, 45, 396, 45, 45, 45, 45, 971, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1756, 45, 45, 45, 67, 67, 67, 67, 463, 67, 67, 67, 467, 67, 67, 478, 67, 67, 482, 67, 67, 67, 67, 67, 1028, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1469, 67, 67, 1472, 67, 502, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1460, 67, 97, 97, 97, 97, 560, 97, 97, 97, 564, 97, 97, 575, 97, 97, 579, 97, 97, 97, 97, 97, 1368, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 925, 0, 0, 930, 97, 599, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 872, 97, 45, 666, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1758, 0, 362, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 934, 45, 45, 45, 164, 168, 174, 178, 45, 45, 45, 45, 45, 194, 45, 45, 45, 165, 45, 45, 45, 45, 45, 45, 45, 45, 45, 199, 45, 45, 45, 67, 67, 1010, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1060, 67, 67, 67, 67, 67, 67, 1052, 1053, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1063, 97, 1157, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1167, 97, 97, 97, 97, 97, 1379, 97, 97, 97, 0, 0, 0, 45, 1383, 45, 45, 45, 1806, 45, 45, 45, 45, 45, 45, 1812, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1577, 67, 67, 67, 67, 67, 67, 67, 753, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1262, 67, 67, 67, 67, 67, 67, 67, 1282, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1471, 67, 45, 1402, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 417, 45, 67, 1462, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 97, 1517, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1128, 97, 97, 97, 97, 1636, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 851, 97, 97, 97, 97, 97, 97, 97, 67, 67, 1705, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1842, 0, 0, 1779, 97, 97, 97, 1782, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1789, 97, 97, 0, 0, 0, 97, 1847, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1675, 45, 45, 45, 45, 45, 45, 45, 45, 737, 738, 67, 740, 67, 741, 67, 743, 67, 67, 67, 67, 67, 67, 1968, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 45, 67, 0, 97, 45, 67, 2062, 97, 45, 67, 0, 97, 45, 67, 67, 97, 97, 2001, 97, 0, 0, 2004, 97, 97, 0, 97, 97, 97, 97, 1797, 97, 97, 97, 97, 97, 45, 45, 45, 67, 261, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 292, 97, 97, 97, 97, 311, 315, 321, 325, 97, 97, 97, 97, 97, 97, 1623, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1330, 97, 97, 1333, 1334, 97, 341, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 363, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 1221, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 413, 45, 45, 416, 45, 376, 45, 45, 45, 45, 382, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1408, 45, 45, 45, 45, 45, 403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 414, 45, 45, 45, 418, 67, 67, 67, 462, 67, 67, 67, 67, 468, 67, 67, 67, 67, 67, 67, 67, 67, 1602, 67, 1604, 67, 67, 67, 67, 67, 67, 67, 67, 489, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 500, 67, 67, 67, 67, 67, 1067, 67, 67, 67, 67, 67, 1072, 67, 67, 67, 67, 67, 67, 274, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 504, 67, 67, 67, 67, 67, 67, 67, 510, 67, 67, 67, 517, 519, 541, 67, 37139, 37139, 24853, 24853, 0, 70179, 0, 0, 0, 65820, 65820, 369, 287, 554, 97, 97, 97, 559, 97, 97, 97, 97, 565, 97, 97, 97, 97, 97, 97, 97, 1718, 0, 97, 97, 97, 97, 97, 97, 97, 898, 97, 97, 97, 97, 97, 97, 906, 97, 97, 97, 97, 586, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 597, 97, 97, 97, 97, 97, 1520, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 45, 1656, 45, 45, 45, 97, 97, 601, 97, 97, 97, 97, 97, 97, 97, 607, 97, 97, 97, 614, 616, 638, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 661, 45, 45, 45, 407, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1815, 45, 67, 45, 667, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 678, 45, 45, 45, 421, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 976, 977, 45, 45, 45, 682, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 693, 45, 45, 697, 67, 67, 748, 67, 67, 67, 67, 754, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1274, 67, 67, 67, 67, 67, 67, 67, 67, 765, 67, 67, 67, 67, 769, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1589, 67, 67, 67, 67, 67, 67, 67, 67, 780, 67, 67, 784, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1777, 67, 97, 97, 97, 97, 97, 97, 846, 97, 97, 97, 97, 852, 97, 97, 97, 97, 97, 97, 97, 1742, 45, 45, 45, 45, 45, 45, 45, 1747, 97, 97, 97, 863, 97, 97, 97, 97, 867, 97, 97, 97, 97, 97, 97, 97, 308, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 12288, 1178, 925, 0, 1179, 0, 97, 97, 97, 878, 97, 97, 882, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 12288, 0, 925, 0, 1179, 0, 908, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 925, 0, 0, 0, 954, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 963, 45, 45, 966, 45, 45, 157, 45, 45, 171, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 948, 45, 45, 45, 45, 45, 1022, 67, 67, 1026, 67, 67, 67, 1030, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1603, 1605, 67, 67, 67, 1608, 67, 67, 67, 1039, 67, 67, 1042, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 471, 67, 67, 67, 67, 67, 0, 1100, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 904, 97, 97, 97, 97, 1116, 97, 97, 1120, 97, 97, 97, 1124, 97, 97, 97, 97, 97, 97, 562, 97, 97, 97, 571, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1133, 97, 97, 1136, 97, 97, 97, 97, 97, 97, 97, 97, 915, 917, 97, 97, 97, 97, 97, 0, 97, 1170, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 925, 0, 0, 0, 0, 0, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1993, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1275, 67, 67, 67, 1278, 67, 0, 0, 0, 45, 45, 1182, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1189, 1204, 45, 45, 45, 1207, 45, 45, 1209, 45, 1210, 45, 45, 45, 45, 45, 45, 1546, 45, 45, 45, 45, 45, 45, 45, 45, 45, 689, 45, 45, 45, 45, 45, 45, 1231, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 236, 67, 67, 67, 67, 67, 67, 67, 801, 67, 67, 67, 805, 67, 67, 67, 67, 67, 1242, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1249, 67, 67, 67, 67, 67, 67, 507, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1300, 0, 0, 0, 0, 0, 1267, 67, 67, 1269, 67, 1270, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1280, 97, 1349, 97, 1350, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1360, 97, 97, 97, 0, 1980, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 673, 45, 45, 45, 45, 677, 45, 45, 45, 45, 1401, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 953, 67, 1437, 67, 1440, 67, 67, 67, 67, 1445, 67, 67, 67, 1448, 67, 67, 67, 67, 67, 67, 1029, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1825, 67, 67, 67, 67, 67, 1473, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1320, 0, 834, 97, 97, 97, 97, 1490, 97, 1493, 97, 97, 97, 97, 1498, 97, 97, 97, 1501, 97, 97, 97, 0, 97, 1638, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 916, 97, 97, 97, 97, 97, 97, 0, 1528, 97, 97, 97, 0, 45, 45, 45, 1535, 45, 45, 45, 45, 45, 45, 45, 1867, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1932, 0, 0, 1555, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1567, 45, 45, 158, 45, 45, 172, 45, 45, 45, 183, 45, 45, 45, 45, 201, 45, 45, 67, 212, 67, 67, 67, 67, 231, 235, 241, 245, 67, 67, 67, 67, 67, 67, 493, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 472, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1651, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 1539, 45, 45, 45, 67, 1704, 67, 1706, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1841, 97, 0, 1844, 97, 97, 97, 97, 1716, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 590, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 1385, 1748, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1757, 45, 45, 159, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 415, 45, 45, 97, 97, 1780, 97, 97, 97, 0, 0, 1786, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1730, 0, 97, 97, 97, 97, 97, 1736, 97, 1738, 67, 97, 97, 97, 97, 97, 97, 0, 1838, 97, 97, 97, 97, 97, 0, 0, 97, 1729, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1162, 97, 97, 97, 1165, 97, 97, 97, 45, 1950, 45, 45, 45, 45, 45, 45, 45, 45, 1958, 67, 67, 67, 1962, 67, 67, 67, 67, 67, 1246, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 1710, 97, 97, 97, 1999, 67, 97, 97, 97, 97, 0, 2003, 97, 97, 97, 0, 97, 97, 2008, 2009, 45, 67, 67, 67, 67, 0, 0, 97, 97, 97, 97, 45, 2052, 67, 2053, 0, 0, 0, 0, 925, 41606, 0, 0, 930, 0, 45, 45, 45, 45, 45, 45, 1392, 45, 1394, 45, 45, 45, 45, 45, 45, 45, 1545, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1563, 1565, 45, 45, 45, 1568, 0, 97, 2055, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 28672, 97, 45, 45, 160, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 679, 45, 45, 67, 67, 266, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 346, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 362, 0, 364, 0, 367, 41098, 369, 140, 371, 45, 45, 45, 379, 45, 45, 45, 388, 45, 45, 45, 45, 45, 45, 45, 45, 1663, 45, 45, 45, 45, 45, 45, 45, 45, 45, 449, 45, 45, 45, 45, 45, 67, 67, 542, 37139, 37139, 24853, 24853, 0, 70179, 0, 0, 0, 65820, 65820, 369, 287, 97, 97, 97, 97, 97, 1622, 97, 97, 97, 97, 97, 97, 97, 1629, 97, 97, 0, 1794, 1795, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1745, 45, 45, 97, 639, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 45, 731, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 251, 67, 67, 67, 67, 67, 798, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1073, 67, 67, 67, 860, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 873, 0, 0, 1101, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 921, 97, 0, 67, 67, 67, 67, 1245, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1250, 67, 67, 1253, 0, 0, 1312, 0, 0, 0, 1318, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1106, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1149, 97, 97, 97, 97, 97, 1155, 97, 97, 1325, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1141, 97, 97, 67, 67, 1439, 67, 1441, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1264, 67, 67, 67, 97, 97, 1492, 97, 1494, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1331, 97, 97, 97, 97, 67, 67, 67, 2037, 67, 97, 0, 0, 97, 97, 97, 2043, 97, 45, 45, 45, 442, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 232, 67, 67, 67, 67, 67, 67, 67, 67, 1823, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1975, 0, 0, 97, 874, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1142, 97, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 65, 86, 117, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 63, 84, 115, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 61, 82, 113, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 59, 80, 111, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 57, 78, 109, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 55, 76, 107, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 53, 74, 105, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 51, 72, 103, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 49, 70, 101, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 47, 68, 99, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 45, 67, 97, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 213085, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 0, 0, 44, 0, 0, 32863, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 41, 41, 41, 0, 0, 1138688, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 89, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 127, 127, 127, 127, 102432, 67, 262, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 342, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 360, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 717, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 412, 45, 45, 45, 45, 45, 67, 1009, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1292, 67, 67, 1294, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 1615, 97, 97, 97, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 66, 87, 118, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 64, 85, 116, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 62, 83, 114, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 60, 81, 112, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 58, 79, 110, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 56, 77, 108, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 54, 75, 106, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 52, 73, 104, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 50, 71, 102, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 48, 69, 100, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 46, 67, 98, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 233472, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 69724, 53264, 18, 18, 49172, 0, 57366, 262144, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 45, 45, 161, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 710, 45, 45, 28, 139621, 359, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 1389, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 949, 45, 45, 45, 45, 67, 503, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1449, 67, 67, 97, 600, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1154, 97, 0, 0, 0, 0, 925, 41606, 927, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1866, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 772, 67, 67, 67, 67, 67, 45, 45, 969, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 951, 45, 45, 45, 45, 1192, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1202, 45, 45, 0, 0, 0, 1314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1488, 67, 67, 267, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 347, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 361, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 734, 45, 45, 45, 67, 67, 67, 67, 67, 742, 67, 67, 45, 45, 668, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1214, 45, 45, 1130, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1361, 97, 45, 45, 1671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1552, 45, 45, 0, 0, 0, 0, 2220032, 0, 0, 1130496, 0, 0, 0, 0, 2170880, 2171020, 2170880, 2170880, 18, 0, 0, 131072, 0, 0, 0, 90112, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 1485, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 1537, 45, 45, 45, 45, 45, 1390, 45, 1393, 45, 45, 45, 45, 1398, 45, 45, 45, 2170880, 2171167, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2576384, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 0, 0, 0, 0, 0, 0, 2183168, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2721252, 2744320, 2170880, 2170880, 2170880, 2834432, 2840040, 2170880, 2908160, 2170880, 2170880, 2936832, 2170880, 2170880, 2985984, 2170880, 2994176, 2170880, 2170880, 3014656, 2170880, 3059712, 3076096, 3088384, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 0, 2220032, 0, 0, 0, 1142784, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3215360, 2215936, 2215936, 2215936, 2215936, 2215936, 2437120, 2215936, 2215936, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 543, 0, 545, 0, 0, 2183168, 0, 0, 831, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 3031040, 2170880, 3055616, 2170880, 2170880, 2170880, 2170880, 3092480, 2170880, 2170880, 3125248, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 0, 0, 0, 0, 67, 67, 37139, 37139, 24853, 24853, 0, 0, 0, 0, 0, 65820, 65820, 0, 287, 97, 97, 97, 97, 97, 1783, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 1791, 0, 0, 546, 70179, 0, 0, 0, 0, 552, 0, 97, 97, 97, 97, 97, 97, 97, 604, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1150, 97, 97, 97, 97, 97, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 0, 0, 147456, 0, 0, 0, 0, 925, 41606, 0, 928, 0, 0, 45, 45, 45, 45, 45, 45, 998, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1562, 45, 1564, 45, 45, 45, 45, 0, 2158592, 2158592, 0, 0, 0, 0, 2232320, 2232320, 2232320, 0, 2240512, 2240512, 2240512, 2240512, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2416640 -]; - -JSONiqTokenizer.EXPECTED = -[ 291, 300, 304, 341, 315, 309, 305, 295, 319, 323, 327, 329, 296, 333, 337, 339, 342, 346, 350, 294, 356, 360, 312, 367, 352, 371, 363, 375, 379, 383, 387, 391, 395, 726, 399, 405, 518, 684, 405, 405, 405, 405, 808, 405, 405, 405, 512, 405, 405, 405, 431, 405, 405, 406, 405, 405, 404, 405, 405, 405, 405, 405, 405, 405, 908, 631, 410, 415, 405, 414, 419, 608, 405, 429, 602, 405, 435, 443, 405, 441, 641, 478, 405, 447, 451, 450, 456, 643, 461, 460, 762, 679, 465, 469, 741, 473, 477, 482, 486, 492, 932, 931, 523, 498, 504, 720, 405, 510, 596, 405, 516, 941, 580, 522, 929, 527, 590, 589, 897, 939, 534, 538, 547, 551, 555, 559, 563, 567, 571, 969, 575, 708, 690, 689, 579, 584, 634, 405, 594, 731, 405, 600, 882, 405, 606, 895, 786, 452, 612, 405, 615, 620, 876, 624, 628, 638, 647, 651, 655, 659, 663, 667, 676, 683, 688, 695, 694, 791, 405, 699, 437, 405, 706, 714, 405, 712, 825, 870, 405, 718, 724, 769, 768, 823, 730, 735, 745, 751, 422, 755, 759, 425, 766, 902, 810, 587, 775, 888, 887, 405, 773, 992, 405, 779, 962, 405, 785, 781, 986, 790, 795, 797, 506, 500, 499, 801, 805, 814, 820, 829, 833, 837, 841, 845, 849, 853, 857, 861, 616, 865, 869, 868, 488, 405, 874, 816, 405, 880, 738, 405, 886, 892, 543, 405, 901, 906, 913, 912, 918, 494, 541, 922, 926, 936, 945, 949, 953, 957, 530, 966, 973, 960, 702, 701, 405, 979, 981, 405, 985, 747, 405, 990, 998, 914, 405, 996, 1004, 672, 975, 974, 1014, 1002, 1008, 670, 1012, 405, 405, 405, 405, 405, 401, 1018, 1022, 1026, 1106, 1071, 1111, 1111, 1111, 1082, 1145, 1030, 1101, 1034, 1038, 1106, 1106, 1106, 1106, 1046, 1206, 1052, 1106, 1072, 1111, 1111, 1042, 1134, 1065, 1111, 1112, 1056, 1160, 1207, 1062, 1204, 1208, 1069, 1106, 1106, 1106, 1076, 1111, 1207, 1161, 1122, 1205, 1064, 1094, 1106, 1106, 1107, 1111, 1111, 1111, 1078, 1086, 1207, 1092, 1098, 1046, 1058, 1106, 1106, 1110, 1111, 1111, 1116, 1120, 1161, 1126, 1202, 1104, 1106, 1145, 1146, 1129, 1138, 1088, 1151, 1048, 1157, 1153, 1132, 1141, 1165, 1107, 1111, 1172, 1179, 1109, 1183, 1175, 1143, 1147, 1187, 1108, 1191, 1195, 1144, 1199, 1168, 1212, 1216, 1220, 1224, 1228, 1232, 1236, 1557, 1247, 1241, 1241, 1038, 1434, 1241, 1241, 1241, 1241, 1254, 1275, 1617, 1241, 1280, 1287, 1241, 1241, 1241, 1287, 1241, 2114, 1291, 1241, 1243, 1241, 2049, 1824, 2094, 2095, 1520, 1309, 1241, 1241, 1302, 1241, 1321, 1311, 1241, 1241, 1313, 1778, 1325, 1336, 1241, 1241, 1325, 1330, 1353, 1241, 1241, 1695, 1354, 1241, 1241, 1241, 1294, 1686, 1331, 1241, 1696, 1368, 1241, 1338, 1370, 1241, 1392, 1399, 1364, 2017, 1406, 2016, 1405, 1716, 1406, 1407, 1422, 1417, 1421, 1241, 1241, 1241, 1349, 1426, 1241, 1774, 1756, 1241, 1773, 1241, 1241, 1345, 1964, 1812, 1432, 1241, 1241, 1345, 1993, 1459, 1241, 1241, 1241, 1395, 1848, 1767, 1465, 1241, 1241, 1394, 1847, 1242, 1477, 1241, 1241, 1428, 1241, 1445, 1492, 1241, 1241, 1438, 1241, 1499, 1241, 1241, 1241, 1455, 1241, 1818, 1448, 1241, 1250, 1241, 2026, 1623, 1449, 1241, 1612, 1616, 1241, 1614, 1241, 1257, 1241, 1241, 1985, 1292, 1586, 1512, 1241, 1517, 2050, 1526, 1674, 1519, 1524, 1647, 2051, 1532, 1537, 1551, 1544, 1550, 1555, 1561, 1571, 1578, 1584, 1590, 1591, 1653, 1595, 1602, 1606, 1610, 1634, 1628, 1640, 1633, 1645, 1241, 1241, 1241, 1469, 1241, 1970, 1651, 1241, 1270, 1241, 1241, 1819, 1449, 1241, 1293, 1664, 1241, 1241, 1481, 1485, 1574, 1672, 1241, 1241, 1513, 1317, 1487, 1684, 1241, 1241, 1533, 1299, 1694, 1241, 1241, 1295, 1241, 1241, 1241, 1546, 1700, 1241, 1241, 1707, 1241, 1713, 1241, 1849, 1715, 1241, 1720, 1241, 1276, 1267, 1241, 1241, 2107, 1657, 1864, 1241, 1881, 1241, 1326, 1292, 1241, 1685, 1358, 1724, 1338, 1241, 1363, 1362, 1342, 1340, 1361, 1339, 1833, 1372, 1360, 1833, 1833, 1342, 1343, 1835, 1341, 1731, 1738, 1344, 1241, 1745, 1241, 1379, 1241, 1241, 2092, 1241, 1388, 1761, 1754, 1241, 1386, 1241, 1400, 1760, 1241, 1241, 1241, 1598, 1734, 1241, 1241, 1241, 1635, 1645, 1241, 1780, 1766, 1241, 1241, 1332, 1771, 1241, 1241, 1629, 2079, 1241, 1242, 1784, 1241, 1241, 1680, 1639, 2063, 1790, 1241, 1241, 1741, 1241, 1241, 1800, 1241, 1241, 1762, 1473, 1241, 1806, 1241, 1241, 1786, 1240, 1709, 1241, 1241, 1241, 1668, 1811, 1241, 1940, 1241, 1401, 1974, 1241, 1408, 1413, 1382, 1241, 1816, 1241, 1241, 1802, 2086, 1811, 1241, 1817, 1945, 1823, 2095, 2095, 2047, 2094, 2046, 2080, 1241, 1409, 1312, 1376, 2096, 2048, 1241, 1241, 1807, 1241, 1241, 1241, 2035, 1241, 1241, 1828, 1241, 2057, 2061, 1241, 1241, 1843, 1241, 2059, 1241, 1241, 1241, 1690, 1847, 1241, 1241, 1241, 1703, 2102, 1848, 1241, 1241, 1853, 1292, 1848, 1241, 2016, 1857, 1241, 2002, 1868, 1241, 1436, 1241, 1241, 1271, 1305, 1241, 1874, 1241, 1241, 1884, 2037, 1892, 1241, 1890, 1241, 1461, 1241, 1241, 1795, 1241, 1241, 1891, 1241, 1878, 1241, 1888, 1241, 1888, 1905, 1896, 2087, 1912, 1903, 1241, 1911, 1906, 1916, 1905, 2027, 1863, 1925, 2088, 1859, 1861, 1922, 1927, 1931, 1935, 1494, 1241, 1241, 1918, 1907, 1939, 1917, 1944, 1949, 1241, 1241, 1451, 1955, 1241, 1241, 1241, 1796, 1727, 2061, 1241, 1241, 1899, 1241, 1660, 1968, 1241, 1241, 1951, 1678, 1978, 1241, 1241, 1241, 1839, 1241, 1241, 1984, 1982, 1241, 1488, 1241, 1241, 1624, 1450, 1989, 1241, 1241, 1241, 1870, 1995, 1292, 1241, 1241, 1958, 1261, 1241, 1996, 1241, 1241, 1241, 2039, 2008, 1241, 1241, 1750, 2000, 1241, 1256, 2001, 1960, 1241, 1564, 1241, 1504, 1241, 1241, 1442, 1241, 1241, 1564, 1528, 1263, 1241, 1508, 1241, 1241, 1468, 1498, 2006, 1540, 2015, 1539, 2014, 1748, 2013, 1539, 1831, 2014, 2012, 1500, 1567, 2022, 2021, 1241, 1580, 1241, 1241, 2033, 2037, 1791, 2045, 2031, 1241, 1621, 1241, 1641, 2044, 1241, 1241, 1241, 2093, 1241, 1241, 2055, 1241, 1241, 2067, 1241, 1283, 1241, 1241, 1241, 2101, 2071, 1241, 1241, 1241, 2073, 1848, 2040, 1241, 1241, 1241, 2077, 1241, 1241, 2106, 1241, 1241, 2084, 1241, 2111, 1241, 1241, 1381, 1380, 1241, 1241, 1241, 2100, 1241, 2129, 2118, 2122, 2126, 2197, 2133, 3010, 2825, 2145, 2698, 2156, 2226, 2160, 2161, 2165, 2174, 2293, 2194, 2630, 2201, 2203, 2152, 3019, 2226, 2263, 2209, 2213, 2218, 2269, 2292, 2269, 2269, 2184, 2226, 2238, 2148, 2151, 3017, 2245, 2214, 2269, 2269, 2185, 2226, 2292, 2269, 2291, 2269, 2269, 2269, 2292, 2205, 3019, 2226, 2226, 2160, 2160, 2160, 2261, 2160, 2160, 2160, 2262, 2276, 2160, 2160, 2277, 2216, 2283, 2216, 2269, 2269, 2268, 2269, 2267, 2269, 2269, 2269, 2271, 2568, 2292, 2269, 2293, 2269, 2182, 2190, 2269, 2186, 2226, 2226, 2226, 2226, 2227, 2160, 2160, 2160, 2160, 2263, 2160, 2275, 2277, 2282, 2215, 2217, 2269, 2269, 2291, 2269, 2269, 2293, 2291, 2269, 2220, 2269, 2295, 2294, 2269, 2269, 2305, 2233, 2262, 2278, 2218, 2269, 2234, 2226, 2226, 2228, 2160, 2160, 2160, 2289, 2220, 2294, 2294, 2269, 2269, 2304, 2269, 2160, 2160, 2287, 2269, 2269, 2305, 2269, 2269, 2312, 2269, 2269, 2225, 2226, 2160, 2287, 2289, 2219, 2304, 2295, 2314, 2234, 2226, 2314, 2269, 2226, 2226, 2160, 2288, 2219, 2222, 2304, 2296, 2269, 2224, 2160, 2160, 2269, 2302, 2294, 2314, 2224, 2226, 2288, 2220, 2294, 2269, 2290, 2269, 2269, 2293, 2269, 2269, 2269, 2269, 2270, 2221, 2313, 2225, 2227, 2160, 2300, 2269, 2225, 2261, 2309, 2234, 2229, 2223, 2318, 2318, 2318, 2328, 2336, 2340, 2344, 2350, 2637, 2712, 2358, 2362, 2372, 2135, 2378, 2398, 2135, 2135, 2135, 2135, 2136, 2417, 2241, 2135, 2378, 2135, 2135, 2980, 2984, 2135, 3006, 2135, 2135, 2135, 2945, 2931, 2425, 2400, 2135, 2135, 2135, 2954, 2135, 2481, 2433, 2135, 2135, 2988, 2824, 2135, 2135, 2482, 2434, 2135, 2135, 2440, 2445, 2452, 2135, 2135, 2998, 3002, 2961, 2441, 2446, 2453, 2463, 2974, 2135, 2135, 2135, 2140, 2642, 2709, 2459, 2470, 2465, 2135, 2135, 3005, 2135, 2135, 2987, 2823, 2458, 2469, 2464, 2975, 2135, 2135, 2135, 2353, 2488, 2447, 2324, 2974, 2135, 2409, 2459, 2448, 2135, 2961, 2487, 2446, 2476, 2323, 2973, 2135, 2135, 2135, 2354, 2476, 2974, 2135, 2135, 2135, 2957, 2135, 2135, 2960, 2135, 2135, 2135, 2363, 2409, 2459, 2474, 2465, 2487, 2571, 2973, 2135, 2135, 2168, 2973, 2135, 2135, 2135, 2959, 2135, 2135, 2135, 2506, 2135, 2957, 2488, 2170, 2135, 2135, 2135, 2960, 2135, 2818, 2493, 2135, 2135, 3033, 2135, 2135, 2135, 2934, 2819, 2494, 2135, 2135, 2135, 2976, 2780, 2499, 2135, 2135, 2135, 3000, 2968, 2135, 2935, 2135, 2135, 2135, 2364, 2507, 2135, 2135, 2934, 2135, 2135, 2780, 2492, 2507, 2135, 2135, 2506, 2780, 2135, 2135, 2782, 2780, 2135, 2782, 2135, 2783, 2374, 2514, 2135, 2135, 2135, 3007, 2530, 2974, 2135, 2135, 2135, 3008, 2135, 2135, 2134, 2135, 2526, 2531, 2975, 2135, 2135, 3042, 2581, 2575, 2956, 2135, 2135, 2135, 2394, 2135, 2508, 2535, 2840, 2844, 2495, 2135, 2135, 2136, 2684, 2537, 2842, 2846, 2135, 2136, 2561, 2581, 2551, 2536, 2841, 2845, 2975, 3043, 2582, 2843, 2555, 2135, 3040, 3044, 2538, 2844, 2975, 2135, 2135, 2253, 2644, 2672, 2542, 2554, 2135, 2135, 2346, 2873, 2551, 2555, 2135, 2135, 2135, 2381, 2559, 2565, 2538, 2553, 2135, 2560, 2914, 2576, 2590, 2135, 2135, 2135, 2408, 2136, 2596, 2624, 2135, 2135, 2135, 2409, 2135, 2618, 2597, 3008, 2135, 2135, 2380, 2956, 2601, 2135, 2135, 2135, 2410, 2620, 2624, 2135, 2136, 2383, 2135, 2135, 2783, 2623, 2135, 2135, 2393, 2888, 2136, 2621, 3008, 2135, 2618, 2618, 2622, 2135, 2135, 2405, 2414, 2619, 2384, 2624, 2135, 2136, 2950, 2135, 2138, 2135, 2139, 2135, 2604, 2623, 2135, 2140, 2878, 2665, 2957, 2622, 2135, 2135, 2428, 2762, 2606, 2612, 2135, 2135, 2501, 2586, 2604, 3038, 2135, 2604, 3036, 2387, 2958, 2386, 2135, 2141, 2135, 2421, 2387, 2385, 2135, 2385, 2384, 2384, 2135, 2386, 2628, 2384, 2135, 2135, 2501, 2596, 2591, 2135, 2135, 2135, 2400, 2135, 2634, 2135, 2135, 2559, 2580, 2575, 2648, 2135, 2135, 2135, 2429, 2649, 2135, 2135, 2135, 2435, 2654, 2658, 2135, 2135, 2135, 2436, 2649, 2178, 2659, 2135, 2135, 2595, 2601, 2669, 2677, 2135, 2135, 2616, 2957, 2879, 2665, 2691, 2135, 2363, 2367, 2900, 2878, 2664, 2690, 2975, 2877, 2643, 2670, 2974, 2671, 2975, 2135, 2135, 2619, 2608, 2669, 2673, 2135, 2135, 2653, 2177, 2672, 2135, 2135, 2135, 2486, 2168, 2251, 2255, 2695, 2974, 2709, 2135, 2135, 2135, 2487, 2169, 2399, 2716, 2975, 2135, 2363, 2770, 2776, 2640, 2717, 2135, 2135, 2729, 2135, 2135, 2641, 2718, 2135, 2135, 2135, 2505, 2135, 2640, 2257, 2974, 2135, 2727, 2975, 2135, 2365, 2332, 2895, 2957, 2135, 2959, 2135, 2365, 2749, 2754, 2959, 2958, 2958, 2135, 2380, 2793, 2799, 2135, 2735, 2738, 2135, 2381, 2135, 2135, 2940, 2974, 2135, 2744, 2135, 2135, 2739, 2519, 2976, 2745, 2135, 2135, 2135, 2509, 2755, 2135, 2135, 2135, 2510, 2772, 2778, 2135, 2135, 2740, 2520, 2135, 2771, 2777, 2135, 2135, 2759, 2750, 2792, 2798, 2135, 2135, 2781, 2392, 2779, 2135, 2135, 2135, 2521, 2135, 2679, 2248, 2135, 2135, 2681, 2480, 2135, 2135, 2786, 3000, 2135, 2679, 2683, 2135, 2135, 2416, 2135, 2135, 2135, 2525, 2135, 2730, 2135, 2135, 2135, 2560, 2581, 2135, 2805, 2135, 2135, 2804, 2962, 2832, 2974, 2135, 2382, 2135, 2135, 2958, 2135, 2135, 2960, 2135, 2829, 2833, 2975, 2961, 2965, 2969, 2973, 2968, 2972, 2135, 2135, 2135, 2641, 2135, 2515, 2966, 2970, 2851, 2478, 2135, 2135, 2808, 2135, 2809, 2135, 2135, 2135, 2722, 2852, 2479, 2135, 2135, 2815, 2135, 2135, 2766, 2853, 2480, 2135, 2857, 2479, 2135, 2388, 2723, 2135, 2364, 2331, 2894, 2858, 2480, 2135, 2135, 2850, 2478, 2135, 2135, 2135, 2806, 2864, 2135, 2399, 2256, 2974, 2865, 2135, 2135, 2862, 2135, 2135, 2135, 2685, 2807, 2865, 2135, 2135, 2807, 2863, 2135, 2135, 2135, 2686, 2884, 2807, 2135, 2809, 2807, 2135, 2135, 2807, 2806, 2705, 2810, 2808, 2700, 2869, 2702, 2702, 2702, 2704, 2883, 2135, 2135, 2135, 2730, 2884, 2135, 2135, 2135, 2731, 2321, 2546, 2135, 2135, 2876, 2255, 2889, 2322, 2547, 2135, 2401, 2135, 2135, 2135, 2949, 2367, 2893, 2544, 2973, 2906, 2973, 2135, 2135, 2877, 2663, 2368, 2901, 2907, 2974, 2366, 2899, 2905, 2972, 2920, 2974, 2135, 2135, 2911, 2900, 2920, 2363, 2913, 2918, 2465, 2941, 2975, 2135, 2135, 2924, 2928, 2974, 2945, 2931, 2135, 2135, 2135, 2765, 2136, 2955, 2135, 2135, 2939, 2931, 2380, 2135, 2135, 2380, 2135, 2135, 2135, 2780, 2507, 2137, 2135, 2137, 2135, 2139, 2135, 2806, 2810, 2135, 2135, 2135, 2992, 2135, 2135, 2962, 2966, 2970, 2974, 2135, 2135, 2787, 3014, 2135, 2521, 2993, 2135, 2135, 2135, 2803, 2135, 2135, 2135, 2618, 2607, 2997, 3001, 2135, 2135, 2963, 2967, 2971, 2975, 2135, 2135, 2791, 2797, 2135, 3009, 2999, 3003, 2787, 3001, 2135, 2135, 2964, 2968, 2785, 2999, 3003, 2135, 2135, 2135, 2804, 2785, 2999, 3004, 2135, 2135, 2135, 2807, 2135, 2135, 3023, 2135, 2135, 2135, 2811, 2135, 2135, 3027, 2135, 2135, 2135, 2837, 2968, 3028, 2135, 2135, 2135, 2875, 2135, 2784, 3029, 2135, 2408, 2457, 2446, 0, 14, 0, -2120220672, 1610612736, -2074083328, -2002780160, -2111830528, 1073872896, 1342177280, 1075807216, 4096, 16384, 2048, 8192, 0, 8192, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, -2145386496, 8388608, 1073741824, 0, 0x80000000, 0x80000000, 2097152, 2097152, 2097152, 536870912, 0, 0, 134217728, 33554432, 1536, 268435456, 268435456, 268435456, 268435456, 128, 256, 32, 0, 65536, 131072, 524288, 16777216, 268435456, 0x80000000, 1572864, 1835008, 640, 32768, 65536, 262144, 1048576, 2097152, 196608, 196800, 196608, 196608, 0, 131072, 131072, 131072, 196608, 196624, 196608, 196624, 196608, 196608, 128, 4096, 16384, 16384, 2048, 0, 4, 0, 0, 0x80000000, 2097152, 0, 1024, 32, 32, 0, 65536, 1572864, 1048576, 32768, 32768, 32768, 32768, 196608, 196608, 196608, 64, 64, 196608, 196608, 131072, 131072, 131072, 131072, 268435456, 268435456, 64, 196736, 196608, 196608, 196608, 131072, 196608, 196608, 16384, 4, 4, 4, 2, 32, 32, 65536, 1048576, 12582912, 1073741824, 0, 0, 2, 8, 16, 96, 2048, 32768, 0, 0, 131072, 268435456, 268435456, 268435456, 256, 256, 196608, 196672, 196608, 196608, 196608, 196608, 4, 0, 256, 256, 256, 256, 32, 32, 32768, 32, 32, 32, 32, 32768, 268435456, 268435456, 268435456, 196608, 196608, 196608, 196624, 196608, 196608, 196608, 16, 16, 16, 268435456, 196608, 64, 64, 64, 196608, 196608, 196608, 196672, 268435456, 64, 64, 196608, 196608, 16, 196608, 196608, 196608, 268435456, 64, 196608, 131072, 262144, 4194304, 25165824, 33554432, 134217728, 268435456, 268435456, 196608, 262152, 8, 256, 512, 3072, 16384, 200, -1073741816, 8392713, 40, 8392718, 520, 807404072, 40, 520, 100663304, 0, 0, -540651761, -540651761, 257589048, 0, 262144, 0, 0, 3, 8, 256, 0, 4, 6, 4100, 8388612, 0, 0, 0, 3, 4, 8, 256, 512, 1024, 0, 2097152, 0, 0, -537854471, -537854471, 0, 100663296, 0, 0, 1, 2, 0, 0, 0, 16384, 0, 0, 0, 96, 14336, 0, 0, 0, 7, 8, 234881024, 0, 0, 0, 8, 0, 0, 0, 0, 262144, 0, 0, 16, 64, 384, 512, 0, 1, 1, 0, 12582912, 0, 0, 0, 0, 33554432, 67108864, -606084144, -606084144, -606084138, 0, 0, 28, 32, 768, 1966080, -608174080, 0, 0, 0, 14, 35056, 16, 64, 896, 24576, 98304, 98304, 131072, 262144, 524288, 1048576, 4194304, 25165824, 1048576, 62914560, 134217728, -805306368, 0, 384, 512, 16384, 65536, 131072, 262144, 29360128, 33554432, 134217728, 268435456, 1073741824, 0x80000000, 262144, 524288, 1048576, 29360128, 33554432, 524288, 1048576, 16777216, 33554432, 134217728, 268435456, 1073741824, 0, 0, 0, 123856, 1966080, 0, 64, 384, 16384, 65536, 131072, 16384, 65536, 524288, 268435456, 0x80000000, 0, 0, 524288, 0x80000000, 0, 0, 1, 16, 0, 256, 524288, 0, 0, 0, 25, 96, 128, -537854471, 0, 0, 0, 32, 7404800, -545259520, 0, 0, 0, 60, 0, 249, 64768, 1048576, 6291456, 6291456, 25165824, 100663296, 402653184, 1073741824, 96, 128, 1280, 2048, 4096, 57344, 6291456, 57344, 6291456, 8388608, 16777216, 33554432, 201326592, 1342177280, 0x80000000, 0, 57344, 6291456, 8388608, 100663296, 134217728, 0x80000000, 0, 0, 0, 1, 8, 16, 64, 128, 64, 128, 256, 1024, 131072, 131072, 131072, 262144, 524288, 16777216, 57344, 6291456, 8388608, 67108864, 134217728, 64, 256, 1024, 2048, 4096, 57344, 64, 256, 0, 24576, 32768, 6291456, 67108864, 134217728, 0, 1, 64, 256, 24576, 32768, 4194304, 32768, 4194304, 67108864, 0, 0, 64, 256, 0, 0, 24576, 32768, 0, 16384, 4194304, 67108864, 64, 16384, 0, 0, 1, 64, 256, 16384, 4194304, 67108864, 0, 0, 0, 16384, 0, 16384, 16384, 0, -470447874, -470447874, -470447874, 0, 0, 128, 0, 0, 8, 96, 2048, 32768, 262144, 8388608, 35056, 1376256, -471859200, 0, 0, 14, 16, 224, 2048, 32768, 2097152, 4194304, 8388608, -486539264, 0, 96, 128, 2048, 32768, 262144, 2097152, 262144, 2097152, 8388608, 33554432, 536870912, 1073741824, 0x80000000, 0, 1610612736, 0x80000000, 0, 0, 1, 524288, 1048576, 12582912, 0, 0, 0, 151311, 264503296, 2097152, 8388608, 33554432, 1610612736, 0x80000000, 262144, 8388608, 33554432, 536870912, 67108864, 4194304, 0, 4194304, 0, 4194304, 4194304, 0, 0, 524288, 8388608, 536870912, 1073741824, 0x80000000, 1, 4097, 8388609, 96, 2048, 32768, 1073741824, 0x80000000, 0, 96, 2048, 0x80000000, 0, 0, 96, 2048, 0, 0, 1, 12582912, 0, 0, 0, 0, 1641895695, 1641895695, 0, 0, 0, 249, 7404800, 15, 87808, 1835008, 1639972864, 0, 768, 5120, 16384, 65536, 1835008, 1835008, 12582912, 16777216, 1610612736, 0, 3, 4, 8, 768, 4096, 65536, 0, 0, 256, 512, 786432, 8, 256, 512, 4096, 16384, 1835008, 16384, 1835008, 12582912, 1610612736, 0, 0, 0, 256, 0, 0, 0, 4, 8, 16, 32, 1, 2, 8, 256, 16384, 524288, 16384, 524288, 1048576, 12582912, 1610612736, 0, 0, 0, 8388608, 0, 0, 0, 524288, 4194304, 0, 0, 0, 8388608, -548662288, -548662288, -548662288, 0, 0, 256, 16384, 65536, 520093696, -1073741824, 0, 0, 0, 16777216, 0, 16, 32, 960, 4096, 4980736, 520093696, 1073741824, 0, 32, 896, 4096, 57344, 1048576, 6291456, 8388608, 16777216, 100663296, 134217728, 268435456, 0x80000000, 0, 512, 786432, 4194304, 33554432, 134217728, 268435456, 0, 786432, 4194304, 134217728, 268435456, 0, 524288, 4194304, 268435456, 0, 0, 0, 0, 0, 4194304, 4194304, -540651761, 0, 0, 0, 2, 4, 8, 16, 96, 128, 264503296, -805306368, 0, 0, 0, 8, 256, 512, 19456, 131072, 3072, 16384, 131072, 262144, 8388608, 16777216, 512, 1024, 2048, 16384, 131072, 262144, 131072, 262144, 8388608, 33554432, 201326592, 268435456, 0, 3, 4, 256, 1024, 2048, 57344, 16384, 131072, 8388608, 33554432, 134217728, 268435456, 0, 3, 256, 1024, 16384, 131072, 33554432, 134217728, 1073741824, 0x80000000, 0, 0, 256, 524288, 0x80000000, 0, 3, 256, 33554432, 134217728, 1073741824, 0, 1, 2, 33554432, 1, 2, 134217728, 1073741824, 0, 1, 2, 134217728, 0, 0, 0, 64, 0, 0, 0, 16, 32, 896, 4096, 786432, 4194304, 16777216, 33554432, 201326592, 268435456, 1073741824, 0x80000000, 0, 0, 0, 15, 0, 4980736, 4980736, 4980736, 70460, 70460, 3478332, 0, 0, 1008, 4984832, 520093696, 60, 4864, 65536, 0, 0, 0, 12, 16, 32, 256, 512, 4096, 65536, 0, 0, 0, 67108864, 0, 0, 0, 12, 0, 256, 512, 65536, 0, 0, 1024, 512, 131072, 131072, 4, 16, 32, 65536, 0, 4, 16, 32, 0, 0, 0, 4, 16, 0, 0, 16384, 67108864, 0, 0, 1, 24, 96, 128, 256, 1024 -]; - -JSONiqTokenizer.TOKEN = -[ - "(0)", - "JSONChar", - "JSONCharRef", - "JSONPredefinedCharRef", - "ModuleDecl", - "Annotation", - "OptionDecl", - "Operator", - "Variable", - "Tag", - "EndTag", - "PragmaContents", - "DirCommentContents", - "DirPIContents", - "CDataSectionContents", - "AttrTest", - "Wildcard", - "EQName", - "IntegerLiteral", - "DecimalLiteral", - "DoubleLiteral", - "PredefinedEntityRef", - "'\"\"'", - "EscapeApos", - "AposChar", - "ElementContentChar", - "QuotAttrContentChar", - "AposAttrContentChar", - "NCName", - "QName", - "S", - "CharRef", - "CommentContents", - "DocTag", - "DocCommentContents", - "EOF", - "'!'", - "'\"'", - "'#'", - "'#)'", - "'$$'", - "''''", - "'('", - "'(#'", - "'(:'", - "'(:~'", - "')'", - "'*'", - "'*'", - "','", - "'-->'", - "'.'", - "'/'", - "'/>'", - "':'", - "':)'", - "';'", - "''), token: xmlcomment, next: function(stack){ stack.pop(); } } - ], - CData: [ - { name: 'CDataSectionContents', token: cdata }, - { name: n(']]>'), token: cdata, next: function(stack){ stack.pop(); } } - ], - PI: [ - { name: 'DirPIContents', token: pi }, - { name: n('?'), token: pi }, - { name: n('?>'), token: pi, next: function(stack){ stack.pop(); } } - ], - AposString: [ - { name: n('\'\''), token: 'string', next: function(stack){ stack.pop(); } }, - { name: 'PredefinedEntityRef', token: 'constant.language.escape' }, - { name: 'CharRef', token: 'constant.language.escape' }, - { name: 'EscapeApos', token: 'constant.language.escape' }, - { name: 'AposChar', token: 'string' } - ], - QuotString: [ - { name: n('"'), token: 'string', next: function(stack){ stack.pop(); } }, - { name: 'JSONPredefinedCharRef', token: 'constant.language.escape' }, - { name: 'JSONCharRef', token: 'constant.language.escape' }, - { name: 'JSONChar', token: 'string' } - ] -}; - -exports.JSONiqLexer = function(){ return new Lexer(JSONiqTokenizer, Rules); }; -}, -{"./JSONiqTokenizer":1,"./lexer":3}], -3:[function(_dereq_,module,exports){ -'use strict'; - -var TokenHandler = function(code) { - var input = code; - this.tokens = []; - - this.reset = function() { - input = input; - this.tokens = []; - }; - - this.startNonterminal = function() {}; - this.endNonterminal = function() {}; - - this.terminal = function(name, begin, end) { - this.tokens.push({ - name: name, - value: input.substring(begin, end) - }); - }; - - this.whitespace = function(begin, end) { - this.tokens.push({ - name: 'WS', - value: input.substring(begin, end) - }); - }; -}; - -exports.Lexer = function(Tokenizer, Rules) { - - this.tokens = []; - - this.getLineTokens = function(line, state) { - state = (state === 'start' || !state) ? '["start"]' : state; - var stack = JSON.parse(state); - var h = new TokenHandler(line); - var tokenizer = new Tokenizer(line, h); - var tokens = []; - - while(true) { - var currentState = stack[stack.length - 1]; - try { - h.tokens = []; - tokenizer['parse_' + currentState](); - var info = null; - - if(h.tokens.length > 1 && h.tokens[0].name === 'WS') { - tokens.push({ - type: 'text', - value: h.tokens[0].value - }); - h.tokens.splice(0, 1); - } - - var token = h.tokens[0]; - var rules = Rules[currentState]; - for(var k = 0; k < rules.length; k++) { - var rule = Rules[currentState][k]; - if((typeof(rule.name) === 'function' && rule.name(token)) || rule.name === token.name) { - info = rule; - break; - } - } - - if(token.name === 'EOF') { break; } - if(token.value === '') { throw 'Encountered empty string lexical rule.'; } - - tokens.push({ - type: info === null ? 'text' : (typeof(info.token) === 'function' ? info.token(token.value) : info.token), - value: token.value - }); - - if(info && info.next) { - info.next(stack); - } - - } catch(e) { - if(e instanceof tokenizer.ParseException) { - var index = 0; - for(var i=0; i < tokens.length; i++) { - index += tokens[i].value.length; - } - tokens.push({ type: 'text', value: line.substring(index) }); - return { - tokens: tokens, - state: JSON.stringify(['start']) - }; - } else { - throw e; - } - } - } - - return { - tokens: tokens, - state: JSON.stringify(stack) - }; - }; -}; -}, -{}]},{},[2]) -(2) - -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === "') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken(); - var atCursor = false; - var state = JSON.parse(state).pop(); - if ((token && token.value === '>') || state !== "StartTag") return; - if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ - do { - token = iterator.stepBackward(); - } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); - } else { - atCursor = true; - } - var previous = iterator.stepBackward(); - if (!token || !hasType(token, 'meta.tag') || (previous !== null && previous.value.match('/'))) { - return - } - var tag = token.value.substring(1); - if (atCursor){ - var tag = tag.substring(0, position.column - token.start); - } - - return { - text: '>' + '', - selection: [1, 1] - } - } - }); - - } - oop.inherits(XQueryBehaviour, Behaviour); - - exports.XQueryBehaviour = XQueryBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/jsoniq",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/jsoniq_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor"], function(require, exports, module) { -"use strict"; - -var WorkerClient = require("../worker/worker_client").WorkerClient; -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var JSONiqLexer = require("./xquery/jsoniq_lexer").JSONiqLexer; -var Range = require("../range").Range; -var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; -var Anchor = require("../anchor").Anchor; - -var Mode = function() { - this.$tokenizer = new JSONiqLexer(); - this.$behaviour = new XQueryBehaviour(); - this.foldingRules = new CStyleFoldMode(); - this.$highlightRules = new TextHighlightRules(); -}; - -oop.inherits(Mode, TextMode); - -(function() { - - this.completer = { - getCompletions: function(editor, session, pos, prefix, callback) { - if (!session.$worker) - return callback(); - session.$worker.emit("complete", { data: { pos: pos, prefix: prefix } }); - session.$worker.on("complete", function(e){ - callback(null, e.data); - }); - } - }; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var match = line.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/); - if (match) - indent += tab; - return indent; - }; - - this.checkOutdent = function(state, line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*[\}\)]/.test(input); - }; - - this.autoOutdent = function(state, doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*[\}\)])/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.toggleCommentLines = function(state, doc, startRow, endRow) { - var i, line; - var outdent = true; - var re = /^\s*\(:(.*):\)/; - - for (i=startRow; i<= endRow; i++) { - if (!re.test(doc.getLine(i))) { - outdent = false; - break; - } - } - - var range = new Range(0, 0, 0, 0); - for (i=startRow; i<= endRow; i++) { - line = doc.getLine(i); - range.start.row = i; - range.end.row = i; - range.end.column = line.length; - - doc.replace(range, outdent ? line.match(re)[1] : "(:" + line + ":)"); - } - }; - this.createWorker = function(session) { - - var worker = new WorkerClient(["ace"], "ace/mode/xquery_worker", "XQueryWorker"); - var that = this; - - worker.attachToDocument(session.getDocument()); - - worker.on("ok", function(e) { - session.clearAnnotations(); - }); - - worker.on("markers", function(e) { - session.clearAnnotations(); - that.addMarkers(e.data, session); - }); - - return worker; - }; - - this.removeMarkers = function(session) { - var markers = session.getMarkers(false); - for (var id in markers) { - if (markers[id].clazz.indexOf('language_highlight_') === 0) { - session.removeMarker(id); - } - } - for (var i = 0; i < session.markerAnchors.length; i++) { - session.markerAnchors[i].detach(); - } - session.markerAnchors = []; - }; - - this.addMarkers = function(annos, mySession) { - var _self = this; - - if (!mySession.markerAnchors) mySession.markerAnchors = []; - this.removeMarkers(mySession); - mySession.languageAnnos = []; - annos.forEach(function(anno) { - var anchor = new Anchor(mySession.getDocument(), anno.pos.sl, anno.pos.sc || 0); - mySession.markerAnchors.push(anchor); - var markerId; - var colDiff = anno.pos.ec - anno.pos.sc; - var rowDiff = anno.pos.el - anno.pos.sl; - var gutterAnno = { - guttertext: anno.message, - type: anno.level || "warning", - text: anno.message - }; - - function updateFloat(single) { - if (markerId) - mySession.removeMarker(markerId); - gutterAnno.row = anchor.row; - if (anno.pos.sc !== undefined && anno.pos.ec !== undefined) { - var range = new Range(anno.pos.sl, anno.pos.sc, anno.pos.el, anno.pos.ec); - markerId = mySession.addMarker(range, "language_highlight_" + (anno.type ? anno.type : "default")); - } - if (single) mySession.setAnnotations(mySession.languageAnnos); - } - updateFloat(); - anchor.on("change", function() { - updateFloat(true); - }); - if (anno.message) mySession.languageAnnos.push(gutterAnno); - }); - mySession.setAnnotations(mySession.languageAnnos); - }; - - this.$id = "ace/mode/jsoniq"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/xquery/jsoniq_lexer",["require","exports","module"],function(e,t,n){n.exports=function t(n,a,r){function s(i,c){if(!a[i]){if(!n[i]){var u="function"==typeof e&&e;if(!c&&u)return u(i,!0);if(o)return o(i,!0);throw new Error("Cannot find module '"+i+"'")}var l=a[i]={exports:{}};n[i][0].call(l.exports,function(e){var t=n[i][1][e];return s(t?t:e)},l,l.exports,t,n,a,r)}return a[i].exports}for(var o="function"==typeof e&&e,i=0;iy?y:x),f=v,p=x,h=0):m(v,x,0,h,t)}function u(){p!=v&&(f=p,p=v,w.whitespace(f,p))}function l(e){for(var t;t=g(e),30==t;);return t}function k(e){0==h&&(h=l(e),v=I,x=N)}function b(e){0==h&&(h=g(e),v=I,x=N)}function m(e,t,n,a,r){throw new d.ParseException(e,t,n,a,r)}function g(t){var n=!1;I=N;for(var a=N,r=e.INITIAL[t],s=0,o=4095&r;0!=o;){var i,c=a>4;i=e.MAP1[(15&c)+e.MAP1[(31&u)+e.MAP1[u>>5]]]}else{if(c<56320){var u=a=56320&&u<57344&&(++a,c=((1023&c)<<10)+(1023&u)+65536,n=!0)}for(var l=0,k=5,b=3;;b=k+l>>1){if(e.MAP2[b]>c)k=b-1;else{if(!(e.MAP2[6+b]k){i=0;break}}}s=o;var g=(i<<12)+o-1;o=e.TRANSITION[(15&g)+e.TRANSITION[g>>4]],o>4095&&(r=o,o&=4095,N=a)}if(r>>=12,0==r){N=a-1;var u=N=56320&&u<57344&&--N,m(I,N,s,-1,-1)}if(n)for(var d=r>>9;d>0;--d){--N;var u=N=56320&&u<57344&&--N}else N-=r>>9;return(511&r)-1}a(t,n);var d=this;this.ParseException=function(e,t,n,a,r){var s=e,o=t,i=n,c=a,u=r;this.getBegin=function(){return s},this.getEnd=function(){return o},this.getState=function(){return i},this.getExpected=function(){return u},this.getOffending=function(){return c},this.getMessage=function(){return c<0?"lexical analysis failed":"syntax error"}},this.getInput=function(){return C},this.getOffendingToken=function(t){var n=t.getOffending();return n>=0?e.TOKEN[n]:null},this.getExpectedTokenSet=function(t){var n;return n=t.getExpected()<0?e.getTokenSet(-t.getState()):[e.TOKEN[t.getExpected()]]},this.getErrorMessage=function(e){var t=this.getExpectedTokenSet(e),n=this.getOffendingToken(e),a=C.substring(0,e.getBegin()),r=a.split("\n"),s=r.length,o=r[s-1].length+1,i=e.getEnd()-e.getBegin();return e.getMessage()+(null==n?"":", found "+n)+"\nwhile expecting "+(1==t.length?t[0]:"["+t.join(", ")+"]")+"\n"+(0==i||null!=n?"":"after successfully scanning "+i+" characters beginning ")+"at line "+s+", column "+o+":\n..."+C.substring(e.getBegin(),Math.min(C.length,e.getBegin()+64))+"..."},this.parse_start=function(){switch(w.startNonterminal("start",p),k(14),h){case 58:c(58);break;case 57:c(57);break;case 59:c(59);break;case 43:c(43);break;case 45:c(45);break;case 44:c(44);break;case 37:c(37);break;case 41:c(41);break;case 277:c(277);break;case 274:c(274);break;case 42:c(42);break;case 46:c(46);break;case 52:c(52);break;case 65:c(65);break;case 66:c(66);break;case 49:c(49);break;case 51:c(51);break;case 56:c(56);break;case 54:c(54);break;case 36:c(36);break;case 276:c(276);break;case 40:c(40);break;case 5:c(5);break;case 4:c(4);break;case 6:c(6);break;case 15:c(15);break;case 16:c(16);break;case 18:c(18);break;case 19:c(19);break;case 20:c(20);break;case 8:c(8);break;case 9:c(9);break;case 7:c(7);break;case 35:c(35);break;default:s()}w.endNonterminal("start",p)},this.parse_StartTag=function(){switch(w.startNonterminal("StartTag",p),k(8),h){case 61:c(61);break;case 53:c(53);break;case 29:c(29);break;case 60:c(60);break;case 37:c(37);break;case 41:c(41);break;default:c(35)}w.endNonterminal("StartTag",p)},this.parse_TagContent=function(){switch(w.startNonterminal("TagContent",p),b(11),h){case 25:c(25);break;case 9:c(9);break;case 10:c(10);break;case 58:c(58);break;case 57:c(57);break;case 21:c(21);break;case 31:c(31);break;case 275:c(275);break;case 278:c(278);break;case 274:c(274);break;default:c(35)}w.endNonterminal("TagContent",p)},this.parse_AposAttr=function(){switch(w.startNonterminal("AposAttr",p),b(10),h){case 23:c(23);break;case 27:c(27);break;case 21:c(21);break;case 31:c(31);break;case 275:c(275);break;case 278:c(278);break;case 274:c(274);break;case 41:c(41);break;default:c(35)}w.endNonterminal("AposAttr",p)},this.parse_QuotAttr=function(){switch(w.startNonterminal("QuotAttr",p),b(9),h){case 22:c(22);break;case 26:c(26);break;case 21:c(21);break;case 31:c(31);break;case 275:c(275);break;case 278:c(278);break;case 274:c(274);break;case 37:c(37);break;default:c(35)}w.endNonterminal("QuotAttr",p)},this.parse_CData=function(){switch(w.startNonterminal("CData",p),b(1),h){case 14:c(14);break;case 67:c(67);break;default:c(35)}w.endNonterminal("CData",p)},this.parse_XMLComment=function(){switch(w.startNonterminal("XMLComment",p),b(0),h){case 12:c(12);break;case 50:c(50);break;default:c(35)}w.endNonterminal("XMLComment",p)},this.parse_PI=function(){switch(w.startNonterminal("PI",p),b(3),h){case 13:c(13);break;case 62:c(62);break;case 63:c(63);break;default:c(35)}w.endNonterminal("PI",p)},this.parse_Pragma=function(){switch(w.startNonterminal("Pragma",p),b(2),h){case 11:c(11);break;case 38:c(38);break;case 39:c(39);break;default:c(35)}w.endNonterminal("Pragma",p)},this.parse_Comment=function(){switch(w.startNonterminal("Comment",p),b(4),h){case 55:c(55);break;case 44:c(44);break;case 32:c(32);break;default:c(35)}w.endNonterminal("Comment",p)},this.parse_CommentDoc=function(){switch(w.startNonterminal("CommentDoc",p),b(6),h){case 33:c(33);break;case 34:c(34);break;case 55:c(55);break;case 44:c(44);break;default:c(35)}w.endNonterminal("CommentDoc",p)},this.parse_QuotString=function(){switch(w.startNonterminal("QuotString",p),b(5),h){case 3:c(3);break;case 2:c(2);break;case 1:c(1);break;case 37:c(37);break;default:c(35)}w.endNonterminal("QuotString",p)},this.parse_AposString=function(){switch(w.startNonterminal("AposString",p),b(7),h){case 21:c(21);break;case 31:c(31);break;case 23:c(23);break;case 24:c(24);break;case 41:c(41);break;default:c(35)}w.endNonterminal("AposString",p)},this.parse_Prefix=function(){w.startNonterminal("Prefix",p),k(13),u(),i(),w.endNonterminal("Prefix",p)},this.parse__EQName=function(){w.startNonterminal("_EQName",p),k(12),u(),s(),w.endNonterminal("_EQName",p)};var f,p,h,v,x,w,C,y,I,N};a.getTokenSet=function(e){for(var t=[],n=e<0?-e:4095&INITIAL[e],r=0;r<279;r+=32)for(var s=r,o=2066*(r>>5)+n-1,i=o>>2,c=i>>2,u=a.EXPECTED[(3&o)+a.EXPECTED[(3&i)+a.EXPECTED[(3&c)+a.EXPECTED[c>>2]]]];0!=u;u>>>=1,++s)0!=(1&u)&&t.push(a.TOKEN[s]);return t},a.MAP0=[67,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,18,18,18,18,18,18,18,18,18,19,20,21,22,23,24,25,26,27,28,29,30,27,31,31,31,31,31,31,31,31,31,31,32,31,31,33,31,31,31,31,31,31,34,35,36,37,31,37,38,39,40,41,42,43,44,45,46,31,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,31,62,63,64,65,37],a.MAP1=[108,124,214,214,214,214,214,214,214,214,214,214,214,214,214,214,156,181,181,181,181,181,214,215,213,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,247,261,277,293,309,347,363,379,416,416,416,408,331,323,331,323,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,433,433,433,433,433,433,433,316,331,331,331,331,331,331,331,331,394,416,416,417,415,416,416,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,330,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,416,67,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,18,18,18,18,18,18,18,18,18,19,20,21,22,23,24,25,26,27,28,29,30,27,31,31,31,31,31,31,31,31,31,31,31,31,31,31,37,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,32,31,31,33,31,31,31,31,31,31,34,35,36,37,31,37,38,39,40,41,42,43,44,45,46,31,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,31,62,63,64,65,37,37,37,37,37,37,37,37,37,37,37,37,31,31,37,37,37,37,37,37,37,66,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66,66],a.MAP2=[57344,63744,64976,65008,65536,983040,63743,64975,65007,65533,983039,1114111,37,31,37,31,31,37],a.INITIAL=[1,2,49155,57348,5,6,7,8,9,10,11,12,13,14,15],a.TRANSITION=[19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,17408,19288,17439,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,22126,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17672,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,19469,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,36919,18234,18262,18278,18294,18320,18336,18361,18397,18419,18432,18304,18448,18485,18523,18553,18583,18599,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,18825,18841,18871,18906,18944,18960,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19074,36169,17439,36866,17466,36890,36866,22314,19105,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,22126,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17672,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,19469,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,36919,18234,18262,18278,18294,18320,18336,18361,18397,18419,18432,18304,18448,18485,18523,18553,18583,18599,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,18825,18841,18871,18906,18944,18960,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22182,19288,19121,36866,17466,18345,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19273,19552,19304,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19332,17423,19363,36866,17466,17537,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,18614,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,19391,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,19427,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36154,19288,19457,36866,17466,17740,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22780,19288,19457,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22375,22197,18469,36866,17466,36890,36866,21991,24018,22987,17556,17575,22288,17486,17509,17525,18373,21331,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,19485,19501,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19537,22390,19568,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19596,19611,19457,36866,17466,36890,36866,18246,19627,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22242,20553,19457,36866,17466,36890,36866,18648,30477,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36472,19288,19457,36866,17466,17809,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,21770,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,19643,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,19672,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,20538,19288,19457,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,17975,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22345,19288,19457,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19726,19742,21529,24035,23112,26225,23511,27749,27397,24035,34360,24035,24036,23114,35166,23114,23114,19758,23511,35247,23511,23511,28447,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,24254,19821,23511,23511,23511,23511,23512,19441,36539,24035,24035,24035,24035,19846,19869,23114,23114,23114,28618,32187,19892,23511,23511,23511,34585,20402,36647,24035,24035,24036,23114,33757,23114,23114,23029,20271,23511,27070,23511,23511,30562,24035,24035,29274,26576,23114,23114,31118,23036,29695,23511,23511,32431,23634,30821,24035,23110,19913,23114,23467,31261,23261,34299,19932,24035,32609,19965,35389,19984,27689,19830,29391,29337,20041,22643,35619,33728,20062,20121,20166,35100,26145,20211,23008,19876,20208,20227,25670,20132,26578,27685,20141,20243,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36094,19288,19457,36866,17466,21724,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22735,19552,20287,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22750,19288,21529,24035,23112,28056,23511,29483,28756,24035,24035,24035,24036,23114,23114,23114,23114,20327,23511,23511,23511,23511,31156,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,24254,20371,23511,23511,23511,23511,27443,20395,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,29457,29700,23511,23511,23511,23511,33444,20402,24035,24035,24035,24036,23114,23114,23114,23114,28350,20421,23511,23511,23511,23511,25645,24035,24035,24035,26576,23114,23114,23114,20447,20475,23511,23511,23511,23634,24035,24035,23110,23114,23114,20499,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,20523,22257,20569,20783,21715,17603,20699,20837,20614,20630,21149,20670,21405,17486,17509,17525,18373,19179,20695,20716,20732,20755,19194,18042,21641,20592,20779,20598,21412,17470,17591,20896,17468,17619,20799,20700,21031,20744,20699,20828,18075,21259,20581,20853,18048,20868,20884,17756,17784,17800,17825,17854,21171,21200,20931,20947,21378,20955,20971,18086,20645,21002,20986,18178,17960,18012,18381,18064,29176,21044,21438,21018,21122,21393,21060,21844,21094,20654,17493,18150,18166,18214,25967,20763,21799,21110,21830,21138,21246,21301,18336,18361,21165,21187,20812,21216,21232,21287,21317,18553,21347,21363,21428,21454,21271,21483,21499,21515,21575,21467,18712,21591,21633,21078,18189,18198,20679,21657,21701,21074,21687,21740,21756,21786,21815,21860,21876,21892,21946,21962,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36457,19288,19457,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,36813,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,21981,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,22151,22007,18884,17900,17922,17944,18178,17960,18012,18381,18064,27898,17884,18890,17906,17928,22042,25022,18130,36931,36963,17493,18150,18166,22070,22112,25026,18134,36935,18262,18278,18294,18320,18336,18361,22142,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36109,19288,18469,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22167,19288,19457,36866,17466,17768,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22227,36487,22273,36866,17466,36890,36866,19316,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18749,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,22304,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,19580,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22330,19089,19457,36866,17466,18721,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22765,19347,19457,36866,17466,36890,36866,18114,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,24035,23112,32618,23511,29483,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,29116,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,27443,22493,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34541,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,22839,23511,23511,23511,23511,25645,24035,24035,24035,26576,23114,23114,23114,32683,22516,23511,23511,23511,22540,24035,24035,23110,23114,23114,20499,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,24035,23112,32618,23511,29483,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,29116,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,27443,22493,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34564,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,22839,23511,23511,23511,23511,25645,24035,24035,24035,26576,23114,23114,23114,32683,22516,23511,23511,23511,23634,24035,24035,23110,23114,23114,20499,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,24035,23112,32618,23511,29483,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,29908,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,27443,22493,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34564,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,22839,23511,23511,23511,23511,25645,24035,24035,24035,26576,23114,23114,23114,32683,22516,23511,23511,23511,23634,24035,24035,23110,23114,23114,20499,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,24035,23112,32618,23511,29483,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,29116,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,27443,22561,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34564,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,22839,23511,23511,23511,23511,25645,24035,24035,24035,26576,23114,23114,23114,32683,22516,23511,23511,23511,23634,24035,24035,23110,23114,23114,20499,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,24035,23112,23837,23511,29483,29939,24035,24035,24035,24036,23114,23114,23114,23114,22584,23511,23511,23511,23511,29116,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,27443,22493,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34564,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,22839,23511,23511,23511,23511,25645,24035,24035,24035,26576,23114,23114,23114,32683,22516,23511,23511,23511,23634,24035,24035,23110,23114,23114,20499,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,24035,23112,32618,23511,31507,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,28306,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,23512,24694,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34585,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,20271,23511,23511,23511,23511,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36442,19288,21605,24035,23112,28137,23511,31507,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,28306,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,23512,24694,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34585,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,20271,23511,23511,23511,23511,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,24035,23112,32618,23511,31507,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,28306,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,23512,24694,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34585,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,20271,23511,23511,23511,23511,31568,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22690,19288,19457,36866,17466,36890,36866,21991,27584,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,22659,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22360,19552,19457,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22675,22811,19457,36866,17466,36890,36866,19133,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,22827,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36139,19288,19457,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36064,19288,22865,22881,32031,22897,22913,22956,29939,24035,24035,24035,23003,23114,23114,23114,23024,22420,23511,23511,23511,23052,29116,23073,29268,24035,25563,26915,23106,23131,23114,23114,23159,23181,23197,23248,23511,23511,23282,23305,22493,32364,24035,33472,30138,26325,31770,33508,27345,33667,23114,23321,23473,23351,35793,36576,23511,23375,22500,24145,24035,29197,20192,24533,23440,23114,19017,23459,22839,23489,23510,23511,33563,23528,32076,25389,24035,26576,23561,23583,23114,32683,22516,23622,23655,23511,23634,35456,37144,23110,23683,34153,20499,32513,25824,23705,24035,24035,23111,23114,19874,27078,33263,19830,24035,23112,19872,27741,23266,24036,23114,30243,20507,32241,20150,31862,27464,35108,23727,23007,35895,34953,26578,27685,20141,24569,31691,19787,33967,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36427,19552,21605,24035,23112,32618,23511,29483,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,29116,19803,24035,24035,24035,27027,26576,23114,23114,23114,31471,23756,22468,23511,23511,23511,34687,23772,22493,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34564,23788,24035,24035,24035,21559,23828,23114,23114,23114,25086,22839,23853,23511,23511,23511,23876,24035,24035,24035,26576,23114,23114,23114,32683,22516,23511,23511,23511,23634,24035,24035,23110,23114,23114,20499,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,31761,23909,23953,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36049,19288,21605,30825,23112,23987,23511,24003,31001,27617,24034,24035,24036,24052,24089,23114,23114,22420,24109,24168,23511,23511,29116,24188,27609,20017,29516,24035,26576,24222,19968,23114,24252,33811,22468,24270,33587,23511,24320,27443,22493,24035,24035,24035,24035,24339,23113,23114,23114,23114,28128,28618,29700,23511,23511,23511,28276,34564,20402,24035,24035,32929,24036,23114,23114,23114,24357,23029,22839,23511,23511,23511,24377,25645,24035,34112,24035,26576,23114,26643,23114,32683,22516,23511,25638,23511,23711,24035,24395,27809,23114,24414,20499,24432,30917,23628,24035,30680,23111,23114,30233,27078,25748,24452,24035,23112,19872,27741,23266,24036,23114,24475,19829,26577,26597,26154,24519,24556,24596,23007,20046,20132,26578,24634,20141,24569,31691,24679,24727,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36412,19288,21605,19943,34861,32618,26027,29483,32016,32050,36233,24776,35574,24801,24819,32671,31289,22420,24868,24886,20087,26849,29116,19803,24035,24035,24035,36228,26576,23114,23114,23114,24981,33811,22468,23511,23511,23511,29028,27443,22493,24923,27965,24035,24035,32797,24946,23443,23114,23114,29636,24997,22849,28252,23511,23511,23511,25042,25110,24035,24035,34085,24036,25133,23114,23114,25152,23029,22839,25169,23511,36764,23511,25645,30403,24035,25186,26576,31806,24093,25212,32683,22516,32713,26245,34293,23634,24035,24035,23110,23114,23114,20499,23511,23261,23628,24035,32406,23111,23114,28676,30944,27689,25234,24035,23112,19872,37063,23266,24036,23114,30243,20379,26100,29218,20211,30105,25257,25284,23007,20046,20132,26578,27685,20141,24569,24834,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36034,19288,21671,25314,25072,25330,25346,25362,29939,29951,35288,29984,23812,27216,25405,25424,30456,22584,26292,25461,25480,31592,29116,25516,34963,25545,27007,25579,33937,25614,25661,25686,34872,25702,25718,25734,25769,25795,25811,25840,22493,26533,25856,24035,25876,30763,27481,25909,23114,28987,25936,25954,29700,25983,23511,31412,26043,26063,22568,29241,29592,26116,31216,35383,26170,34783,26194,26221,22839,26241,26261,22477,26283,26308,27306,31035,24655,26576,29854,33386,26341,32683,22516,32153,30926,26361,19996,26381,35463,26397,26424,34646,26478,35605,31386,26494,35567,31964,22940,23689,25218,30309,32289,19830,33605,23112,32109,27733,27084,24496,35886,35221,26525,36602,26549,26558,26574,26594,26613,26629,26666,26700,26578,27685,23740,24285,31691,26733,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36397,19552,18991,25887,28117,32618,26776,29483,29939,26802,24035,24035,24036,28664,23114,23114,23114,22420,30297,23511,23511,23511,29116,19803,24035,24035,24035,25559,26576,23114,23114,23114,30525,33811,22468,23511,23511,23511,28725,27443,22493,24035,24035,27249,24035,24035,23113,23114,23114,26827,23114,28618,29700,23511,23511,26845,23511,34564,20402,24035,24035,26979,24036,23114,23114,23114,24974,23029,22839,23511,23511,23511,26865,25645,24035,24035,24035,26576,23114,23114,23114,32683,22516,23511,23511,23511,23634,24035,24035,23110,23114,23114,20499,23511,23261,23628,33305,24035,25598,23114,19874,34253,27689,19830,24035,23112,19872,27741,23266,24036,23114,26886,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,26931,24569,26439,26947,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36019,19288,26995,24035,23112,32618,23511,31507,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,28306,27043,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,27061,23511,23511,23511,23511,23512,24694,24035,24035,29978,24035,24035,23113,23114,33114,23114,23114,30010,29700,23511,35913,23511,23511,34585,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,20271,23511,23511,23511,23511,30562,24035,24035,27155,26576,23114,23114,30447,23036,29695,23511,23511,30935,20099,24152,25529,27100,34461,27121,22625,29156,26009,27137,30422,31903,31655,28870,27171,32439,31731,19830,27232,22612,27265,26786,25494,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,20342,27288,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,27322,27339,28020,27361,27382,29939,24035,24035,32581,24036,23114,23114,23114,27425,22420,23511,23511,23511,27442,28306,19803,24035,24035,24035,24035,26710,23114,23114,23114,23114,32261,22468,23511,23511,23511,23511,35719,24694,29510,24035,24035,24035,24035,26717,23114,23114,23114,23114,28618,32217,23511,23511,23511,23511,34585,20402,24035,24035,24035,27459,23114,23114,23114,36252,23029,20271,23511,23511,23511,28840,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,27480,34483,28401,29761,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36382,19288,21605,27497,27517,28504,28898,27569,29939,29401,27600,27323,27633,19025,27662,23114,27705,22420,20483,27721,23511,27765,28306,19803,23540,24035,24610,27781,27805,26650,23114,28573,32990,25920,22468,26870,23511,26684,34262,34737,25057,34622,24035,24035,23971,24206,27825,27847,23114,23114,27865,27885,35766,27914,23511,23511,32766,32844,27934,28795,26909,27955,26092,27988,25445,28005,28036,28052,21965,23511,32196,19897,28072,28102,36534,21541,23801,28153,28180,28197,28221,23036,32695,28251,28268,28292,23667,34825,23930,24580,28322,28344,31627,28366,25996,23628,24035,24035,23111,23114,19874,27078,27689,35625,33477,33359,27674,28393,33992,24036,23114,30243,19829,28417,28433,28463,23008,19876,20208,23007,20046,20132,28489,28520,20141,24569,31691,19787,28550,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,24035,23112,32618,23511,31507,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,28306,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,23512,24694,28589,24035,24035,24035,24035,28608,23114,23114,23114,23114,28618,20431,23511,23511,23511,23511,34585,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,20271,23511,23511,23511,23511,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36004,19288,28634,31951,28565,28702,28718,28741,32544,20175,28792,32086,20105,28811,29059,29862,28856,22420,28886,30354,23359,28922,28306,28952,23888,26320,36506,24035,29331,28968,36609,23114,29003,31661,27061,30649,27366,23511,29023,27918,24694,24035,24035,23893,33094,30867,23113,23114,23114,29044,34184,30010,29700,23511,23511,29081,29102,34585,20402,27789,24035,24035,24036,23114,29132,23114,23114,23029,20271,23511,29153,23511,23511,30562,30174,24035,24035,27409,25438,23114,23114,29172,36668,31332,23511,23511,29192,30144,24035,23110,30203,23114,23467,31544,23261,23628,24035,22545,23111,23114,29213,27078,27689,29234,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,29257,23008,19876,20208,28768,29290,29320,34776,29353,20141,22435,29378,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36367,19288,21605,34616,19006,32618,31497,31507,36216,20184,24035,34393,29424,34668,23114,34900,29447,22420,30360,23511,37089,29473,28306,19803,29499,24398,24035,24035,26576,31799,29532,29550,23114,33811,22468,32298,29571,31184,23511,23512,37127,36628,29589,24035,24135,24035,23113,29608,23114,27831,29634,28618,29652,30037,23511,24172,29671,34585,20402,24035,24035,24035,24036,23114,23114,23114,23114,29555,29690,23511,23511,23511,23511,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,29719,24035,23110,29738,23114,23467,34035,29756,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,29777,34364,28181,30243,29799,31920,27272,27185,23008,31126,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29828,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,35989,19552,19687,35139,28649,29878,29894,29924,29939,23224,23085,31969,24036,35173,24752,24803,23114,22420,31190,30318,24870,23511,28306,29967,23967,24035,24035,24035,26576,3e4,23114,23114,23114,33811,22468,30026,23511,23511,23511,23512,26078,24035,24035,24035,30053,37137,30071,23114,23114,33368,25136,28618,30723,23511,23511,37096,31356,34585,20402,30092,30127,30160,24036,35740,30219,24960,30259,23029,20271,34042,30285,30342,30376,23289,30055,30400,30419,30438,32640,33532,33514,30472,18792,26267,24323,23057,30493,23639,20008,30196,33188,30517,20075,23511,30541,23628,30578,33928,28776,30594,19874,30610,30637,19830,30677,27646,19872,25779,23266,23232,35016,30243,30696,29812,30712,30746,27206,30779,30807,23007,33395,20132,26578,27685,31703,22928,31691,19787,31079,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36352,19288,23335,30841,26131,30888,30904,30986,29939,24035,24704,31017,20025,23114,26178,31051,31095,22420,23511,22524,31142,31172,28534,31206,35497,25196,24035,28592,24503,23114,31239,31285,23114,31305,31321,31355,31372,31407,23511,30556,24694,24035,27501,19805,24035,24035,23113,23114,31428,24066,23114,28618,29700,23511,31837,18809,23511,34585,31448,24035,24035,24035,23090,23114,23114,23114,23114,31619,35038,23511,23511,23511,23511,33714,24035,33085,24035,29431,23114,31467,23114,23143,31487,23511,31523,23511,35195,36783,24035,30111,23567,23114,23467,31543,31560,23628,24035,24035,23111,23114,19874,30953,31584,34508,24035,31608,26345,37055,23266,31643,31677,31719,31747,31786,31822,26898,23008,19876,31859,23007,20046,20132,26578,27685,20141,24569,31691,31878,31936,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,35974,19288,21605,27972,35663,31985,29655,32001,36715,24785,25893,23545,31912,19853,19916,25938,24540,22420,31843,29674,29573,32735,28936,19803,24035,24035,32047,24035,26576,23114,23114,27544,23114,33811,22468,23511,23511,32161,23511,23512,32066,24035,33313,24035,24035,24035,23113,27426,32102,23114,23114,28618,32125,23511,32144,23511,23511,33569,20402,24035,27045,24035,24036,23114,23114,28328,23114,30076,32177,23511,23511,30384,23511,30562,24035,24035,24035,26576,23114,23114,23114,23595,32212,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,22635,25753,32233,32257,32277,19829,26577,26597,20211,23008,19876,32322,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,32352,35285,32380,34196,33016,30661,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,28306,32404,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,32422,23511,23511,23511,23511,23512,24694,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,30269,29700,23511,23511,23511,23511,34585,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,20271,23511,23511,23511,23511,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,19949,24035,23111,32455,19874,31269,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36337,19552,19209,21617,26509,32475,32491,32529,29939,24035,32578,25241,32597,23114,32634,29007,32656,22420,23511,32729,26365,32751,28306,32788,32882,24035,24035,32813,36727,23114,33182,23114,27553,33235,32829,23511,32706,23511,28906,28377,26962,32881,32904,32898,32920,24035,32953,23114,32977,26408,23114,28164,33006,23511,33039,35774,23511,32306,20402,33076,30872,24035,24036,25408,33110,28979,23114,23029,20271,35835,33130,33054,23511,30562,33148,24035,24035,33167,23114,23114,33775,23036,20459,23511,23511,25464,24646,24035,24035,22446,23114,23114,25627,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,31391,33204,33220,33251,33287,26577,26597,20211,33329,19876,33345,23007,20046,20132,26578,27685,28473,22599,31691,33411,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,35959,19288,21907,27243,29843,32618,33427,31507,29939,33460,34090,24035,24036,33493,24416,33530,23114,22420,33548,24379,33585,23511,28306,19803,33603,24202,24035,24035,25593,33749,28205,23114,23114,32388,22468,33853,33060,23511,23511,31339,33621,24035,24035,34397,24618,30757,33663,23114,23114,33683,35684,28618,26678,23511,23511,32506,33699,34585,20402,24035,32562,26973,24036,23114,23114,33377,33773,23029,20271,23511,23511,30621,23511,23860,24035,33791,21553,26576,36558,23114,33809,23036,32857,26047,23511,33827,23634,24035,24035,23110,23114,23114,31252,23511,33845,23628,24035,24459,23111,23114,33869,27078,30791,29783,24035,24742,19872,33895,23266,26462,19710,33879,33919,26577,26597,24123,24930,21930,20208,30501,33953,25268,20252,33983,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36322,19552,23390,33634,35154,34008,34024,34058,35544,34106,34128,26811,33151,34144,34169,34212,23114,34228,34244,34278,34315,23511,34331,34347,34380,34413,24035,24663,26576,34429,34453,34477,29534,33811,22468,34499,34524,34557,25170,34580,35436,23937,34601,24035,24341,26453,23113,34638,34662,23114,24236,28618,34684,34703,34729,23511,35352,34753,34799,24035,34815,32558,34848,34888,35814,34923,23165,29137,23606,30326,30730,34939,33023,30562,36848,34979,24035,24847,34996,23114,23114,35032,29695,35054,23511,23511,35091,33296,35124,24296,28235,24361,36276,32772,35067,35189,27301,30855,24852,22452,35211,35237,35316,25500,35270,23405,24304,35304,29362,24036,23114,35332,19829,26577,26597,20211,23008,19876,20208,35368,28823,23920,32336,35405,20141,24569,31691,35421,35479,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,35944,22795,21605,33647,35877,35513,30962,35529,34073,35557,24035,24035,20405,31107,23114,23114,23114,35590,34713,23511,23511,23511,35641,19803,29408,32937,25298,24035,35657,23115,27849,24760,35679,26205,22468,23511,35700,24907,24901,35075,31893,34980,24035,24035,24035,24035,23113,35009,23114,23114,23114,28618,35716,30970,23511,23511,23511,34585,23215,24035,24035,24035,24036,35735,23114,23114,23114,27105,35756,35790,23511,23511,23511,35254,35446,24035,24035,31223,35809,23114,23114,23036,36825,35830,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,31031,20355,19872,33903,23266,24036,23114,28686,19829,26577,26597,20211,23008,23424,20208,24711,31065,24486,26578,27685,20141,19773,35851,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36307,19288,21605,35494,19702,32618,33437,31507,29939,25117,24035,27939,24036,27869,23114,26829,23114,22420,23494,23511,33132,23511,28306,19803,24035,34832,24035,24035,26576,23114,25153,23114,23114,33811,22468,23511,23511,35911,23511,23512,24694,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34585,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,20271,23511,23511,23511,23511,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,35929,19288,21605,25860,23112,36185,23511,36201,29939,24035,24035,24035,24036,23114,23114,23114,23114,22420,23511,23511,23511,23511,28306,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,23512,26748,24035,24035,24035,24035,24035,36249,23114,23114,23114,23114,28618,28835,23511,23511,23511,23511,34585,20402,24035,27151,24035,26760,23114,27989,23114,23114,36268,20271,23511,24436,23511,29703,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36292,19288,21605,36503,21922,32618,34534,31507,36522,24035,33793,24035,35864,23114,23114,36555,23417,22420,23511,23511,36574,26020,28306,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,33811,22468,23511,23511,23511,23511,23512,36592,24035,24035,36625,24035,24035,23113,23114,32961,23114,23114,29618,29700,23511,29086,23511,23511,34585,20402,36644,24035,24035,24036,29740,23114,23114,23114,29065,36663,31527,23511,23511,23511,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36079,19288,21605,31451,23112,36684,23511,36700,29939,24035,24035,24035,30185,23114,23114,23114,27526,22420,23511,23511,23511,32865,28306,19803,36743,24035,27017,24035,26576,27535,23114,31432,23114,33811,22468,33271,23511,32128,23511,23512,24694,24035,27196,24035,24035,24035,23113,32459,23114,23114,23114,28618,29700,33829,36762,23511,23511,34585,20402,24035,36746,24035,29722,23114,23114,34437,23114,34907,20271,23511,23511,18801,23511,23206,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,36837,24035,24035,33739,23114,23114,25094,23511,23261,23628,24035,36780,23111,24073,19874,27078,35344,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22720,19288,36799,36866,17466,36890,36864,21991,22211,22987,17556,17575,22288,17486,17509,17525,18373,17631,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,36883,36906,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,22705,19288,19457,36866,17466,36890,36866,19375,22971,22987,17556,17575,22288,17486,17509,17525,18373,18855,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36124,19288,36951,36866,17466,36890,36866,21991,22404,22987,17556,17575,22288,17486,17509,17525,18373,18567,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,36979,36995,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36139,19288,19457,36866,17466,36890,36866,21991,22971,22987,17556,17575,22288,17486,17509,17525,18373,18027,22984,17553,17572,22285,18462,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,17619,22083,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,36139,19288,21529,24035,23112,23033,23511,31507,25377,24035,24035,24035,24036,23114,23114,23114,23114,37040,23511,23511,23511,23511,28086,19803,24035,24035,24035,24035,26576,23114,23114,23114,23114,24254,37079,23511,23511,23511,23511,23512,34766,24035,24035,24035,24035,24035,23113,23114,23114,23114,23114,28618,29700,23511,23511,23511,23511,34585,20402,24035,24035,24035,24036,23114,23114,23114,23114,23029,20271,23511,23511,23511,23511,30562,24035,24035,24035,26576,23114,23114,23114,23036,29695,23511,23511,23511,23634,24035,24035,23110,23114,23114,23467,23511,23261,23628,24035,24035,23111,23114,19874,27078,27689,19830,24035,23112,19872,27741,23266,24036,23114,30243,19829,26577,26597,20211,23008,19876,20208,23007,20046,20132,26578,27685,20141,24569,31691,19787,29304,20268,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,37112,37160,18469,36866,17466,36890,36866,17656,37174,22987,17556,17575,22288,17486,17509,17525,18373,18537,22984,17553,17572,22285,18780,17990,18622,19411,20306,17996,17689,17470,17591,20896,17468,36883,36906,36867,19404,20299,36866,17647,17862,18921,19514,17705,20311,37017,17728,17756,17784,17800,17825,17854,18403,18928,19521,17712,37008,37024,17878,18884,17900,17922,17944,18178,17960,18012,18381,18064,18218,17884,18890,17906,17928,18102,25022,18130,36931,36963,17493,18150,18166,18214,25010,25026,18134,36935,18262,18278,18294,18320,18336,18361,18397,18274,22096,18304,18448,18485,18523,18553,18583,19149,18638,18497,19656,18664,18680,18507,18696,19164,18712,18737,17681,22026,20906,20915,22054,17838,17450,22022,18765,19225,18841,18871,18906,19241,19257,18976,19041,19056,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,19058,53264,18,49172,57366,24,8192,28,102432,127011,110630,114730,106539,127011,127011,127011,53264,18,18,0,0,57366,0,24,24,24,0,28,28,28,28,102432,0,0,127011,0,2220032,110630,0,0,0,114730,106539,0,2170880,2170880,2170880,2170880,0,0,0,2170880,2170880,2170880,3002368,2170880,2170880,2170880,2170880,2170880,2170880,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2576384,2215936,2215936,2215936,2416640,2424832,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2543616,2215936,2215936,2215936,2215936,2215936,2629632,2215936,2617344,2215936,2215936,2215936,2215936,2215936,2215936,2691072,2215936,2707456,2215936,2715648,2215936,2723840,2764800,2215936,2215936,2797568,2215936,2822144,2215936,2215936,2854912,2215936,2215936,2215936,2912256,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,0,0,180224,0,0,2174976,0,0,2170880,2617344,2170880,2170880,2170880,2170880,2170880,2170880,2691072,2170880,2707456,2170880,2715648,2170880,2723840,2764800,2170880,2170880,2797568,2170880,2170880,2797568,2170880,2822144,2170880,2170880,2854912,2170880,2170880,2170880,2912256,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2215936,2215936,2215936,2215936,2609152,2215936,2215936,2215936,2215936,2215936,2215936,2654208,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,0,0,184599,280,0,2174976,0,0,2215936,3117056,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,544,0,546,0,0,2179072,0,0,0,552,0,0,2170880,2170880,2170880,3117056,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,0,0,0,2158592,2158592,2232320,2232320,0,2240512,2240512,0,0,0,644,0,0,0,0,0,0,2170880,2170880,2170880,2170880,2170880,2170880,3129344,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2215936,2215936,2215936,2400256,2215936,2215936,2215936,2215936,2711552,2170880,2170880,2170880,2170880,2170880,2760704,2768896,2789376,2813952,2170880,2170880,2170880,2875392,2904064,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2453504,2457600,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,167936,0,0,0,0,2174976,0,0,2215936,2215936,2514944,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2592768,2215936,2215936,2215936,2215936,2215936,2215936,2215936,32768,0,0,0,0,0,2174976,32768,0,2633728,2215936,2215936,2215936,2215936,2215936,2215936,2711552,2215936,2215936,2215936,2215936,2215936,2760704,2768896,2789376,2813952,2215936,2215936,2215936,2875392,2904064,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,0,0,0,0,0,2174976,0,65819,2215936,2215936,3031040,2215936,3055616,2215936,2215936,2215936,2215936,3092480,2215936,2215936,3125248,2215936,2215936,2215936,2215936,2215936,2215936,3002368,2215936,2215936,2170880,2170880,2494464,2170880,2170880,0,0,2215936,2215936,2215936,2215936,2215936,2215936,3198976,2215936,0,0,0,0,0,0,0,0,0,0,2170880,2170880,2170880,2170880,2170880,2170880,0,0,0,2379776,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2445312,2170880,2465792,2473984,2170880,2170880,2170880,2170880,2170880,2170880,2523136,2170880,2170880,2641920,2170880,2170880,2170880,2699264,2170880,2727936,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2879488,2170880,2916352,2170880,2170880,2170880,2879488,2170880,2916352,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3026944,2170880,2170880,3063808,2170880,2170880,3112960,2170880,2170880,3133440,2170880,2170880,3112960,2170880,2170880,3133440,2170880,2170880,2170880,3162112,2170880,2170880,3182592,3186688,2170880,2379776,2215936,2523136,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2596864,2215936,2621440,2215936,2215936,2641920,2215936,2215936,0,0,0,0,0,0,2179072,548,0,0,0,0,287,2170880,0,2170880,2170880,2170880,2400256,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3117056,2170880,2170880,2170880,2170880,2215936,2215936,2699264,2215936,2727936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2879488,2215936,2916352,2215936,2215936,0,0,0,0,188416,0,2179072,0,0,0,0,0,287,2170880,0,2171019,2171019,2171019,2400395,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,3031179,2171019,3055755,2171019,2171019,2215936,3133440,2215936,2215936,2215936,3162112,2215936,2215936,3182592,3186688,2215936,0,0,0,0,0,0,0,0,0,0,2171019,2171019,2171019,2171019,2171019,2171019,2523275,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2597003,2171019,2621579,2170880,2170880,2170880,3162112,2170880,2170880,3182592,3186688,2170880,0,0,0,2170880,2170880,2170880,2170880,2170880,2170880,0,53264,0,18,18,24,24,0,4337664,28,2170880,2170880,2170880,2629632,2170880,2170880,2170880,2170880,2719744,2744320,2170880,2170880,2170880,2834432,2838528,2170880,2908160,2170880,2170880,2936832,2215936,2215936,2215936,2215936,2719744,2744320,2215936,2215936,2215936,2834432,2838528,2215936,2908160,2215936,2215936,2936832,2215936,2215936,2985984,2215936,2994176,2215936,2215936,3014656,2215936,3059712,3076096,3088384,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2445312,2215936,2465792,2473984,2215936,2215936,2215936,2215936,2215936,2215936,2171166,2171166,2171166,2171166,2171166,0,0,0,2171166,2171166,2171166,2171166,2171166,2171166,2171019,2171019,2494603,2171019,2171019,2215936,2215936,2215936,3215360,0,0,0,0,0,0,0,0,0,0,0,0,0,2379776,2170880,2170880,2170880,2170880,2985984,2170880,2994176,2170880,2170880,3016168,2170880,3059712,3076096,3088384,2170880,2170880,2170880,2170880,2170880,2170880,0,53264,0,18,18,124,124,0,128,128,2170880,2170880,2170880,3215360,0,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2486272,2170880,2170880,2506752,2170880,2170880,2170880,2535424,2539520,2170880,2170880,2588672,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2920448,2170880,2170880,2170880,2990080,2170880,2170880,2170880,2170880,3051520,2170880,2170880,2170880,2170880,2170880,2170880,3170304,0,2387968,2392064,2170880,2170880,2433024,2170880,2170880,2170880,3170304,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2486272,2215936,2215936,2506752,2215936,2215936,2215936,2535424,2539520,2215936,2215936,2588672,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,0,0,0,0,0,2174976,136,0,2215936,2215936,2920448,2215936,2215936,2215936,2990080,2215936,2215936,2215936,2215936,3051520,2215936,2215936,2215936,2215936,2215936,2215936,2215936,3108864,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,3026944,2215936,2215936,3063808,2215936,2215936,3112960,2215936,2215936,2215936,3170304,0,0,0,0,0,0,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2453504,2457600,2170880,2170880,2170880,2486272,2170880,2170880,2506752,2170880,2170880,2170880,2537049,2539520,2170880,2170880,2588672,2170880,2170880,2170880,1508,2170880,2170880,2170880,1512,2170880,2920448,2170880,2170880,2170880,2990080,2170880,2170880,2170880,2461696,2170880,2170880,2170880,2510848,2170880,2170880,2170880,2170880,2580480,2170880,2605056,2637824,2170880,2170880,18,0,0,0,0,0,0,0,0,2220032,0,0,0,0,0,0,0,2170880,2170880,2170880,2170880,2686976,2748416,2170880,2170880,2170880,2924544,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3121152,2170880,2170880,3145728,3158016,3166208,2170880,2420736,2428928,2170880,2478080,2170880,2170880,2170880,2170880,0,0,2170880,2170880,2170880,2170880,2646016,2670592,0,0,3145728,3158016,3166208,2387968,2392064,2215936,2215936,2433024,2215936,2461696,2215936,2215936,2215936,2510848,2215936,2215936,0,0,0,0,0,0,2179072,0,0,0,0,0,0,2170880,2215936,2215936,2580480,2215936,2605056,2637824,2215936,2215936,2686976,2748416,2215936,2215936,2215936,2924544,2215936,2215936,0,0,0,0,0,0,2179072,0,0,0,0,0,286,2170880,2215936,2215936,2215936,2215936,2215936,3121152,2215936,2215936,3145728,3158016,3166208,2387968,2392064,2170880,2170880,2433024,2170880,2461696,2170880,2170880,2170880,2510848,2170880,2170880,1625,2170880,2170880,2580480,2170880,2605056,2637824,2170880,647,2170880,2170880,2170880,2400256,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2576384,2170880,2170880,2170880,2170880,2170880,2609152,2170880,2170880,2686976,0,0,2748416,2170880,2170880,0,2170880,2924544,2170880,2170880,2170880,2170880,2170880,2170880,0,53264,0,18,18,24,0,0,28,28,2170880,3141632,2215936,2420736,2428928,2215936,2478080,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2646016,2670592,2752512,2756608,2846720,2961408,2215936,2998272,2215936,3010560,2215936,2215936,2215936,3141632,2170880,2420736,2428928,2752512,2756608,0,2846720,2961408,2170880,2998272,2170880,3010560,2170880,2170880,2170880,3141632,2170880,2170880,2490368,2215936,2490368,2215936,2215936,2215936,2547712,2555904,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,0,0,0,0,0,2174976,245760,0,3129344,2170880,2170880,2490368,2170880,2170880,2170880,0,0,2547712,2555904,2170880,2170880,2170880,0,0,0,0,0,0,0,0,0,2220032,0,0,45056,0,2584576,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2170880,2170880,2170880,2170880,0,0,0,2170880,2170880,2158592,0,0,0,0,0,0,0,0,2220032,0,0,0,0,0,0,0,0,1482,97,97,97,97,97,97,97,1354,97,97,97,97,97,97,97,97,1148,97,97,97,97,97,97,97,2584576,2170880,2170880,1512,0,2170880,2170880,2170880,2170880,2170880,2170880,2441216,2170880,2527232,2170880,2600960,2170880,2850816,2170880,2170880,2170880,3022848,2215936,2441216,2215936,2527232,2215936,2600960,2215936,2850816,2215936,2215936,0,0,0,0,0,0,2179072,0,0,0,0,0,287,2170880,2215936,3022848,2170880,2441216,2170880,2527232,0,0,2170880,2600960,2170880,0,2850816,2170880,2170880,2170880,2170880,2170880,2523136,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2596864,2170880,2621440,2170880,2170880,2641920,2170880,2170880,2170880,3022848,2170880,2519040,2170880,2170880,2170880,2170880,2170880,2215936,2519040,2215936,2215936,2215936,2215936,2215936,2170880,2170880,2170880,2453504,2457600,2170880,2170880,2170880,2170880,2170880,2170880,2514944,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2592768,2170880,2170880,2519040,0,2024,2170880,2170880,0,2170880,2170880,2170880,2396160,2170880,2170880,2170880,2170880,3018752,2396160,2215936,2215936,2215936,2215936,3018752,2396160,0,2024,2170880,2170880,2170880,2170880,3018752,2170880,2650112,2965504,2170880,2215936,2650112,2965504,2215936,0,0,2170880,2650112,2965504,2170880,2551808,2170880,2551808,2215936,0,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,141,45,45,67,67,67,67,67,224,67,67,238,67,67,67,67,67,67,67,1288,67,67,67,67,67,67,67,67,67,469,67,67,67,67,67,67,0,2551808,2170880,2170880,2215936,0,2170880,2170880,2215936,0,2170880,2170880,2215936,0,2170880,2977792,2977792,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53264,18,49172,57366,24,8192,29,102432,127011,110630,114730,106539,127011,127011,127011,53264,18,18,49172,0,0,0,24,24,24,0,28,28,28,28,102432,127,0,0,0,0,0,0,0,0,0,0,140,2170880,2170880,2170880,2416640,0,0,0,0,2220032,110630,0,0,0,114730,106539,136,2170880,2170880,2170880,2170880,2170880,2170880,0,53264,0,4256099,4256099,24,24,0,28,28,2170880,2461696,2170880,2170880,2170880,2510848,2170880,2170880,0,2170880,2170880,2580480,2170880,2605056,2637824,2170880,2170880,2170880,2547712,2555904,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3129344,2215936,2215936,543,543,545,545,0,0,2179072,0,550,551,551,0,287,2171166,2171166,18,0,0,0,0,0,0,0,0,2220032,0,0,645,0,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,45,149,2584576,2170880,2170880,0,0,2170880,2170880,2170880,2170880,2170880,2170880,2441216,2170880,2527232,2170880,2600960,2519040,0,0,2170880,2170880,0,2170880,2170880,2170880,2396160,2170880,2170880,2170880,2170880,3018752,2396160,2215936,2215936,2215936,2215936,3018752,2396160,0,0,2170880,2170880,2170880,2170880,3018752,2170880,2650112,2965504,53264,18,49172,57366,24,155648,28,102432,155648,155687,114730,106539,0,0,155648,53264,18,18,49172,0,57366,0,24,24,24,0,28,28,28,28,102432,0,0,0,0,2220032,0,94208,0,0,114730,106539,0,2170880,2170880,2170880,2170880,2170880,2170880,0,53264,208896,18,278528,24,24,0,28,28,53264,18,159765,57366,24,8192,28,102432,0,110630,114730,106539,0,0,0,53264,18,18,49172,0,57366,0,24,24,24,0,28,139394,28,28,102432,131,0,0,0,2220032,110630,0,0,0,114730,106539,0,2170880,2170880,2170880,2170880,2170880,2170880,32768,53264,0,18,18,24,24,0,28,28,0,546,0,0,2183168,0,0,552,832,2170880,2170880,2170880,2400256,2170880,2170880,2170880,2170880,2170880,2609152,2170880,2170880,2170880,2170880,2170880,2170880,2654208,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2215936,2215936,2215936,2215936,2215936,2215936,3198976,2215936,0,1084,0,1088,0,1092,0,0,0,0,0,41606,0,0,0,0,45,45,45,45,45,937,0,0,0,0,2220032,110630,0,0,0,114730,106539,0,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3198976,2170880,0,0,644,0,0,0,2215936,3117056,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,826,0,828,0,0,2183168,0,0,830,0,2170880,2170880,2170880,2400256,2170880,2170880,2170880,2170880,2592768,2170880,2170880,2170880,2170880,2633728,2170880,2170880,2170880,2170880,2170880,2170880,2711552,2170880,2170880,2170880,2170880,2170880,2760704,53264,18,49172,57366,24,8192,28,172066,172032,110630,172066,106539,0,0,172032,53264,18,18,49172,0,57366,0,24,24,24,16384,28,28,28,28,102432,0,98304,0,0,2220032,110630,0,0,0,0,106539,0,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3198976,2170880,0,0,45056,0,0,0,53264,18,49172,57366,25,8192,30,102432,0,110630,114730,106539,0,0,176219,53264,18,18,49172,0,57366,0,124,124,124,0,128,128,128,128,102432,128,0,0,0,0,0,0,0,0,0,0,140,2170880,2170880,2170880,2416640,0,546,0,0,2183168,0,65536,552,0,2170880,2170880,2170880,2400256,2170880,2170880,2170880,2170880,2646016,2670592,2752512,2756608,2846720,2961408,2170880,2998272,2170880,3010560,2170880,2170880,2215936,2215936,2215936,2215936,2215936,2215936,3198976,2215936,0,0,0,0,0,0,65536,0,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,143,45,45,67,67,67,67,67,227,67,67,67,67,67,67,67,67,67,1824,67,1826,67,67,67,67,17,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,32768,120,121,18,18,49172,0,57366,0,24,24,24,0,28,28,28,28,102432,67,67,37139,37139,24853,24853,0,0,2179072,548,0,65820,65820,0,287,97,0,0,97,97,0,97,97,97,45,45,45,45,2033,45,67,67,67,67,0,0,97,97,97,97,45,45,67,67,0,369,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,978,0,546,70179,0,2183168,0,0,552,0,97,97,97,97,97,97,97,45,45,45,45,45,45,45,45,45,45,67,67,67,67,67,1013,67,67,67,67,67,67,67,67,67,67,473,67,67,67,67,483,67,67,1025,67,67,67,67,67,67,67,67,67,67,67,67,67,97,97,97,97,97,0,0,97,97,97,97,1119,97,97,97,97,97,97,97,97,97,97,97,97,1359,97,97,97,67,67,1584,67,67,67,67,67,67,67,67,67,67,67,67,67,497,67,67,1659,45,45,45,45,45,45,45,45,45,1667,45,45,45,45,45,169,45,45,45,45,45,45,45,45,45,45,45,1668,45,45,45,45,67,67,1694,67,67,67,67,67,67,67,67,67,67,67,67,67,774,67,67,1713,97,97,97,97,97,97,97,0,97,97,1723,97,97,97,97,0,45,45,45,45,45,45,1538,45,45,45,45,45,1559,45,45,1561,45,45,45,45,45,45,45,687,45,45,45,45,45,45,45,45,448,45,45,45,45,45,45,67,67,67,67,1771,1772,67,67,67,67,67,67,67,67,97,97,97,97,0,0,0,97,67,67,67,67,67,1821,67,67,67,67,67,67,1827,67,67,67,0,0,0,0,0,0,97,97,1614,97,97,97,97,97,603,97,97,605,97,97,608,97,97,97,97,0,1532,45,45,45,45,45,45,45,45,45,45,450,45,45,45,45,67,67,97,97,97,97,97,97,0,0,1839,97,97,97,97,0,0,97,97,97,97,97,45,45,45,45,45,45,45,67,67,67,67,67,67,67,97,1883,97,1885,97,0,1888,0,97,97,0,97,97,1848,97,97,97,97,1852,45,45,45,45,45,45,45,384,391,45,45,45,45,45,45,45,385,45,45,45,45,45,45,45,45,1237,45,45,45,45,45,45,67,0,97,97,97,97,0,0,0,97,97,97,97,97,97,45,45,45,45,45,45,45,1951,45,45,45,45,45,45,45,45,67,67,67,67,1963,97,2023,0,97,97,0,97,97,97,45,45,45,45,45,45,67,67,1994,67,1995,67,67,67,67,67,67,97,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,97,97,0,0,0,0,2220032,110630,0,0,0,114730,106539,137,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2793472,2805760,2170880,2830336,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3031040,2170880,3055616,2170880,2170880,67,67,37139,37139,24853,24853,0,0,281,549,0,65820,65820,0,287,97,0,0,97,97,0,97,97,97,45,45,2031,2032,45,45,67,67,67,67,67,67,67,67,67,67,67,67,1769,67,0,546,70179,549,549,0,0,552,0,97,97,97,97,97,97,97,45,45,45,45,45,45,1858,45,641,0,0,0,0,41606,926,0,0,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,456,67,0,0,0,1313,0,0,0,1096,1319,0,0,0,0,97,97,97,97,97,97,97,97,1110,97,97,97,97,67,67,67,67,1301,1476,0,0,0,0,1307,1478,0,0,0,0,0,0,0,0,97,97,97,97,1486,97,1487,97,1313,1480,0,0,0,0,1319,0,97,97,97,97,97,97,97,97,97,566,97,97,97,97,97,97,67,67,67,1476,0,1478,0,1480,0,97,97,97,97,97,97,97,45,1853,45,1855,45,45,45,45,53264,18,49172,57366,26,8192,31,102432,0,110630,114730,106539,0,0,225368,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,32768,53264,18,18,49172,163840,57366,0,24,24,229376,0,28,28,28,229376,102432,0,0,0,0,2220167,110630,0,0,0,114730,106539,0,2171019,2171019,2171019,2171019,2592907,2171019,2171019,2171019,2171019,2633867,2171019,2171019,2171019,2171019,2171019,2171019,2654347,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,3117195,2171019,2171019,2171019,2171019,2240641,0,0,0,0,0,0,0,0,368,0,140,2171019,2171019,2171019,2416779,2424971,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2617483,2171019,2171019,2642059,2171019,2171019,2171019,2699403,2171019,2728075,2171019,2171019,2171019,2171019,2171019,2171019,2171019,3215499,2215936,2215936,2215936,2215936,2215936,2437120,2215936,2215936,2171019,2822283,2171019,2171019,2855051,2171019,2171019,2171019,2912395,2171019,2171019,2171019,2171019,2171019,2171019,2171019,3002507,2171019,2171019,2215936,2215936,2494464,2215936,2215936,2215936,2171166,2171166,2416926,2425118,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2576670,2171166,2617630,2171166,2171166,2171166,2171166,2171166,2171166,2691358,2171166,2707742,2171166,2715934,2171166,2724126,2765086,2171166,2171166,2797854,2171166,2822430,2171166,2171166,2855198,2171166,2171166,2171166,2912542,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2793758,2806046,2171166,2830622,2171166,2171166,2171166,2171166,2171166,2171166,2171166,3109150,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2543902,2171166,2171166,2171166,2171166,2171166,2629918,2793611,2805899,2171019,2830475,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,0,546,0,0,2183168,0,0,552,0,2171166,2171166,2171166,2400542,2171166,2171166,2171166,0,2171166,2171166,2171166,0,2171166,2920734,2171166,2171166,2171166,2990366,2171166,2171166,2171166,2171166,3117342,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,0,53264,0,18,18,4329472,2232445,0,2240641,4337664,2711691,2171019,2171019,2171019,2171019,2171019,2760843,2769035,2789515,2814091,2171019,2171019,2171019,2875531,2904203,2171019,2171019,3092619,2171019,2171019,3125387,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,3199115,2171019,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2453504,2457600,2215936,2215936,2215936,2215936,2215936,2215936,2793472,2805760,2215936,2830336,2215936,2215936,2215936,2215936,2215936,2215936,2170880,2170880,2170880,2170880,2170880,0,0,0,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2494464,2170880,2170880,2171166,2171166,2634014,2171166,2171166,2171166,2171166,2171166,2171166,2711838,2171166,2171166,2171166,2171166,2171166,2760990,2769182,2789662,2814238,2171166,2171166,2171166,2875678,2904350,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,3199262,2171166,0,0,0,0,0,0,0,0,0,2379915,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2445451,2171019,2465931,2474123,2171019,2171019,3113099,2171019,2171019,3133579,2171019,2171019,2171019,3162251,2171019,2171019,3182731,3186827,2171019,2379776,2879627,2171019,2916491,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,3027083,2171019,2171019,3063947,2699550,2171166,2728222,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2879774,2171166,2916638,2171166,2171166,2171166,2171166,2171166,2609438,2171166,2171166,2171166,2171166,2171166,2171166,2654494,2171166,2171166,2171166,2171166,2171166,2445598,2171166,2466078,2474270,2171166,2171166,2171166,2171166,2171166,2171166,2523422,2171019,2437259,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2543755,2171019,2171019,2171019,2584715,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2908299,2171019,2171019,2936971,2171019,2171019,2986123,2171019,2994315,2171019,2171019,3014795,2171019,3059851,3076235,3088523,2171166,2171166,2986270,2171166,2994462,2171166,2171166,3014942,2171166,3059998,3076382,3088670,2171166,2171166,2171166,2171166,2171166,2171166,3027230,2171166,2171166,3064094,2171166,2171166,3113246,2171166,2171166,3133726,2506891,2171019,2171019,2171019,2535563,2539659,2171019,2171019,2588811,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2691211,2171019,2707595,2171019,2715787,2171019,2723979,2764939,2171019,2171019,2797707,2215936,2215936,3170304,0,0,0,0,0,0,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2453790,2457886,2171166,2171166,2171166,2486558,2171166,2171166,2507038,2171166,2171166,2171166,2535710,2539806,2171166,2171166,2588958,2171166,2171166,2171166,2171166,2515230,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2593054,2171166,2171166,2171166,2171166,3051806,2171166,2171166,2171166,2171166,2171166,2171166,3170590,0,2388107,2392203,2171019,2171019,2433163,2171019,2461835,2171019,2171019,2171019,2510987,2171019,2171019,2171019,2171019,2580619,2171019,2605195,2637963,2171019,2171019,2171019,2920587,2171019,2171019,2171019,2990219,2171019,2171019,2171019,2171019,3051659,2171019,2171019,2171019,2453643,2457739,2171019,2171019,2171019,2171019,2171019,2171019,2515083,2171019,2171019,2171019,2171019,2646155,2670731,2752651,2756747,2846859,2961547,2171019,2998411,2171019,3010699,2171019,2171019,2687115,2748555,2171019,2171019,2171019,2924683,2171019,2171019,2171019,2171019,2171019,2171019,2171019,3121291,2171019,2171019,2171019,3170443,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2486272,2215936,2215936,2506752,3145867,3158155,3166347,2387968,2392064,2215936,2215936,2433024,2215936,2461696,2215936,2215936,2215936,2510848,2215936,2215936,0,0,0,0,0,0,2179072,0,0,0,0,0,553,2170880,2215936,2215936,2215936,2215936,2215936,3121152,2215936,2215936,3145728,3158016,3166208,2388254,2392350,2171166,2171166,2433310,2171166,2461982,2171166,2171166,2171166,2511134,2171166,2171166,0,2171166,2171166,2580766,2171166,2605342,2638110,2171166,2171166,2171166,2171166,3031326,2171166,3055902,2171166,2171166,2171166,2171166,3092766,2171166,2171166,3125534,2171166,2171166,2171166,3162398,2171166,2171166,3182878,3186974,2171166,0,0,0,2171019,2171019,2171019,2171019,3109003,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2215936,2215936,2215936,2400256,2215936,2215936,2215936,2215936,2171166,2687262,0,0,2748702,2171166,2171166,0,2171166,2924830,2171166,2171166,2171166,2171166,2171166,2171166,2171166,2597150,2171166,2621726,2171166,2171166,2642206,2171166,2171166,2171166,2171166,3121438,2171166,2171166,3146014,3158302,3166494,2171019,2420875,2429067,2171019,2478219,2171019,2171019,2171019,2171019,2547851,2556043,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,3129483,2215936,2171019,3141771,2215936,2420736,2428928,2215936,2478080,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2646016,2670592,2752512,2756608,2846720,2961408,2215936,2998272,2215936,3010560,2215936,2215936,2215936,3141632,2171166,2421022,2429214,2171166,2478366,2171166,2171166,2171166,2171166,0,0,2171166,2171166,2171166,2171166,2646302,2670878,0,0,0,0,37,110630,0,0,0,114730,106539,0,45,45,45,45,45,1405,1406,45,45,45,45,1409,45,45,45,45,45,1415,45,45,45,45,45,45,45,45,45,45,1238,45,45,45,45,67,2752798,2756894,0,2847006,2961694,2171166,2998558,2171166,3010846,2171166,2171166,2171166,3141918,2171019,2171019,2490507,3129344,2171166,2171166,2490654,2171166,2171166,2171166,0,0,2547998,2556190,2171166,2171166,2171166,0,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,45,45,167,45,45,45,45,185,187,45,45,198,45,45,0,2171166,2171166,2171166,2171166,2171166,2171166,3129630,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2576523,2171019,2171019,2171019,2171019,2171019,2609291,2171019,2215936,2215936,2215936,2215936,2215936,2215936,3002368,2215936,2215936,2171166,2171166,2494750,2171166,2171166,0,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,45,147,2584576,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2171166,2171166,2171166,2171166,0,0,0,2171166,2171166,2171166,2171166,0,0,0,2171166,2171166,2171166,3002654,2171166,2171166,2171019,2171019,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,0,0,0,0,0,2175257,0,0,2584862,2171166,2171166,0,0,2171166,2171166,2171166,2171166,2171166,2171019,2441355,2171019,2527371,2171019,2601099,2171019,2850955,2171019,2171019,2171019,3022987,2215936,2441216,2215936,2527232,2215936,2600960,2215936,2850816,2215936,2215936,0,0,0,0,0,0,2179072,0,0,0,0,69632,287,2170880,2215936,3022848,2171166,2441502,2171166,2527518,0,0,2171166,2601246,2171166,0,2851102,2171166,2171166,2171166,2171166,2720030,2744606,2171166,2171166,2171166,2834718,2838814,2171166,2908446,2171166,2171166,2937118,3023134,2171019,2519179,2171019,2171019,2171019,2171019,2171019,2215936,2519040,2215936,2215936,2215936,2215936,2215936,2171166,2171166,2171166,3215646,0,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2171019,2486411,2171019,2171019,2171019,2629771,2171019,2171019,2171019,2171019,2719883,2744459,2171019,2171019,2171019,2834571,2838667,2171019,2519326,0,0,2171166,2171166,0,2171166,2171166,2171166,2396299,2171019,2171019,2171019,2171019,3018891,2396160,2215936,2215936,2215936,2215936,3018752,2396446,0,0,2171166,2171166,2171166,2171166,3019038,2171019,2650251,2965643,2171019,2215936,2650112,2965504,2215936,0,0,2171166,2650398,2965790,2171166,2551947,2171019,2551808,2215936,0,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,144,45,45,67,67,67,67,67,228,67,67,67,67,67,67,67,67,67,1929,97,97,97,97,0,0,0,2552094,2171166,2171019,2215936,0,2171166,2171019,2215936,0,2171166,2171019,2215936,0,2171166,2977931,2977792,2978078,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,1321,97,131072,0,0,0,0,0,0,0,0,0,2170880,2170880,2170880,2170880,2170880,2170880,0,53264,0,18,18,24,24,0,28,28,0,140,0,2379776,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2445312,2170880,2465792,2473984,2170880,2170880,2170880,2584576,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2170880,2170880,2170880,3162112,2170880,2170880,3182592,3186688,2170880,0,140,0,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3002368,2170880,2170880,2215936,2215936,2494464,2215936,2215936,2215936,2215936,2215936,2215936,3215360,544,0,0,0,544,0,546,0,0,0,546,0,0,2183168,0,0,552,0,2170880,2170880,2170880,2400256,2170880,2170880,2170880,0,2170880,2170880,2170880,0,2170880,2920448,2170880,2170880,2170880,2990080,2170880,2170880,552,0,0,0,552,0,287,0,2170880,2170880,2170880,2170880,2170880,2437120,2170880,2170880,18,0,0,0,0,0,0,0,0,2220032,0,0,644,0,2215936,2215936,3170304,544,0,546,0,552,0,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3198976,2170880,0,0,0,140,0,0,53264,18,49172,57366,24,8192,28,102432,249856,110630,114730,106539,0,0,32768,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,151640,53264,18,18,49172,0,57366,0,24,24,24,0,28,28,28,28,0,0,0,0,0,0,0,0,0,0,0,2170880,2170880,2170880,2416640,53264,18,49172,57366,24,8192,28,102432,253952,110630,114730,106539,0,0,32856,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,192512,53264,18,18,49172,0,57366,0,2232445,184320,2232445,0,2240641,2240641,184320,2240641,102432,0,0,0,221184,2220032,110630,0,0,0,114730,106539,0,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3108864,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2215936,0,0,0,45056,0,0,0,0,0,0,2170880,2170880,2170880,2170880,2170880,2170880,0,53264,0,18,18,24,24,0,127,127,53264,18,49172,258071,24,8192,28,102432,0,110630,114730,106539,0,0,32768,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,204800,53264,18,49172,57366,24,27,28,102432,0,110630,114730,106539,0,0,0,53264,18,49172,57366,24,8192,28,33,0,33,33,33,0,0,0,53264,18,18,49172,0,57366,0,24,24,24,16384,28,28,28,28,0,0,0,0,0,0,0,0,0,0,139,2170880,2170880,2170880,2416640,67,67,37139,37139,24853,24853,0,70179,0,0,0,65820,65820,369,287,97,0,0,97,97,0,97,97,97,45,2030,45,45,45,45,67,1573,67,67,67,67,67,67,67,67,67,67,67,1699,67,67,67,67,25403,546,70179,0,0,66365,66365,552,0,97,97,97,97,97,97,97,97,1355,97,97,97,1358,97,97,97,641,0,0,0,925,41606,0,0,0,0,45,45,45,45,45,45,45,1187,45,45,45,45,45,0,1480,0,0,0,0,1319,0,97,97,97,97,97,97,97,97,97,592,97,97,97,97,97,97,97,97,97,97,1531,45,45,45,45,45,45,45,45,45,45,45,45,1680,45,45,45,641,0,924,0,925,41606,0,0,0,0,45,45,45,45,45,45,1186,45,45,45,45,45,45,67,67,37139,37139,24853,24853,0,70179,282,0,0,65820,65820,369,287,97,0,0,97,97,0,97,2028,97,45,45,45,45,45,45,67,67,67,67,67,67,67,67,67,67,1767,67,67,67,0,0,0,0,0,0,1612,97,97,97,97,97,97,0,1785,97,97,97,97,97,97,0,0,97,97,97,97,1790,97,0,0,2170880,2170880,3051520,2170880,2170880,2170880,2170880,2170880,2170880,3170304,241664,2387968,2392064,2170880,2170880,2433024,53264,19,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,274432,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,270336,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,1134711,53264,18,49172,57366,24,8192,28,102432,0,1126440,1126440,1126440,0,0,1126400,53264,18,49172,57366,24,8192,28,102432,36,110630,114730,106539,0,0,217088,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,94,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,96,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,24666,53264,18,18,49172,0,57366,0,24,24,24,126,28,28,28,28,102432,53264,122,123,49172,0,57366,0,24,24,24,0,28,28,28,28,102432,2170880,2170880,4256099,0,0,0,0,0,0,0,0,2220032,0,0,0,0,0,0,0,0,1319,0,0,0,0,97,97,97,97,97,97,97,1109,97,97,97,97,1113,132,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,45,146,150,45,45,45,45,45,175,45,180,45,186,45,189,45,45,203,67,256,67,67,270,67,67,0,37139,24853,0,0,0,0,41098,65820,97,97,97,293,297,97,97,97,97,97,322,97,327,97,333,97,0,0,97,2026,0,2027,97,97,45,45,45,45,45,45,67,67,67,1685,67,67,67,67,67,67,67,1690,67,336,97,97,350,97,97,0,53264,0,18,18,24,24,356,28,28,0,0,0,0,0,0,0,0,0,0,140,2170880,2170880,2170880,2416640,2424832,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2617344,2170880,45,439,45,45,45,45,45,45,45,45,45,45,45,45,45,67,67,67,67,67,67,67,67,67,67,525,67,67,67,67,67,67,67,67,67,67,67,0,0,0,0,0,0,0,0,0,0,0,0,97,97,97,97,622,97,97,97,97,97,97,97,97,97,97,97,97,1524,97,97,1527,369,648,45,45,45,45,45,45,45,45,45,659,45,45,45,45,408,45,45,45,45,45,45,45,45,45,45,45,1239,45,45,45,67,729,45,45,45,45,45,45,45,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,762,67,746,67,67,67,67,67,67,67,67,67,759,67,67,67,67,0,0,0,1477,0,1086,0,0,0,1479,0,1090,67,67,796,67,67,799,67,67,67,67,67,67,67,67,67,67,67,67,1291,67,67,67,811,67,67,67,67,67,816,67,67,67,67,67,67,67,37689,544,25403,546,70179,0,0,66365,66365,552,833,97,97,97,97,97,97,97,97,1380,0,0,0,45,45,45,45,45,1185,45,45,45,45,45,45,45,386,45,45,45,45,45,45,45,45,1810,45,45,45,45,45,45,67,97,97,844,97,97,97,97,97,97,97,97,97,857,97,97,97,0,97,97,97,0,97,97,97,97,97,97,97,97,97,97,45,45,45,97,97,97,894,97,97,897,97,97,97,97,97,97,97,97,97,0,0,0,1382,45,45,45,97,909,97,97,97,97,97,914,97,97,97,97,97,97,97,923,67,67,1079,67,67,67,67,67,37689,1085,25403,1089,66365,1093,0,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,45,148,1114,97,97,97,97,97,97,1122,97,97,97,97,97,97,97,97,97,606,97,97,97,97,97,97,97,97,97,97,1173,97,97,97,97,97,12288,0,925,0,1179,0,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,145,45,45,67,67,67,67,67,1762,67,67,67,1766,67,67,67,67,67,67,528,67,67,67,67,67,67,67,67,67,97,97,97,97,97,0,1934,67,67,1255,67,67,67,67,67,67,67,67,67,67,67,67,67,1035,67,67,67,67,67,67,1297,67,67,67,67,67,67,0,0,0,0,0,0,97,97,97,97,97,97,97,97,97,97,1111,97,97,97,97,97,97,1327,97,97,97,97,97,97,97,97,97,97,97,97,33344,97,97,97,1335,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,0,97,97,1377,97,97,97,97,97,97,0,1179,0,45,45,45,45,670,45,45,45,45,45,45,45,45,45,45,45,430,45,45,45,45,67,67,1438,67,67,1442,67,67,67,67,67,67,67,67,67,67,67,67,1592,67,67,67,1451,67,67,67,67,67,67,67,67,67,67,1458,67,67,67,67,0,0,1305,0,0,0,0,0,1311,0,0,0,1317,0,0,0,0,0,0,0,97,97,1322,97,97,1491,97,97,1495,97,97,97,97,97,97,97,97,97,97,0,45,45,45,45,45,45,45,45,45,45,45,45,1551,45,1553,45,1504,97,97,97,97,97,97,97,97,97,97,1513,97,97,97,97,0,45,45,45,45,1536,45,45,45,45,1540,45,67,67,67,67,67,1585,67,67,67,67,67,67,67,67,67,67,67,67,1700,67,67,67,97,1648,97,97,97,97,97,97,97,97,0,45,45,45,45,45,45,45,45,45,45,1541,0,97,97,97,97,0,1940,0,97,97,97,97,97,97,45,45,2011,45,45,45,2015,67,67,2017,67,67,67,2021,97,67,67,812,67,67,67,67,67,67,67,67,67,67,67,37689,544,97,97,97,910,97,97,97,97,97,97,97,97,97,97,97,923,0,0,0,45,45,45,45,1184,45,45,45,45,1188,45,45,45,45,1414,45,45,45,1417,45,1419,45,45,45,45,45,443,45,45,45,45,45,45,453,45,45,67,67,67,67,1244,67,67,67,67,1248,67,67,67,67,67,67,67,0,37139,24853,0,0,0,282,41098,65820,97,1324,97,97,97,97,1328,97,97,97,97,97,97,97,97,97,0,0,930,45,45,45,45,97,97,97,97,1378,97,97,97,97,0,1179,0,45,45,45,45,671,45,45,45,45,45,45,45,45,45,45,45,975,45,45,45,45,67,67,1923,67,1925,67,67,1927,67,97,97,97,97,97,0,0,97,97,97,97,1985,45,45,45,45,45,45,1560,45,45,45,45,45,45,45,45,45,946,45,45,950,45,45,45,0,97,97,97,1939,0,0,0,97,1943,97,97,1945,97,45,45,45,669,45,45,45,45,45,45,45,45,45,45,45,45,990,45,45,45,67,257,67,67,67,67,67,0,37139,24853,0,0,0,0,41098,65820,337,97,97,97,97,97,0,53264,0,18,18,24,24,356,28,28,0,0,0,0,0,0,0,0,0,0,370,2170880,2170880,2170880,2416640,401,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,67,67,459,461,67,67,67,67,67,67,67,67,475,67,480,67,67,67,67,67,67,1054,67,67,67,67,67,67,67,67,67,67,1698,67,67,67,67,67,484,67,67,487,67,67,67,67,67,67,67,67,67,67,67,67,67,1459,67,67,97,556,558,97,97,97,97,97,97,97,97,572,97,577,97,97,0,0,1896,97,97,97,97,97,97,1903,45,45,45,45,983,45,45,45,45,988,45,45,45,45,45,45,1195,45,45,45,45,45,45,45,45,45,45,1549,45,45,45,45,45,581,97,97,584,97,97,97,97,97,97,97,97,97,97,97,97,97,1153,97,97,369,0,45,45,45,45,45,45,45,45,45,45,45,662,45,45,45,684,45,45,45,45,45,45,45,45,45,45,45,45,1004,45,45,45,67,67,67,749,67,67,67,67,67,67,67,67,67,761,67,67,67,67,67,67,1068,67,67,67,1071,67,67,67,67,1076,794,795,67,67,67,67,67,67,67,67,67,67,67,67,67,67,0,544,97,97,97,97,847,97,97,97,97,97,97,97,97,97,859,97,0,0,2025,97,20480,97,97,2029,45,45,45,45,45,45,67,67,67,1575,67,67,67,67,67,67,67,67,67,1775,67,67,67,97,97,97,97,892,893,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1515,97,993,994,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,992,67,67,67,1284,67,67,67,67,67,67,67,67,67,67,67,67,67,1607,67,67,97,1364,97,97,97,97,97,97,97,97,97,97,97,97,97,97,596,97,45,1556,1557,45,45,45,45,45,45,45,45,45,45,45,45,45,45,696,45,1596,1597,67,67,67,67,67,67,67,67,67,67,67,67,67,67,499,67,97,97,97,1621,97,97,97,97,97,97,97,97,97,97,97,97,97,1346,97,97,97,97,1740,97,97,97,97,45,45,45,45,45,45,45,45,45,45,1678,45,45,45,45,45,67,97,97,97,97,97,97,1836,0,97,97,97,97,97,0,0,97,97,97,1984,97,45,45,45,45,45,45,1808,45,45,45,45,45,45,45,45,67,739,67,67,67,67,67,744,45,45,1909,45,45,45,45,45,45,45,67,1917,67,1918,67,67,67,67,67,67,1247,67,67,67,67,67,67,67,67,67,67,532,67,67,67,67,67,67,1922,67,67,67,67,67,67,67,97,1930,97,1931,97,0,0,97,97,0,97,97,97,45,45,45,45,45,45,67,67,67,67,1576,67,67,67,67,1580,67,67,0,97,97,1938,97,0,0,0,97,97,97,97,97,97,45,45,45,699,45,45,45,704,45,45,45,45,45,45,45,45,987,45,45,45,45,45,45,45,67,67,97,97,97,97,0,0,97,97,97,2006,97,97,97,97,0,45,1533,45,45,45,45,45,45,45,45,45,1416,45,45,45,45,45,45,45,45,722,723,45,45,45,45,45,45,2045,67,67,67,2047,0,0,97,97,97,2051,45,45,67,67,0,0,0,0,925,41606,0,0,0,0,45,45,45,45,45,45,409,45,45,45,45,45,45,45,45,45,1957,45,67,67,67,67,67,1836,97,97,45,67,0,97,45,67,0,97,45,67,0,97,45,45,67,67,67,1761,67,67,67,1764,67,67,67,67,67,67,67,494,67,67,67,67,67,67,67,67,67,787,67,67,67,67,67,67,45,45,420,45,45,422,45,45,425,45,45,45,45,45,45,45,387,45,45,45,45,397,45,45,45,67,460,67,67,67,67,67,67,67,67,67,67,67,67,67,67,515,67,485,67,67,67,67,67,67,67,67,67,67,67,67,67,498,67,67,67,67,67,97,0,2039,97,97,97,97,97,45,45,45,45,1426,45,45,45,67,67,67,67,67,67,67,67,67,1689,67,67,67,97,557,97,97,97,97,97,97,97,97,97,97,97,97,97,97,612,97,582,97,97,97,97,97,97,97,97,97,97,97,97,97,595,97,97,97,97,97,896,97,97,97,97,97,97,97,97,97,97,885,97,97,97,97,97,45,939,45,45,45,45,943,45,45,45,45,45,45,45,45,45,45,1916,67,67,67,67,67,45,67,67,67,67,67,67,67,1015,67,67,67,67,1019,67,67,67,67,67,67,1271,67,67,67,67,67,67,1277,67,67,67,67,67,67,1287,67,67,67,67,67,67,67,67,67,67,804,67,67,67,67,67,1077,67,67,67,67,67,67,67,37689,0,25403,0,66365,0,0,0,0,0,0,0,0,2170880,2170880,2170880,2170880,2170880,2437120,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2543616,2170880,2170880,2170880,2170880,2170880,2629632,1169,97,1171,97,97,97,97,97,97,97,12288,0,925,0,1179,0,0,0,0,925,41606,0,0,0,0,45,45,45,45,936,45,45,67,67,214,67,220,67,67,233,67,243,67,248,67,67,67,67,67,67,1298,67,67,67,67,0,0,0,0,0,0,97,97,97,97,97,1617,97,0,0,0,45,45,45,1183,45,45,45,45,45,45,45,45,45,393,45,45,45,45,45,45,67,67,1243,67,67,67,67,67,67,67,67,67,67,67,67,67,1074,67,67,1281,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,776,1323,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,907,45,1412,45,45,45,45,45,45,45,1418,45,45,45,45,45,45,686,45,45,45,690,45,45,695,45,45,67,67,67,67,67,1465,67,67,67,67,67,67,67,67,67,67,67,97,97,97,1712,97,97,97,97,1741,97,97,97,45,45,45,45,45,45,45,45,45,426,45,45,45,45,45,45,67,67,67,1924,67,67,67,67,67,97,97,97,97,97,0,0,97,97,1983,97,97,45,45,1987,45,1988,45,0,97,97,97,97,0,0,0,1942,97,97,97,97,97,45,45,45,700,45,45,45,45,45,45,45,45,45,45,711,45,45,153,45,45,166,45,176,45,181,45,45,188,191,196,45,204,255,258,263,67,271,67,67,0,37139,24853,0,0,0,282,41098,65820,97,97,97,294,97,300,97,97,313,97,323,97,328,97,97,335,338,343,97,351,97,97,0,53264,0,18,18,24,24,356,28,28,0,0,0,0,0,0,0,0,41098,0,140,45,45,45,45,1404,45,45,45,45,45,45,45,45,45,45,1411,67,67,486,67,67,67,67,67,67,67,67,67,67,67,67,67,1251,67,67,501,67,67,67,67,67,67,67,67,67,67,67,67,513,67,67,67,67,67,67,1443,67,67,67,67,67,67,67,67,67,67,1263,67,67,67,67,67,97,97,583,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1526,97,598,97,97,97,97,97,97,97,97,97,97,97,97,610,97,97,0,97,97,1796,97,97,97,97,97,97,97,45,45,45,45,45,1744,45,45,45,369,0,651,45,653,45,654,45,656,45,45,45,660,45,45,45,45,1558,45,45,45,45,45,45,45,45,1566,45,45,681,45,683,45,45,45,45,45,45,45,45,691,692,694,45,45,45,716,45,45,45,45,45,45,45,45,45,45,45,45,709,45,45,712,45,714,45,45,45,718,45,45,45,45,45,45,45,726,45,45,45,733,45,45,45,45,67,67,67,67,67,67,67,67,67,67,67,67,1691,67,67,747,67,67,67,67,67,67,67,67,67,760,67,67,67,0,0,0,0,0,0,97,1613,97,97,97,97,97,97,1509,97,97,97,97,97,97,97,97,97,0,1179,0,45,45,45,45,67,764,67,67,67,67,768,67,770,67,67,67,67,67,67,67,67,97,97,97,97,0,0,0,1977,67,778,779,781,67,67,67,67,67,67,788,789,67,67,792,793,67,67,67,813,67,67,67,67,67,67,67,67,67,824,37689,544,25403,546,70179,0,0,66365,66365,552,0,836,97,838,97,839,97,841,97,97,97,845,97,97,97,97,97,97,97,97,97,858,97,97,0,1728,97,97,97,0,97,97,97,97,97,97,97,97,97,97,45,1802,45,97,97,862,97,97,97,97,866,97,868,97,97,97,97,97,97,0,0,97,97,1788,97,97,97,0,0,97,97,876,877,879,97,97,97,97,97,97,886,887,97,97,890,891,97,97,97,97,97,97,97,899,97,97,97,903,97,97,97,0,97,97,97,0,97,97,97,97,97,97,97,1646,97,97,97,97,911,97,97,97,97,97,97,97,97,97,922,923,45,955,45,957,45,45,45,45,45,45,45,45,45,45,45,45,195,45,45,45,45,45,981,982,45,45,45,45,45,45,989,45,45,45,45,45,170,45,45,45,45,45,45,45,45,45,45,411,45,45,45,45,45,67,1023,67,67,67,67,67,67,1031,67,1033,67,67,67,67,67,67,67,817,819,67,67,67,67,67,37689,544,67,1065,67,67,67,67,67,67,67,67,67,67,67,67,67,67,516,67,67,1078,67,67,1081,1082,67,67,37689,0,25403,0,66365,0,0,0,0,0,0,0,0,2171166,2171166,2171166,2171166,2171166,2437406,2171166,2171166,97,1115,97,1117,97,97,97,97,97,97,1125,97,1127,97,97,97,0,97,97,97,0,97,97,97,97,1644,97,97,97,0,97,97,97,0,97,97,1642,97,97,97,97,97,97,625,97,97,97,97,97,97,97,97,97,316,97,97,97,97,97,97,97,97,97,1159,97,97,97,97,97,97,97,97,97,97,97,97,97,1502,97,97,97,97,97,1172,97,97,1175,1176,97,97,12288,0,925,0,1179,0,0,0,0,925,41606,0,0,0,0,45,45,45,935,45,45,45,1233,45,45,45,1236,45,45,45,45,45,45,45,67,67,67,67,67,67,1873,67,67,45,45,1218,45,45,45,1223,45,45,45,45,45,45,45,1230,45,45,67,67,215,219,222,67,230,67,67,244,246,249,67,67,67,67,67,67,1882,97,97,97,97,0,0,0,97,97,97,97,97,97,45,1904,45,1905,45,67,67,67,67,67,1258,67,1260,67,67,67,67,67,67,67,67,67,495,67,67,67,67,67,67,67,67,1283,67,67,67,67,67,67,67,1290,67,67,67,67,67,67,67,818,67,67,67,67,67,67,37689,544,67,67,1295,67,67,67,67,67,67,67,67,0,0,0,0,0,0,2174976,0,0,97,97,97,1326,97,97,97,97,97,97,97,97,97,97,97,97,97,1514,97,97,97,97,97,1338,97,1340,97,97,97,97,97,97,97,97,97,97,97,1500,97,97,1503,97,1363,97,97,97,97,97,97,97,1370,97,97,97,97,97,97,97,563,97,97,97,97,97,97,578,97,1375,97,97,97,97,97,97,97,97,0,1179,0,45,45,45,45,685,45,45,45,45,45,45,45,45,45,45,45,1003,45,45,45,45,67,67,67,1463,67,67,67,67,67,67,67,67,67,67,67,67,67,1778,97,97,97,97,97,1518,97,97,97,97,97,97,97,97,97,97,97,97,609,97,97,97,45,1542,45,45,45,45,45,45,45,1548,45,45,45,45,45,1554,45,1570,1571,45,67,67,67,67,67,67,1578,67,67,67,67,67,67,67,1055,67,67,67,67,67,1061,67,67,1582,67,67,67,67,67,67,67,1588,67,67,67,67,67,1594,67,67,67,67,67,97,2038,0,97,97,97,97,97,2044,45,45,45,995,45,45,45,45,1e3,45,45,45,45,45,45,45,1809,45,1811,45,45,45,45,45,67,1610,1611,67,1476,0,1478,0,1480,0,97,97,97,97,97,97,1618,1647,1649,97,97,97,1652,97,1654,1655,97,0,45,45,45,1658,45,45,67,67,216,67,67,67,67,234,67,67,67,67,252,254,1845,97,97,97,97,97,97,97,45,45,45,45,45,45,45,45,945,45,947,45,45,45,45,45,67,67,67,67,67,1881,97,97,97,97,97,0,0,0,97,97,97,97,97,1902,45,45,45,45,45,45,1908,45,45,45,45,45,45,45,45,67,67,67,67,67,67,67,67,67,67,1921,67,67,67,67,67,67,67,67,97,97,97,97,97,0,0,0,97,97,0,97,1937,97,97,1940,0,0,97,97,97,97,97,97,1947,1948,1949,45,45,45,1952,45,1954,45,45,45,45,1959,1960,1961,67,67,67,67,67,67,1455,67,67,67,67,67,67,67,67,67,67,757,67,67,67,67,67,67,1964,67,1966,67,67,67,67,1971,1972,1973,97,0,0,0,97,97,1104,97,97,97,97,97,97,97,97,97,97,884,97,97,97,889,97,97,1978,97,0,0,1981,97,97,97,97,45,45,45,45,45,45,736,45,67,67,67,67,67,67,67,67,67,67,67,1018,67,67,67,45,67,67,67,67,0,2049,97,97,97,97,45,45,67,67,0,0,0,0,925,41606,0,0,0,0,45,933,45,45,45,45,1234,45,45,45,45,45,45,45,45,45,45,67,97,97,288,97,97,97,97,97,97,317,97,97,97,97,97,97,0,0,97,1787,97,97,97,97,0,0,45,45,378,45,45,45,45,45,390,45,45,45,45,45,45,45,424,45,45,45,431,433,45,45,45,67,1050,67,67,67,67,67,67,67,67,67,67,67,67,67,67,518,67,97,97,97,1144,97,97,97,97,97,97,97,97,97,97,97,97,632,97,97,97,97,97,97,97,1367,97,97,97,97,97,97,97,97,97,97,97,855,97,97,97,97,67,97,97,97,97,97,97,1837,0,97,97,97,97,97,0,0,0,1897,97,97,97,97,97,45,45,45,45,45,1208,45,45,45,45,45,45,45,45,45,45,724,45,45,45,45,45,97,2010,45,45,45,45,45,45,2016,67,67,67,67,67,67,2022,45,2046,67,67,67,0,0,2050,97,97,97,45,45,67,67,0,0,0,0,925,41606,0,0,0,0,932,45,45,45,45,45,1222,45,45,45,45,45,45,45,45,45,45,1227,45,45,45,45,45,133,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,45,45,701,702,45,45,705,706,45,45,45,45,45,45,703,45,45,45,45,45,45,45,45,45,719,45,45,45,45,45,725,45,45,45,369,649,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1216,25403,546,70179,0,0,66365,66365,552,834,97,97,97,97,97,97,97,1342,97,97,97,97,97,97,97,97,0,97,97,97,97,97,97,97,1799,97,97,45,45,45,1569,45,45,45,1572,67,67,67,67,67,67,67,67,67,67,67,0,0,0,1306,0,67,67,67,1598,67,67,67,67,67,67,67,67,1606,67,67,1609,97,97,97,1650,97,97,1653,97,97,97,0,45,45,1657,45,45,45,1206,45,45,45,45,45,45,45,45,45,45,45,45,1421,45,45,45,1703,67,67,67,67,67,67,67,67,67,67,97,97,1711,97,97,0,1895,0,97,97,97,97,97,97,45,45,45,45,45,958,45,960,45,45,45,45,45,45,45,45,1913,45,45,1915,67,67,67,67,67,67,67,466,67,67,67,67,67,67,481,67,45,1749,45,45,45,45,45,45,45,45,1755,45,45,45,45,45,173,45,45,45,45,45,45,45,45,45,45,974,45,45,45,45,45,67,67,67,67,67,1773,67,67,67,67,67,67,67,97,97,97,97,1886,0,0,0,97,97,67,2035,2036,67,67,97,0,0,97,2041,2042,97,97,45,45,45,45,1662,45,45,45,45,45,45,45,45,45,45,45,1397,45,45,45,45,151,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,437,205,45,67,67,67,218,67,67,67,67,67,67,67,67,67,67,67,1047,67,67,67,67,97,97,97,97,298,97,97,97,97,97,97,97,97,97,97,97,870,97,97,97,97,97,97,97,97,352,97,0,53264,0,18,18,24,24,0,28,28,0,0,0,0,0,0,365,0,41098,0,140,45,45,45,45,45,1427,45,45,67,67,67,67,67,67,67,1435,520,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1037,617,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,923,45,1232,45,45,45,45,45,45,45,45,45,45,45,45,45,67,67,67,67,1919,67,1759,45,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1021,45,154,45,162,45,45,45,45,45,45,45,45,45,45,45,45,964,45,45,45,206,45,67,67,67,67,221,67,229,67,67,67,67,67,67,67,67,530,67,67,67,67,67,67,67,67,755,67,67,67,67,67,67,67,67,785,67,67,67,67,67,67,67,67,802,67,67,67,807,67,67,67,97,97,97,97,353,97,0,53264,0,18,18,24,24,0,28,28,0,0,0,0,0,0,366,0,0,0,140,2170880,2170880,2170880,2416640,402,45,45,45,45,45,45,45,410,45,45,45,45,45,45,45,674,45,45,45,45,45,45,45,45,389,45,394,45,45,398,45,45,45,45,441,45,45,45,45,45,447,45,45,45,454,45,45,67,67,67,67,67,67,67,67,67,67,67,1768,67,67,67,67,67,488,67,67,67,67,67,67,67,496,67,67,67,67,67,67,67,1774,67,67,67,67,67,97,97,97,97,0,0,97,97,97,0,97,97,97,97,97,97,97,97,67,67,523,67,67,527,67,67,67,67,67,533,67,67,67,540,97,97,97,585,97,97,97,97,97,97,97,593,97,97,97,97,97,97,1784,0,97,97,97,97,97,97,0,0,97,97,97,97,97,97,0,0,0,18,18,24,24,0,28,28,97,97,620,97,97,624,97,97,97,97,97,630,97,97,97,637,713,45,45,45,45,45,45,721,45,45,45,45,45,45,45,45,1197,45,45,45,45,45,45,45,45,730,732,45,45,45,45,45,67,67,67,67,67,67,67,67,67,67,1581,67,45,67,67,67,67,1012,67,67,67,67,67,67,67,67,67,67,67,1059,67,67,67,67,67,1024,67,67,67,67,67,67,67,67,67,67,67,67,67,67,775,67,67,67,67,1066,67,67,67,67,67,67,67,67,67,67,67,67,479,67,67,67,67,67,67,1080,67,67,67,67,37689,0,25403,0,66365,0,0,0,0,0,0,0,287,0,0,0,287,0,2379776,2170880,2170880,97,97,97,1118,97,97,97,97,97,97,97,97,97,97,97,97,920,97,97,0,0,0,0,45,1181,45,45,45,45,45,45,45,45,45,45,45,432,45,45,45,45,45,45,1219,45,45,45,45,45,45,1226,45,45,45,45,45,45,959,45,45,45,45,45,45,45,45,45,184,45,45,45,45,202,45,1241,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1266,67,1268,67,67,67,67,67,67,67,67,67,67,67,67,1279,67,67,67,67,67,272,67,0,37139,24853,0,0,0,0,41098,65820,67,67,67,67,67,1286,67,67,67,67,67,67,67,67,67,1293,67,67,67,1296,67,67,67,67,67,67,67,0,0,0,0,0,281,94,0,0,97,97,97,1366,97,97,97,97,97,97,97,97,97,1373,97,97,18,0,139621,0,0,0,0,0,0,364,0,0,367,0,97,1376,97,97,97,97,97,97,97,0,0,0,45,45,1384,45,45,67,208,67,67,67,67,67,67,237,67,67,67,67,67,67,67,1069,1070,67,67,67,67,67,67,67,0,37140,24854,0,0,0,0,41098,65821,45,1423,45,45,45,45,45,45,67,67,1431,67,67,67,67,67,67,67,1083,37689,0,25403,0,66365,0,0,0,1436,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1830,67,1452,1453,67,67,67,67,1456,67,67,67,67,67,67,67,67,67,771,67,67,67,67,67,67,1461,67,67,67,1464,67,1466,67,67,67,67,67,67,1470,67,67,67,67,67,67,1587,67,67,67,67,67,67,67,67,1595,1489,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1129,97,1505,1506,97,97,97,97,1510,97,97,97,97,97,97,97,97,97,1163,1164,97,97,97,97,97,1516,97,97,97,1519,97,1521,97,97,97,97,97,97,1525,97,97,18,0,139621,0,0,0,0,0,0,364,0,0,367,41606,67,67,67,67,67,1586,67,67,67,67,67,67,67,67,67,67,67,1276,67,67,67,67,67,67,67,67,67,1600,67,67,67,67,67,67,67,67,67,67,67,1301,0,0,0,1307,97,97,1620,97,97,97,97,97,97,97,1627,97,97,97,97,97,97,913,97,97,97,97,919,97,97,97,0,97,97,97,1781,97,97,0,0,97,97,97,97,97,97,0,0,97,97,97,97,97,97,0,1792,1860,45,1862,1863,45,1865,45,67,67,67,67,67,67,67,67,1875,67,1877,1878,67,1880,67,97,97,97,97,97,1887,0,1889,97,97,18,0,139621,0,0,0,0,0,0,364,237568,0,367,0,97,1893,0,0,0,97,1898,1899,97,1901,97,45,45,45,45,45,2014,45,67,67,67,67,67,2020,67,97,1989,45,1990,45,45,45,67,67,67,67,67,67,1996,67,1997,67,67,67,67,67,273,67,0,37139,24853,0,0,0,0,41098,65820,67,67,97,97,97,97,0,0,97,97,2005,0,97,2007,97,97,18,0,139621,0,0,0,642,0,133,364,0,0,367,41606,0,97,97,2056,2057,0,2059,45,67,0,97,45,67,0,97,45,45,67,209,67,67,67,223,67,67,67,67,67,67,67,67,67,786,67,67,67,791,67,67,45,45,940,45,45,45,45,45,45,45,45,45,45,45,45,45,45,727,45,45,67,67,67,67,67,67,67,67,1016,67,67,67,67,67,67,67,67,37689,0,25403,0,66365,0,0,0,133,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,142,45,45,67,210,67,67,67,225,67,67,239,67,67,67,250,67,67,67,67,67,464,67,67,67,67,67,476,67,67,67,67,67,67,67,1709,67,67,67,97,97,97,97,97,97,0,0,97,97,97,97,97,1843,0,67,259,67,67,67,67,67,0,37139,24853,0,0,0,0,41098,65820,97,97,289,97,97,97,303,97,97,97,97,97,97,97,97,97,97,901,97,97,97,97,97,339,97,97,97,97,97,0,53264,0,18,18,24,24,0,28,28,0,358,0,0,0,0,0,0,41098,0,140,45,45,45,45,45,1953,45,1955,45,45,45,67,67,67,67,67,67,67,1687,1688,67,67,67,67,45,45,405,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1203,45,458,67,67,67,67,67,67,67,67,67,470,477,67,67,67,67,67,67,67,1970,97,97,97,1974,0,0,0,97,1103,97,97,97,97,97,97,97,97,97,97,97,1372,97,97,97,97,67,522,67,67,67,67,67,67,67,67,67,67,67,536,67,67,67,67,67,67,1696,67,67,67,67,67,67,67,1701,67,555,97,97,97,97,97,97,97,97,97,567,574,97,97,97,97,97,301,97,309,97,97,97,97,97,97,97,97,97,900,97,97,97,905,97,97,97,619,97,97,97,97,97,97,97,97,97,97,97,633,97,97,18,0,139621,0,0,362,0,0,0,364,0,0,367,41606,369,649,45,45,45,45,45,45,45,45,45,45,45,45,663,664,67,67,67,67,750,751,67,67,67,67,758,67,67,67,67,67,67,67,1272,67,67,67,67,67,67,67,67,67,1057,1058,67,67,67,67,67,67,67,67,797,67,67,67,67,67,67,67,67,67,67,67,67,512,67,67,67,97,97,97,97,895,97,97,97,97,97,97,97,97,97,97,97,902,97,97,97,97,67,67,1051,67,67,67,67,67,67,67,67,67,67,67,1062,67,67,67,67,67,491,67,67,67,67,67,67,67,67,67,67,67,1302,0,0,0,1308,97,97,97,97,1145,97,97,97,97,97,97,97,97,97,97,97,1139,97,97,97,97,1156,97,97,97,97,97,97,1161,97,97,97,97,97,1166,97,97,18,640,139621,0,641,0,0,0,0,364,0,0,367,41606,67,67,67,67,1257,67,67,67,67,67,67,67,67,67,67,67,0,0,1305,0,0,97,97,1337,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1630,97,67,1474,67,67,0,0,0,0,0,0,0,0,0,0,0,0,0,2380062,2171166,2171166,97,1529,97,97,0,45,45,45,45,45,45,45,45,45,45,45,1228,45,45,45,45,67,67,67,67,1707,67,67,67,67,67,67,97,97,97,97,97,0,0,0,97,1891,1739,97,97,97,97,97,97,45,45,45,45,45,45,45,45,45,1198,45,1200,45,45,45,45,97,97,1894,0,0,97,97,97,97,97,97,45,45,45,45,45,672,45,45,45,45,45,45,45,45,45,45,45,1420,45,45,45,45,67,67,1965,67,1967,67,67,67,97,97,97,97,0,1976,0,97,97,45,67,0,97,45,67,0,97,45,67,0,97,45,97,97,1979,0,0,97,1982,97,97,97,1986,45,45,45,45,45,735,45,45,67,67,67,67,67,67,67,67,67,67,67,67,67,1770,67,67,2e3,97,97,97,2002,0,97,97,97,0,97,97,97,97,97,97,1798,97,97,97,45,45,45,2034,67,67,67,67,97,0,0,2040,97,97,97,97,45,45,45,45,1752,45,45,45,1753,1754,45,45,45,45,45,45,383,45,45,45,45,45,45,45,45,45,675,45,45,45,45,45,45,438,45,45,45,45,45,445,45,45,45,45,45,45,45,45,67,1430,67,67,67,67,67,67,67,67,67,524,67,67,67,67,67,531,67,67,67,67,67,67,67,67,37689,0,25403,0,66365,0,0,1096,97,97,97,621,97,97,97,97,97,628,97,97,97,97,97,97,0,53264,0,18,18,24,24,356,28,28,665,45,45,45,45,45,45,45,45,45,676,45,45,45,45,45,942,45,45,45,45,45,45,45,45,45,45,707,708,45,45,45,45,763,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,809,810,67,67,67,67,783,67,67,67,67,67,67,67,67,67,67,67,0,1303,0,0,0,97,861,97,97,97,97,97,97,97,97,97,97,97,97,97,97,613,97,45,45,956,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1215,45,67,67,67,67,1027,67,67,67,67,1032,67,67,67,67,67,67,67,67,37689,0,25403,0,66365,0,0,1097,1064,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1075,67,1098,0,0,97,97,97,97,97,97,97,97,97,97,97,97,97,331,97,97,97,97,1158,97,97,97,97,97,97,97,97,97,97,97,97,97,594,97,97,1309,0,0,0,1315,0,0,0,0,0,0,0,0,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1374,97,45,45,1543,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1240,67,67,1583,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1252,67,97,97,97,1635,97,97,97,0,97,97,97,97,97,97,97,97,1800,97,45,45,45,97,97,1793,97,97,97,97,97,97,97,97,97,97,45,45,45,1743,45,45,45,1746,45,0,97,97,97,97,97,1851,97,45,45,45,45,1856,45,45,45,45,1864,45,45,67,67,1869,67,67,67,67,1874,67,0,97,97,45,67,2058,97,45,67,0,97,45,67,0,97,45,45,67,211,67,67,67,67,67,67,240,67,67,67,67,67,67,67,1444,67,67,67,67,67,67,67,67,67,509,67,67,67,67,67,67,67,67,67,268,67,67,67,0,37139,24853,0,0,0,0,41098,65820,97,97,290,97,97,97,305,97,97,319,97,97,97,330,97,97,18,640,139621,0,641,0,0,0,0,364,0,643,367,41606,97,97,348,97,97,97,0,53264,0,18,18,24,24,0,28,28,139621,0,0,0,0,364,0,367,41098,369,140,45,45,45,45,380,45,45,45,45,45,45,395,45,45,45,400,369,0,45,45,45,45,45,45,45,45,658,45,45,45,45,45,972,45,45,45,45,45,45,45,45,45,45,427,45,45,45,45,45,745,67,67,67,67,67,67,67,67,756,67,67,67,67,67,67,67,67,37689,1086,25403,1090,66365,1094,0,0,97,843,97,97,97,97,97,97,97,97,854,97,97,97,97,97,97,1121,97,97,97,97,1126,97,97,97,97,45,980,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1400,45,67,67,67,1011,67,67,67,67,67,67,67,67,67,67,67,0,1304,0,0,0,1190,45,45,1193,1194,45,45,45,45,45,1199,45,1201,45,45,45,45,1911,45,45,45,45,45,67,67,67,67,67,67,67,1579,67,67,67,67,45,1205,45,45,45,45,45,45,45,45,1211,45,45,45,45,45,984,45,45,45,45,45,45,45,45,45,45,45,1550,45,45,45,45,45,1217,45,45,45,45,45,45,1225,45,45,45,45,1229,45,45,45,1388,45,45,45,45,45,45,1396,45,45,45,45,45,444,45,45,45,45,45,45,45,45,45,67,67,1574,67,67,67,67,67,67,67,67,67,67,1590,67,67,67,67,67,1254,67,67,67,67,67,1259,67,1261,67,67,67,67,1265,67,67,67,67,67,67,1708,67,67,67,67,97,97,97,97,97,97,0,0,97,97,97,97,97,0,0,67,67,67,67,1285,67,67,67,67,1289,67,67,67,67,67,67,67,67,37689,1087,25403,1091,66365,1095,0,0,97,97,97,97,1339,97,1341,97,97,97,97,1345,97,97,97,97,97,561,97,97,97,97,97,573,97,97,97,97,97,97,1717,97,0,97,97,97,97,97,97,97,591,97,97,97,97,97,97,97,97,97,1329,97,97,97,97,97,97,97,97,97,97,1351,97,97,97,97,97,97,1357,97,97,97,97,97,588,97,97,97,97,97,97,97,97,97,97,568,97,97,97,97,97,97,97,1365,97,97,97,97,1369,97,97,97,97,97,97,97,97,97,1356,97,97,97,97,97,97,45,45,1403,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1399,45,45,45,1413,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1669,45,1422,45,45,1425,45,45,1428,45,1429,67,67,67,67,67,67,67,67,1468,67,67,67,67,67,67,67,67,529,67,67,67,67,67,67,539,67,67,1475,67,0,0,0,0,0,0,0,0,0,0,0,0,140,2170880,2170880,2170880,2416640,97,97,1530,97,0,45,45,1534,45,45,45,45,45,45,45,45,1956,45,45,67,67,67,67,67,67,67,67,67,1599,67,67,1601,67,67,67,67,67,67,67,67,67,803,67,67,67,67,67,67,1632,97,1634,0,97,97,97,1640,97,97,97,1643,97,97,1645,97,97,97,97,97,912,97,97,97,97,97,97,97,97,97,0,0,0,45,45,45,45,45,45,1660,1661,45,45,45,45,1665,1666,45,45,45,45,45,1670,1692,1693,67,67,67,67,67,1697,67,67,67,67,67,67,67,1702,97,97,1714,1715,97,97,97,97,0,1721,1722,97,97,97,97,97,97,1353,97,97,97,97,97,97,97,97,1362,1726,97,0,0,97,97,97,0,97,97,97,1734,97,97,97,97,97,848,849,97,97,97,97,856,97,97,97,97,97,354,0,53264,0,18,18,24,24,0,28,28,45,45,1750,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1681,45,0,1846,97,97,97,97,97,97,45,45,1854,45,45,45,45,1859,67,67,67,1879,67,67,97,97,1884,97,97,0,0,0,97,97,97,1105,97,97,97,97,97,97,97,97,97,97,1344,97,97,97,1347,97,1892,97,0,0,0,97,97,97,1900,97,97,45,45,45,45,45,997,45,45,45,45,45,45,45,45,45,45,1002,45,45,1005,1006,45,67,67,67,67,67,1926,67,67,1928,97,97,97,97,97,0,0,97,97,97,0,97,97,97,97,97,97,1737,97,0,97,97,97,97,0,0,0,97,97,1944,97,97,1946,45,45,45,1544,45,45,45,45,45,45,45,45,45,45,45,45,190,45,45,45,152,155,45,163,45,45,177,179,182,45,45,45,193,197,45,45,45,1672,45,45,45,45,45,1677,45,1679,45,45,45,45,996,45,45,45,45,45,45,45,45,45,45,45,1212,45,45,45,45,67,260,264,67,67,67,67,0,37139,24853,0,0,0,0,41098,65820,97,97,97,295,299,302,97,310,97,97,324,326,329,97,97,97,0,97,97,1639,0,1641,97,97,97,97,97,97,97,97,1511,97,97,97,97,97,97,97,97,1523,97,97,97,97,97,97,97,97,1719,97,97,97,97,97,97,97,97,1720,97,97,97,97,97,97,97,312,97,97,97,97,97,97,97,97,1123,97,97,97,97,97,97,97,340,344,97,97,97,97,0,53264,0,18,18,24,24,0,28,28,139621,0,0,0,0,364,0,367,41098,369,140,45,45,373,375,419,45,45,45,45,45,45,45,45,45,428,45,45,435,45,45,45,1751,45,45,45,45,45,45,45,45,45,45,45,45,1410,45,45,45,67,67,67,505,67,67,67,67,67,67,67,67,67,514,67,67,67,67,67,67,1969,67,97,97,97,97,0,0,0,97,97,45,67,0,97,45,67,0,97,2064,2065,0,2066,45,521,67,67,67,67,67,67,67,67,67,67,534,67,67,67,67,67,67,465,67,67,67,474,67,67,67,67,67,67,67,1467,67,67,67,67,67,67,67,67,67,97,97,97,97,97,1933,0,97,97,97,602,97,97,97,97,97,97,97,97,97,611,97,97,18,640,139621,358,641,0,0,0,0,364,0,0,367,0,618,97,97,97,97,97,97,97,97,97,97,631,97,97,97,97,97,881,97,97,97,97,97,97,97,97,97,97,569,97,97,97,97,97,369,0,45,652,45,45,45,45,45,657,45,45,45,45,45,45,1235,45,45,45,45,45,45,45,45,67,67,67,1432,67,67,67,67,67,67,67,766,67,67,67,67,67,67,67,67,773,67,67,67,0,1305,0,1311,0,1317,97,97,97,97,97,97,97,1624,97,97,97,97,97,97,97,97,0,97,97,97,1724,97,97,97,777,67,67,782,67,67,67,67,67,67,67,67,67,67,67,67,535,67,67,67,67,67,67,67,814,67,67,67,67,67,67,67,67,67,37689,544,25403,546,70179,0,0,66365,66365,552,0,97,837,97,97,97,97,97,97,1496,97,97,97,97,97,97,97,97,97,97,918,97,97,97,97,0,842,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1168,97,97,97,97,864,97,97,97,97,97,97,97,97,871,97,97,97,0,1637,97,97,0,97,97,97,97,97,97,97,97,97,97,1801,45,45,97,875,97,97,880,97,97,97,97,97,97,97,97,97,97,97,1151,1152,97,97,97,67,67,67,1040,67,67,67,67,67,67,67,67,67,67,67,67,790,67,67,67,1180,0,649,45,45,45,45,45,45,45,45,45,45,45,45,45,200,45,45,67,67,67,1454,67,67,67,67,67,67,67,67,67,67,67,67,806,67,67,67,0,0,0,1481,0,1094,0,0,97,1483,97,97,97,97,97,97,304,97,97,318,97,97,97,97,97,97,0,53264,0,18,18,24,24,0,28,28,97,97,97,1507,97,97,97,97,97,97,97,97,97,97,97,97,1332,97,97,97,1619,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1631,97,1633,97,0,97,97,97,0,97,97,97,97,97,97,97,97,97,1381,0,0,45,45,45,45,97,97,1727,0,97,97,97,0,97,97,97,97,97,97,97,97,626,97,97,97,97,97,97,636,45,45,1760,67,67,67,67,67,67,67,1765,67,67,67,67,67,67,67,1299,67,67,67,0,0,0,0,0,0,97,97,97,97,1616,97,97,1803,45,45,45,45,1807,45,45,45,45,45,1813,45,45,45,67,67,1684,67,67,67,67,67,67,67,67,67,67,67,822,67,67,37689,544,67,67,1818,67,67,67,67,1822,67,67,67,67,67,1828,67,67,67,67,67,97,0,0,97,97,97,97,97,45,45,45,2012,2013,45,45,67,67,67,2018,2019,67,67,97,67,97,97,97,1833,97,97,0,0,97,97,1840,97,97,0,0,97,97,97,0,97,97,1733,97,1735,97,97,97,0,97,97,97,1849,97,97,97,45,45,45,45,45,1857,45,45,45,1910,45,1912,45,45,1914,45,67,67,67,67,67,67,67,67,67,67,1017,67,67,1020,67,45,1861,45,45,45,45,45,67,67,67,67,67,1872,67,67,67,67,67,67,752,67,67,67,67,67,67,67,67,67,67,1446,67,67,67,67,67,1876,67,67,67,67,67,97,97,97,97,97,0,0,0,1890,97,97,97,97,97,1134,97,97,97,97,97,97,97,97,97,97,570,97,97,97,97,580,1935,97,97,97,97,0,0,0,97,97,97,97,97,97,45,45,45,45,1906,45,67,67,67,67,2048,0,97,97,97,97,45,45,67,67,0,0,0,0,925,41606,0,0,0,931,45,45,45,45,45,45,1674,45,1676,45,45,45,45,45,45,45,446,45,45,45,45,45,45,45,67,67,67,67,1871,67,67,67,67,0,97,97,45,67,0,97,2060,2061,0,2063,45,67,0,97,45,45,156,45,45,45,45,45,45,45,45,45,192,45,45,45,45,1673,45,45,45,45,45,45,45,45,45,45,45,429,45,45,45,45,67,67,67,269,67,67,67,0,37139,24853,0,0,0,0,41098,65820,97,97,349,97,97,97,0,53264,0,18,18,24,24,0,28,28,139621,0,0,0,0,364,0,367,41098,369,140,45,45,374,45,45,67,67,213,217,67,67,67,67,67,242,67,247,67,253,45,45,698,45,45,45,45,45,45,45,45,45,45,45,45,45,399,45,45,0,0,0,0,925,41606,0,929,0,0,45,45,45,45,45,45,1391,45,45,1395,45,45,45,45,45,45,423,45,45,45,45,45,45,45,436,45,67,67,67,67,1041,67,1043,67,67,67,67,67,67,67,67,67,67,1776,67,67,97,97,97,1099,0,0,97,97,97,97,97,97,97,97,97,97,97,97,97,888,97,97,97,1131,97,97,97,97,1135,97,1137,97,97,97,97,97,97,97,1497,97,97,97,97,97,97,97,97,97,883,97,97,97,97,97,97,1310,0,0,0,1316,0,0,0,0,1100,0,0,0,97,97,97,97,97,1107,97,97,97,97,97,97,97,97,1343,97,97,97,97,97,97,1348,0,0,1317,0,0,0,0,0,97,97,97,97,97,97,97,97,97,97,97,1112,97,45,1804,45,45,45,45,45,45,45,45,45,45,45,45,45,67,1868,67,1870,67,67,67,67,67,1817,67,67,1819,67,67,67,67,67,67,67,67,67,67,67,67,823,67,37689,544,67,97,1832,97,97,1834,97,0,0,97,97,97,97,97,0,0,97,97,97,0,1732,97,97,97,97,97,97,97,850,97,97,97,97,97,97,97,97,97,1177,0,0,925,0,0,0,0,97,97,97,97,0,0,1941,97,97,97,97,97,97,45,45,45,1991,1992,45,67,67,67,67,67,67,67,67,67,1998,134,0,0,0,37,110630,0,0,0,114730,106539,41098,45,45,45,45,941,45,45,944,45,45,45,45,45,45,952,45,45,207,67,67,67,67,67,226,67,67,67,67,67,67,67,67,67,820,67,67,67,67,37689,544,369,650,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1682,25403,546,70179,0,0,66365,66365,552,835,97,97,97,97,97,97,97,1522,97,97,97,97,97,97,97,97,0,97,97,97,97,97,97,1725,67,67,67,1695,67,67,67,67,67,67,67,67,67,67,67,67,1034,67,1036,67,67,67,265,67,67,67,67,0,37139,24853,0,0,0,0,41098,65820,97,97,97,296,97,97,97,97,314,97,97,97,97,332,334,97,97,97,97,97,1146,1147,97,97,97,97,97,97,97,97,97,97,1626,97,97,97,97,97,97,345,97,97,97,97,0,53264,0,18,18,24,24,0,28,28,139621,0,0,0,0,364,0,367,41098,369,140,45,372,45,45,45,1220,45,45,45,45,45,45,45,45,45,45,45,45,1213,45,45,45,45,404,406,45,45,45,45,45,45,45,45,45,45,45,45,45,434,45,45,45,440,45,45,45,45,45,45,45,45,451,452,45,45,45,67,1683,67,67,67,1686,67,67,67,67,67,67,67,0,37139,24853,0,0,0,0,41098,65820,67,67,67,67,490,492,67,67,67,67,67,67,67,67,67,67,67,1447,67,67,1450,67,67,67,67,67,526,67,67,67,67,67,67,67,67,537,538,67,67,67,67,67,506,67,67,508,67,67,511,67,67,67,67,0,1476,0,0,0,0,0,1478,0,0,0,0,0,0,0,0,97,97,1484,97,97,97,97,97,97,865,97,97,97,97,97,97,97,97,97,97,1499,97,97,97,97,97,97,97,97,97,587,589,97,97,97,97,97,97,97,97,97,97,629,97,97,97,97,97,97,97,97,97,623,97,97,97,97,97,97,97,97,634,635,97,97,97,97,97,1160,97,97,97,97,97,97,97,97,97,97,97,1628,97,97,97,97,369,0,45,45,45,45,45,655,45,45,45,45,45,45,45,45,999,45,1001,45,45,45,45,45,45,45,45,715,45,45,45,720,45,45,45,45,45,45,45,45,728,25403,546,70179,0,0,66365,66365,552,0,97,97,97,97,97,840,97,97,97,97,97,1174,97,97,97,97,0,0,925,0,0,0,0,0,0,0,1100,97,97,97,97,97,97,97,97,627,97,97,97,97,97,97,97,938,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,680,45,968,45,970,45,973,45,45,45,45,45,45,45,45,45,45,962,45,45,45,45,45,979,45,45,45,45,45,985,45,45,45,45,45,45,45,45,45,1224,45,45,45,45,45,45,45,45,688,45,45,45,45,45,45,45,1007,1008,67,67,67,67,67,1014,67,67,67,67,67,67,67,67,67,1045,67,67,67,67,67,67,67,1038,67,67,67,67,67,67,1044,67,1046,67,1049,67,67,67,67,67,67,800,67,67,67,67,67,67,808,67,67,0,0,0,1102,97,97,97,97,97,1108,97,97,97,97,97,97,306,97,97,97,97,97,97,97,97,97,97,1371,97,97,97,97,97,97,97,97,1132,97,97,97,97,97,97,1138,97,1140,97,1143,97,97,97,97,97,1352,97,97,97,97,97,97,97,97,97,97,869,97,97,97,97,97,45,1191,45,45,45,45,45,1196,45,45,45,45,45,45,45,45,1407,45,45,45,45,45,45,45,45,986,45,45,45,45,45,45,991,45,67,67,67,1256,67,67,67,67,67,67,67,67,67,67,67,67,1048,67,67,67,97,1336,97,97,97,97,97,97,97,97,97,97,97,97,97,97,615,97,1386,45,1387,45,45,45,45,45,45,45,45,45,45,45,45,45,455,45,457,45,45,1424,45,45,45,45,45,67,67,67,67,1433,67,1434,67,67,67,67,67,767,67,67,67,67,67,67,67,67,67,67,67,1591,67,1593,67,67,45,45,1805,45,45,45,45,45,45,45,45,45,1814,45,45,1816,67,67,67,67,1820,67,67,67,67,67,67,67,67,67,1829,67,67,67,67,67,815,67,67,67,67,821,67,67,67,37689,544,67,1831,97,97,97,97,1835,0,0,97,97,97,97,97,0,0,97,97,97,1731,97,97,97,97,97,97,97,97,97,853,97,97,97,97,97,97,0,97,97,97,97,1850,97,97,45,45,45,45,45,45,45,45,1547,45,45,45,45,45,45,45,45,1664,45,45,45,45,45,45,45,45,961,45,45,45,45,965,45,967,1907,45,45,45,45,45,45,45,45,45,67,67,67,67,67,1920,0,1936,97,97,97,0,0,0,97,97,97,97,97,97,45,45,67,67,67,67,67,67,1763,67,67,67,67,67,67,67,67,1056,67,67,67,67,67,67,67,67,1273,67,67,67,67,67,67,67,67,1457,67,67,67,67,67,67,67,67,97,97,97,97,0,0,28672,97,45,67,67,67,67,0,0,97,97,97,97,45,45,67,67,2054,97,97,291,97,97,97,97,97,97,320,97,97,97,97,97,97,307,97,97,97,97,97,97,97,97,97,97,12288,0,925,926,1179,0,45,377,45,45,45,381,45,45,392,45,45,396,45,45,45,45,971,45,45,45,45,45,45,45,45,45,45,45,45,1756,45,45,45,67,67,67,67,463,67,67,67,467,67,67,478,67,67,482,67,67,67,67,67,1028,67,67,67,67,67,67,67,67,67,67,67,67,1469,67,67,1472,67,502,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1460,67,97,97,97,97,560,97,97,97,564,97,97,575,97,97,579,97,97,97,97,97,1368,97,97,97,97,97,97,97,97,97,97,0,0,925,0,0,930,97,599,97,97,97,97,97,97,97,97,97,97,97,97,97,97,872,97,45,666,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1758,0,362,0,0,925,41606,0,0,0,0,45,45,934,45,45,45,164,168,174,178,45,45,45,45,45,194,45,45,45,165,45,45,45,45,45,45,45,45,45,199,45,45,45,67,67,1010,67,67,67,67,67,67,67,67,67,67,67,67,1060,67,67,67,67,67,67,1052,1053,67,67,67,67,67,67,67,67,67,67,1063,97,1157,97,97,97,97,97,97,97,97,97,97,97,97,1167,97,97,97,97,97,1379,97,97,97,0,0,0,45,1383,45,45,45,1806,45,45,45,45,45,45,1812,45,45,45,45,67,67,67,67,67,1577,67,67,67,67,67,67,67,753,67,67,67,67,67,67,67,67,67,1262,67,67,67,67,67,67,67,1282,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1471,67,45,1402,45,45,45,45,45,45,45,45,45,45,45,45,45,45,417,45,67,1462,67,67,67,67,67,67,67,67,67,67,67,67,67,67,37689,544,97,1517,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1128,97,97,97,97,1636,97,97,97,0,97,97,97,97,97,97,97,97,851,97,97,97,97,97,97,97,67,67,1705,67,67,67,67,67,67,67,67,97,97,97,97,97,97,0,0,97,97,97,97,1842,0,0,1779,97,97,97,1782,97,0,0,97,97,97,97,97,97,0,0,97,97,97,1789,97,97,0,0,0,97,1847,97,97,97,97,97,45,45,45,45,45,45,45,45,1675,45,45,45,45,45,45,45,45,737,738,67,740,67,741,67,743,67,67,67,67,67,67,1968,67,67,97,97,97,97,0,0,0,97,97,45,67,0,97,45,67,2062,97,45,67,0,97,45,67,67,97,97,2001,97,0,0,2004,97,97,0,97,97,97,97,1797,97,97,97,97,97,45,45,45,67,261,67,67,67,67,67,0,37139,24853,0,0,0,0,41098,65820,97,97,292,97,97,97,97,311,315,321,325,97,97,97,97,97,97,1623,97,97,97,97,97,97,97,97,97,97,1330,97,97,1333,1334,97,341,97,97,97,97,97,0,53264,0,18,18,24,24,0,28,28,139621,0,0,0,363,364,0,367,41098,369,140,45,45,45,45,1221,45,45,45,45,45,45,45,45,45,45,45,413,45,45,416,45,376,45,45,45,45,382,45,45,45,45,45,45,45,45,45,45,1408,45,45,45,45,45,403,45,45,45,45,45,45,45,45,45,45,414,45,45,45,418,67,67,67,462,67,67,67,67,468,67,67,67,67,67,67,67,67,1602,67,1604,67,67,67,67,67,67,67,67,489,67,67,67,67,67,67,67,67,67,67,500,67,67,67,67,67,1067,67,67,67,67,67,1072,67,67,67,67,67,67,274,0,37139,24853,0,0,0,0,41098,65820,67,67,504,67,67,67,67,67,67,67,510,67,67,67,517,519,541,67,37139,37139,24853,24853,0,70179,0,0,0,65820,65820,369,287,554,97,97,97,559,97,97,97,97,565,97,97,97,97,97,97,97,1718,0,97,97,97,97,97,97,97,898,97,97,97,97,97,97,906,97,97,97,97,586,97,97,97,97,97,97,97,97,97,97,597,97,97,97,97,97,1520,97,97,97,97,97,97,97,97,97,97,0,45,1656,45,45,45,97,97,601,97,97,97,97,97,97,97,607,97,97,97,614,616,638,97,18,0,139621,0,0,0,0,0,0,364,0,0,367,41606,369,0,45,45,45,45,45,45,45,45,45,45,661,45,45,45,407,45,45,45,45,45,45,45,45,45,45,45,45,45,1815,45,67,45,667,45,45,45,45,45,45,45,45,45,45,678,45,45,45,421,45,45,45,45,45,45,45,45,45,45,45,45,976,977,45,45,45,682,45,45,45,45,45,45,45,45,45,45,693,45,45,697,67,67,748,67,67,67,67,754,67,67,67,67,67,67,67,67,67,1274,67,67,67,67,67,67,67,67,765,67,67,67,67,769,67,67,67,67,67,67,67,67,67,1589,67,67,67,67,67,67,67,67,780,67,67,784,67,67,67,67,67,67,67,67,67,67,67,1777,67,97,97,97,97,97,97,846,97,97,97,97,852,97,97,97,97,97,97,97,1742,45,45,45,45,45,45,45,1747,97,97,97,863,97,97,97,97,867,97,97,97,97,97,97,97,308,97,97,97,97,97,97,97,97,97,97,12288,1178,925,0,1179,0,97,97,97,878,97,97,882,97,97,97,97,97,97,97,97,97,97,12288,0,925,0,1179,0,908,97,97,97,97,97,97,97,97,97,97,97,97,97,97,0,0,925,0,0,0,954,45,45,45,45,45,45,45,45,45,45,963,45,45,966,45,45,157,45,45,171,45,45,45,45,45,45,45,45,45,45,948,45,45,45,45,45,1022,67,67,1026,67,67,67,1030,67,67,67,67,67,67,67,67,67,1603,1605,67,67,67,1608,67,67,67,1039,67,67,1042,67,67,67,67,67,67,67,67,67,67,471,67,67,67,67,67,0,1100,0,97,97,97,97,97,97,97,97,97,97,97,97,97,904,97,97,97,97,1116,97,97,1120,97,97,97,1124,97,97,97,97,97,97,562,97,97,97,571,97,97,97,97,97,97,97,97,97,1133,97,97,1136,97,97,97,97,97,97,97,97,915,917,97,97,97,97,97,0,97,1170,97,97,97,97,97,97,97,97,0,0,925,0,0,0,0,0,41606,0,0,0,0,45,45,45,45,45,45,1993,67,67,67,67,67,67,67,67,67,67,1275,67,67,67,1278,67,0,0,0,45,45,1182,45,45,45,45,45,45,45,45,45,1189,1204,45,45,45,1207,45,45,1209,45,1210,45,45,45,45,45,45,1546,45,45,45,45,45,45,45,45,45,689,45,45,45,45,45,45,1231,45,45,45,45,45,45,45,45,45,45,45,45,45,45,67,67,67,67,67,67,67,67,236,67,67,67,67,67,67,67,801,67,67,67,805,67,67,67,67,67,1242,67,67,67,67,67,67,67,67,67,1249,67,67,67,67,67,67,507,67,67,67,67,67,67,67,67,67,67,1300,0,0,0,0,0,1267,67,67,1269,67,1270,67,67,67,67,67,67,67,67,67,1280,97,1349,97,1350,97,97,97,97,97,97,97,97,97,1360,97,97,97,0,1980,97,97,97,97,97,45,45,45,45,45,45,673,45,45,45,45,677,45,45,45,45,1401,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,953,67,1437,67,1440,67,67,67,67,1445,67,67,67,1448,67,67,67,67,67,67,1029,67,67,67,67,67,67,67,67,67,67,1825,67,67,67,67,67,1473,67,67,67,0,0,0,0,0,0,0,0,0,0,0,0,1320,0,834,97,97,97,97,1490,97,1493,97,97,97,97,1498,97,97,97,1501,97,97,97,0,97,1638,97,0,97,97,97,97,97,97,97,97,916,97,97,97,97,97,97,0,1528,97,97,97,0,45,45,45,1535,45,45,45,45,45,45,45,1867,67,67,67,67,67,67,67,67,67,97,97,97,97,1932,0,0,1555,45,45,45,45,45,45,45,45,45,45,45,45,45,1567,45,45,158,45,45,172,45,45,45,183,45,45,45,45,201,45,45,67,212,67,67,67,67,231,235,241,245,67,67,67,67,67,67,493,67,67,67,67,67,67,67,67,67,67,472,67,67,67,67,67,97,97,97,97,1651,97,97,97,97,97,0,45,45,45,45,45,45,45,1539,45,45,45,67,1704,67,1706,67,67,67,67,67,67,67,97,97,97,97,97,97,0,0,97,97,97,1841,97,0,1844,97,97,97,97,1716,97,97,97,0,97,97,97,97,97,97,97,590,97,97,97,97,97,97,97,97,97,0,0,0,45,45,45,1385,1748,45,45,45,45,45,45,45,45,45,45,45,45,45,1757,45,45,159,45,45,45,45,45,45,45,45,45,45,45,45,45,415,45,45,97,97,1780,97,97,97,0,0,1786,97,97,97,97,97,0,0,97,97,1730,0,97,97,97,97,97,1736,97,1738,67,97,97,97,97,97,97,0,1838,97,97,97,97,97,0,0,97,1729,97,0,97,97,97,97,97,97,97,97,1162,97,97,97,1165,97,97,97,45,1950,45,45,45,45,45,45,45,45,1958,67,67,67,1962,67,67,67,67,67,1246,67,67,67,67,67,67,67,67,67,67,67,97,1710,97,97,97,1999,67,97,97,97,97,0,2003,97,97,97,0,97,97,2008,2009,45,67,67,67,67,0,0,97,97,97,97,45,2052,67,2053,0,0,0,0,925,41606,0,0,930,0,45,45,45,45,45,45,1392,45,1394,45,45,45,45,45,45,45,1545,45,45,45,45,45,45,45,45,45,45,1563,1565,45,45,45,1568,0,97,2055,45,67,0,97,45,67,0,97,45,67,28672,97,45,45,160,45,45,45,45,45,45,45,45,45,45,45,45,45,679,45,45,67,67,266,67,67,67,67,0,37139,24853,0,0,0,0,41098,65820,97,346,97,97,97,97,0,53264,0,18,18,24,24,0,28,28,139621,0,0,362,0,364,0,367,41098,369,140,371,45,45,45,379,45,45,45,388,45,45,45,45,45,45,45,45,1663,45,45,45,45,45,45,45,45,45,449,45,45,45,45,45,67,67,542,37139,37139,24853,24853,0,70179,0,0,0,65820,65820,369,287,97,97,97,97,97,1622,97,97,97,97,97,97,97,1629,97,97,0,1794,1795,97,97,97,97,97,97,97,97,45,45,45,45,45,45,1745,45,45,97,639,18,0,139621,0,0,0,0,0,0,364,0,0,367,41606,45,731,45,45,45,45,45,45,67,67,67,67,67,67,67,67,67,67,67,67,251,67,67,67,67,67,798,67,67,67,67,67,67,67,67,67,67,67,67,1073,67,67,67,860,97,97,97,97,97,97,97,97,97,97,97,97,97,97,873,0,0,1101,97,97,97,97,97,97,97,97,97,97,97,97,97,921,97,0,67,67,67,67,1245,67,67,67,67,67,67,67,67,67,67,67,67,1250,67,67,1253,0,0,1312,0,0,0,1318,0,0,0,0,0,0,97,97,97,97,1106,97,97,97,97,97,97,97,97,97,1149,97,97,97,97,97,1155,97,97,1325,97,97,97,97,97,97,97,97,97,97,97,97,97,1141,97,97,67,67,1439,67,1441,67,67,67,67,67,67,67,67,67,67,67,67,1264,67,67,67,97,97,1492,97,1494,97,97,97,97,97,97,97,97,97,97,97,1331,97,97,97,97,67,67,67,2037,67,97,0,0,97,97,97,2043,97,45,45,45,442,45,45,45,45,45,45,45,45,45,45,45,67,67,67,67,67,67,232,67,67,67,67,67,67,67,67,1823,67,67,67,67,67,67,67,67,97,97,97,97,1975,0,0,97,874,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1142,97,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,65,86,117,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,63,84,115,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,61,82,113,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,59,80,111,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,57,78,109,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,55,76,107,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,53,74,105,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,51,72,103,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,49,70,101,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,47,68,99,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,45,67,97,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,213085,53264,18,49172,57366,24,8192,28,102432,0,0,0,44,0,0,32863,53264,18,49172,57366,24,8192,28,102432,0,41,41,41,0,0,1138688,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,0,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,89,53264,18,18,49172,0,57366,0,24,24,24,0,127,127,127,127,102432,67,262,67,67,67,67,67,0,37139,24853,0,0,0,0,41098,65820,342,97,97,97,97,97,0,53264,0,18,18,24,24,0,28,28,139621,0,360,0,0,364,0,367,41098,369,140,45,45,45,45,717,45,45,45,45,45,45,45,45,45,45,45,412,45,45,45,45,45,67,1009,67,67,67,67,67,67,67,67,67,67,67,67,67,1292,67,67,1294,67,67,67,67,67,67,67,67,67,67,0,0,0,0,0,0,97,97,97,1615,97,97,97,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,66,87,118,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,64,85,116,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,62,83,114,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,60,81,112,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,58,79,110,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,56,77,108,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,54,75,106,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,52,73,104,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,50,71,102,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,48,69,100,53264,18,49172,57366,24,8192,28,102432,37,110630,114730,106539,46,67,98,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,233472,53264,18,49172,57366,24,8192,28,102432,0,110630,114730,106539,0,0,69724,53264,18,18,49172,0,57366,262144,24,24,24,0,28,28,28,28,102432,45,45,161,45,45,45,45,45,45,45,45,45,45,45,45,45,710,45,45,28,139621,359,0,0,0,364,0,367,41098,369,140,45,45,45,45,1389,45,45,45,45,45,45,45,45,45,45,45,949,45,45,45,45,67,503,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1449,67,67,97,600,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1154,97,0,0,0,0,925,41606,927,0,0,0,45,45,45,45,45,45,1866,67,67,67,67,67,67,67,67,67,67,772,67,67,67,67,67,45,45,969,45,45,45,45,45,45,45,45,45,45,45,45,45,951,45,45,45,45,1192,45,45,45,45,45,45,45,45,45,45,45,45,45,1202,45,45,0,0,0,1314,0,0,0,0,0,0,0,0,0,97,97,97,97,97,97,97,1488,67,67,267,67,67,67,67,0,37139,24853,0,0,0,0,41098,65820,97,347,97,97,97,97,0,53264,0,18,18,24,24,0,28,28,139621,0,361,0,0,364,0,367,41098,369,140,45,45,45,45,734,45,45,45,67,67,67,67,67,742,67,67,45,45,668,45,45,45,45,45,45,45,45,45,45,45,45,45,1214,45,45,1130,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1361,97,45,45,1671,45,45,45,45,45,45,45,45,45,45,45,45,45,1552,45,45,0,0,0,0,2220032,0,0,1130496,0,0,0,0,2170880,2171020,2170880,2170880,18,0,0,131072,0,0,0,90112,0,2220032,0,0,0,0,0,0,0,0,97,97,97,1485,97,97,97,97,0,45,45,45,45,45,1537,45,45,45,45,45,1390,45,1393,45,45,45,45,1398,45,45,45,2170880,2171167,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2576384,2215936,3117056,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,0,0,0,0,0,2174976,0,0,0,0,0,0,2183168,0,0,0,0,2170880,2170880,2170880,2400256,2170880,2170880,2170880,2170880,2721252,2744320,2170880,2170880,2170880,2834432,2840040,2170880,2908160,2170880,2170880,2936832,2170880,2170880,2985984,2170880,2994176,2170880,2170880,3014656,2170880,3059712,3076096,3088384,2170880,2170880,2170880,2170880,0,0,0,0,2220032,0,0,0,1142784,0,0,0,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3215360,2215936,2215936,2215936,2215936,2215936,2437120,2215936,2215936,2215936,3117056,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,2215936,0,543,0,545,0,0,2183168,0,0,831,0,2170880,2170880,2170880,2400256,2170880,2170880,2170880,2170880,3031040,2170880,3055616,2170880,2170880,2170880,2170880,3092480,2170880,2170880,3125248,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,2170880,3198976,2170880,0,0,0,0,0,0,67,67,37139,37139,24853,24853,0,0,0,0,0,65820,65820,0,287,97,97,97,97,97,1783,0,0,97,97,97,97,97,97,0,0,97,97,97,97,97,97,1791,0,0,546,70179,0,0,0,0,552,0,97,97,97,97,97,97,97,604,97,97,97,97,97,97,97,97,97,97,1150,97,97,97,97,97,147456,147456,147456,147456,147456,147456,147456,147456,147456,147456,147456,147456,0,0,147456,0,0,0,0,925,41606,0,928,0,0,45,45,45,45,45,45,998,45,45,45,45,45,45,45,45,45,1562,45,1564,45,45,45,45,0,2158592,2158592,0,0,0,0,2232320,2232320,2232320,0,2240512,2240512,2240512,2240512,0,0,0,0,0,0,0,0,0,0,0,2170880,2170880,2170880,2416640], +a.EXPECTED=[291,300,304,341,315,309,305,295,319,323,327,329,296,333,337,339,342,346,350,294,356,360,312,367,352,371,363,375,379,383,387,391,395,726,399,405,518,684,405,405,405,405,808,405,405,405,512,405,405,405,431,405,405,406,405,405,404,405,405,405,405,405,405,405,908,631,410,415,405,414,419,608,405,429,602,405,435,443,405,441,641,478,405,447,451,450,456,643,461,460,762,679,465,469,741,473,477,482,486,492,932,931,523,498,504,720,405,510,596,405,516,941,580,522,929,527,590,589,897,939,534,538,547,551,555,559,563,567,571,969,575,708,690,689,579,584,634,405,594,731,405,600,882,405,606,895,786,452,612,405,615,620,876,624,628,638,647,651,655,659,663,667,676,683,688,695,694,791,405,699,437,405,706,714,405,712,825,870,405,718,724,769,768,823,730,735,745,751,422,755,759,425,766,902,810,587,775,888,887,405,773,992,405,779,962,405,785,781,986,790,795,797,506,500,499,801,805,814,820,829,833,837,841,845,849,853,857,861,616,865,869,868,488,405,874,816,405,880,738,405,886,892,543,405,901,906,913,912,918,494,541,922,926,936,945,949,953,957,530,966,973,960,702,701,405,979,981,405,985,747,405,990,998,914,405,996,1004,672,975,974,1014,1002,1008,670,1012,405,405,405,405,405,401,1018,1022,1026,1106,1071,1111,1111,1111,1082,1145,1030,1101,1034,1038,1106,1106,1106,1106,1046,1206,1052,1106,1072,1111,1111,1042,1134,1065,1111,1112,1056,1160,1207,1062,1204,1208,1069,1106,1106,1106,1076,1111,1207,1161,1122,1205,1064,1094,1106,1106,1107,1111,1111,1111,1078,1086,1207,1092,1098,1046,1058,1106,1106,1110,1111,1111,1116,1120,1161,1126,1202,1104,1106,1145,1146,1129,1138,1088,1151,1048,1157,1153,1132,1141,1165,1107,1111,1172,1179,1109,1183,1175,1143,1147,1187,1108,1191,1195,1144,1199,1168,1212,1216,1220,1224,1228,1232,1236,1557,1247,1241,1241,1038,1434,1241,1241,1241,1241,1254,1275,1617,1241,1280,1287,1241,1241,1241,1287,1241,2114,1291,1241,1243,1241,2049,1824,2094,2095,1520,1309,1241,1241,1302,1241,1321,1311,1241,1241,1313,1778,1325,1336,1241,1241,1325,1330,1353,1241,1241,1695,1354,1241,1241,1241,1294,1686,1331,1241,1696,1368,1241,1338,1370,1241,1392,1399,1364,2017,1406,2016,1405,1716,1406,1407,1422,1417,1421,1241,1241,1241,1349,1426,1241,1774,1756,1241,1773,1241,1241,1345,1964,1812,1432,1241,1241,1345,1993,1459,1241,1241,1241,1395,1848,1767,1465,1241,1241,1394,1847,1242,1477,1241,1241,1428,1241,1445,1492,1241,1241,1438,1241,1499,1241,1241,1241,1455,1241,1818,1448,1241,1250,1241,2026,1623,1449,1241,1612,1616,1241,1614,1241,1257,1241,1241,1985,1292,1586,1512,1241,1517,2050,1526,1674,1519,1524,1647,2051,1532,1537,1551,1544,1550,1555,1561,1571,1578,1584,1590,1591,1653,1595,1602,1606,1610,1634,1628,1640,1633,1645,1241,1241,1241,1469,1241,1970,1651,1241,1270,1241,1241,1819,1449,1241,1293,1664,1241,1241,1481,1485,1574,1672,1241,1241,1513,1317,1487,1684,1241,1241,1533,1299,1694,1241,1241,1295,1241,1241,1241,1546,1700,1241,1241,1707,1241,1713,1241,1849,1715,1241,1720,1241,1276,1267,1241,1241,2107,1657,1864,1241,1881,1241,1326,1292,1241,1685,1358,1724,1338,1241,1363,1362,1342,1340,1361,1339,1833,1372,1360,1833,1833,1342,1343,1835,1341,1731,1738,1344,1241,1745,1241,1379,1241,1241,2092,1241,1388,1761,1754,1241,1386,1241,1400,1760,1241,1241,1241,1598,1734,1241,1241,1241,1635,1645,1241,1780,1766,1241,1241,1332,1771,1241,1241,1629,2079,1241,1242,1784,1241,1241,1680,1639,2063,1790,1241,1241,1741,1241,1241,1800,1241,1241,1762,1473,1241,1806,1241,1241,1786,1240,1709,1241,1241,1241,1668,1811,1241,1940,1241,1401,1974,1241,1408,1413,1382,1241,1816,1241,1241,1802,2086,1811,1241,1817,1945,1823,2095,2095,2047,2094,2046,2080,1241,1409,1312,1376,2096,2048,1241,1241,1807,1241,1241,1241,2035,1241,1241,1828,1241,2057,2061,1241,1241,1843,1241,2059,1241,1241,1241,1690,1847,1241,1241,1241,1703,2102,1848,1241,1241,1853,1292,1848,1241,2016,1857,1241,2002,1868,1241,1436,1241,1241,1271,1305,1241,1874,1241,1241,1884,2037,1892,1241,1890,1241,1461,1241,1241,1795,1241,1241,1891,1241,1878,1241,1888,1241,1888,1905,1896,2087,1912,1903,1241,1911,1906,1916,1905,2027,1863,1925,2088,1859,1861,1922,1927,1931,1935,1494,1241,1241,1918,1907,1939,1917,1944,1949,1241,1241,1451,1955,1241,1241,1241,1796,1727,2061,1241,1241,1899,1241,1660,1968,1241,1241,1951,1678,1978,1241,1241,1241,1839,1241,1241,1984,1982,1241,1488,1241,1241,1624,1450,1989,1241,1241,1241,1870,1995,1292,1241,1241,1958,1261,1241,1996,1241,1241,1241,2039,2008,1241,1241,1750,2e3,1241,1256,2001,1960,1241,1564,1241,1504,1241,1241,1442,1241,1241,1564,1528,1263,1241,1508,1241,1241,1468,1498,2006,1540,2015,1539,2014,1748,2013,1539,1831,2014,2012,1500,1567,2022,2021,1241,1580,1241,1241,2033,2037,1791,2045,2031,1241,1621,1241,1641,2044,1241,1241,1241,2093,1241,1241,2055,1241,1241,2067,1241,1283,1241,1241,1241,2101,2071,1241,1241,1241,2073,1848,2040,1241,1241,1241,2077,1241,1241,2106,1241,1241,2084,1241,2111,1241,1241,1381,1380,1241,1241,1241,2100,1241,2129,2118,2122,2126,2197,2133,3010,2825,2145,2698,2156,2226,2160,2161,2165,2174,2293,2194,2630,2201,2203,2152,3019,2226,2263,2209,2213,2218,2269,2292,2269,2269,2184,2226,2238,2148,2151,3017,2245,2214,2269,2269,2185,2226,2292,2269,2291,2269,2269,2269,2292,2205,3019,2226,2226,2160,2160,2160,2261,2160,2160,2160,2262,2276,2160,2160,2277,2216,2283,2216,2269,2269,2268,2269,2267,2269,2269,2269,2271,2568,2292,2269,2293,2269,2182,2190,2269,2186,2226,2226,2226,2226,2227,2160,2160,2160,2160,2263,2160,2275,2277,2282,2215,2217,2269,2269,2291,2269,2269,2293,2291,2269,2220,2269,2295,2294,2269,2269,2305,2233,2262,2278,2218,2269,2234,2226,2226,2228,2160,2160,2160,2289,2220,2294,2294,2269,2269,2304,2269,2160,2160,2287,2269,2269,2305,2269,2269,2312,2269,2269,2225,2226,2160,2287,2289,2219,2304,2295,2314,2234,2226,2314,2269,2226,2226,2160,2288,2219,2222,2304,2296,2269,2224,2160,2160,2269,2302,2294,2314,2224,2226,2288,2220,2294,2269,2290,2269,2269,2293,2269,2269,2269,2269,2270,2221,2313,2225,2227,2160,2300,2269,2225,2261,2309,2234,2229,2223,2318,2318,2318,2328,2336,2340,2344,2350,2637,2712,2358,2362,2372,2135,2378,2398,2135,2135,2135,2135,2136,2417,2241,2135,2378,2135,2135,2980,2984,2135,3006,2135,2135,2135,2945,2931,2425,2400,2135,2135,2135,2954,2135,2481,2433,2135,2135,2988,2824,2135,2135,2482,2434,2135,2135,2440,2445,2452,2135,2135,2998,3002,2961,2441,2446,2453,2463,2974,2135,2135,2135,2140,2642,2709,2459,2470,2465,2135,2135,3005,2135,2135,2987,2823,2458,2469,2464,2975,2135,2135,2135,2353,2488,2447,2324,2974,2135,2409,2459,2448,2135,2961,2487,2446,2476,2323,2973,2135,2135,2135,2354,2476,2974,2135,2135,2135,2957,2135,2135,2960,2135,2135,2135,2363,2409,2459,2474,2465,2487,2571,2973,2135,2135,2168,2973,2135,2135,2135,2959,2135,2135,2135,2506,2135,2957,2488,2170,2135,2135,2135,2960,2135,2818,2493,2135,2135,3033,2135,2135,2135,2934,2819,2494,2135,2135,2135,2976,2780,2499,2135,2135,2135,3e3,2968,2135,2935,2135,2135,2135,2364,2507,2135,2135,2934,2135,2135,2780,2492,2507,2135,2135,2506,2780,2135,2135,2782,2780,2135,2782,2135,2783,2374,2514,2135,2135,2135,3007,2530,2974,2135,2135,2135,3008,2135,2135,2134,2135,2526,2531,2975,2135,2135,3042,2581,2575,2956,2135,2135,2135,2394,2135,2508,2535,2840,2844,2495,2135,2135,2136,2684,2537,2842,2846,2135,2136,2561,2581,2551,2536,2841,2845,2975,3043,2582,2843,2555,2135,3040,3044,2538,2844,2975,2135,2135,2253,2644,2672,2542,2554,2135,2135,2346,2873,2551,2555,2135,2135,2135,2381,2559,2565,2538,2553,2135,2560,2914,2576,2590,2135,2135,2135,2408,2136,2596,2624,2135,2135,2135,2409,2135,2618,2597,3008,2135,2135,2380,2956,2601,2135,2135,2135,2410,2620,2624,2135,2136,2383,2135,2135,2783,2623,2135,2135,2393,2888,2136,2621,3008,2135,2618,2618,2622,2135,2135,2405,2414,2619,2384,2624,2135,2136,2950,2135,2138,2135,2139,2135,2604,2623,2135,2140,2878,2665,2957,2622,2135,2135,2428,2762,2606,2612,2135,2135,2501,2586,2604,3038,2135,2604,3036,2387,2958,2386,2135,2141,2135,2421,2387,2385,2135,2385,2384,2384,2135,2386,2628,2384,2135,2135,2501,2596,2591,2135,2135,2135,2400,2135,2634,2135,2135,2559,2580,2575,2648,2135,2135,2135,2429,2649,2135,2135,2135,2435,2654,2658,2135,2135,2135,2436,2649,2178,2659,2135,2135,2595,2601,2669,2677,2135,2135,2616,2957,2879,2665,2691,2135,2363,2367,2900,2878,2664,2690,2975,2877,2643,2670,2974,2671,2975,2135,2135,2619,2608,2669,2673,2135,2135,2653,2177,2672,2135,2135,2135,2486,2168,2251,2255,2695,2974,2709,2135,2135,2135,2487,2169,2399,2716,2975,2135,2363,2770,2776,2640,2717,2135,2135,2729,2135,2135,2641,2718,2135,2135,2135,2505,2135,2640,2257,2974,2135,2727,2975,2135,2365,2332,2895,2957,2135,2959,2135,2365,2749,2754,2959,2958,2958,2135,2380,2793,2799,2135,2735,2738,2135,2381,2135,2135,2940,2974,2135,2744,2135,2135,2739,2519,2976,2745,2135,2135,2135,2509,2755,2135,2135,2135,2510,2772,2778,2135,2135,2740,2520,2135,2771,2777,2135,2135,2759,2750,2792,2798,2135,2135,2781,2392,2779,2135,2135,2135,2521,2135,2679,2248,2135,2135,2681,2480,2135,2135,2786,3e3,2135,2679,2683,2135,2135,2416,2135,2135,2135,2525,2135,2730,2135,2135,2135,2560,2581,2135,2805,2135,2135,2804,2962,2832,2974,2135,2382,2135,2135,2958,2135,2135,2960,2135,2829,2833,2975,2961,2965,2969,2973,2968,2972,2135,2135,2135,2641,2135,2515,2966,2970,2851,2478,2135,2135,2808,2135,2809,2135,2135,2135,2722,2852,2479,2135,2135,2815,2135,2135,2766,2853,2480,2135,2857,2479,2135,2388,2723,2135,2364,2331,2894,2858,2480,2135,2135,2850,2478,2135,2135,2135,2806,2864,2135,2399,2256,2974,2865,2135,2135,2862,2135,2135,2135,2685,2807,2865,2135,2135,2807,2863,2135,2135,2135,2686,2884,2807,2135,2809,2807,2135,2135,2807,2806,2705,2810,2808,2700,2869,2702,2702,2702,2704,2883,2135,2135,2135,2730,2884,2135,2135,2135,2731,2321,2546,2135,2135,2876,2255,2889,2322,2547,2135,2401,2135,2135,2135,2949,2367,2893,2544,2973,2906,2973,2135,2135,2877,2663,2368,2901,2907,2974,2366,2899,2905,2972,2920,2974,2135,2135,2911,2900,2920,2363,2913,2918,2465,2941,2975,2135,2135,2924,2928,2974,2945,2931,2135,2135,2135,2765,2136,2955,2135,2135,2939,2931,2380,2135,2135,2380,2135,2135,2135,2780,2507,2137,2135,2137,2135,2139,2135,2806,2810,2135,2135,2135,2992,2135,2135,2962,2966,2970,2974,2135,2135,2787,3014,2135,2521,2993,2135,2135,2135,2803,2135,2135,2135,2618,2607,2997,3001,2135,2135,2963,2967,2971,2975,2135,2135,2791,2797,2135,3009,2999,3003,2787,3001,2135,2135,2964,2968,2785,2999,3003,2135,2135,2135,2804,2785,2999,3004,2135,2135,2135,2807,2135,2135,3023,2135,2135,2135,2811,2135,2135,3027,2135,2135,2135,2837,2968,3028,2135,2135,2135,2875,2135,2784,3029,2135,2408,2457,2446,0,14,0,-2120220672,1610612736,-2074083328,-2002780160,-2111830528,1073872896,1342177280,1075807216,4096,16384,2048,8192,0,8192,0,0,0,0,1,0,0,0,2,0,-2145386496,8388608,1073741824,0,2147483648,2147483648,2097152,2097152,2097152,536870912,0,0,134217728,33554432,1536,268435456,268435456,268435456,268435456,128,256,32,0,65536,131072,524288,16777216,268435456,2147483648,1572864,1835008,640,32768,65536,262144,1048576,2097152,196608,196800,196608,196608,0,131072,131072,131072,196608,196624,196608,196624,196608,196608,128,4096,16384,16384,2048,0,4,0,0,2147483648,2097152,0,1024,32,32,0,65536,1572864,1048576,32768,32768,32768,32768,196608,196608,196608,64,64,196608,196608,131072,131072,131072,131072,268435456,268435456,64,196736,196608,196608,196608,131072,196608,196608,16384,4,4,4,2,32,32,65536,1048576,12582912,1073741824,0,0,2,8,16,96,2048,32768,0,0,131072,268435456,268435456,268435456,256,256,196608,196672,196608,196608,196608,196608,4,0,256,256,256,256,32,32,32768,32,32,32,32,32768,268435456,268435456,268435456,196608,196608,196608,196624,196608,196608,196608,16,16,16,268435456,196608,64,64,64,196608,196608,196608,196672,268435456,64,64,196608,196608,16,196608,196608,196608,268435456,64,196608,131072,262144,4194304,25165824,33554432,134217728,268435456,268435456,196608,262152,8,256,512,3072,16384,200,-1073741816,8392713,40,8392718,520,807404072,40,520,100663304,0,0,-540651761,-540651761,257589048,0,262144,0,0,3,8,256,0,4,6,4100,8388612,0,0,0,3,4,8,256,512,1024,0,2097152,0,0,-537854471,-537854471,0,100663296,0,0,1,2,0,0,0,16384,0,0,0,96,14336,0,0,0,7,8,234881024,0,0,0,8,0,0,0,0,262144,0,0,16,64,384,512,0,1,1,0,12582912,0,0,0,0,33554432,67108864,-606084144,-606084144,-606084138,0,0,28,32,768,1966080,-608174080,0,0,0,14,35056,16,64,896,24576,98304,98304,131072,262144,524288,1048576,4194304,25165824,1048576,62914560,134217728,-805306368,0,384,512,16384,65536,131072,262144,29360128,33554432,134217728,268435456,1073741824,2147483648,262144,524288,1048576,29360128,33554432,524288,1048576,16777216,33554432,134217728,268435456,1073741824,0,0,0,123856,1966080,0,64,384,16384,65536,131072,16384,65536,524288,268435456,2147483648,0,0,524288,2147483648,0,0,1,16,0,256,524288,0,0,0,25,96,128,-537854471,0,0,0,32,7404800,-545259520,0,0,0,60,0,249,64768,1048576,6291456,6291456,25165824,100663296,402653184,1073741824,96,128,1280,2048,4096,57344,6291456,57344,6291456,8388608,16777216,33554432,201326592,1342177280,2147483648,0,57344,6291456,8388608,100663296,134217728,2147483648,0,0,0,1,8,16,64,128,64,128,256,1024,131072,131072,131072,262144,524288,16777216,57344,6291456,8388608,67108864,134217728,64,256,1024,2048,4096,57344,64,256,0,24576,32768,6291456,67108864,134217728,0,1,64,256,24576,32768,4194304,32768,4194304,67108864,0,0,64,256,0,0,24576,32768,0,16384,4194304,67108864,64,16384,0,0,1,64,256,16384,4194304,67108864,0,0,0,16384,0,16384,16384,0,-470447874,-470447874,-470447874,0,0,128,0,0,8,96,2048,32768,262144,8388608,35056,1376256,-471859200,0,0,14,16,224,2048,32768,2097152,4194304,8388608,-486539264,0,96,128,2048,32768,262144,2097152,262144,2097152,8388608,33554432,536870912,1073741824,2147483648,0,1610612736,2147483648,0,0,1,524288,1048576,12582912,0,0,0,151311,264503296,2097152,8388608,33554432,1610612736,2147483648,262144,8388608,33554432,536870912,67108864,4194304,0,4194304,0,4194304,4194304,0,0,524288,8388608,536870912,1073741824,2147483648,1,4097,8388609,96,2048,32768,1073741824,2147483648,0,96,2048,2147483648,0,0,96,2048,0,0,1,12582912,0,0,0,0,1641895695,1641895695,0,0,0,249,7404800,15,87808,1835008,1639972864,0,768,5120,16384,65536,1835008,1835008,12582912,16777216,1610612736,0,3,4,8,768,4096,65536,0,0,256,512,786432,8,256,512,4096,16384,1835008,16384,1835008,12582912,1610612736,0,0,0,256,0,0,0,4,8,16,32,1,2,8,256,16384,524288,16384,524288,1048576,12582912,1610612736,0,0,0,8388608,0,0,0,524288,4194304,0,0,0,8388608,-548662288,-548662288,-548662288,0,0,256,16384,65536,520093696,-1073741824,0,0,0,16777216,0,16,32,960,4096,4980736,520093696,1073741824,0,32,896,4096,57344,1048576,6291456,8388608,16777216,100663296,134217728,268435456,2147483648,0,512,786432,4194304,33554432,134217728,268435456,0,786432,4194304,134217728,268435456,0,524288,4194304,268435456,0,0,0,0,0,4194304,4194304,-540651761,0,0,0,2,4,8,16,96,128,264503296,-805306368,0,0,0,8,256,512,19456,131072,3072,16384,131072,262144,8388608,16777216,512,1024,2048,16384,131072,262144,131072,262144,8388608,33554432,201326592,268435456,0,3,4,256,1024,2048,57344,16384,131072,8388608,33554432,134217728,268435456,0,3,256,1024,16384,131072,33554432,134217728,1073741824,2147483648,0,0,256,524288,2147483648,0,3,256,33554432,134217728,1073741824,0,1,2,33554432,1,2,134217728,1073741824,0,1,2,134217728,0,0,0,64,0,0,0,16,32,896,4096,786432,4194304,16777216,33554432,201326592,268435456,1073741824,2147483648,0,0,0,15,0,4980736,4980736,4980736,70460,70460,3478332,0,0,1008,4984832,520093696,60,4864,65536,0,0,0,12,16,32,256,512,4096,65536,0,0,0,67108864,0,0,0,12,0,256,512,65536,0,0,1024,512,131072,131072,4,16,32,65536,0,4,16,32,0,0,0,4,16,0,0,16384,67108864,0,0,1,24,96,128,256,1024],a.TOKEN=["(0)","JSONChar","JSONCharRef","JSONPredefinedCharRef","ModuleDecl","Annotation","OptionDecl","Operator","Variable","Tag","EndTag","PragmaContents","DirCommentContents","DirPIContents","CDataSectionContents","AttrTest","Wildcard","EQName","IntegerLiteral","DecimalLiteral","DoubleLiteral","PredefinedEntityRef","'\"\"'","EscapeApos","AposChar","ElementContentChar","QuotAttrContentChar","AposAttrContentChar","NCName","QName","S","CharRef","CommentContents","DocTag","DocCommentContents","EOF","'!'","'\"'","'#'","'#)'","'$$'","''''","'('","'(#'","'(:'","'(:~'","')'","'*'","'*'","','","'-->'","'.'","'/'","'/>'","':'","':)'","';'","'"),token:l,next:function(e){e.pop()}}],CData:[{name:"CDataSectionContents",token:c},{name:m("]]>"),token:c,next:function(e){e.pop()}}],PI:[{name:"DirPIContents",token:k},{name:m("?"),token:k},{name:m("?>"),token:k,next:function(e){e.pop()}}],AposString:[{name:m("''"),token:"string",next:function(e){e.pop()}},{name:"PredefinedEntityRef",token:"constant.language.escape"},{name:"CharRef",token:"constant.language.escape"},{name:"EscapeApos",token:"constant.language.escape"},{name:"AposChar",token:"string"}],QuotString:[{name:m('"'),token:"string",next:function(e){e.pop()}},{name:"JSONPredefinedCharRef",token:"constant.language.escape"},{name:"JSONCharRef",token:"constant.language.escape"},{name:"JSONChar",token:"string"}]};n.JSONiqLexer=function(){return new r(a,g)}},{"./JSONiqTokenizer":1,"./lexer":3}],3:[function(e,t,n){"use strict";var a=function(e){var t=e;this.tokens=[],this.reset=function(){t=t,this.tokens=[]},this.startNonterminal=function(){},this.endNonterminal=function(){},this.terminal=function(e,n,a){this.tokens.push({name:e,value:t.substring(n,a)})},this.whitespace=function(e,n){this.tokens.push({name:"WS",value:t.substring(e,n)})}};n.Lexer=function(e,t){this.tokens=[],this.getLineTokens=function(n,r){r="start"!==r&&r?r:'["start"]';for(var s=JSON.parse(r),o=new a(n),i=new e(n,o),c=[];;){var u=s[s.length-1];try{o.tokens=[],i["parse_"+u]();var l=null;o.tokens.length>1&&"WS"===o.tokens[0].name&&(c.push({type:"text",value:o.tokens[0].value}),o.tokens.splice(0,1));for(var k=o.tokens[0],b=t[u],m=0;m-1},b.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),s=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,s,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=r.row,a.autoInsertedLineEnd=n+s.substr(r.column),a.autoInsertedBrackets++},b.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),s=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,s)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=r.row,a.maybeInsertedLineStart=s.substr(0,r.column)+n,a.maybeInsertedLineEnd=s.substr(r.column),a.maybeInsertedBrackets++},b.isAutoInsertedClosing=function(e,t,n){return a.autoInsertedBrackets>0&&e.row===a.autoInsertedRow&&n===a.autoInsertedLineEnd[0]&&t.substr(e.column)===a.autoInsertedLineEnd; +},b.isMaybeInsertedClosing=function(e,t){return a.maybeInsertedBrackets>0&&e.row===a.maybeInsertedRow&&t.substr(e.column)===a.maybeInsertedLineEnd&&t.substr(0,e.column)==a.maybeInsertedLineStart},b.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},b.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},r.inherits(b,s),t.CstyleBehaviour=b}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),s=e("../behaviour").Behaviour,o=e("../../token_iterator").TokenIterator,i=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,r,s){if('"'==s||"'"==s){var i=s,c=r.doc.getTextRange(n.getSelectionRange());if(""!==c&&"'"!==c&&'"'!=c&&n.getWrapBehavioursEnabled())return{text:i+c+i,selection:!1};var u=n.getCursorPosition(),l=r.doc.getLine(u.row),k=l.substring(u.column,u.column+1),b=new o(r,u.row,u.column),m=b.getCurrentToken();if(k==i&&(a(m,"attribute-value")||a(m,"string")))return{text:"",selection:[1,1]};if(m||(m=b.stepBackward()),!m)return;for(;a(m,"tag-whitespace")||a(m,"whitespace");)m=b.stepBackward();var g=!k||k.match(/\s/);if(a(m,"attribute-equals")&&(g||">"==k)||a(m,"decl-attribute-equals")&&(g||"?"==k))return{text:i+i,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,a,r){var s=a.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==s||"'"==s)){var o=a.doc.getLine(r.start.row),i=o.substring(r.start.column+1,r.start.column+2);if(i==s)return r.end.column++,r}}),this.add("autoclosing","insertion",function(e,t,n,r,s){if(">"==s){var i=n.getCursorPosition(),c=new o(r,i.row,i.column),u=c.getCurrentToken()||c.stepBackward();if(!u||!(a(u,"tag-name")||a(u,"tag-whitespace")||a(u,"attribute-name")||a(u,"attribute-equals")||a(u,"attribute-value")))return;if(a(u,"reference.attribute-value"))return;if(a(u,"attribute-value")){var l=u.value.charAt(0);if('"'==l||"'"==l){var k=u.value.charAt(u.value.length-1),b=c.getCurrentTokenColumn()+u.value.length;if(b>i.column||b==i.column&&l!=k)return}}for(;!a(u,"tag-name");)u=c.stepBackward();var m=c.getCurrentTokenRow(),g=c.getCurrentTokenColumn();if(a(c.stepBackward(),"end-tag-open"))return;var d=u.value;if(m==i.row&&(d=d.substring(0,i.column-g)),this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,a,r){if("\n"==r){var s=n.getCursorPosition(),i=a.getLine(s.row),c=new o(a,s.row,s.column),u=c.getCurrentToken();if(u&&u.type.indexOf("tag-close")!==-1){for(;u&&u.type.indexOf("tag-name")===-1;)u=c.stepBackward();if(!u)return;var l=u.value,k=c.getCurrentTokenRow();if(u=c.stepBackward(),!u||u.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[l]){var b=a.getTokenAt(s.row,s.column+1),i=a.getLine(k),m=this.$getIndent(i),g=m+a.getTabString();return b&&""==s){var o=n.getCursorPosition(),i=new c(r,o.row,o.column),u=i.getCurrentToken(),l=!1,e=JSON.parse(e).pop();if(u&&">"===u.value||"StartTag"!==e)return;if(u&&(a(u,"meta.tag")||a(u,"text")&&u.value.match("/")))l=!0;else do u=i.stepBackward();while(u&&(a(u,"string")||a(u,"keyword.operator")||a(u,"entity.attribute-name")||a(u,"text")));var k=i.stepBackward();if(!u||!a(u,"meta.tag")||null!==k&&k.value.match("/"))return;var b=u.value.substring(1);if(l)var b=b.substring(0,o.column-u.start);return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.XQueryBehaviour=u}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var a=e("../../lib/oop"),r=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};a.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var a=e.getLine(n);if(this.singleLineBlockCommentRe.test(a)&&!this.startRegionRe.test(a)&&!this.tripleStarBlockCommentRe.test(a))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(a)?"start":r},this.getFoldWidgetRange=function(e,t,n,a){var r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);var s=r.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var i=e.getCommentFoldRange(n,o+s[0].length,1);return i&&!i.isMultiLine()&&(a?i=this.getSectionRange(e,n):"all"!=t&&(i=null)),i}if("markbegin"!==t){var s=r.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),a=n.search(/\S/),s=t,o=n.length;t+=1;for(var i=t,c=e.getLength();++tu)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(a==u)break}i=t}}return new r(s,o,i,e.getLine(i).length)},this.getCommentRegionBlock=function(e,t,n){for(var a=t.search(/\s*$/),s=e.getLength(),o=n,i=/^\s*(?:\/\*|\/\/)#(end)?region\b/,c=1;++no)return new r(o,a,l,t.length)}}.call(o.prototype)}),define("ace/mode/jsoniq",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/jsoniq_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor"],function(e,t,n){"use strict";var a=e("../worker/worker_client").WorkerClient,r=e("../lib/oop"),s=e("./text").Mode,o=e("./text_highlight_rules").TextHighlightRules,i=e("./xquery/jsoniq_lexer").JSONiqLexer,c=e("../range").Range,u=e("./behaviour/xquery").XQueryBehaviour,l=e("./folding/cstyle").FoldMode,k=e("../anchor").Anchor,b=function(){this.$tokenizer=new i,this.$behaviour=new u,this.foldingRules=new l,this.$highlightRules=new o};r.inherits(b,s),function(){this.completer={getCompletions:function(e,t,n,a,r){return t.$worker?(t.$worker.emit("complete",{data:{pos:n,prefix:a}}),void t.$worker.on("complete",function(e){r(null,e.data)})):r()}},this.getNextLineIndent=function(e,t,n){var a=this.$getIndent(t),r=t.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/);return r&&(a+=n),a},this.checkOutdent=function(e,t,n){return!!/^\s+$/.test(t)&&/^\s*[\}\)]/.test(n)},this.autoOutdent=function(e,t,n){var a=t.getLine(n),r=a.match(/^(\s*[\}\)])/);if(!r)return 0;var s=r[1].length,o=t.findMatchingBracket({row:n,column:s});if(!o||o.row==n)return 0;var i=this.$getIndent(t.getLine(o.row));t.replace(new c(n,0,n,s-1),i)},this.toggleCommentLines=function(e,t,n,a){var r,s,o=!0,i=/^\s*\(:(.*):\)/;for(r=n;r<=a;r++)if(!i.test(t.getLine(r))){o=!1;break}var u=new c(0,0,0,0);for(r=n;r<=a;r++)s=t.getLine(r),u.start.row=r,u.end.row=r,u.end.column=s.length,t.replace(u,o?s.match(i)[1]:"(:"+s+":)")},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/xquery_worker","XQueryWorker"),n=this;return t.attachToDocument(e.getDocument()),t.on("ok",function(t){e.clearAnnotations()}),t.on("markers",function(t){e.clearAnnotations(),n.addMarkers(t.data,e)}),t},this.removeMarkers=function(e){var t=e.getMarkers(!1);for(var n in t)0===t[n].clazz.indexOf("language_highlight_")&&e.removeMarker(n);for(var a=0;a=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaHighlightRules = function() { - var keywords = ( - "abstract|continue|for|new|switch|" + - "assert|default|goto|package|synchronized|" + - "boolean|do|if|private|this|" + - "break|double|implements|protected|throw|" + - "byte|else|import|public|throws|" + - "case|enum|instanceof|return|transient|" + - "catch|extends|int|short|try|" + - "char|final|interface|static|void|" + - "class|finally|long|strictfp|volatile|" + - "const|float|native|super|while" - ); - - var buildinConstants = ("null|Infinity|NaN|undefined"); - - - var langClasses = ( - "AbstractMethodError|AssertionError|ClassCircularityError|"+ - "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+ - "ExceptionInInitializerError|IllegalAccessError|"+ - "IllegalThreadStateException|InstantiationError|InternalError|"+ - "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+ - "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+ - "SuppressWarnings|TypeNotPresentException|UnknownError|"+ - "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+ - "InstantiationException|IndexOutOfBoundsException|"+ - "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+ - "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+ - "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+ - "InterruptedException|NoSuchMethodException|IllegalAccessException|"+ - "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+ - "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+ - "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+ - "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+ - "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+ - "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+ - "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+ - "ArrayStoreException|ClassCastException|LinkageError|"+ - "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+ - "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+ - "Cloneable|Class|CharSequence|Comparable|String|Object" - ); - - var keywordMapper = this.createKeywordMapper({ - "variable.language": "this", - "keyword": keywords, - "constant.language": buildinConstants, - "support.function": langClasses - }, "identifier"); - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "\\/\\/.*$" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" - }, { - token : "lparen", - regex : "[[({]" - }, { - token : "rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); -}; - -oop.inherits(JavaHighlightRules, TextHighlightRules); - -exports.JavaHighlightRules = JavaHighlightRules; -}); - -define("ace/mode/jsp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/java_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules; - -var JspHighlightRules = function() { - HtmlHighlightRules.call(this); - - var builtinVariables = 'request|response|out|session|' + - 'application|config|pageContext|page|Exception'; - - var keywords = 'page|include|taglib'; - - var startRules = [ - { - token : "comment", - regex : "<%--", - push : "jsp-dcomment" - }, { - token : "meta.tag", // jsp open tag - regex : "<%@?|<%=?|]+>", - push : "jsp-start" - } - ]; - - var endRules = [ - { - token : "meta.tag", // jsp close tag - regex : "%>|<\\/jsp:[^>]+>", - next : "pop" - }, { - token: "variable.language", - regex : builtinVariables - }, { - token: "keyword", - regex : keywords - } - ]; - - for (var key in this.$rules) - this.$rules[key].unshift.apply(this.$rules[key], startRules); - - this.embedRules(JavaHighlightRules, "jsp-", endRules, ["start"]); - - this.addRules({ - "jsp-dcomment" : [{ - token : "comment", - regex : ".*?--%>", - next : "pop" - }] - }); - - this.normalizeRules(); -}; - -oop.inherits(JspHighlightRules, HtmlHighlightRules); - -exports.JspHighlightRules = JspHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/jsp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jsp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JspHighlightRules = require("./jsp_highlight_rules").JspHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JspHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.$id = "ace/mode/jsp"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),i=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",c=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",u=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",p=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":s,"support.type":i,"support.constant.color":l,"support.constant.fonts":c},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+u+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};r.inherits(p,o),t.CssHighlightRules=p}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(i,o),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+r+")(\\.)(prototype)(\\.)("+r+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:r},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(a,i),t.JavaScriptHighlightRules=a}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===i&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(o.prototype),r.inherits(i,o),t.XmlHighlightRules=i}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/lang"),i=e("./css_highlight_rules").CssHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=o.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),c=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(i,"css-","style"),this.embedTagRules(a,"js-","script"),this.constructor===c&&this.normalizeRules()};r.inherits(c,s),t.HtmlHighlightRules=c}),define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(){var e="abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while",t="null|Infinity|NaN|undefined",n="AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object",r=this.createKeywordMapper({"variable.language":"this",keyword:e,"constant.language":t,"support.function":n},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}]},this.embedRules(o,"doc-",[o.getEndRule("start")])};r.inherits(a,i),t.JavaHighlightRules=a}),define("ace/mode/jsp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/java_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./html_highlight_rules").HtmlHighlightRules,i=e("./java_highlight_rules").JavaHighlightRules,a=function(){o.call(this);var e="request|response|out|session|application|config|pageContext|page|Exception",t="page|include|taglib",n=[{token:"comment",regex:"<%--",push:"jsp-dcomment"},{token:"meta.tag",regex:"<%@?|<%=?|]+>",push:"jsp-start"}],r=[{token:"meta.tag",regex:"%>|<\\/jsp:[^>]+>",next:"pop"},{token:"variable.language",regex:e},{token:"keyword",regex:t}];for(var a in this.$rules)this.$rules[a].unshift.apply(this.$rules[a],n);this.embedRules(i,"jsp-",r,["start"]),this.addRules({"jsp-dcomment":[{token:"comment",regex:".*?--%>",next:"pop"}]}),this.normalizeRules()};r.inherits(a,o),t.JspHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],u={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?r=u[t]:void(r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,i){var a=n.getCursorPosition(),l=o.doc.getLine(a.row); +if("{"==i){g(n);var c=n.getSelectionRange(),u=o.doc.getTextRange(c);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var p=l.substring(a.column,a.column+1);if("}"==p){var m=o.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==m&&d.isAutoInsertedClosing(a,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var h="";d.isMaybeInsertedClosing(a,l)&&(h=s.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var p=l.substring(a.column,a.column+1);if("}"===p){var x=o.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!x)return null;var f=this.$getIndent(o.getLine(x.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var f=this.$getIndent(l)}var b=f+o.getTabString();return{text:"\n"+b+"\n"+f+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){g(n);var s=o.doc.getLine(i.start.row),l=s.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if(")"==c){var u=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){g(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if("]"==c){var u=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){g(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var i=o,a=n.getSelectionRange(),s=r.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var l=n.getCursorPosition(),c=r.doc.getLine(l.row),u=c.substring(l.column-1,l.column),d=c.substring(l.column,l.column+1),p=r.getTokenAt(l.row,l.column),m=r.getTokenAt(l.row,l.column+1);if("\\"==u&&p&&/escape/.test(p.type))return null;var h,x=p&&/string/.test(p.type),f=!m||/string/.test(m.type);if(d==i)h=x!==f;else{if(x&&!f)return null;if(x&&f)return null;var b=r.$mode.tokenRe;b.lastIndex=0;var k=b.test(u);b.lastIndex=0;var y=b.test(u);if(k||y)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){g(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(s==i)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){var o=new a(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var i=o.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),i=t,a=n.length;t+=1;for(var s=t,l=e.getLength();++tc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=i)break;if(u.isMultiLine())t=u.end.row;else if(r==c)break}s=t}}return new o(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++na)return new o(a,r,u,t.length)}}.call(a.prototype)}),define("ace/mode/jsp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jsp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./jsp_highlight_rules").JspHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new s,this.foldingRules=new l};r.inherits(c,o),function(){this.$id="ace/mode/jsp"}.call(c.prototype),t.Mode=c}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-jsx.js b/www/js/vendor/ace/mode-jsx.js index 748dbb606..b2800ef2c 100755 --- a/www/js/vendor/ace/mode-jsx.js +++ b/www/js/vendor/ace/mode-jsx.js @@ -1,762 +1 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/jsx_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JsxHighlightRules = function() { - var keywords = lang.arrayToMap( - ("break|do|instanceof|typeof|case|else|new|var|catch|finally|return|void|continue|for|switch|default|while|function|this|" + - "if|throw|" + - "delete|in|try|" + - "class|extends|super|import|from|into|implements|interface|static|mixin|override|abstract|final|" + - "number|int|string|boolean|variant|" + - "log|assert").split("|") - ); - - var buildinConstants = lang.arrayToMap( - ("null|true|false|NaN|Infinity|__FILE__|__LINE__|undefined").split("|") - ); - - var reserved = lang.arrayToMap( - ("debugger|with|" + - "const|export|" + - "let|private|public|yield|protected|" + - "extern|native|as|operator|__fake__|__readonly__").split("|") - ); - - var identifierRe = "[a-zA-Z_][a-zA-Z0-9_]*\\b"; - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "\\/\\/.*$" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment" - }, { - token : "string.regexp", - regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : [ - "storage.type", - "text", - "entity.name.function" - ], - regex : "(function)(\\s+)(" + identifierRe + ")" - }, { - token : function(value) { - if (value == "this") - return "variable.language"; - else if (value == "function") - return "storage.type"; - else if (keywords.hasOwnProperty(value) || reserved.hasOwnProperty(value)) - return "keyword"; - else if (buildinConstants.hasOwnProperty(value)) - return "constant.language"; - else if (/^_?[A-Z][a-zA-Z0-9_]*$/.test(value)) - return "language.support.class"; - else - return "identifier"; - }, - regex : identifierRe - }, { - token : "keyword.operator", - regex : "!|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" - }, { - token : "punctuation.operator", - regex : "\\?|\\:|\\,|\\;|\\." - }, { - token : "paren.lparen", - regex : "[[({<]" - }, { - token : "paren.rparen", - regex : "[\\])}>]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); -}; - -oop.inherits(JsxHighlightRules, TextHighlightRules); - -exports.JsxHighlightRules = JsxHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/jsx",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jsx_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JsxHighlightRules = require("./jsx_highlight_rules").JsxHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -function Mode() { - this.HighlightRules = JsxHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -} -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/jsx"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(i,o),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/jsx_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),o=e("../lib/lang"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,a=function(){var e=o.arrayToMap("break|do|instanceof|typeof|case|else|new|var|catch|finally|return|void|continue|for|switch|default|while|function|this|if|throw|delete|in|try|class|extends|super|import|from|into|implements|interface|static|mixin|override|abstract|final|number|int|string|boolean|variant|log|assert".split("|")),t=o.arrayToMap("null|true|false|NaN|Infinity|__FILE__|__LINE__|undefined".split("|")),n=o.arrayToMap("debugger|with|const|export|let|private|public|yield|protected|extern|native|as|operator|__fake__|__readonly__".split("|")),r="[a-zA-Z_][a-zA-Z0-9_]*\\b";this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:["storage.type","text","entity.name.function"],regex:"(function)(\\s+)("+r+")"},{token:function(r){return"this"==r?"variable.language":"function"==r?"storage.type":e.hasOwnProperty(r)||n.hasOwnProperty(r)?"keyword":t.hasOwnProperty(r)?"constant.language":/^_?[A-Z][a-zA-Z0-9_]*$/.test(r)?"language.support.class":"identifier"},regex:r},{token:"keyword.operator",regex:"!|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({<]"},{token:"paren.rparen",regex:"[\\])}>]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(a,s),t.JsxHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,s=e.findMatchingBracket({row:t,column:i});if(!s||s.row==t)return 0;var a=this.$getIndent(e.getLine(s.row));e.replace(new r(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],l={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,l.rangeCount!=e.multiSelect.rangeCount&&(l={rangeCount:e.multiSelect.rangeCount})),l[t]?r=l[t]:void(r=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,i){var s=n.getCursorPosition(),u=o.doc.getLine(s.row);if("{"==i){g(n);var c=n.getSelectionRange(),l=o.doc.getTextRange(c);if(""!==l&&"{"!==l&&n.getWrapBehavioursEnabled())return{text:"{"+l+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(u[s.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var h=u.substring(s.column,s.column+1);if("}"==h){var m=o.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(null!==m&&d.isAutoInsertedClosing(s,u,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var f="";d.isMaybeInsertedClosing(s,u)&&(f=a.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var h=u.substring(s.column,s.column+1);if("}"===h){var p=o.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!p)return null;var b=this.$getIndent(o.getLine(p.row))}else{if(!f)return void d.clearMaybeInsertedClosing();var b=this.$getIndent(u)}var x=b+o.getTabString();return{text:"\n"+x+"\n"+b+f,selection:[1,x.length,1,x.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var s=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==s){g(n);var a=o.doc.getLine(i.start.row),u=a.substring(i.end.column,i.end.column+1);if("}"==u)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"("+s+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var a=n.getCursorPosition(),u=r.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if(")"==c){var l=r.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==l&&d.isAutoInsertedClosing(a,u,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(")"==a)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"["+s+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var a=n.getCursorPosition(),u=r.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if("]"==c){var l=r.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==l&&d.isAutoInsertedClosing(a,u,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if("]"==a)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var i=o,s=n.getSelectionRange(),a=r.doc.getTextRange(s);if(""!==a&&"'"!==a&&'"'!=a&&n.getWrapBehavioursEnabled())return{text:i+a+i,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),l=c.substring(u.column-1,u.column),d=c.substring(u.column,u.column+1),h=r.getTokenAt(u.row,u.column),m=r.getTokenAt(u.row,u.column+1);if("\\"==l&&h&&/escape/.test(h.type))return null;var f,p=h&&/string/.test(h.type),b=!m||/string/.test(m.type);if(d==i)f=p!==b;else{if(p&&!b)return null;if(p&&b)return null;var x=r.$mode.tokenRe;x.lastIndex=0;var k=x.test(l);x.lastIndex=0;var v=x.test(l);if(k||v)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;f=!0}return{text:f?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(a==i)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var o=new s(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var i=o.match(this.foldingStartMarker);if(i){var s=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,s);var a=e.getCommentFoldRange(n,s+i[0].length,1);return a&&!a.isMultiLine()&&(r?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),i=t,s=n.length;t+=1;for(var a=t,u=e.getLength();++tc)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=i)break;if(l.isMultiLine())t=l.end.row;else if(r==c)break}a=t}}return new o(i,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/)#(end)?region\b/,u=1;++ns)return new o(s,r,l,t.length)}}.call(s.prototype)}),define("ace/mode/jsx",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jsx_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";function r(){this.HighlightRules=s,this.$outdent=new a,this.$behaviour=new u,this.foldingRules=new c}var o=e("../lib/oop"),i=e("./text").Mode,s=e("./jsx_highlight_rules").JsxHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,u=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode;o.inherits(r,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e){var s=t.match(/^.*[\{\(\[]\s*$/);s&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/jsx"}.call(r.prototype),t.Mode=r}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-julia.js b/www/js/vendor/ace/mode-julia.js index e9b3f7abc..f5fc55481 100755 --- a/www/js/vendor/ace/mode-julia.js +++ b/www/js/vendor/ace/mode-julia.js @@ -1,296 +1 @@ -define("ace/mode/julia_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JuliaHighlightRules = function() { - - this.$rules = { start: - [ { include: '#function_decl' }, - { include: '#function_call' }, - { include: '#type_decl' }, - { include: '#keyword' }, - { include: '#operator' }, - { include: '#number' }, - { include: '#string' }, - { include: '#comment' } ], - '#bracket': - [ { token: 'keyword.bracket.julia', - regex: '\\(|\\)|\\[|\\]|\\{|\\}|,' } ], - '#comment': - [ { token: - [ 'punctuation.definition.comment.julia', - 'comment.line.number-sign.julia' ], - regex: '(#)(?!\\{)(.*$)'} ], - '#function_call': - [ { token: [ 'support.function.julia', 'text' ], - regex: '([a-zA-Z0-9_]+!?)([\\w\\xff-\\u218e\\u2455-\\uffff]*\\()'} ], - '#function_decl': - [ { token: [ 'keyword.other.julia', 'meta.function.julia', - 'entity.name.function.julia', 'meta.function.julia','text' ], - regex: '(function|macro)(\\s*)([a-zA-Z0-9_\\{]+!?)([\\w\\xff-\\u218e\\u2455-\\uffff]*)([(\\\\{])'} ], - '#keyword': - [ { token: 'keyword.other.julia', - regex: '\\b(?:function|type|immutable|macro|quote|abstract|bitstype|typealias|module|baremodule|new)\\b' }, - { token: 'keyword.control.julia', - regex: '\\b(?:if|else|elseif|while|for|in|begin|let|end|do|try|catch|finally|return|break|continue)\\b' }, - { token: 'storage.modifier.variable.julia', - regex: '\\b(?:global|local|const|export|import|importall|using)\\b' }, - { token: 'variable.macro.julia', regex: '@[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b' } ], - '#number': - [ { token: 'constant.numeric.julia', - regex: '\\b0(?:x|X)[0-9a-fA-F]*|(?:\\b[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]*)?(?:im)?|\\bInf(?:32)?\\b|\\bNaN(?:32)?\\b|\\btrue\\b|\\bfalse\\b' } ], - '#operator': - [ { token: 'keyword.operator.update.julia', - regex: '=|:=|\\+=|-=|\\*=|/=|//=|\\.//=|\\.\\*=|\\\\=|\\.\\\\=|^=|\\.^=|%=|\\|=|&=|\\$=|<<=|>>=' }, - { token: 'keyword.operator.ternary.julia', regex: '\\?|:' }, - { token: 'keyword.operator.boolean.julia', - regex: '\\|\\||&&|!' }, - { token: 'keyword.operator.arrow.julia', regex: '->|<-|-->' }, - { token: 'keyword.operator.relation.julia', - regex: '>|<|>=|<=|==|!=|\\.>|\\.<|\\.>=|\\.>=|\\.==|\\.!=|\\.=|\\.!|<:|:>' }, - { token: 'keyword.operator.range.julia', regex: ':' }, - { token: 'keyword.operator.shift.julia', regex: '<<|>>' }, - { token: 'keyword.operator.bitwise.julia', regex: '\\||\\&|~' }, - { token: 'keyword.operator.arithmetic.julia', - regex: '\\+|-|\\*|\\.\\*|/|\\./|//|\\.//|%|\\.%|\\\\|\\.\\\\|\\^|\\.\\^' }, - { token: 'keyword.operator.isa.julia', regex: '::' }, - { token: 'keyword.operator.dots.julia', - regex: '\\.(?=[a-zA-Z])|\\.\\.+' }, - { token: 'keyword.operator.interpolation.julia', - regex: '\\$#?(?=.)' }, - { token: [ 'variable', 'keyword.operator.transposed-variable.julia' ], - regex: '([\\w\\xff-\\u218e\\u2455-\\uffff]+)((?:\'|\\.\')*\\.?\')' }, - { token: 'text', - regex: '\\[|\\('}, - { token: [ 'text', 'keyword.operator.transposed-matrix.julia' ], - regex: "([\\]\\)])((?:'|\\.')*\\.?')"} ], - '#string': - [ { token: 'punctuation.definition.string.begin.julia', - regex: '\'', - push: - [ { token: 'punctuation.definition.string.end.julia', - regex: '\'', - next: 'pop' }, - { include: '#string_escaped_char' }, - { defaultToken: 'string.quoted.single.julia' } ] }, - { token: 'punctuation.definition.string.begin.julia', - regex: '"', - push: - [ { token: 'punctuation.definition.string.end.julia', - regex: '"', - next: 'pop' }, - { include: '#string_escaped_char' }, - { defaultToken: 'string.quoted.double.julia' } ] }, - { token: 'punctuation.definition.string.begin.julia', - regex: '\\b[\\w\\xff-\\u218e\\u2455-\\uffff]+"', - push: - [ { token: 'punctuation.definition.string.end.julia', - regex: '"[\\w\\xff-\\u218e\\u2455-\\uffff]*', - next: 'pop' }, - { include: '#string_custom_escaped_char' }, - { defaultToken: 'string.quoted.custom-double.julia' } ] }, - { token: 'punctuation.definition.string.begin.julia', - regex: '`', - push: - [ { token: 'punctuation.definition.string.end.julia', - regex: '`', - next: 'pop' }, - { include: '#string_escaped_char' }, - { defaultToken: 'string.quoted.backtick.julia' } ] } ], - '#string_custom_escaped_char': [ { token: 'constant.character.escape.julia', regex: '\\\\"' } ], - '#string_escaped_char': - [ { token: 'constant.character.escape.julia', - regex: '\\\\(?:\\\\|[0-3]\\d{,2}|[4-7]\\d?|x[a-fA-F0-9]{,2}|u[a-fA-F0-9]{,4}|U[a-fA-F0-9]{,8}|.)' } ], - '#type_decl': - [ { token: - [ 'keyword.control.type.julia', - 'meta.type.julia', - 'entity.name.type.julia', - 'entity.other.inherited-class.julia', - 'punctuation.separator.inheritance.julia', - 'entity.other.inherited-class.julia' ], - regex: '(type|immutable)(\\s+)([a-zA-Z0-9_]+)(?:(\\s*)(<:)(\\s*[.a-zA-Z0-9_:]+))?' }, - { token: [ 'other.typed-variable.julia', 'support.type.julia' ], - regex: '([a-zA-Z0-9_]+)(::[a-zA-Z0-9_{}]+)' } ] } - - this.normalizeRules(); -}; - -JuliaHighlightRules.metaData = { fileTypes: [ 'jl' ], - firstLineMatch: '^#!.*\\bjulia\\s*$', - foldingStartMarker: '^\\s*(?:if|while|for|begin|function|macro|module|baremodule|type|immutable|let)\\b(?!.*\\bend\\b).*$', - foldingStopMarker: '^\\s*(?:end)\\b.*$', - name: 'Julia', - scopeName: 'source.julia' } - - -oop.inherits(JuliaHighlightRules, TextHighlightRules); - -exports.JuliaHighlightRules = JuliaHighlightRules; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/julia",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/julia_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JuliaHighlightRules = require("./julia_highlight_rules").JuliaHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JuliaHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "#"; - this.blockComment = ""; - this.$id = "ace/mode/julia"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/julia_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,i){"use strict";var n=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{include:"#function_decl"},{include:"#function_call"},{include:"#type_decl"},{include:"#keyword"},{include:"#operator"},{include:"#number"},{include:"#string"},{include:"#comment"}],"#bracket":[{token:"keyword.bracket.julia",regex:"\\(|\\)|\\[|\\]|\\{|\\}|,"}],"#comment":[{token:["punctuation.definition.comment.julia","comment.line.number-sign.julia"],regex:"(#)(?!\\{)(.*$)"}],"#function_call":[{token:["support.function.julia","text"],regex:"([a-zA-Z0-9_]+!?)([\\w\\xff-\\u218e\\u2455-\\uffff]*\\()"}],"#function_decl":[{token:["keyword.other.julia","meta.function.julia","entity.name.function.julia","meta.function.julia","text"],regex:"(function|macro)(\\s*)([a-zA-Z0-9_\\{]+!?)([\\w\\xff-\\u218e\\u2455-\\uffff]*)([(\\\\{])"}],"#keyword":[{token:"keyword.other.julia",regex:"\\b(?:function|type|immutable|macro|quote|abstract|bitstype|typealias|module|baremodule|new)\\b"},{token:"keyword.control.julia",regex:"\\b(?:if|else|elseif|while|for|in|begin|let|end|do|try|catch|finally|return|break|continue)\\b"},{token:"storage.modifier.variable.julia",regex:"\\b(?:global|local|const|export|import|importall|using)\\b"},{token:"variable.macro.julia",regex:"@[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b"}],"#number":[{token:"constant.numeric.julia",regex:"\\b0(?:x|X)[0-9a-fA-F]*|(?:\\b[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]*)?(?:im)?|\\bInf(?:32)?\\b|\\bNaN(?:32)?\\b|\\btrue\\b|\\bfalse\\b"}],"#operator":[{token:"keyword.operator.update.julia",regex:"=|:=|\\+=|-=|\\*=|/=|//=|\\.//=|\\.\\*=|\\\\=|\\.\\\\=|^=|\\.^=|%=|\\|=|&=|\\$=|<<=|>>="},{token:"keyword.operator.ternary.julia",regex:"\\?|:"},{token:"keyword.operator.boolean.julia",regex:"\\|\\||&&|!"},{token:"keyword.operator.arrow.julia",regex:"->|<-|-->"},{token:"keyword.operator.relation.julia",regex:">|<|>=|<=|==|!=|\\.>|\\.<|\\.>=|\\.>=|\\.==|\\.!=|\\.=|\\.!|<:|:>"},{token:"keyword.operator.range.julia",regex:":"},{token:"keyword.operator.shift.julia",regex:"<<|>>"},{token:"keyword.operator.bitwise.julia",regex:"\\||\\&|~"},{token:"keyword.operator.arithmetic.julia",regex:"\\+|-|\\*|\\.\\*|/|\\./|//|\\.//|%|\\.%|\\\\|\\.\\\\|\\^|\\.\\^"},{token:"keyword.operator.isa.julia",regex:"::"},{token:"keyword.operator.dots.julia",regex:"\\.(?=[a-zA-Z])|\\.\\.+"},{token:"keyword.operator.interpolation.julia",regex:"\\$#?(?=.)"},{token:["variable","keyword.operator.transposed-variable.julia"],regex:"([\\w\\xff-\\u218e\\u2455-\\uffff]+)((?:'|\\.')*\\.?')"},{token:"text",regex:"\\[|\\("},{token:["text","keyword.operator.transposed-matrix.julia"],regex:"([\\]\\)])((?:'|\\.')*\\.?')"}],"#string":[{token:"punctuation.definition.string.begin.julia",regex:"'",push:[{token:"punctuation.definition.string.end.julia",regex:"'",next:"pop"},{include:"#string_escaped_char"},{defaultToken:"string.quoted.single.julia"}]},{token:"punctuation.definition.string.begin.julia",regex:'"',push:[{token:"punctuation.definition.string.end.julia",regex:'"',next:"pop"},{include:"#string_escaped_char"},{defaultToken:"string.quoted.double.julia"}]},{token:"punctuation.definition.string.begin.julia",regex:'\\b[\\w\\xff-\\u218e\\u2455-\\uffff]+"',push:[{token:"punctuation.definition.string.end.julia",regex:'"[\\w\\xff-\\u218e\\u2455-\\uffff]*',next:"pop"},{include:"#string_custom_escaped_char"},{defaultToken:"string.quoted.custom-double.julia"}]},{token:"punctuation.definition.string.begin.julia",regex:"`",push:[{token:"punctuation.definition.string.end.julia",regex:"`",next:"pop"},{include:"#string_escaped_char"},{defaultToken:"string.quoted.backtick.julia"}]}],"#string_custom_escaped_char":[{token:"constant.character.escape.julia",regex:'\\\\"'}],"#string_escaped_char":[{token:"constant.character.escape.julia",regex:"\\\\(?:\\\\|[0-3]\\d{,2}|[4-7]\\d?|x[a-fA-F0-9]{,2}|u[a-fA-F0-9]{,4}|U[a-fA-F0-9]{,8}|.)"}],"#type_decl":[{token:["keyword.control.type.julia","meta.type.julia","entity.name.type.julia","entity.other.inherited-class.julia","punctuation.separator.inheritance.julia","entity.other.inherited-class.julia"],regex:"(type|immutable)(\\s+)([a-zA-Z0-9_]+)(?:(\\s*)(<:)(\\s*[.a-zA-Z0-9_:]+))?"},{token:["other.typed-variable.julia","support.type.julia"],regex:"([a-zA-Z0-9_]+)(::[a-zA-Z0-9_{}]+)"}]},this.normalizeRules()};r.metaData={fileTypes:["jl"],firstLineMatch:"^#!.*\\bjulia\\s*$",foldingStartMarker:"^\\s*(?:if|while|for|begin|function|macro|module|baremodule|type|immutable|let)\\b(?!.*\\bend\\b).*$",foldingStopMarker:"^\\s*(?:end)\\b.*$",name:"Julia",scopeName:"source.julia"},n.inherits(r,o),t.JuliaHighlightRules=r}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,i){"use strict";var n=e("../../lib/oop"),o=e("../../range").Range,r=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};n.inherits(a,r),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,i){var n=e.getLine(i);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var o=this._getFoldWidgetBase(e,t,i);return!o&&this.startRegionRe.test(n)?"start":o},this.getFoldWidgetRange=function(e,t,i,n){var o=e.getLine(i);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,i);var r=o.match(this.foldingStartMarker);if(r){var a=r.index;if(r[1])return this.openingBracketBlock(e,r[1],i,a);var l=e.getCommentFoldRange(i,a+r[0].length,1);return l&&!l.isMultiLine()&&(n?l=this.getSectionRange(e,i):"all"!=t&&(l=null)),l}if("markbegin"!==t){var r=o.match(this.foldingStopMarker);if(r){var a=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],i,a):e.getCommentFoldRange(i,a,-1)}}},this.getSectionRange=function(e,t){var i=e.getLine(t),n=i.search(/\S/),r=t,a=i.length;t+=1;for(var l=t,u=e.getLength();++ts)break;var g=this.getFoldWidgetRange(e,"all",t);if(g){if(g.start.row<=r)break;if(g.isMultiLine())t=g.end.row;else if(n==s)break}l=t}}return new o(r,a,l,e.getLine(l).length)},this.getCommentRegionBlock=function(e,t,i){for(var n=t.search(/\s*$/),r=e.getLength(),a=i,l=/^\s*(?:\/\*|\/\/)#(end)?region\b/,u=1;++ia)return new o(a,n,g,t.length)}}.call(a.prototype)}),define("ace/mode/julia",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/julia_highlight_rules","ace/mode/folding/cstyle"],function(e,t,i){"use strict";var n=e("../lib/oop"),o=e("./text").Mode,r=e("./julia_highlight_rules").JuliaHighlightRules,a=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=r,this.foldingRules=new a};n.inherits(l,o),function(){this.lineCommentStart="#",this.blockComment="",this.$id="ace/mode/julia"}.call(l.prototype),t.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-latex.js b/www/js/vendor/ace/mode-latex.js index 358c90808..966fb8acc 100755 --- a/www/js/vendor/ace/mode-latex.js +++ b/www/js/vendor/ace/mode-latex.js @@ -1,223 +1 @@ -define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var LatexHighlightRules = function() { - - this.$rules = { - "start" : [{ - token : "comment", - regex : "%.*$" - }, { - token : ["keyword", "lparen", "variable.parameter", "rparen", "lparen", "storage.type", "rparen"], - regex : "(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})" - }, { - token : ["keyword","lparen", "variable.parameter", "rparen"], - regex : "(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?" - }, { - token : ["storage.type", "lparen", "variable.parameter", "rparen"], - regex : "(\\\\(?:begin|end))({)(\\w*)(})" - }, { - token : "storage.type", - regex : "\\\\[a-zA-Z]+" - }, { - token : "lparen", - regex : "[[({]" - }, { - token : "rparen", - regex : "[\\])}]" - }, { - token : "constant.character.escape", - regex : "\\\\[^a-zA-Z]?" - }, { - token : "string", - regex : "\\${1,2}", - next : "equation" - }], - "equation" : [{ - token : "comment", - regex : "%.*$" - }, { - token : "string", - regex : "\\${1,2}", - next : "start" - }, { - token : "constant.character.escape", - regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)" - }, { - token : "error", - regex : "^\\s*$", - next : "start" - }, { - defaultToken : "string" - }] - - }; -}; -oop.inherits(LatexHighlightRules, TextHighlightRules); - -exports.LatexHighlightRules = LatexHighlightRules; - -}); - -define("ace/mode/folding/latex",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var FoldMode = exports.FoldMode = function() {}; - -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /^\s*\\(begin)|(section|subsection|paragraph)\b|{\s*$/; - this.foldingStopMarker = /^\s*\\(end)\b|^\s*}/; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var line = session.doc.getLine(row); - var match = this.foldingStartMarker.exec(line); - if (match) { - if (match[1]) - return this.latexBlock(session, row, match[0].length - 1); - if (match[2]) - return this.latexSection(session, row, match[0].length - 1); - - return this.openingBracketBlock(session, "{", row, match.index); - } - - var match = this.foldingStopMarker.exec(line); - if (match) { - if (match[1]) - return this.latexBlock(session, row, match[0].length - 1); - - return this.closingBracketBlock(session, "}", row, match.index + match[0].length); - } - }; - - this.latexBlock = function(session, row, column) { - var keywords = { - "\\begin": 1, - "\\end": -1 - }; - - var stream = new TokenIterator(session, row, column); - var token = stream.getCurrentToken(); - if (!token || !(token.type == "storage.type" || token.type == "constant.character.escape")) - return; - - var val = token.value; - var dir = keywords[val]; - - var getType = function() { - var token = stream.stepForward(); - var type = token.type == "lparen" ?stream.stepForward().value : ""; - if (dir === -1) { - stream.stepBackward(); - if (type) - stream.stepBackward(); - } - return type; - }; - var stack = [getType()]; - var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length; - var startRow = row; - - stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; - while(token = stream.step()) { - if (!token || !(token.type == "storage.type" || token.type == "constant.character.escape")) - continue; - var level = keywords[token.value]; - if (!level) - continue; - var type = getType(); - if (level === dir) - stack.unshift(type); - else if (stack.shift() !== type || !stack.length) - break; - } - - if (stack.length) - return; - - var row = stream.getCurrentTokenRow(); - if (dir === -1) - return new Range(row, session.getLine(row).length, startRow, startColumn); - stream.stepBackward(); - return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn()); - }; - - this.latexSection = function(session, row, column) { - var keywords = ["\\subsection", "\\section", "\\begin", "\\end", "\\paragraph"]; - - var stream = new TokenIterator(session, row, column); - var token = stream.getCurrentToken(); - if (!token || token.type != "storage.type") - return; - - var startLevel = keywords.indexOf(token.value); - var stackDepth = 0 - var endRow = row; - - while(token = stream.stepForward()) { - if (token.type !== "storage.type") - continue; - var level = keywords.indexOf(token.value); - - if (level >= 2) { - if (!stackDepth) - endRow = stream.getCurrentTokenRow() - 1; - stackDepth += level == 2 ? 1 : - 1; - if (stackDepth < 0) - break - } else if (level >= startLevel) - break; - } - - if (!stackDepth) - endRow = stream.getCurrentTokenRow() - 1; - - while (endRow > row && !/\S/.test(session.getLine(endRow))) - endRow--; - - return new Range( - row, session.getLine(row).length, - endRow, session.getLine(endRow).length - ); - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/latex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/latex_highlight_rules","ace/mode/folding/latex","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var LatexHighlightRules = require("./latex_highlight_rules").LatexHighlightRules; -var LatexFoldMode = require("./folding/latex").FoldMode; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = LatexHighlightRules; - this.foldingRules = new LatexFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.type = "text"; - - this.lineCommentStart = "%"; - - this.$id = "ace/mode/latex"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment",regex:"%.*$"},{token:["keyword","lparen","variable.parameter","rparen","lparen","storage.type","rparen"],regex:"(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})"},{token:["keyword","lparen","variable.parameter","rparen"],regex:"(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\(?:begin|end))({)(\\w*)(})"},{token:"storage.type",regex:"\\\\[a-zA-Z]+"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"constant.character.escape",regex:"\\\\[^a-zA-Z]?"},{token:"string",regex:"\\${1,2}",next:"equation"}],equation:[{token:"comment",regex:"%.*$"},{token:"string",regex:"\\${1,2}",next:"start"},{token:"constant.character.escape",regex:"\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"},{token:"error",regex:"^\\s*$",next:"start"},{defaultToken:"string"}]}};n.inherits(o,a),t.LatexHighlightRules=o}),define("ace/mode/folding/latex",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,r){"use strict";var n=e("../../lib/oop"),a=e("./fold_mode").FoldMode,o=e("../../range").Range,i=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(){};n.inherits(l,a),function(){this.foldingStartMarker=/^\s*\\(begin)|(section|subsection|paragraph)\b|{\s*$/,this.foldingStopMarker=/^\s*\\(end)\b|^\s*}/,this.getFoldWidgetRange=function(e,t,r){var n=e.doc.getLine(r),a=this.foldingStartMarker.exec(n);if(a)return a[1]?this.latexBlock(e,r,a[0].length-1):a[2]?this.latexSection(e,r,a[0].length-1):this.openingBracketBlock(e,"{",r,a.index);var a=this.foldingStopMarker.exec(n);return a?a[1]?this.latexBlock(e,r,a[0].length-1):this.closingBracketBlock(e,"}",r,a.index+a[0].length):void 0},this.latexBlock=function(e,t,r){var n={"\\begin":1,"\\end":-1},a=new i(e,t,r),l=a.getCurrentToken();if(l&&("storage.type"==l.type||"constant.character.escape"==l.type)){var s=l.value,g=n[s],c=function(){var e=a.stepForward(),t="lparen"==e.type?a.stepForward().value:"";return g===-1&&(a.stepBackward(),t&&a.stepBackward()),t},p=[c()],h=g===-1?a.getCurrentTokenColumn():e.getLine(t).length,d=t;for(a.step=g===-1?a.stepBackward:a.stepForward;l=a.step();)if(l&&("storage.type"==l.type||"constant.character.escape"==l.type)){var u=n[l.value];if(u){var f=c();if(u===g)p.unshift(f);else if(p.shift()!==f||!p.length)break}}if(!p.length){var t=a.getCurrentTokenRow();return g===-1?new o(t,e.getLine(t).length,d,h):(a.stepBackward(),new o(d,h,t,a.getCurrentTokenColumn()))}}},this.latexSection=function(e,t,r){var n=["\\subsection","\\section","\\begin","\\end","\\paragraph"],a=new i(e,t,r),l=a.getCurrentToken();if(l&&"storage.type"==l.type){for(var s=n.indexOf(l.value),g=0,c=t;l=a.stepForward();)if("storage.type"===l.type){var p=n.indexOf(l.value);if(p>=2){if(g||(c=a.getCurrentTokenRow()-1),g+=2==p?1:-1,g<0)break}else if(p>=s)break}for(g||(c=a.getCurrentTokenRow()-1);c>t&&!/\S/.test(e.getLine(c));)c--;return new o(t,e.getLine(t).length,c,e.getLine(c).length)}}}.call(l.prototype)}),define("ace/mode/latex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/latex_highlight_rules","ace/mode/folding/latex","ace/range"],function(e,t,r){"use strict";var n=e("../lib/oop"),a=e("./text").Mode,o=e("./latex_highlight_rules").LatexHighlightRules,i=e("./folding/latex").FoldMode,l=(e("../range").Range,function(){this.HighlightRules=o,this.foldingRules=new i});n.inherits(l,a),function(){this.type="text",this.lineCommentStart="%",this.$id="ace/mode/latex"}.call(l.prototype),t.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-less.js b/www/js/vendor/ace/mode-less.js index 662e05811..7d83921bb 100755 --- a/www/js/vendor/ace/mode-less.js +++ b/www/js/vendor/ace/mode-less.js @@ -1,897 +1 @@ -define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var LessHighlightRules = function() { - - var properties = lang.arrayToMap( (function () { - - var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|"); - - var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" + - "background-size|binding|border-bottom-colors|border-left-colors|" + - "border-right-colors|border-top-colors|border-end|border-end-color|" + - "border-end-style|border-end-width|border-image|border-start|" + - "border-start-color|border-start-style|border-start-width|box-align|" + - "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" + - "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" + - "column-rule-width|column-rule-style|column-rule-color|float-edge|" + - "font-feature-settings|font-language-override|force-broken-image-icon|" + - "image-region|margin-end|margin-start|opacity|outline|outline-color|" + - "outline-offset|outline-radius|outline-radius-bottomleft|" + - "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" + - "outline-style|outline-width|padding-end|padding-start|stack-sizing|" + - "tab-size|text-blink|text-decoration-color|text-decoration-line|" + - "text-decoration-style|transform|transform-origin|transition|" + - "transition-delay|transition-duration|transition-property|" + - "transition-timing-function|user-focus|user-input|user-modify|user-select|" + - "window-shadow|border-radius").split("|"); - - var properties = ("azimuth|background-attachment|background-color|background-image|" + - "background-position|background-repeat|background|border-bottom-color|" + - "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" + - "border-color|border-left-color|border-left-style|border-left-width|" + - "border-left|border-right-color|border-right-style|border-right-width|" + - "border-right|border-spacing|border-style|border-top-color|" + - "border-top-style|border-top-width|border-top|border-width|border|" + - "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" + - "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" + - "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" + - "font-stretch|font-style|font-variant|font-weight|font|height|left|" + - "letter-spacing|line-height|list-style-image|list-style-position|" + - "list-style-type|list-style|margin-bottom|margin-left|margin-right|" + - "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" + - "min-width|opacity|orphans|outline-color|" + - "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" + - "padding-left|padding-right|padding-top|padding|page-break-after|" + - "page-break-before|page-break-inside|page|pause-after|pause-before|" + - "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" + - "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" + - "stress|table-layout|text-align|text-decoration|text-indent|" + - "text-shadow|text-transform|top|unicode-bidi|vertical-align|" + - "visibility|voice-family|volume|white-space|widows|width|word-spacing|" + - "z-index").split("|"); - var ret = []; - for (var i=0, ln=browserPrefix.length; i|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - }, { - caseInsensitive: true - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ] - }; -}; - -oop.inherits(LessHighlightRules, TextHighlightRules); - -exports.LessHighlightRules = LessHighlightRules; - -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/less",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/less_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = LessHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/less"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=e("../lib/lang"),i=e("./text_highlight_rules").TextHighlightRules,a=function(){var e=o.arrayToMap(function(){for(var e="-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-".split("|"),t="appearance|background-clip|background-inline-policy|background-origin|background-size|binding|border-bottom-colors|border-left-colors|border-right-colors|border-top-colors|border-end|border-end-color|border-end-style|border-end-width|border-image|border-start|border-start-color|border-start-style|border-start-width|box-align|box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|box-pack|box-sizing|column-count|column-gap|column-width|column-rule|column-rule-width|column-rule-style|column-rule-color|float-edge|font-feature-settings|font-language-override|force-broken-image-icon|image-region|margin-end|margin-start|opacity|outline|outline-color|outline-offset|outline-radius|outline-radius-bottomleft|outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|outline-style|outline-width|padding-end|padding-start|stack-sizing|tab-size|text-blink|text-decoration-color|text-decoration-line|text-decoration-style|transform|transform-origin|transition|transition-delay|transition-duration|transition-property|transition-timing-function|user-focus|user-input|user-modify|user-select|window-shadow|border-radius".split("|"),r="azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|"),n=[],o=0,i=e.length;o|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}]}};n.inherits(a,i),t.LessHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,r){"use strict";var n=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var r=e.getLine(t),o=r.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new n(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,r){"use strict";var n,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},d=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?n=c[t]:void(n=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},g=function(){this.add("braces","insertion",function(e,t,r,o,i){var a=r.getCursorPosition(),l=o.doc.getLine(a.row);if("{"==i){d(r);var u=r.getSelectionRange(),c=o.doc.getTextRange(u);if(""!==c&&"{"!==c&&r.getWrapBehavioursEnabled())return{text:"{"+c+"}",selection:!1};if(g.isSaneInsertion(r,o))return/[\]\}\)]/.test(l[a.column])||r.inMultiSelectMode?(g.recordAutoInsert(r,o,"}"),{text:"{}",selection:[1,1]}):(g.recordMaybeInsert(r,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){d(r);var p=l.substring(a.column,a.column+1);if("}"==p){var h=o.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==h&&g.isAutoInsertedClosing(a,l,i))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){d(r);var m="";g.isMaybeInsertedClosing(a,l)&&(m=s.stringRepeat("}",n.maybeInsertedBrackets),g.clearMaybeInsertedClosing());var p=l.substring(a.column,a.column+1);if("}"===p){var b=o.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!b)return null;var f=this.$getIndent(o.getLine(b.row))}else{if(!m)return void g.clearMaybeInsertedClosing();var f=this.$getIndent(l)}var k=f+o.getTabString();return{text:"\n"+k+"\n"+f+m,selection:[1,k.length,1,k.length]}}g.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,r,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){d(r);var s=o.doc.getLine(i.start.row),l=s.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;n.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,r,n,o){if("("==o){d(r);var i=r.getSelectionRange(),a=n.doc.getTextRange(i);if(""!==a&&r.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(g.isSaneInsertion(r,n))return g.recordAutoInsert(r,n,")"),{text:"()",selection:[1,1]}}else if(")"==o){d(r);var s=r.getCursorPosition(),l=n.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=n.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&g.isAutoInsertedClosing(s,l,o))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,r,n,o){var i=n.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){d(r);var a=n.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,r,n,o){if("["==o){d(r);var i=r.getSelectionRange(),a=n.doc.getTextRange(i);if(""!==a&&r.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(g.isSaneInsertion(r,n))return g.recordAutoInsert(r,n,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){d(r);var s=r.getCursorPosition(),l=n.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=n.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&g.isAutoInsertedClosing(s,l,o))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,r,n,o){var i=n.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){d(r);var a=n.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,r,n,o){if('"'==o||"'"==o){d(r);var i=o,a=r.getSelectionRange(),s=n.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&r.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var l=r.getCursorPosition(),u=n.doc.getLine(l.row),c=u.substring(l.column-1,l.column),g=u.substring(l.column,l.column+1),p=n.getTokenAt(l.row,l.column),h=n.getTokenAt(l.row,l.column+1);if("\\"==c&&p&&/escape/.test(p.type))return null;var m,b=p&&/string/.test(p.type),f=!h||/string/.test(h.type);if(g==i)m=b!==f;else{if(b&&!f)return null;if(b&&f)return null;var k=n.$mode.tokenRe;k.lastIndex=0;var w=k.test(c);k.lastIndex=0;var v=k.test(c);if(w||v)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;m=!0}return{text:m?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,r,n,o){var i=n.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){d(r);var a=n.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(s==i)return o.end.column++,o}})};g.isSaneInsertion=function(e,t){var r=e.getCursorPosition(),n=new a(t,r.row,r.column);if(!this.$matchTokenType(n.getCurrentToken()||"text",l)){var o=new a(t,r.row,r.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return n.stepForward(),n.getCurrentTokenRow()!==r.row||this.$matchTokenType(n.getCurrentToken()||"text",u)},g.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},g.recordAutoInsert=function(e,t,r){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=o.row,n.autoInsertedLineEnd=r+i.substr(o.column),n.autoInsertedBrackets++},g.recordMaybeInsert=function(e,t,r){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=o.row,n.maybeInsertedLineStart=i.substr(0,o.column)+r,n.maybeInsertedLineEnd=i.substr(o.column),n.maybeInsertedBrackets++},g.isAutoInsertedClosing=function(e,t,r){return n.autoInsertedBrackets>0&&e.row===n.autoInsertedRow&&r===n.autoInsertedLineEnd[0]&&t.substr(e.column)===n.autoInsertedLineEnd},g.isMaybeInsertedClosing=function(e,t){return n.maybeInsertedBrackets>0&&e.row===n.maybeInsertedRow&&t.substr(e.column)===n.maybeInsertedLineEnd&&t.substr(0,e.column)==n.maybeInsertedLineStart},g.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},g.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},o.inherits(g,i),t.CstyleBehaviour=g}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,r){"use strict";var n=e("../../lib/oop"),o=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),i=e("../../token_iterator").TokenIterator,a=function(){this.inherit(o),this.add("colon","insertion",function(e,t,r,n,o){if(":"===o){var a=r.getCursorPosition(),s=new i(n,a.row,a.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var u=n.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if(":"===c)return{text:"",selection:[1,1]};if(!u.substring(a.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,r,n,o){var a=n.doc.getTextRange(o);if(!o.isMultiLine()&&":"===a){var s=r.getCursorPosition(),l=new i(n,s.row,s.column),u=l.getCurrentToken();if(u&&u.value.match(/\s+/)&&(u=l.stepBackward()),u&&"support.type"===u.type){var c=n.doc.getLine(o.start.row),d=c.substring(o.end.column,o.end.column+1);if(";"===d)return o.end.column++,o}}}),this.add("semicolon","insertion",function(e,t,r,n,o){if(";"===o){var i=r.getCursorPosition(),a=n.doc.getLine(i.row),s=a.substring(i.column,i.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};n.inherits(a,o),t.CssBehaviour=a}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,r){"use strict";var n=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};n.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,r){var n=e.getLine(r);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var o=this._getFoldWidgetBase(e,t,r);return!o&&this.startRegionRe.test(n)?"start":o},this.getFoldWidgetRange=function(e,t,r,n){var o=e.getLine(r);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,r);var i=o.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],r,a);var s=e.getCommentFoldRange(r,a+i[0].length,1);return s&&!s.isMultiLine()&&(n?s=this.getSectionRange(e,r):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],r,a):e.getCommentFoldRange(r,a,-1)}}},this.getSectionRange=function(e,t){var r=e.getLine(t),n=r.search(/\S/),i=t,a=r.length;t+=1;for(var s=t,l=e.getLength();++tu)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=i)break;if(c.isMultiLine())t=c.end.row;else if(n==u)break}s=t}}return new o(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,r){for(var n=t.search(/\s*$/),i=e.getLength(),a=r,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++ra)return new o(a,n,c,t.length)}}.call(a.prototype)}),define("ace/mode/less",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/less_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=e("./text").Mode,i=e("./less_highlight_rules").LessHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new s,this.foldingRules=new l};n.inherits(u,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,r){var n=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e).tokens;if(o.length&&"comment"==o[o.length-1].type)return n;var i=t.match(/^.*\{\s*$/);return i&&(n+=r),n},this.checkOutdent=function(e,t,r){return this.$outdent.checkOutdent(t,r)},this.autoOutdent=function(e,t,r){this.$outdent.autoOutdent(t,r)},this.$id="ace/mode/less"}.call(u.prototype),t.Mode=u}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-liquid.js b/www/js/vendor/ace/mode-liquid.js index cf7e50c0d..757092251 100755 --- a/www/js/vendor/ace/mode-liquid.js +++ b/www/js/vendor/ace/mode-liquid.js @@ -1,1022 +1 @@ -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/liquid_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; - -var LiquidHighlightRules = function() { - HtmlHighlightRules.call(this); - var functions = ( - "date|capitalize|downcase|upcase|first|last|join|sort|map|size|escape|" + - "escape_once|strip_html|strip_newlines|newline_to_br|replace|replace_first|" + - "truncate|truncatewords|prepend|append|minus|plus|times|divided_by|split" - ); - - var keywords = ( - "capture|endcapture|case|endcase|when|comment|endcomment|" + - "cycle|for|endfor|in|reversed|if|endif|else|elsif|include|endinclude|unless|endunless|" + - "style|text|image|widget|plugin|marker|endmarker|tablerow|endtablerow" - ); - - var builtinVariables = 'forloop|tablerowloop'; - - var definitions = ("assign"); - - var keywordMapper = this.createKeywordMapper({ - "variable.language": builtinVariables, - "keyword": keywords, - "support.function": functions, - "keyword.definition": definitions - }, "identifier"); - for (var rule in this.$rules) { - this.$rules[rule].unshift({ - token : "variable", - regex : "{%", - push : "liquid-start" - }, { - token : "variable", - regex : "{{", - push : "liquid-start" - }); - } - - this.addRules({ - "liquid-start" : [{ - token: "variable", - regex: "}}", - next: "pop" - }, { - token: "variable", - regex: "%}", - next: "pop" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "\/|\\*|\\-|\\+|=|!=|\\?\\:" - }, { - token : "paren.lparen", - regex : /[\[\({]/ - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token : "text", - regex : "\\s+" - }] - }); - - this.normalizeRules(); -}; -oop.inherits(LiquidHighlightRules, TextHighlightRules); - -exports.LiquidHighlightRules = LiquidHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/liquid",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/liquid_highlight_rules","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module) { - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var LiquidHighlightRules = require("./liquid_highlight_rules").LiquidHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = LiquidHighlightRules; - this.$outdent = new MatchingBraceOutdent(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.blockComment = {start: ""}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/liquid"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),a=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",i=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",u=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",p=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":i,"support.constant":s,"support.type":a,"support.constant.color":l,"support.constant.fonts":u},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:p},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};r.inherits(d,o),t.CssHighlightRules=d}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},a.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(a,o),a.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},a.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},a.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=a}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",a="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+r+")(\\.)(prototype)(\\.)("+r+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:r},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:a},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(i,a),t.JavaScriptHighlightRules=i}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===a&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(o.prototype),r.inherits(a,o),t.XmlHighlightRules=a}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/lang"),a=e("./css_highlight_rules").CssHighlightRules,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=o.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),u=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(a,"css-","style"),this.embedTagRules(i,"js-","script"),this.constructor===u&&this.normalizeRules()};r.inherits(u,s),t.HtmlHighlightRules=u}),define("ace/mode/liquid_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=e("./html_highlight_rules").HtmlHighlightRules,i=function(){a.call(this);var e="date|capitalize|downcase|upcase|first|last|join|sort|map|size|escape|escape_once|strip_html|strip_newlines|newline_to_br|replace|replace_first|truncate|truncatewords|prepend|append|minus|plus|times|divided_by|split",t="capture|endcapture|case|endcase|when|comment|endcomment|cycle|for|endfor|in|reversed|if|endif|else|elsif|include|endinclude|unless|endunless|style|text|image|widget|plugin|marker|endmarker|tablerow|endtablerow",n="forloop|tablerowloop",r="assign",o=this.createKeywordMapper({"variable.language":n,keyword:t,"support.function":e,"keyword.definition":r},"identifier");for(var i in this.$rules)this.$rules[i].unshift({token:"variable",regex:"{%",push:"liquid-start"},{token:"variable",regex:"{{",push:"liquid-start"});this.addRules({"liquid-start":[{token:"variable",regex:"}}",next:"pop"},{token:"variable",regex:"%}",next:"pop"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"/|\\*|\\-|\\+|=|!=|\\?\\:"},{token:"paren.lparen",regex:/[\[\({]/},{token:"paren.rparen",regex:/[\])}]/},{token:"text",regex:"\\s+"}]}),this.normalizeRules()};r.inherits(i,o),t.LiquidHighlightRules=i}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var a=o[1].length,i=e.findMatchingBracket({row:t,column:a});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new r(t,0,t,a-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/liquid",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/liquid_highlight_rules","ace/mode/matching_brace_outdent","ace/range"],function(e,t,n){var r=e("../lib/oop"),o=e("./text").Mode,a=e("./liquid_highlight_rules").LiquidHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,function(){this.HighlightRules=a,this.$outdent=new i});r.inherits(s,o),function(){this.blockComment={start:""},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),a=o.tokens;if(o.state,a.length&&"comment"==a[a.length-1].type)return r;if("start"==e){var i=t.match(/^.*[\{\(\[]\s*$/);i&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/liquid"}.call(s.prototype),t.Mode=s}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-lisp.js b/www/js/vendor/ace/mode-lisp.js index 0cd37cc57..134652e2b 100755 --- a/www/js/vendor/ace/mode-lisp.js +++ b/www/js/vendor/ace/mode-lisp.js @@ -1,104 +1 @@ -define("ace/mode/lisp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var LispHighlightRules = function() { - var keywordControl = "case|do|let|loop|if|else|when"; - var keywordOperator = "eq|neq|and|or"; - var constantLanguage = "null|nil"; - var supportFunctions = "cons|car|cdr|cond|lambda|format|setq|setf|quote|eval|append|list|listp|memberp|t|load|progn"; - - var keywordMapper = this.createKeywordMapper({ - "keyword.control": keywordControl, - "keyword.operator": keywordOperator, - "constant.language": constantLanguage, - "support.function": supportFunctions - }, "identifier", true); - - this.$rules = - { - "start": [ - { - token : "comment", - regex : ";.*$" - }, - { - token: ["storage.type.function-type.lisp", "text", "entity.name.function.lisp"], - regex: "(?:\\b(?:(defun|defmethod|defmacro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)" - }, - { - token: ["punctuation.definition.constant.character.lisp", "constant.character.lisp"], - regex: "(#)((?:\\w|[\\\\+-=<>'\"&#])+)" - }, - { - token: ["punctuation.definition.variable.lisp", "variable.other.global.lisp", "punctuation.definition.variable.lisp"], - regex: "(\\*)(\\S*)(\\*)" - }, - { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" - }, - { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" - }, - { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, - { - token : "string", - regex : '"(?=.)', - next : "qqstring" - } - ], - "qqstring": [ - { - token: "constant.character.escape.lisp", - regex: "\\\\." - }, - { - token : "string", - regex : '[^"\\\\]+' - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "start" - } - ] -} - -}; - -oop.inherits(LispHighlightRules, TextHighlightRules); - -exports.LispHighlightRules = LispHighlightRules; -}); - -define("ace/mode/lisp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lisp_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var LispHighlightRules = require("./lisp_highlight_rules").LispHighlightRules; - -var Mode = function() { - this.HighlightRules = LispHighlightRules; -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = ";"; - - this.$id = "ace/mode/lisp"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/lisp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,i){"use strict";var n=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,r=function(){var e="case|do|let|loop|if|else|when",t="eq|neq|and|or",i="null|nil",n="cons|car|cdr|cond|lambda|format|setq|setf|quote|eval|append|list|listp|memberp|t|load|progn",o=this.createKeywordMapper({"keyword.control":e,"keyword.operator":t,"constant.language":i,"support.function":n},"identifier",!0);this.$rules={start:[{token:"comment",regex:";.*$"},{token:["storage.type.function-type.lisp","text","entity.name.function.lisp"],regex:"(?:\\b(?:(defun|defmethod|defmacro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"},{token:["punctuation.definition.constant.character.lisp","constant.character.lisp"],regex:"(#)((?:\\w|[\\\\+-=<>'\"&#])+)"},{token:["punctuation.definition.variable.lisp","variable.other.global.lisp","punctuation.definition.variable.lisp"],regex:"(\\*)(\\S*)(\\*)"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"string",regex:'"(?=.)',next:"qqstring"}],qqstring:[{token:"constant.character.escape.lisp",regex:"\\\\."},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"}]}};n.inherits(r,o),t.LispHighlightRules=r}),define("ace/mode/lisp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lisp_highlight_rules"],function(e,t,i){"use strict";var n=e("../lib/oop"),o=e("./text").Mode,r=e("./lisp_highlight_rules").LispHighlightRules,l=function(){this.HighlightRules=r};n.inherits(l,o),function(){this.lineCommentStart=";",this.$id="ace/mode/lisp"}.call(l.prototype),t.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-livescript.js b/www/js/vendor/ace/mode-livescript.js index 1b7a158f9..c6209ec40 100755 --- a/www/js/vendor/ace/mode-livescript.js +++ b/www/js/vendor/ace/mode-livescript.js @@ -1,289 +1 @@ -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/livescript",["require","exports","module","ace/tokenizer","ace/mode/matching_brace_outdent","ace/range","ace/mode/text"], function(require, exports, module){ - var identifier, LiveScriptMode, keywordend, stringfill; - identifier = '(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*'; - exports.Mode = LiveScriptMode = (function(superclass){ - var indenter, prototype = extend$((import$(LiveScriptMode, superclass).displayName = 'LiveScriptMode', LiveScriptMode), superclass).prototype, constructor = LiveScriptMode; - function LiveScriptMode(){ - var that; - this.$tokenizer = new (require('../tokenizer')).Tokenizer(LiveScriptMode.Rules); - if (that = require('../mode/matching_brace_outdent')) { - this.$outdent = new that.MatchingBraceOutdent; - } - this.$id = "ace/mode/livescript"; - } - indenter = RegExp('(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*' + identifier + ')?))\\s*$'); - prototype.getNextLineIndent = function(state, line, tab){ - var indent, tokens; - indent = this.$getIndent(line); - tokens = this.$tokenizer.getLineTokens(line, state).tokens; - if (!(tokens.length && tokens[tokens.length - 1].type === 'comment')) { - if (state === 'start' && indenter.test(line)) { - indent += tab; - } - } - return indent; - }; - prototype.toggleCommentLines = function(state, doc, startRow, endRow){ - var comment, range, i$, i, out, line; - comment = /^(\s*)#/; - range = new (require('../range')).Range(0, 0, 0, 0); - for (i$ = startRow; i$ <= endRow; ++i$) { - i = i$; - if (out = comment.test(line = doc.getLine(i))) { - line = line.replace(comment, '$1'); - } else { - line = line.replace(/^\s*/, '$&#'); - } - range.end.row = range.start.row = i; - range.end.column = line.length + 1; - doc.replace(range, line); - } - return 1 - out * 2; - }; - prototype.checkOutdent = function(state, line, input){ - var ref$; - return (ref$ = this.$outdent) != null ? ref$.checkOutdent(line, input) : void 8; - }; - prototype.autoOutdent = function(state, doc, row){ - var ref$; - return (ref$ = this.$outdent) != null ? ref$.autoOutdent(doc, row) : void 8; - }; - return LiveScriptMode; - }(require('../mode/text').Mode)); - keywordend = '(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))'; - stringfill = { - token: 'string', - regex: '.+' - }; - LiveScriptMode.Rules = { - start: [ - { - token: 'keyword', - regex: '(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)' + keywordend - }, { - token: 'constant.language', - regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend - }, { - token: 'invalid.illegal', - regex: '(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)' + keywordend - }, { - token: 'language.support.class', - regex: '(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)' + keywordend - }, { - token: 'language.support.function', - regex: '(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)' + keywordend - }, { - token: 'variable.language', - regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend - }, { - token: 'identifier', - regex: identifier + '\\s*:(?![:=])' - }, { - token: 'variable', - regex: identifier - }, { - token: 'keyword.operator', - regex: '(?:\\.{3}|\\s+\\?)' - }, { - token: 'keyword.variable', - regex: '(?:@+|::|\\.\\.)', - next: 'key' - }, { - token: 'keyword.operator', - regex: '\\.\\s*', - next: 'key' - }, { - token: 'string', - regex: '\\\\\\S[^\\s,;)}\\]]*' - }, { - token: 'string.doc', - regex: '\'\'\'', - next: 'qdoc' - }, { - token: 'string.doc', - regex: '"""', - next: 'qqdoc' - }, { - token: 'string', - regex: '\'', - next: 'qstring' - }, { - token: 'string', - regex: '"', - next: 'qqstring' - }, { - token: 'string', - regex: '`', - next: 'js' - }, { - token: 'string', - regex: '<\\[', - next: 'words' - }, { - token: 'string.regex', - regex: '//', - next: 'heregex' - }, { - token: 'comment.doc', - regex: '/\\*', - next: 'comment' - }, { - token: 'comment', - regex: '#.*' - }, { - token: 'string.regex', - regex: '\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}', - next: 'key' - }, { - token: 'constant.numeric', - regex: '(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)' - }, { - token: 'lparen', - regex: '[({[]' - }, { - token: 'rparen', - regex: '[)}\\]]', - next: 'key' - }, { - token: 'keyword.operator', - regex: '\\S+' - }, { - token: 'text', - regex: '\\s+' - } - ], - heregex: [ - { - token: 'string.regex', - regex: '.*?//[gimy$?]{0,4}', - next: 'start' - }, { - token: 'string.regex', - regex: '\\s*#{' - }, { - token: 'comment.regex', - regex: '\\s+(?:#.*)?' - }, { - token: 'string.regex', - regex: '\\S+' - } - ], - key: [ - { - token: 'keyword.operator', - regex: '[.?@!]+' - }, { - token: 'identifier', - regex: identifier, - next: 'start' - }, { - token: 'text', - regex: '.', - next: 'start' - } - ], - comment: [ - { - token: 'comment.doc', - regex: '.*?\\*/', - next: 'start' - }, { - token: 'comment.doc', - regex: '.+' - } - ], - qdoc: [ - { - token: 'string', - regex: ".*?'''", - next: 'key' - }, stringfill - ], - qqdoc: [ - { - token: 'string', - regex: '.*?"""', - next: 'key' - }, stringfill - ], - qstring: [ - { - token: 'string', - regex: '[^\\\\\']*(?:\\\\.[^\\\\\']*)*\'', - next: 'key' - }, stringfill - ], - qqstring: [ - { - token: 'string', - regex: '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"', - next: 'key' - }, stringfill - ], - js: [ - { - token: 'string', - regex: '[^\\\\`]*(?:\\\\.[^\\\\`]*)*`', - next: 'key' - }, stringfill - ], - words: [ - { - token: 'string', - regex: '.*?\\]>', - next: 'key' - }, stringfill - ] - }; -function extend$(sub, sup){ - function fun(){} fun.prototype = (sub.superclass = sup).prototype; - (sub.prototype = new fun).constructor = sub; - if (typeof sup.extended == 'function') sup.extended(sub); - return sub; -} -function import$(obj, src){ - var own = {}.hasOwnProperty; - for (var key in src) if (own.call(src, key)) obj[key] = src[key]; - return obj; -} -}); +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var g=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),g)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/livescript",["require","exports","module","ace/tokenizer","ace/mode/matching_brace_outdent","ace/range","ace/mode/text"],function(e,t,n){function r(e,t){function n(){}return n.prototype=(e.superclass=t).prototype,(e.prototype=new n).constructor=e,"function"==typeof t.extended&&t.extended(e),e}function o(e,t){var n={}.hasOwnProperty;for(var r in t)n.call(t,r)&&(e[r]=t[r]);return e}var i,a,g,s;i="(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*",t.Mode=a=function(t){function n(){var t;this.$tokenizer=new(e("../tokenizer").Tokenizer)(n.Rules),(t=e("../mode/matching_brace_outdent"))&&(this.$outdent=new t.MatchingBraceOutdent),this.$id="ace/mode/livescript"}var a,g=r((o(n,t).displayName="LiveScriptMode",n),t).prototype;return a=RegExp("(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*"+i+")?))\\s*$"),g.getNextLineIndent=function(e,t,n){var r,o;return r=this.$getIndent(t),o=this.$tokenizer.getLineTokens(t,e).tokens,o.length&&"comment"===o[o.length-1].type||"start"===e&&a.test(t)&&(r+=n),r},g.toggleCommentLines=function(t,n,r,o){var i,a,g,s,c,x;for(i=/^(\s*)#/,a=new(e("../range").Range)(0,0,0,0),g=r;g<=o;++g)s=g,x=(c=i.test(x=n.getLine(s)))?x.replace(i,"$1"):x.replace(/^\s*/,"$&#"),a.end.row=a.start.row=s,a.end.column=x.length+1,n.replace(a,x);return 1-2*c},g.checkOutdent=function(e,t,n){var r;return null!=(r=this.$outdent)?r.checkOutdent(t,n):void 0},g.autoOutdent=function(e,t,n){var r;return null!=(r=this.$outdent)?r.autoOutdent(t,n):void 0},n}(e("../mode/text").Mode),g="(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))",s={token:"string",regex:".+"},a.Rules={start:[{token:"keyword",regex:"(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)"+g},{token:"constant.language",regex:"(?:true|false|yes|no|on|off|null|void|undefined)"+g},{token:"invalid.illegal",regex:"(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)"+g},{token:"language.support.class",regex:"(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)"+g},{token:"language.support.function",regex:"(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)"+g},{token:"variable.language",regex:"(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)"+g},{token:"identifier",regex:i+"\\s*:(?![:=])"},{token:"variable",regex:i},{token:"keyword.operator",regex:"(?:\\.{3}|\\s+\\?)"},{token:"keyword.variable",regex:"(?:@+|::|\\.\\.)",next:"key"},{token:"keyword.operator",regex:"\\.\\s*",next:"key"},{token:"string",regex:"\\\\\\S[^\\s,;)}\\]]*"},{token:"string.doc",regex:"'''",next:"qdoc"},{token:"string.doc",regex:'"""',next:"qqdoc"},{token:"string",regex:"'",next:"qstring"},{token:"string",regex:'"',next:"qqstring"},{token:"string",regex:"`",next:"js"},{token:"string",regex:"<\\[",next:"words"},{token:"string.regex",regex:"//",next:"heregex"},{token:"comment.doc",regex:"/\\*",next:"comment"},{token:"comment",regex:"#.*"},{token:"string.regex",regex:"\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}",next:"key"},{token:"constant.numeric",regex:"(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)"},{token:"lparen",regex:"[({[]"},{token:"rparen",regex:"[)}\\]]",next:"key"},{token:"keyword.operator",regex:"\\S+"},{token:"text",regex:"\\s+"}],heregex:[{token:"string.regex",regex:".*?//[gimy$?]{0,4}",next:"start"},{token:"string.regex",regex:"\\s*#{"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",regex:"\\S+"}],key:[{token:"keyword.operator",regex:"[.?@!]+"},{token:"identifier",regex:i,next:"start"},{token:"text",regex:".",next:"start"}],comment:[{token:"comment.doc",regex:".*?\\*/",next:"start"},{token:"comment.doc",regex:".+"}],qdoc:[{token:"string",regex:".*?'''",next:"key"},s],qqdoc:[{token:"string",regex:'.*?"""',next:"key"},s],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",next:"key"},s],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',next:"key"},s],js:[{token:"string",regex:"[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",next:"key"},s],words:[{token:"string",regex:".*?\\]>",next:"key"},s]}}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-logiql.js b/www/js/vendor/ace/mode-logiql.js index 96fe7922e..6bf7861e0 100755 --- a/www/js/vendor/ace/mode-logiql.js +++ b/www/js/vendor/ace/mode-logiql.js @@ -1,666 +1 @@ -define("ace/mode/logiql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var LogiQLHighlightRules = function() { - - this.$rules = { start: - [ { token: 'comment.block', - regex: '/\\*', - push: - [ { token: 'comment.block', regex: '\\*/', next: 'pop' }, - { defaultToken: 'comment.block' } ], - }, - { token: 'comment.single', - regex: '//.*', - }, - { token: 'constant.numeric', - regex: '\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?[fd]?', - }, - { token: 'string', - regex: '"', - push: - [ { token: 'string', regex: '"', next: 'pop' }, - { defaultToken: 'string' } ], - }, - { token: 'constant.language', - regex: '\\b(true|false)\\b', - }, - { token: 'entity.name.type.logicblox', - regex: '`[a-zA-Z_:]+(\\d|\\a)*\\b', - }, - { token: 'keyword.start', regex: '->', comment: 'Constraint' }, - { token: 'keyword.start', regex: '-->', comment: 'Level 1 Constraint'}, - { token: 'keyword.start', regex: '<-', comment: 'Rule' }, - { token: 'keyword.start', regex: '<--', comment: 'Level 1 Rule' }, - { token: 'keyword.end', regex: '\\.', comment: 'Terminator' }, - { token: 'keyword.other', regex: '!', comment: 'Negation' }, - { token: 'keyword.other', regex: ',', comment: 'Conjunction' }, - { token: 'keyword.other', regex: ';', comment: 'Disjunction' }, - { token: 'keyword.operator', regex: '<=|>=|!=|<|>', comment: 'Equality'}, - { token: 'keyword.other', regex: '@', comment: 'Equality' }, - { token: 'keyword.operator', regex: '\\+|-|\\*|/', comment: 'Arithmetic operations'}, - { token: 'keyword', regex: '::', comment: 'Colon colon' }, - { token: 'support.function', - regex: '\\b(agg\\s*<<)', - push: - [ { include: '$self' }, - { token: 'support.function', - regex: '>>', - next: 'pop' } ], - }, - { token: 'storage.modifier', - regex: '\\b(lang:[\\w:]*)', - }, - { token: [ 'storage.type', 'text' ], - regex: '(export|sealed|clauses|block|alias|alias_all)(\\s*\\()(?=`)', - }, - { token: 'entity.name', - regex: '[a-zA-Z_][a-zA-Z_0-9:]*(@prev|@init|@final)?(?=(\\(|\\[))', - }, - { token: 'variable.parameter', - regex: '([a-zA-Z][a-zA-Z_0-9]*|_)\\s*(?=(,|\\.|<-|->|\\)|\\]|=))', - } ] } - - this.normalizeRules(); -}; - -oop.inherits(LogiQLHighlightRules, TextHighlightRules); - -exports.LogiQLHighlightRules = LogiQLHighlightRules; -}); - -define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/logiql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/logiql_highlight_rules","ace/mode/folding/coffee","ace/token_iterator","ace/range","ace/mode/behaviour/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var LogiQLHighlightRules = require("./logiql_highlight_rules").LogiQLHighlightRules; -var FoldMode = require("./folding/coffee").FoldMode; -var TokenIterator = require("../token_iterator").TokenIterator; -var Range = require("../range").Range; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; - -var Mode = function() { - this.HighlightRules = LogiQLHighlightRules; - this.foldingRules = new FoldMode(); - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - if (/comment|string/.test(endState)) - return indent; - if (tokens.length && tokens[tokens.length - 1].type == "comment.single") - return indent; - - var match = line.match(); - if (/(-->|<--|<-|->|{)\s*$/.test(line)) - indent += tab; - return indent; - }; - - this.checkOutdent = function(state, line, input) { - if (this.$outdent.checkOutdent(line, input)) - return true; - - if (input !== "\n" && input !== "\r\n") - return false; - - if (!/^\s+/.test(line)) - return false; - - return true; - }; - - this.autoOutdent = function(state, doc, row) { - if (this.$outdent.autoOutdent(doc, row)) - return; - var prevLine = doc.getLine(row); - var match = prevLine.match(/^\s+/); - var column = prevLine.lastIndexOf(".") + 1; - if (!match || !row || !column) return 0; - - var line = doc.getLine(row + 1); - var startRange = this.getMatching(doc, {row: row, column: column}); - if (!startRange || startRange.start.row == row) return 0; - - column = match[0].length; - var indent = this.$getIndent(doc.getLine(startRange.start.row)); - doc.replace(new Range(row + 1, 0, row + 1, column), indent); - }; - - this.getMatching = function(session, row, column) { - if (row == undefined) - row = session.selection.lead - if (typeof row == "object") { - column = row.column; - row = row.row; - } - - var startToken = session.getTokenAt(row, column); - var KW_START = "keyword.start", KW_END = "keyword.end"; - var tok; - if (!startToken) - return; - if (startToken.type == KW_START) { - var it = new TokenIterator(session, row, column); - it.step = it.stepForward; - } else if (startToken.type == KW_END) { - var it = new TokenIterator(session, row, column); - it.step = it.stepBackward; - } else - return; - - while (tok = it.step()) { - if (tok.type == KW_START || tok.type == KW_END) - break; - } - if (!tok || tok.type == startToken.type) - return; - - var col = it.getCurrentTokenColumn(); - var row = it.getCurrentTokenRow(); - return new Range(row, col, row, col + tok.value.length); - }; - this.$id = "ace/mode/logiql"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/logiql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.block",regex:"/\\*",push:[{token:"comment.block",regex:"\\*/",next:"pop"},{defaultToken:"comment.block"}]},{token:"comment.single",regex:"//.*"},{token:"constant.numeric",regex:"\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?[fd]?"},{token:"string",regex:'"',push:[{token:"string",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"constant.language",regex:"\\b(true|false)\\b"},{token:"entity.name.type.logicblox",regex:"`[a-zA-Z_:]+(\\d|\\a)*\\b"},{token:"keyword.start",regex:"->",comment:"Constraint"},{token:"keyword.start",regex:"-->",comment:"Level 1 Constraint"},{token:"keyword.start",regex:"<-",comment:"Rule"},{token:"keyword.start",regex:"<--",comment:"Level 1 Rule"},{token:"keyword.end",regex:"\\.",comment:"Terminator"},{token:"keyword.other",regex:"!",comment:"Negation"},{token:"keyword.other",regex:",",comment:"Conjunction"},{token:"keyword.other",regex:";",comment:"Disjunction"},{token:"keyword.operator",regex:"<=|>=|!=|<|>",comment:"Equality"},{token:"keyword.other",regex:"@",comment:"Equality"},{token:"keyword.operator",regex:"\\+|-|\\*|/",comment:"Arithmetic operations"},{token:"keyword",regex:"::",comment:"Colon colon"},{token:"support.function",regex:"\\b(agg\\s*<<)",push:[{include:"$self"},{token:"support.function",regex:">>",next:"pop"}]},{token:"storage.modifier",regex:"\\b(lang:[\\w:]*)"},{token:["storage.type","text"],regex:"(export|sealed|clauses|block|alias|alias_all)(\\s*\\()(?=`)"},{token:"entity.name",regex:"[a-zA-Z_][a-zA-Z_0-9:]*(@prev|@init|@final)?(?=(\\(|\\[))"},{token:"variable.parameter",regex:"([a-zA-Z][a-zA-Z_0-9]*|_)\\s*(?=(,|\\.|<-|->|\\)|\\]|=))"}]},this.normalizeRules()};r.inherits(i,o),t.LogiQLHighlightRules=i}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("./fold_mode").FoldMode,i=e("../../range").Range,s=t.FoldMode=function(){};r.inherits(s,o),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var o=/\S/,s=e.getLine(n),a=s.search(o);if(a!=-1&&"#"==s[a]){for(var u=s.length,c=e.getLength(),l=n,d=n;++nl){var m=e.getLine(d).length;return new i(l,u,d,m)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),o=r.search(/\S/),i=e.getLine(n+1),s=e.getLine(n-1),a=s.search(/\S/),u=i.search(/\S/);if(o==-1)return e.foldWidgets[n-1]=a!=-1&&a-1},g.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},g.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},g.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},g.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},g.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},g.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(g,i),t.CstyleBehaviour=g}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,s=e.findMatchingBracket({row:t,column:i});if(!s||s.row==t)return 0;var a=this.$getIndent(e.getLine(s.row));e.replace(new r(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/logiql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/logiql_highlight_rules","ace/mode/folding/coffee","ace/token_iterator","ace/range","ace/mode/behaviour/cstyle","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./logiql_highlight_rules").LogiQLHighlightRules,s=e("./folding/coffee").FoldMode,a=e("../token_iterator").TokenIterator,u=e("../range").Range,c=e("./behaviour/cstyle").CstyleBehaviour,l=e("./matching_brace_outdent").MatchingBraceOutdent,d=function(){this.HighlightRules=i,this.foldingRules=new s,this.$outdent=new l,this.$behaviour=new c};r.inherits(d,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens,s=o.state;return/comment|string/.test(s)?r:i.length&&"comment.single"==i[i.length-1].type?r:(t.match(),/(-->|<--|<-|->|{)\s*$/.test(t)&&(r+=n),r)},this.checkOutdent=function(e,t,n){return!!this.$outdent.checkOutdent(t,n)||("\n"===n||"\r\n"===n)&&!!/^\s+/.test(t)},this.autoOutdent=function(e,t,n){if(!this.$outdent.autoOutdent(t,n)){var r=t.getLine(n),o=r.match(/^\s+/),i=r.lastIndexOf(".")+1;if(!o||!n||!i)return 0;var s=(t.getLine(n+1),this.getMatching(t,{row:n,column:i}));if(!s||s.start.row==n)return 0;i=o[0].length;var a=this.$getIndent(t.getLine(s.start.row));t.replace(new u(n+1,0,n+1,i),a)}},this.getMatching=function(e,t,n){void 0==t&&(t=e.selection.lead),"object"==typeof t&&(n=t.column,t=t.row);var r,o=e.getTokenAt(t,n),i="keyword.start",s="keyword.end";if(o){if(o.type==i){var c=new a(e,t,n);c.step=c.stepForward}else{if(o.type!=s)return;var c=new a(e,t,n);c.step=c.stepBackward}for(;(r=c.step())&&r.type!=i&&r.type!=s;);if(r&&r.type!=o.type){var l=c.getCurrentTokenColumn(),t=c.getCurrentTokenRow();return new u(t,l,t,l+r.value.length)}}},this.$id="ace/mode/logiql"}.call(d.prototype),t.Mode=d}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-lsl.js b/www/js/vendor/ace/mode-lsl.js index 4c5815549..501b40f92 100755 --- a/www/js/vendor/ace/mode-lsl.js +++ b/www/js/vendor/ace/mode-lsl.js @@ -1,693 +1,2 @@ -define("ace/mode/lsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -oop.inherits(LSLHighlightRules, TextHighlightRules); - -function LSLHighlightRules() { - var keywordMapper = this.createKeywordMapper({ - "constant.language.float.lsl" : "DEG_TO_RAD|PI|PI_BY_TWO|RAD_TO_DEG|SQRT2|TWO_PI", - "constant.language.integer.lsl": "ACTIVE|AGENT|AGENT_ALWAYS_RUN|AGENT_ATTACHMENTS|AGENT_AUTOPILOT|AGENT_AWAY|AGENT_BUSY|AGENT_BY_LEGACY_NAME|AGENT_BY_USERNAME|AGENT_CROUCHING|AGENT_FLYING|AGENT_IN_AIR|AGENT_LIST_PARCEL|AGENT_LIST_PARCEL_OWNER|AGENT_LIST_REGION|AGENT_MOUSELOOK|AGENT_ON_OBJECT|AGENT_SCRIPTED|AGENT_SITTING|AGENT_TYPING|AGENT_WALKING|ALL_SIDES|ANIM_ON|ATTACH_AVATAR_CENTER|ATTACH_BACK|ATTACH_BELLY|ATTACH_CHEST|ATTACH_CHIN|ATTACH_HEAD|ATTACH_HUD_BOTTOM|ATTACH_HUD_BOTTOM_LEFT|ATTACH_HUD_BOTTOM_RIGHT|ATTACH_HUD_CENTER_1|ATTACH_HUD_CENTER_2|ATTACH_HUD_TOP_CENTER|ATTACH_HUD_TOP_LEFT|ATTACH_HUD_TOP_RIGHT|ATTACH_LEAR|ATTACH_LEFT_PEC|ATTACH_LEYE|ATTACH_LFOOT|ATTACH_LHAND|ATTACH_LHIP|ATTACH_LLARM|ATTACH_LLLEG|ATTACH_LSHOULDER|ATTACH_LUARM|ATTACH_LULEG|ATTACH_MOUTH|ATTACH_NECK|ATTACH_NOSE|ATTACH_PELVIS|ATTACH_REAR|ATTACH_REYE|ATTACH_RFOOT|ATTACH_RHAND|ATTACH_RHIP|ATTACH_RIGHT_PEC|ATTACH_RLARM|ATTACH_RLLEG|ATTACH_RSHOULDER|ATTACH_RUARM|ATTACH_RULEG|AVOID_CHARACTERS|AVOID_DYNAMIC_OBSTACLES|AVOID_NONE|CAMERA_ACTIVE|CAMERA_BEHINDNESS_ANGLE|CAMERA_BEHINDNESS_LAG|CAMERA_DISTANCE|CAMERA_FOCUS|CAMERA_FOCUS_LAG|CAMERA_FOCUS_LOCKED|CAMERA_FOCUS_OFFSET|CAMERA_FOCUS_THRESHOLD|CAMERA_PITCH|CAMERA_POSITION|CAMERA_POSITION_LAG|CAMERA_POSITION_LOCKED|CAMERA_POSITION_THRESHOLD|CHANGED_ALLOWED_DROP|CHANGED_COLOR|CHANGED_INVENTORY|CHANGED_LINK|CHANGED_MEDIA|CHANGED_OWNER|CHANGED_REGION|CHANGED_REGION_START|CHANGED_SCALE|CHANGED_SHAPE|CHANGED_TELEPORT|CHANGED_TEXTURE|CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES|CHARACTER_AVOIDANCE_MODE|CHARACTER_CMD_JUMP|CHARACTER_CMD_SMOOTH_STOP|CHARACTER_CMD_STOP|CHARACTER_DESIRED_SPEED|CHARACTER_DESIRED_TURN_SPEED|CHARACTER_LENGTH|CHARACTER_MAX_ACCEL|CHARACTER_MAX_DECEL|CHARACTER_MAX_SPEED|CHARACTER_MAX_TURN_RADIUS|CHARACTER_ORIENTATION|CHARACTER_RADIUS|CHARACTER_STAY_WITHIN_PARCEL|CHARACTER_TYPE|CHARACTER_TYPE_A|CHARACTER_TYPE_B|CHARACTER_TYPE_C|CHARACTER_TYPE_D|CHARACTER_TYPE_NONE|CLICK_ACTION_BUY|CLICK_ACTION_NONE|CLICK_ACTION_OPEN|CLICK_ACTION_OPEN_MEDIA|CLICK_ACTION_PAY|CLICK_ACTION_PLAY|CLICK_ACTION_SIT|CLICK_ACTION_TOUCH|CONTENT_TYPE_ATOM|CONTENT_TYPE_FORM|CONTENT_TYPE_HTML|CONTENT_TYPE_JSON|CONTENT_TYPE_LLSD|CONTENT_TYPE_RSS|CONTENT_TYPE_TEXT|CONTENT_TYPE_XHTML|CONTENT_TYPE_XML|CONTROL_BACK|CONTROL_DOWN|CONTROL_FWD|CONTROL_LBUTTON|CONTROL_LEFT|CONTROL_ML_LBUTTON|CONTROL_RIGHT|CONTROL_ROT_LEFT|CONTROL_ROT_RIGHT|CONTROL_UP|DATA_BORN|DATA_NAME|DATA_ONLINE|DATA_PAYINFO|DATA_SIM_POS|DATA_SIM_RATING|DATA_SIM_STATUS|DEBUG_CHANNEL|DENSITY|ERR_GENERIC|ERR_MALFORMED_PARAMS|ERR_PARCEL_PERMISSIONS|ERR_RUNTIME_PERMISSIONS|ERR_THROTTLED|ESTATE_ACCESS_ALLOWED_AGENT_ADD|ESTATE_ACCESS_ALLOWED_AGENT_REMOVE|ESTATE_ACCESS_ALLOWED_GROUP_ADD|ESTATE_ACCESS_ALLOWED_GROUP_REMOVE|ESTATE_ACCESS_BANNED_AGENT_ADD|ESTATE_ACCESS_BANNED_AGENT_REMOVE|FALSE|FORCE_DIRECT_PATH|FRICTION|GCNP_RADIUS|GCNP_STATIC|GRAVITY_MULTIPLIER|HORIZONTAL|HTTP_BODY_MAXLENGTH|HTTP_BODY_TRUNCATED|HTTP_CUSTOM_HEADER|HTTP_METHOD|HTTP_MIMETYPE|HTTP_PRAGMA_NO_CACHE|HTTP_VERBOSE_THROTTLE|HTTP_VERIFY_CERT|INVENTORY_ALL|INVENTORY_ANIMATION|INVENTORY_BODYPART|INVENTORY_CLOTHING|INVENTORY_GESTURE|INVENTORY_LANDMARK|INVENTORY_NONE|INVENTORY_NOTECARD|INVENTORY_OBJECT|INVENTORY_SCRIPT|INVENTORY_SOUND|INVENTORY_TEXTURE|JSON_APPEND|KFM_CMD_PAUSE|KFM_CMD_PLAY|KFM_CMD_SET_MODE|KFM_CMD_STOP|KFM_COMMAND|KFM_DATA|KFM_FORWARD|KFM_LOOP|KFM_MODE|KFM_PING_PONG|KFM_REVERSE|KFM_ROTATION|KFM_TRANSLATION|LAND_LEVEL|LAND_LOWER|LAND_NOISE|LAND_RAISE|LAND_REVERT|LAND_SMOOTH|LINK_ALL_CHILDREN|LINK_ALL_OTHERS|LINK_ROOT|LINK_SET|LINK_THIS|LIST_STAT_GEOMETRIC_MEAN|LIST_STAT_MAX|LIST_STAT_MEAN|LIST_STAT_MEDIAN|LIST_STAT_MIN|LIST_STAT_NUM_COUNT|LIST_STAT_RANGE|LIST_STAT_STD_DEV|LIST_STAT_SUM|LIST_STAT_SUM_SQUARES|LOOP|MASK_BASE|MASK_EVERYONE|MASK_GROUP|MASK_NEXT|MASK_OWNER|OBJECT_ATTACHED_POINT|OBJECT_CHARACTER_TIME|OBJECT_CREATOR|OBJECT_DESC|OBJECT_GROUP|OBJECT_NAME|OBJECT_OWNER|OBJECT_PATHFINDING_TYPE|OBJECT_PHANTOM|OBJECT_PHYSICS|OBJECT_PHYSICS_COST|OBJECT_POS|OBJECT_PRIM_EQUIVALENCE|OBJECT_RENDER_WEIGHT|OBJECT_RETURN_PARCEL|OBJECT_RETURN_PARCEL_OWNER|OBJECT_RETURN_REGION|OBJECT_ROOT|OBJECT_ROT|OBJECT_RUNNING_SCRIPT_COUNT|OBJECT_SCRIPT_MEMORY|OBJECT_SCRIPT_TIME|OBJECT_SERVER_COST|OBJECT_STREAMING_COST|OBJECT_TEMP_ON_REZ|OBJECT_TOTAL_SCRIPT_COUNT|OBJECT_UNKNOWN_DETAIL|OBJECT_VELOCITY|OPT_AVATAR|OPT_CHARACTER|OPT_EXCLUSION_VOLUME|OPT_LEGACY_LINKSET|OPT_MATERIAL_VOLUME|OPT_OTHER|OPT_STATIC_OBSTACLE|OPT_WALKABLE|PARCEL_COUNT_GROUP|PARCEL_COUNT_OTHER|PARCEL_COUNT_OWNER|PARCEL_COUNT_SELECTED|PARCEL_COUNT_TEMP|PARCEL_COUNT_TOTAL|PARCEL_DETAILS_AREA|PARCEL_DETAILS_DESC|PARCEL_DETAILS_GROUP|PARCEL_DETAILS_ID|PARCEL_DETAILS_NAME|PARCEL_DETAILS_OWNER|PARCEL_DETAILS_SEE_AVATARS|PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS|PARCEL_FLAG_ALLOW_CREATE_OBJECTS|PARCEL_FLAG_ALLOW_DAMAGE|PARCEL_FLAG_ALLOW_FLY|PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_GROUP_SCRIPTS|PARCEL_FLAG_ALLOW_LANDMARK|PARCEL_FLAG_ALLOW_SCRIPTS|PARCEL_FLAG_ALLOW_TERRAFORM|PARCEL_FLAG_LOCAL_SOUND_ONLY|PARCEL_FLAG_RESTRICT_PUSHOBJECT|PARCEL_FLAG_USE_ACCESS_GROUP|PARCEL_FLAG_USE_ACCESS_LIST|PARCEL_FLAG_USE_BAN_LIST|PARCEL_FLAG_USE_LAND_PASS_LIST|PARCEL_MEDIA_COMMAND_AGENT|PARCEL_MEDIA_COMMAND_AUTO_ALIGN|PARCEL_MEDIA_COMMAND_DESC|PARCEL_MEDIA_COMMAND_LOOP|PARCEL_MEDIA_COMMAND_LOOP_SET|PARCEL_MEDIA_COMMAND_PAUSE|PARCEL_MEDIA_COMMAND_PLAY|PARCEL_MEDIA_COMMAND_SIZE|PARCEL_MEDIA_COMMAND_STOP|PARCEL_MEDIA_COMMAND_TEXTURE|PARCEL_MEDIA_COMMAND_TIME|PARCEL_MEDIA_COMMAND_TYPE|PARCEL_MEDIA_COMMAND_UNLOAD|PARCEL_MEDIA_COMMAND_URL|PASSIVE|PATROL_PAUSE_AT_WAYPOINTS|PAYMENT_INFO_ON_FILE|PAYMENT_INFO_USED|PAY_DEFAULT|PAY_HIDE|PERMISSION_ATTACH|PERMISSION_CHANGE_LINKS|PERMISSION_CONTROL_CAMERA|PERMISSION_DEBIT|PERMISSION_OVERRIDE_ANIMATIONS|PERMISSION_RETURN_OBJECTS|PERMISSION_SILENT_ESTATE_MANAGEMENT|PERMISSION_TAKE_CONTROLS|PERMISSION_TELEPORT|PERMISSION_TRACK_CAMERA|PERMISSION_TRIGGER_ANIMATION|PERM_ALL|PERM_COPY|PERM_MODIFY|PERM_MOVE|PERM_TRANSFER|PING_PONG|PRIM_ALPHA_MODE|PRIM_ALPHA_MODE_BLEND|PRIM_ALPHA_MODE_EMISSIVE|PRIM_ALPHA_MODE_MASK|PRIM_ALPHA_MODE_NONE|PRIM_BUMP_BARK|PRIM_BUMP_BLOBS|PRIM_BUMP_BRICKS|PRIM_BUMP_BRIGHT|PRIM_BUMP_CHECKER|PRIM_BUMP_CONCRETE|PRIM_BUMP_DARK|PRIM_BUMP_DISKS|PRIM_BUMP_GRAVEL|PRIM_BUMP_LARGETILE|PRIM_BUMP_NONE|PRIM_BUMP_SHINY|PRIM_BUMP_SIDING|PRIM_BUMP_STONE|PRIM_BUMP_STUCCO|PRIM_BUMP_SUCTION|PRIM_BUMP_TILE|PRIM_BUMP_WEAVE|PRIM_BUMP_WOOD|PRIM_COLOR|PRIM_DESC|PRIM_FLEXIBLE|PRIM_FULLBRIGHT|PRIM_GLOW|PRIM_HOLE_CIRCLE|PRIM_HOLE_DEFAULT|PRIM_HOLE_SQUARE|PRIM_HOLE_TRIANGLE|PRIM_LINK_TARGET|PRIM_MATERIAL|PRIM_MATERIAL_FLESH|PRIM_MATERIAL_GLASS|PRIM_MATERIAL_METAL|PRIM_MATERIAL_PLASTIC|PRIM_MATERIAL_RUBBER|PRIM_MATERIAL_STONE|PRIM_MATERIAL_WOOD|PRIM_MEDIA_ALT_IMAGE_ENABLE|PRIM_MEDIA_AUTO_LOOP|PRIM_MEDIA_AUTO_PLAY|PRIM_MEDIA_AUTO_SCALE|PRIM_MEDIA_AUTO_ZOOM|PRIM_MEDIA_CONTROLS|PRIM_MEDIA_CONTROLS_MINI|PRIM_MEDIA_CONTROLS_STANDARD|PRIM_MEDIA_CURRENT_URL|PRIM_MEDIA_FIRST_CLICK_INTERACT|PRIM_MEDIA_HEIGHT_PIXELS|PRIM_MEDIA_HOME_URL|PRIM_MEDIA_MAX_HEIGHT_PIXELS|PRIM_MEDIA_MAX_URL_LENGTH|PRIM_MEDIA_MAX_WHITELIST_COUNT|PRIM_MEDIA_MAX_WHITELIST_SIZE|PRIM_MEDIA_MAX_WIDTH_PIXELS|PRIM_MEDIA_PARAM_MAX|PRIM_MEDIA_PERMS_CONTROL|PRIM_MEDIA_PERMS_INTERACT|PRIM_MEDIA_PERM_ANYONE|PRIM_MEDIA_PERM_GROUP|PRIM_MEDIA_PERM_NONE|PRIM_MEDIA_PERM_OWNER|PRIM_MEDIA_WHITELIST|PRIM_MEDIA_WHITELIST_ENABLE|PRIM_MEDIA_WIDTH_PIXELS|PRIM_NAME|PRIM_NORMAL|PRIM_OMEGA|PRIM_PHANTOM|PRIM_PHYSICS|PRIM_PHYSICS_SHAPE_CONVEX|PRIM_PHYSICS_SHAPE_NONE|PRIM_PHYSICS_SHAPE_PRIM|PRIM_PHYSICS_SHAPE_TYPE|PRIM_POINT_LIGHT|PRIM_POSITION|PRIM_POS_LOCAL|PRIM_ROTATION|PRIM_ROT_LOCAL|PRIM_SCULPT_FLAG_INVERT|PRIM_SCULPT_FLAG_MIRROR|PRIM_SCULPT_TYPE_CYLINDER|PRIM_SCULPT_TYPE_MASK|PRIM_SCULPT_TYPE_PLANE|PRIM_SCULPT_TYPE_SPHERE|PRIM_SCULPT_TYPE_TORUS|PRIM_SHINY_HIGH|PRIM_SHINY_LOW|PRIM_SHINY_MEDIUM|PRIM_SHINY_NONE|PRIM_SIZE|PRIM_SLICE|PRIM_SPECULAR|PRIM_TEMP_ON_REZ|PRIM_TEXGEN|PRIM_TEXGEN_DEFAULT|PRIM_TEXGEN_PLANAR|PRIM_TEXT|PRIM_TEXTURE|PRIM_TYPE|PRIM_TYPE_BOX|PRIM_TYPE_CYLINDER|PRIM_TYPE_PRISM|PRIM_TYPE_RING|PRIM_TYPE_SCULPT|PRIM_TYPE_SPHERE|PRIM_TYPE_TORUS|PRIM_TYPE_TUBE|PROFILE_NONE|PROFILE_SCRIPT_MEMORY|PSYS_PART_BF_DEST_COLOR|PSYS_PART_BF_ONE|PSYS_PART_BF_ONE_MINUS_DEST_COLOR|PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA|PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR|PSYS_PART_BF_SOURCE_ALPHA|PSYS_PART_BF_SOURCE_COLOR|PSYS_PART_BF_ZERO|PSYS_PART_BLEND_FUNC_DEST|PSYS_PART_BLEND_FUNC_SOURCE|PSYS_PART_BOUNCE_MASK|PSYS_PART_EMISSIVE_MASK|PSYS_PART_END_ALPHA|PSYS_PART_END_COLOR|PSYS_PART_END_GLOW|PSYS_PART_END_SCALE|PSYS_PART_FLAGS|PSYS_PART_FOLLOW_SRC_MASK|PSYS_PART_FOLLOW_VELOCITY_MASK|PSYS_PART_INTERP_COLOR_MASK|PSYS_PART_INTERP_SCALE_MASK|PSYS_PART_MAX_AGE|PSYS_PART_RIBBON_MASK|PSYS_PART_START_ALPHA|PSYS_PART_START_COLOR|PSYS_PART_START_GLOW|PSYS_PART_START_SCALE|PSYS_PART_TARGET_LINEAR_MASK|PSYS_PART_TARGET_POS_MASK|PSYS_PART_WIND_MASK|PSYS_SRC_ACCEL|PSYS_SRC_ANGLE_BEGIN|PSYS_SRC_ANGLE_END|PSYS_SRC_BURST_PART_COUNT|PSYS_SRC_BURST_RADIUS|PSYS_SRC_BURST_RATE|PSYS_SRC_BURST_SPEED_MAX|PSYS_SRC_BURST_SPEED_MIN|PSYS_SRC_MAX_AGE|PSYS_SRC_OMEGA|PSYS_SRC_PATTERN|PSYS_SRC_PATTERN_ANGLE|PSYS_SRC_PATTERN_ANGLE_CONE|PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY|PSYS_SRC_PATTERN_DROP|PSYS_SRC_PATTERN_EXPLODE|PSYS_SRC_TARGET_KEY|PSYS_SRC_TEXTURE|PUBLIC_CHANNEL|PURSUIT_FUZZ_FACTOR|PURSUIT_GOAL_TOLERANCE|PURSUIT_INTERCEPT|PURSUIT_OFFSET|PU_EVADE_HIDDEN|PU_EVADE_SPOTTED|PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED|PU_FAILURE_INVALID_GOAL|PU_FAILURE_INVALID_START|PU_FAILURE_NO_NAVMESH|PU_FAILURE_NO_VALID_DESTINATION|PU_FAILURE_OTHER|PU_FAILURE_PARCEL_UNREACHABLE|PU_FAILURE_TARGET_GONE|PU_FAILURE_UNREACHABLE|PU_GOAL_REACHED|PU_SLOWDOWN_DISTANCE_REACHED|RCERR_CAST_TIME_EXCEEDED|RCERR_SIM_PERF_LOW|RCERR_UNKNOWN|RC_DATA_FLAGS|RC_DETECT_PHANTOM|RC_GET_LINK_NUM|RC_GET_NORMAL|RC_GET_ROOT_KEY|RC_MAX_HITS|RC_REJECT_AGENTS|RC_REJECT_LAND|RC_REJECT_NONPHYSICAL|RC_REJECT_PHYSICAL|RC_REJECT_TYPES|REGION_FLAG_ALLOW_DAMAGE|REGION_FLAG_ALLOW_DIRECT_TELEPORT|REGION_FLAG_BLOCK_FLY|REGION_FLAG_BLOCK_TERRAFORM|REGION_FLAG_DISABLE_COLLISIONS|REGION_FLAG_DISABLE_PHYSICS|REGION_FLAG_FIXED_SUN|REGION_FLAG_RESTRICT_PUSHOBJECT|REGION_FLAG_SANDBOX|REMOTE_DATA_CHANNEL|REMOTE_DATA_REPLY|REMOTE_DATA_REQUEST|REQUIRE_LINE_OF_SIGHT|RESTITUTION|REVERSE|ROTATE|SCALE|SCRIPTED|SIM_STAT_PCT_CHARS_STEPPED|SMOOTH|STATUS_BLOCK_GRAB|STATUS_BLOCK_GRAB_OBJECT|STATUS_BOUNDS_ERROR|STATUS_CAST_SHADOWS|STATUS_DIE_AT_EDGE|STATUS_INTERNAL_ERROR|STATUS_MALFORMED_PARAMS|STATUS_NOT_FOUND|STATUS_NOT_SUPPORTED|STATUS_OK|STATUS_PHANTOM|STATUS_PHYSICS|STATUS_RETURN_AT_EDGE|STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z|STATUS_SANDBOX|STATUS_TYPE_MISMATCH|STATUS_WHITELIST_FAILED|STRING_TRIM|STRING_TRIM_HEAD|STRING_TRIM_TAIL|TOUCH_INVALID_FACE|TRAVERSAL_TYPE|TRAVERSAL_TYPE_FAST|TRAVERSAL_TYPE_NONE|TRAVERSAL_TYPE_SLOW|TRUE|TYPE_FLOAT|TYPE_INTEGER|TYPE_INVALID|TYPE_KEY|TYPE_ROTATION|TYPE_STRING|TYPE_VECTOR|VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY|VEHICLE_ANGULAR_DEFLECTION_TIMESCALE|VEHICLE_ANGULAR_FRICTION_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DIRECTION|VEHICLE_ANGULAR_MOTOR_TIMESCALE|VEHICLE_BANKING_EFFICIENCY|VEHICLE_BANKING_MIX|VEHICLE_BANKING_TIMESCALE|VEHICLE_BUOYANCY|VEHICLE_FLAG_CAMERA_DECOUPLED|VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT|VEHICLE_FLAG_HOVER_TERRAIN_ONLY|VEHICLE_FLAG_HOVER_UP_ONLY|VEHICLE_FLAG_HOVER_WATER_ONLY|VEHICLE_FLAG_LIMIT_MOTOR_UP|VEHICLE_FLAG_LIMIT_ROLL_ONLY|VEHICLE_FLAG_MOUSELOOK_BANK|VEHICLE_FLAG_MOUSELOOK_STEER|VEHICLE_FLAG_NO_DEFLECTION_UP|VEHICLE_HOVER_EFFICIENCY|VEHICLE_HOVER_HEIGHT|VEHICLE_HOVER_TIMESCALE|VEHICLE_LINEAR_DEFLECTION_EFFICIENCY|VEHICLE_LINEAR_DEFLECTION_TIMESCALE|VEHICLE_LINEAR_FRICTION_TIMESCALE|VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE|VEHICLE_LINEAR_MOTOR_DIRECTION|VEHICLE_LINEAR_MOTOR_OFFSET|VEHICLE_LINEAR_MOTOR_TIMESCALE|VEHICLE_REFERENCE_FRAME|VEHICLE_TYPE_AIRPLANE|VEHICLE_TYPE_BALLOON|VEHICLE_TYPE_BOAT|VEHICLE_TYPE_CAR|VEHICLE_TYPE_NONE|VEHICLE_TYPE_SLED|VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY|VEHICLE_VERTICAL_ATTRACTION_TIMESCALE|VERTICAL|WANDER_PAUSE_AT_WAYPOINTS|XP_ERROR_EXPERIENCES_DISABLED|XP_ERROR_EXPERIENCE_DISABLED|XP_ERROR_EXPERIENCE_SUSPENDED|XP_ERROR_INVALID_EXPERIENCE|XP_ERROR_INVALID_PARAMETERS|XP_ERROR_KEY_NOT_FOUND|XP_ERROR_MATURITY_EXCEEDED|XP_ERROR_NONE|XP_ERROR_NOT_FOUND|XP_ERROR_NOT_PERMITTED|XP_ERROR_NO_EXPERIENCE|XP_ERROR_QUOTA_EXCEEDED|XP_ERROR_RETRY_UPDATE|XP_ERROR_STORAGE_EXCEPTION|XP_ERROR_STORE_DISABLED|XP_ERROR_THROTTLED|XP_ERROR_UNKNOWN_ERROR", - "constant.language.integer.boolean.lsl" : "FALSE|TRUE", - "constant.language.quaternion.lsl" : "ZERO_ROTATION", - "constant.language.string.lsl" : "EOF|JSON_ARRAY|JSON_DELETE|JSON_FALSE|JSON_INVALID|JSON_NULL|JSON_NUMBER|JSON_OBJECT|JSON_STRING|JSON_TRUE|NULL_KEY|TEXTURE_BLANK|TEXTURE_DEFAULT|TEXTURE_MEDIA|TEXTURE_PLYWOOD|TEXTURE_TRANSPARENT|URL_REQUEST_DENIED|URL_REQUEST_GRANTED", - "constant.language.vector.lsl" : "TOUCH_INVALID_TEXCOORD|TOUCH_INVALID_VECTOR|ZERO_VECTOR", - "invalid.broken.lsl": "LAND_LARGE_BRUSH|LAND_MEDIUM_BRUSH|LAND_SMALL_BRUSH", - "invalid.deprecated.lsl" : "ATTACH_LPEC|ATTACH_RPEC|DATA_RATING|OBJECT_ATTACHMENT_GEOMETRY_BYTES|OBJECT_ATTACHMENT_SURFACE_AREA|PRIM_CAST_SHADOWS|PRIM_MATERIAL_LIGHT|PRIM_TYPE_LEGACY|PSYS_SRC_INNERANGLE|PSYS_SRC_OUTERANGLE|VEHICLE_FLAG_NO_FLY_UP|llClearExperiencePermissions|llCloud|llGetExperienceList|llMakeExplosion|llMakeFire|llMakeFountain|llMakeSmoke|llRemoteDataSetRegion|llSound|llSoundPreload|llXorBase64Strings|llXorBase64StringsCorrect", - "invalid.illegal.lsl": "event", - "invalid.unimplemented.lsl": "CHARACTER_MAX_ANGULAR_ACCEL|CHARACTER_MAX_ANGULAR_SPEED|CHARACTER_TURN_SPEED_MULTIPLIER|PERMISSION_CHANGE_JOINTS|PERMISSION_CHANGE_PERMISSIONS|PERMISSION_RELEASE_OWNERSHIP|PERMISSION_REMAP_CONTROLS|PRIM_PHYSICS_MATERIAL|PSYS_SRC_OBJ_REL_MASK|llCollisionSprite|llPointAt|llRefreshPrimURL|llReleaseCamera|llRemoteLoadScript|llSetPrimURL|llStopPointAt|llTakeCamera", - "reserved.godmode.lsl": "llGodLikeRezObject|llSetInventoryPermMask|llSetObjectPermMask", - "reserved.log.lsl" : "print", - "keyword.control.lsl" : "do|else|for|if|jump|return|while", - "storage.type.lsl" : "float|integer|key|list|quaternion|rotation|string|vector", - "support.function.lsl": "llAbs|llAcos|llAddToLandBanList|llAddToLandPassList|llAdjustSoundVolume|llAgentInExperience|llAllowInventoryDrop|llAngleBetween|llApplyImpulse|llApplyRotationalImpulse|llAsin|llAtan2|llAttachToAvatar|llAttachToAvatarTemp|llAvatarOnLinkSitTarget|llAvatarOnSitTarget|llAxes2Rot|llAxisAngle2Rot|llBase64ToInteger|llBase64ToString|llBreakAllLinks|llBreakLink|llCSV2List|llCastRay|llCeil|llClearCameraParams|llClearLinkMedia|llClearPrimMedia|llCloseRemoteDataChannel|llCollisionFilter|llCollisionSound|llCos|llCreateCharacter|llCreateKeyValue|llCreateLink|llDataSizeKeyValue|llDeleteCharacter|llDeleteKeyValue|llDeleteSubList|llDeleteSubString|llDetachFromAvatar|llDetectedGrab|llDetectedGroup|llDetectedKey|llDetectedLinkNumber|llDetectedName|llDetectedOwner|llDetectedPos|llDetectedRot|llDetectedTouchBinormal|llDetectedTouchFace|llDetectedTouchNormal|llDetectedTouchPos|llDetectedTouchST|llDetectedTouchUV|llDetectedType|llDetectedVel|llDialog|llDie|llDumpList2String|llEdgeOfWorld|llEjectFromLand|llEmail|llEscapeURL|llEuler2Rot|llEvade|llExecCharacterCmd|llFabs|llFleeFrom|llFloor|llForceMouselook|llFrand|llGenerateKey|llGetAccel|llGetAgentInfo|llGetAgentLanguage|llGetAgentList|llGetAgentSize|llGetAlpha|llGetAndResetTime|llGetAnimation|llGetAnimationList|llGetAnimationOverride|llGetAttached|llGetBoundingBox|llGetCameraPos|llGetCameraRot|llGetCenterOfMass|llGetClosestNavPoint|llGetColor|llGetCreator|llGetDate|llGetDisplayName|llGetEnergy|llGetEnv|llGetExperienceDetails|llGetExperienceErrorMessage|llGetForce|llGetFreeMemory|llGetFreeURLs|llGetGMTclock|llGetGeometricCenter|llGetHTTPHeader|llGetInventoryCreator|llGetInventoryKey|llGetInventoryName|llGetInventoryNumber|llGetInventoryPermMask|llGetInventoryType|llGetKey|llGetLandOwnerAt|llGetLinkKey|llGetLinkMedia|llGetLinkName|llGetLinkNumber|llGetLinkNumberOfSides|llGetLinkPrimitiveParams|llGetListEntryType|llGetListLength|llGetLocalPos|llGetLocalRot|llGetMass|llGetMassMKS|llGetMaxScaleFactor|llGetMemoryLimit|llGetMinScaleFactor|llGetNextEmail|llGetNotecardLine|llGetNumberOfNotecardLines|llGetNumberOfPrims|llGetNumberOfSides|llGetObjectDesc|llGetObjectDetails|llGetObjectMass|llGetObjectName|llGetObjectPermMask|llGetObjectPrimCount|llGetOmega|llGetOwner|llGetOwnerKey|llGetParcelDetails|llGetParcelFlags|llGetParcelMaxPrims|llGetParcelMusicURL|llGetParcelPrimCount|llGetParcelPrimOwners|llGetPermissions|llGetPermissionsKey|llGetPhysicsMaterial|llGetPos|llGetPrimMediaParams|llGetPrimitiveParams|llGetRegionAgentCount|llGetRegionCorner|llGetRegionFPS|llGetRegionFlags|llGetRegionName|llGetRegionTimeDilation|llGetRootPosition|llGetRootRotation|llGetRot|llGetSPMaxMemory|llGetScale|llGetScriptName|llGetScriptState|llGetSimStats|llGetSimulatorHostname|llGetStartParameter|llGetStaticPath|llGetStatus|llGetSubString|llGetSunDirection|llGetTexture|llGetTextureOffset|llGetTextureRot|llGetTextureScale|llGetTime|llGetTimeOfDay|llGetTimestamp|llGetTorque|llGetUnixTime|llGetUsedMemory|llGetUsername|llGetVel|llGetWallclock|llGiveInventory|llGiveInventoryList|llGiveMoney|llGround|llGroundContour|llGroundNormal|llGroundRepel|llGroundSlope|llHTTPRequest|llHTTPResponse|llInsertString|llInstantMessage|llIntegerToBase64|llJson2List|llJsonGetValue|llJsonSetValue|llJsonValueType|llKey2Name|llKeyCountKeyValue|llKeysKeyValue|llLinkParticleSystem|llLinkSitTarget|llList2CSV|llList2Float|llList2Integer|llList2Json|llList2Key|llList2List|llList2ListStrided|llList2Rot|llList2String|llList2Vector|llListFindList|llListInsertList|llListRandomize|llListReplaceList|llListSort|llListStatistics|llListen|llListenControl|llListenRemove|llLoadURL|llLog|llLog10|llLookAt|llLoopSound|llLoopSoundMaster|llLoopSoundSlave|llMD5String|llManageEstateAccess|llMapDestination|llMessageLinked|llMinEventDelay|llModPow|llModifyLand|llMoveToTarget|llNavigateTo|llOffsetTexture|llOpenRemoteDataChannel|llOverMyLand|llOwnerSay|llParcelMediaCommandList|llParcelMediaQuery|llParseString2List|llParseStringKeepNulls|llParticleSystem|llPassCollisions|llPassTouches|llPatrolPoints|llPlaySound|llPlaySoundSlave|llPow|llPreloadSound|llPursue|llPushObject|llReadKeyValue|llRegionSay|llRegionSayTo|llReleaseControls|llReleaseURL|llRemoteDataReply|llRemoteLoadScriptPin|llRemoveFromLandBanList|llRemoveFromLandPassList|llRemoveInventory|llRemoveVehicleFlags|llRequestAgentData|llRequestDisplayName|llRequestExperiencePermissions|llRequestInventoryData|llRequestPermissions|llRequestSecureURL|llRequestSimulatorData|llRequestURL|llRequestUsername|llResetAnimationOverride|llResetLandBanList|llResetLandPassList|llResetOtherScript|llResetScript|llResetTime|llReturnObjectsByID|llReturnObjectsByOwner|llRezAtRoot|llRezObject|llRot2Angle|llRot2Axis|llRot2Euler|llRot2Fwd|llRot2Left|llRot2Up|llRotBetween|llRotLookAt|llRotTarget|llRotTargetRemove|llRotateTexture|llRound|llSHA1String|llSameGroup|llSay|llScaleByFactor|llScaleTexture|llScriptDanger|llScriptProfiler|llSendRemoteData|llSensor|llSensorRemove|llSensorRepeat|llSetAlpha|llSetAngularVelocity|llSetAnimationOverride|llSetBuoyancy|llSetCameraAtOffset|llSetCameraEyeOffset|llSetCameraParams|llSetClickAction|llSetColor|llSetContentType|llSetDamage|llSetForce|llSetForceAndTorque|llSetHoverHeight|llSetKeyframedMotion|llSetLinkAlpha|llSetLinkCamera|llSetLinkColor|llSetLinkMedia|llSetLinkPrimitiveParams|llSetLinkPrimitiveParamsFast|llSetLinkTexture|llSetLinkTextureAnim|llSetLocalRot|llSetMemoryLimit|llSetObjectDesc|llSetObjectName|llSetParcelMusicURL|llSetPayPrice|llSetPhysicsMaterial|llSetPos|llSetPrimMediaParams|llSetPrimitiveParams|llSetRegionPos|llSetRemoteScriptAccessPin|llSetRot|llSetScale|llSetScriptState|llSetSitText|llSetSoundQueueing|llSetSoundRadius|llSetStatus|llSetText|llSetTexture|llSetTextureAnim|llSetTimerEvent|llSetTorque|llSetTouchText|llSetVehicleFlags|llSetVehicleFloatParam|llSetVehicleRotationParam|llSetVehicleType|llSetVehicleVectorParam|llSetVelocity|llShout|llSin|llSitTarget|llSleep|llSqrt|llStartAnimation|llStopAnimation|llStopHover|llStopLookAt|llStopMoveToTarget|llStopSound|llStringLength|llStringToBase64|llStringTrim|llSubStringIndex|llTakeControls|llTan|llTarget|llTargetOmega|llTargetRemove|llTeleportAgent|llTeleportAgentGlobalCoords|llTeleportAgentHome|llTextBox|llToLower|llToUpper|llTransferLindenDollars|llTriggerSound|llTriggerSoundLimited|llUnSit|llUnescapeURL|llUpdateCharacter|llUpdateKeyValue|llVecDist|llVecMag|llVecNorm|llVolumeDetect|llWanderWithin|llWater|llWhisper|llWind|llXorBase64", - "support.function.event.lsl" : "at_rot_target|at_target|attach|changed|collision|collision_end|collision_start|control|dataserver|email|experience_permissions|experience_permissions_denied|http_request|http_response|land_collision|land_collision_end|land_collision_start|link_message|listen|money|moving_end|moving_start|no_sensor|not_at_rot_target|not_at_target|object_rez|on_rez|path_update|remote_data|run_time_permissions|sensor|state_entry|state_exit|timer|touch|touch_end|touch_start|transaction_result" - }, "identifier"); - - this.$rules = { - "start" : [ - { - token : "comment.line.double-slash.lsl", - regex : "\\/\\/.*$" - }, { - token : "comment.block.begin.lsl", - regex : "\\/\\*", - next : "comment" - }, { - token : "string.quoted.double.lsl", - start : '"', - end : '"', - next : [{ - token : "constant.character.escape.lsl", - regex : /\\[tn"\\]/ - }] - }, { - token : "constant.numeric.lsl", - regex : "(0[xX][0-9a-fA-F]+|[+-]?[0-9]+(?:(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?)?)\\b" - }, { - token : "entity.name.state.lsl", - regex : "\\b((state)\\s+[A-Za-z_]\\w*|default)\\b" - }, { - token : keywordMapper, - regex : "\\b[a-zA-Z_][a-zA-Z0-9_]*\\b" - }, { - token : "support.function.user-defined.lsl", - regex : /\b([a-zA-Z_]\w*)(?=\(.*?\))/ - }, { - token : "keyword.operator.lsl", - regex : "\\+\\+|\\-\\-|<<|>>|&&?|\\|\\|?|\\^|~|[!%<>=*+\\-\\/]=?" - }, { - token : "invalid.illegal.keyword.operator.lsl", - regex : ":=?" - }, { - token : "punctuation.operator.lsl", - regex : "\\,|\\;" - }, { - token : "paren.lparen.lsl", - regex : "[\\[\\(\\{]" - }, { - token : "paren.rparen.lsl", - regex : "[\\]\\)\\}]" - }, { - token : "text.lsl", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment.block.end.lsl", - regex : "\\*\\/", - next : "start" - }, { - token : "comment.block.lsl", - regex : ".+" - } - ] - }; - this.normalizeRules(); -} - -exports.LSLHighlightRules = LSLHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/lsl",["require","exports","module","ace/mode/lsl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/text","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/lib/oop"], function(require, exports, module) { -"use strict"; - -var Rules = require("./lsl_highlight_rules").LSLHighlightRules; -var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var TextMode = require("./text").Mode; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; -var oop = require("../lib/oop"); - -var Mode = function() { - this.HighlightRules = Rules; - this.$outdent = new Outdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = ["//"]; - - this.blockComment = { - start: "/*", - end: "*/" - }; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type === "comment.block.lsl") { - return indent; - } - - if (state === "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/lsl"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/lsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,_,t){"use strict";function l(){var e=this.createKeywordMapper({"constant.language.float.lsl":"DEG_TO_RAD|PI|PI_BY_TWO|RAD_TO_DEG|SQRT2|TWO_PI","constant.language.integer.lsl":"ACTIVE|AGENT|AGENT_ALWAYS_RUN|AGENT_ATTACHMENTS|AGENT_AUTOPILOT|AGENT_AWAY|AGENT_BUSY|AGENT_BY_LEGACY_NAME|AGENT_BY_USERNAME|AGENT_CROUCHING|AGENT_FLYING|AGENT_IN_AIR|AGENT_LIST_PARCEL|AGENT_LIST_PARCEL_OWNER|AGENT_LIST_REGION|AGENT_MOUSELOOK|AGENT_ON_OBJECT|AGENT_SCRIPTED|AGENT_SITTING|AGENT_TYPING|AGENT_WALKING|ALL_SIDES|ANIM_ON|ATTACH_AVATAR_CENTER|ATTACH_BACK|ATTACH_BELLY|ATTACH_CHEST|ATTACH_CHIN|ATTACH_HEAD|ATTACH_HUD_BOTTOM|ATTACH_HUD_BOTTOM_LEFT|ATTACH_HUD_BOTTOM_RIGHT|ATTACH_HUD_CENTER_1|ATTACH_HUD_CENTER_2|ATTACH_HUD_TOP_CENTER|ATTACH_HUD_TOP_LEFT|ATTACH_HUD_TOP_RIGHT|ATTACH_LEAR|ATTACH_LEFT_PEC|ATTACH_LEYE|ATTACH_LFOOT|ATTACH_LHAND|ATTACH_LHIP|ATTACH_LLARM|ATTACH_LLLEG|ATTACH_LSHOULDER|ATTACH_LUARM|ATTACH_LULEG|ATTACH_MOUTH|ATTACH_NECK|ATTACH_NOSE|ATTACH_PELVIS|ATTACH_REAR|ATTACH_REYE|ATTACH_RFOOT|ATTACH_RHAND|ATTACH_RHIP|ATTACH_RIGHT_PEC|ATTACH_RLARM|ATTACH_RLLEG|ATTACH_RSHOULDER|ATTACH_RUARM|ATTACH_RULEG|AVOID_CHARACTERS|AVOID_DYNAMIC_OBSTACLES|AVOID_NONE|CAMERA_ACTIVE|CAMERA_BEHINDNESS_ANGLE|CAMERA_BEHINDNESS_LAG|CAMERA_DISTANCE|CAMERA_FOCUS|CAMERA_FOCUS_LAG|CAMERA_FOCUS_LOCKED|CAMERA_FOCUS_OFFSET|CAMERA_FOCUS_THRESHOLD|CAMERA_PITCH|CAMERA_POSITION|CAMERA_POSITION_LAG|CAMERA_POSITION_LOCKED|CAMERA_POSITION_THRESHOLD|CHANGED_ALLOWED_DROP|CHANGED_COLOR|CHANGED_INVENTORY|CHANGED_LINK|CHANGED_MEDIA|CHANGED_OWNER|CHANGED_REGION|CHANGED_REGION_START|CHANGED_SCALE|CHANGED_SHAPE|CHANGED_TELEPORT|CHANGED_TEXTURE|CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES|CHARACTER_AVOIDANCE_MODE|CHARACTER_CMD_JUMP|CHARACTER_CMD_SMOOTH_STOP|CHARACTER_CMD_STOP|CHARACTER_DESIRED_SPEED|CHARACTER_DESIRED_TURN_SPEED|CHARACTER_LENGTH|CHARACTER_MAX_ACCEL|CHARACTER_MAX_DECEL|CHARACTER_MAX_SPEED|CHARACTER_MAX_TURN_RADIUS|CHARACTER_ORIENTATION|CHARACTER_RADIUS|CHARACTER_STAY_WITHIN_PARCEL|CHARACTER_TYPE|CHARACTER_TYPE_A|CHARACTER_TYPE_B|CHARACTER_TYPE_C|CHARACTER_TYPE_D|CHARACTER_TYPE_NONE|CLICK_ACTION_BUY|CLICK_ACTION_NONE|CLICK_ACTION_OPEN|CLICK_ACTION_OPEN_MEDIA|CLICK_ACTION_PAY|CLICK_ACTION_PLAY|CLICK_ACTION_SIT|CLICK_ACTION_TOUCH|CONTENT_TYPE_ATOM|CONTENT_TYPE_FORM|CONTENT_TYPE_HTML|CONTENT_TYPE_JSON|CONTENT_TYPE_LLSD|CONTENT_TYPE_RSS|CONTENT_TYPE_TEXT|CONTENT_TYPE_XHTML|CONTENT_TYPE_XML|CONTROL_BACK|CONTROL_DOWN|CONTROL_FWD|CONTROL_LBUTTON|CONTROL_LEFT|CONTROL_ML_LBUTTON|CONTROL_RIGHT|CONTROL_ROT_LEFT|CONTROL_ROT_RIGHT|CONTROL_UP|DATA_BORN|DATA_NAME|DATA_ONLINE|DATA_PAYINFO|DATA_SIM_POS|DATA_SIM_RATING|DATA_SIM_STATUS|DEBUG_CHANNEL|DENSITY|ERR_GENERIC|ERR_MALFORMED_PARAMS|ERR_PARCEL_PERMISSIONS|ERR_RUNTIME_PERMISSIONS|ERR_THROTTLED|ESTATE_ACCESS_ALLOWED_AGENT_ADD|ESTATE_ACCESS_ALLOWED_AGENT_REMOVE|ESTATE_ACCESS_ALLOWED_GROUP_ADD|ESTATE_ACCESS_ALLOWED_GROUP_REMOVE|ESTATE_ACCESS_BANNED_AGENT_ADD|ESTATE_ACCESS_BANNED_AGENT_REMOVE|FALSE|FORCE_DIRECT_PATH|FRICTION|GCNP_RADIUS|GCNP_STATIC|GRAVITY_MULTIPLIER|HORIZONTAL|HTTP_BODY_MAXLENGTH|HTTP_BODY_TRUNCATED|HTTP_CUSTOM_HEADER|HTTP_METHOD|HTTP_MIMETYPE|HTTP_PRAGMA_NO_CACHE|HTTP_VERBOSE_THROTTLE|HTTP_VERIFY_CERT|INVENTORY_ALL|INVENTORY_ANIMATION|INVENTORY_BODYPART|INVENTORY_CLOTHING|INVENTORY_GESTURE|INVENTORY_LANDMARK|INVENTORY_NONE|INVENTORY_NOTECARD|INVENTORY_OBJECT|INVENTORY_SCRIPT|INVENTORY_SOUND|INVENTORY_TEXTURE|JSON_APPEND|KFM_CMD_PAUSE|KFM_CMD_PLAY|KFM_CMD_SET_MODE|KFM_CMD_STOP|KFM_COMMAND|KFM_DATA|KFM_FORWARD|KFM_LOOP|KFM_MODE|KFM_PING_PONG|KFM_REVERSE|KFM_ROTATION|KFM_TRANSLATION|LAND_LEVEL|LAND_LOWER|LAND_NOISE|LAND_RAISE|LAND_REVERT|LAND_SMOOTH|LINK_ALL_CHILDREN|LINK_ALL_OTHERS|LINK_ROOT|LINK_SET|LINK_THIS|LIST_STAT_GEOMETRIC_MEAN|LIST_STAT_MAX|LIST_STAT_MEAN|LIST_STAT_MEDIAN|LIST_STAT_MIN|LIST_STAT_NUM_COUNT|LIST_STAT_RANGE|LIST_STAT_STD_DEV|LIST_STAT_SUM|LIST_STAT_SUM_SQUARES|LOOP|MASK_BASE|MASK_EVERYONE|MASK_GROUP|MASK_NEXT|MASK_OWNER|OBJECT_ATTACHED_POINT|OBJECT_CHARACTER_TIME|OBJECT_CREATOR|OBJECT_DESC|OBJECT_GROUP|OBJECT_NAME|OBJECT_OWNER|OBJECT_PATHFINDING_TYPE|OBJECT_PHANTOM|OBJECT_PHYSICS|OBJECT_PHYSICS_COST|OBJECT_POS|OBJECT_PRIM_EQUIVALENCE|OBJECT_RENDER_WEIGHT|OBJECT_RETURN_PARCEL|OBJECT_RETURN_PARCEL_OWNER|OBJECT_RETURN_REGION|OBJECT_ROOT|OBJECT_ROT|OBJECT_RUNNING_SCRIPT_COUNT|OBJECT_SCRIPT_MEMORY|OBJECT_SCRIPT_TIME|OBJECT_SERVER_COST|OBJECT_STREAMING_COST|OBJECT_TEMP_ON_REZ|OBJECT_TOTAL_SCRIPT_COUNT|OBJECT_UNKNOWN_DETAIL|OBJECT_VELOCITY|OPT_AVATAR|OPT_CHARACTER|OPT_EXCLUSION_VOLUME|OPT_LEGACY_LINKSET|OPT_MATERIAL_VOLUME|OPT_OTHER|OPT_STATIC_OBSTACLE|OPT_WALKABLE|PARCEL_COUNT_GROUP|PARCEL_COUNT_OTHER|PARCEL_COUNT_OWNER|PARCEL_COUNT_SELECTED|PARCEL_COUNT_TEMP|PARCEL_COUNT_TOTAL|PARCEL_DETAILS_AREA|PARCEL_DETAILS_DESC|PARCEL_DETAILS_GROUP|PARCEL_DETAILS_ID|PARCEL_DETAILS_NAME|PARCEL_DETAILS_OWNER|PARCEL_DETAILS_SEE_AVATARS|PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS|PARCEL_FLAG_ALLOW_CREATE_OBJECTS|PARCEL_FLAG_ALLOW_DAMAGE|PARCEL_FLAG_ALLOW_FLY|PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_GROUP_SCRIPTS|PARCEL_FLAG_ALLOW_LANDMARK|PARCEL_FLAG_ALLOW_SCRIPTS|PARCEL_FLAG_ALLOW_TERRAFORM|PARCEL_FLAG_LOCAL_SOUND_ONLY|PARCEL_FLAG_RESTRICT_PUSHOBJECT|PARCEL_FLAG_USE_ACCESS_GROUP|PARCEL_FLAG_USE_ACCESS_LIST|PARCEL_FLAG_USE_BAN_LIST|PARCEL_FLAG_USE_LAND_PASS_LIST|PARCEL_MEDIA_COMMAND_AGENT|PARCEL_MEDIA_COMMAND_AUTO_ALIGN|PARCEL_MEDIA_COMMAND_DESC|PARCEL_MEDIA_COMMAND_LOOP|PARCEL_MEDIA_COMMAND_LOOP_SET|PARCEL_MEDIA_COMMAND_PAUSE|PARCEL_MEDIA_COMMAND_PLAY|PARCEL_MEDIA_COMMAND_SIZE|PARCEL_MEDIA_COMMAND_STOP|PARCEL_MEDIA_COMMAND_TEXTURE|PARCEL_MEDIA_COMMAND_TIME|PARCEL_MEDIA_COMMAND_TYPE|PARCEL_MEDIA_COMMAND_UNLOAD|PARCEL_MEDIA_COMMAND_URL|PASSIVE|PATROL_PAUSE_AT_WAYPOINTS|PAYMENT_INFO_ON_FILE|PAYMENT_INFO_USED|PAY_DEFAULT|PAY_HIDE|PERMISSION_ATTACH|PERMISSION_CHANGE_LINKS|PERMISSION_CONTROL_CAMERA|PERMISSION_DEBIT|PERMISSION_OVERRIDE_ANIMATIONS|PERMISSION_RETURN_OBJECTS|PERMISSION_SILENT_ESTATE_MANAGEMENT|PERMISSION_TAKE_CONTROLS|PERMISSION_TELEPORT|PERMISSION_TRACK_CAMERA|PERMISSION_TRIGGER_ANIMATION|PERM_ALL|PERM_COPY|PERM_MODIFY|PERM_MOVE|PERM_TRANSFER|PING_PONG|PRIM_ALPHA_MODE|PRIM_ALPHA_MODE_BLEND|PRIM_ALPHA_MODE_EMISSIVE|PRIM_ALPHA_MODE_MASK|PRIM_ALPHA_MODE_NONE|PRIM_BUMP_BARK|PRIM_BUMP_BLOBS|PRIM_BUMP_BRICKS|PRIM_BUMP_BRIGHT|PRIM_BUMP_CHECKER|PRIM_BUMP_CONCRETE|PRIM_BUMP_DARK|PRIM_BUMP_DISKS|PRIM_BUMP_GRAVEL|PRIM_BUMP_LARGETILE|PRIM_BUMP_NONE|PRIM_BUMP_SHINY|PRIM_BUMP_SIDING|PRIM_BUMP_STONE|PRIM_BUMP_STUCCO|PRIM_BUMP_SUCTION|PRIM_BUMP_TILE|PRIM_BUMP_WEAVE|PRIM_BUMP_WOOD|PRIM_COLOR|PRIM_DESC|PRIM_FLEXIBLE|PRIM_FULLBRIGHT|PRIM_GLOW|PRIM_HOLE_CIRCLE|PRIM_HOLE_DEFAULT|PRIM_HOLE_SQUARE|PRIM_HOLE_TRIANGLE|PRIM_LINK_TARGET|PRIM_MATERIAL|PRIM_MATERIAL_FLESH|PRIM_MATERIAL_GLASS|PRIM_MATERIAL_METAL|PRIM_MATERIAL_PLASTIC|PRIM_MATERIAL_RUBBER|PRIM_MATERIAL_STONE|PRIM_MATERIAL_WOOD|PRIM_MEDIA_ALT_IMAGE_ENABLE|PRIM_MEDIA_AUTO_LOOP|PRIM_MEDIA_AUTO_PLAY|PRIM_MEDIA_AUTO_SCALE|PRIM_MEDIA_AUTO_ZOOM|PRIM_MEDIA_CONTROLS|PRIM_MEDIA_CONTROLS_MINI|PRIM_MEDIA_CONTROLS_STANDARD|PRIM_MEDIA_CURRENT_URL|PRIM_MEDIA_FIRST_CLICK_INTERACT|PRIM_MEDIA_HEIGHT_PIXELS|PRIM_MEDIA_HOME_URL|PRIM_MEDIA_MAX_HEIGHT_PIXELS|PRIM_MEDIA_MAX_URL_LENGTH|PRIM_MEDIA_MAX_WHITELIST_COUNT|PRIM_MEDIA_MAX_WHITELIST_SIZE|PRIM_MEDIA_MAX_WIDTH_PIXELS|PRIM_MEDIA_PARAM_MAX|PRIM_MEDIA_PERMS_CONTROL|PRIM_MEDIA_PERMS_INTERACT|PRIM_MEDIA_PERM_ANYONE|PRIM_MEDIA_PERM_GROUP|PRIM_MEDIA_PERM_NONE|PRIM_MEDIA_PERM_OWNER|PRIM_MEDIA_WHITELIST|PRIM_MEDIA_WHITELIST_ENABLE|PRIM_MEDIA_WIDTH_PIXELS|PRIM_NAME|PRIM_NORMAL|PRIM_OMEGA|PRIM_PHANTOM|PRIM_PHYSICS|PRIM_PHYSICS_SHAPE_CONVEX|PRIM_PHYSICS_SHAPE_NONE|PRIM_PHYSICS_SHAPE_PRIM|PRIM_PHYSICS_SHAPE_TYPE|PRIM_POINT_LIGHT|PRIM_POSITION|PRIM_POS_LOCAL|PRIM_ROTATION|PRIM_ROT_LOCAL|PRIM_SCULPT_FLAG_INVERT|PRIM_SCULPT_FLAG_MIRROR|PRIM_SCULPT_TYPE_CYLINDER|PRIM_SCULPT_TYPE_MASK|PRIM_SCULPT_TYPE_PLANE|PRIM_SCULPT_TYPE_SPHERE|PRIM_SCULPT_TYPE_TORUS|PRIM_SHINY_HIGH|PRIM_SHINY_LOW|PRIM_SHINY_MEDIUM|PRIM_SHINY_NONE|PRIM_SIZE|PRIM_SLICE|PRIM_SPECULAR|PRIM_TEMP_ON_REZ|PRIM_TEXGEN|PRIM_TEXGEN_DEFAULT|PRIM_TEXGEN_PLANAR|PRIM_TEXT|PRIM_TEXTURE|PRIM_TYPE|PRIM_TYPE_BOX|PRIM_TYPE_CYLINDER|PRIM_TYPE_PRISM|PRIM_TYPE_RING|PRIM_TYPE_SCULPT|PRIM_TYPE_SPHERE|PRIM_TYPE_TORUS|PRIM_TYPE_TUBE|PROFILE_NONE|PROFILE_SCRIPT_MEMORY|PSYS_PART_BF_DEST_COLOR|PSYS_PART_BF_ONE|PSYS_PART_BF_ONE_MINUS_DEST_COLOR|PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA|PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR|PSYS_PART_BF_SOURCE_ALPHA|PSYS_PART_BF_SOURCE_COLOR|PSYS_PART_BF_ZERO|PSYS_PART_BLEND_FUNC_DEST|PSYS_PART_BLEND_FUNC_SOURCE|PSYS_PART_BOUNCE_MASK|PSYS_PART_EMISSIVE_MASK|PSYS_PART_END_ALPHA|PSYS_PART_END_COLOR|PSYS_PART_END_GLOW|PSYS_PART_END_SCALE|PSYS_PART_FLAGS|PSYS_PART_FOLLOW_SRC_MASK|PSYS_PART_FOLLOW_VELOCITY_MASK|PSYS_PART_INTERP_COLOR_MASK|PSYS_PART_INTERP_SCALE_MASK|PSYS_PART_MAX_AGE|PSYS_PART_RIBBON_MASK|PSYS_PART_START_ALPHA|PSYS_PART_START_COLOR|PSYS_PART_START_GLOW|PSYS_PART_START_SCALE|PSYS_PART_TARGET_LINEAR_MASK|PSYS_PART_TARGET_POS_MASK|PSYS_PART_WIND_MASK|PSYS_SRC_ACCEL|PSYS_SRC_ANGLE_BEGIN|PSYS_SRC_ANGLE_END|PSYS_SRC_BURST_PART_COUNT|PSYS_SRC_BURST_RADIUS|PSYS_SRC_BURST_RATE|PSYS_SRC_BURST_SPEED_MAX|PSYS_SRC_BURST_SPEED_MIN|PSYS_SRC_MAX_AGE|PSYS_SRC_OMEGA|PSYS_SRC_PATTERN|PSYS_SRC_PATTERN_ANGLE|PSYS_SRC_PATTERN_ANGLE_CONE|PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY|PSYS_SRC_PATTERN_DROP|PSYS_SRC_PATTERN_EXPLODE|PSYS_SRC_TARGET_KEY|PSYS_SRC_TEXTURE|PUBLIC_CHANNEL|PURSUIT_FUZZ_FACTOR|PURSUIT_GOAL_TOLERANCE|PURSUIT_INTERCEPT|PURSUIT_OFFSET|PU_EVADE_HIDDEN|PU_EVADE_SPOTTED|PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED|PU_FAILURE_INVALID_GOAL|PU_FAILURE_INVALID_START|PU_FAILURE_NO_NAVMESH|PU_FAILURE_NO_VALID_DESTINATION|PU_FAILURE_OTHER|PU_FAILURE_PARCEL_UNREACHABLE|PU_FAILURE_TARGET_GONE|PU_FAILURE_UNREACHABLE|PU_GOAL_REACHED|PU_SLOWDOWN_DISTANCE_REACHED|RCERR_CAST_TIME_EXCEEDED|RCERR_SIM_PERF_LOW|RCERR_UNKNOWN|RC_DATA_FLAGS|RC_DETECT_PHANTOM|RC_GET_LINK_NUM|RC_GET_NORMAL|RC_GET_ROOT_KEY|RC_MAX_HITS|RC_REJECT_AGENTS|RC_REJECT_LAND|RC_REJECT_NONPHYSICAL|RC_REJECT_PHYSICAL|RC_REJECT_TYPES|REGION_FLAG_ALLOW_DAMAGE|REGION_FLAG_ALLOW_DIRECT_TELEPORT|REGION_FLAG_BLOCK_FLY|REGION_FLAG_BLOCK_TERRAFORM|REGION_FLAG_DISABLE_COLLISIONS|REGION_FLAG_DISABLE_PHYSICS|REGION_FLAG_FIXED_SUN|REGION_FLAG_RESTRICT_PUSHOBJECT|REGION_FLAG_SANDBOX|REMOTE_DATA_CHANNEL|REMOTE_DATA_REPLY|REMOTE_DATA_REQUEST|REQUIRE_LINE_OF_SIGHT|RESTITUTION|REVERSE|ROTATE|SCALE|SCRIPTED|SIM_STAT_PCT_CHARS_STEPPED|SMOOTH|STATUS_BLOCK_GRAB|STATUS_BLOCK_GRAB_OBJECT|STATUS_BOUNDS_ERROR|STATUS_CAST_SHADOWS|STATUS_DIE_AT_EDGE|STATUS_INTERNAL_ERROR|STATUS_MALFORMED_PARAMS|STATUS_NOT_FOUND|STATUS_NOT_SUPPORTED|STATUS_OK|STATUS_PHANTOM|STATUS_PHYSICS|STATUS_RETURN_AT_EDGE|STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z|STATUS_SANDBOX|STATUS_TYPE_MISMATCH|STATUS_WHITELIST_FAILED|STRING_TRIM|STRING_TRIM_HEAD|STRING_TRIM_TAIL|TOUCH_INVALID_FACE|TRAVERSAL_TYPE|TRAVERSAL_TYPE_FAST|TRAVERSAL_TYPE_NONE|TRAVERSAL_TYPE_SLOW|TRUE|TYPE_FLOAT|TYPE_INTEGER|TYPE_INVALID|TYPE_KEY|TYPE_ROTATION|TYPE_STRING|TYPE_VECTOR|VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY|VEHICLE_ANGULAR_DEFLECTION_TIMESCALE|VEHICLE_ANGULAR_FRICTION_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DIRECTION|VEHICLE_ANGULAR_MOTOR_TIMESCALE|VEHICLE_BANKING_EFFICIENCY|VEHICLE_BANKING_MIX|VEHICLE_BANKING_TIMESCALE|VEHICLE_BUOYANCY|VEHICLE_FLAG_CAMERA_DECOUPLED|VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT|VEHICLE_FLAG_HOVER_TERRAIN_ONLY|VEHICLE_FLAG_HOVER_UP_ONLY|VEHICLE_FLAG_HOVER_WATER_ONLY|VEHICLE_FLAG_LIMIT_MOTOR_UP|VEHICLE_FLAG_LIMIT_ROLL_ONLY|VEHICLE_FLAG_MOUSELOOK_BANK|VEHICLE_FLAG_MOUSELOOK_STEER|VEHICLE_FLAG_NO_DEFLECTION_UP|VEHICLE_HOVER_EFFICIENCY|VEHICLE_HOVER_HEIGHT|VEHICLE_HOVER_TIMESCALE|VEHICLE_LINEAR_DEFLECTION_EFFICIENCY|VEHICLE_LINEAR_DEFLECTION_TIMESCALE|VEHICLE_LINEAR_FRICTION_TIMESCALE|VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE|VEHICLE_LINEAR_MOTOR_DIRECTION|VEHICLE_LINEAR_MOTOR_OFFSET|VEHICLE_LINEAR_MOTOR_TIMESCALE|VEHICLE_REFERENCE_FRAME|VEHICLE_TYPE_AIRPLANE|VEHICLE_TYPE_BALLOON|VEHICLE_TYPE_BOAT|VEHICLE_TYPE_CAR|VEHICLE_TYPE_NONE|VEHICLE_TYPE_SLED|VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY|VEHICLE_VERTICAL_ATTRACTION_TIMESCALE|VERTICAL|WANDER_PAUSE_AT_WAYPOINTS|XP_ERROR_EXPERIENCES_DISABLED|XP_ERROR_EXPERIENCE_DISABLED|XP_ERROR_EXPERIENCE_SUSPENDED|XP_ERROR_INVALID_EXPERIENCE|XP_ERROR_INVALID_PARAMETERS|XP_ERROR_KEY_NOT_FOUND|XP_ERROR_MATURITY_EXCEEDED|XP_ERROR_NONE|XP_ERROR_NOT_FOUND|XP_ERROR_NOT_PERMITTED|XP_ERROR_NO_EXPERIENCE|XP_ERROR_QUOTA_EXCEEDED|XP_ERROR_RETRY_UPDATE|XP_ERROR_STORAGE_EXCEPTION|XP_ERROR_STORE_DISABLED|XP_ERROR_THROTTLED|XP_ERROR_UNKNOWN_ERROR","constant.language.integer.boolean.lsl":"FALSE|TRUE","constant.language.quaternion.lsl":"ZERO_ROTATION","constant.language.string.lsl":"EOF|JSON_ARRAY|JSON_DELETE|JSON_FALSE|JSON_INVALID|JSON_NULL|JSON_NUMBER|JSON_OBJECT|JSON_STRING|JSON_TRUE|NULL_KEY|TEXTURE_BLANK|TEXTURE_DEFAULT|TEXTURE_MEDIA|TEXTURE_PLYWOOD|TEXTURE_TRANSPARENT|URL_REQUEST_DENIED|URL_REQUEST_GRANTED","constant.language.vector.lsl":"TOUCH_INVALID_TEXCOORD|TOUCH_INVALID_VECTOR|ZERO_VECTOR","invalid.broken.lsl":"LAND_LARGE_BRUSH|LAND_MEDIUM_BRUSH|LAND_SMALL_BRUSH","invalid.deprecated.lsl":"ATTACH_LPEC|ATTACH_RPEC|DATA_RATING|OBJECT_ATTACHMENT_GEOMETRY_BYTES|OBJECT_ATTACHMENT_SURFACE_AREA|PRIM_CAST_SHADOWS|PRIM_MATERIAL_LIGHT|PRIM_TYPE_LEGACY|PSYS_SRC_INNERANGLE|PSYS_SRC_OUTERANGLE|VEHICLE_FLAG_NO_FLY_UP|llClearExperiencePermissions|llCloud|llGetExperienceList|llMakeExplosion|llMakeFire|llMakeFountain|llMakeSmoke|llRemoteDataSetRegion|llSound|llSoundPreload|llXorBase64Strings|llXorBase64StringsCorrect","invalid.illegal.lsl":"event","invalid.unimplemented.lsl":"CHARACTER_MAX_ANGULAR_ACCEL|CHARACTER_MAX_ANGULAR_SPEED|CHARACTER_TURN_SPEED_MULTIPLIER|PERMISSION_CHANGE_JOINTS|PERMISSION_CHANGE_PERMISSIONS|PERMISSION_RELEASE_OWNERSHIP|PERMISSION_REMAP_CONTROLS|PRIM_PHYSICS_MATERIAL|PSYS_SRC_OBJ_REL_MASK|llCollisionSprite|llPointAt|llRefreshPrimURL|llReleaseCamera|llRemoteLoadScript|llSetPrimURL|llStopPointAt|llTakeCamera","reserved.godmode.lsl":"llGodLikeRezObject|llSetInventoryPermMask|llSetObjectPermMask","reserved.log.lsl":"print","keyword.control.lsl":"do|else|for|if|jump|return|while","storage.type.lsl":"float|integer|key|list|quaternion|rotation|string|vector","support.function.lsl":"llAbs|llAcos|llAddToLandBanList|llAddToLandPassList|llAdjustSoundVolume|llAgentInExperience|llAllowInventoryDrop|llAngleBetween|llApplyImpulse|llApplyRotationalImpulse|llAsin|llAtan2|llAttachToAvatar|llAttachToAvatarTemp|llAvatarOnLinkSitTarget|llAvatarOnSitTarget|llAxes2Rot|llAxisAngle2Rot|llBase64ToInteger|llBase64ToString|llBreakAllLinks|llBreakLink|llCSV2List|llCastRay|llCeil|llClearCameraParams|llClearLinkMedia|llClearPrimMedia|llCloseRemoteDataChannel|llCollisionFilter|llCollisionSound|llCos|llCreateCharacter|llCreateKeyValue|llCreateLink|llDataSizeKeyValue|llDeleteCharacter|llDeleteKeyValue|llDeleteSubList|llDeleteSubString|llDetachFromAvatar|llDetectedGrab|llDetectedGroup|llDetectedKey|llDetectedLinkNumber|llDetectedName|llDetectedOwner|llDetectedPos|llDetectedRot|llDetectedTouchBinormal|llDetectedTouchFace|llDetectedTouchNormal|llDetectedTouchPos|llDetectedTouchST|llDetectedTouchUV|llDetectedType|llDetectedVel|llDialog|llDie|llDumpList2String|llEdgeOfWorld|llEjectFromLand|llEmail|llEscapeURL|llEuler2Rot|llEvade|llExecCharacterCmd|llFabs|llFleeFrom|llFloor|llForceMouselook|llFrand|llGenerateKey|llGetAccel|llGetAgentInfo|llGetAgentLanguage|llGetAgentList|llGetAgentSize|llGetAlpha|llGetAndResetTime|llGetAnimation|llGetAnimationList|llGetAnimationOverride|llGetAttached|llGetBoundingBox|llGetCameraPos|llGetCameraRot|llGetCenterOfMass|llGetClosestNavPoint|llGetColor|llGetCreator|llGetDate|llGetDisplayName|llGetEnergy|llGetEnv|llGetExperienceDetails|llGetExperienceErrorMessage|llGetForce|llGetFreeMemory|llGetFreeURLs|llGetGMTclock|llGetGeometricCenter|llGetHTTPHeader|llGetInventoryCreator|llGetInventoryKey|llGetInventoryName|llGetInventoryNumber|llGetInventoryPermMask|llGetInventoryType|llGetKey|llGetLandOwnerAt|llGetLinkKey|llGetLinkMedia|llGetLinkName|llGetLinkNumber|llGetLinkNumberOfSides|llGetLinkPrimitiveParams|llGetListEntryType|llGetListLength|llGetLocalPos|llGetLocalRot|llGetMass|llGetMassMKS|llGetMaxScaleFactor|llGetMemoryLimit|llGetMinScaleFactor|llGetNextEmail|llGetNotecardLine|llGetNumberOfNotecardLines|llGetNumberOfPrims|llGetNumberOfSides|llGetObjectDesc|llGetObjectDetails|llGetObjectMass|llGetObjectName|llGetObjectPermMask|llGetObjectPrimCount|llGetOmega|llGetOwner|llGetOwnerKey|llGetParcelDetails|llGetParcelFlags|llGetParcelMaxPrims|llGetParcelMusicURL|llGetParcelPrimCount|llGetParcelPrimOwners|llGetPermissions|llGetPermissionsKey|llGetPhysicsMaterial|llGetPos|llGetPrimMediaParams|llGetPrimitiveParams|llGetRegionAgentCount|llGetRegionCorner|llGetRegionFPS|llGetRegionFlags|llGetRegionName|llGetRegionTimeDilation|llGetRootPosition|llGetRootRotation|llGetRot|llGetSPMaxMemory|llGetScale|llGetScriptName|llGetScriptState|llGetSimStats|llGetSimulatorHostname|llGetStartParameter|llGetStaticPath|llGetStatus|llGetSubString|llGetSunDirection|llGetTexture|llGetTextureOffset|llGetTextureRot|llGetTextureScale|llGetTime|llGetTimeOfDay|llGetTimestamp|llGetTorque|llGetUnixTime|llGetUsedMemory|llGetUsername|llGetVel|llGetWallclock|llGiveInventory|llGiveInventoryList|llGiveMoney|llGround|llGroundContour|llGroundNormal|llGroundRepel|llGroundSlope|llHTTPRequest|llHTTPResponse|llInsertString|llInstantMessage|llIntegerToBase64|llJson2List|llJsonGetValue|llJsonSetValue|llJsonValueType|llKey2Name|llKeyCountKeyValue|llKeysKeyValue|llLinkParticleSystem|llLinkSitTarget|llList2CSV|llList2Float|llList2Integer|llList2Json|llList2Key|llList2List|llList2ListStrided|llList2Rot|llList2String|llList2Vector|llListFindList|llListInsertList|llListRandomize|llListReplaceList|llListSort|llListStatistics|llListen|llListenControl|llListenRemove|llLoadURL|llLog|llLog10|llLookAt|llLoopSound|llLoopSoundMaster|llLoopSoundSlave|llMD5String|llManageEstateAccess|llMapDestination|llMessageLinked|llMinEventDelay|llModPow|llModifyLand|llMoveToTarget|llNavigateTo|llOffsetTexture|llOpenRemoteDataChannel|llOverMyLand|llOwnerSay|llParcelMediaCommandList|llParcelMediaQuery|llParseString2List|llParseStringKeepNulls|llParticleSystem|llPassCollisions|llPassTouches|llPatrolPoints|llPlaySound|llPlaySoundSlave|llPow|llPreloadSound|llPursue|llPushObject|llReadKeyValue|llRegionSay|llRegionSayTo|llReleaseControls|llReleaseURL|llRemoteDataReply|llRemoteLoadScriptPin|llRemoveFromLandBanList|llRemoveFromLandPassList|llRemoveInventory|llRemoveVehicleFlags|llRequestAgentData|llRequestDisplayName|llRequestExperiencePermissions|llRequestInventoryData|llRequestPermissions|llRequestSecureURL|llRequestSimulatorData|llRequestURL|llRequestUsername|llResetAnimationOverride|llResetLandBanList|llResetLandPassList|llResetOtherScript|llResetScript|llResetTime|llReturnObjectsByID|llReturnObjectsByOwner|llRezAtRoot|llRezObject|llRot2Angle|llRot2Axis|llRot2Euler|llRot2Fwd|llRot2Left|llRot2Up|llRotBetween|llRotLookAt|llRotTarget|llRotTargetRemove|llRotateTexture|llRound|llSHA1String|llSameGroup|llSay|llScaleByFactor|llScaleTexture|llScriptDanger|llScriptProfiler|llSendRemoteData|llSensor|llSensorRemove|llSensorRepeat|llSetAlpha|llSetAngularVelocity|llSetAnimationOverride|llSetBuoyancy|llSetCameraAtOffset|llSetCameraEyeOffset|llSetCameraParams|llSetClickAction|llSetColor|llSetContentType|llSetDamage|llSetForce|llSetForceAndTorque|llSetHoverHeight|llSetKeyframedMotion|llSetLinkAlpha|llSetLinkCamera|llSetLinkColor|llSetLinkMedia|llSetLinkPrimitiveParams|llSetLinkPrimitiveParamsFast|llSetLinkTexture|llSetLinkTextureAnim|llSetLocalRot|llSetMemoryLimit|llSetObjectDesc|llSetObjectName|llSetParcelMusicURL|llSetPayPrice|llSetPhysicsMaterial|llSetPos|llSetPrimMediaParams|llSetPrimitiveParams|llSetRegionPos|llSetRemoteScriptAccessPin|llSetRot|llSetScale|llSetScriptState|llSetSitText|llSetSoundQueueing|llSetSoundRadius|llSetStatus|llSetText|llSetTexture|llSetTextureAnim|llSetTimerEvent|llSetTorque|llSetTouchText|llSetVehicleFlags|llSetVehicleFloatParam|llSetVehicleRotationParam|llSetVehicleType|llSetVehicleVectorParam|llSetVelocity|llShout|llSin|llSitTarget|llSleep|llSqrt|llStartAnimation|llStopAnimation|llStopHover|llStopLookAt|llStopMoveToTarget|llStopSound|llStringLength|llStringToBase64|llStringTrim|llSubStringIndex|llTakeControls|llTan|llTarget|llTargetOmega|llTargetRemove|llTeleportAgent|llTeleportAgentGlobalCoords|llTeleportAgentHome|llTextBox|llToLower|llToUpper|llTransferLindenDollars|llTriggerSound|llTriggerSoundLimited|llUnSit|llUnescapeURL|llUpdateCharacter|llUpdateKeyValue|llVecDist|llVecMag|llVecNorm|llVolumeDetect|llWanderWithin|llWater|llWhisper|llWind|llXorBase64","support.function.event.lsl":"at_rot_target|at_target|attach|changed|collision|collision_end|collision_start|control|dataserver|email|experience_permissions|experience_permissions_denied|http_request|http_response|land_collision|land_collision_end|land_collision_start|link_message|listen|money|moving_end|moving_start|no_sensor|not_at_rot_target|not_at_target|object_rez|on_rez|path_update|remote_data|run_time_permissions|sensor|state_entry|state_exit|timer|touch|touch_end|touch_start|transaction_result"},"identifier");this.$rules={start:[{token:"comment.line.double-slash.lsl",regex:"\\/\\/.*$"},{token:"comment.block.begin.lsl",regex:"\\/\\*",next:"comment"},{token:"string.quoted.double.lsl",start:'"',end:'"',next:[{token:"constant.character.escape.lsl",regex:/\\[tn"\\]/}]},{token:"constant.numeric.lsl",regex:"(0[xX][0-9a-fA-F]+|[+-]?[0-9]+(?:(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?)?)\\b"},{token:"entity.name.state.lsl",regex:"\\b((state)\\s+[A-Za-z_]\\w*|default)\\b"},{token:e,regex:"\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"support.function.user-defined.lsl",regex:/\b([a-zA-Z_]\w*)(?=\(.*?\))/},{token:"keyword.operator.lsl",regex:"\\+\\+|\\-\\-|<<|>>|&&?|\\|\\|?|\\^|~|[!%<>=*+\\-\\/]=?"},{token:"invalid.illegal.keyword.operator.lsl",regex:":=?"},{token:"punctuation.operator.lsl",regex:"\\,|\\;"},{token:"paren.lparen.lsl",regex:"[\\[\\(\\{]"},{token:"paren.rparen.lsl",regex:"[\\]\\)\\}]"},{token:"text.lsl",regex:"\\s+"}],comment:[{token:"comment.block.end.lsl",regex:"\\*\\/",next:"start"},{token:"comment.block.lsl",regex:".+"}]},this.normalizeRules()}var E=e("../lib/oop"),T=e("./text_highlight_rules").TextHighlightRules;E.inherits(l,T),_.LSLHighlightRules=l}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,_,t){"use strict";var l=e("../range").Range,E=function(){};(function(){this.checkOutdent=function(e,_){return!!/^\s+$/.test(e)&&/^\s*\}/.test(_)},this.autoOutdent=function(e,_){var t=e.getLine(_),E=t.match(/^(\s*\})/);if(!E)return 0;var T=E[1].length,A=e.findMatchingBracket({row:_,column:T});if(!A||A.row==_)return 0;var R=this.$getIndent(e.getLine(A.row));e.replace(new l(_,0,_,T-1),R)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(E.prototype),_.MatchingBraceOutdent=E}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,_,t){"use strict";var l,E=e("../../lib/oop"),T=e("../behaviour").Behaviour,A=e("../../token_iterator").TokenIterator,R=e("../../lib/lang"),n=["text","paren.rparen","punctuation.operator"],r=["text","paren.rparen","punctuation.operator","comment"],o={},S=function(e){var _=-1;return e.multiSelect&&(_=e.selection.index,o.rangeCount!=e.multiSelect.rangeCount&&(o={rangeCount:e.multiSelect.rangeCount})),o[_]?l=o[_]:void(l=o[_]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},i=function(){this.add("braces","insertion",function(e,_,t,E,T){var A=t.getCursorPosition(),n=E.doc.getLine(A.row);if("{"==T){S(t);var r=t.getSelectionRange(),o=E.doc.getTextRange(r);if(""!==o&&"{"!==o&&t.getWrapBehavioursEnabled())return{text:"{"+o+"}",selection:!1};if(i.isSaneInsertion(t,E))return/[\]\}\)]/.test(n[A.column])||t.inMultiSelectMode?(i.recordAutoInsert(t,E,"}"),{text:"{}",selection:[1,1]}):(i.recordMaybeInsert(t,E,"{"),{text:"{",selection:[1,1]})}else if("}"==T){S(t);var I=n.substring(A.column,A.column+1);if("}"==I){var L=E.$findOpeningBracket("}",{column:A.column+1,row:A.row});if(null!==L&&i.isAutoInsertedClosing(A,n,T))return i.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==T||"\r\n"==T){S(t);var C="";i.isMaybeInsertedClosing(A,n)&&(C=R.stringRepeat("}",l.maybeInsertedBrackets),i.clearMaybeInsertedClosing());var I=n.substring(A.column,A.column+1);if("}"===I){var a=E.findMatchingBracket({row:A.row,column:A.column+1},"}");if(!a)return null;var O=this.$getIndent(E.getLine(a.row))}else{if(!C)return void i.clearMaybeInsertedClosing();var O=this.$getIndent(n)}var P=O+E.getTabString();return{text:"\n"+P+"\n"+O+C,selection:[1,P.length,1,P.length]}}i.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,_,t,E,T){var A=E.doc.getTextRange(T);if(!T.isMultiLine()&&"{"==A){S(t);var R=E.doc.getLine(T.start.row),n=R.substring(T.end.column,T.end.column+1);if("}"==n)return T.end.column++,T;l.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,_,t,l,E){if("("==E){S(t);var T=t.getSelectionRange(),A=l.doc.getTextRange(T);if(""!==A&&t.getWrapBehavioursEnabled())return{text:"("+A+")",selection:!1};if(i.isSaneInsertion(t,l))return i.recordAutoInsert(t,l,")"),{text:"()",selection:[1,1]}}else if(")"==E){S(t);var R=t.getCursorPosition(),n=l.doc.getLine(R.row),r=n.substring(R.column,R.column+1);if(")"==r){var o=l.$findOpeningBracket(")",{column:R.column+1,row:R.row});if(null!==o&&i.isAutoInsertedClosing(R,n,E))return i.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,_,t,l,E){var T=l.doc.getTextRange(E);if(!E.isMultiLine()&&"("==T){S(t);var A=l.doc.getLine(E.start.row),R=A.substring(E.start.column+1,E.start.column+2);if(")"==R)return E.end.column++,E}}),this.add("brackets","insertion",function(e,_,t,l,E){if("["==E){S(t);var T=t.getSelectionRange(),A=l.doc.getTextRange(T);if(""!==A&&t.getWrapBehavioursEnabled())return{text:"["+A+"]",selection:!1};if(i.isSaneInsertion(t,l))return i.recordAutoInsert(t,l,"]"),{text:"[]",selection:[1,1]}}else if("]"==E){S(t);var R=t.getCursorPosition(),n=l.doc.getLine(R.row),r=n.substring(R.column,R.column+1);if("]"==r){var o=l.$findOpeningBracket("]",{column:R.column+1,row:R.row});if(null!==o&&i.isAutoInsertedClosing(R,n,E))return i.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,_,t,l,E){var T=l.doc.getTextRange(E);if(!E.isMultiLine()&&"["==T){S(t);var A=l.doc.getLine(E.start.row),R=A.substring(E.start.column+1,E.start.column+2);if("]"==R)return E.end.column++,E}}),this.add("string_dquotes","insertion",function(e,_,t,l,E){if('"'==E||"'"==E){S(t);var T=E,A=t.getSelectionRange(),R=l.doc.getTextRange(A);if(""!==R&&"'"!==R&&'"'!=R&&t.getWrapBehavioursEnabled())return{text:T+R+T,selection:!1};var n=t.getCursorPosition(),r=l.doc.getLine(n.row),o=r.substring(n.column-1,n.column),i=r.substring(n.column,n.column+1),I=l.getTokenAt(n.row,n.column),L=l.getTokenAt(n.row,n.column+1);if("\\"==o&&I&&/escape/.test(I.type))return null;var C,a=I&&/string/.test(I.type),O=!L||/string/.test(L.type);if(i==T)C=a!==O;else{if(a&&!O)return null;if(a&&O)return null;var P=l.$mode.tokenRe;P.lastIndex=0;var s=P.test(o);P.lastIndex=0;var N=P.test(o);if(s||N)return null;if(i&&!/[\s;,.})\]\\]/.test(i))return null;C=!0}return{text:C?T+T:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,_,t,l,E){var T=l.doc.getTextRange(E);if(!E.isMultiLine()&&('"'==T||"'"==T)){S(t);var A=l.doc.getLine(E.start.row),R=A.substring(E.start.column+1,E.start.column+2);if(R==T)return E.end.column++,E}})};i.isSaneInsertion=function(e,_){var t=e.getCursorPosition(),l=new A(_,t.row,t.column);if(!this.$matchTokenType(l.getCurrentToken()||"text",n)){var E=new A(_,t.row,t.column+1);if(!this.$matchTokenType(E.getCurrentToken()||"text",n))return!1}return l.stepForward(),l.getCurrentTokenRow()!==t.row||this.$matchTokenType(l.getCurrentToken()||"text",r)},i.$matchTokenType=function(e,_){return _.indexOf(e.type||e)>-1},i.recordAutoInsert=function(e,_,t){var E=e.getCursorPosition(),T=_.doc.getLine(E.row);this.isAutoInsertedClosing(E,T,l.autoInsertedLineEnd[0])||(l.autoInsertedBrackets=0),l.autoInsertedRow=E.row,l.autoInsertedLineEnd=t+T.substr(E.column),l.autoInsertedBrackets++},i.recordMaybeInsert=function(e,_,t){var E=e.getCursorPosition(),T=_.doc.getLine(E.row);this.isMaybeInsertedClosing(E,T)||(l.maybeInsertedBrackets=0),l.maybeInsertedRow=E.row,l.maybeInsertedLineStart=T.substr(0,E.column)+t,l.maybeInsertedLineEnd=T.substr(E.column),l.maybeInsertedBrackets++},i.isAutoInsertedClosing=function(e,_,t){return l.autoInsertedBrackets>0&&e.row===l.autoInsertedRow&&t===l.autoInsertedLineEnd[0]&&_.substr(e.column)===l.autoInsertedLineEnd},i.isMaybeInsertedClosing=function(e,_){return l.maybeInsertedBrackets>0&&e.row===l.maybeInsertedRow&&_.substr(e.column)===l.maybeInsertedLineEnd&&_.substr(0,e.column)==l.maybeInsertedLineStart},i.popAutoInsertedClosing=function(){l.autoInsertedLineEnd=l.autoInsertedLineEnd.substr(1),l.autoInsertedBrackets--},i.clearMaybeInsertedClosing=function(){l&&(l.maybeInsertedBrackets=0,l.maybeInsertedRow=-1)},E.inherits(i,T),_.CstyleBehaviour=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,_,t){"use strict";var l=e("../../lib/oop"),E=e("../../range").Range,T=e("./fold_mode").FoldMode,A=_.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};l.inherits(A,T),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,_,t){var l=e.getLine(t);if(this.singleLineBlockCommentRe.test(l)&&!this.startRegionRe.test(l)&&!this.tripleStarBlockCommentRe.test(l))return"";var E=this._getFoldWidgetBase(e,_,t);return!E&&this.startRegionRe.test(l)?"start":E},this.getFoldWidgetRange=function(e,_,t,l){var E=e.getLine(t);if(this.startRegionRe.test(E))return this.getCommentRegionBlock(e,E,t);var T=E.match(this.foldingStartMarker);if(T){var A=T.index;if(T[1])return this.openingBracketBlock(e,T[1],t,A);var R=e.getCommentFoldRange(t,A+T[0].length,1);return R&&!R.isMultiLine()&&(l?R=this.getSectionRange(e,t):"all"!=_&&(R=null)),R}if("markbegin"!==_){var T=E.match(this.foldingStopMarker);if(T){var A=T.index+T[0].length;return T[1]?this.closingBracketBlock(e,T[1],t,A):e.getCommentFoldRange(t,A,-1)}}},this.getSectionRange=function(e,_){var t=e.getLine(_),l=t.search(/\S/),T=_,A=t.length;_+=1;for(var R=_,n=e.getLength();++_r)break;var o=this.getFoldWidgetRange(e,"all",_);if(o){if(o.start.row<=T)break;if(o.isMultiLine())_=o.end.row;else if(l==r)break}R=_}}return new E(T,A,R,e.getLine(R).length)},this.getCommentRegionBlock=function(e,_,t){for(var l=_.search(/\s*$/),T=e.getLength(),A=t,R=/^\s*(?:\/\*|\/\/)#(end)?region\b/,n=1;++tA)return new E(A,l,o,_.length)}}.call(A.prototype)}),define("ace/mode/lsl",["require","exports","module","ace/mode/lsl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/text","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/lib/oop"],function(e,_,t){"use strict";var l=e("./lsl_highlight_rules").LSLHighlightRules,E=e("./matching_brace_outdent").MatchingBraceOutdent,T=(e("../range").Range, +e("./text").Mode),A=e("./behaviour/cstyle").CstyleBehaviour,R=e("./folding/cstyle").FoldMode,n=e("../lib/oop"),r=function(){this.HighlightRules=l,this.$outdent=new E,this.$behaviour=new A,this.foldingRules=new R};n.inherits(r,T),function(){this.lineCommentStart=["//"],this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,_,t){var l=this.$getIndent(_),E=this.getTokenizer().getLineTokens(_,e),T=E.tokens;if(E.state,T.length&&"comment.block.lsl"===T[T.length-1].type)return l;if("start"===e){var A=_.match(/^.*[\{\(\[]\s*$/);A&&(l+=t)}return l},this.checkOutdent=function(e,_,t){return this.$outdent.checkOutdent(_,t)},this.autoOutdent=function(e,_,t){this.$outdent.autoOutdent(_,t)},this.$id="ace/mode/lsl"}.call(r.prototype),_.Mode=r}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-lua.js b/www/js/vendor/ace/mode-lua.js index 1f0e5b101..41993cf40 100755 --- a/www/js/vendor/ace/mode-lua.js +++ b/www/js/vendor/ace/mode-lua.js @@ -1,426 +1 @@ -define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var LuaHighlightRules = function() { - - var keywords = ( - "break|do|else|elseif|end|for|function|if|in|local|repeat|"+ - "return|then|until|while|or|and|not" - ); - - var builtinConstants = ("true|false|nil|_G|_VERSION"); - - var functions = ( - "string|xpcall|package|tostring|print|os|unpack|require|"+ - "getfenv|setmetatable|next|assert|tonumber|io|rawequal|"+ - "collectgarbage|getmetatable|module|rawset|math|debug|"+ - "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|"+ - "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|"+ - "load|error|loadfile|"+ - - "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|"+ - "reverse|byte|format|gsub|lower|preload|loadlib|loaded|"+ - "loaders|cpath|config|path|seeall|exit|setlocale|date|"+ - "getenv|difftime|remove|time|clock|tmpname|rename|execute|"+ - "lines|write|close|flush|open|output|type|read|stderr|"+ - "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|"+ - "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|"+ - "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|"+ - "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|"+ - "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|"+ - "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|"+ - "foreachi|maxn|foreach|concat|sort|remove|resume|yield|"+ - "status|wrap|create|running|"+ - "__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|"+ - "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber" - ); - - var stdLibaries = ("string|package|os|io|math|debug|table|coroutine"); - - var futureReserved = ""; - - var deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn"); - - var keywordMapper = this.createKeywordMapper({ - "keyword": keywords, - "support.function": functions, - "invalid.deprecated": deprecatedIn5152, - "constant.library": stdLibaries, - "constant.language": builtinConstants, - "invalid.illegal": futureReserved, - "variable.language": "self" - }, "identifier"); - - var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; - var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; - var integer = "(?:" + decimalInteger + "|" + hexInteger + ")"; - - var fraction = "(?:\\.\\d+)"; - var intPart = "(?:\\d+)"; - var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; - var floatNumber = "(?:" + pointFloat + ")"; - - this.$rules = { - "start" : [{ - stateName: "bracketedComment", - onMatch : function(value, currentState, stack){ - stack.unshift(this.next, value.length - 2, currentState); - return "comment"; - }, - regex : /\-\-\[=*\[/, - next : [ - { - onMatch : function(value, currentState, stack) { - if (value.length == stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack.shift(); - } else { - this.next = ""; - } - return "comment"; - }, - regex : /\]=*\]/, - next : "start" - }, { - defaultToken : "comment" - } - ] - }, - - { - token : "comment", - regex : "\\-\\-.*$" - }, - { - stateName: "bracketedString", - onMatch : function(value, currentState, stack){ - stack.unshift(this.next, value.length, currentState); - return "comment"; - }, - regex : /\[=*\[/, - next : [ - { - onMatch : function(value, currentState, stack) { - if (value.length == stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack.shift(); - } else { - this.next = ""; - } - return "comment"; - }, - - regex : /\]=*\]/, - next : "start" - }, { - defaultToken : "comment" - } - ] - }, - { - token : "string", // " string - regex : '"(?:[^\\\\]|\\\\.)*?"' - }, { - token : "string", // ' string - regex : "'(?:[^\\\\]|\\\\.)*?'" - }, { - token : "constant.numeric", // float - regex : floatNumber - }, { - token : "constant.numeric", // integer - regex : integer + "\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\." - }, { - token : "paren.lparen", - regex : "[\\[\\(\\{]" - }, { - token : "paren.rparen", - regex : "[\\]\\)\\}]" - }, { - token : "text", - regex : "\\s+|\\w+" - } ] - }; - - this.normalizeRules(); -} - -oop.inherits(LuaHighlightRules, TextHighlightRules); - -exports.LuaHighlightRules = LuaHighlightRules; -}); - -define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; -var TokenIterator = require("../../token_iterator").TokenIterator; - - -var FoldMode = exports.FoldMode = function() {}; - -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/; - this.foldingStopMarker = /\bend\b|^\s*}|\]=*\]/; - - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var isStart = this.foldingStartMarker.test(line); - var isEnd = this.foldingStopMarker.test(line); - - if (isStart && !isEnd) { - var match = line.match(this.foldingStartMarker); - if (match[1] == "then" && /\belseif\b/.test(line)) - return; - if (match[1]) { - if (session.getTokenAt(row, match.index + 1).type === "keyword") - return "start"; - } else if (match[2]) { - var type = session.bgTokenizer.getState(row) || ""; - if (type[0] == "bracketedComment" || type[0] == "bracketedString") - return "start"; - } else { - return "start"; - } - } - if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd) - return ""; - - var match = line.match(this.foldingStopMarker); - if (match[0] === "end") { - if (session.getTokenAt(row, match.index + 1).type === "keyword") - return "end"; - } else if (match[0][0] === "]") { - var type = session.bgTokenizer.getState(row - 1) || ""; - if (type[0] == "bracketedComment" || type[0] == "bracketedString") - return "end"; - } else - return "end"; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var line = session.doc.getLine(row); - var match = this.foldingStartMarker.exec(line); - if (match) { - if (match[1]) - return this.luaBlock(session, row, match.index + 1); - - if (match[2]) - return session.getCommentFoldRange(row, match.index + 1); - - return this.openingBracketBlock(session, "{", row, match.index); - } - - var match = this.foldingStopMarker.exec(line); - if (match) { - if (match[0] === "end") { - if (session.getTokenAt(row, match.index + 1).type === "keyword") - return this.luaBlock(session, row, match.index + 1); - } - - if (match[0][0] === "]") - return session.getCommentFoldRange(row, match.index + 1); - - return this.closingBracketBlock(session, "}", row, match.index + match[0].length); - } - }; - - this.luaBlock = function(session, row, column) { - var stream = new TokenIterator(session, row, column); - var indentKeywords = { - "function": 1, - "do": 1, - "then": 1, - "elseif": -1, - "end": -1, - "repeat": 1, - "until": -1 - }; - - var token = stream.getCurrentToken(); - if (!token || token.type != "keyword") - return; - - var val = token.value; - var stack = [val]; - var dir = indentKeywords[val]; - - if (!dir) - return; - - var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length; - var startRow = row; - - stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; - while(token = stream.step()) { - if (token.type !== "keyword") - continue; - var level = dir * indentKeywords[token.value]; - - if (level > 0) { - stack.unshift(token.value); - } else if (level <= 0) { - stack.shift(); - if (!stack.length && token.value != "elseif") - break; - if (level === 0) - stack.unshift(token.value); - } - } - - var row = stream.getCurrentTokenRow(); - if (dir === -1) - return new Range(row, session.getLine(row).length, startRow, startColumn); - else - return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn()); - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules; -var LuaFoldMode = require("./folding/lua").FoldMode; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; - -var Mode = function() { - this.HighlightRules = LuaHighlightRules; - - this.foldingRules = new LuaFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "--"; - this.blockComment = {start: "--[", end: "]--"}; - - var indentKeywords = { - "function": 1, - "then": 1, - "do": 1, - "else": 1, - "elseif": 1, - "repeat": 1, - "end": -1, - "until": -1 - }; - var outdentKeywords = [ - "else", - "elseif", - "end", - "until" - ]; - - function getNetIndentLevel(tokens) { - var level = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (token.type == "keyword") { - if (token.value in indentKeywords) { - level += indentKeywords[token.value]; - } - } else if (token.type == "paren.lparen") { - level ++; - } else if (token.type == "paren.rparen") { - level --; - } - } - if (level < 0) { - return -1; - } else if (level > 0) { - return 1; - } else { - return 0; - } - } - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var level = 0; - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - - if (state == "start") { - level = getNetIndentLevel(tokens); - } - if (level > 0) { - return indent + tab; - } else if (level < 0 && indent.substr(indent.length - tab.length) == tab) { - if (!this.checkOutdent(state, line, "\n")) { - return indent.substr(0, indent.length - tab.length); - } - } - return indent; - }; - - this.checkOutdent = function(state, line, input) { - if (input != "\n" && input != "\r" && input != "\r\n") - return false; - - if (line.match(/^\s*[\)\}\]]$/)) - return true; - - var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; - - if (!tokens || !tokens.length) - return false; - - return (tokens[0].type == "keyword" && outdentKeywords.indexOf(tokens[0].value) != -1); - }; - - this.autoOutdent = function(state, session, row) { - var prevLine = session.getLine(row - 1); - var prevIndent = this.$getIndent(prevLine).length; - var prevTokens = this.getTokenizer().getLineTokens(prevLine, "start").tokens; - var tabLength = session.getTabString().length; - var expectedIndent = prevIndent + tabLength * getNetIndentLevel(prevTokens); - var curIndent = this.$getIndent(session.getLine(row)).length; - if (curIndent < expectedIndent) { - return; - } - session.outdentRows(new Range(row, 0, row + 2, 0)); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/lua_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("error", function(e) { - session.setAnnotations([e.data]); - }); - - worker.on("ok", function(e) { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/lua"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){var e="break|do|else|elseif|end|for|function|if|in|local|repeat|return|then|until|while|or|and|not",t="true|false|nil|_G|_VERSION",n="string|xpcall|package|tostring|print|os|unpack|require|getfenv|setmetatable|next|assert|tonumber|io|rawequal|collectgarbage|getmetatable|module|rawset|math|debug|pcall|table|newproxy|type|coroutine|_G|select|gcinfo|pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|load|error|loadfile|sub|upper|len|gfind|rep|find|match|char|dump|gmatch|reverse|byte|format|gsub|lower|preload|loadlib|loaded|loaders|cpath|config|path|seeall|exit|setlocale|date|getenv|difftime|remove|time|clock|tmpname|rename|execute|lines|write|close|flush|open|output|type|read|stderr|stdin|input|stdout|popen|tmpfile|log|max|acos|huge|ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|gethook|setmetatable|setlocal|traceback|setfenv|getinfo|setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|foreachi|maxn|foreach|concat|sort|remove|resume|yield|status|wrap|create|running|__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber",r="string|package|os|io|math|debug|table|coroutine",o="",i="setn|foreach|foreachi|gcinfo|log10|maxn",a=this.createKeywordMapper({keyword:e,"support.function":n,"invalid.deprecated":i,"constant.library":r,"constant.language":t,"invalid.illegal":o,"variable.language":"self"},"identifier"),l="(?:(?:[1-9]\\d*)|(?:0))",s="(?:0[xX][\\dA-Fa-f]+)",g="(?:"+l+"|"+s+")",u="(?:\\.\\d+)",d="(?:\\d+)",c="(?:(?:"+d+"?"+u+")|(?:"+d+"\\.))",h="(?:"+c+")";this.$rules={start:[{stateName:"bracketedComment",onMatch:function(e,t,n){return n.unshift(this.next,e.length-2,t),"comment"},regex:/\-\-\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","comment"},regex:/\]=*\]/,next:"start"},{defaultToken:"comment"}]},{token:"comment",regex:"\\-\\-.*$"},{stateName:"bracketedString",onMatch:function(e,t,n){return n.unshift(this.next,e.length,t),"comment"},regex:/\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","comment"},regex:/\]=*\]/,next:"start"},{defaultToken:"comment"}]},{token:"string",regex:'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:h},{token:"constant.numeric",regex:g+"\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+|\\w+"}]},this.normalizeRules()};r.inherits(i,o),t.LuaHighlightRules=i}),define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("./fold_mode").FoldMode,i=e("../../range").Range,a=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(){};r.inherits(l,o),function(){this.foldingStartMarker=/\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/,this.foldingStopMarker=/\bend\b|^\s*}|\]=*\]/,this.getFoldWidget=function(e,t,n){var r=e.getLine(n),o=this.foldingStartMarker.test(r),i=this.foldingStopMarker.test(r);if(o&&!i){var a=r.match(this.foldingStartMarker);if("then"==a[1]&&/\belseif\b/.test(r))return;if(a[1]){if("keyword"===e.getTokenAt(n,a.index+1).type)return"start"}else{if(!a[2])return"start";var l=e.bgTokenizer.getState(n)||"";if("bracketedComment"==l[0]||"bracketedString"==l[0])return"start"}}if("markbeginend"!=t||!i||o&&i)return"";var a=r.match(this.foldingStopMarker);if("end"===a[0]){if("keyword"===e.getTokenAt(n,a.index+1).type)return"end"}else{if("]"!==a[0][0])return"end";var l=e.bgTokenizer.getState(n-1)||"";if("bracketedComment"==l[0]||"bracketedString"==l[0])return"end"}},this.getFoldWidgetRange=function(e,t,n){var r=e.doc.getLine(n),o=this.foldingStartMarker.exec(r);if(o)return o[1]?this.luaBlock(e,n,o.index+1):o[2]?e.getCommentFoldRange(n,o.index+1):this.openingBracketBlock(e,"{",n,o.index);var o=this.foldingStopMarker.exec(r);return o?"end"===o[0]&&"keyword"===e.getTokenAt(n,o.index+1).type?this.luaBlock(e,n,o.index+1):"]"===o[0][0]?e.getCommentFoldRange(n,o.index+1):this.closingBracketBlock(e,"}",n,o.index+o[0].length):void 0},this.luaBlock=function(e,t,n){var r=new a(e,t,n),o={function:1,do:1,then:1,elseif:-1,end:-1,repeat:1,until:-1},l=r.getCurrentToken();if(l&&"keyword"==l.type){var s=l.value,g=[s],u=o[s];if(u){var d=u===-1?r.getCurrentTokenColumn():e.getLine(t).length,c=t;for(r.step=u===-1?r.stepBackward:r.stepForward;l=r.step();)if("keyword"===l.type){var h=u*o[l.value];if(h>0)g.unshift(l.value);else if(h<=0){if(g.shift(),!g.length&&"elseif"!=l.value)break;0===h&&g.unshift(l.value)}}var t=r.getCurrentTokenRow();return u===-1?new i(t,e.getLine(t).length,c,d):new i(c,d,t,r.getCurrentTokenColumn())}}}}.call(l.prototype)}),define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./lua_highlight_rules").LuaHighlightRules,a=e("./folding/lua").FoldMode,l=e("../range").Range,s=e("../worker/worker_client").WorkerClient,g=function(){this.HighlightRules=i,this.foldingRules=new a};r.inherits(g,o),function(){function e(e){for(var n=0,r=0;r0?1:0}this.lineCommentStart="--",this.blockComment={start:"--[",end:"]--"};var t={function:1,then:1,do:1,else:1,elseif:1,repeat:1,end:-1,until:-1},n=["else","elseif","end","until"];this.getNextLineIndent=function(t,n,r){var o=this.$getIndent(n),i=0,a=this.getTokenizer().getLineTokens(n,t),l=a.tokens;return"start"==t&&(i=e(l)),i>0?o+r:i<0&&o.substr(o.length-r.length)==r&&!this.checkOutdent(t,n,"\n")?o.substr(0,o.length-r.length):o},this.checkOutdent=function(e,t,r){if("\n"!=r&&"\r"!=r&&"\r\n"!=r)return!1;if(t.match(/^\s*[\)\}\]]$/))return!0;var o=this.getTokenizer().getLineTokens(t.trim(),e).tokens;return!(!o||!o.length)&&"keyword"==o[0].type&&n.indexOf(o[0].value)!=-1},this.autoOutdent=function(t,n,r){var o=n.getLine(r-1),i=this.$getIndent(o).length,a=this.getTokenizer().getLineTokens(o,"start").tokens,s=n.getTabString().length,g=i+s*e(a),u=this.$getIndent(n.getLine(r)).length;u=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = CssHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.foldingRules = "cStyle"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("csslint", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/css"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === " -1; -} - -(function() { - - this.getFoldWidget = function(session, foldStyle, row) { - var tag = this._getFirstTagInLine(session, row); - - if (!tag) - return ""; - - if (tag.closing || (!tag.tagName && tag.selfClosing)) - return foldStyle == "markbeginend" ? "end" : ""; - - if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) - return ""; - - if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) - return ""; - - return "start"; - }; - this._getFirstTagInLine = function(session, row) { - var tokens = session.getTokens(row); - var tag = new Tag(); - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (is(token, "tag-open")) { - tag.end.column = tag.start.column + token.value.length; - tag.closing = is(token, "end-tag-open"); - token = tokens[++i]; - if (!token) - return null; - tag.tagName = token.value; - tag.end.column += token.value.length; - for (i++; i < tokens.length; i++) { - token = tokens[i]; - tag.end.column += token.value.length; - if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - break; - } - } - return tag; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - return tag; - } - tag.start.column += token.value.length; - } - - return null; - }; - - this._findEndTagInLine = function(session, row, tagName, startColumn) { - var tokens = session.getTokens(row); - var column = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - column += token.value.length; - if (column < startColumn) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var firstTag = this._getFirstTagInLine(session, row); - - if (!firstTag) - return null; - - var isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var MixedFoldMode = require("./mixed").FoldMode; -var XmlFoldMode = require("./xml").FoldMode; -var CStyleFoldMode = require("./cstyle").FoldMode; - -var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { - MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { - "js-": new CStyleFoldMode(), - "css-": new CStyleFoldMode() - }); -}; - -oop.inherits(FoldMode, MixedFoldMode); - -}); - -define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var TokenIterator = require("../token_iterator").TokenIterator; - -var commonAttributes = [ - "accesskey", - "class", - "contenteditable", - "contextmenu", - "dir", - "draggable", - "dropzone", - "hidden", - "id", - "inert", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "lang", - "spellcheck", - "style", - "tabindex", - "title", - "translate" -]; - -var eventAttributes = [ - "onabort", - "onblur", - "oncancel", - "oncanplay", - "oncanplaythrough", - "onchange", - "onclick", - "onclose", - "oncontextmenu", - "oncuechange", - "ondblclick", - "ondrag", - "ondragend", - "ondragenter", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onended", - "onerror", - "onfocus", - "oninput", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeyup", - "onload", - "onloadeddata", - "onloadedmetadata", - "onloadstart", - "onmousedown", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onpause", - "onplay", - "onplaying", - "onprogress", - "onratechange", - "onreset", - "onscroll", - "onseeked", - "onseeking", - "onselect", - "onshow", - "onstalled", - "onsubmit", - "onsuspend", - "ontimeupdate", - "onvolumechange", - "onwaiting" -]; - -var globalAttributes = commonAttributes.concat(eventAttributes); - -var attributeMap = { - "html": ["manifest"], - "head": [], - "title": [], - "base": ["href", "target"], - "link": ["href", "hreflang", "rel", "media", "type", "sizes"], - "meta": ["http-equiv", "name", "content", "charset"], - "style": ["type", "media", "scoped"], - "script": ["charset", "type", "src", "defer", "async"], - "noscript": ["href"], - "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], - "section": [], - "nav": [], - "article": ["pubdate"], - "aside": [], - "h1": [], - "h2": [], - "h3": [], - "h4": [], - "h5": [], - "h6": [], - "header": [], - "footer": [], - "address": [], - "main": [], - "p": [], - "hr": [], - "pre": [], - "blockquote": ["cite"], - "ol": ["start", "reversed"], - "ul": [], - "li": ["value"], - "dl": [], - "dt": [], - "dd": [], - "figure": [], - "figcaption": [], - "div": [], - "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], - "em": [], - "strong": [], - "small": [], - "s": [], - "cite": [], - "q": ["cite"], - "dfn": [], - "abbr": [], - "data": [], - "time": ["datetime"], - "code": [], - "var": [], - "samp": [], - "kbd": [], - "sub": [], - "sup": [], - "i": [], - "b": [], - "u": [], - "mark": [], - "ruby": [], - "rt": [], - "rp": [], - "bdi": [], - "bdo": [], - "span": [], - "br": [], - "wbr": [], - "ins": ["cite", "datetime"], - "del": ["cite", "datetime"], - "img": ["alt", "src", "height", "width", "usemap", "ismap"], - "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], - "embed": ["src", "height", "width", "type"], - "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], - "param": ["name", "value"], - "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], - "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], - "source": ["src", "type", "media"], - "track": ["kind", "src", "srclang", "label", "default"], - "canvas": ["width", "height"], - "map": ["name"], - "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], - "svg": [], - "math": [], - "table": ["summary"], - "caption": [], - "colgroup": ["span"], - "col": ["span"], - "tbody": [], - "thead": [], - "tfoot": [], - "tr": [], - "td": ["headers", "rowspan", "colspan"], - "th": ["headers", "rowspan", "colspan", "scope"], - "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], - "fieldset": ["disabled", "form", "name"], - "legend": [], - "label": ["form", "for"], - "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], - "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], - "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], - "datalist": [], - "optgroup": ["disabled", "label"], - "option": ["disabled", "selected", "label", "value"], - "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], - "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], - "output": ["for", "form", "name"], - "progress": ["value", "max"], - "meter": ["value", "min", "max", "low", "high", "optimum"], - "details": ["open"], - "summary": [], - "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], - "menu": ["type", "label"], - "dialog": ["open"] -}; - -var elements = Object.keys(attributeMap); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -function findTagName(session, pos) { - var iterator = new TokenIterator(session, pos.row, pos.column); - var token = iterator.getCurrentToken(); - while (token && !is(token, "tag-name")){ - token = iterator.stepBackward(); - } - if (token) - return token.value; -} - -var HtmlCompletions = function() { - -}; - -(function() { - - this.getCompletions = function(state, session, pos, prefix) { - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) - return this.getTagCompletions(state, session, pos, prefix); - if (is(token, "tag-whitespace") || is(token, "attribute-name")) - return this.getAttributeCompetions(state, session, pos, prefix); - - return []; - }; - - this.getTagCompletions = function(state, session, pos, prefix) { - return elements.map(function(element){ - return { - value: element, - meta: "tag", - score: Number.MAX_VALUE - }; - }); - }; - - this.getAttributeCompetions = function(state, session, pos, prefix) { - var tagName = findTagName(session, pos); - if (!tagName) - return []; - var attributes = globalAttributes; - if (tagName in attributeMap) { - attributes = attributes.concat(attributeMap[tagName]); - } - return attributes.map(function(attribute){ - return { - caption: attribute, - snippet: attribute + '="$0"', - meta: "attribute", - score: Number.MAX_VALUE - }; - }); - }; - -}).call(HtmlCompletions.prototype); - -exports.HtmlCompletions = HtmlCompletions; -}); - -define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var CssMode = require("./css").Mode; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; -var HtmlFoldMode = require("./folding/html").FoldMode; -var HtmlCompletions = require("./html_completions").HtmlCompletions; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; -var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; - -var Mode = function(options) { - this.fragmentContext = options && options.fragmentContext; - this.HighlightRules = HtmlHighlightRules; - this.$behaviour = new XmlBehaviour(); - this.$completer = new HtmlCompletions(); - - this.createModeDelegates({ - "js-": JavaScriptMode, - "css-": CssMode - }); - - this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.blockComment = {start: ""}; - - this.voidElements = lang.arrayToMap(voidElements); - - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - this.checkOutdent = function(state, line, input) { - return false; - }; - - this.getCompletions = function(state, session, pos, prefix) { - return this.$completer.getCompletions(state, session, pos, prefix); - }; - - this.createWorker = function(session) { - if (this.constructor != Mode) - return; - var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - if (this.fragmentContext) - worker.call("setOptions", [{context: this.fragmentContext}]); - - worker.on("error", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/html"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var LuaHighlightRules = function() { - - var keywords = ( - "break|do|else|elseif|end|for|function|if|in|local|repeat|"+ - "return|then|until|while|or|and|not" - ); - - var builtinConstants = ("true|false|nil|_G|_VERSION"); - - var functions = ( - "string|xpcall|package|tostring|print|os|unpack|require|"+ - "getfenv|setmetatable|next|assert|tonumber|io|rawequal|"+ - "collectgarbage|getmetatable|module|rawset|math|debug|"+ - "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|"+ - "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|"+ - "load|error|loadfile|"+ - - "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|"+ - "reverse|byte|format|gsub|lower|preload|loadlib|loaded|"+ - "loaders|cpath|config|path|seeall|exit|setlocale|date|"+ - "getenv|difftime|remove|time|clock|tmpname|rename|execute|"+ - "lines|write|close|flush|open|output|type|read|stderr|"+ - "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|"+ - "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|"+ - "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|"+ - "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|"+ - "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|"+ - "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|"+ - "foreachi|maxn|foreach|concat|sort|remove|resume|yield|"+ - "status|wrap|create|running|"+ - "__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|"+ - "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber" - ); - - var stdLibaries = ("string|package|os|io|math|debug|table|coroutine"); - - var futureReserved = ""; - - var deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn"); - - var keywordMapper = this.createKeywordMapper({ - "keyword": keywords, - "support.function": functions, - "invalid.deprecated": deprecatedIn5152, - "constant.library": stdLibaries, - "constant.language": builtinConstants, - "invalid.illegal": futureReserved, - "variable.language": "self" - }, "identifier"); - - var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; - var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; - var integer = "(?:" + decimalInteger + "|" + hexInteger + ")"; - - var fraction = "(?:\\.\\d+)"; - var intPart = "(?:\\d+)"; - var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; - var floatNumber = "(?:" + pointFloat + ")"; - - this.$rules = { - "start" : [{ - stateName: "bracketedComment", - onMatch : function(value, currentState, stack){ - stack.unshift(this.next, value.length - 2, currentState); - return "comment"; - }, - regex : /\-\-\[=*\[/, - next : [ - { - onMatch : function(value, currentState, stack) { - if (value.length == stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack.shift(); - } else { - this.next = ""; - } - return "comment"; - }, - regex : /\]=*\]/, - next : "start" - }, { - defaultToken : "comment" - } - ] - }, - - { - token : "comment", - regex : "\\-\\-.*$" - }, - { - stateName: "bracketedString", - onMatch : function(value, currentState, stack){ - stack.unshift(this.next, value.length, currentState); - return "comment"; - }, - regex : /\[=*\[/, - next : [ - { - onMatch : function(value, currentState, stack) { - if (value.length == stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack.shift(); - } else { - this.next = ""; - } - return "comment"; - }, - - regex : /\]=*\]/, - next : "start" - }, { - defaultToken : "comment" - } - ] - }, - { - token : "string", // " string - regex : '"(?:[^\\\\]|\\\\.)*?"' - }, { - token : "string", // ' string - regex : "'(?:[^\\\\]|\\\\.)*?'" - }, { - token : "constant.numeric", // float - regex : floatNumber - }, { - token : "constant.numeric", // integer - regex : integer + "\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\." - }, { - token : "paren.lparen", - regex : "[\\[\\(\\{]" - }, { - token : "paren.rparen", - regex : "[\\]\\)\\}]" - }, { - token : "text", - regex : "\\s+|\\w+" - } ] - }; - - this.normalizeRules(); -} - -oop.inherits(LuaHighlightRules, TextHighlightRules); - -exports.LuaHighlightRules = LuaHighlightRules; -}); - -define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; -var TokenIterator = require("../../token_iterator").TokenIterator; - - -var FoldMode = exports.FoldMode = function() {}; - -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/; - this.foldingStopMarker = /\bend\b|^\s*}|\]=*\]/; - - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var isStart = this.foldingStartMarker.test(line); - var isEnd = this.foldingStopMarker.test(line); - - if (isStart && !isEnd) { - var match = line.match(this.foldingStartMarker); - if (match[1] == "then" && /\belseif\b/.test(line)) - return; - if (match[1]) { - if (session.getTokenAt(row, match.index + 1).type === "keyword") - return "start"; - } else if (match[2]) { - var type = session.bgTokenizer.getState(row) || ""; - if (type[0] == "bracketedComment" || type[0] == "bracketedString") - return "start"; - } else { - return "start"; - } - } - if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd) - return ""; - - var match = line.match(this.foldingStopMarker); - if (match[0] === "end") { - if (session.getTokenAt(row, match.index + 1).type === "keyword") - return "end"; - } else if (match[0][0] === "]") { - var type = session.bgTokenizer.getState(row - 1) || ""; - if (type[0] == "bracketedComment" || type[0] == "bracketedString") - return "end"; - } else - return "end"; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var line = session.doc.getLine(row); - var match = this.foldingStartMarker.exec(line); - if (match) { - if (match[1]) - return this.luaBlock(session, row, match.index + 1); - - if (match[2]) - return session.getCommentFoldRange(row, match.index + 1); - - return this.openingBracketBlock(session, "{", row, match.index); - } - - var match = this.foldingStopMarker.exec(line); - if (match) { - if (match[0] === "end") { - if (session.getTokenAt(row, match.index + 1).type === "keyword") - return this.luaBlock(session, row, match.index + 1); - } - - if (match[0][0] === "]") - return session.getCommentFoldRange(row, match.index + 1); - - return this.closingBracketBlock(session, "}", row, match.index + match[0].length); - } - }; - - this.luaBlock = function(session, row, column) { - var stream = new TokenIterator(session, row, column); - var indentKeywords = { - "function": 1, - "do": 1, - "then": 1, - "elseif": -1, - "end": -1, - "repeat": 1, - "until": -1 - }; - - var token = stream.getCurrentToken(); - if (!token || token.type != "keyword") - return; - - var val = token.value; - var stack = [val]; - var dir = indentKeywords[val]; - - if (!dir) - return; - - var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length; - var startRow = row; - - stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; - while(token = stream.step()) { - if (token.type !== "keyword") - continue; - var level = dir * indentKeywords[token.value]; - - if (level > 0) { - stack.unshift(token.value); - } else if (level <= 0) { - stack.shift(); - if (!stack.length && token.value != "elseif") - break; - if (level === 0) - stack.unshift(token.value); - } - } - - var row = stream.getCurrentTokenRow(); - if (dir === -1) - return new Range(row, session.getLine(row).length, startRow, startColumn); - else - return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn()); - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules; -var LuaFoldMode = require("./folding/lua").FoldMode; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; - -var Mode = function() { - this.HighlightRules = LuaHighlightRules; - - this.foldingRules = new LuaFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "--"; - this.blockComment = {start: "--[", end: "]--"}; - - var indentKeywords = { - "function": 1, - "then": 1, - "do": 1, - "else": 1, - "elseif": 1, - "repeat": 1, - "end": -1, - "until": -1 - }; - var outdentKeywords = [ - "else", - "elseif", - "end", - "until" - ]; - - function getNetIndentLevel(tokens) { - var level = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (token.type == "keyword") { - if (token.value in indentKeywords) { - level += indentKeywords[token.value]; - } - } else if (token.type == "paren.lparen") { - level ++; - } else if (token.type == "paren.rparen") { - level --; - } - } - if (level < 0) { - return -1; - } else if (level > 0) { - return 1; - } else { - return 0; - } - } - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var level = 0; - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - - if (state == "start") { - level = getNetIndentLevel(tokens); - } - if (level > 0) { - return indent + tab; - } else if (level < 0 && indent.substr(indent.length - tab.length) == tab) { - if (!this.checkOutdent(state, line, "\n")) { - return indent.substr(0, indent.length - tab.length); - } - } - return indent; - }; - - this.checkOutdent = function(state, line, input) { - if (input != "\n" && input != "\r" && input != "\r\n") - return false; - - if (line.match(/^\s*[\)\}\]]$/)) - return true; - - var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; - - if (!tokens || !tokens.length) - return false; - - return (tokens[0].type == "keyword" && outdentKeywords.indexOf(tokens[0].value) != -1); - }; - - this.autoOutdent = function(state, session, row) { - var prevLine = session.getLine(row - 1); - var prevIndent = this.$getIndent(prevLine).length; - var prevTokens = this.getTokenizer().getLineTokens(prevLine, "start").tokens; - var tabLength = session.getTabString().length; - var expectedIndent = prevIndent + tabLength * getNetIndentLevel(prevTokens); - var curIndent = this.$getIndent(session.getLine(row)).length; - if (curIndent < expectedIndent) { - return; - } - session.outdentRows(new Range(row, 0, row + 2, 0)); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/lua_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("error", function(e) { - session.setAnnotations([e.data]); - }); - - worker.on("ok", function(e) { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/lua"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/luapage_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/lua_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules; - -var LuaPageHighlightRules = function() { - HtmlHighlightRules.call(this); - - var startRules = [ - { - token: "keyword", - regex: "<\\%\\=?", - push: "lua-start" - }, { - token: "keyword", - regex: "<\\?lua\\=?", - push: "lua-start" - } - ]; - - var endRules = [ - { - token: "keyword", - regex: "\\%>", - next: "pop" - }, { - token: "keyword", - regex: "\\?>", - next: "pop" - } - ]; - - this.embedRules(LuaHighlightRules, "lua-", endRules, ["start"]); - - for (var key in this.$rules) - this.$rules[key].unshift.apply(this.$rules[key], startRules); - - this.normalizeRules(); -}; - -oop.inherits(LuaPageHighlightRules, HtmlHighlightRules); - -exports.LuaPageHighlightRules = LuaPageHighlightRules; - -}); - -define("ace/mode/luapage",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/lua","ace/mode/luapage_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var HtmlMode = require("./html").Mode; -var LuaMode = require("./lua").Mode; -var LuaPageHighlightRules = require("./luapage_highlight_rules").LuaPageHighlightRules; - -var Mode = function() { - HtmlMode.call(this); - - this.HighlightRules = LuaPageHighlightRules; - this.createModeDelegates({ - "lua-": LuaMode - }); -}; -oop.inherits(Mode, HtmlMode); - -(function() { - this.$id = "ace/mode/luapage"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};o.inherits(i,r),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",o="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},r.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[r.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[r.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(r,"doc-",[r.getEndRule("no_regex")]),this.normalizeRules()};o.inherits(a,i),t.JavaScriptHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),r=n.match(/^(\s*\})/);if(!r)return 0;var i=r[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new o(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var o,r=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?o=c[t]:void(o=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,r,i){var a=n.getCursorPosition(),l=r.doc.getLine(a.row);if("{"==i){g(n);var u=n.getSelectionRange(),c=r.doc.getTextRange(u);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return{text:"{"+c+"}",selection:!1};if(d.isSaneInsertion(n,r))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var m=l.substring(a.column,a.column+1);if("}"==m){var h=r.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==h&&d.isAutoInsertedClosing(a,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var p="";d.isMaybeInsertedClosing(a,l)&&(p=s.stringRepeat("}",o.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=l.substring(a.column,a.column+1);if("}"===m){var f=r.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!f)return null;var x=this.$getIndent(r.getLine(f.row))}else{if(!p)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var b=x+r.getTabString();return{text:"\n"+b+"\n"+x+p,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,i){var a=r.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){g(n);var s=r.doc.getLine(i.start.row),l=s.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,o,r){if("("==r){g(n);var i=n.getSelectionRange(),a=o.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,")"),{text:"()",selection:[1,1]}}else if(")"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=o.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"("==i){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(")"==s)return r.end.column++,r}}),this.add("brackets","insertion",function(e,t,n,o,r){if("["==r){g(n);var i=n.getSelectionRange(),a=o.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=o.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"["==i){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if("]"==s)return r.end.column++,r}}),this.add("string_dquotes","insertion",function(e,t,n,o,r){if('"'==r||"'"==r){g(n);var i=r,a=n.getSelectionRange(),s=o.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var l=n.getCursorPosition(),u=o.doc.getLine(l.row),c=u.substring(l.column-1,l.column),d=u.substring(l.column,l.column+1),m=o.getTokenAt(l.row,l.column),h=o.getTokenAt(l.row,l.column+1);if("\\"==c&&m&&/escape/.test(m.type))return null;var p,f=m&&/string/.test(m.type),x=!h||/string/.test(h.type);if(d==i)p=f!==x;else{if(f&&!x)return null;if(f&&x)return null;var b=o.$mode.tokenRe;b.lastIndex=0;var k=b.test(c);b.lastIndex=0;var v=b.test(c);if(k||v)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;p=!0}return{text:p?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==i||"'"==i)){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(s==i)return r.end.column++,r}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),o=new a(t,n.row,n.column);if(!this.$matchTokenType(o.getCurrentToken()||"text",l)){var r=new a(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return o.stepForward(),o.getCurrentTokenRow()!==n.row||this.$matchTokenType(o.getCurrentToken()||"text",u)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=r.row,o.autoInsertedLineEnd=n+i.substr(r.column),o.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=r.row,o.maybeInsertedLineStart=i.substr(0,r.column)+n,o.maybeInsertedLineEnd=i.substr(r.column),o.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return o.autoInsertedBrackets>0&&e.row===o.autoInsertedRow&&n===o.autoInsertedLineEnd[0]&&t.substr(e.column)===o.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return o.maybeInsertedBrackets>0&&e.row===o.maybeInsertedRow&&t.substr(e.column)===o.maybeInsertedLineEnd&&t.substr(0,e.column)==o.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},r.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(o)?"start":r},this.getFoldWidgetRange=function(e,t,n,o){var r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);var i=r.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(o?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=r.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),o=n.search(/\S/),i=t,a=n.length;t+=1;for(var s=t,l=e.getLength();++tu)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=i)break;if(c.isMultiLine())t=c.end.row;else if(o==u)break}s=t}}return new r(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++na)return new r(a,o,c,t.length)}}.call(a.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),i=r.tokens,a=r.state;if(i.length&&"comment"==i[i.length-1].type)return o;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(o+=n)}else if("doc-start"==e){if("start"==a||"no_regex"==a)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(o+=" "),o+="* ")}return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(c.prototype),t.Mode=c}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),i=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",u=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",m=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":s,"support.type":i,"support.constant.color":l,"support.constant.fonts":u},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};o.inherits(m,r),t.CssHighlightRules=m}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),i=e("../../token_iterator").TokenIterator,a=function(){this.inherit(r),this.add("colon","insertion",function(e,t,n,o,r){if(":"===r){var a=n.getCursorPosition(),s=new i(o,a.row,a.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var u=o.doc.getLine(a.row),c=u.substring(a.column,a.column+1); +if(":"===c)return{text:"",selection:[1,1]};if(!u.substring(a.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&":"===a){var s=n.getCursorPosition(),l=new i(o,s.row,s.column),u=l.getCurrentToken();if(u&&u.value.match(/\s+/)&&(u=l.stepBackward()),u&&"support.type"===u.type){var c=o.doc.getLine(r.start.row),g=c.substring(r.end.column,r.end.column+1);if(";"===g)return r.end.column++,r}}}),this.add("semicolon","insertion",function(e,t,n,o,r){if(";"===r){var i=n.getCursorPosition(),a=o.doc.getLine(i.row),s=a.substring(i.column,i.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};o.inherits(a,r),t.CssBehaviour=a}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e).tokens;if(r.length&&"comment"==r[r.length-1].type)return o;var i=t.match(/^.*\{\s*$/);return i&&(o+=n),o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===i&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(r.prototype),o.inherits(i,r),t.XmlHighlightRules=i}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./css_highlight_rules").CssHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=r.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),u=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(i,"css-","style"),this.embedTagRules(a,"js-","script"),this.constructor===u&&this.normalizeRules()};o.inherits(u,s),t.HtmlHighlightRules=u}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if('"'==i||"'"==i){var s=i,l=r.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),g=c.substring(u.column,u.column+1),d=new a(r,u.row,u.column),m=d.getCurrentToken();if(g==s&&(o(m,"attribute-value")||o(m,"string")))return{text:"",selection:[1,1]};if(m||(m=d.stepBackward()),!m)return;for(;o(m,"tag-whitespace")||o(m,"whitespace");)m=d.stepBackward();var h=!g||g.match(/\s/);if(o(m,"attribute-equals")&&(h||">"==g)||o(m,"decl-attribute-equals")&&(h||"?"==g))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==i||"'"==i)){var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(s==i)return r.end.column++,r}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(">"==i){var s=n.getCursorPosition(),l=new a(r,s.row,s.column),u=l.getCurrentToken()||l.stepBackward();if(!u||!(o(u,"tag-name")||o(u,"tag-whitespace")||o(u,"attribute-name")||o(u,"attribute-equals")||o(u,"attribute-value")))return;if(o(u,"reference.attribute-value"))return;if(o(u,"attribute-value")){var c=u.value.charAt(0);if('"'==c||"'"==c){var g=u.value.charAt(u.value.length-1),d=l.getCurrentTokenColumn()+u.value.length;if(d>s.column||d==s.column&&c!=g)return}}for(;!o(u,"tag-name");)u=l.stepBackward();var m=l.getCurrentTokenRow(),h=l.getCurrentTokenColumn();if(o(l.stepBackward(),"end-tag-open"))return;var p=u.value;if(m==s.row&&(p=p.substring(0,s.column-h)),this.voidElements.hasOwnProperty(p.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,o,r){if("\n"==r){var i=n.getCursorPosition(),s=o.getLine(i.row),l=new a(o,i.row,i.column),u=l.getCurrentToken();if(u&&u.type.indexOf("tag-close")!==-1){for(;u&&u.type.indexOf("tag-name")===-1;)u=l.stepBackward();if(!u)return;var c=u.value,g=l.getCurrentTokenRow();if(u=l.stepBackward(),!u||u.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]){var d=o.getTokenAt(i.row,i.column+1),s=o.getLine(g),m=this.$getIndent(s),h=m+o.getTabString();return d&&"-1}var r=e("../../lib/oop"),i=(e("../../lib/lang"),e("../../range").Range),a=e("./fold_mode").FoldMode,s=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(e,t){a.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(l,a);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var o=this._getFirstTagInLine(e,n);return o?o.closing||!o.tagName&&o.selfClosing?"markbeginend"==t?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,o.tagName,o.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new u,i=0;i"==a.value;break}return r}if(o(a,"tag-close"))return r.selfClosing="/>"==a.value,r;r.start.column+=a.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var i=e.getTokens(t),a=0,s=0;s"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(t&&n.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,n){var o=this._getFirstTagInLine(e,n);if(!o)return null;var r,a=o.closing||o.selfClosing,l=[];if(a)for(var u=new s(e,n,o.end.column),c={row:n,column:o.start.column};r=this._readTagBackward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,i.fromPoints(r.start,r.end)}if(r.closing)l.push(r);else if(this._pop(l,r),0==l.length)return r.start.column+=r.tagName.length+2,i.fromPoints(r.start,c)}else for(var u=new s(e,n,o.start.column),g={row:n,column:o.start.column+o.tagName.length+2};r=this._readTagForward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,i.fromPoints(r.start,r.end)}if(r.closing){if(this._pop(l,r),0==l.length)return i.fromPoints(g,r.start)}else l.push(r)}}}).call(l.prototype)}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./mixed").FoldMode,i=e("./xml").FoldMode,a=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){r.call(this,new i(e,t),{"js-":new a,"css-":new a})};o.inherits(s,r)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}function r(e,t){for(var n=new i(e,t.row,t.column),r=n.getCurrentToken();r&&!o(r,"tag-name");)r=n.stepBackward();if(r)return r.value}var i=e("../token_iterator").TokenIterator,a=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=a.concat(s),u={html:["manifest"],head:[],title:[],base:["href","target"],link:["href","hreflang","rel","media","type","sizes"],meta:["http-equiv","name","content","charset"],style:["type","media","scoped"],script:["charset","type","src","defer","async"],noscript:["href"],body:["onafterprint","onbeforeprint","onbeforeunload","onhashchange","onmessage","onoffline","onpopstate","onredo","onresize","onstorage","onundo","onunload"],section:[],nav:[],article:["pubdate"],aside:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],footer:[],address:[],main:[],p:[],hr:[],pre:[],blockquote:["cite"],ol:["start","reversed"],ul:[],li:["value"],dl:[],dt:[],dd:[],figure:[],figcaption:[],div:[],a:["href","target","ping","rel","media","hreflang","type"],em:[],strong:[],small:[],s:[],cite:[],q:["cite"],dfn:[],abbr:[],data:[],time:["datetime"],code:[],var:[],samp:[],kbd:[],sub:[],sup:[],i:[],b:[],u:[],mark:[],ruby:[],rt:[],rp:[],bdi:[],bdo:[],span:[],br:[],wbr:[],ins:["cite","datetime"],del:["cite","datetime"],img:["alt","src","height","width","usemap","ismap"],iframe:["name","src","height","width","sandbox","seamless"],embed:["src","height","width","type"],object:["param","data","type","height","width","usemap","name","form","classid"],param:["name","value"],video:["src","autobuffer","autoplay","loop","controls","width","height","poster"],audio:["src","autobuffer","autoplay","loop","controls"],source:["src","type","media"],track:["kind","src","srclang","label","default"],canvas:["width","height"],map:["name"],area:["shape","coords","href","hreflang","alt","target","media","rel","ping","type"],svg:[],math:[],table:["summary"],caption:[],colgroup:["span"],col:["span"],tbody:[],thead:[],tfoot:[],tr:[],td:["headers","rowspan","colspan"],th:["headers","rowspan","colspan","scope"],form:["accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],fieldset:["disabled","form","name"],legend:[],label:["form","for"],input:["type","accept","alt","autocomplete","checked","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","multiple","pattern","placeholder","readonly","required","size","src","step","width","files","value"],button:["autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","value","type"],select:["autofocus","disabled","form","multiple","name","size"],datalist:[],optgroup:["disabled","label"],option:["disabled","selected","label","value"],textarea:["autofocus","disabled","form","maxlength","name","placeholder","readonly","required","rows","cols","wrap"],keygen:["autofocus","challenge","disabled","form","keytype","name"],output:["for","form","name"],progress:["value","max"],meter:["value","min","max","low","high","optimum"],details:["open"],summary:[],command:["type","label","icon","disabled","checked","radiogroup","command"],menu:["type","label"],dialog:["open"]},c=Object.keys(u),g=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);return i?o(i,"tag-name")||o(i,"tag-open")||o(i,"end-tag-open")?this.getTagCompletions(e,t,n,r):o(i,"tag-whitespace")||o(i,"attribute-name")?this.getAttributeCompetions(e,t,n,r):[]:[]},this.getTagCompletions=function(e,t,n,o){return c.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompetions=function(e,t,n,o){var i=r(t,n);if(!i)return[];var a=l;return i in u&&(a=a.concat(u[i])),a.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})}}).call(g.prototype),t.HtmlCompletions=g}),define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./text").Mode,a=e("./javascript").Mode,s=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,g=e("./html_completions").HtmlCompletions,d=e("../worker/worker_client").WorkerClient,m=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],h=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],p=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new u,this.$completer=new g,this.createModeDelegates({"js-":a,"css-":s}),this.foldingRules=new c(this.voidElements,r.arrayToMap(h))};o.inherits(p,i),function(){this.blockComment={start:""},this.voidElements=r.arrayToMap(m),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,o){return this.$completer.getCompletions(e,t,n,o)},this.createWorker=function(e){if(this.constructor==p){var t=new d(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(p.prototype),t.Mode=p}),define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){var e="break|do|else|elseif|end|for|function|if|in|local|repeat|return|then|until|while|or|and|not",t="true|false|nil|_G|_VERSION",n="string|xpcall|package|tostring|print|os|unpack|require|getfenv|setmetatable|next|assert|tonumber|io|rawequal|collectgarbage|getmetatable|module|rawset|math|debug|pcall|table|newproxy|type|coroutine|_G|select|gcinfo|pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|load|error|loadfile|sub|upper|len|gfind|rep|find|match|char|dump|gmatch|reverse|byte|format|gsub|lower|preload|loadlib|loaded|loaders|cpath|config|path|seeall|exit|setlocale|date|getenv|difftime|remove|time|clock|tmpname|rename|execute|lines|write|close|flush|open|output|type|read|stderr|stdin|input|stdout|popen|tmpfile|log|max|acos|huge|ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|gethook|setmetatable|setlocal|traceback|setfenv|getinfo|setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|foreachi|maxn|foreach|concat|sort|remove|resume|yield|status|wrap|create|running|__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber",o="string|package|os|io|math|debug|table|coroutine",r="",i="setn|foreach|foreachi|gcinfo|log10|maxn",a=this.createKeywordMapper({keyword:e,"support.function":n,"invalid.deprecated":i,"constant.library":o,"constant.language":t,"invalid.illegal":r,"variable.language":"self"},"identifier"),s="(?:(?:[1-9]\\d*)|(?:0))",l="(?:0[xX][\\dA-Fa-f]+)",u="(?:"+s+"|"+l+")",c="(?:\\.\\d+)",g="(?:\\d+)",d="(?:(?:"+g+"?"+c+")|(?:"+g+"\\.))",m="(?:"+d+")";this.$rules={start:[{stateName:"bracketedComment",onMatch:function(e,t,n){return n.unshift(this.next,e.length-2,t),"comment"},regex:/\-\-\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","comment"},regex:/\]=*\]/,next:"start"},{defaultToken:"comment"}]},{token:"comment",regex:"\\-\\-.*$"},{stateName:"bracketedString",onMatch:function(e,t,n){return n.unshift(this.next,e.length,t),"comment"},regex:/\[=*\[/,next:[{onMatch:function(e,t,n){return e.length==n[1]?(n.shift(),n.shift(),this.next=n.shift()):this.next="","comment"},regex:/\]=*\]/,next:"start"},{defaultToken:"comment"}]},{token:"string",regex:'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:m},{token:"constant.numeric",regex:u+"\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+|\\w+"}]},this.normalizeRules()};o.inherits(i,r),t.LuaHighlightRules=i}),define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./fold_mode").FoldMode,i=e("../../range").Range,a=e("../../token_iterator").TokenIterator,s=t.FoldMode=function(){};o.inherits(s,r),function(){this.foldingStartMarker=/\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/,this.foldingStopMarker=/\bend\b|^\s*}|\]=*\]/,this.getFoldWidget=function(e,t,n){var o=e.getLine(n),r=this.foldingStartMarker.test(o),i=this.foldingStopMarker.test(o);if(r&&!i){var a=o.match(this.foldingStartMarker);if("then"==a[1]&&/\belseif\b/.test(o))return;if(a[1]){if("keyword"===e.getTokenAt(n,a.index+1).type)return"start"}else{if(!a[2])return"start";var s=e.bgTokenizer.getState(n)||"";if("bracketedComment"==s[0]||"bracketedString"==s[0])return"start"}}if("markbeginend"!=t||!i||r&&i)return"";var a=o.match(this.foldingStopMarker);if("end"===a[0]){if("keyword"===e.getTokenAt(n,a.index+1).type)return"end"}else{if("]"!==a[0][0])return"end";var s=e.bgTokenizer.getState(n-1)||"";if("bracketedComment"==s[0]||"bracketedString"==s[0])return"end"}},this.getFoldWidgetRange=function(e,t,n){var o=e.doc.getLine(n),r=this.foldingStartMarker.exec(o);if(r)return r[1]?this.luaBlock(e,n,r.index+1):r[2]?e.getCommentFoldRange(n,r.index+1):this.openingBracketBlock(e,"{",n,r.index);var r=this.foldingStopMarker.exec(o);return r?"end"===r[0]&&"keyword"===e.getTokenAt(n,r.index+1).type?this.luaBlock(e,n,r.index+1):"]"===r[0][0]?e.getCommentFoldRange(n,r.index+1):this.closingBracketBlock(e,"}",n,r.index+r[0].length):void 0},this.luaBlock=function(e,t,n){var o=new a(e,t,n),r={function:1,do:1,then:1,elseif:-1,end:-1,repeat:1,until:-1},s=o.getCurrentToken();if(s&&"keyword"==s.type){var l=s.value,u=[l],c=r[l];if(c){var g=c===-1?o.getCurrentTokenColumn():e.getLine(t).length,d=t;for(o.step=c===-1?o.stepBackward:o.stepForward;s=o.step();)if("keyword"===s.type){var m=c*r[s.value];if(m>0)u.unshift(s.value);else if(m<=0){if(u.shift(),!u.length&&"elseif"!=s.value)break;0===m&&u.unshift(s.value)}}var t=o.getCurrentTokenRow();return c===-1?new i(t,e.getLine(t).length,d,g):new i(d,g,t,o.getCurrentTokenColumn())}}}}.call(s.prototype)}),define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./lua_highlight_rules").LuaHighlightRules,a=e("./folding/lua").FoldMode,s=e("../range").Range,l=e("../worker/worker_client").WorkerClient,u=function(){this.HighlightRules=i,this.foldingRules=new a};o.inherits(u,r),function(){function e(e){for(var n=0,o=0;o0?1:0}this.lineCommentStart="--",this.blockComment={start:"--[",end:"]--"};var t={function:1,then:1,do:1,else:1,elseif:1,repeat:1,end:-1,until:-1},n=["else","elseif","end","until"];this.getNextLineIndent=function(t,n,o){var r=this.$getIndent(n),i=0,a=this.getTokenizer().getLineTokens(n,t),s=a.tokens;return"start"==t&&(i=e(s)),i>0?r+o:i<0&&r.substr(r.length-o.length)==o&&!this.checkOutdent(t,n,"\n")?r.substr(0,r.length-o.length):r},this.checkOutdent=function(e,t,o){if("\n"!=o&&"\r"!=o&&"\r\n"!=o)return!1;if(t.match(/^\s*[\)\}\]]$/))return!0;var r=this.getTokenizer().getLineTokens(t.trim(),e).tokens;return!(!r||!r.length)&&"keyword"==r[0].type&&n.indexOf(r[0].value)!=-1},this.autoOutdent=function(t,n,o){var r=n.getLine(o-1),i=this.$getIndent(r).length,a=this.getTokenizer().getLineTokens(r,"start").tokens,l=n.getTabString().length,u=i+l*e(a),c=this.$getIndent(n.getLine(o)).length;c",next:"pop"},{token:"keyword",regex:"\\?>",next:"pop"}];this.embedRules(i,"lua-",t,["start"]);for(var n in this.$rules)this.$rules[n].unshift.apply(this.$rules[n],e);this.normalizeRules()};o.inherits(a,r),t.LuaPageHighlightRules=a}),define("ace/mode/luapage",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/lua","ace/mode/luapage_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./html").Mode,i=e("./lua").Mode,a=e("./luapage_highlight_rules").LuaPageHighlightRules,s=function(){r.call(this),this.HighlightRules=a,this.createModeDelegates({"lua-":i})};o.inherits(s,r),function(){this.$id="ace/mode/luapage"}.call(s.prototype),t.Mode=s}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-lucene.js b/www/js/vendor/ace/mode-lucene.js index 676bc21ad..5b4bfb1d9 100755 --- a/www/js/vendor/ace/mode-lucene.js +++ b/www/js/vendor/ace/mode-lucene.js @@ -1,69 +1 @@ -define("ace/mode/lucene_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var LuceneHighlightRules = function() { - this.$rules = { - "start" : [ - { - token : "constant.character.negation", - regex : "[\\-]" - }, { - token : "constant.character.interro", - regex : "[\\?]" - }, { - token : "constant.character.asterisk", - regex : "[\\*]" - }, { - token: 'constant.character.proximity', - regex: '~[0-9]+\\b' - }, { - token : 'keyword.operator', - regex: '(?:AND|OR|NOT)\\b' - }, { - token : "paren.lparen", - regex : "[\\(]" - }, { - token : "paren.rparen", - regex : "[\\)]" - }, { - token : "keyword", - regex : "[\\S]+:" - }, { - token : "string", // " string - regex : '".*?"' - }, { - token : "text", - regex : "\\s+" - } - ] - }; -}; - -oop.inherits(LuceneHighlightRules, TextHighlightRules); - -exports.LuceneHighlightRules = LuceneHighlightRules; -}); - -define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lucene_highlight_rules"], function(require, exports, module) { -'use strict'; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var LuceneHighlightRules = require("./lucene_highlight_rules").LuceneHighlightRules; - -var Mode = function() { - this.HighlightRules = LuceneHighlightRules; -}; - -oop.inherits(Mode, TextMode); - -(function() { - this.$id = "ace/mode/lucene"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/lucene_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var i=e("../lib/oop"),n=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),o=function(){this.$rules={start:[{token:"constant.character.negation",regex:"[\\-]"},{token:"constant.character.interro",regex:"[\\?]"},{token:"constant.character.asterisk",regex:"[\\*]"},{token:"constant.character.proximity",regex:"~[0-9]+\\b"},{token:"keyword.operator",regex:"(?:AND|OR|NOT)\\b"},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"keyword",regex:"[\\S]+:"},{token:"string",regex:'".*?"'},{token:"text",regex:"\\s+"}]}};i.inherits(o,n),t.LuceneHighlightRules=o}),define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lucene_highlight_rules"],function(e,t,r){"use strict";var i=e("../lib/oop"),n=e("./text").Mode,o=e("./lucene_highlight_rules").LuceneHighlightRules,l=function(){this.HighlightRules=o};i.inherits(l,n),function(){this.$id="ace/mode/lucene"}.call(l.prototype),t.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-makefile.js b/www/js/vendor/ace/mode-makefile.js index 2f3e80827..aa9105106 100755 --- a/www/js/vendor/ace/mode-makefile.js +++ b/www/js/vendor/ace/mode-makefile.js @@ -1,357 +1 @@ -define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var reservedKeywords = exports.reservedKeywords = ( - '!|{|}|case|do|done|elif|else|'+ - 'esac|fi|for|if|in|then|until|while|'+ - '&|;|export|local|read|typeset|unset|'+ - 'elif|select|set' - ); - -var languageConstructs = exports.languageConstructs = ( - '[|]|alias|bg|bind|break|builtin|'+ - 'cd|command|compgen|complete|continue|'+ - 'dirs|disown|echo|enable|eval|exec|'+ - 'exit|fc|fg|getopts|hash|help|history|'+ - 'jobs|kill|let|logout|popd|printf|pushd|'+ - 'pwd|return|set|shift|shopt|source|'+ - 'suspend|test|times|trap|type|ulimit|'+ - 'umask|unalias|wait' -); - -var ShHighlightRules = function() { - var keywordMapper = this.createKeywordMapper({ - "keyword": reservedKeywords, - "support.function.builtin": languageConstructs, - "invalid.deprecated": "debugger" - }, "identifier"); - - var integer = "(?:(?:[1-9]\\d*)|(?:0))"; - - var fraction = "(?:\\.\\d+)"; - var intPart = "(?:\\d+)"; - var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; - var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")"; - var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; - var fileDescriptor = "(?:&" + intPart + ")"; - - var variableName = "[a-zA-Z_][a-zA-Z0-9_]*"; - var variable = "(?:(?:\\$" + variableName + ")|(?:" + variableName + "=))"; - - var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))"; - - var func = "(?:" + variableName + "\\s*\\(\\))"; - - this.$rules = { - "start" : [{ - token : "constant", - regex : /\\./ - }, { - token : ["text", "comment"], - regex : /(^|\s)(#.*)$/ - }, { - token : "string", - regex : '"', - push : [{ - token : "constant.language.escape", - regex : /\\(?:[$abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/ - }, { - token : "constant", - regex : /\$\w+/ - }, { - token : "string", - regex : '"', - next: "pop" - }, { - defaultToken: "string" - }] - }, { - regex : "<<<", - token : "keyword.operator" - }, { - stateName: "heredoc", - regex : "(<<)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)", - onMatch : function(value, currentState, stack) { - var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; - var tokens = value.split(this.splitRegex); - stack.push(next, tokens[4]); - return [ - {type:"constant", value: tokens[1]}, - {type:"text", value: tokens[2]}, - {type:"string", value: tokens[3]}, - {type:"support.class", value: tokens[4]}, - {type:"string", value: tokens[5]} - ]; - }, - rules: { - heredoc: [{ - onMatch: function(value, currentState, stack) { - if (value === stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack[0] || "start"; - return "support.class"; - } - this.next = ""; - return "string"; - }, - regex: ".*$", - next: "start" - }], - indentedHeredoc: [{ - token: "string", - regex: "^\t+" - }, { - onMatch: function(value, currentState, stack) { - if (value === stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack[0] || "start"; - return "support.class"; - } - this.next = ""; - return "string"; - }, - regex: ".*$", - next: "start" - }] - } - }, { - regex : "$", - token : "empty", - next : function(currentState, stack) { - if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") - return stack[0]; - return currentState; - } - }, { - token : "variable.language", - regex : builtinVariable - }, { - token : "variable", - regex : variable - }, { - token : "support.function", - regex : func - }, { - token : "support.function", - regex : fileDescriptor - }, { - token : "string", // ' string - start : "'", end : "'" - }, { - token : "constant.numeric", // float - regex : floatNumber - }, { - token : "constant.numeric", // integer - regex : integer + "\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b" - }, { - token : "keyword.operator", - regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=" - }, { - token : "paren.lparen", - regex : "[\\[\\(\\{]" - }, { - token : "paren.rparen", - regex : "[\\]\\)\\}]" - } ] - }; - - this.normalizeRules(); -}; - -oop.inherits(ShHighlightRules, TextHighlightRules); - -exports.ShHighlightRules = ShHighlightRules; -}); - -define("ace/mode/makefile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/sh_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var ShHighlightFile = require("./sh_highlight_rules"); - -var MakefileHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "keyword": ShHighlightFile.reservedKeywords, - "support.function.builtin": ShHighlightFile.languageConstructs, - "invalid.deprecated": "debugger" - }, "string"); - - this.$rules = - { - "start": [ - { - token: "string.interpolated.backtick.makefile", - regex: "`", - next: "shell-start" - }, - { - token: "punctuation.definition.comment.makefile", - regex: /#(?=.)/, - next: "comment" - }, - { - token: [ "keyword.control.makefile"], - regex: "^(?:\\s*\\b)(\\-??include|ifeq|ifneq|ifdef|ifndef|else|endif|vpath|export|unexport|define|endef|override)(?:\\b)" - }, - {// ^([^\t ]+(\s[^\t ]+)*:(?!\=))\s*.* - token: ["entity.name.function.makefile", "text"], - regex: "^([^\\t ]+(?:\\s[^\\t ]+)*:)(\\s*.*)" - } - ], - "comment": [ - { - token : "punctuation.definition.comment.makefile", - regex : /.+\\/ - }, - { - token : "punctuation.definition.comment.makefile", - regex : ".+", - next : "start" - } - ], - "shell-start": [ - { - token: keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, - { - token: "string", - regex : "\\w+" - }, - { - token : "string.interpolated.backtick.makefile", - regex : "`", - next : "start" - } - ] -} - -}; - -oop.inherits(MakefileHighlightRules, TextHighlightRules); - -exports.MakefileHighlightRules = MakefileHighlightRules; -}); - -define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/makefile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/makefile_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var MakefileHighlightRules = require("./makefile_highlight_rules").MakefileHighlightRules; -var FoldMode = require("./folding/coffee").FoldMode; - -var Mode = function() { - this.HighlightRules = MakefileHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "#"; - this.$indentWithTabs = true; - - this.$id = "ace/mode/makefile"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,i){"use strict";var n=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=t.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set",s=t.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",a=function(){var e=this.createKeywordMapper({keyword:o,"support.function.builtin":s,"invalid.deprecated":"debugger"},"identifier"),t="(?:(?:[1-9]\\d*)|(?:0))",i="(?:\\.\\d+)",n="(?:\\d+)",r="(?:(?:"+n+"?"+i+")|(?:"+n+"\\.))",a="(?:(?:"+r+"|"+n+"))",l="(?:"+a+"|"+r+")",g="(?:&"+n+")",d="[a-zA-Z_][a-zA-Z0-9_]*",u="(?:(?:\\$"+d+")|(?:"+d+"=))",c="(?:\\$(?:SHLVL|\\$|\\!|\\?))",h="(?:"+d+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"constant",regex:/\$\w+/},{token:"string",regex:'"',next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(e,t,i){var n="-"==e[2]?"indentedHeredoc":"heredoc",r=e.split(this.splitRegex);return i.push(n,r[4]),[{type:"constant",value:r[1]},{type:"text",value:r[2]},{type:"string",value:r[3]},{type:"support.class",value:r[4]},{type:"string",value:r[5]}]},rules:{heredoc:[{onMatch:function(e,t,i){return e===i[1]?(i.shift(),i.shift(),this.next=i[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^\t+"},{onMatch:function(e,t,i){return e===i[1]?(i.shift(),i.shift(),this.next=i[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return"heredoc"===t[0]||"indentedHeredoc"===t[0]?t[0]:e}},{token:"variable.language",regex:c},{token:"variable",regex:u},{token:"support.function",regex:h},{token:"support.function",regex:g},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:l},{token:"constant.numeric",regex:t+"\\b"},{token:e,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"}]},this.normalizeRules()};n.inherits(a,r),t.ShHighlightRules=a}),define("ace/mode/makefile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/sh_highlight_rules"],function(e,t,i){"use strict";var n=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=e("./sh_highlight_rules"),s=function(){var e=this.createKeywordMapper({keyword:o.reservedKeywords,"support.function.builtin":o.languageConstructs,"invalid.deprecated":"debugger"},"string");this.$rules={start:[{token:"string.interpolated.backtick.makefile",regex:"`",next:"shell-start"},{token:"punctuation.definition.comment.makefile",regex:/#(?=.)/,next:"comment"},{token:["keyword.control.makefile"],regex:"^(?:\\s*\\b)(\\-??include|ifeq|ifneq|ifdef|ifndef|else|endif|vpath|export|unexport|define|endef|override)(?:\\b)"},{token:["entity.name.function.makefile","text"],regex:"^([^\\t ]+(?:\\s[^\\t ]+)*:)(\\s*.*)"}],comment:[{token:"punctuation.definition.comment.makefile",regex:/.+\\/},{token:"punctuation.definition.comment.makefile",regex:".+",next:"start"}],"shell-start":[{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"string",regex:"\\w+"},{token:"string.interpolated.backtick.makefile",regex:"`",next:"start"}]}};n.inherits(s,r),t.MakefileHighlightRules=s}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,i){"use strict";var n=e("../../lib/oop"),r=e("./fold_mode").FoldMode,o=e("../../range").Range,s=t.FoldMode=function(){};n.inherits(s,r),function(){this.getFoldWidgetRange=function(e,t,i){var n=this.indentationBlock(e,i);if(n)return n;var r=/\S/,s=e.getLine(i),a=s.search(r);if(a!=-1&&"#"==s[a]){for(var l=s.length,g=e.getLength(),d=i,u=i;++id){var h=e.getLine(u).length;return new o(d,l,u,h)}}},this.getFoldWidget=function(e,t,i){var n=e.getLine(i),r=n.search(/\S/),o=e.getLine(i+1),s=e.getLine(i-1),a=s.search(/\S/),l=o.search(/\S/);if(r==-1)return e.foldWidgets[i-1]=a!=-1&&a=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === " -1; -} - -(function() { - - this.getFoldWidget = function(session, foldStyle, row) { - var tag = this._getFirstTagInLine(session, row); - - if (!tag) - return ""; - - if (tag.closing || (!tag.tagName && tag.selfClosing)) - return foldStyle == "markbeginend" ? "end" : ""; - - if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) - return ""; - - if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) - return ""; - - return "start"; - }; - this._getFirstTagInLine = function(session, row) { - var tokens = session.getTokens(row); - var tag = new Tag(); - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (is(token, "tag-open")) { - tag.end.column = tag.start.column + token.value.length; - tag.closing = is(token, "end-tag-open"); - token = tokens[++i]; - if (!token) - return null; - tag.tagName = token.value; - tag.end.column += token.value.length; - for (i++; i < tokens.length; i++) { - token = tokens[i]; - tag.end.column += token.value.length; - if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - break; - } - } - return tag; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - return tag; - } - tag.start.column += token.value.length; - } - - return null; - }; - - this._findEndTagInLine = function(session, row, tagName, startColumn) { - var tokens = session.getTokens(row); - var column = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - column += token.value.length; - if (column < startColumn) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var firstTag = this._getFirstTagInLine(session, row); - - if (!firstTag) - return null; - - var isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextMode = require("./text").Mode; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; -var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; -var XmlFoldMode = require("./folding/xml").FoldMode; - -var Mode = function() { - this.HighlightRules = XmlHighlightRules; - this.$behaviour = new XmlBehaviour(); - this.foldingRules = new XmlFoldMode(); -}; - -oop.inherits(Mode, TextMode); - -(function() { - - this.voidElements = lang.arrayToMap([]); - - this.blockComment = {start: ""}; - - this.$id = "ace/mode/xml"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = CssHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.foldingRules = "cStyle"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("csslint", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/css"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(defaultMode, subModes) { - this.defaultMode = defaultMode; - this.subModes = subModes; -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - - this.$getMode = function(state) { - if (typeof state != "string") - state = state[0]; - for (var key in this.subModes) { - if (state.indexOf(key) === 0) - return this.subModes[key]; - } - return null; - }; - - this.$tryMode = function(state, session, foldStyle, row) { - var mode = this.$getMode(state); - return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); - }; - - this.getFoldWidget = function(session, foldStyle, row) { - return ( - this.$tryMode(session.getState(row-1), session, foldStyle, row) || - this.$tryMode(session.getState(row), session, foldStyle, row) || - this.defaultMode.getFoldWidget(session, foldStyle, row) - ); - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var mode = this.$getMode(session.getState(row-1)); - - if (!mode || !mode.getFoldWidget(session, foldStyle, row)) - mode = this.$getMode(session.getState(row)); - - if (!mode || !mode.getFoldWidget(session, foldStyle, row)) - mode = this.defaultMode; - - return mode.getFoldWidgetRange(session, foldStyle, row); - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var MixedFoldMode = require("./mixed").FoldMode; -var XmlFoldMode = require("./xml").FoldMode; -var CStyleFoldMode = require("./cstyle").FoldMode; - -var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { - MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { - "js-": new CStyleFoldMode(), - "css-": new CStyleFoldMode() - }); -}; - -oop.inherits(FoldMode, MixedFoldMode); - -}); - -define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var TokenIterator = require("../token_iterator").TokenIterator; - -var commonAttributes = [ - "accesskey", - "class", - "contenteditable", - "contextmenu", - "dir", - "draggable", - "dropzone", - "hidden", - "id", - "inert", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "lang", - "spellcheck", - "style", - "tabindex", - "title", - "translate" -]; - -var eventAttributes = [ - "onabort", - "onblur", - "oncancel", - "oncanplay", - "oncanplaythrough", - "onchange", - "onclick", - "onclose", - "oncontextmenu", - "oncuechange", - "ondblclick", - "ondrag", - "ondragend", - "ondragenter", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onended", - "onerror", - "onfocus", - "oninput", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeyup", - "onload", - "onloadeddata", - "onloadedmetadata", - "onloadstart", - "onmousedown", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onpause", - "onplay", - "onplaying", - "onprogress", - "onratechange", - "onreset", - "onscroll", - "onseeked", - "onseeking", - "onselect", - "onshow", - "onstalled", - "onsubmit", - "onsuspend", - "ontimeupdate", - "onvolumechange", - "onwaiting" -]; - -var globalAttributes = commonAttributes.concat(eventAttributes); - -var attributeMap = { - "html": ["manifest"], - "head": [], - "title": [], - "base": ["href", "target"], - "link": ["href", "hreflang", "rel", "media", "type", "sizes"], - "meta": ["http-equiv", "name", "content", "charset"], - "style": ["type", "media", "scoped"], - "script": ["charset", "type", "src", "defer", "async"], - "noscript": ["href"], - "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], - "section": [], - "nav": [], - "article": ["pubdate"], - "aside": [], - "h1": [], - "h2": [], - "h3": [], - "h4": [], - "h5": [], - "h6": [], - "header": [], - "footer": [], - "address": [], - "main": [], - "p": [], - "hr": [], - "pre": [], - "blockquote": ["cite"], - "ol": ["start", "reversed"], - "ul": [], - "li": ["value"], - "dl": [], - "dt": [], - "dd": [], - "figure": [], - "figcaption": [], - "div": [], - "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], - "em": [], - "strong": [], - "small": [], - "s": [], - "cite": [], - "q": ["cite"], - "dfn": [], - "abbr": [], - "data": [], - "time": ["datetime"], - "code": [], - "var": [], - "samp": [], - "kbd": [], - "sub": [], - "sup": [], - "i": [], - "b": [], - "u": [], - "mark": [], - "ruby": [], - "rt": [], - "rp": [], - "bdi": [], - "bdo": [], - "span": [], - "br": [], - "wbr": [], - "ins": ["cite", "datetime"], - "del": ["cite", "datetime"], - "img": ["alt", "src", "height", "width", "usemap", "ismap"], - "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], - "embed": ["src", "height", "width", "type"], - "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], - "param": ["name", "value"], - "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], - "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], - "source": ["src", "type", "media"], - "track": ["kind", "src", "srclang", "label", "default"], - "canvas": ["width", "height"], - "map": ["name"], - "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], - "svg": [], - "math": [], - "table": ["summary"], - "caption": [], - "colgroup": ["span"], - "col": ["span"], - "tbody": [], - "thead": [], - "tfoot": [], - "tr": [], - "td": ["headers", "rowspan", "colspan"], - "th": ["headers", "rowspan", "colspan", "scope"], - "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], - "fieldset": ["disabled", "form", "name"], - "legend": [], - "label": ["form", "for"], - "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], - "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], - "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], - "datalist": [], - "optgroup": ["disabled", "label"], - "option": ["disabled", "selected", "label", "value"], - "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], - "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], - "output": ["for", "form", "name"], - "progress": ["value", "max"], - "meter": ["value", "min", "max", "low", "high", "optimum"], - "details": ["open"], - "summary": [], - "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], - "menu": ["type", "label"], - "dialog": ["open"] -}; - -var elements = Object.keys(attributeMap); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -function findTagName(session, pos) { - var iterator = new TokenIterator(session, pos.row, pos.column); - var token = iterator.getCurrentToken(); - while (token && !is(token, "tag-name")){ - token = iterator.stepBackward(); - } - if (token) - return token.value; -} - -var HtmlCompletions = function() { - -}; - -(function() { - - this.getCompletions = function(state, session, pos, prefix) { - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) - return this.getTagCompletions(state, session, pos, prefix); - if (is(token, "tag-whitespace") || is(token, "attribute-name")) - return this.getAttributeCompetions(state, session, pos, prefix); - - return []; - }; - - this.getTagCompletions = function(state, session, pos, prefix) { - return elements.map(function(element){ - return { - value: element, - meta: "tag", - score: Number.MAX_VALUE - }; - }); - }; - - this.getAttributeCompetions = function(state, session, pos, prefix) { - var tagName = findTagName(session, pos); - if (!tagName) - return []; - var attributes = globalAttributes; - if (tagName in attributeMap) { - attributes = attributes.concat(attributeMap[tagName]); - } - return attributes.map(function(attribute){ - return { - caption: attribute, - snippet: attribute + '="$0"', - meta: "attribute", - score: Number.MAX_VALUE - }; - }); - }; - -}).call(HtmlCompletions.prototype); - -exports.HtmlCompletions = HtmlCompletions; -}); - -define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var CssMode = require("./css").Mode; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; -var HtmlFoldMode = require("./folding/html").FoldMode; -var HtmlCompletions = require("./html_completions").HtmlCompletions; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; -var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; - -var Mode = function(options) { - this.fragmentContext = options && options.fragmentContext; - this.HighlightRules = HtmlHighlightRules; - this.$behaviour = new XmlBehaviour(); - this.$completer = new HtmlCompletions(); - - this.createModeDelegates({ - "js-": JavaScriptMode, - "css-": CssMode - }); - - this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.blockComment = {start: ""}; - - this.voidElements = lang.arrayToMap(voidElements); - - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - this.checkOutdent = function(state, line, input) { - return false; - }; - - this.getCompletions = function(state, session, pos, prefix) { - return this.$completer.getCompletions(state, session, pos, prefix); - }; - - this.createWorker = function(session) { - if (this.constructor != Mode) - return; - var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - if (this.fragmentContext) - worker.call("setOptions", [{context: this.fragmentContext}]); - - worker.on("error", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/html"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; - -var escaped = function(ch) { - return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*"; -} - -function github_embed(tag, prefix) { - return { // Github style block - token : "support.function", - regex : "^\\s*```" + tag + "\\s*$", - push : prefix + "start" - }; -} - -var MarkdownHighlightRules = function() { - HtmlHighlightRules.call(this); - - this.$rules["start"].unshift({ - token : "empty_line", - regex : '^$', - next: "allowBlock" - }, { // h1 - token: "markup.heading.1", - regex: "^=+(?=\\s*$)" - }, { // h2 - token: "markup.heading.2", - regex: "^\\-+(?=\\s*$)" - }, { - token : function(value) { - return "markup.heading." + value.length; - }, - regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/, - next : "header" - }, - github_embed("(?:javascript|js)", "jscode-"), - github_embed("xml", "xmlcode-"), - github_embed("html", "htmlcode-"), - github_embed("css", "csscode-"), - { // Github style block - token : "support.function", - regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$", - next : "githubblock" - }, { // block quote - token : "string.blockquote", - regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", - next : "blockquote" - }, { // HR * - _ - token : "constant", - regex : "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$", - next: "allowBlock" - }, { // list - token : "markup.list", - regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", - next : "listblock-start" - }, { - include : "basic" - }); - - this.addRules({ - "basic" : [{ - token : "constant.language.escape", - regex : /\\[\\`*_{}\[\]()#+\-.!]/ - }, { // code span ` - token : "support.function", - regex : "(`+)(.*?[^`])(\\1)" - }, { // reference - token : ["text", "constant", "text", "url", "string", "text"], - regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$" - }, { // link by reference - token : ["text", "string", "text", "constant", "text"], - regex : "(\\[)(" + escaped("]") + ")(\\]\s*\\[)("+ escaped("]") + ")(\\])" - }, { // link by url - token : ["text", "string", "text", "markup.underline", "string", "text"], - regex : "(\\[)(" + // [ - escaped("]") + // link text - ")(\\]\\()"+ // ]( - '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href - '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" - "(\\))" // ) - }, { // strong ** __ - token : "string.strong", - regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)" - }, { // emphasis * _ - token : "string.emphasis", - regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)" - }, { // - token : ["text", "url", "text"], - regex : "(<)("+ - "(?:https?|ftp|dict):[^'\">\\s]+"+ - "|"+ - "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+ - ")(>)" - }], - "allowBlock": [ - {token : "support.function", regex : "^ {4}.+", next : "allowBlock"}, - {token : "empty", regex : "", next : "start"} - ], - - "header" : [{ - regex: "$", - next : "start" - }, { - include: "basic" - }, { - defaultToken : "heading" - } ], - - "listblock-start" : [{ - token : "support.variable", - regex : /(?:\[[ x]\])?/, - next : "listblock" - }], - - "listblock" : [ { // Lists only escape on completely blank lines. - token : "empty_line", - regex : "^$", - next : "start" - }, { // list - token : "markup.list", - regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", - next : "listblock-start" - }, { - include : "basic", noEscape: true - }, { // Github style block - token : "support.function", - regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$", - next : "githubblock" - }, { - defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly - } ], - - "blockquote" : [ { // Blockquotes only escape on blank lines. - token : "empty_line", - regex : "^\\s*$", - next : "start" - }, { // block quote - token : "string.blockquote", - regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", - next : "blockquote" - }, { - include : "basic", noEscape: true - }, { - defaultToken : "string.blockquote" - } ], - - "githubblock" : [ { - token : "support.function", - regex : "^\\s*```", - next : "start" - }, { - token : "support.function", - regex : ".+" - } ] - }); - - this.embedRules(JavaScriptHighlightRules, "jscode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.embedRules(HtmlHighlightRules, "htmlcode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.embedRules(CssHighlightRules, "csscode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.embedRules(XmlHighlightRules, "xmlcode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.normalizeRules(); -}; -oop.inherits(MarkdownHighlightRules, TextHighlightRules); - -exports.MarkdownHighlightRules = MarkdownHighlightRules; -}); - -define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - this.foldingStartMarker = /^(?:[=-]+\s*$|#{1,6} |`{3})/; - - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - if (!this.foldingStartMarker.test(line)) - return ""; - - if (line[0] == "`") { - if (session.bgTokenizer.getState(row) == "start") - return "end"; - return "start"; - } - - return "start"; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var line = session.getLine(row); - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - if (!line.match(this.foldingStartMarker)) - return; - - if (line[0] == "`") { - if (session.bgTokenizer.getState(row) !== "start") { - while (++row < maxRow) { - line = session.getLine(row); - if (line[0] == "`" & line.substring(0, 3) == "```") - break; - } - return new Range(startRow, startColumn, row, 0); - } else { - while (row -- > 0) { - line = session.getLine(row); - if (line[0] == "`" & line.substring(0, 3) == "```") - break; - } - return new Range(row, line.length, startRow, 0); - } - } - - var token; - function isHeading(row) { - token = session.getTokens(row)[0]; - return token && token.type.lastIndexOf(heading, 0) === 0; - } - - var heading = "markup.heading"; - function getLevel() { - var ch = token.value[0]; - if (ch == "=") return 6; - if (ch == "-") return 5; - return 7 - token.value.search(/[^#]/); - } - - if (isHeading(row)) { - var startHeadingLevel = getLevel(); - while (++row < maxRow) { - if (!isHeading(row)) - continue; - var level = getLevel(); - if (level >= startHeadingLevel) - break; - } - - endRow = row - (!token || ["=", "-"].indexOf(token.value[0]) == -1 ? 1 : 2); - - if (endRow > startRow) { - while (endRow > startRow && /^\s*$/.test(session.getLine(endRow))) - endRow--; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/xml","ace/mode/html","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var XmlMode = require("./xml").Mode; -var HtmlMode = require("./html").Mode; -var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules; -var MarkdownFoldMode = require("./folding/markdown").FoldMode; - -var Mode = function() { - this.HighlightRules = MarkdownHighlightRules; - - this.createModeDelegates({ - "js-": JavaScriptMode, - "xml-": XmlMode, - "html-": HtmlMode - }); - - this.foldingRules = new MarkdownFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.type = "text"; - this.blockComment = {start: ""}; - - this.getNextLineIndent = function(state, line, tab) { - if (state == "listblock") { - var match = /^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(line); - if (!match) - return ""; - var marker = match[2]; - if (!marker) - marker = parseInt(match[3], 10) + 1 + "."; - return match[1] + marker + match[4]; - } else { - return this.$getIndent(line); - } - }; - this.$id = "ace/mode/markdown"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};o.inherits(i,r),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",o="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},r.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[r.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[r.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(r,"doc-",[r.getEndRule("no_regex")]),this.normalizeRules()};o.inherits(a,i),t.JavaScriptHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),r=n.match(/^(\s*\})/);if(!r)return 0;var i=r[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new o(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var o,r=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?o=c[t]:void(o=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,r,i){var a=n.getCursorPosition(),l=r.doc.getLine(a.row);if("{"==i){g(n);var u=n.getSelectionRange(),c=r.doc.getTextRange(u);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return{text:"{"+c+"}",selection:!1};if(d.isSaneInsertion(n,r))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var m=l.substring(a.column,a.column+1);if("}"==m){var p=r.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==p&&d.isAutoInsertedClosing(a,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var h="";d.isMaybeInsertedClosing(a,l)&&(h=s.stringRepeat("}",o.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=l.substring(a.column,a.column+1);if("}"===m){var f=r.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!f)return null;var x=this.$getIndent(r.getLine(f.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var b=x+r.getTabString();return{text:"\n"+b+"\n"+x+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,i){var a=r.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){g(n);var s=r.doc.getLine(i.start.row),l=s.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,o,r){if("("==r){g(n);var i=n.getSelectionRange(),a=o.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,")"),{text:"()",selection:[1,1]}}else if(")"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=o.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"("==i){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(")"==s)return r.end.column++,r}}),this.add("brackets","insertion",function(e,t,n,o,r){if("["==r){g(n);var i=n.getSelectionRange(),a=o.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=o.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"["==i){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if("]"==s)return r.end.column++,r}}),this.add("string_dquotes","insertion",function(e,t,n,o,r){if('"'==r||"'"==r){g(n);var i=r,a=n.getSelectionRange(),s=o.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var l=n.getCursorPosition(),u=o.doc.getLine(l.row),c=u.substring(l.column-1,l.column),d=u.substring(l.column,l.column+1),m=o.getTokenAt(l.row,l.column),p=o.getTokenAt(l.row,l.column+1);if("\\"==c&&m&&/escape/.test(m.type))return null;var h,f=m&&/string/.test(m.type),x=!p||/string/.test(p.type);if(d==i)h=f!==x;else{if(f&&!x)return null;if(f&&x)return null;var b=o.$mode.tokenRe;b.lastIndex=0;var k=b.test(c);b.lastIndex=0;var v=b.test(c);if(k||v)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==i||"'"==i)){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(s==i)return r.end.column++,r}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),o=new a(t,n.row,n.column);if(!this.$matchTokenType(o.getCurrentToken()||"text",l)){var r=new a(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return o.stepForward(),o.getCurrentTokenRow()!==n.row||this.$matchTokenType(o.getCurrentToken()||"text",u)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=r.row,o.autoInsertedLineEnd=n+i.substr(r.column),o.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=r.row,o.maybeInsertedLineStart=i.substr(0,r.column)+n,o.maybeInsertedLineEnd=i.substr(r.column),o.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return o.autoInsertedBrackets>0&&e.row===o.autoInsertedRow&&n===o.autoInsertedLineEnd[0]&&t.substr(e.column)===o.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return o.maybeInsertedBrackets>0&&e.row===o.maybeInsertedRow&&t.substr(e.column)===o.maybeInsertedLineEnd&&t.substr(0,e.column)==o.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},r.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(o)?"start":r},this.getFoldWidgetRange=function(e,t,n,o){var r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);var i=r.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(o?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=r.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),o=n.search(/\S/),i=t,a=n.length;t+=1;for(var s=t,l=e.getLength();++tu)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=i)break;if(c.isMultiLine())t=c.end.row;else if(o==u)break}s=t}}return new r(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++na)return new r(a,o,c,t.length)}}.call(a.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),i=r.tokens,a=r.state;if(i.length&&"comment"==i[i.length-1].type)return o;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(o+=n)}else if("doc-start"==e){if("start"==a||"no_regex"==a)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(o+=" "),o+="* ")}return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===i&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(r.prototype),o.inherits(i,r),t.XmlHighlightRules=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if('"'==i||"'"==i){var s=i,l=r.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),g=c.substring(u.column,u.column+1),d=new a(r,u.row,u.column),m=d.getCurrentToken();if(g==s&&(o(m,"attribute-value")||o(m,"string")))return{text:"",selection:[1,1]};if(m||(m=d.stepBackward()),!m)return;for(;o(m,"tag-whitespace")||o(m,"whitespace");)m=d.stepBackward();var p=!g||g.match(/\s/);if(o(m,"attribute-equals")&&(p||">"==g)||o(m,"decl-attribute-equals")&&(p||"?"==g))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==i||"'"==i)){var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(s==i)return r.end.column++,r}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(">"==i){var s=n.getCursorPosition(),l=new a(r,s.row,s.column),u=l.getCurrentToken()||l.stepBackward();if(!u||!(o(u,"tag-name")||o(u,"tag-whitespace")||o(u,"attribute-name")||o(u,"attribute-equals")||o(u,"attribute-value")))return;if(o(u,"reference.attribute-value"))return;if(o(u,"attribute-value")){var c=u.value.charAt(0);if('"'==c||"'"==c){var g=u.value.charAt(u.value.length-1),d=l.getCurrentTokenColumn()+u.value.length;if(d>s.column||d==s.column&&c!=g)return}}for(;!o(u,"tag-name");)u=l.stepBackward();var m=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn();if(o(l.stepBackward(),"end-tag-open"))return;var h=u.value;if(m==s.row&&(h=h.substring(0,s.column-p)),this.voidElements.hasOwnProperty(h.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,o,r){if("\n"==r){var i=n.getCursorPosition(),s=o.getLine(i.row),l=new a(o,i.row,i.column),u=l.getCurrentToken();if(u&&u.type.indexOf("tag-close")!==-1){for(;u&&u.type.indexOf("tag-name")===-1;)u=l.stepBackward();if(!u)return;var c=u.value,g=l.getCurrentTokenRow();if(u=l.stepBackward(),!u||u.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]){var d=o.getTokenAt(i.row,i.column+1),s=o.getLine(g),m=this.$getIndent(s),p=m+o.getTabString();return d&&"-1}var r=e("../../lib/oop"),i=(e("../../lib/lang"),e("../../range").Range),a=e("./fold_mode").FoldMode,s=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(e,t){a.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(l,a);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var o=this._getFirstTagInLine(e,n);return o?o.closing||!o.tagName&&o.selfClosing?"markbeginend"==t?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,o.tagName,o.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new u,i=0;i"==a.value;break}return r}if(o(a,"tag-close"))return r.selfClosing="/>"==a.value,r;r.start.column+=a.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var i=e.getTokens(t),a=0,s=0;s"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(t&&n.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,n){var o=this._getFirstTagInLine(e,n);if(!o)return null;var r,a=o.closing||o.selfClosing,l=[];if(a)for(var u=new s(e,n,o.end.column),c={row:n,column:o.start.column};r=this._readTagBackward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,i.fromPoints(r.start,r.end)}if(r.closing)l.push(r);else if(this._pop(l,r),0==l.length)return r.start.column+=r.tagName.length+2,i.fromPoints(r.start,c)}else for(var u=new s(e,n,o.start.column),g={row:n,column:o.start.column+o.tagName.length+2};r=this._readTagForward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,i.fromPoints(r.start,r.end)}if(r.closing){if(this._pop(l,r),0==l.length)return i.fromPoints(g,r.start)}else l.push(r)}}}).call(l.prototype)}),define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./text").Mode,a=e("./xml_highlight_rules").XmlHighlightRules,s=e("./behaviour/xml").XmlBehaviour,l=e("./folding/xml").FoldMode,u=function(){this.HighlightRules=a,this.$behaviour=new s,this.foldingRules=new l};o.inherits(u,i),function(){this.voidElements=r.arrayToMap([]),this.blockComment={start:""},this.$id="ace/mode/xml"}.call(u.prototype),t.Mode=u}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),i=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",u=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",m=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":s,"support.type":i,"support.constant.color":l,"support.constant.fonts":u},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};o.inherits(m,r),t.CssHighlightRules=m}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),i=e("../../token_iterator").TokenIterator,a=function(){this.inherit(r),this.add("colon","insertion",function(e,t,n,o,r){if(":"===r){var a=n.getCursorPosition(),s=new i(o,a.row,a.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var u=o.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if(":"===c)return{text:"",selection:[1,1]};if(!u.substring(a.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&":"===a){var s=n.getCursorPosition(),l=new i(o,s.row,s.column),u=l.getCurrentToken();if(u&&u.value.match(/\s+/)&&(u=l.stepBackward()),u&&"support.type"===u.type){var c=o.doc.getLine(r.start.row),g=c.substring(r.end.column,r.end.column+1);if(";"===g)return r.end.column++,r}}}),this.add("semicolon","insertion",function(e,t,n,o,r){if(";"===r){var i=n.getCursorPosition(),a=o.doc.getLine(i.row),s=a.substring(i.column,i.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};o.inherits(a,r),t.CssBehaviour=a}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e).tokens;if(r.length&&"comment"==r[r.length-1].type)return o;var i=t.match(/^.*\{\s*$/);return i&&(o+=n),o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./css_highlight_rules").CssHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=r.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),u=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(i,"css-","style"),this.embedTagRules(a,"js-","script"),this.constructor===u&&this.normalizeRules()};o.inherits(u,s),t.HtmlHighlightRules=u}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./fold_mode").FoldMode,i=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};o.inherits(i,r),function(){this.$getMode=function(e){"string"!=typeof e&&(e=e[0]);for(var t in this.subModes)if(0===e.indexOf(t))return this.subModes[t];return null},this.$tryMode=function(e,t,n,o){var r=this.$getMode(e);return r?r.getFoldWidget(t,n,o):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var o=this.$getMode(e.getState(n-1));return o&&o.getFoldWidget(e,t,n)||(o=this.$getMode(e.getState(n))),o&&o.getFoldWidget(e,t,n)||(o=this.defaultMode),o.getFoldWidgetRange(e,t,n)}}.call(i.prototype)}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./mixed").FoldMode,i=e("./xml").FoldMode,a=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){r.call(this,new i(e,t),{"js-":new a,"css-":new a})};o.inherits(s,r)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}function r(e,t){for(var n=new i(e,t.row,t.column),r=n.getCurrentToken();r&&!o(r,"tag-name");)r=n.stepBackward();if(r)return r.value}var i=e("../token_iterator").TokenIterator,a=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=a.concat(s),u={html:["manifest"],head:[],title:[],base:["href","target"],link:["href","hreflang","rel","media","type","sizes"],meta:["http-equiv","name","content","charset"],style:["type","media","scoped"],script:["charset","type","src","defer","async"],noscript:["href"],body:["onafterprint","onbeforeprint","onbeforeunload","onhashchange","onmessage","onoffline","onpopstate","onredo","onresize","onstorage","onundo","onunload"],section:[],nav:[],article:["pubdate"],aside:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],footer:[],address:[],main:[],p:[],hr:[],pre:[],blockquote:["cite"],ol:["start","reversed"],ul:[],li:["value"],dl:[],dt:[],dd:[],figure:[],figcaption:[],div:[],a:["href","target","ping","rel","media","hreflang","type"],em:[],strong:[],small:[],s:[],cite:[],q:["cite"],dfn:[],abbr:[],data:[],time:["datetime"],code:[],var:[],samp:[],kbd:[],sub:[],sup:[],i:[],b:[],u:[],mark:[],ruby:[],rt:[],rp:[],bdi:[],bdo:[],span:[],br:[],wbr:[],ins:["cite","datetime"],del:["cite","datetime"],img:["alt","src","height","width","usemap","ismap"],iframe:["name","src","height","width","sandbox","seamless"],embed:["src","height","width","type"],object:["param","data","type","height","width","usemap","name","form","classid"],param:["name","value"],video:["src","autobuffer","autoplay","loop","controls","width","height","poster"],audio:["src","autobuffer","autoplay","loop","controls"],source:["src","type","media"],track:["kind","src","srclang","label","default"],canvas:["width","height"],map:["name"],area:["shape","coords","href","hreflang","alt","target","media","rel","ping","type"],svg:[],math:[],table:["summary"],caption:[],colgroup:["span"],col:["span"],tbody:[],thead:[],tfoot:[],tr:[],td:["headers","rowspan","colspan"],th:["headers","rowspan","colspan","scope"],form:["accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],fieldset:["disabled","form","name"],legend:[],label:["form","for"],input:["type","accept","alt","autocomplete","checked","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","multiple","pattern","placeholder","readonly","required","size","src","step","width","files","value"],button:["autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","value","type"],select:["autofocus","disabled","form","multiple","name","size"],datalist:[],optgroup:["disabled","label"],option:["disabled","selected","label","value"],textarea:["autofocus","disabled","form","maxlength","name","placeholder","readonly","required","rows","cols","wrap"],keygen:["autofocus","challenge","disabled","form","keytype","name"],output:["for","form","name"],progress:["value","max"],meter:["value","min","max","low","high","optimum"],details:["open"],summary:[],command:["type","label","icon","disabled","checked","radiogroup","command"],menu:["type","label"],dialog:["open"]},c=Object.keys(u),g=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);return i?o(i,"tag-name")||o(i,"tag-open")||o(i,"end-tag-open")?this.getTagCompletions(e,t,n,r):o(i,"tag-whitespace")||o(i,"attribute-name")?this.getAttributeCompetions(e,t,n,r):[]:[]},this.getTagCompletions=function(e,t,n,o){return c.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompetions=function(e,t,n,o){var i=r(t,n);if(!i)return[];var a=l;return i in u&&(a=a.concat(u[i])),a.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})}}).call(g.prototype),t.HtmlCompletions=g}),define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./text").Mode,a=e("./javascript").Mode,s=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,g=e("./html_completions").HtmlCompletions,d=e("../worker/worker_client").WorkerClient,m=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],p=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],h=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new u,this.$completer=new g,this.createModeDelegates({"js-":a,"css-":s}),this.foldingRules=new c(this.voidElements,r.arrayToMap(p))};o.inherits(h,i),function(){this.blockComment={start:""},this.voidElements=r.arrayToMap(m),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,o){return this.$completer.getCompletions(e,t,n,o)},this.createWorker=function(e){if(this.constructor==h){var t=new d(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(h.prototype),t.Mode=h}),define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";function o(e,t){return{token:"support.function",regex:"^\\s*```"+e+"\\s*$",push:t+"start"}}var r=e("../lib/oop"),i=e("../lib/lang"),a=e("./text_highlight_rules").TextHighlightRules,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,l=e("./xml_highlight_rules").XmlHighlightRules,u=e("./html_highlight_rules").HtmlHighlightRules,c=e("./css_highlight_rules").CssHighlightRules,g=function(e){return"(?:[^"+i.escapeRegExp(e)+"\\\\]|\\\\.)*"},d=function(){u.call(this),this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(e){return"markup.heading."+e.length},regex:/^#{1,6}(?=\s*[^ #]|\s+#.)/,next:"header"},o("(?:javascript|js)","jscode-"),o("xml","xmlcode-"),o("html","htmlcode-"),o("css","csscode-"),{token:"support.function",regex:"^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",next:"githubblock"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+g("]")+")(\\]s*\\[)("+g("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\[)("+g("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+g('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:"(<)((?:https?|ftp|dict):[^'\">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)"}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},{token:"support.function",regex:"^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",next:"githubblock"},{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:[{token:"support.function",regex:"^\\s*```",next:"start"},{token:"support.function",regex:".+"}]}),this.embedRules(s,"jscode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.embedRules(u,"htmlcode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.embedRules(c,"csscode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.embedRules(l,"xmlcode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.normalizeRules()};r.inherits(d,a),t.MarkdownHighlightRules=d}),define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./fold_mode").FoldMode,i=e("../../range").Range,a=t.FoldMode=function(){};o.inherits(a,r),function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);return this.foldingStartMarker.test(o)?"`"==o[0]&&"start"==e.bgTokenizer.getState(n)?"end":"start":""},this.getFoldWidgetRange=function(e,t,n){function o(t){return g=e.getTokens(t)[0],g&&0===g.type.lastIndexOf(d,0)}function r(){var e=g.value[0];return"="==e?6:"-"==e?5:7-g.value.search(/[^#]/)}var a=e.getLine(n),s=a.length,l=e.getLength(),u=n,c=n;if(a.match(this.foldingStartMarker)){if("`"==a[0]){if("start"!==e.bgTokenizer.getState(n)){for(;++n0&&(a=e.getLine(n),!("`"==a[0]&"```"==a.substring(0,3))););return new i(n,a.length,u,0)}var g,d="markup.heading";if(o(n)){for(var m=r();++n=m)break}if(c=n-(g&&["=","-"].indexOf(g.value[0])!=-1?2:1),c>u)for(;c>u&&/^\s*$/.test(e.getLine(c));)c--;if(c>u){var h=e.getLine(c).length;return new i(u,s,c,h)}}}}}.call(a.prototype)}),define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/xml","ace/mode/html","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./javascript").Mode,a=e("./xml").Mode,s=e("./html").Mode,l=e("./markdown_highlight_rules").MarkdownHighlightRules,u=e("./folding/markdown").FoldMode,c=function(){this.HighlightRules=l,this.createModeDelegates({"js-":i,"xml-":a,"html-":s}),this.foldingRules=new u};o.inherits(c,r),function(){this.type="text",this.blockComment={start:""},this.getNextLineIndent=function(e,t,n){if("listblock"==e){var o=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(t);if(!o)return"";var r=o[2];return r||(r=parseInt(o[3],10)+1+"."),o[1]+r+o[4]}return this.$getIndent(t)},this.$id="ace/mode/markdown"}.call(c.prototype),t.Mode=c}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-mask.js b/www/js/vendor/ace/mode-mask.js index 30946efd6..d79cc28be 100755 --- a/www/js/vendor/ace/mode-mask.js +++ b/www/js/vendor/ace/mode-mask.js @@ -1,1981 +1,2 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; - -var escaped = function(ch) { - return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*"; -} - -function github_embed(tag, prefix) { - return { // Github style block - token : "support.function", - regex : "^\\s*```" + tag + "\\s*$", - push : prefix + "start" - }; -} - -var MarkdownHighlightRules = function() { - HtmlHighlightRules.call(this); - - this.$rules["start"].unshift({ - token : "empty_line", - regex : '^$', - next: "allowBlock" - }, { // h1 - token: "markup.heading.1", - regex: "^=+(?=\\s*$)" - }, { // h2 - token: "markup.heading.2", - regex: "^\\-+(?=\\s*$)" - }, { - token : function(value) { - return "markup.heading." + value.length; - }, - regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/, - next : "header" - }, - github_embed("(?:javascript|js)", "jscode-"), - github_embed("xml", "xmlcode-"), - github_embed("html", "htmlcode-"), - github_embed("css", "csscode-"), - { // Github style block - token : "support.function", - regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$", - next : "githubblock" - }, { // block quote - token : "string.blockquote", - regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", - next : "blockquote" - }, { // HR * - _ - token : "constant", - regex : "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$", - next: "allowBlock" - }, { // list - token : "markup.list", - regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", - next : "listblock-start" - }, { - include : "basic" - }); - - this.addRules({ - "basic" : [{ - token : "constant.language.escape", - regex : /\\[\\`*_{}\[\]()#+\-.!]/ - }, { // code span ` - token : "support.function", - regex : "(`+)(.*?[^`])(\\1)" - }, { // reference - token : ["text", "constant", "text", "url", "string", "text"], - regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$" - }, { // link by reference - token : ["text", "string", "text", "constant", "text"], - regex : "(\\[)(" + escaped("]") + ")(\\]\s*\\[)("+ escaped("]") + ")(\\])" - }, { // link by url - token : ["text", "string", "text", "markup.underline", "string", "text"], - regex : "(\\[)(" + // [ - escaped("]") + // link text - ")(\\]\\()"+ // ]( - '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href - '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" - "(\\))" // ) - }, { // strong ** __ - token : "string.strong", - regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)" - }, { // emphasis * _ - token : "string.emphasis", - regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)" - }, { // - token : ["text", "url", "text"], - regex : "(<)("+ - "(?:https?|ftp|dict):[^'\">\\s]+"+ - "|"+ - "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+ - ")(>)" - }], - "allowBlock": [ - {token : "support.function", regex : "^ {4}.+", next : "allowBlock"}, - {token : "empty", regex : "", next : "start"} - ], - - "header" : [{ - regex: "$", - next : "start" - }, { - include: "basic" - }, { - defaultToken : "heading" - } ], - - "listblock-start" : [{ - token : "support.variable", - regex : /(?:\[[ x]\])?/, - next : "listblock" - }], - - "listblock" : [ { // Lists only escape on completely blank lines. - token : "empty_line", - regex : "^$", - next : "start" - }, { // list - token : "markup.list", - regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", - next : "listblock-start" - }, { - include : "basic", noEscape: true - }, { // Github style block - token : "support.function", - regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$", - next : "githubblock" - }, { - defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly - } ], - - "blockquote" : [ { // Blockquotes only escape on blank lines. - token : "empty_line", - regex : "^\\s*$", - next : "start" - }, { // block quote - token : "string.blockquote", - regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", - next : "blockquote" - }, { - include : "basic", noEscape: true - }, { - defaultToken : "string.blockquote" - } ], - - "githubblock" : [ { - token : "support.function", - regex : "^\\s*```", - next : "start" - }, { - token : "support.function", - regex : ".+" - } ] - }); - - this.embedRules(JavaScriptHighlightRules, "jscode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.embedRules(HtmlHighlightRules, "htmlcode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.embedRules(CssHighlightRules, "csscode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.embedRules(XmlHighlightRules, "xmlcode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.normalizeRules(); -}; -oop.inherits(MarkdownHighlightRules, TextHighlightRules); - -exports.MarkdownHighlightRules = MarkdownHighlightRules; -}); - -define("ace/mode/mask_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/css_highlight_rules","ace/mode/markdown_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) { -"use strict"; - -exports.MaskHighlightRules = MaskHighlightRules; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextRules = require("./text_highlight_rules").TextHighlightRules; -var JSRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var CssRules = require("./css_highlight_rules").CssHighlightRules; -var MDRules = require("./markdown_highlight_rules").MarkdownHighlightRules; -var HTMLRules = require("./html_highlight_rules").HtmlHighlightRules; - -var token_TAG = "keyword.support.constant.language", - token_COMPO = "support.function.markup.bold", - token_KEYWORD = "keyword", - token_LANG = "constant.language", - token_UTIL = "keyword.control.markup.italic", - token_ATTR = "support.variable.class", - token_PUNKT = "keyword.operator", - token_ITALIC = "markup.italic", - token_BOLD = "markup.bold", - token_LPARE = "paren.lparen", - token_RPARE = "paren.rparen"; - -var const_FUNCTIONS, - const_KEYWORDS, - const_CONST, - const_TAGS; -(function(){ - const_FUNCTIONS = lang.arrayToMap( - ("log").split("|") - ); - const_CONST = lang.arrayToMap( - (":dualbind|:bind|:import|slot|event|style|html|markdown|md").split("|") - ); - const_KEYWORDS = lang.arrayToMap( - ("debugger|define|var|if|each|for|of|else|switch|case|with|visible|+if|+each|+for|+switch|+with|+visible|include|import").split("|") - ); - const_TAGS = lang.arrayToMap( - ("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" + - "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" + - "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" + - "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" + - "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" + - "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" + - "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" + - "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" + - "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|") - ); -}()); - -function MaskHighlightRules () { - - this.$rules = { - "start" : [ - Token("comment", "\\/\\/.*$"), - Token("comment", "\\/\\*", [ - Token("comment", ".*?\\*\\/", "start"), - Token("comment", ".+") - ]), - - Blocks.string("'''"), - Blocks.string('"""'), - Blocks.string('"'), - Blocks.string("'"), - - Blocks.syntax(/(markdown|md)\b/, "md-multiline", "multiline"), - Blocks.syntax(/html\b/, "html-multiline", "multiline"), - Blocks.syntax(/(slot|event)\b/, "js-block", "block"), - Blocks.syntax(/style\b/, "css-block", "block"), - Blocks.syntax(/var\b/, "js-statement", "attr"), - - Blocks.tag(), - - Token(token_LPARE, "[[({>]"), - Token(token_RPARE, "[\\])};]", "start"), - { - caseInsensitive: true - } - ] - }; - var rules = this; - - addJavaScript("interpolation", /\]/, token_RPARE + "." + token_ITALIC); - addJavaScript("statement", /\)|}|;/); - addJavaScript("block", /\}/); - addCss(); - addMarkdown(); - addHtml(); - - function addJavaScript(name, escape, closeType) { - var prfx = "js-" + name + "-", - rootTokens = name === "block" ? ["start"] : ["start", "no_regex"]; - add( - JSRules - , prfx - , escape - , rootTokens - , closeType - ); - } - function addCss() { - add(CssRules, "css-block-", /\}/); - } - function addMarkdown() { - add(MDRules, "md-multiline-", /("""|''')/, []); - } - function addHtml() { - add(HTMLRules, "html-multiline-", /("""|''')/); - } - function add(Rules, strPrfx, rgxEnd, rootTokens, closeType) { - var next = "pop"; - var tokens = rootTokens || [ "start" ]; - if (tokens.length === 0) { - tokens = null; - } - if (/block|multiline/.test(strPrfx)) { - next = strPrfx + "end"; - rules.$rules[next] = [ - Token("empty", "", "start") - ]; - } - rules.embedRules( - Rules - , strPrfx - , [ Token(closeType || token_RPARE, rgxEnd, next) ] - , tokens - , tokens == null ? true : false - ); - } - - this.normalizeRules(); -} -oop.inherits(MaskHighlightRules, TextRules); - -var Blocks = { - string: function(str, next){ - var token = Token( - "string.start" - , str - , [ - Token(token_LPARE + "." + token_ITALIC, /~\[/, Blocks.interpolation()), - Token("string.end", str, "pop"), - { - defaultToken: "string" - } - ] - , next - ); - if (str.length === 1){ - var escaped = Token("string.escape", "\\\\" + str); - token.push.unshift(escaped); - } - return token; - }, - interpolation: function(){ - return [ - Token(token_UTIL, /\s*\w*\s*:/), - "js-interpolation-start" - ]; - }, - tagHead: function (rgx) { - return Token(token_ATTR, rgx, [ - Token(token_ATTR, /[\w\-_]+/), - Token(token_LPARE + "." + token_ITALIC, /~\[/, Blocks.interpolation()), - Blocks.goUp() - ]); - }, - tag: function () { - return { - token: 'tag', - onMatch : function(value) { - if (void 0 !== const_KEYWORDS[value]) - return token_KEYWORD; - if (void 0 !== const_CONST[value]) - return token_LANG; - if (void 0 !== const_FUNCTIONS[value]) - return "support.function"; - if (void 0 !== const_TAGS[value.toLowerCase()]) - return token_TAG; - - return token_COMPO; - }, - regex : /([@\w\-_:+]+)|((^|\s)(?=\s*(\.|#)))/, - push: [ - Blocks.tagHead(/\./) , - Blocks.tagHead(/\#/) , - Blocks.expression(), - Blocks.attribute(), - - Token(token_LPARE, /[;>{]/, "pop") - ] - }; - }, - syntax: function(rgx, next, type){ - return { - token: token_LANG, - regex : rgx, - push: ({ - "attr": [ - next + "-start", - Token(token_PUNKT, /;/, "start") - ], - "multiline": [ - Blocks.tagHead(/\./) , - Blocks.tagHead(/\#/) , - Blocks.attribute(), - Blocks.expression(), - Token(token_LPARE, /[>\{]/), - Token(token_PUNKT, /;/, "start"), - Token(token_LPARE, /'''|"""/, [ next + "-start" ]) - ], - "block": [ - Blocks.tagHead(/\./) , - Blocks.tagHead(/\#/) , - Blocks.attribute(), - Blocks.expression(), - Token(token_LPARE, /\{/, [ next + "-start" ]) - ] - })[type] - }; - }, - attribute: function(){ - return Token(function(value){ - return /^x\-/.test(value) - ? token_ATTR + "." + token_BOLD - : token_ATTR; - }, /[\w_-]+/, [ - Token(token_PUNKT, /\s*=\s*/, [ - Blocks.string('"'), - Blocks.string("'"), - Blocks.word(), - Blocks.goUp() - ]), - Blocks.goUp() - ]); - }, - expression: function(){ - return Token(token_LPARE, /\(/, [ "js-statement-start" ]); - }, - word: function(){ - return Token("string", /[\w-_]+/); - }, - goUp: function(){ - return Token("text", "", "pop"); - }, - goStart: function(){ - return Token("text", "", "start"); - } -}; - - -function Token(token, rgx, mix) { - var push, next, onMatch; - if (arguments.length === 4) { - push = mix; - next = arguments[3]; - } - else if (typeof mix === "string") { - next = mix; - } - else { - push = mix; - } - if (typeof token === "function") { - onMatch = token; - token = "empty"; - } - return { - token: token, - regex: rgx, - push: push, - next: next, - onMatch: onMatch - }; -} - -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/mask",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mask_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var MaskHighlightRules = require("./mask_highlight_rules").MaskHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = MaskHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/mask"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(i,o),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+r+")(\\.)(prototype)(\\.)("+r+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:r},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(a,i),t.JavaScriptHighlightRules=a}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),i=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",u=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",p=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":s,"support.type":i,"support.constant.color":l,"support.constant.fonts":u},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};r.inherits(p,o),t.CssHighlightRules=p}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===i&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(o.prototype),r.inherits(i,o),t.XmlHighlightRules=i}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/lang"),i=e("./css_highlight_rules").CssHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=o.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),u=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(i,"css-","style"),this.embedTagRules(a,"js-","script"),this.constructor===u&&this.normalizeRules()};r.inherits(u,s),t.HtmlHighlightRules=u}),define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,n){"use strict";function r(e,t){return{token:"support.function",regex:"^\\s*```"+e+"\\s*$",push:t+"start"}}var o=e("../lib/oop"),i=e("../lib/lang"),a=e("./text_highlight_rules").TextHighlightRules,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,l=e("./xml_highlight_rules").XmlHighlightRules,u=e("./html_highlight_rules").HtmlHighlightRules,c=e("./css_highlight_rules").CssHighlightRules,g=function(e){return"(?:[^"+i.escapeRegExp(e)+"\\\\]|\\\\.)*"},d=function(){u.call(this),this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(e){return"markup.heading."+e.length},regex:/^#{1,6}(?=\s*[^ #]|\s+#.)/,next:"header"},r("(?:javascript|js)","jscode-"),r("xml","xmlcode-"),r("html","htmlcode-"),r("css","csscode-"),{token:"support.function",regex:"^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",next:"githubblock"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+g("]")+")(\\]s*\\[)("+g("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\[)("+g("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+g('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:"(<)((?:https?|ftp|dict):[^'\">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)"}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},{token:"support.function",regex:"^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",next:"githubblock"},{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:[{token:"support.function",regex:"^\\s*```",next:"start"},{token:"support.function",regex:".+"}]}),this.embedRules(s,"jscode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.embedRules(u,"htmlcode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.embedRules(c,"csscode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.embedRules(l,"xmlcode-",[{token:"support.function",regex:"^\\s*```",next:"pop"}]),this.normalizeRules()};o.inherits(d,a),t.MarkdownHighlightRules=d}),define("ace/mode/mask_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/css_highlight_rules","ace/mode/markdown_highlight_rules","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";function r(){function e(e,t,n){var r="js-"+e+"-",o="block"===e?["start"]:["start","no_regex"];i(d,r,t,o,n)}function t(){i(p,"css-block-",/\}/)}function n(){i(m,"md-multiline-",/("""|''')/,[])}function r(){i(h,"html-multiline-",/("""|''')/)}function i(e,t,n,r,i){var s="pop",l=r||["start"];0===l.length&&(l=null),/block|multiline/.test(t)&&(s=t+"end",a.$rules[s]=[o("empty","","start")]),a.embedRules(e,t,[o(i||T,n,s)],l,null==l)}this.$rules={start:[o("comment","\\/\\/.*$"),o("comment","\\/\\*",[o("comment",".*?\\*\\/","start"),o("comment",".+")]),C.string("'''"),C.string('"""'),C.string('"'),C.string("'"),C.syntax(/(markdown|md)\b/,"md-multiline","multiline"),C.syntax(/html\b/,"html-multiline","multiline"),C.syntax(/(slot|event)\b/,"js-block","block"),C.syntax(/style\b/,"css-block","block"),C.syntax(/var\b/,"js-statement","attr"),C.tag(),o(I,"[[({>]"),o(T,"[\\])};]","start"),{caseInsensitive:!0}]};var a=this;e("interpolation",/\]/,T+"."+w),e("statement",/\)|}|;/),e("block",/\}/),t(),n(),r(),this.normalizeRules()}function o(e,t,n){var r,o,i;return 4===arguments.length?(r=n,o=arguments[3]):"string"==typeof n?o=n:r=n,"function"==typeof e&&(i=e,e="empty"),{token:e,regex:t,push:r,next:o,onMatch:i}}t.MaskHighlightRules=r;var i,a,s,l,u=e("../lib/oop"),c=e("../lib/lang"),g=e("./text_highlight_rules").TextHighlightRules,d=e("./javascript_highlight_rules").JavaScriptHighlightRules,p=e("./css_highlight_rules").CssHighlightRules,m=e("./markdown_highlight_rules").MarkdownHighlightRules,h=e("./html_highlight_rules").HtmlHighlightRules,x="keyword.support.constant.language",f="support.function.markup.bold",b="keyword",k="constant.language",y="keyword.control.markup.italic",v="support.variable.class",_="keyword.operator",w="markup.italic",R="markup.bold",I="paren.lparen",T="paren.rparen"; +!function(){i=c.arrayToMap("log".split("|")),s=c.arrayToMap(":dualbind|:bind|:import|slot|event|style|html|markdown|md".split("|")),a=c.arrayToMap("debugger|define|var|if|each|for|of|else|switch|case|with|visible|+if|+each|+for|+switch|+with|+visible|include|import".split("|")),l=c.arrayToMap("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp".split("|"))}(),u.inherits(r,g);var C={string:function(e,t){var n=o("string.start",e,[o(I+"."+w,/~\[/,C.interpolation()),o("string.end",e,"pop"),{defaultToken:"string"}],t);if(1===e.length){var r=o("string.escape","\\\\"+e);n.push.unshift(r)}return n},interpolation:function(){return[o(y,/\s*\w*\s*:/),"js-interpolation-start"]},tagHead:function(e){return o(v,e,[o(v,/[\w\-_]+/),o(I+"."+w,/~\[/,C.interpolation()),C.goUp()])},tag:function(){return{token:"tag",onMatch:function(e){return void 0!==a[e]?b:void 0!==s[e]?k:void 0!==i[e]?"support.function":void 0!==l[e.toLowerCase()]?x:f},regex:/([@\w\-_:+]+)|((^|\s)(?=\s*(\.|#)))/,push:[C.tagHead(/\./),C.tagHead(/\#/),C.expression(),C.attribute(),o(I,/[;>{]/,"pop")]}},syntax:function(e,t,n){return{token:k,regex:e,push:{attr:[t+"-start",o(_,/;/,"start")],multiline:[C.tagHead(/\./),C.tagHead(/\#/),C.attribute(),C.expression(),o(I,/[>\{]/),o(_,/;/,"start"),o(I,/'''|"""/,[t+"-start"])],block:[C.tagHead(/\./),C.tagHead(/\#/),C.attribute(),C.expression(),o(I,/\{/,[t+"-start"])]}[n]}},attribute:function(){return o(function(e){return/^x\-/.test(e)?v+"."+R:v},/[\w_-]+/,[o(_,/\s*=\s*/,[C.string('"'),C.string("'"),C.word(),C.goUp()]),C.goUp()])},expression:function(){return o(I,/\(/,["js-statement-start"])},word:function(){return o("string",/[\w-_]+/)},goUp:function(){return o("text","","pop")},goStart:function(){return o("text","","start")}}}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?r=c[t]:void(r=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,i){var a=n.getCursorPosition(),l=o.doc.getLine(a.row);if("{"==i){g(n);var u=n.getSelectionRange(),c=o.doc.getTextRange(u);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return{text:"{"+c+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var p=l.substring(a.column,a.column+1);if("}"==p){var m=o.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==m&&d.isAutoInsertedClosing(a,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var h="";d.isMaybeInsertedClosing(a,l)&&(h=s.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var p=l.substring(a.column,a.column+1);if("}"===p){var x=o.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!x)return null;var f=this.$getIndent(o.getLine(x.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var f=this.$getIndent(l)}var b=f+o.getTabString();return{text:"\n"+b+"\n"+f+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){g(n);var s=o.doc.getLine(i.start.row),l=s.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){g(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){g(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var i=o,a=n.getSelectionRange(),s=r.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var l=n.getCursorPosition(),u=r.doc.getLine(l.row),c=u.substring(l.column-1,l.column),d=u.substring(l.column,l.column+1),p=r.getTokenAt(l.row,l.column),m=r.getTokenAt(l.row,l.column+1);if("\\"==c&&p&&/escape/.test(p.type))return null;var h,x=p&&/string/.test(p.type),f=!m||/string/.test(m.type);if(d==i)h=x!==f;else{if(x&&!f)return null;if(x&&f)return null;var b=r.$mode.tokenRe;b.lastIndex=0;var k=b.test(c);b.lastIndex=0;var y=b.test(c);if(k||y)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){g(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(s==i)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){var o=new a(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",u)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),i=e("../../token_iterator").TokenIterator,a=function(){this.inherit(o),this.add("colon","insertion",function(e,t,n,r,o){if(":"===o){var a=n.getCursorPosition(),s=new i(r,a.row,a.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var u=r.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if(":"===c)return{text:"",selection:[1,1]};if(!u.substring(a.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&":"===a){var s=n.getCursorPosition(),l=new i(r,s.row,s.column),u=l.getCurrentToken();if(u&&u.value.match(/\s+/)&&(u=l.stepBackward()),u&&"support.type"===u.type){var c=r.doc.getLine(o.start.row),g=c.substring(o.end.column,o.end.column+1);if(";"===g)return o.end.column++,o}}}),this.add("semicolon","insertion",function(e,t,n,r,o){if(";"===o){var i=n.getCursorPosition(),a=r.doc.getLine(i.row),s=a.substring(i.column,i.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};r.inherits(a,o),t.CssBehaviour=a}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var i=o.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),i=t,a=n.length;t+=1;for(var s=t,l=e.getLength();++tu)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=i)break;if(c.isMultiLine())t=c.end.row;else if(r==u)break}s=t}}return new o(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++na)return new o(a,r,c,t.length)}}.call(a.prototype)}),define("ace/mode/mask",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mask_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./mask_highlight_rules").MaskHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new s,this.foldingRules=new l};r.inherits(u,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e).tokens;if(o.length&&"comment"==o[o.length-1].type)return r;var i=t.match(/^.*\{\s*$/);return i&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/mask"}.call(u.prototype),t.Mode=u}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-matlab.js b/www/js/vendor/ace/mode-matlab.js index 54e5d0378..61c40275a 100755 --- a/www/js/vendor/ace/mode-matlab.js +++ b/www/js/vendor/ace/mode-matlab.js @@ -1,256 +1 @@ -define("ace/mode/matlab_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var MatlabHighlightRules = function() { - -var keywords = ( - "break|case|catch|classdef|continue|else|elseif|end|for|function|global|if|otherwise|parfor|persistent|return|spmd|switch|try|while" - ); - - var builtinConstants = ( - "true|false|inf|Inf|nan|NaN|eps|pi|ans|nargin|nargout|varargin|varargout" - ); - - var builtinFunctions = ( - "abs|accumarray|acos(?:d|h)?|acot(?:d|h)?|acsc(?:d|h)?|actxcontrol(?:list|select)?|actxGetRunningServer|actxserver|addlistener|addpath|addpref|addtodate|"+ - "airy|align|alim|all|allchild|alpha|alphamap|amd|ancestor|and|angle|annotation|any|area|arrayfun|asec(?:d|h)?|asin(?:d|h)?|assert|assignin|atan(?:2|d|h)?|" + - "audiodevinfo|audioplayer|audiorecorder|aufinfo|auread|autumn|auwrite|avifile|aviinfo|aviread|axes|axis|balance|bar(?:3|3h|h)?|base2dec|beep|BeginInvoke|bench|"+ - "bessel(?:h|i|j|k|y)|beta|betainc|betaincinv|betaln|bicg|bicgstab|bicgstabl|bin2dec|bitand|bitcmp|bitget|bitmax|bitnot|bitor|bitset|bitshift|bitxor|blanks|blkdiag|"+ - "bone|box|brighten|brush|bsxfun|builddocsearchdb|builtin|bvp4c|bvp5c|bvpget|bvpinit|bvpset|bvpxtend|calendar|calllib|callSoapService|camdolly|cameratoolbar|camlight|"+ - "camlookat|camorbit|campan|campos|camproj|camroll|camtarget|camup|camva|camzoom|cart2pol|cart2sph|cast|cat|caxis|cd|cdf2rdf|cdfepoch|cdfinfo|cdflib(?:\.(?:close|closeVar|"+ - "computeEpoch|computeEpoch16|create|createAttr|createVar|delete|deleteAttr|deleteAttrEntry|deleteAttrgEntry|deleteVar|deleteVarRecords|epoch16Breakdown|epochBreakdown|getAttrEntry|"+ - "getAttrgEntry|getAttrMaxEntry|getAttrMaxgEntry|getAttrName|getAttrNum|getAttrScope|getCacheSize|getChecksum|getCompression|getCompressionCacheSize|getConstantNames|"+ - "getConstantValue|getCopyright|getFileBackward|getFormat|getLibraryCopyright|getLibraryVersion|getMajority|getName|getNumAttrEntries|getNumAttrgEntries|getNumAttributes|"+ - "getNumgAttributes|getReadOnlyMode|getStageCacheSize|getValidate|getVarAllocRecords|getVarBlockingFactor|getVarCacheSize|getVarCompression|getVarData|getVarMaxAllocRecNum|"+ - "getVarMaxWrittenRecNum|getVarName|getVarNum|getVarNumRecsWritten|getVarPadValue|getVarRecordData|getVarReservePercent|getVarsMaxWrittenRecNum|getVarSparseRecords|getVersion|"+ - "hyperGetVarData|hyperPutVarData|inquire|inquireAttr|inquireAttrEntry|inquireAttrgEntry|inquireVar|open|putAttrEntry|putAttrgEntry|putVarData|putVarRecordData|renameAttr|"+ - "renameVar|setCacheSize|setChecksum|setCompression|setCompressionCacheSize|setFileBackward|setFormat|setMajority|setReadOnlyMode|setStageCacheSize|setValidate|"+ - "setVarAllocBlockRecords|setVarBlockingFactor|setVarCacheSize|setVarCompression|setVarInitialRecs|setVarPadValue|SetVarReservePercent|setVarsCacheSize|setVarSparseRecords))?|"+ - "cdfread|cdfwrite|ceil|cell2mat|cell2struct|celldisp|cellfun|cellplot|cellstr|cgs|checkcode|checkin|checkout|chol|cholinc|cholupdate|circshift|cla|clabel|class|clc|clear|"+ - "clearvars|clf|clipboard|clock|close|closereq|cmopts|cmpermute|cmunique|colamd|colon|colorbar|colordef|colormap|colormapeditor|colperm|Combine|comet|comet3|commandhistory|"+ - "commandwindow|compan|compass|complex|computer|cond|condeig|condest|coneplot|conj|containers\.Map|contour(?:3|c|f|slice)?|contrast|conv|conv2|convhull|convhulln|convn|cool|"+ - "copper|copyfile|copyobj|corrcoef|cos(?:d|h)?|cot(?:d|h)?|cov|cplxpair|cputime|createClassFromWsdl|createSoapMessage|cross|csc(?:d|h)?|csvread|csvwrite|ctranspose|cumprod|"+ - "cumsum|cumtrapz|curl|customverctrl|cylinder|daqread|daspect|datacursormode|datatipinfo|date|datenum|datestr|datetick|datevec|dbclear|dbcont|dbdown|dblquad|dbmex|dbquit|"+ - "dbstack|dbstatus|dbstep|dbstop|dbtype|dbup|dde23|ddeget|ddesd|ddeset|deal|deblank|dec2base|dec2bin|dec2hex|decic|deconv|del2|delaunay|delaunay3|delaunayn|DelaunayTri|delete|"+ - "demo|depdir|depfun|det|detrend|deval|diag|dialog|diary|diff|diffuse|dir|disp|display|dither|divergence|dlmread|dlmwrite|dmperm|doc|docsearch|dos|dot|dragrect|drawnow|dsearch|"+ - "dsearchn|dynamicprops|echo|echodemo|edit|eig|eigs|ellipj|ellipke|ellipsoid|empty|enableNETfromNetworkDrive|enableservice|EndInvoke|enumeration|eomday|eq|erf|erfc|erfcinv|"+ - "erfcx|erfinv|error|errorbar|errordlg|etime|etree|etreeplot|eval|evalc|evalin|event\.(?:EventData|listener|PropertyEvent|proplistener)|exifread|exist|exit|exp|expint|expm|"+ - "expm1|export2wsdlg|eye|ezcontour|ezcontourf|ezmesh|ezmeshc|ezplot|ezplot3|ezpolar|ezsurf|ezsurfc|factor|factorial|fclose|feather|feature|feof|ferror|feval|fft|fft2|fftn|"+ - "fftshift|fftw|fgetl|fgets|fieldnames|figure|figurepalette|fileattrib|filebrowser|filemarker|fileparts|fileread|filesep|fill|fill3|filter|filter2|find|findall|findfigs|"+ - "findobj|findstr|finish|fitsdisp|fitsinfo|fitsread|fitswrite|fix|flag|flipdim|fliplr|flipud|floor|flow|fminbnd|fminsearch|fopen|format|fplot|fprintf|frame2im|fread|freqspace|"+ - "frewind|fscanf|fseek|ftell|FTP|full|fullfile|func2str|functions|funm|fwrite|fzero|gallery|gamma|gammainc|gammaincinv|gammaln|gca|gcbf|gcbo|gcd|gcf|gco|ge|genpath|genvarname|"+ - "get|getappdata|getenv|getfield|getframe|getpixelposition|getpref|ginput|gmres|gplot|grabcode|gradient|gray|graymon|grid|griddata(?:3|n)?|griddedInterpolant|gsvd|gt|gtext|"+ - "guidata|guide|guihandles|gunzip|gzip|h5create|h5disp|h5info|h5read|h5readatt|h5write|h5writeatt|hadamard|handle|hankel|hdf|hdf5|hdf5info|hdf5read|hdf5write|hdfinfo|"+ - "hdfread|hdftool|help|helpbrowser|helpdesk|helpdlg|helpwin|hess|hex2dec|hex2num|hgexport|hggroup|hgload|hgsave|hgsetget|hgtransform|hidden|hilb|hist|histc|hold|home|horzcat|"+ - "hostid|hot|hsv|hsv2rgb|hypot|ichol|idivide|ifft|ifft2|ifftn|ifftshift|ilu|im2frame|im2java|imag|image|imagesc|imapprox|imfinfo|imformats|import|importdata|imread|imwrite|"+ - "ind2rgb|ind2sub|inferiorto|info|inline|inmem|inpolygon|input|inputdlg|inputname|inputParser|inspect|instrcallback|instrfind|instrfindall|int2str|integral(?:2|3)?|interp(?:1|"+ - "1q|2|3|ft|n)|interpstreamspeed|intersect|intmax|intmin|inv|invhilb|ipermute|isa|isappdata|iscell|iscellstr|ischar|iscolumn|isdir|isempty|isequal|isequaln|isequalwithequalnans|"+ - "isfield|isfinite|isfloat|isglobal|ishandle|ishghandle|ishold|isinf|isinteger|isjava|iskeyword|isletter|islogical|ismac|ismatrix|ismember|ismethod|isnan|isnumeric|isobject|"+ - "isocaps|isocolors|isonormals|isosurface|ispc|ispref|isprime|isprop|isreal|isrow|isscalar|issorted|isspace|issparse|isstr|isstrprop|isstruct|isstudent|isunix|isvarname|"+ - "isvector|javaaddpath|javaArray|javachk|javaclasspath|javacomponent|javaMethod|javaMethodEDT|javaObject|javaObjectEDT|javarmpath|jet|keyboard|kron|lasterr|lasterror|"+ - "lastwarn|lcm|ldivide|ldl|le|legend|legendre|length|libfunctions|libfunctionsview|libisloaded|libpointer|libstruct|license|light|lightangle|lighting|lin2mu|line|lines|"+ - "linkaxes|linkdata|linkprop|linsolve|linspace|listdlg|listfonts|load|loadlibrary|loadobj|log|log10|log1p|log2|loglog|logm|logspace|lookfor|lower|ls|lscov|lsqnonneg|lsqr|"+ - "lt|lu|luinc|magic|makehgtform|mat2cell|mat2str|material|matfile|matlab\.io\.MatFile|matlab\.mixin\.(?:Copyable|Heterogeneous(?:\.getDefaultScalarElement)?)|matlabrc|"+ - "matlabroot|max|maxNumCompThreads|mean|median|membrane|memmapfile|memory|menu|mesh|meshc|meshgrid|meshz|meta\.(?:class(?:\.fromName)?|DynamicProperty|EnumeratedValue|event|"+ - "MetaData|method|package(?:\.(?:fromName|getAllPackages))?|property)|metaclass|methods|methodsview|mex(?:\.getCompilerConfigurations)?|MException|mexext|mfilename|min|minres|"+ - "minus|mislocked|mkdir|mkpp|mldivide|mlint|mlintrpt|mlock|mmfileinfo|mmreader|mod|mode|more|move|movefile|movegui|movie|movie2avi|mpower|mrdivide|msgbox|mtimes|mu2lin|"+ - "multibandread|multibandwrite|munlock|namelengthmax|nargchk|narginchk|nargoutchk|native2unicode|nccreate|ncdisp|nchoosek|ncinfo|ncread|ncreadatt|ncwrite|ncwriteatt|"+ - "ncwriteschema|ndgrid|ndims|ne|NET(?:\.(?:addAssembly|Assembly|convertArray|createArray|createGeneric|disableAutoRelease|enableAutoRelease|GenericClass|invokeGenericMethod|"+ - "NetException|setStaticProperty))?|netcdf\.(?:abort|close|copyAtt|create|defDim|defGrp|defVar|defVarChunking|defVarDeflate|defVarFill|defVarFletcher32|delAtt|endDef|getAtt|"+ - "getChunkCache|getConstant|getConstantNames|getVar|inq|inqAtt|inqAttID|inqAttName|inqDim|inqDimID|inqDimIDs|inqFormat|inqGrpName|inqGrpNameFull|inqGrpParent|inqGrps|"+ - "inqLibVers|inqNcid|inqUnlimDims|inqVar|inqVarChunking|inqVarDeflate|inqVarFill|inqVarFletcher32|inqVarID|inqVarIDs|open|putAtt|putVar|reDef|renameAtt|renameDim|renameVar|"+ - "setChunkCache|setDefaultFormat|setFill|sync)|newplot|nextpow2|nnz|noanimate|nonzeros|norm|normest|not|notebook|now|nthroot|null|num2cell|num2hex|num2str|numel|nzmax|"+ - "ode(?:113|15i|15s|23|23s|23t|23tb|45)|odeget|odeset|odextend|onCleanup|ones|open|openfig|opengl|openvar|optimget|optimset|or|ordeig|orderfields|ordqz|ordschur|orient|"+ - "orth|pack|padecoef|pagesetupdlg|pan|pareto|parseSoapResponse|pascal|patch|path|path2rc|pathsep|pathtool|pause|pbaspect|pcg|pchip|pcode|pcolor|pdepe|pdeval|peaks|perl|perms|"+ - "permute|pie|pink|pinv|planerot|playshow|plot|plot3|plotbrowser|plotedit|plotmatrix|plottools|plotyy|plus|pol2cart|polar|poly|polyarea|polyder|polyeig|polyfit|polyint|polyval|"+ - "polyvalm|pow2|power|ppval|prefdir|preferences|primes|print|printdlg|printopt|printpreview|prod|profile|profsave|propedit|propertyeditor|psi|publish|PutCharArray|PutFullMatrix|"+ - "PutWorkspaceData|pwd|qhull|qmr|qr|qrdelete|qrinsert|qrupdate|quad|quad2d|quadgk|quadl|quadv|questdlg|quit|quiver|quiver3|qz|rand|randi|randn|randperm|RandStream(?:\.(?:create|"+ - "getDefaultStream|getGlobalStream|list|setDefaultStream|setGlobalStream))?|rank|rat|rats|rbbox|rcond|rdivide|readasync|real|reallog|realmax|realmin|realpow|realsqrt|record|"+ - "rectangle|rectint|recycle|reducepatch|reducevolume|refresh|refreshdata|regexp|regexpi|regexprep|regexptranslate|rehash|rem|Remove|RemoveAll|repmat|reset|reshape|residue|"+ - "restoredefaultpath|rethrow|rgb2hsv|rgb2ind|rgbplot|ribbon|rmappdata|rmdir|rmfield|rmpath|rmpref|rng|roots|rose|rosser|rot90|rotate|rotate3d|round|rref|rsf2csf|run|save|saveas|"+ - "saveobj|savepath|scatter|scatter3|schur|sec|secd|sech|selectmoveresize|semilogx|semilogy|sendmail|serial|set|setappdata|setdiff|setenv|setfield|setpixelposition|setpref|setstr|"+ - "setxor|shading|shg|shiftdim|showplottool|shrinkfaces|sign|sin(?:d|h)?|size|slice|smooth3|snapnow|sort|sortrows|sound|soundsc|spalloc|spaugment|spconvert|spdiags|specular|speye|"+ - "spfun|sph2cart|sphere|spinmap|spline|spones|spparms|sprand|sprandn|sprandsym|sprank|spring|sprintf|spy|sqrt|sqrtm|squeeze|ss2tf|sscanf|stairs|startup|std|stem|stem3|stopasync|"+ - "str2double|str2func|str2mat|str2num|strcat|strcmp|strcmpi|stream2|stream3|streamline|streamparticles|streamribbon|streamslice|streamtube|strfind|strjust|strmatch|strncmp|"+ - "strncmpi|strread|strrep|strtok|strtrim|struct2cell|structfun|strvcat|sub2ind|subplot|subsasgn|subsindex|subspace|subsref|substruct|subvolume|sum|summer|superclasses|superiorto|"+ - "support|surf|surf2patch|surface|surfc|surfl|surfnorm|svd|svds|swapbytes|symamd|symbfact|symmlq|symrcm|symvar|system|tan(?:d|h)?|tar|tempdir|tempname|tetramesh|texlabel|text|"+ - "textread|textscan|textwrap|tfqmr|throw|tic|Tiff(?:\.(?:getTagNames|getVersion))?|timer|timerfind|timerfindall|times|timeseries|title|toc|todatenum|toeplitz|toolboxdir|trace|"+ - "transpose|trapz|treelayout|treeplot|tril|trimesh|triplequad|triplot|TriRep|TriScatteredInterp|trisurf|triu|tscollection|tsearch|tsearchn|tstool|type|typecast|uibuttongroup|"+ - "uicontextmenu|uicontrol|uigetdir|uigetfile|uigetpref|uiimport|uimenu|uiopen|uipanel|uipushtool|uiputfile|uiresume|uisave|uisetcolor|uisetfont|uisetpref|uistack|uitable|"+ - "uitoggletool|uitoolbar|uiwait|uminus|undocheckout|unicode2native|union|unique|unix|unloadlibrary|unmesh|unmkpp|untar|unwrap|unzip|uplus|upper|urlread|urlwrite|usejava|"+ - "userpath|validateattributes|validatestring|vander|var|vectorize|ver|verctrl|verLessThan|version|vertcat|VideoReader(?:\.isPlatformSupported)?|VideoWriter(?:\.getProfiles)?|"+ - "view|viewmtx|visdiff|volumebounds|voronoi|voronoin|wait|waitbar|waitfor|waitforbuttonpress|warndlg|warning|waterfall|wavfinfo|wavplay|wavread|wavrecord|wavwrite|web|weekday|"+ - "what|whatsnew|which|whitebg|who|whos|wilkinson|winopen|winqueryreg|winter|wk1finfo|wk1read|wk1write|workspace|xlabel|xlim|xlsfinfo|xlsread|xlswrite|xmlread|xmlwrite|xor|xslt|"+ - "ylabel|ylim|zeros|zip|zlabel|zlim|zoom|addedvarplot|andrewsplot|anova(?:1|2|n)|ansaribradley|aoctool|barttest|bbdesign|beta(?:cdf|fit|inv|like|pdf|rnd|stat)|bino(?:cdf|fit|inv|"+ - "pdf|rnd|stat)|biplot|bootci|bootstrp|boxplot|candexch|candgen|canoncorr|capability|capaplot|caseread|casewrite|categorical|ccdesign|cdfplot|chi2(?:cdf|gof|inv|pdf|rnd|stat)|"+ - "cholcov|Classification(?:BaggedEnsemble|Discriminant(?:\.(?:fit|make|template))?|Ensemble|KNN(?:\.(?:fit|template))?|PartitionedEnsemble|PartitionedModel|Tree(?:\.(?:fit|"+ - "template))?)|classify|classregtree|cluster|clusterdata|cmdscale|combnk|Compact(?:Classification(?:Discriminant|Ensemble|Tree)|Regression(?:Ensemble|Tree)|TreeBagger)|confusionmat|"+ - "controlchart|controlrules|cophenet|copula(?:cdf|fit|param|pdf|rnd|stat)|cordexch|corr|corrcov|coxphfit|createns|crosstab|crossval|cvpartition|datasample|dataset|daugment|dcovary|"+ - "dendrogram|dfittool|disttool|dummyvar|dwtest|ecdf|ecdfhist|ev(?:cdf|fit|inv|like|pdf|rnd|stat)|ExhaustiveSearcher|exp(?:cdf|fit|inv|like|pdf|rnd|stat)|factoran|fcdf|ff2n|finv|"+ - "fitdist|fitensemble|fpdf|fracfact|fracfactgen|friedman|frnd|fstat|fsurfht|fullfact|gagerr|gam(?:cdf|fit|inv|like|pdf|rnd|stat)|GeneralizedLinearModel(?:\.fit)?|geo(?:cdf|inv|mean|"+ - "pdf|rnd|stat)|gev(?:cdf|fit|inv|like|pdf|rnd|stat)|gline|glmfit|glmval|glyphplot|gmdistribution(?:\.fit)?|gname|gp(?:cdf|fit|inv|like|pdf|rnd|stat)|gplotmatrix|grp2idx|grpstats|"+ - "gscatter|haltonset|harmmean|hist3|histfit|hmm(?:decode|estimate|generate|train|viterbi)|hougen|hyge(?:cdf|inv|pdf|rnd|stat)|icdf|inconsistent|interactionplot|invpred|iqr|iwishrnd|"+ - "jackknife|jbtest|johnsrnd|KDTreeSearcher|kmeans|knnsearch|kruskalwallis|ksdensity|kstest|kstest2|kurtosis|lasso|lassoglm|lassoPlot|leverage|lhsdesign|lhsnorm|lillietest|"+ - "LinearModel(?:\.fit)?|linhyptest|linkage|logn(?:cdf|fit|inv|like|pdf|rnd|stat)|lsline|mad|mahal|maineffectsplot|manova1|manovacluster|mdscale|mhsample|mle|mlecov|mnpdf|"+ - "mnrfit|mnrnd|mnrval|moment|multcompare|multivarichart|mvn(?:cdf|pdf|rnd)|mvregress|mvregresslike|mvt(?:cdf|pdf|rnd)|NaiveBayes(?:\.fit)?|nan(?:cov|max|mean|median|min|std|"+ - "sum|var)|nbin(?:cdf|fit|inv|pdf|rnd|stat)|ncf(?:cdf|inv|pdf|rnd|stat)|nct(?:cdf|inv|pdf|rnd|stat)|ncx2(?:cdf|inv|pdf|rnd|stat)|NeighborSearcher|nlinfit|nlintool|nlmefit|nlmefitsa|"+ - "nlparci|nlpredci|nnmf|nominal|NonLinearModel(?:\.fit)?|norm(?:cdf|fit|inv|like|pdf|rnd|stat)|normplot|normspec|ordinal|outlierMeasure|parallelcoords|paretotails|partialcorr|"+ - "pcacov|pcares|pdf|pdist|pdist2|pearsrnd|perfcurve|perms|piecewisedistribution|plsregress|poiss(?:cdf|fit|inv|pdf|rnd|tat)|polyconf|polytool|prctile|princomp|ProbDist(?:Kernel|"+ - "Parametric|UnivKernel|UnivParam)?|probplot|procrustes|qqplot|qrandset|qrandstream|quantile|randg|random|randsample|randtool|range|rangesearch|ranksum|rayl(?:cdf|fit|inv|pdf|"+ - "rnd|stat)|rcoplot|refcurve|refline|regress|Regression(?:BaggedEnsemble|Ensemble|PartitionedEnsemble|PartitionedModel|Tree(?:\.(?:fit|template))?)|regstats|relieff|ridge|"+ - "robustdemo|robustfit|rotatefactors|rowexch|rsmdemo|rstool|runstest|sampsizepwr|scatterhist|sequentialfs|signrank|signtest|silhouette|skewness|slicesample|sobolset|squareform|"+ - "statget|statset|stepwise|stepwisefit|surfht|tabulate|tblread|tblwrite|tcdf|tdfread|tiedrank|tinv|tpdf|TreeBagger|treedisp|treefit|treeprune|treetest|treeval|trimmean|trnd|tstat|"+ - "ttest|ttest2|unid(?:cdf|inv|pdf|rnd|stat)|unif(?:cdf|inv|it|pdf|rnd|stat)|vartest(?:2|n)?|wbl(?:cdf|fit|inv|like|pdf|rnd|stat)|wblplot|wishrnd|x2fx|xptread|zscore|ztest"+ - "adapthisteq|analyze75info|analyze75read|applycform|applylut|axes2pix|bestblk|blockproc|bwarea|bwareaopen|bwboundaries|bwconncomp|bwconvhull|bwdist|bwdistgeodesic|bweuler|"+ - "bwhitmiss|bwlabel|bwlabeln|bwmorph|bwpack|bwperim|bwselect|bwtraceboundary|bwulterode|bwunpack|checkerboard|col2im|colfilt|conndef|convmtx2|corner|cornermetric|corr2|cp2tform|"+ - "cpcorr|cpselect|cpstruct2pairs|dct2|dctmtx|deconvblind|deconvlucy|deconvreg|deconvwnr|decorrstretch|demosaic|dicom(?:anon|dict|info|lookup|read|uid|write)|edge|edgetaper|entropy|"+ - "entropyfilt|fan2para|fanbeam|findbounds|fliptform|freqz2|fsamp2|fspecial|ftrans2|fwind1|fwind2|getheight|getimage|getimagemodel|getline|getneighbors|getnhood|getpts|"+ - "getrangefromclass|getrect|getsequence|gray2ind|graycomatrix|graycoprops|graydist|grayslice|graythresh|hdrread|hdrwrite|histeq|hough|houghlines|houghpeaks|iccfind|iccread|"+ - "iccroot|iccwrite|idct2|ifanbeam|im2bw|im2col|im2double|im2int16|im2java2d|im2single|im2uint16|im2uint8|imabsdiff|imadd|imadjust|ImageAdapter|imageinfo|imagemodel|imapplymatrix|"+ - "imattributes|imbothat|imclearborder|imclose|imcolormaptool|imcomplement|imcontour|imcontrast|imcrop|imdilate|imdisplayrange|imdistline|imdivide|imellipse|imerode|imextendedmax|"+ - "imextendedmin|imfill|imfilter|imfindcircles|imfreehand|imfuse|imgca|imgcf|imgetfile|imhandles|imhist|imhmax|imhmin|imimposemin|imlincomb|imline|immagbox|immovie|immultiply|imnoise|"+ - "imopen|imoverview|imoverviewpanel|impixel|impixelinfo|impixelinfoval|impixelregion|impixelregionpanel|implay|impoint|impoly|impositionrect|improfile|imputfile|impyramid|"+ - "imreconstruct|imrect|imregconfig|imregionalmax|imregionalmin|imregister|imresize|imroi|imrotate|imsave|imscrollpanel|imshow|imshowpair|imsubtract|imtool|imtophat|imtransform|"+ - "imview|ind2gray|ind2rgb|interfileinfo|interfileread|intlut|ippl|iptaddcallback|iptcheckconn|iptcheckhandle|iptcheckinput|iptcheckmap|iptchecknargin|iptcheckstrs|iptdemos|iptgetapi|"+ - "iptGetPointerBehavior|iptgetpref|ipticondir|iptnum2ordinal|iptPointerManager|iptprefs|iptremovecallback|iptSetPointerBehavior|iptsetpref|iptwindowalign|iradon|isbw|isflat|isgray|"+ - "isicc|isind|isnitf|isrgb|isrset|lab2double|lab2uint16|lab2uint8|label2rgb|labelmatrix|makecform|makeConstrainToRectFcn|makehdr|makelut|makeresampler|maketform|mat2gray|mean2|"+ - "medfilt2|montage|nitfinfo|nitfread|nlfilter|normxcorr2|ntsc2rgb|openrset|ordfilt2|otf2psf|padarray|para2fan|phantom|poly2mask|psf2otf|qtdecomp|qtgetblk|qtsetblk|radon|rangefilt|"+ - "reflect|regionprops|registration\.metric\.(?:MattesMutualInformation|MeanSquares)|registration\.optimizer\.(?:OnePlusOneEvolutionary|RegularStepGradientDescent)|rgb2gray|"+ - "rgb2ntsc|rgb2ycbcr|roicolor|roifill|roifilt2|roipoly|rsetwrite|std2|stdfilt|strel|stretchlim|subimage|tformarray|tformfwd|tforminv|tonemap|translate|truesize|uintlut|viscircles|"+ - "warp|watershed|whitepoint|wiener2|xyz2double|xyz2uint16|ycbcr2rgb|bintprog|color|fgoalattain|fminbnd|fmincon|fminimax|fminsearch|fminunc|fseminf|fsolve|fzero|fzmult|gangstr|ktrlink|"+ - "linprog|lsqcurvefit|lsqlin|lsqnonlin|lsqnonneg|optimget|optimset|optimtool|quadprog" - ); - var storageType = ( - "cell|struct|char|double|single|logical|u?int(?:8|16|32|64)|sparse" - ); - var keywordMapper = this.createKeywordMapper({ - "storage.type": storageType, - "support.function": builtinFunctions, - "keyword": keywords, - "constant.language": builtinConstants - }, "identifier", true); - - this.$rules = { - start: [{ - token : "string", - regex : "'", - stateName : "qstring", - next : [{ - token : "constant.language.escape", - regex : "''" - }, { - token : "string", - regex : "'|$", - next : "start" - }, { - defaultToken: "string" - }] - }, { - token : "text", - regex : "\\s+" - }, { - regex: "", - next: "noQstring" - }], - noQstring : [{ - regex: "^\\s*%{\\s*$", - token: "comment.start", - push: "blockComment" - }, { - token : "comment", - regex : "%[^\r\n]*" - }, { - token : "string", - regex : '"', - stateName : "qqstring", - next : [{ - token : "constant.language.escape", - regex : /\\./ - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "start" - }, { - defaultToken: "string" - }] - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "\\+|\\-|\\/|\\/\\/|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=", - next: "start" - }, { - token : "punctuation.operator", - regex : "\\?|\\:|\\,|\\;|\\.", - next: "start" - }, { - token : "paren.lparen", - regex : "[({\\[]", - next: "start" - }, { - token : "paren.rparen", - regex : "[\\]})]" - }, { - token : "text", - regex : "\\s+" - }, { - token : "text", - regex : "$", - next : "start" - }], - blockComment: [{ - regex: "^\\s*%{\\s*$", - token: "comment.start", - push: "blockComment" - }, { - regex: "^\\s*%}\\s*$", - token: "comment.end", - next: "pop" - }, { - defaultToken: "comment" - }], - }; - - this.normalizeRules(); -}; - -oop.inherits(MatlabHighlightRules, TextHighlightRules); - -exports.MatlabHighlightRules = MatlabHighlightRules; -}); - -define("ace/mode/matlab",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matlab_highlight_rules","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var MatlabHighlightRules = require("./matlab_highlight_rules").MatlabHighlightRules; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = MatlabHighlightRules; -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "%"; - this.blockComment = {start: "%{", end: "%}"}; - - this.$id = "ace/mode/matlab"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/matlab_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var i=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules,n=function(){var e="break|case|catch|classdef|continue|else|elseif|end|for|function|global|if|otherwise|parfor|persistent|return|spmd|switch|try|while",t="true|false|inf|Inf|nan|NaN|eps|pi|ans|nargin|nargout|varargin|varargout",r="abs|accumarray|acos(?:d|h)?|acot(?:d|h)?|acsc(?:d|h)?|actxcontrol(?:list|select)?|actxGetRunningServer|actxserver|addlistener|addpath|addpref|addtodate|airy|align|alim|all|allchild|alpha|alphamap|amd|ancestor|and|angle|annotation|any|area|arrayfun|asec(?:d|h)?|asin(?:d|h)?|assert|assignin|atan(?:2|d|h)?|audiodevinfo|audioplayer|audiorecorder|aufinfo|auread|autumn|auwrite|avifile|aviinfo|aviread|axes|axis|balance|bar(?:3|3h|h)?|base2dec|beep|BeginInvoke|bench|bessel(?:h|i|j|k|y)|beta|betainc|betaincinv|betaln|bicg|bicgstab|bicgstabl|bin2dec|bitand|bitcmp|bitget|bitmax|bitnot|bitor|bitset|bitshift|bitxor|blanks|blkdiag|bone|box|brighten|brush|bsxfun|builddocsearchdb|builtin|bvp4c|bvp5c|bvpget|bvpinit|bvpset|bvpxtend|calendar|calllib|callSoapService|camdolly|cameratoolbar|camlight|camlookat|camorbit|campan|campos|camproj|camroll|camtarget|camup|camva|camzoom|cart2pol|cart2sph|cast|cat|caxis|cd|cdf2rdf|cdfepoch|cdfinfo|cdflib(?:.(?:close|closeVar|computeEpoch|computeEpoch16|create|createAttr|createVar|delete|deleteAttr|deleteAttrEntry|deleteAttrgEntry|deleteVar|deleteVarRecords|epoch16Breakdown|epochBreakdown|getAttrEntry|getAttrgEntry|getAttrMaxEntry|getAttrMaxgEntry|getAttrName|getAttrNum|getAttrScope|getCacheSize|getChecksum|getCompression|getCompressionCacheSize|getConstantNames|getConstantValue|getCopyright|getFileBackward|getFormat|getLibraryCopyright|getLibraryVersion|getMajority|getName|getNumAttrEntries|getNumAttrgEntries|getNumAttributes|getNumgAttributes|getReadOnlyMode|getStageCacheSize|getValidate|getVarAllocRecords|getVarBlockingFactor|getVarCacheSize|getVarCompression|getVarData|getVarMaxAllocRecNum|getVarMaxWrittenRecNum|getVarName|getVarNum|getVarNumRecsWritten|getVarPadValue|getVarRecordData|getVarReservePercent|getVarsMaxWrittenRecNum|getVarSparseRecords|getVersion|hyperGetVarData|hyperPutVarData|inquire|inquireAttr|inquireAttrEntry|inquireAttrgEntry|inquireVar|open|putAttrEntry|putAttrgEntry|putVarData|putVarRecordData|renameAttr|renameVar|setCacheSize|setChecksum|setCompression|setCompressionCacheSize|setFileBackward|setFormat|setMajority|setReadOnlyMode|setStageCacheSize|setValidate|setVarAllocBlockRecords|setVarBlockingFactor|setVarCacheSize|setVarCompression|setVarInitialRecs|setVarPadValue|SetVarReservePercent|setVarsCacheSize|setVarSparseRecords))?|cdfread|cdfwrite|ceil|cell2mat|cell2struct|celldisp|cellfun|cellplot|cellstr|cgs|checkcode|checkin|checkout|chol|cholinc|cholupdate|circshift|cla|clabel|class|clc|clear|clearvars|clf|clipboard|clock|close|closereq|cmopts|cmpermute|cmunique|colamd|colon|colorbar|colordef|colormap|colormapeditor|colperm|Combine|comet|comet3|commandhistory|commandwindow|compan|compass|complex|computer|cond|condeig|condest|coneplot|conj|containers.Map|contour(?:3|c|f|slice)?|contrast|conv|conv2|convhull|convhulln|convn|cool|copper|copyfile|copyobj|corrcoef|cos(?:d|h)?|cot(?:d|h)?|cov|cplxpair|cputime|createClassFromWsdl|createSoapMessage|cross|csc(?:d|h)?|csvread|csvwrite|ctranspose|cumprod|cumsum|cumtrapz|curl|customverctrl|cylinder|daqread|daspect|datacursormode|datatipinfo|date|datenum|datestr|datetick|datevec|dbclear|dbcont|dbdown|dblquad|dbmex|dbquit|dbstack|dbstatus|dbstep|dbstop|dbtype|dbup|dde23|ddeget|ddesd|ddeset|deal|deblank|dec2base|dec2bin|dec2hex|decic|deconv|del2|delaunay|delaunay3|delaunayn|DelaunayTri|delete|demo|depdir|depfun|det|detrend|deval|diag|dialog|diary|diff|diffuse|dir|disp|display|dither|divergence|dlmread|dlmwrite|dmperm|doc|docsearch|dos|dot|dragrect|drawnow|dsearch|dsearchn|dynamicprops|echo|echodemo|edit|eig|eigs|ellipj|ellipke|ellipsoid|empty|enableNETfromNetworkDrive|enableservice|EndInvoke|enumeration|eomday|eq|erf|erfc|erfcinv|erfcx|erfinv|error|errorbar|errordlg|etime|etree|etreeplot|eval|evalc|evalin|event.(?:EventData|listener|PropertyEvent|proplistener)|exifread|exist|exit|exp|expint|expm|expm1|export2wsdlg|eye|ezcontour|ezcontourf|ezmesh|ezmeshc|ezplot|ezplot3|ezpolar|ezsurf|ezsurfc|factor|factorial|fclose|feather|feature|feof|ferror|feval|fft|fft2|fftn|fftshift|fftw|fgetl|fgets|fieldnames|figure|figurepalette|fileattrib|filebrowser|filemarker|fileparts|fileread|filesep|fill|fill3|filter|filter2|find|findall|findfigs|findobj|findstr|finish|fitsdisp|fitsinfo|fitsread|fitswrite|fix|flag|flipdim|fliplr|flipud|floor|flow|fminbnd|fminsearch|fopen|format|fplot|fprintf|frame2im|fread|freqspace|frewind|fscanf|fseek|ftell|FTP|full|fullfile|func2str|functions|funm|fwrite|fzero|gallery|gamma|gammainc|gammaincinv|gammaln|gca|gcbf|gcbo|gcd|gcf|gco|ge|genpath|genvarname|get|getappdata|getenv|getfield|getframe|getpixelposition|getpref|ginput|gmres|gplot|grabcode|gradient|gray|graymon|grid|griddata(?:3|n)?|griddedInterpolant|gsvd|gt|gtext|guidata|guide|guihandles|gunzip|gzip|h5create|h5disp|h5info|h5read|h5readatt|h5write|h5writeatt|hadamard|handle|hankel|hdf|hdf5|hdf5info|hdf5read|hdf5write|hdfinfo|hdfread|hdftool|help|helpbrowser|helpdesk|helpdlg|helpwin|hess|hex2dec|hex2num|hgexport|hggroup|hgload|hgsave|hgsetget|hgtransform|hidden|hilb|hist|histc|hold|home|horzcat|hostid|hot|hsv|hsv2rgb|hypot|ichol|idivide|ifft|ifft2|ifftn|ifftshift|ilu|im2frame|im2java|imag|image|imagesc|imapprox|imfinfo|imformats|import|importdata|imread|imwrite|ind2rgb|ind2sub|inferiorto|info|inline|inmem|inpolygon|input|inputdlg|inputname|inputParser|inspect|instrcallback|instrfind|instrfindall|int2str|integral(?:2|3)?|interp(?:1|1q|2|3|ft|n)|interpstreamspeed|intersect|intmax|intmin|inv|invhilb|ipermute|isa|isappdata|iscell|iscellstr|ischar|iscolumn|isdir|isempty|isequal|isequaln|isequalwithequalnans|isfield|isfinite|isfloat|isglobal|ishandle|ishghandle|ishold|isinf|isinteger|isjava|iskeyword|isletter|islogical|ismac|ismatrix|ismember|ismethod|isnan|isnumeric|isobject|isocaps|isocolors|isonormals|isosurface|ispc|ispref|isprime|isprop|isreal|isrow|isscalar|issorted|isspace|issparse|isstr|isstrprop|isstruct|isstudent|isunix|isvarname|isvector|javaaddpath|javaArray|javachk|javaclasspath|javacomponent|javaMethod|javaMethodEDT|javaObject|javaObjectEDT|javarmpath|jet|keyboard|kron|lasterr|lasterror|lastwarn|lcm|ldivide|ldl|le|legend|legendre|length|libfunctions|libfunctionsview|libisloaded|libpointer|libstruct|license|light|lightangle|lighting|lin2mu|line|lines|linkaxes|linkdata|linkprop|linsolve|linspace|listdlg|listfonts|load|loadlibrary|loadobj|log|log10|log1p|log2|loglog|logm|logspace|lookfor|lower|ls|lscov|lsqnonneg|lsqr|lt|lu|luinc|magic|makehgtform|mat2cell|mat2str|material|matfile|matlab.io.MatFile|matlab.mixin.(?:Copyable|Heterogeneous(?:.getDefaultScalarElement)?)|matlabrc|matlabroot|max|maxNumCompThreads|mean|median|membrane|memmapfile|memory|menu|mesh|meshc|meshgrid|meshz|meta.(?:class(?:.fromName)?|DynamicProperty|EnumeratedValue|event|MetaData|method|package(?:.(?:fromName|getAllPackages))?|property)|metaclass|methods|methodsview|mex(?:.getCompilerConfigurations)?|MException|mexext|mfilename|min|minres|minus|mislocked|mkdir|mkpp|mldivide|mlint|mlintrpt|mlock|mmfileinfo|mmreader|mod|mode|more|move|movefile|movegui|movie|movie2avi|mpower|mrdivide|msgbox|mtimes|mu2lin|multibandread|multibandwrite|munlock|namelengthmax|nargchk|narginchk|nargoutchk|native2unicode|nccreate|ncdisp|nchoosek|ncinfo|ncread|ncreadatt|ncwrite|ncwriteatt|ncwriteschema|ndgrid|ndims|ne|NET(?:.(?:addAssembly|Assembly|convertArray|createArray|createGeneric|disableAutoRelease|enableAutoRelease|GenericClass|invokeGenericMethod|NetException|setStaticProperty))?|netcdf.(?:abort|close|copyAtt|create|defDim|defGrp|defVar|defVarChunking|defVarDeflate|defVarFill|defVarFletcher32|delAtt|endDef|getAtt|getChunkCache|getConstant|getConstantNames|getVar|inq|inqAtt|inqAttID|inqAttName|inqDim|inqDimID|inqDimIDs|inqFormat|inqGrpName|inqGrpNameFull|inqGrpParent|inqGrps|inqLibVers|inqNcid|inqUnlimDims|inqVar|inqVarChunking|inqVarDeflate|inqVarFill|inqVarFletcher32|inqVarID|inqVarIDs|open|putAtt|putVar|reDef|renameAtt|renameDim|renameVar|setChunkCache|setDefaultFormat|setFill|sync)|newplot|nextpow2|nnz|noanimate|nonzeros|norm|normest|not|notebook|now|nthroot|null|num2cell|num2hex|num2str|numel|nzmax|ode(?:113|15i|15s|23|23s|23t|23tb|45)|odeget|odeset|odextend|onCleanup|ones|open|openfig|opengl|openvar|optimget|optimset|or|ordeig|orderfields|ordqz|ordschur|orient|orth|pack|padecoef|pagesetupdlg|pan|pareto|parseSoapResponse|pascal|patch|path|path2rc|pathsep|pathtool|pause|pbaspect|pcg|pchip|pcode|pcolor|pdepe|pdeval|peaks|perl|perms|permute|pie|pink|pinv|planerot|playshow|plot|plot3|plotbrowser|plotedit|plotmatrix|plottools|plotyy|plus|pol2cart|polar|poly|polyarea|polyder|polyeig|polyfit|polyint|polyval|polyvalm|pow2|power|ppval|prefdir|preferences|primes|print|printdlg|printopt|printpreview|prod|profile|profsave|propedit|propertyeditor|psi|publish|PutCharArray|PutFullMatrix|PutWorkspaceData|pwd|qhull|qmr|qr|qrdelete|qrinsert|qrupdate|quad|quad2d|quadgk|quadl|quadv|questdlg|quit|quiver|quiver3|qz|rand|randi|randn|randperm|RandStream(?:.(?:create|getDefaultStream|getGlobalStream|list|setDefaultStream|setGlobalStream))?|rank|rat|rats|rbbox|rcond|rdivide|readasync|real|reallog|realmax|realmin|realpow|realsqrt|record|rectangle|rectint|recycle|reducepatch|reducevolume|refresh|refreshdata|regexp|regexpi|regexprep|regexptranslate|rehash|rem|Remove|RemoveAll|repmat|reset|reshape|residue|restoredefaultpath|rethrow|rgb2hsv|rgb2ind|rgbplot|ribbon|rmappdata|rmdir|rmfield|rmpath|rmpref|rng|roots|rose|rosser|rot90|rotate|rotate3d|round|rref|rsf2csf|run|save|saveas|saveobj|savepath|scatter|scatter3|schur|sec|secd|sech|selectmoveresize|semilogx|semilogy|sendmail|serial|set|setappdata|setdiff|setenv|setfield|setpixelposition|setpref|setstr|setxor|shading|shg|shiftdim|showplottool|shrinkfaces|sign|sin(?:d|h)?|size|slice|smooth3|snapnow|sort|sortrows|sound|soundsc|spalloc|spaugment|spconvert|spdiags|specular|speye|spfun|sph2cart|sphere|spinmap|spline|spones|spparms|sprand|sprandn|sprandsym|sprank|spring|sprintf|spy|sqrt|sqrtm|squeeze|ss2tf|sscanf|stairs|startup|std|stem|stem3|stopasync|str2double|str2func|str2mat|str2num|strcat|strcmp|strcmpi|stream2|stream3|streamline|streamparticles|streamribbon|streamslice|streamtube|strfind|strjust|strmatch|strncmp|strncmpi|strread|strrep|strtok|strtrim|struct2cell|structfun|strvcat|sub2ind|subplot|subsasgn|subsindex|subspace|subsref|substruct|subvolume|sum|summer|superclasses|superiorto|support|surf|surf2patch|surface|surfc|surfl|surfnorm|svd|svds|swapbytes|symamd|symbfact|symmlq|symrcm|symvar|system|tan(?:d|h)?|tar|tempdir|tempname|tetramesh|texlabel|text|textread|textscan|textwrap|tfqmr|throw|tic|Tiff(?:.(?:getTagNames|getVersion))?|timer|timerfind|timerfindall|times|timeseries|title|toc|todatenum|toeplitz|toolboxdir|trace|transpose|trapz|treelayout|treeplot|tril|trimesh|triplequad|triplot|TriRep|TriScatteredInterp|trisurf|triu|tscollection|tsearch|tsearchn|tstool|type|typecast|uibuttongroup|uicontextmenu|uicontrol|uigetdir|uigetfile|uigetpref|uiimport|uimenu|uiopen|uipanel|uipushtool|uiputfile|uiresume|uisave|uisetcolor|uisetfont|uisetpref|uistack|uitable|uitoggletool|uitoolbar|uiwait|uminus|undocheckout|unicode2native|union|unique|unix|unloadlibrary|unmesh|unmkpp|untar|unwrap|unzip|uplus|upper|urlread|urlwrite|usejava|userpath|validateattributes|validatestring|vander|var|vectorize|ver|verctrl|verLessThan|version|vertcat|VideoReader(?:.isPlatformSupported)?|VideoWriter(?:.getProfiles)?|view|viewmtx|visdiff|volumebounds|voronoi|voronoin|wait|waitbar|waitfor|waitforbuttonpress|warndlg|warning|waterfall|wavfinfo|wavplay|wavread|wavrecord|wavwrite|web|weekday|what|whatsnew|which|whitebg|who|whos|wilkinson|winopen|winqueryreg|winter|wk1finfo|wk1read|wk1write|workspace|xlabel|xlim|xlsfinfo|xlsread|xlswrite|xmlread|xmlwrite|xor|xslt|ylabel|ylim|zeros|zip|zlabel|zlim|zoom|addedvarplot|andrewsplot|anova(?:1|2|n)|ansaribradley|aoctool|barttest|bbdesign|beta(?:cdf|fit|inv|like|pdf|rnd|stat)|bino(?:cdf|fit|inv|pdf|rnd|stat)|biplot|bootci|bootstrp|boxplot|candexch|candgen|canoncorr|capability|capaplot|caseread|casewrite|categorical|ccdesign|cdfplot|chi2(?:cdf|gof|inv|pdf|rnd|stat)|cholcov|Classification(?:BaggedEnsemble|Discriminant(?:.(?:fit|make|template))?|Ensemble|KNN(?:.(?:fit|template))?|PartitionedEnsemble|PartitionedModel|Tree(?:.(?:fit|template))?)|classify|classregtree|cluster|clusterdata|cmdscale|combnk|Compact(?:Classification(?:Discriminant|Ensemble|Tree)|Regression(?:Ensemble|Tree)|TreeBagger)|confusionmat|controlchart|controlrules|cophenet|copula(?:cdf|fit|param|pdf|rnd|stat)|cordexch|corr|corrcov|coxphfit|createns|crosstab|crossval|cvpartition|datasample|dataset|daugment|dcovary|dendrogram|dfittool|disttool|dummyvar|dwtest|ecdf|ecdfhist|ev(?:cdf|fit|inv|like|pdf|rnd|stat)|ExhaustiveSearcher|exp(?:cdf|fit|inv|like|pdf|rnd|stat)|factoran|fcdf|ff2n|finv|fitdist|fitensemble|fpdf|fracfact|fracfactgen|friedman|frnd|fstat|fsurfht|fullfact|gagerr|gam(?:cdf|fit|inv|like|pdf|rnd|stat)|GeneralizedLinearModel(?:.fit)?|geo(?:cdf|inv|mean|pdf|rnd|stat)|gev(?:cdf|fit|inv|like|pdf|rnd|stat)|gline|glmfit|glmval|glyphplot|gmdistribution(?:.fit)?|gname|gp(?:cdf|fit|inv|like|pdf|rnd|stat)|gplotmatrix|grp2idx|grpstats|gscatter|haltonset|harmmean|hist3|histfit|hmm(?:decode|estimate|generate|train|viterbi)|hougen|hyge(?:cdf|inv|pdf|rnd|stat)|icdf|inconsistent|interactionplot|invpred|iqr|iwishrnd|jackknife|jbtest|johnsrnd|KDTreeSearcher|kmeans|knnsearch|kruskalwallis|ksdensity|kstest|kstest2|kurtosis|lasso|lassoglm|lassoPlot|leverage|lhsdesign|lhsnorm|lillietest|LinearModel(?:.fit)?|linhyptest|linkage|logn(?:cdf|fit|inv|like|pdf|rnd|stat)|lsline|mad|mahal|maineffectsplot|manova1|manovacluster|mdscale|mhsample|mle|mlecov|mnpdf|mnrfit|mnrnd|mnrval|moment|multcompare|multivarichart|mvn(?:cdf|pdf|rnd)|mvregress|mvregresslike|mvt(?:cdf|pdf|rnd)|NaiveBayes(?:.fit)?|nan(?:cov|max|mean|median|min|std|sum|var)|nbin(?:cdf|fit|inv|pdf|rnd|stat)|ncf(?:cdf|inv|pdf|rnd|stat)|nct(?:cdf|inv|pdf|rnd|stat)|ncx2(?:cdf|inv|pdf|rnd|stat)|NeighborSearcher|nlinfit|nlintool|nlmefit|nlmefitsa|nlparci|nlpredci|nnmf|nominal|NonLinearModel(?:.fit)?|norm(?:cdf|fit|inv|like|pdf|rnd|stat)|normplot|normspec|ordinal|outlierMeasure|parallelcoords|paretotails|partialcorr|pcacov|pcares|pdf|pdist|pdist2|pearsrnd|perfcurve|perms|piecewisedistribution|plsregress|poiss(?:cdf|fit|inv|pdf|rnd|tat)|polyconf|polytool|prctile|princomp|ProbDist(?:Kernel|Parametric|UnivKernel|UnivParam)?|probplot|procrustes|qqplot|qrandset|qrandstream|quantile|randg|random|randsample|randtool|range|rangesearch|ranksum|rayl(?:cdf|fit|inv|pdf|rnd|stat)|rcoplot|refcurve|refline|regress|Regression(?:BaggedEnsemble|Ensemble|PartitionedEnsemble|PartitionedModel|Tree(?:.(?:fit|template))?)|regstats|relieff|ridge|robustdemo|robustfit|rotatefactors|rowexch|rsmdemo|rstool|runstest|sampsizepwr|scatterhist|sequentialfs|signrank|signtest|silhouette|skewness|slicesample|sobolset|squareform|statget|statset|stepwise|stepwisefit|surfht|tabulate|tblread|tblwrite|tcdf|tdfread|tiedrank|tinv|tpdf|TreeBagger|treedisp|treefit|treeprune|treetest|treeval|trimmean|trnd|tstat|ttest|ttest2|unid(?:cdf|inv|pdf|rnd|stat)|unif(?:cdf|inv|it|pdf|rnd|stat)|vartest(?:2|n)?|wbl(?:cdf|fit|inv|like|pdf|rnd|stat)|wblplot|wishrnd|x2fx|xptread|zscore|ztestadapthisteq|analyze75info|analyze75read|applycform|applylut|axes2pix|bestblk|blockproc|bwarea|bwareaopen|bwboundaries|bwconncomp|bwconvhull|bwdist|bwdistgeodesic|bweuler|bwhitmiss|bwlabel|bwlabeln|bwmorph|bwpack|bwperim|bwselect|bwtraceboundary|bwulterode|bwunpack|checkerboard|col2im|colfilt|conndef|convmtx2|corner|cornermetric|corr2|cp2tform|cpcorr|cpselect|cpstruct2pairs|dct2|dctmtx|deconvblind|deconvlucy|deconvreg|deconvwnr|decorrstretch|demosaic|dicom(?:anon|dict|info|lookup|read|uid|write)|edge|edgetaper|entropy|entropyfilt|fan2para|fanbeam|findbounds|fliptform|freqz2|fsamp2|fspecial|ftrans2|fwind1|fwind2|getheight|getimage|getimagemodel|getline|getneighbors|getnhood|getpts|getrangefromclass|getrect|getsequence|gray2ind|graycomatrix|graycoprops|graydist|grayslice|graythresh|hdrread|hdrwrite|histeq|hough|houghlines|houghpeaks|iccfind|iccread|iccroot|iccwrite|idct2|ifanbeam|im2bw|im2col|im2double|im2int16|im2java2d|im2single|im2uint16|im2uint8|imabsdiff|imadd|imadjust|ImageAdapter|imageinfo|imagemodel|imapplymatrix|imattributes|imbothat|imclearborder|imclose|imcolormaptool|imcomplement|imcontour|imcontrast|imcrop|imdilate|imdisplayrange|imdistline|imdivide|imellipse|imerode|imextendedmax|imextendedmin|imfill|imfilter|imfindcircles|imfreehand|imfuse|imgca|imgcf|imgetfile|imhandles|imhist|imhmax|imhmin|imimposemin|imlincomb|imline|immagbox|immovie|immultiply|imnoise|imopen|imoverview|imoverviewpanel|impixel|impixelinfo|impixelinfoval|impixelregion|impixelregionpanel|implay|impoint|impoly|impositionrect|improfile|imputfile|impyramid|imreconstruct|imrect|imregconfig|imregionalmax|imregionalmin|imregister|imresize|imroi|imrotate|imsave|imscrollpanel|imshow|imshowpair|imsubtract|imtool|imtophat|imtransform|imview|ind2gray|ind2rgb|interfileinfo|interfileread|intlut|ippl|iptaddcallback|iptcheckconn|iptcheckhandle|iptcheckinput|iptcheckmap|iptchecknargin|iptcheckstrs|iptdemos|iptgetapi|iptGetPointerBehavior|iptgetpref|ipticondir|iptnum2ordinal|iptPointerManager|iptprefs|iptremovecallback|iptSetPointerBehavior|iptsetpref|iptwindowalign|iradon|isbw|isflat|isgray|isicc|isind|isnitf|isrgb|isrset|lab2double|lab2uint16|lab2uint8|label2rgb|labelmatrix|makecform|makeConstrainToRectFcn|makehdr|makelut|makeresampler|maketform|mat2gray|mean2|medfilt2|montage|nitfinfo|nitfread|nlfilter|normxcorr2|ntsc2rgb|openrset|ordfilt2|otf2psf|padarray|para2fan|phantom|poly2mask|psf2otf|qtdecomp|qtgetblk|qtsetblk|radon|rangefilt|reflect|regionprops|registration.metric.(?:MattesMutualInformation|MeanSquares)|registration.optimizer.(?:OnePlusOneEvolutionary|RegularStepGradientDescent)|rgb2gray|rgb2ntsc|rgb2ycbcr|roicolor|roifill|roifilt2|roipoly|rsetwrite|std2|stdfilt|strel|stretchlim|subimage|tformarray|tformfwd|tforminv|tonemap|translate|truesize|uintlut|viscircles|warp|watershed|whitepoint|wiener2|xyz2double|xyz2uint16|ycbcr2rgb|bintprog|color|fgoalattain|fminbnd|fmincon|fminimax|fminsearch|fminunc|fseminf|fsolve|fzero|fzmult|gangstr|ktrlink|linprog|lsqcurvefit|lsqlin|lsqnonlin|lsqnonneg|optimget|optimset|optimtool|quadprog",i="cell|struct|char|double|single|logical|u?int(?:8|16|32|64)|sparse",a=this.createKeywordMapper({"storage.type":i,"support.function":r,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"string",regex:"'",stateName:"qstring",next:[{token:"constant.language.escape",regex:"''"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}]},{token:"text",regex:"\\s+"},{regex:"",next:"noQstring"}],noQstring:[{regex:"^\\s*%{\\s*$",token:"comment.start",push:"blockComment"},{token:"comment",regex:"%[^\r\n]*"},{token:"string",regex:'"',stateName:"qqstring",next:[{token:"constant.language.escape",regex:/\\./},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}]},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=",next:"start"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\.",next:"start"},{token:"paren.lparen",regex:"[({\\[]",next:"start"},{token:"paren.rparen",regex:"[\\]})]"},{token:"text",regex:"\\s+"},{token:"text",regex:"$",next:"start"}],blockComment:[{regex:"^\\s*%{\\s*$",token:"comment.start",push:"blockComment"},{regex:"^\\s*%}\\s*$",token:"comment.end",next:"pop"},{defaultToken:"comment"}]},this.normalizeRules()};i.inherits(n,a),t.MatlabHighlightRules=n}),define("ace/mode/matlab",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matlab_highlight_rules","ace/range"],function(e,t,r){"use strict";var i=e("../lib/oop"),a=e("./text").Mode,n=e("./matlab_highlight_rules").MatlabHighlightRules,s=(e("../range").Range,function(){this.HighlightRules=n});i.inherits(s,a),function(){this.lineCommentStart="%",this.blockComment={start:"%{",end:"%}"},this.$id="ace/mode/matlab"}.call(s.prototype),t.Mode=s}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-mel.js b/www/js/vendor/ace/mode-mel.js index ab4b4fbb9..50b6fa09c 100755 --- a/www/js/vendor/ace/mode-mel.js +++ b/www/js/vendor/ace/mode-mel.js @@ -1,613 +1 @@ -define("ace/mode/mel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var MELHighlightRules = function() { - - this.$rules = { start: - [ { caseInsensitive: true, - token: 'storage.type.mel', - regex: '\\b(matrix|string|vector|float|int|void)\\b' }, - { caseInsensitive: true, - token: 'support.function.mel', - regex: '\\b((s(h(ow(ManipCtx|S(hadingGroupAttrEditor|electionInTitle)|H(idden|elp)|Window)|el(f(Button|TabLayout|Layout)|lField)|ading(GeometryRelCtx|Node|Connection|LightRelCtx))|y(s(tem|File)|mbol(Button|CheckBox))|nap(shot|Mode|2to2 |TogetherCtx|Key)|c(ulpt|ene(UIReplacement|Editor)|ale(BrushBrightness |Constraint|Key(Ctx)?)?|r(ipt(Node|Ctx|Table|edPanel(Type)?|Job|EditorInfo)|oll(Field|Layout))|mh)|t(itch(Surface(Points)?|AndExplodeShell )|a(ckTrace|rt(sWith |String ))|r(cmp|i(ng(ToStringArray |Array(Remove(Duplicates | )|C(ount |atenate )|ToString |Intersector))|p )|oke))|i(n(gleProfileBirailSurface)?|ze|gn|mplify)|o(u(nd(Control)?|rce)|ft(Mod(Ctx)?)?|rt)|u(perCtx|rface(S(haderList|ampler))?|b(st(itute(Geometry|AllString )?|ring)|d(M(irror|a(tchTopology|p(SewMove|Cut)))|iv(Crease|DisplaySmoothness)?|C(ollapse|leanTopology)|T(o(Blind|Poly)|ransferUVsToCache)|DuplicateAndConnect|EditUV|ListComponentConversion|AutoProjection)))|p(h(ere|rand)|otLight(PreviewPort)?|aceLocator|r(ing|eadSheetEditor))|e(t(s|MenuMode|Sta(te |rtupMessage|mpDensity )|NodeTypeFlag|ConstraintRestPosition |ToolTo|In(putDeviceMapping|finity)|D(ynamic|efaultShadingGroup|rivenKeyframe)|UITemplate|P(ar(ticleAttr|ent)|roject )|E(scapeCtx|dit(or|Ctx))|Key(Ctx|frame|Path)|F(ocus|luidAttr)|Attr(Mapping)?)|parator|ed|l(ect(Mode|ionConnection|Context|Type|edNodes|Pr(iority|ef)|Key(Ctx)?)?|LoadSettings)|archPathArray )|kin(Cluster|Percent)|q(uareSurface|rt)|w(itchTable|atchDisplayPort)|a(ve(Menu|Shelf|ToolSettings|I(nitialState|mage)|Pref(s|Objects)|Fluid|A(ttrPreset |llShelves))|mpleImage)|rtContext|mooth(step|Curve|TangentSurface))|h(sv_to_rgb|yp(ot|er(Graph|Shade|Panel))|i(tTest|de|lite)|ot(Box|key(Check)?)|ud(Button|Slider(Button)?)|e(lp(Line)?|adsUpDisplay|rmite)|wRe(nder(Load)?|flectionMap)|ard(enPointCurve|ware(RenderPanel)?))|n(o(nLinear|ise|de(Type|IconButton|Outliner|Preset)|rmal(ize |Constraint))|urbs(Boolean|S(elect|quare)|C(opyUVSet|ube)|To(Subdiv|Poly(gonsPref)?)|Plane|ViewDirectionVector )|ew(ton|PanelItems)|ame(space(Info)?|Command|Field))|c(h(oice|dir|eck(Box(Grp)?|DefaultRenderGlobals)|a(n(nelBox|geSubdiv(Region|ComponentDisplayLevel))|racter(Map|OutlineEditor)?))|y(cleCheck|linder)|tx(Completion|Traverse|EditMode|Abort)|irc(ularFillet|le)|o(s|n(str(uctionHistory|ain(Value)?)|nect(ionInfo|Control|Dynamic|Joint|Attr)|t(extInfo|rol)|dition|e|vert(SolidTx|Tessellation|Unit|FromOldLayers |Lightmap)|firmDialog)|py(SkinWeights|Key|Flexor|Array )|l(or(Slider(Grp|ButtonGrp)|Index(SliderGrp)?|Editor|AtPoint)?|umnLayout|lision)|arsenSubdivSelectionList|m(p(onentEditor|utePolysetVolume |actHairSystem )|mand(Port|Echo|Line)))|u(tKey|r(ve(MoveEPCtx|SketchCtx|CVCtx|Intersect|OnSurface|E(ditorCtx|PCtx)|AddPtCtx)?|rent(Ctx|Time(Ctx)?|Unit)))|p(GetSolverAttr|Button|S(olver(Types)?|e(t(SolverAttr|Edit)|am))|C(o(nstraint|llision)|ache)|Tool|P(anel|roperty))|eil|l(ip(Schedule(rOutliner)?|TrimBefore |Editor(CurrentTimeCtx)?)?|ose(Surface|Curve)|uster|ear(Cache)?|amp)|a(n(CreateManip|vas)|tch(Quiet)?|pitalizeString |mera(View)?)|r(oss(Product )?|eate(RenderLayer|MotionField |SubdivRegion|N(ode|ewShelf )|D(isplayLayer|rawCtx)|Editor))|md(Shell|FileOutput))|M(R(ender(ShadowData|Callback|Data|Util|View|Line(Array)?)|ampAttribute)|G(eometryData|lobal)|M(odelMessage|essage|a(nipData|t(erial|rix)))|BoundingBox|S(yntax|ceneMessage|t(atus|ring(Array)?)|imple|pace|elect(ion(Mask|List)|Info)|watchRender(Register|Base))|H(ardwareRenderer|WShaderSwatchGenerator)|NodeMessage|C(o(nditionMessage|lor(Array)?|m(putation|mand(Result|Message)))|ursor|loth(Material|S(ystem|olverRegister)|Con(straint|trol)|Triangle|Particle|Edge|Force)|allbackIdArray)|T(ypeId|ime(r(Message)?|Array)?|oolsInfo|esselationParams|r(imBoundaryArray|ansformationMatrix))|I(ntArray|t(Geometry|Mesh(Polygon|Edge|Vertex|FaceVertex)|S(urfaceCV|electionList)|CurveCV|Instancer|eratorType|D(ependency(Graph|Nodes)|ag)|Keyframe)|k(System|HandleGroup)|mage)|3dView|Object(SetMessage|Handle|Array)?|D(G(M(odifier|essage)|Context)|ynSwept(Triangle|Line)|istance|oubleArray|evice(State|Channel)|a(ta(Block|Handle)|g(M(odifier|essage)|Path(Array)?))|raw(Request(Queue)?|Info|Data|ProcedureBase))|U(serEventMessage|i(nt(Array|64Array)|Message))|P(o(int(Array)?|lyMessage)|lug(Array)?|rogressWindow|x(G(eometry(Iterator|Data)|lBuffer)|M(idiInputDevice|odelEditorCommand|anipContainer)|S(urfaceShape(UI)?|pringNode|electionContext)|HwShaderNode|Node|Co(ntext(Command)?|m(ponentShape|mand))|T(oolCommand|ransform(ationMatrix)?)|IkSolver(Node)?|3dModelView|ObjectSet|D(eformerNode|ata|ragAndDropBehavior)|PolyT(weakUVCommand|rg)|EmitterNode|F(i(eldNode|leTranslator)|luidEmitterNode)|LocatorNode))|E(ulerRotation|vent(Message)?)|ayatomr|Vector(Array)?|Quaternion|F(n(R(otateManip|eflectShader|adialField)|G(e(nericAttribute|ometry(Data|Filter))|ravityField)|M(otionPath|es(sageAttribute|h(Data)?)|a(nip3D|trix(Data|Attribute)))|B(l(innShader|endShapeDeformer)|ase)|S(caleManip|t(ateManip|ring(Data|ArrayData))|ingleIndexedComponent|ubd(Names|Data)?|p(hereData|otLight)|et|kinCluster)|HikEffector|N(on(ExtendedLight|AmbientLight)|u(rbs(Surface(Data)?|Curve(Data)?)|meric(Data|Attribute))|ewtonField)|C(haracter|ircleSweepManip|ompo(nent(ListData)?|undAttribute)|urveSegmentManip|lip|amera)|T(ypedAttribute|oggleManip|urbulenceField|r(ipleIndexedComponent|ansform))|I(ntArrayData|k(Solver|Handle|Joint|Effector))|D(ynSweptGeometryData|i(s(cManip|tanceManip)|rection(Manip|alLight))|ouble(IndexedComponent|ArrayData)|ependencyNode|a(ta|gNode)|ragField)|U(ni(tAttribute|formField)|Int64ArrayData)|P(hong(Shader|EShader)|oint(On(SurfaceManip|CurveManip)|Light|ArrayData)|fxGeometry|lugin(Data)?|arti(cleSystem|tion))|E(numAttribute|xpression)|V(o(lume(Light|AxisField)|rtexField)|ectorArrayData)|KeyframeDelta(Move|B(lockAddRemove|reakdown)|Scale|Tangent|InfType|Weighted|AddRemove)?|F(ield|luid|reePointTriadManip)|W(ireDeformer|eightGeometryFilter)|L(ight(DataAttribute)?|a(yeredShader|ttice(D(eformer|ata))?|mbertShader))|A(ni(sotropyShader|mCurve)|ttribute|irField|r(eaLight|rayAttrsData)|mbientLight))?|ile(IO|Object)|eedbackLine|loat(Matrix|Point(Array)?|Vector(Array)?|Array))|L(i(ghtLinks|brary)|ockMessage)|A(n(im(Message|C(ontrol|urveC(hange|lipboard(Item(Array)?)?))|Util)|gle)|ttribute(Spec(Array)?|Index)|r(rayData(Builder|Handle)|g(Database|Parser|List))))|t(hreePointArcCtx|ime(Control|Port|rX)|o(ol(Button|HasOptions|Collection|Dropped|PropertyWindow)|NativePath |upper|kenize(List )?|l(ower|erance)|rus|ggle(WindowVisibility|Axis)?)|u(rbulence|mble(Ctx)?)|ex(RotateContext|M(oveContext|anipContext)|t(ScrollList|Curves|ure(HairColor |DisplacePlane |PlacementContext|Window)|ToShelf |Field(Grp|ButtonGrp)?)?|S(caleContext|electContext|mudgeUVContext)|WinToolCtx)|woPointArcCtx|a(n(gentConstraint)?|bLayout)|r(im|unc(ate(HairCache|FluidCache))?|a(ns(formLimits|lator)|c(e|k(Ctx)?))))|i(s(olateSelect|Connected|True|Dirty|ParentOf |Valid(String |ObjectName |UiName )|AnimCurve )|n(s(tance(r)?|ert(Joint(Ctx)?|K(not(Surface|Curve)|eyCtx)))|heritTransform|t(S(crollBar|lider(Grp)?)|er(sect|nalVar|ToUI )|Field(Grp)?))|conText(Radio(Button|Collection)|Button|StaticLabel|CheckBox)|temFilter(Render|Type|Attr)?|prEngine|k(S(ystem(Info)?|olver|plineHandleCtx)|Handle(Ctx|DisplayScale)?|fkDisplayMethod)|m(portComposerCurves |fPlugins|age))|o(ceanNurbsPreviewPlane |utliner(Panel|Editor)|p(tion(Menu(Grp)?|Var)|en(GLExtension|MayaPref))|verrideModifier|ffset(Surface|Curve(OnSurface)?)|r(ientConstraint|bit(Ctx)?)|b(soleteProc |j(ect(Center|Type(UI)?|Layer )|Exists)))|d(yn(RelEd(itor|Panel)|Globals|C(ontrol|ache)|P(a(intEditor|rticleCtx)|ref)|Exp(ort|ression)|amicLoad)|i(s(connect(Joint|Attr)|tanceDim(Context|ension)|pla(y(RGBColor|S(tats|urface|moothness)|C(olor|ull)|Pref|LevelOfDetail|Affected)|cementToPoly)|kCache|able)|r(name |ect(ionalLight|KeyCtx)|map)|mWhen)|o(cServer|Blur|t(Product )?|ubleProfileBirailSurface|peSheetEditor|lly(Ctx)?)|uplicate(Surface|Curve)?|e(tach(Surface|Curve|DeviceAttr)|vice(Panel|Editor)|f(ine(DataServer|VirtualDevice)|ormer|ault(Navigation|LightListCheckBox))|l(ete(Sh(elfTab |adingGroupsAndMaterials )|U(nusedBrushes |I)|Attr)?|randstr)|g_to_rad)|agPose|r(opoffLocator|ag(gerContext)?)|g(timer|dirty|Info|eval))|CBG |u(serCtx|n(t(angleUV|rim)|i(t|form)|do(Info)?|loadPlugin|assignInputDevice|group)|iTemplate|p(dateAE |Axis)|v(Snapshot|Link))|joint(C(tx|luster)|DisplayScale|Lattice)?|p(sd(ChannelOutliner|TextureFile|E(ditTextureFile|xport))|close|i(c(ture|kWalk)|xelMove)|o(se|int(MatrixMult |C(onstraint|urveConstraint)|On(Surface|Curve)|Position|Light)|p(upMenu|en)|w|l(y(Reduce|GeoSampler|M(irrorFace|ove(UV|Edge|Vertex|Facet(UV)?)|erge(UV|Edge(Ctx)?|Vertex|Facet(Ctx)?)|ap(Sew(Move)?|Cut|Del))|B(oolOp|evel|l(indData|endColor))|S(traightenUVBorder|oftEdge|u(perCtx|bdivide(Edge|Facet))|p(her(icalProjection|e)|lit(Ring|Ctx|Edge|Vertex)?)|e(tToFaceNormal|parate|wEdge|lect(Constraint(Monitor)?|EditCtx))|mooth)|Normal(izeUV|PerVertex)?|C(hipOff|ylind(er|ricalProjection)|o(ne|pyUV|l(or(BlindData|Set|PerVertex)|lapse(Edge|Facet)))|u(t(Ctx)?|be)|l(ipboard|oseBorder)|acheMonitor|rea(seEdge|teFacet(Ctx)?))|T(o(Subdiv|rus)|r(iangulate|ansfer))|In(stallAction|fo)|Options|D(uplicate(Edge|AndConnect)|el(Edge|Vertex|Facet))|U(nite|VSet)|P(yramid|oke|lan(e|arProjection)|r(ism|ojection))|E(ditUV|valuate|xtrude(Edge|Facet))|Qu(eryBlindData|ad)|F(orceUV|lip(UV|Edge))|WedgeFace|L(istComponentConversion|ayoutUV)|A(utoProjection|ppend(Vertex|FacetCtx)?|verage(Normal|Vertex)))|eVectorConstraint))|utenv|er(cent|formanceOptions)|fxstrokes|wd|l(uginInfo|a(y(b(last|ackOptions))?|n(e|arSrf)))|a(steKey|ne(l(History|Configuration)?|Layout)|thAnimation|irBlend|use|lettePort|r(ti(cle(RenderInfo|Instancer|Exists)?|tion)|ent(Constraint)?|am(Dim(Context|ension)|Locator)))|r(int|o(j(ect(ion(Manip|Context)|Curve|Tangent)|FileViewer)|pMo(dCtx|ve)|gress(Bar|Window)|mptDialog)|eloadRefEd))|e(n(codeString|d(sWith |String )|v|ableDevice)|dit(RenderLayer(Globals|Members)|or(Template)?|DisplayLayer(Globals|Members)|AttrLimits )|v(ent|al(Deferred|Echo)?)|quivalent(Tol | )|ffector|r(f|ror)|x(clusiveLightCheckBox|t(end(Surface|Curve)|rude)|ists|p(ortComposerCurves |ression(EditorListen)?)?|ec(uteForEachObject )?|actWorldBoundingBox)|mit(ter)?)|v(i(sor|ew(Set|HeadOn|2dToolCtx|C(lipPlane|amera)|Place|Fit|LookAt))|o(lumeAxis|rtex)|e(ctorize|rifyCmd )|alidateShelfName )|key(Tangent|frame(Region(MoveKeyCtx|S(caleKeyCtx|e(tKeyCtx|lectKeyCtx))|CurrentTimeCtx|TrackCtx|InsertKeyCtx|D(irectKeyCtx|ollyCtx))|Stats|Outliner)?)|qu(it|erySubdiv)|f(c(heck|lose)|i(nd(RelatedSkinCluster |MenuItem |er|Keyframe|AllIntersections )|tBspline|l(ter(StudioImport|Curve|Expand)?|e(BrowserDialog|test|Info|Dialog|Extension )?|letCurve)|rstParentOf )|o(ntDialog|pen|rmLayout)|print|eof|flush|write|l(o(or|w|at(S(crollBar|lider(Grp|ButtonGrp|2)?)|Eq |Field(Grp)?))|u(shUndo|id(CacheInfo|Emitter|VoxelInfo))|exor)|r(omNativePath |e(eFormFillet|wind|ad)|ameLayout)|get(word|line)|mod)|w(hatIs|i(ndow(Pref)?|re(Context)?)|orkspace|ebBrowser(Prefs)?|a(itCursor|rning)|ri(nkle(Context)?|teTake))|l(s(T(hroughFilter|ype )|UI)?|i(st(Relatives|MenuAnnotation |Sets|History|NodeTypes|C(onnections|ameras)|Transforms |InputDevice(s|Buttons|Axes)|erEditor|DeviceAttachments|Unselected |A(nimatable|ttr))|n(step|eIntersection )|ght(link|List(Panel|Editor)?))|o(ckNode|okThru|ft|ad(NewShelf |P(lugin|refObjects)|Fluid)|g)|a(ssoContext|y(out|er(Button|ed(ShaderPort|TexturePort)))|ttice(DeformKeyCtx)?|unch(ImageEditor)?))|a(ssign(Command|InputDevice)|n(notate|im(C(one|urveEditor)|Display|View)|gle(Between)?)|tt(ach(Surface|Curve|DeviceAttr)|r(ibute(Menu|Info|Exists|Query)|NavigationControlGrp|Co(ntrolGrp|lorSliderGrp|mpatibility)|PresetEditWin|EnumOptionMenu(Grp)?|Field(Grp|SliderGrp)))|i(r|mConstraint)|d(d(NewShelfTab|Dynamic|PP|Attr(ibuteEditorNodeHelp)?)|vanceToNextDrivenKey)|uto(Place|Keyframe)|pp(endStringArray|l(y(Take|AttrPreset)|icationName))|ffect(s|edNet)|l(i(as(Attr)?|gn(Surface|C(tx|urve))?)|lViewFit)|r(c(len|Len(DimContext|gthDimension))|t(BuildPaintMenu|Se(tPaintCtx|lectCtx)|3dPaintCtx|UserPaintCtx|PuttyCtx|FluidAttrCtx|Attr(SkinPaintCtx|Ctx|PaintVertexCtx))|rayMapper)|mbientLight|b(s|out))|r(igid(Body|Solver)|o(t(at(ionInterpolation|e))?|otOf |undConstantRadius|w(ColumnLayout|Layout)|ll(Ctx)?)|un(up|TimeCommand)|e(s(olutionNode|et(Tool|AE )|ampleFluid)|hash|n(der(GlobalsNode|Manip|ThumbnailUpdate|Info|er|Partition|QualityNode|Window(SelectContext|Editor)|LayerButton)?|ame(SelectionList |UI|Attr)?)|cord(Device|Attr)|target|order(Deformers)?|do|v(olve|erse(Surface|Curve))|quires|f(ineSubdivSelectionList|erence(Edit|Query)?|resh(AE )?)|loadImage|adTake|root|move(MultiInstance|Joint)|build(Surface|Curve))|a(n(d(state|omizeFollicles )?|geControl)|d(i(o(MenuItemCollection|Button(Grp)?|Collection)|al)|_to_deg)|mpColorPort)|gb_to_hsv)|g(o(toBindPose |al)|e(t(M(odifiers|ayaPanelTypes )|Classification|InputDeviceRange|pid|env|DefaultBrush|Pa(nel|rticleAttr)|F(ileList|luidAttr)|A(ttr|pplicationVersionAsFloat ))|ometryConstraint)|l(Render(Editor)?|obalStitch)|a(uss|mma)|r(id(Layout)?|oup(ObjectsByName )?|a(dientControl(NoAttr)?|ph(SelectContext|TrackCtx|DollyCtx)|vity|bColor))|match)|x(pmPicker|form|bmLangPathList )|m(i(n(imizeApp)?|rrorJoint)|o(del(CurrentTimeCtx|Panel|Editor)|use|v(In|e(IKtoFK |VertexAlongDirection|KeyCtx)?|Out))|u(te|ltiProfileBirailSurface)|e(ssageLine|nu(BarLayout|Item(ToShelf )?|Editor)?|mory)|a(nip(Rotate(Context|LimitsCtx)|Move(Context|LimitsCtx)|Scale(Context|LimitsCtx)|Options)|tch|ke(Roll |SingleSurface|TubeOn |Identity|Paintable|bot|Live)|rker|g|x))|b(in(Membership|d(Skin|Pose))|o(neLattice|undary|x(ZoomCtx|DollyCtx))|u(tton(Manip)?|ild(BookmarkMenu|KeyframeMenu)|fferCurve)|e(ssel|vel(Plus)?)|l(indDataType|end(Shape(Panel|Editor)?|2|TwoAttr))|a(sename(Ex | )|tchRender|ke(Results|Simulation|Clip|PartialHistory|FluidShading )))))\\b' }, - { caseInsensitive: true, - token: 'support.constant.mel', - regex: '\\b(s(h(ellTessellate|a(d(ing(Map|Engine)|erGlow)|pe))|n(ow|apshot(Shape)?)|c(ulpt|aleConstraint|ript)|t(yleCurve|itch(Srf|AsNurbsShell)|u(cco|dioClearCoat)|encil|roke(Globals)?)|i(ngleShadingSwitch|mpleVolumeShader)|o(ftMod(Manip|Handle)?|lidFractal)|u(rface(Sha(der|pe)|Info|EdManip|VarGroup|Luminance)|b(Surface|d(M(odifier(UV|World)?|ap(SewMove|Cut|pingManip))|B(lindData|ase)|iv(ReverseFaces|SurfaceVarGroup|Co(llapse|mponentId)|To(Nurbs|Poly))?|HierBlind|CleanTopology|Tweak(UV)?|P(lanarProj|rojManip)|LayoutUV|A(ddTopology|utoProj))|Curve))|p(BirailSrf|otLight|ring)|e(tRange|lectionListOperator)|k(inCluster|etchPlane)|quareSrf|ampler(Info)?|m(ooth(Curve|TangentSrf)|ear))|h(svToRgb|yper(GraphInfo|View|Layout)|ik(Solver|Handle|Effector)|oldMatrix|eightField|w(Re(nderGlobals|flectionMap)|Shader)|a(ir(System|Constraint|TubeShader)|rd(enPoint|wareRenderGlobals)))|n(o(n(ExtendedLightShapeNode|Linear|AmbientLightShapeNode)|ise|rmalConstraint)|urbs(Surface|Curve|T(oSubdiv(Proc)?|essellate)|DimShape)|e(twork|wtonField))|c(h(o(ice|oser)|ecker|aracter(Map|Offset)?)|o(n(straint|tr(olPoint|ast)|dition)|py(ColorSet|UVSet))|urve(Range|Shape|Normalizer(Linear|Angle)?|In(tersect|fo)|VarGroup|From(Mesh(CoM|Edge)?|Su(rface(Bnd|CoS|Iso)?|bdiv(Edge|Face)?)))|l(ip(Scheduler|Library)|o(se(stPointOnSurface|Surface|Curve)|th|ud)|uster(Handle)?|amp)|amera(View)?|r(eate(BPManip|ColorSet|UVSet)|ater))|t(ime(ToUnitConversion|Function)?|oo(nLineAttributes|lDrawManip)|urbulenceField|ex(BaseDeformManip|ture(BakeSet|2d|ToGeom|3d|Env)|SmudgeUVManip|LatticeDeformManip)|weak|angentConstraint|r(i(pleShadingSwitch|m(WithBoundaries)?)|ansform(Geometry)?))|i(n(s(tancer|ertKnot(Surface|Curve))|tersectSurface)|k(RPsolver|MCsolver|S(ystem|olver|Csolver|plineSolver)|Handle|PASolver|Effector)|m(plicit(Box|Sphere|Cone)|agePlane))|o(cean(Shader)?|pticalFX|ffset(Surface|C(os|urve))|ldBlindDataBase|rient(Constraint|ationMarker)|bject(RenderFilter|MultiFilter|BinFilter|S(criptFilter|et)|NameFilter|TypeFilter|Filter|AttrFilter))|d(yn(Globals|Base)|i(s(tance(Between|DimShape)|pla(yLayer(Manager)?|cementShader)|kCache)|rect(ionalLight|edDisc)|mensionShape)|o(ubleShadingSwitch|f)|pBirailSrf|e(tach(Surface|Curve)|pendNode|f(orm(Bend|S(ine|quash)|Twist|ableShape|F(unc|lare)|Wave)|ault(RenderUtilityList|ShaderList|TextureList|LightList))|lete(Co(lorSet|mponent)|UVSet))|ag(Node|Pose)|r(opoffLocator|agField))|u(seBackground|n(trim|i(t(Conversion|ToTimeConversion)|formField)|known(Transform|Dag)?)|vChooser)|j(iggle|oint(Cluster|Ffd|Lattice)?)|p(sdFileTex|hong(E)?|o(s(tProcessList|itionMarker)|int(MatrixMult|Constraint|On(SurfaceInfo|CurveInfo)|Emitter|Light)|l(y(Reduce|M(irror|o(difier(UV|World)?|ve(UV|Edge|Vertex|Face(tUV)?))|erge(UV|Edge|Vert|Face)|ap(Sew(Move)?|Cut|Del))|B(oolOp|evel|lindData|ase)|S(traightenUVBorder|oftEdge|ubd(Edge|Face)|p(h(ere|Proj)|lit(Ring|Edge|Vert)?)|e(parate|wEdge)|mooth(Proxy|Face)?)|Normal(izeUV|PerVertex)?|C(hipOff|yl(inder|Proj)|o(ne|pyUV|l(orPerVertex|lapse(Edge|F)))|u(t(Manip(Container)?)?|be)|loseBorder|rea(seEdge|t(or|eFace)))|T(o(Subdiv|rus)|weak(UV)?|r(iangulate|ansfer))|OptUvs|D(uplicateEdge|el(Edge|Vertex|Facet))|Unite|P(yramid|oke(Manip)?|lan(e|arProj)|r(i(sm|mitive)|oj))|Extrude(Edge|Vertex|Face)|VertexNormalManip|Quad|Flip(UV|Edge)|WedgeFace|LayoutUV|A(utoProj|ppend(Vertex)?|verageVertex))|eVectorConstraint))|fx(Geometry|Hair|Toon)|l(usMinusAverage|a(n(e|arTrimSurface)|ce(2dTexture|3dTexture)))|a(ssMatrix|irBlend|r(ti(cle(SamplerInfo|C(olorMapper|loud)|TranspMapper|IncandMapper|AgeMapper)?|tion)|ent(Constraint|Tessellate)|amDimension))|r(imitive|o(ject(ion|Curve|Tangent)|xyManager)))|e(n(tity|v(Ball|ironmentFog|S(phere|ky)|C(hrome|ube)|Fog))|x(t(end(Surface|Curve)|rude)|p(lodeNurbsShell|ression)))|v(iewManip|o(lume(Shader|Noise|Fog|Light|AxisField)|rtexField)|e(ctor(RenderGlobals|Product)|rtexBakeSet))|quadShadingSwitch|f(i(tBspline|eld|l(ter(Resample|Simplify|ClosestSample|Euler)?|e|letCurve))|o(urByFourMatrix|llicle)|urPointOn(MeshInfo|Subd)|f(BlendSrf(Obsolete)?|d|FilletSrf)|l(ow|uid(S(hape|liceManip)|Texture(2D|3D)|Emitter)|exorShape)|ra(ctal|meCache))|w(tAddMatrix|ire|ood|eightGeometryFilter|ater|rap)|l(ight(Info|Fog|Li(st|nker))?|o(cator|okAt|d(Group|Thresholds)|ft)|uminance|ea(stSquaresModifier|ther)|a(yered(Shader|Texture)|ttice|mbert))|a(n(notationShape|i(sotropic|m(Blend(InOut)?|C(urve(T(T|U|L|A)|U(T|U|L|A))?|lip)))|gleBetween)|tt(ach(Surface|Curve)|rHierarchyTest)|i(rField|mConstraint)|dd(Matrix|DoubleLinear)|udio|vg(SurfacePoints|NurbsSurfacePoints|Curves)|lign(Manip|Surface|Curve)|r(cLengthDimension|tAttrPaintTest|eaLight|rayMapper)|mbientLight|bstractBase(NurbsConversion|Create))|r(igid(Body|Solver|Constraint)|o(ck|undConstantRadius)|e(s(olution|ultCurve(TimeTo(Time|Unitless|Linear|Angular))?)|nder(Rect|Globals(List)?|Box|Sphere|Cone|Quality|L(ight|ayer(Manager)?))|cord|v(olve(dPrimitive)?|erse(Surface|Curve)?)|f(erence|lect)|map(Hsv|Color|Value)|build(Surface|Curve))|a(dialField|mp(Shader)?)|gbToHsv|bfSrf)|g(uide|eo(Connect(or|able)|metry(Shape|Constraint|VarGroup|Filter))|lobal(Stitch|CacheControl)|ammaCorrect|r(id|oup(Id|Parts)|a(nite|vityField)))|Fur(Globals|Description|Feedback|Attractors)|xformManip|m(o(tionPath|untain|vie)|u(te|lt(Matrix|i(plyDivide|listerLight)|DoubleLinear))|pBirailSrf|e(sh(VarGroup)?|ntalray(Texture|IblShape))|a(terialInfo|ke(Group|Nurb(sSquare|Sphere|C(ylinder|ircle|one|ube)|Torus|Plane)|CircularArc|T(hreePointCircularArc|extCurves|woPointCircularArc))|rble))|b(irailSrf|o(neLattice|olean|undary(Base)?)|u(lge|mp(2d|3d))|evel(Plus)?|l(in(n|dDataTemplate)|end(Shape|Color(s|Sets)|TwoAttr|Device|Weighted)?)|a(se(GeometryVarGroup|ShadingSwitch|Lattice)|keSet)|r(ownian|ush)))\\b' }, - { caseInsensitive: true, - token: 'keyword.control.mel', - regex: '\\b(if|in|else|for|while|break|continue|case|default|do|switch|return|switch|case|source|catch|alias)\\b' }, - { token: 'keyword.other.mel', regex: '\\b(global)\\b' }, - { caseInsensitive: true, - token: 'constant.language.mel', - regex: '\\b(null|undefined)\\b' }, - { token: 'constant.numeric.mel', - regex: '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\\b' }, - { token: 'punctuation.definition.string.begin.mel', - regex: '"', - push: - [ { token: 'constant.character.escape.mel', regex: '\\\\.' }, - { token: 'punctuation.definition.string.end.mel', - regex: '"', - next: 'pop' }, - { defaultToken: 'string.quoted.double.mel' } ] }, - - { token: [ 'variable.other.mel', 'punctuation.definition.variable.mel' ], - regex: '(\\$)([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*?\\b)' }, - - { token: 'punctuation.definition.string.begin.mel', - regex: '\'', - push: - [ { token: 'constant.character.escape.mel', regex: '\\\\.' }, - { token: 'punctuation.definition.string.end.mel', - regex: '\'', - next: 'pop' }, - { defaultToken: 'string.quoted.single.mel' } ] }, - - { token: 'constant.language.mel', - regex: '\\b(false|true|yes|no|on|off)\\b' }, - - { token: 'punctuation.definition.comment.mel', - regex: '/\\*', - push: - [ { token: 'punctuation.definition.comment.mel', - regex: '\\*/', - next: 'pop' }, - { defaultToken: 'comment.block.mel' } ] }, - - { token: [ 'comment.line.double-slash.mel', 'punctuation.definition.comment.mel' ], - regex: '(//)(.*$\\n?)' }, - - { caseInsensitive: true, - token: 'keyword.operator.mel', - regex: '\\b(instanceof)\\b' }, - { token: 'keyword.operator.symbolic.mel', - regex: '[-\\!\\%\\&\\*\\+\\=\\/\\?\\:]' }, - - { token: [ 'meta.preprocessor.mel', 'punctuation.definition.preprocessor.mel' ], - regex: '(^[ \\t]*)((?:#)[a-zA-Z]+)' }, - - { token: [ 'meta.function.mel', 'keyword.other.mel', 'storage.type.mel', 'entity.name.function.mel', 'punctuation.section.function.mel' ], - regex: '((?:global\\s*)?proc)\\s*(\\w+\\s*\\[?\\]?\\s+|\\s+)([A-Za-z_][A-Za-z0-9_\\.]*)(\\s*(\\())', - push: - [ { include: '$self' }, - { token: 'punctuation.section.function.mel', - regex: '\\)', - next: 'pop' }, - { defaultToken: 'meta.function.mel' } ] } - - ] } - - this.normalizeRules(); -}; - -oop.inherits(MELHighlightRules, TextHighlightRules); - -exports.MELHighlightRules = MELHighlightRules; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/mel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mel_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var MELHighlightRules = require("./mel_highlight_rules").MELHighlightRules; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = MELHighlightRules; - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$id = "ace/mode/mel"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/mel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{caseInsensitive:!0,token:"storage.type.mel",regex:"\\b(matrix|string|vector|float|int|void)\\b"},{caseInsensitive:!0,token:"support.function.mel",regex:"\\b((s(h(ow(ManipCtx|S(hadingGroupAttrEditor|electionInTitle)|H(idden|elp)|Window)|el(f(Button|TabLayout|Layout)|lField)|ading(GeometryRelCtx|Node|Connection|LightRelCtx))|y(s(tem|File)|mbol(Button|CheckBox))|nap(shot|Mode|2to2 |TogetherCtx|Key)|c(ulpt|ene(UIReplacement|Editor)|ale(BrushBrightness |Constraint|Key(Ctx)?)?|r(ipt(Node|Ctx|Table|edPanel(Type)?|Job|EditorInfo)|oll(Field|Layout))|mh)|t(itch(Surface(Points)?|AndExplodeShell )|a(ckTrace|rt(sWith |String ))|r(cmp|i(ng(ToStringArray |Array(Remove(Duplicates | )|C(ount |atenate )|ToString |Intersector))|p )|oke))|i(n(gleProfileBirailSurface)?|ze|gn|mplify)|o(u(nd(Control)?|rce)|ft(Mod(Ctx)?)?|rt)|u(perCtx|rface(S(haderList|ampler))?|b(st(itute(Geometry|AllString )?|ring)|d(M(irror|a(tchTopology|p(SewMove|Cut)))|iv(Crease|DisplaySmoothness)?|C(ollapse|leanTopology)|T(o(Blind|Poly)|ransferUVsToCache)|DuplicateAndConnect|EditUV|ListComponentConversion|AutoProjection)))|p(h(ere|rand)|otLight(PreviewPort)?|aceLocator|r(ing|eadSheetEditor))|e(t(s|MenuMode|Sta(te |rtupMessage|mpDensity )|NodeTypeFlag|ConstraintRestPosition |ToolTo|In(putDeviceMapping|finity)|D(ynamic|efaultShadingGroup|rivenKeyframe)|UITemplate|P(ar(ticleAttr|ent)|roject )|E(scapeCtx|dit(or|Ctx))|Key(Ctx|frame|Path)|F(ocus|luidAttr)|Attr(Mapping)?)|parator|ed|l(ect(Mode|ionConnection|Context|Type|edNodes|Pr(iority|ef)|Key(Ctx)?)?|LoadSettings)|archPathArray )|kin(Cluster|Percent)|q(uareSurface|rt)|w(itchTable|atchDisplayPort)|a(ve(Menu|Shelf|ToolSettings|I(nitialState|mage)|Pref(s|Objects)|Fluid|A(ttrPreset |llShelves))|mpleImage)|rtContext|mooth(step|Curve|TangentSurface))|h(sv_to_rgb|yp(ot|er(Graph|Shade|Panel))|i(tTest|de|lite)|ot(Box|key(Check)?)|ud(Button|Slider(Button)?)|e(lp(Line)?|adsUpDisplay|rmite)|wRe(nder(Load)?|flectionMap)|ard(enPointCurve|ware(RenderPanel)?))|n(o(nLinear|ise|de(Type|IconButton|Outliner|Preset)|rmal(ize |Constraint))|urbs(Boolean|S(elect|quare)|C(opyUVSet|ube)|To(Subdiv|Poly(gonsPref)?)|Plane|ViewDirectionVector )|ew(ton|PanelItems)|ame(space(Info)?|Command|Field))|c(h(oice|dir|eck(Box(Grp)?|DefaultRenderGlobals)|a(n(nelBox|geSubdiv(Region|ComponentDisplayLevel))|racter(Map|OutlineEditor)?))|y(cleCheck|linder)|tx(Completion|Traverse|EditMode|Abort)|irc(ularFillet|le)|o(s|n(str(uctionHistory|ain(Value)?)|nect(ionInfo|Control|Dynamic|Joint|Attr)|t(extInfo|rol)|dition|e|vert(SolidTx|Tessellation|Unit|FromOldLayers |Lightmap)|firmDialog)|py(SkinWeights|Key|Flexor|Array )|l(or(Slider(Grp|ButtonGrp)|Index(SliderGrp)?|Editor|AtPoint)?|umnLayout|lision)|arsenSubdivSelectionList|m(p(onentEditor|utePolysetVolume |actHairSystem )|mand(Port|Echo|Line)))|u(tKey|r(ve(MoveEPCtx|SketchCtx|CVCtx|Intersect|OnSurface|E(ditorCtx|PCtx)|AddPtCtx)?|rent(Ctx|Time(Ctx)?|Unit)))|p(GetSolverAttr|Button|S(olver(Types)?|e(t(SolverAttr|Edit)|am))|C(o(nstraint|llision)|ache)|Tool|P(anel|roperty))|eil|l(ip(Schedule(rOutliner)?|TrimBefore |Editor(CurrentTimeCtx)?)?|ose(Surface|Curve)|uster|ear(Cache)?|amp)|a(n(CreateManip|vas)|tch(Quiet)?|pitalizeString |mera(View)?)|r(oss(Product )?|eate(RenderLayer|MotionField |SubdivRegion|N(ode|ewShelf )|D(isplayLayer|rawCtx)|Editor))|md(Shell|FileOutput))|M(R(ender(ShadowData|Callback|Data|Util|View|Line(Array)?)|ampAttribute)|G(eometryData|lobal)|M(odelMessage|essage|a(nipData|t(erial|rix)))|BoundingBox|S(yntax|ceneMessage|t(atus|ring(Array)?)|imple|pace|elect(ion(Mask|List)|Info)|watchRender(Register|Base))|H(ardwareRenderer|WShaderSwatchGenerator)|NodeMessage|C(o(nditionMessage|lor(Array)?|m(putation|mand(Result|Message)))|ursor|loth(Material|S(ystem|olverRegister)|Con(straint|trol)|Triangle|Particle|Edge|Force)|allbackIdArray)|T(ypeId|ime(r(Message)?|Array)?|oolsInfo|esselationParams|r(imBoundaryArray|ansformationMatrix))|I(ntArray|t(Geometry|Mesh(Polygon|Edge|Vertex|FaceVertex)|S(urfaceCV|electionList)|CurveCV|Instancer|eratorType|D(ependency(Graph|Nodes)|ag)|Keyframe)|k(System|HandleGroup)|mage)|3dView|Object(SetMessage|Handle|Array)?|D(G(M(odifier|essage)|Context)|ynSwept(Triangle|Line)|istance|oubleArray|evice(State|Channel)|a(ta(Block|Handle)|g(M(odifier|essage)|Path(Array)?))|raw(Request(Queue)?|Info|Data|ProcedureBase))|U(serEventMessage|i(nt(Array|64Array)|Message))|P(o(int(Array)?|lyMessage)|lug(Array)?|rogressWindow|x(G(eometry(Iterator|Data)|lBuffer)|M(idiInputDevice|odelEditorCommand|anipContainer)|S(urfaceShape(UI)?|pringNode|electionContext)|HwShaderNode|Node|Co(ntext(Command)?|m(ponentShape|mand))|T(oolCommand|ransform(ationMatrix)?)|IkSolver(Node)?|3dModelView|ObjectSet|D(eformerNode|ata|ragAndDropBehavior)|PolyT(weakUVCommand|rg)|EmitterNode|F(i(eldNode|leTranslator)|luidEmitterNode)|LocatorNode))|E(ulerRotation|vent(Message)?)|ayatomr|Vector(Array)?|Quaternion|F(n(R(otateManip|eflectShader|adialField)|G(e(nericAttribute|ometry(Data|Filter))|ravityField)|M(otionPath|es(sageAttribute|h(Data)?)|a(nip3D|trix(Data|Attribute)))|B(l(innShader|endShapeDeformer)|ase)|S(caleManip|t(ateManip|ring(Data|ArrayData))|ingleIndexedComponent|ubd(Names|Data)?|p(hereData|otLight)|et|kinCluster)|HikEffector|N(on(ExtendedLight|AmbientLight)|u(rbs(Surface(Data)?|Curve(Data)?)|meric(Data|Attribute))|ewtonField)|C(haracter|ircleSweepManip|ompo(nent(ListData)?|undAttribute)|urveSegmentManip|lip|amera)|T(ypedAttribute|oggleManip|urbulenceField|r(ipleIndexedComponent|ansform))|I(ntArrayData|k(Solver|Handle|Joint|Effector))|D(ynSweptGeometryData|i(s(cManip|tanceManip)|rection(Manip|alLight))|ouble(IndexedComponent|ArrayData)|ependencyNode|a(ta|gNode)|ragField)|U(ni(tAttribute|formField)|Int64ArrayData)|P(hong(Shader|EShader)|oint(On(SurfaceManip|CurveManip)|Light|ArrayData)|fxGeometry|lugin(Data)?|arti(cleSystem|tion))|E(numAttribute|xpression)|V(o(lume(Light|AxisField)|rtexField)|ectorArrayData)|KeyframeDelta(Move|B(lockAddRemove|reakdown)|Scale|Tangent|InfType|Weighted|AddRemove)?|F(ield|luid|reePointTriadManip)|W(ireDeformer|eightGeometryFilter)|L(ight(DataAttribute)?|a(yeredShader|ttice(D(eformer|ata))?|mbertShader))|A(ni(sotropyShader|mCurve)|ttribute|irField|r(eaLight|rayAttrsData)|mbientLight))?|ile(IO|Object)|eedbackLine|loat(Matrix|Point(Array)?|Vector(Array)?|Array))|L(i(ghtLinks|brary)|ockMessage)|A(n(im(Message|C(ontrol|urveC(hange|lipboard(Item(Array)?)?))|Util)|gle)|ttribute(Spec(Array)?|Index)|r(rayData(Builder|Handle)|g(Database|Parser|List))))|t(hreePointArcCtx|ime(Control|Port|rX)|o(ol(Button|HasOptions|Collection|Dropped|PropertyWindow)|NativePath |upper|kenize(List )?|l(ower|erance)|rus|ggle(WindowVisibility|Axis)?)|u(rbulence|mble(Ctx)?)|ex(RotateContext|M(oveContext|anipContext)|t(ScrollList|Curves|ure(HairColor |DisplacePlane |PlacementContext|Window)|ToShelf |Field(Grp|ButtonGrp)?)?|S(caleContext|electContext|mudgeUVContext)|WinToolCtx)|woPointArcCtx|a(n(gentConstraint)?|bLayout)|r(im|unc(ate(HairCache|FluidCache))?|a(ns(formLimits|lator)|c(e|k(Ctx)?))))|i(s(olateSelect|Connected|True|Dirty|ParentOf |Valid(String |ObjectName |UiName )|AnimCurve )|n(s(tance(r)?|ert(Joint(Ctx)?|K(not(Surface|Curve)|eyCtx)))|heritTransform|t(S(crollBar|lider(Grp)?)|er(sect|nalVar|ToUI )|Field(Grp)?))|conText(Radio(Button|Collection)|Button|StaticLabel|CheckBox)|temFilter(Render|Type|Attr)?|prEngine|k(S(ystem(Info)?|olver|plineHandleCtx)|Handle(Ctx|DisplayScale)?|fkDisplayMethod)|m(portComposerCurves |fPlugins|age))|o(ceanNurbsPreviewPlane |utliner(Panel|Editor)|p(tion(Menu(Grp)?|Var)|en(GLExtension|MayaPref))|verrideModifier|ffset(Surface|Curve(OnSurface)?)|r(ientConstraint|bit(Ctx)?)|b(soleteProc |j(ect(Center|Type(UI)?|Layer )|Exists)))|d(yn(RelEd(itor|Panel)|Globals|C(ontrol|ache)|P(a(intEditor|rticleCtx)|ref)|Exp(ort|ression)|amicLoad)|i(s(connect(Joint|Attr)|tanceDim(Context|ension)|pla(y(RGBColor|S(tats|urface|moothness)|C(olor|ull)|Pref|LevelOfDetail|Affected)|cementToPoly)|kCache|able)|r(name |ect(ionalLight|KeyCtx)|map)|mWhen)|o(cServer|Blur|t(Product )?|ubleProfileBirailSurface|peSheetEditor|lly(Ctx)?)|uplicate(Surface|Curve)?|e(tach(Surface|Curve|DeviceAttr)|vice(Panel|Editor)|f(ine(DataServer|VirtualDevice)|ormer|ault(Navigation|LightListCheckBox))|l(ete(Sh(elfTab |adingGroupsAndMaterials )|U(nusedBrushes |I)|Attr)?|randstr)|g_to_rad)|agPose|r(opoffLocator|ag(gerContext)?)|g(timer|dirty|Info|eval))|CBG |u(serCtx|n(t(angleUV|rim)|i(t|form)|do(Info)?|loadPlugin|assignInputDevice|group)|iTemplate|p(dateAE |Axis)|v(Snapshot|Link))|joint(C(tx|luster)|DisplayScale|Lattice)?|p(sd(ChannelOutliner|TextureFile|E(ditTextureFile|xport))|close|i(c(ture|kWalk)|xelMove)|o(se|int(MatrixMult |C(onstraint|urveConstraint)|On(Surface|Curve)|Position|Light)|p(upMenu|en)|w|l(y(Reduce|GeoSampler|M(irrorFace|ove(UV|Edge|Vertex|Facet(UV)?)|erge(UV|Edge(Ctx)?|Vertex|Facet(Ctx)?)|ap(Sew(Move)?|Cut|Del))|B(oolOp|evel|l(indData|endColor))|S(traightenUVBorder|oftEdge|u(perCtx|bdivide(Edge|Facet))|p(her(icalProjection|e)|lit(Ring|Ctx|Edge|Vertex)?)|e(tToFaceNormal|parate|wEdge|lect(Constraint(Monitor)?|EditCtx))|mooth)|Normal(izeUV|PerVertex)?|C(hipOff|ylind(er|ricalProjection)|o(ne|pyUV|l(or(BlindData|Set|PerVertex)|lapse(Edge|Facet)))|u(t(Ctx)?|be)|l(ipboard|oseBorder)|acheMonitor|rea(seEdge|teFacet(Ctx)?))|T(o(Subdiv|rus)|r(iangulate|ansfer))|In(stallAction|fo)|Options|D(uplicate(Edge|AndConnect)|el(Edge|Vertex|Facet))|U(nite|VSet)|P(yramid|oke|lan(e|arProjection)|r(ism|ojection))|E(ditUV|valuate|xtrude(Edge|Facet))|Qu(eryBlindData|ad)|F(orceUV|lip(UV|Edge))|WedgeFace|L(istComponentConversion|ayoutUV)|A(utoProjection|ppend(Vertex|FacetCtx)?|verage(Normal|Vertex)))|eVectorConstraint))|utenv|er(cent|formanceOptions)|fxstrokes|wd|l(uginInfo|a(y(b(last|ackOptions))?|n(e|arSrf)))|a(steKey|ne(l(History|Configuration)?|Layout)|thAnimation|irBlend|use|lettePort|r(ti(cle(RenderInfo|Instancer|Exists)?|tion)|ent(Constraint)?|am(Dim(Context|ension)|Locator)))|r(int|o(j(ect(ion(Manip|Context)|Curve|Tangent)|FileViewer)|pMo(dCtx|ve)|gress(Bar|Window)|mptDialog)|eloadRefEd))|e(n(codeString|d(sWith |String )|v|ableDevice)|dit(RenderLayer(Globals|Members)|or(Template)?|DisplayLayer(Globals|Members)|AttrLimits )|v(ent|al(Deferred|Echo)?)|quivalent(Tol | )|ffector|r(f|ror)|x(clusiveLightCheckBox|t(end(Surface|Curve)|rude)|ists|p(ortComposerCurves |ression(EditorListen)?)?|ec(uteForEachObject )?|actWorldBoundingBox)|mit(ter)?)|v(i(sor|ew(Set|HeadOn|2dToolCtx|C(lipPlane|amera)|Place|Fit|LookAt))|o(lumeAxis|rtex)|e(ctorize|rifyCmd )|alidateShelfName )|key(Tangent|frame(Region(MoveKeyCtx|S(caleKeyCtx|e(tKeyCtx|lectKeyCtx))|CurrentTimeCtx|TrackCtx|InsertKeyCtx|D(irectKeyCtx|ollyCtx))|Stats|Outliner)?)|qu(it|erySubdiv)|f(c(heck|lose)|i(nd(RelatedSkinCluster |MenuItem |er|Keyframe|AllIntersections )|tBspline|l(ter(StudioImport|Curve|Expand)?|e(BrowserDialog|test|Info|Dialog|Extension )?|letCurve)|rstParentOf )|o(ntDialog|pen|rmLayout)|print|eof|flush|write|l(o(or|w|at(S(crollBar|lider(Grp|ButtonGrp|2)?)|Eq |Field(Grp)?))|u(shUndo|id(CacheInfo|Emitter|VoxelInfo))|exor)|r(omNativePath |e(eFormFillet|wind|ad)|ameLayout)|get(word|line)|mod)|w(hatIs|i(ndow(Pref)?|re(Context)?)|orkspace|ebBrowser(Prefs)?|a(itCursor|rning)|ri(nkle(Context)?|teTake))|l(s(T(hroughFilter|ype )|UI)?|i(st(Relatives|MenuAnnotation |Sets|History|NodeTypes|C(onnections|ameras)|Transforms |InputDevice(s|Buttons|Axes)|erEditor|DeviceAttachments|Unselected |A(nimatable|ttr))|n(step|eIntersection )|ght(link|List(Panel|Editor)?))|o(ckNode|okThru|ft|ad(NewShelf |P(lugin|refObjects)|Fluid)|g)|a(ssoContext|y(out|er(Button|ed(ShaderPort|TexturePort)))|ttice(DeformKeyCtx)?|unch(ImageEditor)?))|a(ssign(Command|InputDevice)|n(notate|im(C(one|urveEditor)|Display|View)|gle(Between)?)|tt(ach(Surface|Curve|DeviceAttr)|r(ibute(Menu|Info|Exists|Query)|NavigationControlGrp|Co(ntrolGrp|lorSliderGrp|mpatibility)|PresetEditWin|EnumOptionMenu(Grp)?|Field(Grp|SliderGrp)))|i(r|mConstraint)|d(d(NewShelfTab|Dynamic|PP|Attr(ibuteEditorNodeHelp)?)|vanceToNextDrivenKey)|uto(Place|Keyframe)|pp(endStringArray|l(y(Take|AttrPreset)|icationName))|ffect(s|edNet)|l(i(as(Attr)?|gn(Surface|C(tx|urve))?)|lViewFit)|r(c(len|Len(DimContext|gthDimension))|t(BuildPaintMenu|Se(tPaintCtx|lectCtx)|3dPaintCtx|UserPaintCtx|PuttyCtx|FluidAttrCtx|Attr(SkinPaintCtx|Ctx|PaintVertexCtx))|rayMapper)|mbientLight|b(s|out))|r(igid(Body|Solver)|o(t(at(ionInterpolation|e))?|otOf |undConstantRadius|w(ColumnLayout|Layout)|ll(Ctx)?)|un(up|TimeCommand)|e(s(olutionNode|et(Tool|AE )|ampleFluid)|hash|n(der(GlobalsNode|Manip|ThumbnailUpdate|Info|er|Partition|QualityNode|Window(SelectContext|Editor)|LayerButton)?|ame(SelectionList |UI|Attr)?)|cord(Device|Attr)|target|order(Deformers)?|do|v(olve|erse(Surface|Curve))|quires|f(ineSubdivSelectionList|erence(Edit|Query)?|resh(AE )?)|loadImage|adTake|root|move(MultiInstance|Joint)|build(Surface|Curve))|a(n(d(state|omizeFollicles )?|geControl)|d(i(o(MenuItemCollection|Button(Grp)?|Collection)|al)|_to_deg)|mpColorPort)|gb_to_hsv)|g(o(toBindPose |al)|e(t(M(odifiers|ayaPanelTypes )|Classification|InputDeviceRange|pid|env|DefaultBrush|Pa(nel|rticleAttr)|F(ileList|luidAttr)|A(ttr|pplicationVersionAsFloat ))|ometryConstraint)|l(Render(Editor)?|obalStitch)|a(uss|mma)|r(id(Layout)?|oup(ObjectsByName )?|a(dientControl(NoAttr)?|ph(SelectContext|TrackCtx|DollyCtx)|vity|bColor))|match)|x(pmPicker|form|bmLangPathList )|m(i(n(imizeApp)?|rrorJoint)|o(del(CurrentTimeCtx|Panel|Editor)|use|v(In|e(IKtoFK |VertexAlongDirection|KeyCtx)?|Out))|u(te|ltiProfileBirailSurface)|e(ssageLine|nu(BarLayout|Item(ToShelf )?|Editor)?|mory)|a(nip(Rotate(Context|LimitsCtx)|Move(Context|LimitsCtx)|Scale(Context|LimitsCtx)|Options)|tch|ke(Roll |SingleSurface|TubeOn |Identity|Paintable|bot|Live)|rker|g|x))|b(in(Membership|d(Skin|Pose))|o(neLattice|undary|x(ZoomCtx|DollyCtx))|u(tton(Manip)?|ild(BookmarkMenu|KeyframeMenu)|fferCurve)|e(ssel|vel(Plus)?)|l(indDataType|end(Shape(Panel|Editor)?|2|TwoAttr))|a(sename(Ex | )|tchRender|ke(Results|Simulation|Clip|PartialHistory|FluidShading )))))\\b"},{caseInsensitive:!0,token:"support.constant.mel",regex:"\\b(s(h(ellTessellate|a(d(ing(Map|Engine)|erGlow)|pe))|n(ow|apshot(Shape)?)|c(ulpt|aleConstraint|ript)|t(yleCurve|itch(Srf|AsNurbsShell)|u(cco|dioClearCoat)|encil|roke(Globals)?)|i(ngleShadingSwitch|mpleVolumeShader)|o(ftMod(Manip|Handle)?|lidFractal)|u(rface(Sha(der|pe)|Info|EdManip|VarGroup|Luminance)|b(Surface|d(M(odifier(UV|World)?|ap(SewMove|Cut|pingManip))|B(lindData|ase)|iv(ReverseFaces|SurfaceVarGroup|Co(llapse|mponentId)|To(Nurbs|Poly))?|HierBlind|CleanTopology|Tweak(UV)?|P(lanarProj|rojManip)|LayoutUV|A(ddTopology|utoProj))|Curve))|p(BirailSrf|otLight|ring)|e(tRange|lectionListOperator)|k(inCluster|etchPlane)|quareSrf|ampler(Info)?|m(ooth(Curve|TangentSrf)|ear))|h(svToRgb|yper(GraphInfo|View|Layout)|ik(Solver|Handle|Effector)|oldMatrix|eightField|w(Re(nderGlobals|flectionMap)|Shader)|a(ir(System|Constraint|TubeShader)|rd(enPoint|wareRenderGlobals)))|n(o(n(ExtendedLightShapeNode|Linear|AmbientLightShapeNode)|ise|rmalConstraint)|urbs(Surface|Curve|T(oSubdiv(Proc)?|essellate)|DimShape)|e(twork|wtonField))|c(h(o(ice|oser)|ecker|aracter(Map|Offset)?)|o(n(straint|tr(olPoint|ast)|dition)|py(ColorSet|UVSet))|urve(Range|Shape|Normalizer(Linear|Angle)?|In(tersect|fo)|VarGroup|From(Mesh(CoM|Edge)?|Su(rface(Bnd|CoS|Iso)?|bdiv(Edge|Face)?)))|l(ip(Scheduler|Library)|o(se(stPointOnSurface|Surface|Curve)|th|ud)|uster(Handle)?|amp)|amera(View)?|r(eate(BPManip|ColorSet|UVSet)|ater))|t(ime(ToUnitConversion|Function)?|oo(nLineAttributes|lDrawManip)|urbulenceField|ex(BaseDeformManip|ture(BakeSet|2d|ToGeom|3d|Env)|SmudgeUVManip|LatticeDeformManip)|weak|angentConstraint|r(i(pleShadingSwitch|m(WithBoundaries)?)|ansform(Geometry)?))|i(n(s(tancer|ertKnot(Surface|Curve))|tersectSurface)|k(RPsolver|MCsolver|S(ystem|olver|Csolver|plineSolver)|Handle|PASolver|Effector)|m(plicit(Box|Sphere|Cone)|agePlane))|o(cean(Shader)?|pticalFX|ffset(Surface|C(os|urve))|ldBlindDataBase|rient(Constraint|ationMarker)|bject(RenderFilter|MultiFilter|BinFilter|S(criptFilter|et)|NameFilter|TypeFilter|Filter|AttrFilter))|d(yn(Globals|Base)|i(s(tance(Between|DimShape)|pla(yLayer(Manager)?|cementShader)|kCache)|rect(ionalLight|edDisc)|mensionShape)|o(ubleShadingSwitch|f)|pBirailSrf|e(tach(Surface|Curve)|pendNode|f(orm(Bend|S(ine|quash)|Twist|ableShape|F(unc|lare)|Wave)|ault(RenderUtilityList|ShaderList|TextureList|LightList))|lete(Co(lorSet|mponent)|UVSet))|ag(Node|Pose)|r(opoffLocator|agField))|u(seBackground|n(trim|i(t(Conversion|ToTimeConversion)|formField)|known(Transform|Dag)?)|vChooser)|j(iggle|oint(Cluster|Ffd|Lattice)?)|p(sdFileTex|hong(E)?|o(s(tProcessList|itionMarker)|int(MatrixMult|Constraint|On(SurfaceInfo|CurveInfo)|Emitter|Light)|l(y(Reduce|M(irror|o(difier(UV|World)?|ve(UV|Edge|Vertex|Face(tUV)?))|erge(UV|Edge|Vert|Face)|ap(Sew(Move)?|Cut|Del))|B(oolOp|evel|lindData|ase)|S(traightenUVBorder|oftEdge|ubd(Edge|Face)|p(h(ere|Proj)|lit(Ring|Edge|Vert)?)|e(parate|wEdge)|mooth(Proxy|Face)?)|Normal(izeUV|PerVertex)?|C(hipOff|yl(inder|Proj)|o(ne|pyUV|l(orPerVertex|lapse(Edge|F)))|u(t(Manip(Container)?)?|be)|loseBorder|rea(seEdge|t(or|eFace)))|T(o(Subdiv|rus)|weak(UV)?|r(iangulate|ansfer))|OptUvs|D(uplicateEdge|el(Edge|Vertex|Facet))|Unite|P(yramid|oke(Manip)?|lan(e|arProj)|r(i(sm|mitive)|oj))|Extrude(Edge|Vertex|Face)|VertexNormalManip|Quad|Flip(UV|Edge)|WedgeFace|LayoutUV|A(utoProj|ppend(Vertex)?|verageVertex))|eVectorConstraint))|fx(Geometry|Hair|Toon)|l(usMinusAverage|a(n(e|arTrimSurface)|ce(2dTexture|3dTexture)))|a(ssMatrix|irBlend|r(ti(cle(SamplerInfo|C(olorMapper|loud)|TranspMapper|IncandMapper|AgeMapper)?|tion)|ent(Constraint|Tessellate)|amDimension))|r(imitive|o(ject(ion|Curve|Tangent)|xyManager)))|e(n(tity|v(Ball|ironmentFog|S(phere|ky)|C(hrome|ube)|Fog))|x(t(end(Surface|Curve)|rude)|p(lodeNurbsShell|ression)))|v(iewManip|o(lume(Shader|Noise|Fog|Light|AxisField)|rtexField)|e(ctor(RenderGlobals|Product)|rtexBakeSet))|quadShadingSwitch|f(i(tBspline|eld|l(ter(Resample|Simplify|ClosestSample|Euler)?|e|letCurve))|o(urByFourMatrix|llicle)|urPointOn(MeshInfo|Subd)|f(BlendSrf(Obsolete)?|d|FilletSrf)|l(ow|uid(S(hape|liceManip)|Texture(2D|3D)|Emitter)|exorShape)|ra(ctal|meCache))|w(tAddMatrix|ire|ood|eightGeometryFilter|ater|rap)|l(ight(Info|Fog|Li(st|nker))?|o(cator|okAt|d(Group|Thresholds)|ft)|uminance|ea(stSquaresModifier|ther)|a(yered(Shader|Texture)|ttice|mbert))|a(n(notationShape|i(sotropic|m(Blend(InOut)?|C(urve(T(T|U|L|A)|U(T|U|L|A))?|lip)))|gleBetween)|tt(ach(Surface|Curve)|rHierarchyTest)|i(rField|mConstraint)|dd(Matrix|DoubleLinear)|udio|vg(SurfacePoints|NurbsSurfacePoints|Curves)|lign(Manip|Surface|Curve)|r(cLengthDimension|tAttrPaintTest|eaLight|rayMapper)|mbientLight|bstractBase(NurbsConversion|Create))|r(igid(Body|Solver|Constraint)|o(ck|undConstantRadius)|e(s(olution|ultCurve(TimeTo(Time|Unitless|Linear|Angular))?)|nder(Rect|Globals(List)?|Box|Sphere|Cone|Quality|L(ight|ayer(Manager)?))|cord|v(olve(dPrimitive)?|erse(Surface|Curve)?)|f(erence|lect)|map(Hsv|Color|Value)|build(Surface|Curve))|a(dialField|mp(Shader)?)|gbToHsv|bfSrf)|g(uide|eo(Connect(or|able)|metry(Shape|Constraint|VarGroup|Filter))|lobal(Stitch|CacheControl)|ammaCorrect|r(id|oup(Id|Parts)|a(nite|vityField)))|Fur(Globals|Description|Feedback|Attractors)|xformManip|m(o(tionPath|untain|vie)|u(te|lt(Matrix|i(plyDivide|listerLight)|DoubleLinear))|pBirailSrf|e(sh(VarGroup)?|ntalray(Texture|IblShape))|a(terialInfo|ke(Group|Nurb(sSquare|Sphere|C(ylinder|ircle|one|ube)|Torus|Plane)|CircularArc|T(hreePointCircularArc|extCurves|woPointCircularArc))|rble))|b(irailSrf|o(neLattice|olean|undary(Base)?)|u(lge|mp(2d|3d))|evel(Plus)?|l(in(n|dDataTemplate)|end(Shape|Color(s|Sets)|TwoAttr|Device|Weighted)?)|a(se(GeometryVarGroup|ShadingSwitch|Lattice)|keSet)|r(ownian|ush)))\\b"},{caseInsensitive:!0,token:"keyword.control.mel",regex:"\\b(if|in|else|for|while|break|continue|case|default|do|switch|return|switch|case|source|catch|alias)\\b"},{token:"keyword.other.mel",regex:"\\b(global)\\b"},{caseInsensitive:!0,token:"constant.language.mel",regex:"\\b(null|undefined)\\b"},{token:"constant.numeric.mel",regex:"\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\\b"},{token:"punctuation.definition.string.begin.mel",regex:'"',push:[{token:"constant.character.escape.mel",regex:"\\\\."},{token:"punctuation.definition.string.end.mel",regex:'"',next:"pop"},{defaultToken:"string.quoted.double.mel"}]},{token:["variable.other.mel","punctuation.definition.variable.mel"],regex:"(\\$)([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*?\\b)"},{token:"punctuation.definition.string.begin.mel",regex:"'",push:[{token:"constant.character.escape.mel",regex:"\\\\."},{token:"punctuation.definition.string.end.mel",regex:"'",next:"pop"},{defaultToken:"string.quoted.single.mel"}]},{token:"constant.language.mel",regex:"\\b(false|true|yes|no|on|off)\\b"},{token:"punctuation.definition.comment.mel",regex:"/\\*",push:[{token:"punctuation.definition.comment.mel",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.mel"}]},{token:["comment.line.double-slash.mel","punctuation.definition.comment.mel"],regex:"(//)(.*$\\n?)"},{caseInsensitive:!0,token:"keyword.operator.mel",regex:"\\b(instanceof)\\b"},{token:"keyword.operator.symbolic.mel",regex:"[-\\!\\%\\&\\*\\+\\=\\/\\?\\:]"},{token:["meta.preprocessor.mel","punctuation.definition.preprocessor.mel"],regex:"(^[ \\t]*)((?:#)[a-zA-Z]+)"},{token:["meta.function.mel","keyword.other.mel","storage.type.mel","entity.name.function.mel","punctuation.section.function.mel"],regex:"((?:global\\s*)?proc)\\s*(\\w+\\s*\\[?\\]?\\s+|\\s+)([A-Za-z_][A-Za-z0-9_\\.]*)(\\s*(\\())",push:[{include:"$self"},{token:"punctuation.section.function.mel",regex:"\\)",next:"pop"},{defaultToken:"meta.function.mel"}]}]},this.normalizeRules()};n.inherits(i,o),t.MELHighlightRules=i}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,r){"use strict";var n,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,l=e("../../lib/lang"),s=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],d={},c=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,d.rangeCount!=e.multiSelect.rangeCount&&(d={rangeCount:e.multiSelect.rangeCount})),d[t]?n=d[t]:void(n=d[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},g=function(){this.add("braces","insertion",function(e,t,r,o,i){var a=r.getCursorPosition(),s=o.doc.getLine(a.row);if("{"==i){c(r);var u=r.getSelectionRange(),d=o.doc.getTextRange(u);if(""!==d&&"{"!==d&&r.getWrapBehavioursEnabled())return{text:"{"+d+"}",selection:!1};if(g.isSaneInsertion(r,o))return/[\]\}\)]/.test(s[a.column])||r.inMultiSelectMode?(g.recordAutoInsert(r,o,"}"),{text:"{}",selection:[1,1]}):(g.recordMaybeInsert(r,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){c(r);var m=s.substring(a.column,a.column+1);if("}"==m){var p=o.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==p&&g.isAutoInsertedClosing(a,s,i))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){c(r);var f="";g.isMaybeInsertedClosing(a,s)&&(f=l.stringRepeat("}",n.maybeInsertedBrackets),g.clearMaybeInsertedClosing());var m=s.substring(a.column,a.column+1);if("}"===m){var h=o.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!h)return null;var C=this.$getIndent(o.getLine(h.row))}else{if(!f)return void g.clearMaybeInsertedClosing();var C=this.$getIndent(s)}var x=C+o.getTabString();return{text:"\n"+x+"\n"+C+f,selection:[1,x.length,1,x.length]}}g.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,r,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){c(r);var l=o.doc.getLine(i.start.row),s=l.substring(i.end.column,i.end.column+1);if("}"==s)return i.end.column++,i;n.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,r,n,o){if("("==o){c(r);var i=r.getSelectionRange(),a=n.doc.getTextRange(i);if(""!==a&&r.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(g.isSaneInsertion(r,n))return g.recordAutoInsert(r,n,")"),{text:"()",selection:[1,1]}}else if(")"==o){c(r);var l=r.getCursorPosition(),s=n.doc.getLine(l.row),u=s.substring(l.column,l.column+1);if(")"==u){var d=n.$findOpeningBracket(")",{column:l.column+1,row:l.row});if(null!==d&&g.isAutoInsertedClosing(l,s,o))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,r,n,o){var i=n.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){c(r);var a=n.doc.getLine(o.start.row),l=a.substring(o.start.column+1,o.start.column+2);if(")"==l)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,r,n,o){if("["==o){c(r);var i=r.getSelectionRange(),a=n.doc.getTextRange(i);if(""!==a&&r.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(g.isSaneInsertion(r,n))return g.recordAutoInsert(r,n,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){c(r);var l=r.getCursorPosition(),s=n.doc.getLine(l.row),u=s.substring(l.column,l.column+1);if("]"==u){var d=n.$findOpeningBracket("]",{column:l.column+1,row:l.row});if(null!==d&&g.isAutoInsertedClosing(l,s,o))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,r,n,o){var i=n.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){c(r);var a=n.doc.getLine(o.start.row),l=a.substring(o.start.column+1,o.start.column+2);if("]"==l)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,r,n,o){if('"'==o||"'"==o){c(r);var i=o,a=r.getSelectionRange(),l=n.doc.getTextRange(a);if(""!==l&&"'"!==l&&'"'!=l&&r.getWrapBehavioursEnabled())return{text:i+l+i,selection:!1};var s=r.getCursorPosition(),u=n.doc.getLine(s.row),d=u.substring(s.column-1,s.column),g=u.substring(s.column,s.column+1),m=n.getTokenAt(s.row,s.column),p=n.getTokenAt(s.row,s.column+1);if("\\"==d&&m&&/escape/.test(m.type))return null;var f,h=m&&/string/.test(m.type),C=!p||/string/.test(p.type);if(g==i)f=h!==C;else{if(h&&!C)return null;if(h&&C)return null;var x=n.$mode.tokenRe;x.lastIndex=0;var y=x.test(d);x.lastIndex=0;var S=x.test(d);if(y||S)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;f=!0}return{text:f?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,r,n,o){var i=n.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){c(r);var a=n.doc.getLine(o.start.row),l=a.substring(o.start.column+1,o.start.column+2);if(l==i)return o.end.column++,o}})};g.isSaneInsertion=function(e,t){var r=e.getCursorPosition(),n=new a(t,r.row,r.column);if(!this.$matchTokenType(n.getCurrentToken()||"text",s)){var o=new a(t,r.row,r.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",s))return!1}return n.stepForward(),n.getCurrentTokenRow()!==r.row||this.$matchTokenType(n.getCurrentToken()||"text",u)},g.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},g.recordAutoInsert=function(e,t,r){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=o.row,n.autoInsertedLineEnd=r+i.substr(o.column),n.autoInsertedBrackets++},g.recordMaybeInsert=function(e,t,r){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=o.row,n.maybeInsertedLineStart=i.substr(0,o.column)+r,n.maybeInsertedLineEnd=i.substr(o.column),n.maybeInsertedBrackets++},g.isAutoInsertedClosing=function(e,t,r){return n.autoInsertedBrackets>0&&e.row===n.autoInsertedRow&&r===n.autoInsertedLineEnd[0]&&t.substr(e.column)===n.autoInsertedLineEnd},g.isMaybeInsertedClosing=function(e,t){return n.maybeInsertedBrackets>0&&e.row===n.maybeInsertedRow&&t.substr(e.column)===n.maybeInsertedLineEnd&&t.substr(0,e.column)==n.maybeInsertedLineStart},g.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},g.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},o.inherits(g,i),t.CstyleBehaviour=g}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,r){"use strict";var n=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};n.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,r){var n=e.getLine(r);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var o=this._getFoldWidgetBase(e,t,r);return!o&&this.startRegionRe.test(n)?"start":o},this.getFoldWidgetRange=function(e,t,r,n){var o=e.getLine(r);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,r);var i=o.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],r,a);var l=e.getCommentFoldRange(r,a+i[0].length,1);return l&&!l.isMultiLine()&&(n?l=this.getSectionRange(e,r):"all"!=t&&(l=null)),l}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],r,a):e.getCommentFoldRange(r,a,-1)}}},this.getSectionRange=function(e,t){var r=e.getLine(t),n=r.search(/\S/),i=t,a=r.length;t+=1;for(var l=t,s=e.getLength();++tu)break;var d=this.getFoldWidgetRange(e,"all",t);if(d){if(d.start.row<=i)break;if(d.isMultiLine())t=d.end.row;else if(n==u)break}l=t}}return new o(i,a,l,e.getLine(l).length)},this.getCommentRegionBlock=function(e,t,r){for(var n=t.search(/\s*$/),i=e.getLength(),a=r,l=/^\s*(?:\/\*|\/\/)#(end)?region\b/,s=1;++ra)return new o(a,n,d,t.length)}}.call(a.prototype)}),define("ace/mode/mel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mel_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=e("./text").Mode,i=e("./mel_highlight_rules").MELHighlightRules,a=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=i,this.$behaviour=new a,this.foldingRules=new l};n.inherits(s,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/mel"}.call(s.prototype),t.Mode=s}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-mushcode.js b/www/js/vendor/ace/mode-mushcode.js index faf600a5e..c94a4b9ea 100755 --- a/www/js/vendor/ace/mode-mushcode.js +++ b/www/js/vendor/ace/mode-mushcode.js @@ -1,674 +1 @@ -define("ace/mode/mushcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var MushCodeRules = function() { - - - var keywords = ( - "@if|"+ - "@ifelse|"+ - "@switch|"+ - "@halt|"+ - "@dolist|"+ - "@create|"+ - "@scent|"+ - "@sound|"+ - "@touch|"+ - "@ataste|"+ - "@osound|"+ - "@ahear|"+ - "@aahear|"+ - "@amhear|"+ - "@otouch|"+ - "@otaste|"+ - "@drop|"+ - "@odrop|"+ - "@adrop|"+ - "@dropfail|"+ - "@odropfail|"+ - "@smell|"+ - "@oemit|"+ - "@emit|"+ - "@pemit|"+ - "@parent|"+ - "@clone|"+ - "@taste|"+ - "whisper|"+ - "page|"+ - "say|"+ - "pose|"+ - "semipose|"+ - "teach|"+ - "touch|"+ - "taste|"+ - "smell|"+ - "listen|"+ - "look|"+ - "move|"+ - "go|"+ - "home|"+ - "follow|"+ - "unfollow|"+ - "desert|"+ - "dismiss|"+ - "@tel" - ); - - var builtinConstants = ( - "=#0" - ); - - var builtinFunctions = ( - "default|"+ - "edefault|"+ - "eval|"+ - "get_eval|"+ - "get|"+ - "grep|"+ - "grepi|"+ - "hasattr|"+ - "hasattrp|"+ - "hasattrval|"+ - "hasattrpval|"+ - "lattr|"+ - "nattr|"+ - "poss|"+ - "udefault|"+ - "ufun|"+ - "u|"+ - "v|"+ - "uldefault|"+ - "xget|"+ - "zfun|"+ - "band|"+ - "bnand|"+ - "bnot|"+ - "bor|"+ - "bxor|"+ - "shl|"+ - "shr|"+ - "and|"+ - "cand|"+ - "cor|"+ - "eq|"+ - "gt|"+ - "gte|"+ - "lt|"+ - "lte|"+ - "nand|"+ - "neq|"+ - "nor|"+ - "not|"+ - "or|"+ - "t|"+ - "xor|"+ - "con|"+ - "entrances|"+ - "exit|"+ - "followers|"+ - "home|"+ - "lcon|"+ - "lexits|"+ - "loc|"+ - "locate|"+ - "lparent|"+ - "lsearch|"+ - "next|"+ - "num|"+ - "owner|"+ - "parent|"+ - "pmatch|"+ - "rloc|"+ - "rnum|"+ - "room|"+ - "where|"+ - "zone|"+ - "worn|"+ - "held|"+ - "carried|"+ - "acos|"+ - "asin|"+ - "atan|"+ - "ceil|"+ - "cos|"+ - "e|"+ - "exp|"+ - "fdiv|"+ - "fmod|"+ - "floor|"+ - "log|"+ - "ln|"+ - "pi|"+ - "power|"+ - "round|"+ - "sin|"+ - "sqrt|"+ - "tan|"+ - "aposs|"+ - "andflags|"+ - "conn|"+ - "commandssent|"+ - "controls|"+ - "doing|"+ - "elock|"+ - "findable|"+ - "flags|"+ - "fullname|"+ - "hasflag|"+ - "haspower|"+ - "hastype|"+ - "hidden|"+ - "idle|"+ - "isbaker|"+ - "lock|"+ - "lstats|"+ - "money|"+ - "who|"+ - "name|"+ - "nearby|"+ - "obj|"+ - "objflags|"+ - "photo|"+ - "poll|"+ - "powers|"+ - "pendingtext|"+ - "receivedtext|"+ - "restarts|"+ - "restarttime|"+ - "subj|"+ - "shortestpath|"+ - "tmoney|"+ - "type|"+ - "visible|"+ - "cat|"+ - "element|"+ - "elements|"+ - "extract|"+ - "filter|"+ - "filterbool|"+ - "first|"+ - "foreach|"+ - "fold|"+ - "grab|"+ - "graball|"+ - "index|"+ - "insert|"+ - "itemize|"+ - "items|"+ - "iter|"+ - "last|"+ - "ldelete|"+ - "map|"+ - "match|"+ - "matchall|"+ - "member|"+ - "mix|"+ - "munge|"+ - "pick|"+ - "remove|"+ - "replace|"+ - "rest|"+ - "revwords|"+ - "setdiff|"+ - "setinter|"+ - "setunion|"+ - "shuffle|"+ - "sort|"+ - "sortby|"+ - "splice|"+ - "step|"+ - "wordpos|"+ - "words|"+ - "add|"+ - "lmath|"+ - "max|"+ - "mean|"+ - "median|"+ - "min|"+ - "mul|"+ - "percent|"+ - "sign|"+ - "stddev|"+ - "sub|"+ - "val|"+ - "bound|"+ - "abs|"+ - "inc|"+ - "dec|"+ - "dist2d|"+ - "dist3d|"+ - "div|"+ - "floordiv|"+ - "mod|"+ - "modulo|"+ - "remainder|"+ - "vadd|"+ - "vdim|"+ - "vdot|"+ - "vmag|"+ - "vmax|"+ - "vmin|"+ - "vmul|"+ - "vsub|"+ - "vunit|"+ - "regedit|"+ - "regeditall|"+ - "regeditalli|"+ - "regediti|"+ - "regmatch|"+ - "regmatchi|"+ - "regrab|"+ - "regraball|"+ - "regraballi|"+ - "regrabi|"+ - "regrep|"+ - "regrepi|"+ - "after|"+ - "alphamin|"+ - "alphamax|"+ - "art|"+ - "before|"+ - "brackets|"+ - "capstr|"+ - "case|"+ - "caseall|"+ - "center|"+ - "containsfansi|"+ - "comp|"+ - "decompose|"+ - "decrypt|"+ - "delete|"+ - "edit|"+ - "encrypt|"+ - "escape|"+ - "if|"+ - "ifelse|"+ - "lcstr|"+ - "left|"+ - "lit|"+ - "ljust|"+ - "merge|"+ - "mid|"+ - "ostrlen|"+ - "pos|"+ - "repeat|"+ - "reverse|"+ - "right|"+ - "rjust|"+ - "scramble|"+ - "secure|"+ - "space|"+ - "spellnum|"+ - "squish|"+ - "strcat|"+ - "strmatch|"+ - "strinsert|"+ - "stripansi|"+ - "stripfansi|"+ - "strlen|"+ - "switch|"+ - "switchall|"+ - "table|"+ - "tr|"+ - "trim|"+ - "ucstr|"+ - "unsafe|"+ - "wrap|"+ - "ctitle|"+ - "cwho|"+ - "channels|"+ - "clock|"+ - "cflags|"+ - "ilev|"+ - "itext|"+ - "inum|"+ - "convsecs|"+ - "convutcsecs|"+ - "convtime|"+ - "ctime|"+ - "etimefmt|"+ - "isdaylight|"+ - "mtime|"+ - "secs|"+ - "msecs|"+ - "starttime|"+ - "time|"+ - "timefmt|"+ - "timestring|"+ - "utctime|"+ - "atrlock|"+ - "clone|"+ - "create|"+ - "cook|"+ - "dig|"+ - "emit|"+ - "lemit|"+ - "link|"+ - "oemit|"+ - "open|"+ - "pemit|"+ - "remit|"+ - "set|"+ - "tel|"+ - "wipe|"+ - "zemit|"+ - "fbcreate|"+ - "fbdestroy|"+ - "fbwrite|"+ - "fbclear|"+ - "fbcopy|"+ - "fbcopyto|"+ - "fbclip|"+ - "fbdump|"+ - "fbflush|"+ - "fbhset|"+ - "fblist|"+ - "fbstats|"+ - "qentries|"+ - "qentry|"+ - "play|"+ - "ansi|"+ - "break|"+ - "c|"+ - "asc|"+ - "die|"+ - "isdbref|"+ - "isint|"+ - "isnum|"+ - "isletters|"+ - "linecoords|"+ - "localize|"+ - "lnum|"+ - "nameshort|"+ - "null|"+ - "objeval|"+ - "r|"+ - "rand|"+ - "s|"+ - "setq|"+ - "setr|"+ - "soundex|"+ - "soundslike|"+ - "valid|"+ - "vchart|"+ - "vchart2|"+ - "vlabel|"+ - "@@|"+ - "bakerdays|"+ - "bodybuild|"+ - "box|"+ - "capall|"+ - "catalog|"+ - "children|"+ - "ctrailer|"+ - "darttime|"+ - "debt|"+ - "detailbar|"+ - "exploredroom|"+ - "fansitoansi|"+ - "fansitoxansi|"+ - "fullbar|"+ - "halfbar|"+ - "isdarted|"+ - "isnewbie|"+ - "isword|"+ - "lambda|"+ - "lobjects|"+ - "lplayers|"+ - "lthings|"+ - "lvexits|"+ - "lvobjects|"+ - "lvplayers|"+ - "lvthings|"+ - "newswrap|"+ - "numsuffix|"+ - "playerson|"+ - "playersthisweek|"+ - "randomad|"+ - "randword|"+ - "realrandword|"+ - "replacechr|"+ - "second|"+ - "splitamount|"+ - "strlenall|"+ - "text|"+ - "third|"+ - "tofansi|"+ - "totalac|"+ - "unique|"+ - "getaddressroom|"+ - "listpropertycomm|"+ - "listpropertyres|"+ - "lotowner|"+ - "lotrating|"+ - "lotratingcount|"+ - "lotvalue|"+ - "boughtproduct|"+ - "companyabb|"+ - "companyicon|"+ - "companylist|"+ - "companyname|"+ - "companyowners|"+ - "companyvalue|"+ - "employees|"+ - "invested|"+ - "productlist|"+ - "productname|"+ - "productowners|"+ - "productrating|"+ - "productratingcount|"+ - "productsoldat|"+ - "producttype|"+ - "ratedproduct|"+ - "soldproduct|"+ - "topproducts|"+ - "totalspentonproduct|"+ - "totalstock|"+ - "transfermoney|"+ - "uniquebuyercount|"+ - "uniqueproductsbought|"+ - "validcompany|"+ - "deletepicture|"+ - "fbsave|"+ - "getpicturesecurity|"+ - "haspicture|"+ - "listpictures|"+ - "picturesize|"+ - "replacecolor|"+ - "rgbtocolor|"+ - "savepicture|"+ - "setpicturesecurity|"+ - "showpicture|"+ - "piechart|"+ - "piechartlabel|"+ - "createmaze|"+ - "drawmaze|"+ - "drawwireframe" - ); - var keywordMapper = this.createKeywordMapper({ - "invalid.deprecated": "debugger", - "support.function": builtinFunctions, - "constant.language": builtinConstants, - "keyword": keywords - }, "identifier"); - - var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?"; - - var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; - var octInteger = "(?:0[oO]?[0-7]+)"; - var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; - var binInteger = "(?:0[bB][01]+)"; - var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; - - var exponent = "(?:[eE][+-]?\\d+)"; - var fraction = "(?:\\.\\d+)"; - var intPart = "(?:\\d+)"; - var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; - var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; - var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; - - this.$rules = { - "start" : [ - { - token : "variable", // mush substitution register - regex : "%[0-9]{1}" - }, - { - token : "variable", // mush substitution register - regex : "%q[0-9A-Za-z]{1}" - }, - { - token : "variable", // mush special character register - regex : "%[a-zA-Z]{1}" - }, - { - token: "variable.language", - regex: "%[a-z0-9-_]+" - }, - { - token : "constant.numeric", // imaginary - regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b" - }, { - token : "constant.numeric", // float - regex : floatNumber - }, { - token : "constant.numeric", // long integer - regex : integer + "[lL]\\b" - }, { - token : "constant.numeric", // integer - regex : integer + "\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|#|%|<<|>>|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" - }, { - token : "paren.lparen", - regex : "[\\[\\(\\{]" - }, { - token : "paren.rparen", - regex : "[\\]\\)\\}]" - }, { - token : "text", - regex : "\\s+" - } ] - }; -}; - -oop.inherits(MushCodeRules, TextHighlightRules); - -exports.MushCodeRules = MushCodeRules; -}); - -define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(markers) { - this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + markers + ")(?:\\s*)(?:#.*)?$"); -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var line = session.getLine(row); - var match = line.match(this.foldingStartMarker); - if (match) { - if (match[1]) - return this.openingBracketBlock(session, match[1], row, match.index); - if (match[2]) - return this.indentationBlock(session, row, match.index + match[2].length); - return this.indentationBlock(session, row); - } - } - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/mushcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mushcode_highlight_rules","ace/mode/folding/pythonic","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var MushCodeRules = require("./mushcode_highlight_rules").MushCodeRules; -var PythonFoldMode = require("./folding/pythonic").FoldMode; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = MushCodeRules; - this.foldingRules = new PythonFoldMode("\\:"); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "#"; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[\:]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - var outdents = { - "pass": 1, - "return": 1, - "raise": 1, - "break": 1, - "continue": 1 - }; - - this.checkOutdent = function(state, line, input) { - if (input !== "\r\n" && input !== "\r" && input !== "\n") - return false; - - var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; - - if (!tokens) - return false; - do { - var last = tokens.pop(); - } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); - - if (!last) - return false; - - return (last.type == "keyword" && outdents[last.value]); - }; - - this.autoOutdent = function(state, doc, row) { - - row += 1; - var indent = this.$getIndent(doc.getLine(row)); - var tab = doc.getTabString(); - if (indent.slice(-tab.length) == tab) - doc.remove(new Range(row, indent.length-tab.length, row, indent.length)); - }; - - this.$id = "ace/mode/mushcode"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/mushcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var o=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules,i=function(){var e="@if|@ifelse|@switch|@halt|@dolist|@create|@scent|@sound|@touch|@ataste|@osound|@ahear|@aahear|@amhear|@otouch|@otaste|@drop|@odrop|@adrop|@dropfail|@odropfail|@smell|@oemit|@emit|@pemit|@parent|@clone|@taste|whisper|page|say|pose|semipose|teach|touch|taste|smell|listen|look|move|go|home|follow|unfollow|desert|dismiss|@tel",t="=#0",r="default|edefault|eval|get_eval|get|grep|grepi|hasattr|hasattrp|hasattrval|hasattrpval|lattr|nattr|poss|udefault|ufun|u|v|uldefault|xget|zfun|band|bnand|bnot|bor|bxor|shl|shr|and|cand|cor|eq|gt|gte|lt|lte|nand|neq|nor|not|or|t|xor|con|entrances|exit|followers|home|lcon|lexits|loc|locate|lparent|lsearch|next|num|owner|parent|pmatch|rloc|rnum|room|where|zone|worn|held|carried|acos|asin|atan|ceil|cos|e|exp|fdiv|fmod|floor|log|ln|pi|power|round|sin|sqrt|tan|aposs|andflags|conn|commandssent|controls|doing|elock|findable|flags|fullname|hasflag|haspower|hastype|hidden|idle|isbaker|lock|lstats|money|who|name|nearby|obj|objflags|photo|poll|powers|pendingtext|receivedtext|restarts|restarttime|subj|shortestpath|tmoney|type|visible|cat|element|elements|extract|filter|filterbool|first|foreach|fold|grab|graball|index|insert|itemize|items|iter|last|ldelete|map|match|matchall|member|mix|munge|pick|remove|replace|rest|revwords|setdiff|setinter|setunion|shuffle|sort|sortby|splice|step|wordpos|words|add|lmath|max|mean|median|min|mul|percent|sign|stddev|sub|val|bound|abs|inc|dec|dist2d|dist3d|div|floordiv|mod|modulo|remainder|vadd|vdim|vdot|vmag|vmax|vmin|vmul|vsub|vunit|regedit|regeditall|regeditalli|regediti|regmatch|regmatchi|regrab|regraball|regraballi|regrabi|regrep|regrepi|after|alphamin|alphamax|art|before|brackets|capstr|case|caseall|center|containsfansi|comp|decompose|decrypt|delete|edit|encrypt|escape|if|ifelse|lcstr|left|lit|ljust|merge|mid|ostrlen|pos|repeat|reverse|right|rjust|scramble|secure|space|spellnum|squish|strcat|strmatch|strinsert|stripansi|stripfansi|strlen|switch|switchall|table|tr|trim|ucstr|unsafe|wrap|ctitle|cwho|channels|clock|cflags|ilev|itext|inum|convsecs|convutcsecs|convtime|ctime|etimefmt|isdaylight|mtime|secs|msecs|starttime|time|timefmt|timestring|utctime|atrlock|clone|create|cook|dig|emit|lemit|link|oemit|open|pemit|remit|set|tel|wipe|zemit|fbcreate|fbdestroy|fbwrite|fbclear|fbcopy|fbcopyto|fbclip|fbdump|fbflush|fbhset|fblist|fbstats|qentries|qentry|play|ansi|break|c|asc|die|isdbref|isint|isnum|isletters|linecoords|localize|lnum|nameshort|null|objeval|r|rand|s|setq|setr|soundex|soundslike|valid|vchart|vchart2|vlabel|@@|bakerdays|bodybuild|box|capall|catalog|children|ctrailer|darttime|debt|detailbar|exploredroom|fansitoansi|fansitoxansi|fullbar|halfbar|isdarted|isnewbie|isword|lambda|lobjects|lplayers|lthings|lvexits|lvobjects|lvplayers|lvthings|newswrap|numsuffix|playerson|playersthisweek|randomad|randword|realrandword|replacechr|second|splitamount|strlenall|text|third|tofansi|totalac|unique|getaddressroom|listpropertycomm|listpropertyres|lotowner|lotrating|lotratingcount|lotvalue|boughtproduct|companyabb|companyicon|companylist|companyname|companyowners|companyvalue|employees|invested|productlist|productname|productowners|productrating|productratingcount|productsoldat|producttype|ratedproduct|soldproduct|topproducts|totalspentonproduct|totalstock|transfermoney|uniquebuyercount|uniqueproductsbought|validcompany|deletepicture|fbsave|getpicturesecurity|haspicture|listpictures|picturesize|replacecolor|rgbtocolor|savepicture|setpicturesecurity|showpicture|piechart|piechartlabel|createmaze|drawmaze|drawwireframe",o=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":r,"constant.language":t,keyword:e},"identifier"),a="(?:(?:[1-9]\\d*)|(?:0))",i="(?:0[oO]?[0-7]+)",n="(?:0[xX][\\dA-Fa-f]+)",s="(?:0[bB][01]+)",l="(?:"+a+"|"+i+"|"+n+"|"+s+")",c="(?:[eE][+-]?\\d+)",d="(?:\\.\\d+)",u="(?:\\d+)",p="(?:(?:"+u+"?"+d+")|(?:"+u+"\\.))",m="(?:(?:"+p+"|"+u+")"+c+")",h="(?:"+m+"|"+p+")";this.$rules={start:[{token:"variable",regex:"%[0-9]{1}"},{token:"variable",regex:"%q[0-9A-Za-z]{1}"},{token:"variable",regex:"%[a-zA-Z]{1}"},{token:"variable.language",regex:"%[a-z0-9-_]+"},{token:"constant.numeric",regex:"(?:"+h+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:h},{token:"constant.numeric",regex:l+"[lL]\\b"},{token:"constant.numeric",regex:l+"\\b"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|#|%|<<|>>|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}]}};o.inherits(i,a),t.MushCodeRules=i}),define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,r){"use strict";var o=e("../../lib/oop"),a=e("./fold_mode").FoldMode,i=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};o.inherits(i,a),function(){this.getFoldWidgetRange=function(e,t,r){var o=e.getLine(r),a=o.match(this.foldingStartMarker);if(a)return a[1]?this.openingBracketBlock(e,a[1],r,a.index):a[2]?this.indentationBlock(e,r,a.index+a[2].length):this.indentationBlock(e,r)}}.call(i.prototype)}),define("ace/mode/mushcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mushcode_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,t,r){"use strict";var o=e("../lib/oop"),a=e("./text").Mode,i=e("./mushcode_highlight_rules").MushCodeRules,n=e("./folding/pythonic").FoldMode,s=e("../range").Range,l=function(){this.HighlightRules=i,this.foldingRules=new n("\\:")};o.inherits(l,a),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,r){var o=this.$getIndent(t),a=this.getTokenizer().getLineTokens(t,e),i=a.tokens;if(i.length&&"comment"==i[i.length-1].type)return o;if("start"==e){var n=t.match(/^.*[\{\(\[\:]\s*$/);n&&(o+=r)}return o};var e={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(t,r,o){if("\r\n"!==o&&"\r"!==o&&"\n"!==o)return!1;var a=this.getTokenizer().getLineTokens(r.trim(),t).tokens;if(!a)return!1;do var i=a.pop();while(i&&("comment"==i.type||"text"==i.type&&i.value.match(/^\s+$/)));return!!i&&"keyword"==i.type&&e[i.value]},this.autoOutdent=function(e,t,r){r+=1;var o=this.$getIndent(t.getLine(r)),a=t.getTabString();o.slice(-a.length)==a&&t.remove(new s(r,o.length-a.length,r,o.length))},this.$id="ace/mode/mushcode"}.call(l.prototype),t.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-mysql.js b/www/js/vendor/ace/mode-mysql.js index 9af341e74..796fdc4ac 100755 --- a/www/js/vendor/ace/mode-mysql.js +++ b/www/js/vendor/ace/mode-mysql.js @@ -1,160 +1 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/mysql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var MysqlHighlightRules = function() { - - var mySqlKeywords = /*sql*/ "alter|and|as|asc|between|count|create|delete|desc|distinct|drop|from|having|in|insert|into|is|join|like|not|on|or|order|select|set|table|union|update|values|where" + "|accessible|action|add|after|algorithm|all|analyze|asensitive|at|authors|auto_increment|autocommit|avg|avg_row_length|before|binary|binlog|both|btree|cache|call|cascade|cascaded|case|catalog_name|chain|change|changed|character|check|checkpoint|checksum|class_origin|client_statistics|close|coalesce|code|collate|collation|collations|column|columns|comment|commit|committed|completion|concurrent|condition|connection|consistent|constraint|contains|continue|contributors|convert|cross|current_date|current_time|current_timestamp|current_user|cursor|data|database|databases|day_hour|day_microsecond|day_minute|day_second|deallocate|dec|declare|default|delay_key_write|delayed|delimiter|des_key_file|describe|deterministic|dev_pop|dev_samp|deviance|directory|disable|discard|distinctrow|div|dual|dumpfile|each|elseif|enable|enclosed|end|ends|engine|engines|enum|errors|escape|escaped|even|event|events|every|execute|exists|exit|explain|extended|fast|fetch|field|fields|first|flush|for|force|foreign|found_rows|full|fulltext|function|general|global|grant|grants|group|groupby_concat|handler|hash|help|high_priority|hosts|hour_microsecond|hour_minute|hour_second|if|ignore|ignore_server_ids|import|index|index_statistics|infile|inner|innodb|inout|insensitive|insert_method|install|interval|invoker|isolation|iterate|key|keys|kill|language|last|leading|leave|left|level|limit|linear|lines|list|load|local|localtime|localtimestamp|lock|logs|low_priority|master|master_heartbeat_period|master_ssl_verify_server_cert|masters|match|max|max_rows|maxvalue|message_text|middleint|migrate|min|min_rows|minute_microsecond|minute_second|mod|mode|modifies|modify|mutex|mysql_errno|natural|next|no|no_write_to_binlog|offline|offset|one|online|open|optimize|option|optionally|out|outer|outfile|pack_keys|parser|partition|partitions|password|phase|plugin|plugins|prepare|preserve|prev|primary|privileges|procedure|processlist|profile|profiles|purge|query|quick|range|read|read_write|reads|real|rebuild|recover|references|regexp|relaylog|release|remove|rename|reorganize|repair|repeatable|replace|require|resignal|restrict|resume|return|returns|revoke|right|rlike|rollback|rollup|row|row_format|rtree|savepoint|schedule|schema|schema_name|schemas|second_microsecond|security|sensitive|separator|serializable|server|session|share|show|signal|slave|slow|smallint|snapshot|soname|spatial|specific|sql|sql_big_result|sql_buffer_result|sql_cache|sql_calc_found_rows|sql_no_cache|sql_small_result|sqlexception|sqlstate|sqlwarning|ssl|start|starting|starts|status|std|stddev|stddev_pop|stddev_samp|storage|straight_join|subclass_origin|sum|suspend|table_name|table_statistics|tables|tablespace|temporary|terminated|to|trailing|transaction|trigger|triggers|truncate|uncommitted|undo|uninstall|unique|unlock|upgrade|usage|use|use_frm|user|user_resources|user_statistics|using|utc_date|utc_time|utc_timestamp|value|variables|varying|view|views|warnings|when|while|with|work|write|xa|xor|year_month|zerofill|begin|do|then|else|loop|repeat"; - var builtins = "by|bool|boolean|bit|blob|decimal|double|enum|float|long|longblob|longtext|medium|mediumblob|mediumint|mediumtext|time|timestamp|tinyblob|tinyint|tinytext|text|bigint|int|int1|int2|int3|int4|int8|integer|float|float4|float8|double|char|varbinary|varchar|varcharacter|precision|date|datetime|year|unsigned|signed|numeric" - var variable = "charset|clear|connect|edit|ego|exit|go|help|nopager|notee|nowarning|pager|print|prompt|quit|rehash|source|status|system|tee" - - var keywordMapper = this.createKeywordMapper({ - "support.function": builtins, - "keyword": mySqlKeywords, - "constant": "false|true|null|unknown|date|time|timestamp|ODBCdotTable|zerolessFloat", - "variable.language": variable - }, "identifier", true); - - - function string(rule) { - var start = rule.start; - var escapeSeq = rule.escape; - return { - token: "string.start", - regex: start, - next: [ - {token: "constant.language.escape", regex: escapeSeq}, - {token: "string.end", next: "start", regex: start}, - {defaultToken: "string"} - ] - }; - } - - this.$rules = { - "start" : [ { - token : "comment", regex : "(?:-- |#).*$" - }, - string({start: '"', escape: /\\[0'"bnrtZ\\%_]?/}), - string({start: "'", escape: /\\[0'"bnrtZ\\%_]?/}), - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+|[xX]'[0-9a-fA-F]+'|0[bB][01]+|[bB]'[01]+'/ - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "constant.class", - regex : "@@?[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "constant.buildin", - regex : "`[^`]*`" - }, { - token : "keyword.operator", - regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" - }, { - token : "paren.lparen", - regex : "[\\(]" - }, { - token : "paren.rparen", - regex : "[\\)]" - }, { - token : "text", - regex : "\\s+" - } ], - "comment" : [ - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment"} - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); - this.normalizeRules(); -}; - -oop.inherits(MysqlHighlightRules, TextHighlightRules); - -exports.MysqlHighlightRules = MysqlHighlightRules; -}); - -define("ace/mode/mysql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mysql_highlight_rules","ace/range"], function(require, exports, module) { - -var oop = require("../lib/oop"); -var TextMode = require("../mode/text").Mode; -var MysqlHighlightRules = require("./mysql_highlight_rules").MysqlHighlightRules; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = MysqlHighlightRules; -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = ["--", "#"]; // todo space - this.blockComment = {start: "/*", end: "*/"}; - - this.$id = "ace/mode/mysql"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},o.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(o,i),o.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},o.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},o.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=o}),define("ace/mode/mysql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),i=(e("../lib/lang"),e("./doc_comment_highlight_rules").DocCommentHighlightRules),o=e("./text_highlight_rules").TextHighlightRules,a=function(){function e(e){var t=e.start,n=e.escape;return{token:"string.start",regex:t,next:[{token:"constant.language.escape",regex:n},{token:"string.end",next:"start",regex:t},{defaultToken:"string"}]}}var t="alter|and|as|asc|between|count|create|delete|desc|distinct|drop|from|having|in|insert|into|is|join|like|not|on|or|order|select|set|table|union|update|values|where|accessible|action|add|after|algorithm|all|analyze|asensitive|at|authors|auto_increment|autocommit|avg|avg_row_length|before|binary|binlog|both|btree|cache|call|cascade|cascaded|case|catalog_name|chain|change|changed|character|check|checkpoint|checksum|class_origin|client_statistics|close|coalesce|code|collate|collation|collations|column|columns|comment|commit|committed|completion|concurrent|condition|connection|consistent|constraint|contains|continue|contributors|convert|cross|current_date|current_time|current_timestamp|current_user|cursor|data|database|databases|day_hour|day_microsecond|day_minute|day_second|deallocate|dec|declare|default|delay_key_write|delayed|delimiter|des_key_file|describe|deterministic|dev_pop|dev_samp|deviance|directory|disable|discard|distinctrow|div|dual|dumpfile|each|elseif|enable|enclosed|end|ends|engine|engines|enum|errors|escape|escaped|even|event|events|every|execute|exists|exit|explain|extended|fast|fetch|field|fields|first|flush|for|force|foreign|found_rows|full|fulltext|function|general|global|grant|grants|group|groupby_concat|handler|hash|help|high_priority|hosts|hour_microsecond|hour_minute|hour_second|if|ignore|ignore_server_ids|import|index|index_statistics|infile|inner|innodb|inout|insensitive|insert_method|install|interval|invoker|isolation|iterate|key|keys|kill|language|last|leading|leave|left|level|limit|linear|lines|list|load|local|localtime|localtimestamp|lock|logs|low_priority|master|master_heartbeat_period|master_ssl_verify_server_cert|masters|match|max|max_rows|maxvalue|message_text|middleint|migrate|min|min_rows|minute_microsecond|minute_second|mod|mode|modifies|modify|mutex|mysql_errno|natural|next|no|no_write_to_binlog|offline|offset|one|online|open|optimize|option|optionally|out|outer|outfile|pack_keys|parser|partition|partitions|password|phase|plugin|plugins|prepare|preserve|prev|primary|privileges|procedure|processlist|profile|profiles|purge|query|quick|range|read|read_write|reads|real|rebuild|recover|references|regexp|relaylog|release|remove|rename|reorganize|repair|repeatable|replace|require|resignal|restrict|resume|return|returns|revoke|right|rlike|rollback|rollup|row|row_format|rtree|savepoint|schedule|schema|schema_name|schemas|second_microsecond|security|sensitive|separator|serializable|server|session|share|show|signal|slave|slow|smallint|snapshot|soname|spatial|specific|sql|sql_big_result|sql_buffer_result|sql_cache|sql_calc_found_rows|sql_no_cache|sql_small_result|sqlexception|sqlstate|sqlwarning|ssl|start|starting|starts|status|std|stddev|stddev_pop|stddev_samp|storage|straight_join|subclass_origin|sum|suspend|table_name|table_statistics|tables|tablespace|temporary|terminated|to|trailing|transaction|trigger|triggers|truncate|uncommitted|undo|uninstall|unique|unlock|upgrade|usage|use|use_frm|user|user_resources|user_statistics|using|utc_date|utc_time|utc_timestamp|value|variables|varying|view|views|warnings|when|while|with|work|write|xa|xor|year_month|zerofill|begin|do|then|else|loop|repeat",n="by|bool|boolean|bit|blob|decimal|double|enum|float|long|longblob|longtext|medium|mediumblob|mediumint|mediumtext|time|timestamp|tinyblob|tinyint|tinytext|text|bigint|int|int1|int2|int3|int4|int8|integer|float|float4|float8|double|char|varbinary|varchar|varcharacter|precision|date|datetime|year|unsigned|signed|numeric",r="charset|clear|connect|edit|ego|exit|go|help|nopager|notee|nowarning|pager|print|prompt|quit|rehash|source|status|system|tee",o=this.createKeywordMapper({"support.function":n,keyword:t,constant:"false|true|null|unknown|date|time|timestamp|ODBCdotTable|zerolessFloat","variable.language":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:"(?:-- |#).*$"},e({start:'"',escape:/\\[0'"bnrtZ\\%_]?/}),e({start:"'",escape:/\\[0'"bnrtZ\\%_]?/}),i.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+|[xX]'[0-9a-fA-F]+'|0[bB][01]+|[bB]'[01]+'/},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"constant.class",regex:"@@?[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"constant.buildin",regex:"`[^`]*`"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};r.inherits(a,o),t.MysqlHighlightRules=a}),define("ace/mode/mysql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mysql_highlight_rules","ace/range"],function(e,t,n){var r=e("../lib/oop"),i=e("../mode/text").Mode,o=e("./mysql_highlight_rules").MysqlHighlightRules,a=(e("../range").Range,function(){this.HighlightRules=o});r.inherits(a,i),function(){this.lineCommentStart=["--","#"],this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/mysql"}.call(a.prototype),t.Mode=a}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-nix.js b/www/js/vendor/ace/mode-nix.js index 00a4b8983..8f2e444b5 100755 --- a/www/js/vendor/ace/mode-nix.js +++ b/www/js/vendor/ace/mode-nix.js @@ -1,993 +1 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b" - -var c_cppHighlightRules = function() { - - var keywordControls = ( - "break|case|continue|default|do|else|for|goto|if|_Pragma|" + - "return|switch|while|catch|operator|try|throw|using" - ); - - var storageType = ( - "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + - "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" + - "class|wchar_t|template" - ); - - var storageModifiers = ( - "const|extern|register|restrict|static|volatile|inline|private|" + - "protected|public|friend|explicit|virtual|export|mutable|typename|" + - "constexpr|new|delete" - ); - - var keywordOperators = ( - "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + - "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" - ); - - var builtinConstants = ( - "NULL|true|false|TRUE|FALSE" - ); - - var keywordMapper = this.$keywords = this.createKeywordMapper({ - "keyword.control" : keywordControls, - "storage.type" : storageType, - "storage.modifier" : storageModifiers, - "keyword.operator" : keywordOperators, - "variable.language": "this", - "constant.language": builtinConstants - }, "identifier"); - - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b"; - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "//", - next : "singleLineComment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // multi line string start - regex : '["].*\\\\$', - next : "qqstring" - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "string", // multi line string start - regex : "['].*\\\\$", - next : "qstring" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" - }, { - token : "keyword", // pre-compiler directives - regex : "#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b", - next : "directive" - }, { - token : "keyword", // special case pre-compiler directive - regex : "(?:#\\s*endif)\\b" - }, { - token : "support.function.C99.c", - regex : cFunctions - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)" - }, { - token : "punctuation.operator", - regex : "\\?|\\:|\\,|\\;|\\." - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - "singleLineComment" : [ - { - token : "comment", - regex : /\\$/, - next : "singleLineComment" - }, { - token : "comment", - regex : /$/, - next : "start" - }, { - defaultToken: "comment" - } - ], - "qqstring" : [ - { - token : "string", - regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', - next : "start" - }, { - defaultToken : "string" - } - ], - "qstring" : [ - { - token : "string", - regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", - next : "start" - }, { - defaultToken : "string" - } - ], - "directive" : [ - { - token : "constant.other.multiline", - regex : /\\/ - }, - { - token : "constant.other.multiline", - regex : /.*\\/ - }, - { - token : "constant.other", - regex : "\\s*<.+?>", - next : "start" - }, - { - token : "constant.other", // single line - regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', - next : "start" - }, - { - token : "constant.other", // single line - regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", - next : "start" - }, - { - token : "constant.other", - regex : /[^\\\/]+/, - next : "start" - } - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); -}; - -oop.inherits(c_cppHighlightRules, TextHighlightRules); - -exports.c_cppHighlightRules = c_cppHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = c_cppHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/c_cpp"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/nix_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { - "use strict"; - - var oop = require("../lib/oop"); - var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - - var NixHighlightRules = function() { - - var constantLanguage = "true|false"; - var keywordControl = "with|import|if|else|then|inherit"; - var keywordDeclaration = "let|in|rec"; - - var keywordMapper = this.createKeywordMapper({ - "constant.language.nix": constantLanguage, - "keyword.control.nix": keywordControl, - "keyword.declaration.nix": keywordDeclaration - }, "identifier"); - - this.$rules = { - "start": [{ - token: "comment", - regex: /#.*$/ - }, { - token: "comment", - regex: /\/\*/, - next: "comment" - }, { - token: "constant", - regex: "<[^>]+>" - }, { - regex: "(==|!=|<=?|>=?)", - token: ["keyword.operator.comparison.nix"] - }, { - regex: "((?:[+*/%-]|\\~)=)", - token: ["keyword.operator.assignment.arithmetic.nix"] - }, { - regex: "=", - token: "keyword.operator.assignment.nix" - }, { - token: "string", - regex: "''", - next: "qqdoc" - }, { - token: "string", - regex: "'", - next: "qstring" - }, { - token: "string", - regex: '"', - push: "qqstring" - }, { - token: "constant.numeric", // hex - regex: "0[xX][0-9a-fA-F]+\\b" - }, { - token: "constant.numeric", // float - regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token: keywordMapper, - regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - regex: "}", - token: function(val, start, stack) { - return stack[1] && stack[1].charAt(0) == "q" ? "constant.language.escape" : "text"; - }, - next: "pop" - }], - "comment": [{ - token: "comment", // closing comment - regex: ".*?\\*\\/", - next: "start" - }, { - token: "comment", // comment spanning whole line - regex: ".+" - }], - "qqdoc": [ - { - token: "constant.language.escape", - regex: /\$\{/, - push: "start" - }, { - token: "string", - regex: "''", - next: "pop" - }, { - defaultToken: "string" - }], - "qqstring": [ - { - token: "constant.language.escape", - regex: /\$\{/, - push: "start" - }, { - token: "string", - regex: '"', - next: "pop" - }, { - defaultToken: "string" - }], - "qstring": [ - { - token: "constant.language.escape", - regex: /\$\{/, - push: "start" - }, { - token: "string", - regex: "'", - next: "pop" - }, { - defaultToken: "string" - }] - }; - - this.normalizeRules(); - }; - - oop.inherits(NixHighlightRules, TextHighlightRules); - - exports.NixHighlightRules = NixHighlightRules; -}); - -define("ace/mode/nix",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/nix_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var CMode = require("./c_cpp").Mode; -var NixHighlightRules = require("./nix_highlight_rules").NixHighlightRules; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - CMode.call(this); - this.HighlightRules = NixHighlightRules; - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, CMode); - -(function() { - this.lineCommentStart = "#"; - this.blockComment = {start: "/*", end: "*/"}; - this.$id = "ace/mode/nix"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(i,o),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,s=t.cFunctions="\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b",a=function(){var e="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",t="asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|class|wchar_t|template",n="const|extern|register|restrict|static|volatile|inline|private|protected|public|friend|explicit|virtual|export|mutable|typename|constexpr|new|delete",r="and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eqconst_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace",i="NULL|true|false|TRUE|FALSE",a=this.$keywords=this.createKeywordMapper({"keyword.control":e,"storage.type":t,"storage.modifier":n,"keyword.operator":r,"variable.language":"this","constant.language":i},"identifier");this.$rules={start:[{token:"comment",regex:"//",next:"singleLineComment"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b",next:"directive"},{token:"keyword",regex:"(?:#\\s*endif)\\b"},{token:"support.function.C99.c",regex:s},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],singleLineComment:[{token:"comment",regex:/\\$/,next:"singleLineComment"},{token:"comment",regex:/$/,next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{defaultToken:"string"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{defaultToken:"string"}],directive:[{token:"constant.other.multiline",regex:/\\/},{token:"constant.other.multiline",regex:/.*\\/},{token:"constant.other",regex:"\\s*<.+?>",next:"start"},{token:"constant.other",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(o,"doc-",[o.getEndRule("start")])};r.inherits(a,i),t.c_cppHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,s=e.findMatchingBracket({row:t,column:i});if(!s||s.row==t)return 0;var a=this.$getIndent(e.getLine(s.row));e.replace(new r(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],u={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?r=u[t]:void(r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,i){var s=n.getCursorPosition(),l=o.doc.getLine(s.row);if("{"==i){g(n);var c=n.getSelectionRange(),u=o.doc.getTextRange(c);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(l[s.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var f=l.substring(s.column,s.column+1);if("}"==f){var m=o.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(null!==m&&d.isAutoInsertedClosing(s,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var h="";d.isMaybeInsertedClosing(s,l)&&(h=a.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var f=l.substring(s.column,s.column+1);if("}"===f){var p=o.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!p)return null;var x=this.$getIndent(o.getLine(p.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var k=x+o.getTabString();return{text:"\n"+k+"\n"+x+h,selection:[1,k.length,1,k.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var s=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==s){g(n);var a=o.doc.getLine(i.start.row),l=a.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"("+s+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var a=n.getCursorPosition(),l=r.doc.getLine(a.row),c=l.substring(a.column,a.column+1);if(")"==c){var u=r.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==u&&d.isAutoInsertedClosing(a,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(")"==a)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"["+s+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var a=n.getCursorPosition(),l=r.doc.getLine(a.row),c=l.substring(a.column,a.column+1);if("]"==c){var u=r.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==u&&d.isAutoInsertedClosing(a,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if("]"==a)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var i=o,s=n.getSelectionRange(),a=r.doc.getTextRange(s);if(""!==a&&"'"!==a&&'"'!=a&&n.getWrapBehavioursEnabled())return{text:i+a+i,selection:!1};var l=n.getCursorPosition(),c=r.doc.getLine(l.row),u=c.substring(l.column-1,l.column),d=c.substring(l.column,l.column+1),f=r.getTokenAt(l.row,l.column),m=r.getTokenAt(l.row,l.column+1);if("\\"==u&&f&&/escape/.test(f.type))return null;var h,p=f&&/string/.test(f.type),x=!m||/string/.test(m.type);if(d==i)h=p!==x;else{if(p&&!x)return null;if(p&&x)return null;var k=r.$mode.tokenRe;k.lastIndex=0;var b=k.test(u);k.lastIndex=0;var v=k.test(u);if(b||v)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(a==i)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){var o=new s(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var i=o.match(this.foldingStartMarker);if(i){var s=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,s);var a=e.getCommentFoldRange(n,s+i[0].length,1);return a&&!a.isMultiLine()&&(r?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),i=t,s=n.length;t+=1;for(var a=t,l=e.getLength();++tc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=i)break;if(u.isMultiLine())t=u.end.row;else if(r==c)break}a=t}}return new o(i,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++ns)return new o(s,r,u,t.length)}}.call(s.prototype)}),define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./c_cpp_highlight_rules").c_cppHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=(e("../range").Range,e("./behaviour/cstyle").CstyleBehaviour),l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new s,this.$behaviour=new a,this.foldingRules=new l};r.inherits(c,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens,s=o.state;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e){var a=t.match(/^.*[\{\(\[]\s*$/);a&&(r+=n)}else if("doc-start"==e){if("start"==s)return"";var a=t.match(/^\s*(\/?)\*/);a&&(a[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp"}.call(c.prototype),t.Mode=c}),define("ace/mode/nix_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){var e="true|false",t="with|import|if|else|then|inherit",n="let|in|rec",r=this.createKeywordMapper({"constant.language.nix":e,"keyword.control.nix":t,"keyword.declaration.nix":n},"identifier");this.$rules={start:[{token:"comment",regex:/#.*$/},{token:"comment",regex:/\/\*/,next:"comment"},{token:"constant",regex:"<[^>]+>"},{regex:"(==|!=|<=?|>=?)",token:["keyword.operator.comparison.nix"]},{regex:"((?:[+*/%-]|\\~)=)",token:["keyword.operator.assignment.arithmetic.nix"]},{regex:"=",token:"keyword.operator.assignment.nix"},{token:"string",regex:"''",next:"qqdoc"},{token:"string",regex:"'",next:"qstring"},{token:"string",regex:'"',push:"qqstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{regex:"}",token:function(e,t,n){return n[1]&&"q"==n[1].charAt(0)?"constant.language.escape":"text"},next:"pop"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],qqdoc:[{token:"constant.language.escape",regex:/\$\{/,push:"start"},{token:"string",regex:"''",next:"pop"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:/\$\{/,push:"start"},{token:"string",regex:'"',next:"pop"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:/\$\{/,push:"start"},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},this.normalizeRules()};r.inherits(i,o),t.NixHighlightRules=i}),define("ace/mode/nix",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/nix_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./c_cpp").Mode,i=e("./nix_highlight_rules").NixHighlightRules,s=e("./folding/cstyle").FoldMode,a=function(){o.call(this),this.HighlightRules=i,this.foldingRules=new s};r.inherits(a,o),function(){this.lineCommentStart="#",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/nix"}.call(a.prototype),t.Mode=a}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-objectivec.js b/www/js/vendor/ace/mode-objectivec.js index 9e8578001..47453cb2f 100755 --- a/www/js/vendor/ace/mode-objectivec.js +++ b/www/js/vendor/ace/mode-objectivec.js @@ -1,731 +1,2 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b" - -var c_cppHighlightRules = function() { - - var keywordControls = ( - "break|case|continue|default|do|else|for|goto|if|_Pragma|" + - "return|switch|while|catch|operator|try|throw|using" - ); - - var storageType = ( - "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + - "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" + - "class|wchar_t|template" - ); - - var storageModifiers = ( - "const|extern|register|restrict|static|volatile|inline|private|" + - "protected|public|friend|explicit|virtual|export|mutable|typename|" + - "constexpr|new|delete" - ); - - var keywordOperators = ( - "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + - "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" - ); - - var builtinConstants = ( - "NULL|true|false|TRUE|FALSE" - ); - - var keywordMapper = this.$keywords = this.createKeywordMapper({ - "keyword.control" : keywordControls, - "storage.type" : storageType, - "storage.modifier" : storageModifiers, - "keyword.operator" : keywordOperators, - "variable.language": "this", - "constant.language": builtinConstants - }, "identifier"); - - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b"; - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "//", - next : "singleLineComment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // multi line string start - regex : '["].*\\\\$', - next : "qqstring" - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "string", // multi line string start - regex : "['].*\\\\$", - next : "qstring" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" - }, { - token : "keyword", // pre-compiler directives - regex : "#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b", - next : "directive" - }, { - token : "keyword", // special case pre-compiler directive - regex : "(?:#\\s*endif)\\b" - }, { - token : "support.function.C99.c", - regex : cFunctions - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)" - }, { - token : "punctuation.operator", - regex : "\\?|\\:|\\,|\\;|\\." - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - "singleLineComment" : [ - { - token : "comment", - regex : /\\$/, - next : "singleLineComment" - }, { - token : "comment", - regex : /$/, - next : "start" - }, { - defaultToken: "comment" - } - ], - "qqstring" : [ - { - token : "string", - regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', - next : "start" - }, { - defaultToken : "string" - } - ], - "qstring" : [ - { - token : "string", - regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", - next : "start" - }, { - defaultToken : "string" - } - ], - "directive" : [ - { - token : "constant.other.multiline", - regex : /\\/ - }, - { - token : "constant.other.multiline", - regex : /.*\\/ - }, - { - token : "constant.other", - regex : "\\s*<.+?>", - next : "start" - }, - { - token : "constant.other", // single line - regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', - next : "start" - }, - { - token : "constant.other", // single line - regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", - next : "start" - }, - { - token : "constant.other", - regex : /[^\\\/]+/, - next : "start" - } - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); -}; - -oop.inherits(c_cppHighlightRules, TextHighlightRules); - -exports.c_cppHighlightRules = c_cppHighlightRules; -}); - -define("ace/mode/objectivec_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/c_cpp_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var C_Highlight_File = require("./c_cpp_highlight_rules"); -var CHighlightRules = C_Highlight_File.c_cppHighlightRules; - -var ObjectiveCHighlightRules = function() { - - var escapedConstRe = "\\\\(?:[abefnrtv'\"?\\\\]|" + - "[0-3]\\d{1,2}|" + - "[4-7]\\d?|" + - "222|" + - "x[a-zA-Z0-9]+)"; - - var specialVariables = [{ - regex: "\\b_cmd\\b", - token: "variable.other.selector.objc" - }, { - regex: "\\b(?:self|super)\\b", - token: "variable.language.objc" - } - ]; - - var cObj = new CHighlightRules(); - var cRules = cObj.getRules(); - - this.$rules = { - "start": [ - { - token : "comment", - regex : "\\/\\/.*$" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment" - }, - { - token: [ "storage.type.objc", "punctuation.definition.storage.type.objc", - "entity.name.type.objc", "text", "entity.other.inherited-class.objc" - ], - regex: "(@)(interface|protocol)(?!.+;)(\\s+[A-Za-z_][A-Za-z0-9_]*)(\\s*:\\s*)([A-Za-z]+)" - }, - { - token: [ "storage.type.objc" ], - regex: "(@end)" - }, - { - token: [ "storage.type.objc", "entity.name.type.objc", - "entity.other.inherited-class.objc" - ], - regex: "(@implementation)(\\s+[A-Za-z_][A-Za-z0-9_]*)(\\s*?::\\s*(?:[A-Za-z][A-Za-z0-9]*))?" - }, - { - token: "string.begin.objc", - regex: '@"', - next: "constant_NSString" - }, - { - token: "storage.type.objc", - regex: "\\bid\\s*<", - next: "protocol_list" - }, - { - token: "keyword.control.macro.objc", - regex: "\\bNS_DURING|NS_HANDLER|NS_ENDHANDLER\\b" - }, - { - token: ["punctuation.definition.keyword.objc", "keyword.control.exception.objc"], - regex: "(@)(try|catch|finally|throw)\\b" - }, - { - token: ["punctuation.definition.keyword.objc", "keyword.other.objc"], - regex: "(@)(defs|encode)\\b" - }, - { - token: ["storage.type.id.objc", "text"], - regex: "(\\bid\\b)(\\s|\\n)?" - }, - { - token: "storage.type.objc", - regex: "\\bIBOutlet|IBAction|BOOL|SEL|id|unichar|IMP|Class\\b" - }, - { - token: [ "punctuation.definition.storage.type.objc", "storage.type.objc"], - regex: "(@)(class|protocol)\\b" - }, - { - token: [ "punctuation.definition.storage.type.objc", "punctuation"], - regex: "(@selector)(\\s*\\()", - next: "selectors" - }, - { - token: [ "punctuation.definition.storage.modifier.objc", "storage.modifier.objc"], - regex: "(@)(synchronized|public|private|protected|package)\\b" - }, - { - token: "constant.language.objc", - regex: "\\bYES|NO|Nil|nil\\b" - }, - { - token: "support.variable.foundation", - regex: "\\bNSApp\\b" - }, - { - token: [ "support.function.cocoa.leopard"], - regex: "(?:\\b)(NS(?:Rect(?:ToCGRect|FromCGRect)|MakeCollectable|S(?:tringFromProtocol|ize(?:ToCGSize|FromCGSize))|Draw(?:NinePartImage|ThreePartImage)|P(?:oint(?:ToCGPoint|FromCGPoint)|rotocolFromString)|EventMaskFromType|Value))(?:\\b)" - }, - { - token: ["support.function.cocoa"], - regex: "(?:\\b)(NS(?:R(?:ound(?:DownToMultipleOfPageSize|UpToMultipleOfPageSize)|un(?:CriticalAlertPanel(?:RelativeToWindow)?|InformationalAlertPanel(?:RelativeToWindow)?|AlertPanel(?:RelativeToWindow)?)|e(?:set(?:MapTable|HashTable)|c(?:ycleZone|t(?:Clip(?:List)?|F(?:ill(?:UsingOperation|List(?:UsingOperation|With(?:Grays|Colors(?:UsingOperation)?))?)?|romString))|ordAllocationEvent)|turnAddress|leaseAlertPanel|a(?:dPixel|l(?:MemoryAvailable|locateCollectable))|gisterServicesProvider)|angeFromString)|Get(?:SizeAndAlignment|CriticalAlertPanel|InformationalAlertPanel|UncaughtExceptionHandler|FileType(?:s)?|WindowServerMemory|AlertPanel)|M(?:i(?:n(?:X|Y)|d(?:X|Y))|ouseInRect|a(?:p(?:Remove|Get|Member|Insert(?:IfAbsent|KnownAbsent)?)|ke(?:R(?:ect|ange)|Size|Point)|x(?:Range|X|Y)))|B(?:itsPer(?:SampleFromDepth|PixelFromDepth)|e(?:stDepth|ep|gin(?:CriticalAlertSheet|InformationalAlertSheet|AlertSheet)))|S(?:ho(?:uldRetainWithZone|w(?:sServicesMenuItem|AnimationEffect))|tringFrom(?:R(?:ect|ange)|MapTable|S(?:ize|elector)|HashTable|Class|Point)|izeFromString|e(?:t(?:ShowsServicesMenuItem|ZoneName|UncaughtExceptionHandler|FocusRingStyle)|lectorFromString|archPathForDirectoriesInDomains)|wap(?:Big(?:ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(?:ToHost|LongToHost))|Short|Host(?:ShortTo(?:Big|Little)|IntTo(?:Big|Little)|DoubleTo(?:Big|Little)|FloatTo(?:Big|Little)|Long(?:To(?:Big|Little)|LongTo(?:Big|Little)))|Int|Double|Float|L(?:ittle(?:ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(?:ToHost|LongToHost))|ong(?:Long)?)))|H(?:ighlightRect|o(?:stByteOrder|meDirectory(?:ForUser)?)|eight|ash(?:Remove|Get|Insert(?:IfAbsent|KnownAbsent)?)|FSType(?:CodeFromFileType|OfFile))|N(?:umberOfColorComponents|ext(?:MapEnumeratorPair|HashEnumeratorItem))|C(?:o(?:n(?:tainsRect|vert(?:GlyphsToPackedGlyphs|Swapped(?:DoubleToHost|FloatToHost)|Host(?:DoubleToSwapped|FloatToSwapped)))|unt(?:MapTable|HashTable|Frames|Windows(?:ForContext)?)|py(?:M(?:emoryPages|apTableWithZone)|Bits|HashTableWithZone|Object)|lorSpaceFromDepth|mpare(?:MapTables|HashTables))|lassFromString|reate(?:MapTable(?:WithZone)?|HashTable(?:WithZone)?|Zone|File(?:namePboardType|ContentsPboardType)))|TemporaryDirectory|I(?:s(?:ControllerMarker|EmptyRect|FreedObject)|n(?:setRect|crementExtraRefCount|te(?:r(?:sect(?:sRect|ionR(?:ect|ange))|faceStyleForKey)|gralRect)))|Zone(?:Realloc|Malloc|Name|Calloc|Fr(?:omPointer|ee))|O(?:penStepRootDirectory|ffsetRect)|D(?:i(?:sableScreenUpdates|videRect)|ottedFrameRect|e(?:c(?:imal(?:Round|Multiply|S(?:tring|ubtract)|Normalize|Co(?:py|mpa(?:ct|re))|IsNotANumber|Divide|Power|Add)|rementExtraRefCountWasZero)|faultMallocZone|allocate(?:MemoryPages|Object))|raw(?:Gr(?:oove|ayBezel)|B(?:itmap|utton)|ColorTiledRects|TiledRects|DarkBezel|W(?:hiteBezel|indowBackground)|LightBezel))|U(?:serName|n(?:ionR(?:ect|ange)|registerServicesProvider)|pdateDynamicServices)|Java(?:Bundle(?:Setup|Cleanup)|Setup(?:VirtualMachine)?|Needs(?:ToLoadClasses|VirtualMachine)|ClassesF(?:orBundle|romPath)|ObjectNamedInPath|ProvidesClasses)|P(?:oint(?:InRect|FromString)|erformService|lanarFromDepth|ageSize)|E(?:n(?:d(?:MapTableEnumeration|HashTableEnumeration)|umerate(?:MapTable|HashTable)|ableScreenUpdates)|qual(?:R(?:ects|anges)|Sizes|Points)|raseRect|xtraRefCount)|F(?:ileTypeForHFSTypeCode|ullUserName|r(?:ee(?:MapTable|HashTable)|ame(?:Rect(?:WithWidth(?:UsingOperation)?)?|Address)))|Wi(?:ndowList(?:ForContext)?|dth)|Lo(?:cationInRange|g(?:v|PageSize)?)|A(?:ccessibility(?:R(?:oleDescription(?:ForUIElement)?|aiseBadArgumentException)|Unignored(?:Children(?:ForOnlyChild)?|Descendant|Ancestor)|PostNotification|ActionDescription)|pplication(?:Main|Load)|vailableWindowDepths|ll(?:MapTable(?:Values|Keys)|HashTableObjects|ocate(?:MemoryPages|Collectable|Object)))))(?:\\b)" - }, - { - token: ["support.class.cocoa.leopard"], - regex: "(?:\\b)(NS(?:RuleEditor|G(?:arbageCollector|radient)|MapTable|HashTable|Co(?:ndition|llectionView(?:Item)?)|T(?:oolbarItemGroup|extInputClient|r(?:eeNode|ackingArea))|InvocationOperation|Operation(?:Queue)?|D(?:ictionaryController|ockTile)|P(?:ointer(?:Functions|Array)|athC(?:o(?:ntrol(?:Delegate)?|mponentCell)|ell(?:Delegate)?)|r(?:intPanelAccessorizing|edicateEditor(?:RowTemplate)?))|ViewController|FastEnumeration|Animat(?:ionContext|ablePropertyContainer)))(?:\\b)" - }, - { - token: ["support.class.cocoa"], - regex: "(?:\\b)(NS(?:R(?:u(?:nLoop|ler(?:Marker|View))|e(?:sponder|cursiveLock|lativeSpecifier)|an(?:domSpecifier|geSpecifier))|G(?:etCommand|lyph(?:Generator|Storage|Info)|raphicsContext)|XML(?:Node|D(?:ocument|TD(?:Node)?)|Parser|Element)|M(?:iddleSpecifier|ov(?:ie(?:View)?|eCommand)|utable(?:S(?:tring|et)|C(?:haracterSet|opying)|IndexSet|D(?:ictionary|ata)|URLRequest|ParagraphStyle|A(?:ttributedString|rray))|e(?:ssagePort(?:NameServer)?|nu(?:Item(?:Cell)?|View)?|t(?:hodSignature|adata(?:Item|Query(?:ResultGroup|AttributeValueTuple)?)))|a(?:ch(?:BootstrapServer|Port)|trix))|B(?:itmapImageRep|ox|u(?:ndle|tton(?:Cell)?)|ezierPath|rowser(?:Cell)?)|S(?:hadow|c(?:anner|r(?:ipt(?:SuiteRegistry|C(?:o(?:ercionHandler|mmand(?:Description)?)|lassDescription)|ObjectSpecifier|ExecutionContext|WhoseTest)|oll(?:er|View)|een))|t(?:epper(?:Cell)?|atus(?:Bar|Item)|r(?:ing|eam))|imple(?:HorizontalTypesetter|CString)|o(?:cketPort(?:NameServer)?|und|rtDescriptor)|p(?:e(?:cifierTest|ech(?:Recognizer|Synthesizer)|ll(?:Server|Checker))|litView)|e(?:cureTextField(?:Cell)?|t(?:Command)?|archField(?:Cell)?|rializer|gmentedC(?:ontrol|ell))|lider(?:Cell)?|avePanel)|H(?:ost|TTP(?:Cookie(?:Storage)?|URLResponse)|elpManager)|N(?:ib(?:Con(?:nector|trolConnector)|OutletConnector)?|otification(?:Center|Queue)?|u(?:ll|mber(?:Formatter)?)|etService(?:Browser)?|ameSpecifier)|C(?:ha(?:ngeSpelling|racterSet)|o(?:n(?:stantString|nection|trol(?:ler)?|ditionLock)|d(?:ing|er)|unt(?:Command|edSet)|pying|lor(?:Space|P(?:ick(?:ing(?:Custom|Default)|er)|anel)|Well|List)?|m(?:p(?:oundPredicate|arisonPredicate)|boBox(?:Cell)?))|u(?:stomImageRep|rsor)|IImageRep|ell|l(?:ipView|o(?:seCommand|neCommand)|assDescription)|a(?:ched(?:ImageRep|URLResponse)|lendar(?:Date)?)|reateCommand)|T(?:hread|ypesetter|ime(?:Zone|r)|o(?:olbar(?:Item(?:Validations)?)?|kenField(?:Cell)?)|ext(?:Block|Storage|Container|Tab(?:le(?:Block)?)?|Input|View|Field(?:Cell)?|List|Attachment(?:Cell)?)?|a(?:sk|b(?:le(?:Header(?:Cell|View)|Column|View)|View(?:Item)?))|reeController)|I(?:n(?:dex(?:S(?:pecifier|et)|Path)|put(?:Manager|S(?:tream|erv(?:iceProvider|er(?:MouseTracker)?)))|vocation)|gnoreMisspelledWords|mage(?:Rep|Cell|View)?)|O(?:ut(?:putStream|lineView)|pen(?:GL(?:Context|Pixel(?:Buffer|Format)|View)|Panel)|bj(?:CTypeSerializationCallBack|ect(?:Controller)?))|D(?:i(?:st(?:antObject(?:Request)?|ributed(?:NotificationCenter|Lock))|ctionary|rectoryEnumerator)|ocument(?:Controller)?|e(?:serializer|cimalNumber(?:Behaviors|Handler)?|leteCommand)|at(?:e(?:Components|Picker(?:Cell)?|Formatter)?|a)|ra(?:wer|ggingInfo))|U(?:ser(?:InterfaceValidations|Defaults(?:Controller)?)|RL(?:Re(?:sponse|quest)|Handle(?:Client)?|C(?:onnection|ache|redential(?:Storage)?)|Download(?:Delegate)?|Prot(?:ocol(?:Client)?|ectionSpace)|AuthenticationChallenge(?:Sender)?)?|n(?:iqueIDSpecifier|doManager|archiver))|P(?:ipe|o(?:sitionalSpecifier|pUpButton(?:Cell)?|rt(?:Message|NameServer|Coder)?)|ICTImageRep|ersistentDocument|DFImageRep|a(?:steboard|nel|ragraphStyle|geLayout)|r(?:int(?:Info|er|Operation|Panel)|o(?:cessInfo|tocolChecker|perty(?:Specifier|ListSerialization)|gressIndicator|xy)|edicate))|E(?:numerator|vent|PSImageRep|rror|x(?:ception|istsCommand|pression))|V(?:iew(?:Animation)?|al(?:idated(?:ToobarItem|UserInterfaceItem)|ue(?:Transformer)?))|Keyed(?:Unarchiver|Archiver)|Qui(?:ckDrawView|tCommand)|F(?:ile(?:Manager|Handle|Wrapper)|o(?:nt(?:Manager|Descriptor|Panel)?|rm(?:Cell|atter)))|W(?:hoseSpecifier|indow(?:Controller)?|orkspace)|L(?:o(?:c(?:k(?:ing)?|ale)|gicalTest)|evelIndicator(?:Cell)?|ayoutManager)|A(?:ssertionHandler|nimation|ctionCell|ttributedString|utoreleasePool|TSTypesetter|ppl(?:ication|e(?:Script|Event(?:Manager|Descriptor)))|ffineTransform|lert|r(?:chiver|ray(?:Controller)?))))(?:\\b)" - }, - { - token: ["support.type.cocoa.leopard"], - regex: "(?:\\b)(NS(?:R(?:u(?:nLoop|ler(?:Marker|View))|e(?:sponder|cursiveLock|lativeSpecifier)|an(?:domSpecifier|geSpecifier))|G(?:etCommand|lyph(?:Generator|Storage|Info)|raphicsContext)|XML(?:Node|D(?:ocument|TD(?:Node)?)|Parser|Element)|M(?:iddleSpecifier|ov(?:ie(?:View)?|eCommand)|utable(?:S(?:tring|et)|C(?:haracterSet|opying)|IndexSet|D(?:ictionary|ata)|URLRequest|ParagraphStyle|A(?:ttributedString|rray))|e(?:ssagePort(?:NameServer)?|nu(?:Item(?:Cell)?|View)?|t(?:hodSignature|adata(?:Item|Query(?:ResultGroup|AttributeValueTuple)?)))|a(?:ch(?:BootstrapServer|Port)|trix))|B(?:itmapImageRep|ox|u(?:ndle|tton(?:Cell)?)|ezierPath|rowser(?:Cell)?)|S(?:hadow|c(?:anner|r(?:ipt(?:SuiteRegistry|C(?:o(?:ercionHandler|mmand(?:Description)?)|lassDescription)|ObjectSpecifier|ExecutionContext|WhoseTest)|oll(?:er|View)|een))|t(?:epper(?:Cell)?|atus(?:Bar|Item)|r(?:ing|eam))|imple(?:HorizontalTypesetter|CString)|o(?:cketPort(?:NameServer)?|und|rtDescriptor)|p(?:e(?:cifierTest|ech(?:Recognizer|Synthesizer)|ll(?:Server|Checker))|litView)|e(?:cureTextField(?:Cell)?|t(?:Command)?|archField(?:Cell)?|rializer|gmentedC(?:ontrol|ell))|lider(?:Cell)?|avePanel)|H(?:ost|TTP(?:Cookie(?:Storage)?|URLResponse)|elpManager)|N(?:ib(?:Con(?:nector|trolConnector)|OutletConnector)?|otification(?:Center|Queue)?|u(?:ll|mber(?:Formatter)?)|etService(?:Browser)?|ameSpecifier)|C(?:ha(?:ngeSpelling|racterSet)|o(?:n(?:stantString|nection|trol(?:ler)?|ditionLock)|d(?:ing|er)|unt(?:Command|edSet)|pying|lor(?:Space|P(?:ick(?:ing(?:Custom|Default)|er)|anel)|Well|List)?|m(?:p(?:oundPredicate|arisonPredicate)|boBox(?:Cell)?))|u(?:stomImageRep|rsor)|IImageRep|ell|l(?:ipView|o(?:seCommand|neCommand)|assDescription)|a(?:ched(?:ImageRep|URLResponse)|lendar(?:Date)?)|reateCommand)|T(?:hread|ypesetter|ime(?:Zone|r)|o(?:olbar(?:Item(?:Validations)?)?|kenField(?:Cell)?)|ext(?:Block|Storage|Container|Tab(?:le(?:Block)?)?|Input|View|Field(?:Cell)?|List|Attachment(?:Cell)?)?|a(?:sk|b(?:le(?:Header(?:Cell|View)|Column|View)|View(?:Item)?))|reeController)|I(?:n(?:dex(?:S(?:pecifier|et)|Path)|put(?:Manager|S(?:tream|erv(?:iceProvider|er(?:MouseTracker)?)))|vocation)|gnoreMisspelledWords|mage(?:Rep|Cell|View)?)|O(?:ut(?:putStream|lineView)|pen(?:GL(?:Context|Pixel(?:Buffer|Format)|View)|Panel)|bj(?:CTypeSerializationCallBack|ect(?:Controller)?))|D(?:i(?:st(?:antObject(?:Request)?|ributed(?:NotificationCenter|Lock))|ctionary|rectoryEnumerator)|ocument(?:Controller)?|e(?:serializer|cimalNumber(?:Behaviors|Handler)?|leteCommand)|at(?:e(?:Components|Picker(?:Cell)?|Formatter)?|a)|ra(?:wer|ggingInfo))|U(?:ser(?:InterfaceValidations|Defaults(?:Controller)?)|RL(?:Re(?:sponse|quest)|Handle(?:Client)?|C(?:onnection|ache|redential(?:Storage)?)|Download(?:Delegate)?|Prot(?:ocol(?:Client)?|ectionSpace)|AuthenticationChallenge(?:Sender)?)?|n(?:iqueIDSpecifier|doManager|archiver))|P(?:ipe|o(?:sitionalSpecifier|pUpButton(?:Cell)?|rt(?:Message|NameServer|Coder)?)|ICTImageRep|ersistentDocument|DFImageRep|a(?:steboard|nel|ragraphStyle|geLayout)|r(?:int(?:Info|er|Operation|Panel)|o(?:cessInfo|tocolChecker|perty(?:Specifier|ListSerialization)|gressIndicator|xy)|edicate))|E(?:numerator|vent|PSImageRep|rror|x(?:ception|istsCommand|pression))|V(?:iew(?:Animation)?|al(?:idated(?:ToobarItem|UserInterfaceItem)|ue(?:Transformer)?))|Keyed(?:Unarchiver|Archiver)|Qui(?:ckDrawView|tCommand)|F(?:ile(?:Manager|Handle|Wrapper)|o(?:nt(?:Manager|Descriptor|Panel)?|rm(?:Cell|atter)))|W(?:hoseSpecifier|indow(?:Controller)?|orkspace)|L(?:o(?:c(?:k(?:ing)?|ale)|gicalTest)|evelIndicator(?:Cell)?|ayoutManager)|A(?:ssertionHandler|nimation|ctionCell|ttributedString|utoreleasePool|TSTypesetter|ppl(?:ication|e(?:Script|Event(?:Manager|Descriptor)))|ffineTransform|lert|r(?:chiver|ray(?:Controller)?))))(?:\\b)" - }, - { - token: ["support.class.quartz"], - regex: "(?:\\b)(C(?:I(?:Sampler|Co(?:ntext|lor)|Image(?:Accumulator)?|PlugIn(?:Registration)?|Vector|Kernel|Filter(?:Generator|Shape)?)|A(?:Renderer|MediaTiming(?:Function)?|BasicAnimation|ScrollLayer|Constraint(?:LayoutManager)?|T(?:iledLayer|extLayer|rans(?:ition|action))|OpenGLLayer|PropertyAnimation|KeyframeAnimation|Layer|A(?:nimation(?:Group)?|ction))))(?:\\b)" - }, - { - token: ["support.type.quartz"], - regex: "(?:\\b)(C(?:G(?:Float|Point|Size|Rect)|IFormat|AConstraintAttribute))(?:\\b)" - }, - { - token: ["support.type.cocoa"], - regex: "(?:\\b)(NS(?:R(?:ect(?:Edge)?|ange)|G(?:lyph(?:Relation|LayoutMode)?|radientType)|M(?:odalSession|a(?:trixMode|p(?:Table|Enumerator)))|B(?:itmapImageFileType|orderType|uttonType|ezelStyle|ackingStoreType|rowserColumnResizingType)|S(?:cr(?:oll(?:er(?:Part|Arrow)|ArrowPosition)|eenAuxiliaryOpaque)|tringEncoding|ize|ocketNativeHandle|election(?:Granularity|Direction|Affinity)|wapped(?:Double|Float)|aveOperationType)|Ha(?:sh(?:Table|Enumerator)|ndler(?:2)?)|C(?:o(?:ntrol(?:Size|Tint)|mp(?:ositingOperation|arisonResult))|ell(?:State|Type|ImagePosition|Attribute))|T(?:hreadPrivate|ypesetterGlyphInfo|i(?:ckMarkPosition|tlePosition|meInterval)|o(?:ol(?:TipTag|bar(?:SizeMode|DisplayMode))|kenStyle)|IFFCompression|ext(?:TabType|Alignment)|ab(?:State|leViewDropOperation|ViewType)|rackingRectTag)|ImageInterpolation|Zone|OpenGL(?:ContextAuxiliary|PixelFormatAuxiliary)|D(?:ocumentChangeType|atePickerElementFlags|ra(?:werState|gOperation))|UsableScrollerParts|P(?:oint|r(?:intingPageOrder|ogressIndicator(?:Style|Th(?:ickness|readInfo))))|EventType|KeyValueObservingOptions|Fo(?:nt(?:SymbolicTraits|TraitMask|Action)|cusRingType)|W(?:indow(?:OrderingMode|Depth)|orkspace(?:IconCreationOptions|LaunchOptions)|ritingDirection)|L(?:ineBreakMode|ayout(?:Status|Direction))|A(?:nimation(?:Progress|Effect)|ppl(?:ication(?:TerminateReply|DelegateReply|PrintReply)|eEventManagerSuspensionID)|ffineTransformStruct|lertStyle)))(?:\\b)" - }, - { - token: ["support.constant.cocoa"], - regex: "(?:\\b)(NS(?:NotFound|Ordered(?:Ascending|Descending|Same)))(?:\\b)" - }, - { - token: ["support.constant.notification.cocoa.leopard"], - regex: "(?:\\b)(NS(?:MenuDidBeginTracking|ViewDidUpdateTrackingAreas)?Notification)(?:\\b)" - }, - { - token: ["support.constant.notification.cocoa"], - regex: "(?:\\b)(NS(?:Menu(?:Did(?:RemoveItem|SendAction|ChangeItem|EndTracking|AddItem)|WillSendAction)|S(?:ystemColorsDidChange|plitView(?:DidResizeSubviews|WillResizeSubviews))|C(?:o(?:nt(?:extHelpModeDid(?:Deactivate|Activate)|rolT(?:intDidChange|extDid(?:BeginEditing|Change|EndEditing)))|lor(?:PanelColorDidChange|ListDidChange)|mboBox(?:Selection(?:IsChanging|DidChange)|Will(?:Dismiss|PopUp)))|lassDescriptionNeededForClass)|T(?:oolbar(?:DidRemoveItem|WillAddItem)|ext(?:Storage(?:DidProcessEditing|WillProcessEditing)|Did(?:BeginEditing|Change|EndEditing)|View(?:DidChange(?:Selection|TypingAttributes)|WillChangeNotifyingTextView))|ableView(?:Selection(?:IsChanging|DidChange)|ColumnDid(?:Resize|Move)))|ImageRepRegistryDidChange|OutlineView(?:Selection(?:IsChanging|DidChange)|ColumnDid(?:Resize|Move)|Item(?:Did(?:Collapse|Expand)|Will(?:Collapse|Expand)))|Drawer(?:Did(?:Close|Open)|Will(?:Close|Open))|PopUpButton(?:CellWillPopUp|WillPopUp)|View(?:GlobalFrameDidChange|BoundsDidChange|F(?:ocusDidChange|rameDidChange))|FontSetChanged|W(?:indow(?:Did(?:Resi(?:ze|gn(?:Main|Key))|M(?:iniaturize|ove)|Become(?:Main|Key)|ChangeScreen(?:|Profile)|Deminiaturize|Update|E(?:ndSheet|xpose))|Will(?:M(?:iniaturize|ove)|BeginSheet|Close))|orkspace(?:SessionDid(?:ResignActive|BecomeActive)|Did(?:Mount|TerminateApplication|Unmount|PerformFileOperation|Wake|LaunchApplication)|Will(?:Sleep|Unmount|PowerOff|LaunchApplication)))|A(?:ntialiasThresholdChanged|ppl(?:ication(?:Did(?:ResignActive|BecomeActive|Hide|ChangeScreenParameters|U(?:nhide|pdate)|FinishLaunching)|Will(?:ResignActive|BecomeActive|Hide|Terminate|U(?:nhide|pdate)|FinishLaunching))|eEventManagerWillProcessFirstEvent)))Notification)(?:\\b)" - }, - { - token: ["support.constant.cocoa.leopard"], - regex: "(?:\\b)(NS(?:RuleEditor(?:RowType(?:Simple|Compound)|NestingMode(?:Si(?:ngle|mple)|Compound|List))|GradientDraws(?:BeforeStartingLocation|AfterEndingLocation)|M(?:inusSetExpressionType|a(?:chPortDeallocate(?:ReceiveRight|SendRight|None)|pTable(?:StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality)))|B(?:oxCustom|undleExecutableArchitecture(?:X86|I386|PPC(?:64)?)|etweenPredicateOperatorType|ackgroundStyle(?:Raised|Dark|L(?:ight|owered)))|S(?:tring(?:DrawingTruncatesLastVisibleLine|EncodingConversion(?:ExternalRepresentation|AllowLossy))|ubqueryExpressionType|p(?:e(?:ech(?:SentenceBoundary|ImmediateBoundary|WordBoundary)|llingState(?:GrammarFlag|SpellingFlag))|litViewDividerStyleThi(?:n|ck))|e(?:rvice(?:RequestTimedOutError|M(?:iscellaneousError|alformedServiceDictionaryError)|InvalidPasteboardDataError|ErrorM(?:inimum|aximum)|Application(?:NotFoundError|LaunchFailedError))|gmentStyle(?:Round(?:Rect|ed)|SmallSquare|Capsule|Textured(?:Rounded|Square)|Automatic)))|H(?:UDWindowMask|ashTable(?:StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality))|N(?:oModeColorPanel|etServiceNoAutoRename)|C(?:hangeRedone|o(?:ntainsPredicateOperatorType|l(?:orRenderingIntent(?:RelativeColorimetric|Saturation|Default|Perceptual|AbsoluteColorimetric)|lectorDisabledOption))|ellHit(?:None|ContentArea|TrackableArea|EditableTextArea))|T(?:imeZoneNameStyle(?:S(?:hort(?:Standard|DaylightSaving)|tandard)|DaylightSaving)|extFieldDatePickerStyle|ableViewSelectionHighlightStyle(?:Regular|SourceList)|racking(?:Mouse(?:Moved|EnteredAndExited)|CursorUpdate|InVisibleRect|EnabledDuringMouseDrag|A(?:ssumeInside|ctive(?:In(?:KeyWindow|ActiveApp)|WhenFirstResponder|Always))))|I(?:n(?:tersectSetExpressionType|dexedColorSpaceModel)|mageScale(?:None|Proportionally(?:Down|UpOrDown)|AxesIndependently))|Ope(?:nGLPFAAllowOfflineRenderers|rationQueue(?:DefaultMaxConcurrentOperationCount|Priority(?:High|Normal|Very(?:High|Low)|Low)))|D(?:iacriticInsensitiveSearch|ownloadsDirectory)|U(?:nionSetExpressionType|TF(?:16(?:BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)|32(?:BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)))|P(?:ointerFunctions(?:Ma(?:chVirtualMemory|llocMemory)|Str(?:ongMemory|uctPersonality)|C(?:StringPersonality|opyIn)|IntegerPersonality|ZeroingWeakMemory|O(?:paque(?:Memory|Personality)|bjectP(?:ointerPersonality|ersonality)))|at(?:hStyle(?:Standard|NavigationBar|PopUp)|ternColorSpaceModel)|rintPanelShows(?:Scaling|Copies|Orientation|P(?:a(?:perSize|ge(?:Range|SetupAccessory))|review)))|Executable(?:RuntimeMismatchError|NotLoadableError|ErrorM(?:inimum|aximum)|L(?:inkError|oadError)|ArchitectureMismatchError)|KeyValueObservingOption(?:Initial|Prior)|F(?:i(?:ndPanelSubstringMatchType(?:StartsWith|Contains|EndsWith|FullWord)|leRead(?:TooLargeError|UnknownStringEncodingError))|orcedOrderingSearch)|Wi(?:ndow(?:BackingLocation(?:MainMemory|Default|VideoMemory)|Sharing(?:Read(?:Only|Write)|None)|CollectionBehavior(?:MoveToActiveSpace|CanJoinAllSpaces|Default))|dthInsensitiveSearch)|AggregateExpressionType))(?:\\b)" - }, - { - token: ["support.constant.cocoa"], - regex: "(?:\\b)(NS(?:R(?:GB(?:ModeColorPanel|ColorSpaceModel)|ight(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|T(?:ext(?:Movement|Alignment)|ab(?:sBezelBorder|StopType))|ArrowFunctionKey)|ound(?:RectBezelStyle|Bankers|ed(?:BezelStyle|TokenStyle|DisclosureBezelStyle)|Down|Up|Plain|Line(?:CapStyle|JoinStyle))|un(?:StoppedResponse|ContinuesResponse|AbortedResponse)|e(?:s(?:izableWindowMask|et(?:CursorRectsRunLoopOrdering|FunctionKey))|ce(?:ssedBezelStyle|iver(?:sCantHandleCommandScriptError|EvaluationScriptError))|turnTextMovement|doFunctionKey|quiredArgumentsMissingScriptError|l(?:evancyLevelIndicatorStyle|ative(?:Before|After))|gular(?:SquareBezelStyle|ControlSize)|moveTraitFontAction)|a(?:n(?:domSubelement|geDateMode)|tingLevelIndicatorStyle|dio(?:ModeMatrix|Button)))|G(?:IFFileType|lyph(?:Below|Inscribe(?:B(?:elow|ase)|Over(?:strike|Below)|Above)|Layout(?:WithPrevious|A(?:tAPoint|gainstAPoint))|A(?:ttribute(?:BidiLevel|Soft|Inscribe|Elastic)|bove))|r(?:ooveBorder|eaterThan(?:Comparison|OrEqualTo(?:Comparison|PredicateOperatorType)|PredicateOperatorType)|a(?:y(?:ModeColorPanel|ColorSpaceModel)|dient(?:None|Con(?:cave(?:Strong|Weak)|vex(?:Strong|Weak)))|phiteControlTint)))|XML(?:N(?:o(?:tationDeclarationKind|de(?:CompactEmptyElement|IsCDATA|OptionsNone|Use(?:SingleQuotes|DoubleQuotes)|Pre(?:serve(?:NamespaceOrder|C(?:haracterReferences|DATA)|DTD|Prefixes|E(?:ntities|mptyElements)|Quotes|Whitespace|A(?:ttributeOrder|ll))|ttyPrint)|ExpandEmptyElement))|amespaceKind)|CommentKind|TextKind|InvalidKind|D(?:ocument(?:X(?:MLKind|HTMLKind|Include)|HTMLKind|T(?:idy(?:XML|HTML)|extKind)|IncludeContentTypeDeclaration|Validate|Kind)|TDKind)|P(?:arser(?:GTRequiredError|XMLDeclNot(?:StartedError|FinishedError)|Mi(?:splaced(?:XMLDeclarationError|CDATAEndStringError)|xedContentDeclNot(?:StartedError|FinishedError))|S(?:t(?:andaloneValueError|ringNot(?:StartedError|ClosedError))|paceRequiredError|eparatorRequiredError)|N(?:MTOKENRequiredError|o(?:t(?:ationNot(?:StartedError|FinishedError)|WellBalancedError)|DTDError)|amespaceDeclarationError|AMERequiredError)|C(?:haracterRef(?:In(?:DTDError|PrologError|EpilogError)|AtEOFError)|o(?:nditionalSectionNot(?:StartedError|FinishedError)|mment(?:NotFinishedError|ContainsDoubleHyphenError))|DATANotFinishedError)|TagNameMismatchError|In(?:ternalError|valid(?:HexCharacterRefError|C(?:haracter(?:RefError|InEntityError|Error)|onditionalSectionError)|DecimalCharacterRefError|URIError|Encoding(?:NameError|Error)))|OutOfMemoryError|D(?:ocumentStartError|elegateAbortedParseError|OCTYPEDeclNotFinishedError)|U(?:RI(?:RequiredError|FragmentError)|n(?:declaredEntityError|parsedEntityError|knownEncodingError|finishedTagError))|P(?:CDATARequiredError|ublicIdentifierRequiredError|arsedEntityRef(?:MissingSemiError|NoNameError|In(?:Internal(?:SubsetError|Error)|PrologError|EpilogError)|AtEOFError)|r(?:ocessingInstructionNot(?:StartedError|FinishedError)|ematureDocumentEndError))|E(?:n(?:codingNotSupportedError|tity(?:Ref(?:In(?:DTDError|PrologError|EpilogError)|erence(?:MissingSemiError|WithoutNameError)|LoopError|AtEOFError)|BoundaryError|Not(?:StartedError|FinishedError)|Is(?:ParameterError|ExternalError)|ValueRequiredError))|qualExpectedError|lementContentDeclNot(?:StartedError|FinishedError)|xt(?:ernalS(?:tandaloneEntityError|ubsetNotFinishedError)|raContentError)|mptyDocumentError)|L(?:iteralNot(?:StartedError|FinishedError)|T(?:RequiredError|SlashRequiredError)|essThanSymbolInAttributeError)|Attribute(?:RedefinedError|HasNoValueError|Not(?:StartedError|FinishedError)|ListNot(?:StartedError|FinishedError)))|rocessingInstructionKind)|E(?:ntity(?:GeneralKind|DeclarationKind|UnparsedKind|P(?:ar(?:sedKind|ameterKind)|redefined))|lement(?:Declaration(?:MixedKind|UndefinedKind|E(?:lementKind|mptyKind)|Kind|AnyKind)|Kind))|Attribute(?:N(?:MToken(?:sKind|Kind)|otationKind)|CDATAKind|ID(?:Ref(?:sKind|Kind)|Kind)|DeclarationKind|En(?:tit(?:yKind|iesKind)|umerationKind)|Kind))|M(?:i(?:n(?:XEdge|iaturizableWindowMask|YEdge|uteCalendarUnit)|terLineJoinStyle|ddleSubelement|xedState)|o(?:nthCalendarUnit|deSwitchFunctionKey|use(?:Moved(?:Mask)?|E(?:ntered(?:Mask)?|ventSubtype|xited(?:Mask)?))|veToBezierPathElement|mentary(?:ChangeButton|Push(?:Button|InButton)|Light(?:Button)?))|enuFunctionKey|a(?:c(?:intoshInterfaceStyle|OSRomanStringEncoding)|tchesPredicateOperatorType|ppedRead|x(?:XEdge|YEdge))|ACHOperatingSystem)|B(?:MPFileType|o(?:ttomTabsBezelBorder|ldFontMask|rderlessWindowMask|x(?:Se(?:condary|parator)|OldStyle|Primary))|uttLineCapStyle|e(?:zelBorder|velLineJoinStyle|low(?:Bottom|Top)|gin(?:sWith(?:Comparison|PredicateOperatorType)|FunctionKey))|lueControlTint|ack(?:spaceCharacter|tabTextMovement|ingStore(?:Retained|Buffered|Nonretained)|TabCharacter|wardsSearch|groundTab)|r(?:owser(?:NoColumnResizing|UserColumnResizing|AutoColumnResizing)|eakFunctionKey))|S(?:h(?:ift(?:JISStringEncoding|KeyMask)|ow(?:ControlGlyphs|InvisibleGlyphs)|adowlessSquareBezelStyle)|y(?:s(?:ReqFunctionKey|tem(?:D(?:omainMask|efined(?:Mask)?)|FunctionKey))|mbolStringEncoding)|c(?:a(?:nnedOption|le(?:None|ToFit|Proportionally))|r(?:oll(?:er(?:NoPart|Increment(?:Page|Line|Arrow)|Decrement(?:Page|Line|Arrow)|Knob(?:Slot)?|Arrows(?:M(?:inEnd|axEnd)|None|DefaultSetting))|Wheel(?:Mask)?|LockFunctionKey)|eenChangedEventType))|t(?:opFunctionKey|r(?:ingDrawing(?:OneShot|DisableScreenFontSubstitution|Uses(?:DeviceMetrics|FontLeading|LineFragmentOrigin))|eam(?:Status(?:Reading|NotOpen|Closed|Open(?:ing)?|Error|Writing|AtEnd)|Event(?:Has(?:BytesAvailable|SpaceAvailable)|None|OpenCompleted|E(?:ndEncountered|rrorOccurred)))))|i(?:ngle(?:DateMode|UnderlineStyle)|ze(?:DownFontAction|UpFontAction))|olarisOperatingSystem|unOSOperatingSystem|pecialPageOrder|e(?:condCalendarUnit|lect(?:By(?:Character|Paragraph|Word)|i(?:ng(?:Next|Previous)|onAffinity(?:Downstream|Upstream))|edTab|FunctionKey)|gmentSwitchTracking(?:Momentary|Select(?:One|Any)))|quareLineCapStyle|witchButton|ave(?:ToOperation|Op(?:tions(?:Yes|No|Ask)|eration)|AsOperation)|mall(?:SquareBezelStyle|C(?:ontrolSize|apsFontMask)|IconButtonBezelStyle))|H(?:ighlightModeMatrix|SBModeColorPanel|o(?:ur(?:Minute(?:SecondDatePickerElementFlag|DatePickerElementFlag)|CalendarUnit)|rizontalRuler|meFunctionKey)|TTPCookieAcceptPolicy(?:Never|OnlyFromMainDocumentDomain|Always)|e(?:lp(?:ButtonBezelStyle|KeyMask|FunctionKey)|avierFontAction)|PUXOperatingSystem)|Year(?:MonthDa(?:yDatePickerElementFlag|tePickerElementFlag)|CalendarUnit)|N(?:o(?:n(?:StandardCharacterSetFontMask|ZeroWindingRule|activatingPanelMask|LossyASCIIStringEncoding)|Border|t(?:ification(?:SuspensionBehavior(?:Hold|Coalesce|D(?:eliverImmediately|rop))|NoCoalescing|CoalescingOn(?:Sender|Name)|DeliverImmediately|PostToAllSessions)|PredicateType|EqualToPredicateOperatorType)|S(?:cr(?:iptError|ollerParts)|ubelement|pecifierError)|CellMask|T(?:itle|opLevelContainersSpecifierError|abs(?:BezelBorder|NoBorder|LineBorder))|I(?:nterfaceStyle|mage)|UnderlineStyle|FontChangeAction)|u(?:ll(?:Glyph|CellType)|m(?:eric(?:Search|PadKeyMask)|berFormatter(?:Round(?:Half(?:Down|Up|Even)|Ceiling|Down|Up|Floor)|Behavior(?:10|Default)|S(?:cientificStyle|pellOutStyle)|NoStyle|CurrencyStyle|DecimalStyle|P(?:ercentStyle|ad(?:Before(?:Suffix|Prefix)|After(?:Suffix|Prefix))))))|e(?:t(?:Services(?:BadArgumentError|NotFoundError|C(?:ollisionError|ancelledError)|TimeoutError|InvalidError|UnknownError|ActivityInProgress)|workDomainMask)|wlineCharacter|xt(?:StepInterfaceStyle|FunctionKey))|EXTSTEPStringEncoding|a(?:t(?:iveShortGlyphPacking|uralTextAlignment)|rrowFontMask))|C(?:hange(?:ReadOtherContents|GrayCell(?:Mask)?|BackgroundCell(?:Mask)?|Cleared|Done|Undone|Autosaved)|MYK(?:ModeColorPanel|ColorSpaceModel)|ircular(?:BezelStyle|Slider)|o(?:n(?:stantValueExpressionType|t(?:inuousCapacityLevelIndicatorStyle|entsCellMask|ain(?:sComparison|erSpecifierError)|rol(?:Glyph|KeyMask))|densedFontMask)|lor(?:Panel(?:RGBModeMask|GrayModeMask|HSBModeMask|C(?:MYKModeMask|olorListModeMask|ustomPaletteModeMask|rayonModeMask)|WheelModeMask|AllModesMask)|ListModeColorPanel)|reServiceDirectory|m(?:p(?:osite(?:XOR|Source(?:In|O(?:ut|ver)|Atop)|Highlight|C(?:opy|lear)|Destination(?:In|O(?:ut|ver)|Atop)|Plus(?:Darker|Lighter))|ressedFontMask)|mandKeyMask))|u(?:stom(?:SelectorPredicateOperatorType|PaletteModeColorPanel)|r(?:sor(?:Update(?:Mask)?|PointingDevice)|veToBezierPathElement))|e(?:nterT(?:extAlignment|abStopType)|ll(?:State|H(?:ighlighted|as(?:Image(?:Horizontal|OnLeftOrBottom)|OverlappingImage))|ChangesContents|Is(?:Bordered|InsetButton)|Disabled|Editable|LightsBy(?:Gray|Background|Contents)|AllowsMixedState))|l(?:ipPagination|o(?:s(?:ePathBezierPathElement|ableWindowMask)|ckAndCalendarDatePickerStyle)|ear(?:ControlTint|DisplayFunctionKey|LineFunctionKey))|a(?:seInsensitive(?:Search|PredicateOption)|n(?:notCreateScriptCommandError|cel(?:Button|TextMovement))|chesDirectory|lculation(?:NoError|Overflow|DivideByZero|Underflow|LossOfPrecision)|rriageReturnCharacter)|r(?:itical(?:Request|AlertStyle)|ayonModeColorPanel))|T(?:hick(?:SquareBezelStyle|erSquareBezelStyle)|ypesetter(?:Behavior|HorizontalTabAction|ContainerBreakAction|ZeroAdvancementAction|OriginalBehavior|ParagraphBreakAction|WhitespaceAction|L(?:ineBreakAction|atestBehavior))|i(?:ckMark(?:Right|Below|Left|Above)|tledWindowMask|meZoneDatePickerElementFlag)|o(?:olbarItemVisibilityPriority(?:Standard|High|User|Low)|pTabsBezelBorder|ggleButton)|IFF(?:Compression(?:N(?:one|EXT)|CCITTFAX(?:3|4)|OldJPEG|JPEG|PackBits|LZW)|FileType)|e(?:rminate(?:Now|Cancel|Later)|xt(?:Read(?:InapplicableDocumentTypeError|WriteErrorM(?:inimum|aximum))|Block(?:M(?:i(?:nimum(?:Height|Width)|ddleAlignment)|a(?:rgin|ximum(?:Height|Width)))|B(?:o(?:ttomAlignment|rder)|aselineAlignment)|Height|TopAlignment|P(?:ercentageValueType|adding)|Width|AbsoluteValueType)|StorageEdited(?:Characters|Attributes)|CellType|ured(?:RoundedBezelStyle|BackgroundWindowMask|SquareBezelStyle)|Table(?:FixedLayoutAlgorithm|AutomaticLayoutAlgorithm)|Field(?:RoundedBezel|SquareBezel|AndStepperDatePickerStyle)|WriteInapplicableDocumentTypeError|ListPrependEnclosingMarker))|woByteGlyphPacking|ab(?:Character|TextMovement|le(?:tP(?:oint(?:Mask|EventSubtype)?|roximity(?:Mask|EventSubtype)?)|Column(?:NoResizing|UserResizingMask|AutoresizingMask)|View(?:ReverseSequentialColumnAutoresizingStyle|GridNone|S(?:olid(?:HorizontalGridLineMask|VerticalGridLineMask)|equentialColumnAutoresizingStyle)|NoColumnAutoresizing|UniformColumnAutoresizingStyle|FirstColumnOnlyAutoresizingStyle|LastColumnOnlyAutoresizingStyle)))|rackModeMatrix)|I(?:n(?:sert(?:CharFunctionKey|FunctionKey|LineFunctionKey)|t(?:Type|ernalS(?:criptError|pecifierError))|dexSubelement|validIndexSpecifierError|formational(?:Request|AlertStyle)|PredicateOperatorType)|talicFontMask|SO(?:2022JPStringEncoding|Latin(?:1StringEncoding|2StringEncoding))|dentityMappingCharacterCollection|llegalTextMovement|mage(?:R(?:ight|ep(?:MatchesDevice|LoadStatus(?:ReadingHeader|Completed|InvalidData|Un(?:expectedEOF|knownType)|WillNeedAllData)))|Below|C(?:ellType|ache(?:BySize|Never|Default|Always))|Interpolation(?:High|None|Default|Low)|O(?:nly|verlaps)|Frame(?:Gr(?:oove|ayBezel)|Button|None|Photo)|L(?:oadStatus(?:ReadError|C(?:ompleted|ancelled)|InvalidData|UnexpectedEOF)|eft)|A(?:lign(?:Right|Bottom(?:Right|Left)?|Center|Top(?:Right|Left)?|Left)|bove)))|O(?:n(?:State|eByteGlyphPacking|OffButton|lyScrollerArrows)|ther(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|TextMovement)|SF1OperatingSystem|pe(?:n(?:GL(?:GO(?:Re(?:setLibrary|tainRenderers)|ClearFormatCache|FormatCacheSize)|PFA(?:R(?:obust|endererID)|M(?:inimumPolicy|ulti(?:sample|Screen)|PSafe|aximumPolicy)|BackingStore|S(?:creenMask|te(?:ncilSize|reo)|ingleRenderer|upersample|ample(?:s|Buffers|Alpha))|NoRecovery|C(?:o(?:lor(?:Size|Float)|mpliant)|losestPolicy)|OffScreen|D(?:oubleBuffer|epthSize)|PixelBuffer|VirtualScreenCount|FullScreen|Window|A(?:cc(?:umSize|elerated)|ux(?:Buffers|DepthStencil)|l(?:phaSize|lRenderers))))|StepUnicodeReservedBase)|rationNotSupportedForKeyS(?:criptError|pecifierError))|ffState|KButton|rPredicateType|bjC(?:B(?:itfield|oolType)|S(?:hortType|tr(?:ingType|uctType)|electorType)|NoType|CharType|ObjectType|DoubleType|UnionType|PointerType|VoidType|FloatType|Long(?:Type|longType)|ArrayType))|D(?:i(?:s(?:c(?:losureBezelStyle|reteCapacityLevelIndicatorStyle)|playWindowRunLoopOrdering)|acriticInsensitivePredicateOption|rect(?:Selection|PredicateModifier))|o(?:c(?:ModalWindowMask|ument(?:Directory|ationDirectory))|ubleType|wn(?:TextMovement|ArrowFunctionKey))|e(?:s(?:cendingPageOrder|ktopDirectory)|cimalTabStopType|v(?:ice(?:NColorSpaceModel|IndependentModifierFlagsMask)|eloper(?:Directory|ApplicationDirectory))|fault(?:ControlTint|TokenStyle)|lete(?:Char(?:acter|FunctionKey)|FunctionKey|LineFunctionKey)|moApplicationDirectory)|a(?:yCalendarUnit|teFormatter(?:MediumStyle|Behavior(?:10|Default)|ShortStyle|NoStyle|FullStyle|LongStyle))|ra(?:wer(?:Clos(?:ingState|edState)|Open(?:ingState|State))|gOperation(?:Generic|Move|None|Copy|Delete|Private|Every|Link|All)))|U(?:ser(?:CancelledError|D(?:irectory|omainMask)|FunctionKey)|RL(?:Handle(?:NotLoaded|Load(?:Succeeded|InProgress|Failed))|CredentialPersistence(?:None|Permanent|ForSession))|n(?:scaledWindowMask|cachedRead|i(?:codeStringEncoding|talicFontMask|fiedTitleAndToolbarWindowMask)|d(?:o(?:CloseGroupingRunLoopOrdering|FunctionKey)|e(?:finedDateComponent|rline(?:Style(?:Single|None|Thick|Double)|Pattern(?:Solid|D(?:ot|ash(?:Dot(?:Dot)?)?)))))|known(?:ColorSpaceModel|P(?:ointingDevice|ageOrder)|KeyS(?:criptError|pecifierError))|boldFontMask)|tilityWindowMask|TF8StringEncoding|p(?:dateWindowsRunLoopOrdering|TextMovement|ArrowFunctionKey))|J(?:ustifiedTextAlignment|PEG(?:2000FileType|FileType)|apaneseEUC(?:GlyphPacking|StringEncoding))|P(?:o(?:s(?:t(?:Now|erFontMask|WhenIdle|ASAP)|iti(?:on(?:Replace|Be(?:fore|ginning)|End|After)|ve(?:IntType|DoubleType|FloatType)))|pUp(?:NoArrow|ArrowAt(?:Bottom|Center))|werOffEventType|rtraitOrientation)|NGFileType|ush(?:InCell(?:Mask)?|OnPushOffButton)|e(?:n(?:TipMask|UpperSideMask|PointingDevice|LowerSideMask)|riodic(?:Mask)?)|P(?:S(?:caleField|tatus(?:Title|Field)|aveButton)|N(?:ote(?:Title|Field)|ame(?:Title|Field))|CopiesField|TitleField|ImageButton|OptionsButton|P(?:a(?:perFeedButton|ge(?:Range(?:To|From)|ChoiceMatrix))|reviewButton)|LayoutButton)|lainTextTokenStyle|a(?:useFunctionKey|ragraphSeparatorCharacter|ge(?:DownFunctionKey|UpFunctionKey))|r(?:int(?:ing(?:ReplyLater|Success|Cancelled|Failure)|ScreenFunctionKey|erTable(?:NotFound|OK|Error)|FunctionKey)|o(?:p(?:ertyList(?:XMLFormat|MutableContainers(?:AndLeaves)?|BinaryFormat|Immutable|OpenStepFormat)|rietaryStringEncoding)|gressIndicator(?:BarStyle|SpinningStyle|Preferred(?:SmallThickness|Thickness|LargeThickness|AquaThickness)))|e(?:ssedTab|vFunctionKey))|L(?:HeightForm|CancelButton|TitleField|ImageButton|O(?:KButton|rientationMatrix)|UnitsButton|PaperNameButton|WidthForm))|E(?:n(?:terCharacter|d(?:sWith(?:Comparison|PredicateOperatorType)|FunctionKey))|v(?:e(?:nOddWindingRule|rySubelement)|aluatedObjectExpressionType)|qualTo(?:Comparison|PredicateOperatorType)|ra(?:serPointingDevice|CalendarUnit|DatePickerElementFlag)|x(?:clude(?:10|QuickDrawElementsIconCreationOption)|pandedFontMask|ecuteFunctionKey))|V(?:i(?:ew(?:M(?:in(?:XMargin|YMargin)|ax(?:XMargin|YMargin))|HeightSizable|NotSizable|WidthSizable)|aPanelFontAction)|erticalRuler|a(?:lidationErrorM(?:inimum|aximum)|riableExpressionType))|Key(?:SpecifierEvaluationScriptError|Down(?:Mask)?|Up(?:Mask)?|PathExpressionType|Value(?:MinusSetMutation|SetSetMutation|Change(?:Re(?:placement|moval)|Setting|Insertion)|IntersectSetMutation|ObservingOption(?:New|Old)|UnionSetMutation|ValidationError))|QTMovie(?:NormalPlayback|Looping(?:BackAndForthPlayback|Playback))|F(?:1(?:1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|7FunctionKey|i(?:nd(?:PanelAction(?:Replace(?:A(?:ndFind|ll(?:InSelection)?))?|S(?:howFindPanel|e(?:tFindString|lectAll(?:InSelection)?))|Next|Previous)|FunctionKey)|tPagination|le(?:Read(?:No(?:SuchFileError|PermissionError)|CorruptFileError|In(?:validFileNameError|applicableStringEncodingError)|Un(?:supportedSchemeError|knownError))|HandlingPanel(?:CancelButton|OKButton)|NoSuchFileError|ErrorM(?:inimum|aximum)|Write(?:NoPermissionError|In(?:validFileNameError|applicableStringEncodingError)|OutOfSpaceError|Un(?:supportedSchemeError|knownError))|LockingError)|xedPitchFontMask)|2(?:1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|o(?:nt(?:Mo(?:noSpaceTrait|dernSerifsClass)|BoldTrait|S(?:ymbolicClass|criptsClass|labSerifsClass|ansSerifClass)|C(?:o(?:ndensedTrait|llectionApplicationOnlyMask)|larendonSerifsClass)|TransitionalSerifsClass|I(?:ntegerAdvancementsRenderingMode|talicTrait)|O(?:ldStyleSerifsClass|rnamentalsClass)|DefaultRenderingMode|U(?:nknownClass|IOptimizedTrait)|Panel(?:S(?:hadowEffectModeMask|t(?:andardModesMask|rikethroughEffectModeMask)|izeModeMask)|CollectionModeMask|TextColorEffectModeMask|DocumentColorEffectModeMask|UnderlineEffectModeMask|FaceModeMask|All(?:ModesMask|EffectsModeMask))|ExpandedTrait|VerticalTrait|F(?:amilyClassMask|reeformSerifsClass)|Antialiased(?:RenderingMode|IntegerAdvancementsRenderingMode))|cusRing(?:Below|Type(?:None|Default|Exterior)|Only|Above)|urByteGlyphPacking|rm(?:attingError(?:M(?:inimum|aximum))?|FeedCharacter))|8FunctionKey|unction(?:ExpressionType|KeyMask)|3(?:1FunctionKey|2FunctionKey|3FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey)|9FunctionKey|4FunctionKey|P(?:RevertButton|S(?:ize(?:Title|Field)|etButton)|CurrentField|Preview(?:Button|Field))|l(?:oat(?:ingPointSamplesBitmapFormat|Type)|agsChanged(?:Mask)?)|axButton|5FunctionKey|6FunctionKey)|W(?:heelModeColorPanel|indow(?:s(?:NTOperatingSystem|CP125(?:1StringEncoding|2StringEncoding|3StringEncoding|4StringEncoding|0StringEncoding)|95(?:InterfaceStyle|OperatingSystem))|M(?:iniaturizeButton|ovedEventType)|Below|CloseButton|ToolbarButton|ZoomButton|Out|DocumentIconButton|ExposedEventType|Above)|orkspaceLaunch(?:NewInstance|InhibitingBackgroundOnly|Default|PreferringClassic|WithoutA(?:ctivation|ddingToRecents)|A(?:sync|nd(?:Hide(?:Others)?|Print)|llowingClassicStartup))|eek(?:day(?:CalendarUnit|OrdinalCalendarUnit)|CalendarUnit)|a(?:ntsBidiLevels|rningAlertStyle)|r(?:itingDirection(?:RightToLeft|Natural|LeftToRight)|apCalendarComponents))|L(?:i(?:stModeMatrix|ne(?:Moves(?:Right|Down|Up|Left)|B(?:order|reakBy(?:C(?:harWrapping|lipping)|Truncating(?:Middle|Head|Tail)|WordWrapping))|S(?:eparatorCharacter|weep(?:Right|Down|Up|Left))|ToBezierPathElement|DoesntMove|arSlider)|teralSearch|kePredicateOperatorType|ghterFontAction|braryDirectory)|ocalDomainMask|e(?:ssThan(?:Comparison|OrEqualTo(?:Comparison|PredicateOperatorType)|PredicateOperatorType)|ft(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|T(?:ext(?:Movement|Alignment)|ab(?:sBezelBorder|StopType))|ArrowFunctionKey))|a(?:yout(?:RightToLeft|NotDone|CantFit|OutOfGlyphs|Done|LeftToRight)|ndscapeOrientation)|ABColorSpaceModel)|A(?:sc(?:iiWithDoubleByteEUCGlyphPacking|endingPageOrder)|n(?:y(?:Type|PredicateModifier|EventMask)|choredSearch|imation(?:Blocking|Nonblocking(?:Threaded)?|E(?:ffect(?:DisappearingItemDefault|Poof)|ase(?:In(?:Out)?|Out))|Linear)|dPredicateType)|t(?:Bottom|tachmentCharacter|omicWrite|Top)|SCIIStringEncoding|d(?:obe(?:GB1CharacterCollection|CNS1CharacterCollection|Japan(?:1CharacterCollection|2CharacterCollection)|Korea1CharacterCollection)|dTraitFontAction|minApplicationDirectory)|uto(?:saveOperation|Pagination)|pp(?:lication(?:SupportDirectory|D(?:irectory|e(?:fined(?:Mask)?|legateReply(?:Success|Cancel|Failure)|activatedEventType))|ActivatedEventType)|KitDefined(?:Mask)?)|l(?:ternateKeyMask|pha(?:ShiftKeyMask|NonpremultipliedBitmapFormat|FirstBitmapFormat)|ert(?:SecondButtonReturn|ThirdButtonReturn|OtherReturn|DefaultReturn|ErrorReturn|FirstButtonReturn|AlternateReturn)|l(?:ScrollerParts|DomainsMask|PredicateModifier|LibrariesDirectory|ApplicationsDirectory))|rgument(?:sWrongScriptError|EvaluationScriptError)|bove(?:Bottom|Top)|WTEventType)))(?:\\b)" - }, - { - token: "support.function.C99.c", - regex: C_Highlight_File.cFunctions - }, - { - token : cObj.getKeywords(), - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, - { - token: "punctuation.section.scope.begin.objc", - regex: "\\[", - next: "bracketed_content" - }, - { - token: "meta.function.objc", - regex: "^(?:-|\\+)\\s*" - } - ], - "constant_NSString": [ - { - token: "constant.character.escape.objc", - regex: escapedConstRe - }, - { - token: "invalid.illegal.unknown-escape.objc", - regex: "\\\\." - }, - { - token: "string", - regex: '[^"\\\\]+' - }, - { - token: "punctuation.definition.string.end", - regex: "\"", - next: "start" - } - ], - "protocol_list": [ - { - token: "punctuation.section.scope.end.objc", - regex: ">", - next: "start" - }, - { - token: "support.other.protocol.objc", - regex: "\bNS(?:GlyphStorage|M(?:utableCopying|enuItem)|C(?:hangeSpelling|o(?:ding|pying|lorPicking(?:Custom|Default)))|T(?:oolbarItemValidations|ext(?:Input|AttachmentCell))|I(?:nputServ(?:iceProvider|erMouseTracker)|gnoreMisspelledWords)|Obj(?:CTypeSerializationCallBack|ect)|D(?:ecimalNumberBehaviors|raggingInfo)|U(?:serInterfaceValidations|RL(?:HandleClient|DownloadDelegate|ProtocolClient|AuthenticationChallengeSender))|Validated(?:ToobarItem|UserInterfaceItem)|Locking)\b" - } - ], - "selectors": [ - { - token: "support.function.any-method.name-of-parameter.objc", - regex: "\\b(?:[a-zA-Z_:][\\w]*)+" - }, - { - token: "punctuation", - regex: "\\)", - next: "start" - } - ], - "bracketed_content": [ - { - token: "punctuation.section.scope.end.objc", - regex: "\]", - next: "start" - }, - { - token: ["support.function.any-method.objc"], - regex: "(?:predicateWithFormat:| NSPredicate predicateWithFormat:)", - next: "start" - }, - { - token: "support.function.any-method.objc", - regex: "\\w+(?::|(?=\]))", - next: "start" - } - ], - "bracketed_strings": [ - { - token: "punctuation.section.scope.end.objc", - regex: "\]", - next: "start" - }, - { - token: "keyword.operator.logical.predicate.cocoa", - regex: "\\b(?:AND|OR|NOT|IN)\\b" - }, - { - token: ["invalid.illegal.unknown-method.objc", "punctuation.separator.arguments.objc"], - regex: "\\b(\w+)(:)" - }, - { - regex: "\\b(?:ALL|ANY|SOME|NONE)\\b", - token: "constant.language.predicate.cocoa" - }, - { - regex: "\\b(?:NULL|NIL|SELF|TRUE|YES|FALSE|NO|FIRST|LAST|SIZE)\\b", - token: "constant.language.predicate.cocoa" - }, - { - regex: "\\b(?:MATCHES|CONTAINS|BEGINSWITH|ENDSWITH|BETWEEN)\\b", - token: "keyword.operator.comparison.predicate.cocoa" - }, - { - regex: "\\bC(?:ASEINSENSITIVE|I)\\b", - token: "keyword.other.modifier.predicate.cocoa" - }, - { - regex: "\\b(?:ANYKEY|SUBQUERY|CAST|TRUEPREDICATE|FALSEPREDICATE)\\b", - token: "keyword.other.predicate.cocoa" - }, - { - regex: escapedConstRe, - token: "constant.character.escape.objc" - }, - { - regex: "\\\\.", - token: "invalid.illegal.unknown-escape.objc" - }, - { - token: "string", - regex: '[^"\\\\]' - }, - { - token: "punctuation.definition.string.end.objc", - regex: "\"", - next: "predicates" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - "methods" : [ - { - token : "meta.function.objc", - regex : "(?=\\{|#)|;", - next : "start" - } - ] -} - for (var r in cRules) { - if (this.$rules[r]) { - if (this.$rules[r].push) - this.$rules[r].push.apply(this.$rules[r], cRules[r]); - } else { - this.$rules[r] = cRules[r]; - } - } - - this.$rules.bracketed_content = this.$rules.bracketed_content.concat( - this.$rules.start, specialVariables - ); - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); -}; - -oop.inherits(ObjectiveCHighlightRules, CHighlightRules); - -exports.ObjectiveCHighlightRules = ObjectiveCHighlightRules; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/objectivec",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/objectivec_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var ObjectiveCHighlightRules = require("./objectivec_highlight_rules").ObjectiveCHighlightRules; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = ObjectiveCHighlightRules; - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$id = "ace/mode/objectivec"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};n.inherits(i,o),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=t.cFunctions="\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b",l=function(){var e="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",t="asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|class|wchar_t|template",r="const|extern|register|restrict|static|volatile|inline|private|protected|public|friend|explicit|virtual|export|mutable|typename|constexpr|new|delete",n="and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eqconst_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace",i="NULL|true|false|TRUE|FALSE",l=this.$keywords=this.createKeywordMapper({"keyword.control":e,"storage.type":t,"storage.modifier":r,"keyword.operator":n,"variable.language":"this","constant.language":i},"identifier");this.$rules={start:[{token:"comment",regex:"//",next:"singleLineComment"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b",next:"directive"},{token:"keyword",regex:"(?:#\\s*endif)\\b"},{token:"support.function.C99.c",regex:a},{token:l,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],singleLineComment:[{token:"comment",regex:/\\$/,next:"singleLineComment"},{token:"comment",regex:/$/,next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{defaultToken:"string"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{defaultToken:"string"}],directive:[{token:"constant.other.multiline",regex:/\\/},{token:"constant.other.multiline",regex:/.*\\/},{token:"constant.other",regex:"\\s*<.+?>",next:"start"},{token:"constant.other",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(o,"doc-",[o.getEndRule("start")])};n.inherits(l,i),t.c_cppHighlightRules=l}),define("ace/mode/objectivec_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/c_cpp_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./c_cpp_highlight_rules"),a=i.c_cppHighlightRules,l=function(){var e="\\\\(?:[abefnrtv'\"?\\\\]|[0-3]\\d{1,2}|[4-7]\\d?|222|x[a-zA-Z0-9]+)",t=[{regex:"\\b_cmd\\b",token:"variable.other.selector.objc"},{regex:"\\b(?:self|super)\\b",token:"variable.language.objc"}],r=new a,n=r.getRules();this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:["storage.type.objc","punctuation.definition.storage.type.objc","entity.name.type.objc","text","entity.other.inherited-class.objc"],regex:"(@)(interface|protocol)(?!.+;)(\\s+[A-Za-z_][A-Za-z0-9_]*)(\\s*:\\s*)([A-Za-z]+)"},{token:["storage.type.objc"],regex:"(@end)"},{token:["storage.type.objc","entity.name.type.objc","entity.other.inherited-class.objc"],regex:"(@implementation)(\\s+[A-Za-z_][A-Za-z0-9_]*)(\\s*?::\\s*(?:[A-Za-z][A-Za-z0-9]*))?"},{token:"string.begin.objc",regex:'@"',next:"constant_NSString"},{token:"storage.type.objc",regex:"\\bid\\s*<",next:"protocol_list"},{token:"keyword.control.macro.objc",regex:"\\bNS_DURING|NS_HANDLER|NS_ENDHANDLER\\b"},{token:["punctuation.definition.keyword.objc","keyword.control.exception.objc"],regex:"(@)(try|catch|finally|throw)\\b"},{token:["punctuation.definition.keyword.objc","keyword.other.objc"],regex:"(@)(defs|encode)\\b"},{token:["storage.type.id.objc","text"],regex:"(\\bid\\b)(\\s|\\n)?"},{token:"storage.type.objc",regex:"\\bIBOutlet|IBAction|BOOL|SEL|id|unichar|IMP|Class\\b"},{token:["punctuation.definition.storage.type.objc","storage.type.objc"],regex:"(@)(class|protocol)\\b"},{token:["punctuation.definition.storage.type.objc","punctuation"],regex:"(@selector)(\\s*\\()",next:"selectors"},{token:["punctuation.definition.storage.modifier.objc","storage.modifier.objc"],regex:"(@)(synchronized|public|private|protected|package)\\b"},{token:"constant.language.objc",regex:"\\bYES|NO|Nil|nil\\b"},{token:"support.variable.foundation",regex:"\\bNSApp\\b"},{token:["support.function.cocoa.leopard"],regex:"(?:\\b)(NS(?:Rect(?:ToCGRect|FromCGRect)|MakeCollectable|S(?:tringFromProtocol|ize(?:ToCGSize|FromCGSize))|Draw(?:NinePartImage|ThreePartImage)|P(?:oint(?:ToCGPoint|FromCGPoint)|rotocolFromString)|EventMaskFromType|Value))(?:\\b)"},{token:["support.function.cocoa"],regex:"(?:\\b)(NS(?:R(?:ound(?:DownToMultipleOfPageSize|UpToMultipleOfPageSize)|un(?:CriticalAlertPanel(?:RelativeToWindow)?|InformationalAlertPanel(?:RelativeToWindow)?|AlertPanel(?:RelativeToWindow)?)|e(?:set(?:MapTable|HashTable)|c(?:ycleZone|t(?:Clip(?:List)?|F(?:ill(?:UsingOperation|List(?:UsingOperation|With(?:Grays|Colors(?:UsingOperation)?))?)?|romString))|ordAllocationEvent)|turnAddress|leaseAlertPanel|a(?:dPixel|l(?:MemoryAvailable|locateCollectable))|gisterServicesProvider)|angeFromString)|Get(?:SizeAndAlignment|CriticalAlertPanel|InformationalAlertPanel|UncaughtExceptionHandler|FileType(?:s)?|WindowServerMemory|AlertPanel)|M(?:i(?:n(?:X|Y)|d(?:X|Y))|ouseInRect|a(?:p(?:Remove|Get|Member|Insert(?:IfAbsent|KnownAbsent)?)|ke(?:R(?:ect|ange)|Size|Point)|x(?:Range|X|Y)))|B(?:itsPer(?:SampleFromDepth|PixelFromDepth)|e(?:stDepth|ep|gin(?:CriticalAlertSheet|InformationalAlertSheet|AlertSheet)))|S(?:ho(?:uldRetainWithZone|w(?:sServicesMenuItem|AnimationEffect))|tringFrom(?:R(?:ect|ange)|MapTable|S(?:ize|elector)|HashTable|Class|Point)|izeFromString|e(?:t(?:ShowsServicesMenuItem|ZoneName|UncaughtExceptionHandler|FocusRingStyle)|lectorFromString|archPathForDirectoriesInDomains)|wap(?:Big(?:ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(?:ToHost|LongToHost))|Short|Host(?:ShortTo(?:Big|Little)|IntTo(?:Big|Little)|DoubleTo(?:Big|Little)|FloatTo(?:Big|Little)|Long(?:To(?:Big|Little)|LongTo(?:Big|Little)))|Int|Double|Float|L(?:ittle(?:ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(?:ToHost|LongToHost))|ong(?:Long)?)))|H(?:ighlightRect|o(?:stByteOrder|meDirectory(?:ForUser)?)|eight|ash(?:Remove|Get|Insert(?:IfAbsent|KnownAbsent)?)|FSType(?:CodeFromFileType|OfFile))|N(?:umberOfColorComponents|ext(?:MapEnumeratorPair|HashEnumeratorItem))|C(?:o(?:n(?:tainsRect|vert(?:GlyphsToPackedGlyphs|Swapped(?:DoubleToHost|FloatToHost)|Host(?:DoubleToSwapped|FloatToSwapped)))|unt(?:MapTable|HashTable|Frames|Windows(?:ForContext)?)|py(?:M(?:emoryPages|apTableWithZone)|Bits|HashTableWithZone|Object)|lorSpaceFromDepth|mpare(?:MapTables|HashTables))|lassFromString|reate(?:MapTable(?:WithZone)?|HashTable(?:WithZone)?|Zone|File(?:namePboardType|ContentsPboardType)))|TemporaryDirectory|I(?:s(?:ControllerMarker|EmptyRect|FreedObject)|n(?:setRect|crementExtraRefCount|te(?:r(?:sect(?:sRect|ionR(?:ect|ange))|faceStyleForKey)|gralRect)))|Zone(?:Realloc|Malloc|Name|Calloc|Fr(?:omPointer|ee))|O(?:penStepRootDirectory|ffsetRect)|D(?:i(?:sableScreenUpdates|videRect)|ottedFrameRect|e(?:c(?:imal(?:Round|Multiply|S(?:tring|ubtract)|Normalize|Co(?:py|mpa(?:ct|re))|IsNotANumber|Divide|Power|Add)|rementExtraRefCountWasZero)|faultMallocZone|allocate(?:MemoryPages|Object))|raw(?:Gr(?:oove|ayBezel)|B(?:itmap|utton)|ColorTiledRects|TiledRects|DarkBezel|W(?:hiteBezel|indowBackground)|LightBezel))|U(?:serName|n(?:ionR(?:ect|ange)|registerServicesProvider)|pdateDynamicServices)|Java(?:Bundle(?:Setup|Cleanup)|Setup(?:VirtualMachine)?|Needs(?:ToLoadClasses|VirtualMachine)|ClassesF(?:orBundle|romPath)|ObjectNamedInPath|ProvidesClasses)|P(?:oint(?:InRect|FromString)|erformService|lanarFromDepth|ageSize)|E(?:n(?:d(?:MapTableEnumeration|HashTableEnumeration)|umerate(?:MapTable|HashTable)|ableScreenUpdates)|qual(?:R(?:ects|anges)|Sizes|Points)|raseRect|xtraRefCount)|F(?:ileTypeForHFSTypeCode|ullUserName|r(?:ee(?:MapTable|HashTable)|ame(?:Rect(?:WithWidth(?:UsingOperation)?)?|Address)))|Wi(?:ndowList(?:ForContext)?|dth)|Lo(?:cationInRange|g(?:v|PageSize)?)|A(?:ccessibility(?:R(?:oleDescription(?:ForUIElement)?|aiseBadArgumentException)|Unignored(?:Children(?:ForOnlyChild)?|Descendant|Ancestor)|PostNotification|ActionDescription)|pplication(?:Main|Load)|vailableWindowDepths|ll(?:MapTable(?:Values|Keys)|HashTableObjects|ocate(?:MemoryPages|Collectable|Object)))))(?:\\b)"},{token:["support.class.cocoa.leopard"],regex:"(?:\\b)(NS(?:RuleEditor|G(?:arbageCollector|radient)|MapTable|HashTable|Co(?:ndition|llectionView(?:Item)?)|T(?:oolbarItemGroup|extInputClient|r(?:eeNode|ackingArea))|InvocationOperation|Operation(?:Queue)?|D(?:ictionaryController|ockTile)|P(?:ointer(?:Functions|Array)|athC(?:o(?:ntrol(?:Delegate)?|mponentCell)|ell(?:Delegate)?)|r(?:intPanelAccessorizing|edicateEditor(?:RowTemplate)?))|ViewController|FastEnumeration|Animat(?:ionContext|ablePropertyContainer)))(?:\\b)"},{token:["support.class.cocoa"],regex:"(?:\\b)(NS(?:R(?:u(?:nLoop|ler(?:Marker|View))|e(?:sponder|cursiveLock|lativeSpecifier)|an(?:domSpecifier|geSpecifier))|G(?:etCommand|lyph(?:Generator|Storage|Info)|raphicsContext)|XML(?:Node|D(?:ocument|TD(?:Node)?)|Parser|Element)|M(?:iddleSpecifier|ov(?:ie(?:View)?|eCommand)|utable(?:S(?:tring|et)|C(?:haracterSet|opying)|IndexSet|D(?:ictionary|ata)|URLRequest|ParagraphStyle|A(?:ttributedString|rray))|e(?:ssagePort(?:NameServer)?|nu(?:Item(?:Cell)?|View)?|t(?:hodSignature|adata(?:Item|Query(?:ResultGroup|AttributeValueTuple)?)))|a(?:ch(?:BootstrapServer|Port)|trix))|B(?:itmapImageRep|ox|u(?:ndle|tton(?:Cell)?)|ezierPath|rowser(?:Cell)?)|S(?:hadow|c(?:anner|r(?:ipt(?:SuiteRegistry|C(?:o(?:ercionHandler|mmand(?:Description)?)|lassDescription)|ObjectSpecifier|ExecutionContext|WhoseTest)|oll(?:er|View)|een))|t(?:epper(?:Cell)?|atus(?:Bar|Item)|r(?:ing|eam))|imple(?:HorizontalTypesetter|CString)|o(?:cketPort(?:NameServer)?|und|rtDescriptor)|p(?:e(?:cifierTest|ech(?:Recognizer|Synthesizer)|ll(?:Server|Checker))|litView)|e(?:cureTextField(?:Cell)?|t(?:Command)?|archField(?:Cell)?|rializer|gmentedC(?:ontrol|ell))|lider(?:Cell)?|avePanel)|H(?:ost|TTP(?:Cookie(?:Storage)?|URLResponse)|elpManager)|N(?:ib(?:Con(?:nector|trolConnector)|OutletConnector)?|otification(?:Center|Queue)?|u(?:ll|mber(?:Formatter)?)|etService(?:Browser)?|ameSpecifier)|C(?:ha(?:ngeSpelling|racterSet)|o(?:n(?:stantString|nection|trol(?:ler)?|ditionLock)|d(?:ing|er)|unt(?:Command|edSet)|pying|lor(?:Space|P(?:ick(?:ing(?:Custom|Default)|er)|anel)|Well|List)?|m(?:p(?:oundPredicate|arisonPredicate)|boBox(?:Cell)?))|u(?:stomImageRep|rsor)|IImageRep|ell|l(?:ipView|o(?:seCommand|neCommand)|assDescription)|a(?:ched(?:ImageRep|URLResponse)|lendar(?:Date)?)|reateCommand)|T(?:hread|ypesetter|ime(?:Zone|r)|o(?:olbar(?:Item(?:Validations)?)?|kenField(?:Cell)?)|ext(?:Block|Storage|Container|Tab(?:le(?:Block)?)?|Input|View|Field(?:Cell)?|List|Attachment(?:Cell)?)?|a(?:sk|b(?:le(?:Header(?:Cell|View)|Column|View)|View(?:Item)?))|reeController)|I(?:n(?:dex(?:S(?:pecifier|et)|Path)|put(?:Manager|S(?:tream|erv(?:iceProvider|er(?:MouseTracker)?)))|vocation)|gnoreMisspelledWords|mage(?:Rep|Cell|View)?)|O(?:ut(?:putStream|lineView)|pen(?:GL(?:Context|Pixel(?:Buffer|Format)|View)|Panel)|bj(?:CTypeSerializationCallBack|ect(?:Controller)?))|D(?:i(?:st(?:antObject(?:Request)?|ributed(?:NotificationCenter|Lock))|ctionary|rectoryEnumerator)|ocument(?:Controller)?|e(?:serializer|cimalNumber(?:Behaviors|Handler)?|leteCommand)|at(?:e(?:Components|Picker(?:Cell)?|Formatter)?|a)|ra(?:wer|ggingInfo))|U(?:ser(?:InterfaceValidations|Defaults(?:Controller)?)|RL(?:Re(?:sponse|quest)|Handle(?:Client)?|C(?:onnection|ache|redential(?:Storage)?)|Download(?:Delegate)?|Prot(?:ocol(?:Client)?|ectionSpace)|AuthenticationChallenge(?:Sender)?)?|n(?:iqueIDSpecifier|doManager|archiver))|P(?:ipe|o(?:sitionalSpecifier|pUpButton(?:Cell)?|rt(?:Message|NameServer|Coder)?)|ICTImageRep|ersistentDocument|DFImageRep|a(?:steboard|nel|ragraphStyle|geLayout)|r(?:int(?:Info|er|Operation|Panel)|o(?:cessInfo|tocolChecker|perty(?:Specifier|ListSerialization)|gressIndicator|xy)|edicate))|E(?:numerator|vent|PSImageRep|rror|x(?:ception|istsCommand|pression))|V(?:iew(?:Animation)?|al(?:idated(?:ToobarItem|UserInterfaceItem)|ue(?:Transformer)?))|Keyed(?:Unarchiver|Archiver)|Qui(?:ckDrawView|tCommand)|F(?:ile(?:Manager|Handle|Wrapper)|o(?:nt(?:Manager|Descriptor|Panel)?|rm(?:Cell|atter)))|W(?:hoseSpecifier|indow(?:Controller)?|orkspace)|L(?:o(?:c(?:k(?:ing)?|ale)|gicalTest)|evelIndicator(?:Cell)?|ayoutManager)|A(?:ssertionHandler|nimation|ctionCell|ttributedString|utoreleasePool|TSTypesetter|ppl(?:ication|e(?:Script|Event(?:Manager|Descriptor)))|ffineTransform|lert|r(?:chiver|ray(?:Controller)?))))(?:\\b)"},{token:["support.type.cocoa.leopard"],regex:"(?:\\b)(NS(?:R(?:u(?:nLoop|ler(?:Marker|View))|e(?:sponder|cursiveLock|lativeSpecifier)|an(?:domSpecifier|geSpecifier))|G(?:etCommand|lyph(?:Generator|Storage|Info)|raphicsContext)|XML(?:Node|D(?:ocument|TD(?:Node)?)|Parser|Element)|M(?:iddleSpecifier|ov(?:ie(?:View)?|eCommand)|utable(?:S(?:tring|et)|C(?:haracterSet|opying)|IndexSet|D(?:ictionary|ata)|URLRequest|ParagraphStyle|A(?:ttributedString|rray))|e(?:ssagePort(?:NameServer)?|nu(?:Item(?:Cell)?|View)?|t(?:hodSignature|adata(?:Item|Query(?:ResultGroup|AttributeValueTuple)?)))|a(?:ch(?:BootstrapServer|Port)|trix))|B(?:itmapImageRep|ox|u(?:ndle|tton(?:Cell)?)|ezierPath|rowser(?:Cell)?)|S(?:hadow|c(?:anner|r(?:ipt(?:SuiteRegistry|C(?:o(?:ercionHandler|mmand(?:Description)?)|lassDescription)|ObjectSpecifier|ExecutionContext|WhoseTest)|oll(?:er|View)|een))|t(?:epper(?:Cell)?|atus(?:Bar|Item)|r(?:ing|eam))|imple(?:HorizontalTypesetter|CString)|o(?:cketPort(?:NameServer)?|und|rtDescriptor)|p(?:e(?:cifierTest|ech(?:Recognizer|Synthesizer)|ll(?:Server|Checker))|litView)|e(?:cureTextField(?:Cell)?|t(?:Command)?|archField(?:Cell)?|rializer|gmentedC(?:ontrol|ell))|lider(?:Cell)?|avePanel)|H(?:ost|TTP(?:Cookie(?:Storage)?|URLResponse)|elpManager)|N(?:ib(?:Con(?:nector|trolConnector)|OutletConnector)?|otification(?:Center|Queue)?|u(?:ll|mber(?:Formatter)?)|etService(?:Browser)?|ameSpecifier)|C(?:ha(?:ngeSpelling|racterSet)|o(?:n(?:stantString|nection|trol(?:ler)?|ditionLock)|d(?:ing|er)|unt(?:Command|edSet)|pying|lor(?:Space|P(?:ick(?:ing(?:Custom|Default)|er)|anel)|Well|List)?|m(?:p(?:oundPredicate|arisonPredicate)|boBox(?:Cell)?))|u(?:stomImageRep|rsor)|IImageRep|ell|l(?:ipView|o(?:seCommand|neCommand)|assDescription)|a(?:ched(?:ImageRep|URLResponse)|lendar(?:Date)?)|reateCommand)|T(?:hread|ypesetter|ime(?:Zone|r)|o(?:olbar(?:Item(?:Validations)?)?|kenField(?:Cell)?)|ext(?:Block|Storage|Container|Tab(?:le(?:Block)?)?|Input|View|Field(?:Cell)?|List|Attachment(?:Cell)?)?|a(?:sk|b(?:le(?:Header(?:Cell|View)|Column|View)|View(?:Item)?))|reeController)|I(?:n(?:dex(?:S(?:pecifier|et)|Path)|put(?:Manager|S(?:tream|erv(?:iceProvider|er(?:MouseTracker)?)))|vocation)|gnoreMisspelledWords|mage(?:Rep|Cell|View)?)|O(?:ut(?:putStream|lineView)|pen(?:GL(?:Context|Pixel(?:Buffer|Format)|View)|Panel)|bj(?:CTypeSerializationCallBack|ect(?:Controller)?))|D(?:i(?:st(?:antObject(?:Request)?|ributed(?:NotificationCenter|Lock))|ctionary|rectoryEnumerator)|ocument(?:Controller)?|e(?:serializer|cimalNumber(?:Behaviors|Handler)?|leteCommand)|at(?:e(?:Components|Picker(?:Cell)?|Formatter)?|a)|ra(?:wer|ggingInfo))|U(?:ser(?:InterfaceValidations|Defaults(?:Controller)?)|RL(?:Re(?:sponse|quest)|Handle(?:Client)?|C(?:onnection|ache|redential(?:Storage)?)|Download(?:Delegate)?|Prot(?:ocol(?:Client)?|ectionSpace)|AuthenticationChallenge(?:Sender)?)?|n(?:iqueIDSpecifier|doManager|archiver))|P(?:ipe|o(?:sitionalSpecifier|pUpButton(?:Cell)?|rt(?:Message|NameServer|Coder)?)|ICTImageRep|ersistentDocument|DFImageRep|a(?:steboard|nel|ragraphStyle|geLayout)|r(?:int(?:Info|er|Operation|Panel)|o(?:cessInfo|tocolChecker|perty(?:Specifier|ListSerialization)|gressIndicator|xy)|edicate))|E(?:numerator|vent|PSImageRep|rror|x(?:ception|istsCommand|pression))|V(?:iew(?:Animation)?|al(?:idated(?:ToobarItem|UserInterfaceItem)|ue(?:Transformer)?))|Keyed(?:Unarchiver|Archiver)|Qui(?:ckDrawView|tCommand)|F(?:ile(?:Manager|Handle|Wrapper)|o(?:nt(?:Manager|Descriptor|Panel)?|rm(?:Cell|atter)))|W(?:hoseSpecifier|indow(?:Controller)?|orkspace)|L(?:o(?:c(?:k(?:ing)?|ale)|gicalTest)|evelIndicator(?:Cell)?|ayoutManager)|A(?:ssertionHandler|nimation|ctionCell|ttributedString|utoreleasePool|TSTypesetter|ppl(?:ication|e(?:Script|Event(?:Manager|Descriptor)))|ffineTransform|lert|r(?:chiver|ray(?:Controller)?))))(?:\\b)"},{token:["support.class.quartz"],regex:"(?:\\b)(C(?:I(?:Sampler|Co(?:ntext|lor)|Image(?:Accumulator)?|PlugIn(?:Registration)?|Vector|Kernel|Filter(?:Generator|Shape)?)|A(?:Renderer|MediaTiming(?:Function)?|BasicAnimation|ScrollLayer|Constraint(?:LayoutManager)?|T(?:iledLayer|extLayer|rans(?:ition|action))|OpenGLLayer|PropertyAnimation|KeyframeAnimation|Layer|A(?:nimation(?:Group)?|ction))))(?:\\b)"},{token:["support.type.quartz"],regex:"(?:\\b)(C(?:G(?:Float|Point|Size|Rect)|IFormat|AConstraintAttribute))(?:\\b)"},{token:["support.type.cocoa"],regex:"(?:\\b)(NS(?:R(?:ect(?:Edge)?|ange)|G(?:lyph(?:Relation|LayoutMode)?|radientType)|M(?:odalSession|a(?:trixMode|p(?:Table|Enumerator)))|B(?:itmapImageFileType|orderType|uttonType|ezelStyle|ackingStoreType|rowserColumnResizingType)|S(?:cr(?:oll(?:er(?:Part|Arrow)|ArrowPosition)|eenAuxiliaryOpaque)|tringEncoding|ize|ocketNativeHandle|election(?:Granularity|Direction|Affinity)|wapped(?:Double|Float)|aveOperationType)|Ha(?:sh(?:Table|Enumerator)|ndler(?:2)?)|C(?:o(?:ntrol(?:Size|Tint)|mp(?:ositingOperation|arisonResult))|ell(?:State|Type|ImagePosition|Attribute))|T(?:hreadPrivate|ypesetterGlyphInfo|i(?:ckMarkPosition|tlePosition|meInterval)|o(?:ol(?:TipTag|bar(?:SizeMode|DisplayMode))|kenStyle)|IFFCompression|ext(?:TabType|Alignment)|ab(?:State|leViewDropOperation|ViewType)|rackingRectTag)|ImageInterpolation|Zone|OpenGL(?:ContextAuxiliary|PixelFormatAuxiliary)|D(?:ocumentChangeType|atePickerElementFlags|ra(?:werState|gOperation))|UsableScrollerParts|P(?:oint|r(?:intingPageOrder|ogressIndicator(?:Style|Th(?:ickness|readInfo))))|EventType|KeyValueObservingOptions|Fo(?:nt(?:SymbolicTraits|TraitMask|Action)|cusRingType)|W(?:indow(?:OrderingMode|Depth)|orkspace(?:IconCreationOptions|LaunchOptions)|ritingDirection)|L(?:ineBreakMode|ayout(?:Status|Direction))|A(?:nimation(?:Progress|Effect)|ppl(?:ication(?:TerminateReply|DelegateReply|PrintReply)|eEventManagerSuspensionID)|ffineTransformStruct|lertStyle)))(?:\\b)"},{token:["support.constant.cocoa"],regex:"(?:\\b)(NS(?:NotFound|Ordered(?:Ascending|Descending|Same)))(?:\\b)"},{token:["support.constant.notification.cocoa.leopard"],regex:"(?:\\b)(NS(?:MenuDidBeginTracking|ViewDidUpdateTrackingAreas)?Notification)(?:\\b)"},{token:["support.constant.notification.cocoa"],regex:"(?:\\b)(NS(?:Menu(?:Did(?:RemoveItem|SendAction|ChangeItem|EndTracking|AddItem)|WillSendAction)|S(?:ystemColorsDidChange|plitView(?:DidResizeSubviews|WillResizeSubviews))|C(?:o(?:nt(?:extHelpModeDid(?:Deactivate|Activate)|rolT(?:intDidChange|extDid(?:BeginEditing|Change|EndEditing)))|lor(?:PanelColorDidChange|ListDidChange)|mboBox(?:Selection(?:IsChanging|DidChange)|Will(?:Dismiss|PopUp)))|lassDescriptionNeededForClass)|T(?:oolbar(?:DidRemoveItem|WillAddItem)|ext(?:Storage(?:DidProcessEditing|WillProcessEditing)|Did(?:BeginEditing|Change|EndEditing)|View(?:DidChange(?:Selection|TypingAttributes)|WillChangeNotifyingTextView))|ableView(?:Selection(?:IsChanging|DidChange)|ColumnDid(?:Resize|Move)))|ImageRepRegistryDidChange|OutlineView(?:Selection(?:IsChanging|DidChange)|ColumnDid(?:Resize|Move)|Item(?:Did(?:Collapse|Expand)|Will(?:Collapse|Expand)))|Drawer(?:Did(?:Close|Open)|Will(?:Close|Open))|PopUpButton(?:CellWillPopUp|WillPopUp)|View(?:GlobalFrameDidChange|BoundsDidChange|F(?:ocusDidChange|rameDidChange))|FontSetChanged|W(?:indow(?:Did(?:Resi(?:ze|gn(?:Main|Key))|M(?:iniaturize|ove)|Become(?:Main|Key)|ChangeScreen(?:|Profile)|Deminiaturize|Update|E(?:ndSheet|xpose))|Will(?:M(?:iniaturize|ove)|BeginSheet|Close))|orkspace(?:SessionDid(?:ResignActive|BecomeActive)|Did(?:Mount|TerminateApplication|Unmount|PerformFileOperation|Wake|LaunchApplication)|Will(?:Sleep|Unmount|PowerOff|LaunchApplication)))|A(?:ntialiasThresholdChanged|ppl(?:ication(?:Did(?:ResignActive|BecomeActive|Hide|ChangeScreenParameters|U(?:nhide|pdate)|FinishLaunching)|Will(?:ResignActive|BecomeActive|Hide|Terminate|U(?:nhide|pdate)|FinishLaunching))|eEventManagerWillProcessFirstEvent)))Notification)(?:\\b)"},{token:["support.constant.cocoa.leopard"],regex:"(?:\\b)(NS(?:RuleEditor(?:RowType(?:Simple|Compound)|NestingMode(?:Si(?:ngle|mple)|Compound|List))|GradientDraws(?:BeforeStartingLocation|AfterEndingLocation)|M(?:inusSetExpressionType|a(?:chPortDeallocate(?:ReceiveRight|SendRight|None)|pTable(?:StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality)))|B(?:oxCustom|undleExecutableArchitecture(?:X86|I386|PPC(?:64)?)|etweenPredicateOperatorType|ackgroundStyle(?:Raised|Dark|L(?:ight|owered)))|S(?:tring(?:DrawingTruncatesLastVisibleLine|EncodingConversion(?:ExternalRepresentation|AllowLossy))|ubqueryExpressionType|p(?:e(?:ech(?:SentenceBoundary|ImmediateBoundary|WordBoundary)|llingState(?:GrammarFlag|SpellingFlag))|litViewDividerStyleThi(?:n|ck))|e(?:rvice(?:RequestTimedOutError|M(?:iscellaneousError|alformedServiceDictionaryError)|InvalidPasteboardDataError|ErrorM(?:inimum|aximum)|Application(?:NotFoundError|LaunchFailedError))|gmentStyle(?:Round(?:Rect|ed)|SmallSquare|Capsule|Textured(?:Rounded|Square)|Automatic)))|H(?:UDWindowMask|ashTable(?:StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality))|N(?:oModeColorPanel|etServiceNoAutoRename)|C(?:hangeRedone|o(?:ntainsPredicateOperatorType|l(?:orRenderingIntent(?:RelativeColorimetric|Saturation|Default|Perceptual|AbsoluteColorimetric)|lectorDisabledOption))|ellHit(?:None|ContentArea|TrackableArea|EditableTextArea))|T(?:imeZoneNameStyle(?:S(?:hort(?:Standard|DaylightSaving)|tandard)|DaylightSaving)|extFieldDatePickerStyle|ableViewSelectionHighlightStyle(?:Regular|SourceList)|racking(?:Mouse(?:Moved|EnteredAndExited)|CursorUpdate|InVisibleRect|EnabledDuringMouseDrag|A(?:ssumeInside|ctive(?:In(?:KeyWindow|ActiveApp)|WhenFirstResponder|Always))))|I(?:n(?:tersectSetExpressionType|dexedColorSpaceModel)|mageScale(?:None|Proportionally(?:Down|UpOrDown)|AxesIndependently))|Ope(?:nGLPFAAllowOfflineRenderers|rationQueue(?:DefaultMaxConcurrentOperationCount|Priority(?:High|Normal|Very(?:High|Low)|Low)))|D(?:iacriticInsensitiveSearch|ownloadsDirectory)|U(?:nionSetExpressionType|TF(?:16(?:BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)|32(?:BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)))|P(?:ointerFunctions(?:Ma(?:chVirtualMemory|llocMemory)|Str(?:ongMemory|uctPersonality)|C(?:StringPersonality|opyIn)|IntegerPersonality|ZeroingWeakMemory|O(?:paque(?:Memory|Personality)|bjectP(?:ointerPersonality|ersonality)))|at(?:hStyle(?:Standard|NavigationBar|PopUp)|ternColorSpaceModel)|rintPanelShows(?:Scaling|Copies|Orientation|P(?:a(?:perSize|ge(?:Range|SetupAccessory))|review)))|Executable(?:RuntimeMismatchError|NotLoadableError|ErrorM(?:inimum|aximum)|L(?:inkError|oadError)|ArchitectureMismatchError)|KeyValueObservingOption(?:Initial|Prior)|F(?:i(?:ndPanelSubstringMatchType(?:StartsWith|Contains|EndsWith|FullWord)|leRead(?:TooLargeError|UnknownStringEncodingError))|orcedOrderingSearch)|Wi(?:ndow(?:BackingLocation(?:MainMemory|Default|VideoMemory)|Sharing(?:Read(?:Only|Write)|None)|CollectionBehavior(?:MoveToActiveSpace|CanJoinAllSpaces|Default))|dthInsensitiveSearch)|AggregateExpressionType))(?:\\b)"},{token:["support.constant.cocoa"],regex:"(?:\\b)(NS(?:R(?:GB(?:ModeColorPanel|ColorSpaceModel)|ight(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|T(?:ext(?:Movement|Alignment)|ab(?:sBezelBorder|StopType))|ArrowFunctionKey)|ound(?:RectBezelStyle|Bankers|ed(?:BezelStyle|TokenStyle|DisclosureBezelStyle)|Down|Up|Plain|Line(?:CapStyle|JoinStyle))|un(?:StoppedResponse|ContinuesResponse|AbortedResponse)|e(?:s(?:izableWindowMask|et(?:CursorRectsRunLoopOrdering|FunctionKey))|ce(?:ssedBezelStyle|iver(?:sCantHandleCommandScriptError|EvaluationScriptError))|turnTextMovement|doFunctionKey|quiredArgumentsMissingScriptError|l(?:evancyLevelIndicatorStyle|ative(?:Before|After))|gular(?:SquareBezelStyle|ControlSize)|moveTraitFontAction)|a(?:n(?:domSubelement|geDateMode)|tingLevelIndicatorStyle|dio(?:ModeMatrix|Button)))|G(?:IFFileType|lyph(?:Below|Inscribe(?:B(?:elow|ase)|Over(?:strike|Below)|Above)|Layout(?:WithPrevious|A(?:tAPoint|gainstAPoint))|A(?:ttribute(?:BidiLevel|Soft|Inscribe|Elastic)|bove))|r(?:ooveBorder|eaterThan(?:Comparison|OrEqualTo(?:Comparison|PredicateOperatorType)|PredicateOperatorType)|a(?:y(?:ModeColorPanel|ColorSpaceModel)|dient(?:None|Con(?:cave(?:Strong|Weak)|vex(?:Strong|Weak)))|phiteControlTint)))|XML(?:N(?:o(?:tationDeclarationKind|de(?:CompactEmptyElement|IsCDATA|OptionsNone|Use(?:SingleQuotes|DoubleQuotes)|Pre(?:serve(?:NamespaceOrder|C(?:haracterReferences|DATA)|DTD|Prefixes|E(?:ntities|mptyElements)|Quotes|Whitespace|A(?:ttributeOrder|ll))|ttyPrint)|ExpandEmptyElement))|amespaceKind)|CommentKind|TextKind|InvalidKind|D(?:ocument(?:X(?:MLKind|HTMLKind|Include)|HTMLKind|T(?:idy(?:XML|HTML)|extKind)|IncludeContentTypeDeclaration|Validate|Kind)|TDKind)|P(?:arser(?:GTRequiredError|XMLDeclNot(?:StartedError|FinishedError)|Mi(?:splaced(?:XMLDeclarationError|CDATAEndStringError)|xedContentDeclNot(?:StartedError|FinishedError))|S(?:t(?:andaloneValueError|ringNot(?:StartedError|ClosedError))|paceRequiredError|eparatorRequiredError)|N(?:MTOKENRequiredError|o(?:t(?:ationNot(?:StartedError|FinishedError)|WellBalancedError)|DTDError)|amespaceDeclarationError|AMERequiredError)|C(?:haracterRef(?:In(?:DTDError|PrologError|EpilogError)|AtEOFError)|o(?:nditionalSectionNot(?:StartedError|FinishedError)|mment(?:NotFinishedError|ContainsDoubleHyphenError))|DATANotFinishedError)|TagNameMismatchError|In(?:ternalError|valid(?:HexCharacterRefError|C(?:haracter(?:RefError|InEntityError|Error)|onditionalSectionError)|DecimalCharacterRefError|URIError|Encoding(?:NameError|Error)))|OutOfMemoryError|D(?:ocumentStartError|elegateAbortedParseError|OCTYPEDeclNotFinishedError)|U(?:RI(?:RequiredError|FragmentError)|n(?:declaredEntityError|parsedEntityError|knownEncodingError|finishedTagError))|P(?:CDATARequiredError|ublicIdentifierRequiredError|arsedEntityRef(?:MissingSemiError|NoNameError|In(?:Internal(?:SubsetError|Error)|PrologError|EpilogError)|AtEOFError)|r(?:ocessingInstructionNot(?:StartedError|FinishedError)|ematureDocumentEndError))|E(?:n(?:codingNotSupportedError|tity(?:Ref(?:In(?:DTDError|PrologError|EpilogError)|erence(?:MissingSemiError|WithoutNameError)|LoopError|AtEOFError)|BoundaryError|Not(?:StartedError|FinishedError)|Is(?:ParameterError|ExternalError)|ValueRequiredError))|qualExpectedError|lementContentDeclNot(?:StartedError|FinishedError)|xt(?:ernalS(?:tandaloneEntityError|ubsetNotFinishedError)|raContentError)|mptyDocumentError)|L(?:iteralNot(?:StartedError|FinishedError)|T(?:RequiredError|SlashRequiredError)|essThanSymbolInAttributeError)|Attribute(?:RedefinedError|HasNoValueError|Not(?:StartedError|FinishedError)|ListNot(?:StartedError|FinishedError)))|rocessingInstructionKind)|E(?:ntity(?:GeneralKind|DeclarationKind|UnparsedKind|P(?:ar(?:sedKind|ameterKind)|redefined))|lement(?:Declaration(?:MixedKind|UndefinedKind|E(?:lementKind|mptyKind)|Kind|AnyKind)|Kind))|Attribute(?:N(?:MToken(?:sKind|Kind)|otationKind)|CDATAKind|ID(?:Ref(?:sKind|Kind)|Kind)|DeclarationKind|En(?:tit(?:yKind|iesKind)|umerationKind)|Kind))|M(?:i(?:n(?:XEdge|iaturizableWindowMask|YEdge|uteCalendarUnit)|terLineJoinStyle|ddleSubelement|xedState)|o(?:nthCalendarUnit|deSwitchFunctionKey|use(?:Moved(?:Mask)?|E(?:ntered(?:Mask)?|ventSubtype|xited(?:Mask)?))|veToBezierPathElement|mentary(?:ChangeButton|Push(?:Button|InButton)|Light(?:Button)?))|enuFunctionKey|a(?:c(?:intoshInterfaceStyle|OSRomanStringEncoding)|tchesPredicateOperatorType|ppedRead|x(?:XEdge|YEdge))|ACHOperatingSystem)|B(?:MPFileType|o(?:ttomTabsBezelBorder|ldFontMask|rderlessWindowMask|x(?:Se(?:condary|parator)|OldStyle|Primary))|uttLineCapStyle|e(?:zelBorder|velLineJoinStyle|low(?:Bottom|Top)|gin(?:sWith(?:Comparison|PredicateOperatorType)|FunctionKey))|lueControlTint|ack(?:spaceCharacter|tabTextMovement|ingStore(?:Retained|Buffered|Nonretained)|TabCharacter|wardsSearch|groundTab)|r(?:owser(?:NoColumnResizing|UserColumnResizing|AutoColumnResizing)|eakFunctionKey))|S(?:h(?:ift(?:JISStringEncoding|KeyMask)|ow(?:ControlGlyphs|InvisibleGlyphs)|adowlessSquareBezelStyle)|y(?:s(?:ReqFunctionKey|tem(?:D(?:omainMask|efined(?:Mask)?)|FunctionKey))|mbolStringEncoding)|c(?:a(?:nnedOption|le(?:None|ToFit|Proportionally))|r(?:oll(?:er(?:NoPart|Increment(?:Page|Line|Arrow)|Decrement(?:Page|Line|Arrow)|Knob(?:Slot)?|Arrows(?:M(?:inEnd|axEnd)|None|DefaultSetting))|Wheel(?:Mask)?|LockFunctionKey)|eenChangedEventType))|t(?:opFunctionKey|r(?:ingDrawing(?:OneShot|DisableScreenFontSubstitution|Uses(?:DeviceMetrics|FontLeading|LineFragmentOrigin))|eam(?:Status(?:Reading|NotOpen|Closed|Open(?:ing)?|Error|Writing|AtEnd)|Event(?:Has(?:BytesAvailable|SpaceAvailable)|None|OpenCompleted|E(?:ndEncountered|rrorOccurred)))))|i(?:ngle(?:DateMode|UnderlineStyle)|ze(?:DownFontAction|UpFontAction))|olarisOperatingSystem|unOSOperatingSystem|pecialPageOrder|e(?:condCalendarUnit|lect(?:By(?:Character|Paragraph|Word)|i(?:ng(?:Next|Previous)|onAffinity(?:Downstream|Upstream))|edTab|FunctionKey)|gmentSwitchTracking(?:Momentary|Select(?:One|Any)))|quareLineCapStyle|witchButton|ave(?:ToOperation|Op(?:tions(?:Yes|No|Ask)|eration)|AsOperation)|mall(?:SquareBezelStyle|C(?:ontrolSize|apsFontMask)|IconButtonBezelStyle))|H(?:ighlightModeMatrix|SBModeColorPanel|o(?:ur(?:Minute(?:SecondDatePickerElementFlag|DatePickerElementFlag)|CalendarUnit)|rizontalRuler|meFunctionKey)|TTPCookieAcceptPolicy(?:Never|OnlyFromMainDocumentDomain|Always)|e(?:lp(?:ButtonBezelStyle|KeyMask|FunctionKey)|avierFontAction)|PUXOperatingSystem)|Year(?:MonthDa(?:yDatePickerElementFlag|tePickerElementFlag)|CalendarUnit)|N(?:o(?:n(?:StandardCharacterSetFontMask|ZeroWindingRule|activatingPanelMask|LossyASCIIStringEncoding)|Border|t(?:ification(?:SuspensionBehavior(?:Hold|Coalesce|D(?:eliverImmediately|rop))|NoCoalescing|CoalescingOn(?:Sender|Name)|DeliverImmediately|PostToAllSessions)|PredicateType|EqualToPredicateOperatorType)|S(?:cr(?:iptError|ollerParts)|ubelement|pecifierError)|CellMask|T(?:itle|opLevelContainersSpecifierError|abs(?:BezelBorder|NoBorder|LineBorder))|I(?:nterfaceStyle|mage)|UnderlineStyle|FontChangeAction)|u(?:ll(?:Glyph|CellType)|m(?:eric(?:Search|PadKeyMask)|berFormatter(?:Round(?:Half(?:Down|Up|Even)|Ceiling|Down|Up|Floor)|Behavior(?:10|Default)|S(?:cientificStyle|pellOutStyle)|NoStyle|CurrencyStyle|DecimalStyle|P(?:ercentStyle|ad(?:Before(?:Suffix|Prefix)|After(?:Suffix|Prefix))))))|e(?:t(?:Services(?:BadArgumentError|NotFoundError|C(?:ollisionError|ancelledError)|TimeoutError|InvalidError|UnknownError|ActivityInProgress)|workDomainMask)|wlineCharacter|xt(?:StepInterfaceStyle|FunctionKey))|EXTSTEPStringEncoding|a(?:t(?:iveShortGlyphPacking|uralTextAlignment)|rrowFontMask))|C(?:hange(?:ReadOtherContents|GrayCell(?:Mask)?|BackgroundCell(?:Mask)?|Cleared|Done|Undone|Autosaved)|MYK(?:ModeColorPanel|ColorSpaceModel)|ircular(?:BezelStyle|Slider)|o(?:n(?:stantValueExpressionType|t(?:inuousCapacityLevelIndicatorStyle|entsCellMask|ain(?:sComparison|erSpecifierError)|rol(?:Glyph|KeyMask))|densedFontMask)|lor(?:Panel(?:RGBModeMask|GrayModeMask|HSBModeMask|C(?:MYKModeMask|olorListModeMask|ustomPaletteModeMask|rayonModeMask)|WheelModeMask|AllModesMask)|ListModeColorPanel)|reServiceDirectory|m(?:p(?:osite(?:XOR|Source(?:In|O(?:ut|ver)|Atop)|Highlight|C(?:opy|lear)|Destination(?:In|O(?:ut|ver)|Atop)|Plus(?:Darker|Lighter))|ressedFontMask)|mandKeyMask))|u(?:stom(?:SelectorPredicateOperatorType|PaletteModeColorPanel)|r(?:sor(?:Update(?:Mask)?|PointingDevice)|veToBezierPathElement))|e(?:nterT(?:extAlignment|abStopType)|ll(?:State|H(?:ighlighted|as(?:Image(?:Horizontal|OnLeftOrBottom)|OverlappingImage))|ChangesContents|Is(?:Bordered|InsetButton)|Disabled|Editable|LightsBy(?:Gray|Background|Contents)|AllowsMixedState))|l(?:ipPagination|o(?:s(?:ePathBezierPathElement|ableWindowMask)|ckAndCalendarDatePickerStyle)|ear(?:ControlTint|DisplayFunctionKey|LineFunctionKey))|a(?:seInsensitive(?:Search|PredicateOption)|n(?:notCreateScriptCommandError|cel(?:Button|TextMovement))|chesDirectory|lculation(?:NoError|Overflow|DivideByZero|Underflow|LossOfPrecision)|rriageReturnCharacter)|r(?:itical(?:Request|AlertStyle)|ayonModeColorPanel))|T(?:hick(?:SquareBezelStyle|erSquareBezelStyle)|ypesetter(?:Behavior|HorizontalTabAction|ContainerBreakAction|ZeroAdvancementAction|OriginalBehavior|ParagraphBreakAction|WhitespaceAction|L(?:ineBreakAction|atestBehavior))|i(?:ckMark(?:Right|Below|Left|Above)|tledWindowMask|meZoneDatePickerElementFlag)|o(?:olbarItemVisibilityPriority(?:Standard|High|User|Low)|pTabsBezelBorder|ggleButton)|IFF(?:Compression(?:N(?:one|EXT)|CCITTFAX(?:3|4)|OldJPEG|JPEG|PackBits|LZW)|FileType)|e(?:rminate(?:Now|Cancel|Later)|xt(?:Read(?:InapplicableDocumentTypeError|WriteErrorM(?:inimum|aximum))|Block(?:M(?:i(?:nimum(?:Height|Width)|ddleAlignment)|a(?:rgin|ximum(?:Height|Width)))|B(?:o(?:ttomAlignment|rder)|aselineAlignment)|Height|TopAlignment|P(?:ercentageValueType|adding)|Width|AbsoluteValueType)|StorageEdited(?:Characters|Attributes)|CellType|ured(?:RoundedBezelStyle|BackgroundWindowMask|SquareBezelStyle)|Table(?:FixedLayoutAlgorithm|AutomaticLayoutAlgorithm)|Field(?:RoundedBezel|SquareBezel|AndStepperDatePickerStyle)|WriteInapplicableDocumentTypeError|ListPrependEnclosingMarker))|woByteGlyphPacking|ab(?:Character|TextMovement|le(?:tP(?:oint(?:Mask|EventSubtype)?|roximity(?:Mask|EventSubtype)?)|Column(?:NoResizing|UserResizingMask|AutoresizingMask)|View(?:ReverseSequentialColumnAutoresizingStyle|GridNone|S(?:olid(?:HorizontalGridLineMask|VerticalGridLineMask)|equentialColumnAutoresizingStyle)|NoColumnAutoresizing|UniformColumnAutoresizingStyle|FirstColumnOnlyAutoresizingStyle|LastColumnOnlyAutoresizingStyle)))|rackModeMatrix)|I(?:n(?:sert(?:CharFunctionKey|FunctionKey|LineFunctionKey)|t(?:Type|ernalS(?:criptError|pecifierError))|dexSubelement|validIndexSpecifierError|formational(?:Request|AlertStyle)|PredicateOperatorType)|talicFontMask|SO(?:2022JPStringEncoding|Latin(?:1StringEncoding|2StringEncoding))|dentityMappingCharacterCollection|llegalTextMovement|mage(?:R(?:ight|ep(?:MatchesDevice|LoadStatus(?:ReadingHeader|Completed|InvalidData|Un(?:expectedEOF|knownType)|WillNeedAllData)))|Below|C(?:ellType|ache(?:BySize|Never|Default|Always))|Interpolation(?:High|None|Default|Low)|O(?:nly|verlaps)|Frame(?:Gr(?:oove|ayBezel)|Button|None|Photo)|L(?:oadStatus(?:ReadError|C(?:ompleted|ancelled)|InvalidData|UnexpectedEOF)|eft)|A(?:lign(?:Right|Bottom(?:Right|Left)?|Center|Top(?:Right|Left)?|Left)|bove)))|O(?:n(?:State|eByteGlyphPacking|OffButton|lyScrollerArrows)|ther(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|TextMovement)|SF1OperatingSystem|pe(?:n(?:GL(?:GO(?:Re(?:setLibrary|tainRenderers)|ClearFormatCache|FormatCacheSize)|PFA(?:R(?:obust|endererID)|M(?:inimumPolicy|ulti(?:sample|Screen)|PSafe|aximumPolicy)|BackingStore|S(?:creenMask|te(?:ncilSize|reo)|ingleRenderer|upersample|ample(?:s|Buffers|Alpha))|NoRecovery|C(?:o(?:lor(?:Size|Float)|mpliant)|losestPolicy)|OffScreen|D(?:oubleBuffer|epthSize)|PixelBuffer|VirtualScreenCount|FullScreen|Window|A(?:cc(?:umSize|elerated)|ux(?:Buffers|DepthStencil)|l(?:phaSize|lRenderers))))|StepUnicodeReservedBase)|rationNotSupportedForKeyS(?:criptError|pecifierError))|ffState|KButton|rPredicateType|bjC(?:B(?:itfield|oolType)|S(?:hortType|tr(?:ingType|uctType)|electorType)|NoType|CharType|ObjectType|DoubleType|UnionType|PointerType|VoidType|FloatType|Long(?:Type|longType)|ArrayType))|D(?:i(?:s(?:c(?:losureBezelStyle|reteCapacityLevelIndicatorStyle)|playWindowRunLoopOrdering)|acriticInsensitivePredicateOption|rect(?:Selection|PredicateModifier))|o(?:c(?:ModalWindowMask|ument(?:Directory|ationDirectory))|ubleType|wn(?:TextMovement|ArrowFunctionKey))|e(?:s(?:cendingPageOrder|ktopDirectory)|cimalTabStopType|v(?:ice(?:NColorSpaceModel|IndependentModifierFlagsMask)|eloper(?:Directory|ApplicationDirectory))|fault(?:ControlTint|TokenStyle)|lete(?:Char(?:acter|FunctionKey)|FunctionKey|LineFunctionKey)|moApplicationDirectory)|a(?:yCalendarUnit|teFormatter(?:MediumStyle|Behavior(?:10|Default)|ShortStyle|NoStyle|FullStyle|LongStyle))|ra(?:wer(?:Clos(?:ingState|edState)|Open(?:ingState|State))|gOperation(?:Generic|Move|None|Copy|Delete|Private|Every|Link|All)))|U(?:ser(?:CancelledError|D(?:irectory|omainMask)|FunctionKey)|RL(?:Handle(?:NotLoaded|Load(?:Succeeded|InProgress|Failed))|CredentialPersistence(?:None|Permanent|ForSession))|n(?:scaledWindowMask|cachedRead|i(?:codeStringEncoding|talicFontMask|fiedTitleAndToolbarWindowMask)|d(?:o(?:CloseGroupingRunLoopOrdering|FunctionKey)|e(?:finedDateComponent|rline(?:Style(?:Single|None|Thick|Double)|Pattern(?:Solid|D(?:ot|ash(?:Dot(?:Dot)?)?)))))|known(?:ColorSpaceModel|P(?:ointingDevice|ageOrder)|KeyS(?:criptError|pecifierError))|boldFontMask)|tilityWindowMask|TF8StringEncoding|p(?:dateWindowsRunLoopOrdering|TextMovement|ArrowFunctionKey))|J(?:ustifiedTextAlignment|PEG(?:2000FileType|FileType)|apaneseEUC(?:GlyphPacking|StringEncoding))|P(?:o(?:s(?:t(?:Now|erFontMask|WhenIdle|ASAP)|iti(?:on(?:Replace|Be(?:fore|ginning)|End|After)|ve(?:IntType|DoubleType|FloatType)))|pUp(?:NoArrow|ArrowAt(?:Bottom|Center))|werOffEventType|rtraitOrientation)|NGFileType|ush(?:InCell(?:Mask)?|OnPushOffButton)|e(?:n(?:TipMask|UpperSideMask|PointingDevice|LowerSideMask)|riodic(?:Mask)?)|P(?:S(?:caleField|tatus(?:Title|Field)|aveButton)|N(?:ote(?:Title|Field)|ame(?:Title|Field))|CopiesField|TitleField|ImageButton|OptionsButton|P(?:a(?:perFeedButton|ge(?:Range(?:To|From)|ChoiceMatrix))|reviewButton)|LayoutButton)|lainTextTokenStyle|a(?:useFunctionKey|ragraphSeparatorCharacter|ge(?:DownFunctionKey|UpFunctionKey))|r(?:int(?:ing(?:ReplyLater|Success|Cancelled|Failure)|ScreenFunctionKey|erTable(?:NotFound|OK|Error)|FunctionKey)|o(?:p(?:ertyList(?:XMLFormat|MutableContainers(?:AndLeaves)?|BinaryFormat|Immutable|OpenStepFormat)|rietaryStringEncoding)|gressIndicator(?:BarStyle|SpinningStyle|Preferred(?:SmallThickness|Thickness|LargeThickness|AquaThickness)))|e(?:ssedTab|vFunctionKey))|L(?:HeightForm|CancelButton|TitleField|ImageButton|O(?:KButton|rientationMatrix)|UnitsButton|PaperNameButton|WidthForm))|E(?:n(?:terCharacter|d(?:sWith(?:Comparison|PredicateOperatorType)|FunctionKey))|v(?:e(?:nOddWindingRule|rySubelement)|aluatedObjectExpressionType)|qualTo(?:Comparison|PredicateOperatorType)|ra(?:serPointingDevice|CalendarUnit|DatePickerElementFlag)|x(?:clude(?:10|QuickDrawElementsIconCreationOption)|pandedFontMask|ecuteFunctionKey))|V(?:i(?:ew(?:M(?:in(?:XMargin|YMargin)|ax(?:XMargin|YMargin))|HeightSizable|NotSizable|WidthSizable)|aPanelFontAction)|erticalRuler|a(?:lidationErrorM(?:inimum|aximum)|riableExpressionType))|Key(?:SpecifierEvaluationScriptError|Down(?:Mask)?|Up(?:Mask)?|PathExpressionType|Value(?:MinusSetMutation|SetSetMutation|Change(?:Re(?:placement|moval)|Setting|Insertion)|IntersectSetMutation|ObservingOption(?:New|Old)|UnionSetMutation|ValidationError))|QTMovie(?:NormalPlayback|Looping(?:BackAndForthPlayback|Playback))|F(?:1(?:1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|7FunctionKey|i(?:nd(?:PanelAction(?:Replace(?:A(?:ndFind|ll(?:InSelection)?))?|S(?:howFindPanel|e(?:tFindString|lectAll(?:InSelection)?))|Next|Previous)|FunctionKey)|tPagination|le(?:Read(?:No(?:SuchFileError|PermissionError)|CorruptFileError|In(?:validFileNameError|applicableStringEncodingError)|Un(?:supportedSchemeError|knownError))|HandlingPanel(?:CancelButton|OKButton)|NoSuchFileError|ErrorM(?:inimum|aximum)|Write(?:NoPermissionError|In(?:validFileNameError|applicableStringEncodingError)|OutOfSpaceError|Un(?:supportedSchemeError|knownError))|LockingError)|xedPitchFontMask)|2(?:1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|o(?:nt(?:Mo(?:noSpaceTrait|dernSerifsClass)|BoldTrait|S(?:ymbolicClass|criptsClass|labSerifsClass|ansSerifClass)|C(?:o(?:ndensedTrait|llectionApplicationOnlyMask)|larendonSerifsClass)|TransitionalSerifsClass|I(?:ntegerAdvancementsRenderingMode|talicTrait)|O(?:ldStyleSerifsClass|rnamentalsClass)|DefaultRenderingMode|U(?:nknownClass|IOptimizedTrait)|Panel(?:S(?:hadowEffectModeMask|t(?:andardModesMask|rikethroughEffectModeMask)|izeModeMask)|CollectionModeMask|TextColorEffectModeMask|DocumentColorEffectModeMask|UnderlineEffectModeMask|FaceModeMask|All(?:ModesMask|EffectsModeMask))|ExpandedTrait|VerticalTrait|F(?:amilyClassMask|reeformSerifsClass)|Antialiased(?:RenderingMode|IntegerAdvancementsRenderingMode))|cusRing(?:Below|Type(?:None|Default|Exterior)|Only|Above)|urByteGlyphPacking|rm(?:attingError(?:M(?:inimum|aximum))?|FeedCharacter))|8FunctionKey|unction(?:ExpressionType|KeyMask)|3(?:1FunctionKey|2FunctionKey|3FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey)|9FunctionKey|4FunctionKey|P(?:RevertButton|S(?:ize(?:Title|Field)|etButton)|CurrentField|Preview(?:Button|Field))|l(?:oat(?:ingPointSamplesBitmapFormat|Type)|agsChanged(?:Mask)?)|axButton|5FunctionKey|6FunctionKey)|W(?:heelModeColorPanel|indow(?:s(?:NTOperatingSystem|CP125(?:1StringEncoding|2StringEncoding|3StringEncoding|4StringEncoding|0StringEncoding)|95(?:InterfaceStyle|OperatingSystem))|M(?:iniaturizeButton|ovedEventType)|Below|CloseButton|ToolbarButton|ZoomButton|Out|DocumentIconButton|ExposedEventType|Above)|orkspaceLaunch(?:NewInstance|InhibitingBackgroundOnly|Default|PreferringClassic|WithoutA(?:ctivation|ddingToRecents)|A(?:sync|nd(?:Hide(?:Others)?|Print)|llowingClassicStartup))|eek(?:day(?:CalendarUnit|OrdinalCalendarUnit)|CalendarUnit)|a(?:ntsBidiLevels|rningAlertStyle)|r(?:itingDirection(?:RightToLeft|Natural|LeftToRight)|apCalendarComponents))|L(?:i(?:stModeMatrix|ne(?:Moves(?:Right|Down|Up|Left)|B(?:order|reakBy(?:C(?:harWrapping|lipping)|Truncating(?:Middle|Head|Tail)|WordWrapping))|S(?:eparatorCharacter|weep(?:Right|Down|Up|Left))|ToBezierPathElement|DoesntMove|arSlider)|teralSearch|kePredicateOperatorType|ghterFontAction|braryDirectory)|ocalDomainMask|e(?:ssThan(?:Comparison|OrEqualTo(?:Comparison|PredicateOperatorType)|PredicateOperatorType)|ft(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|T(?:ext(?:Movement|Alignment)|ab(?:sBezelBorder|StopType))|ArrowFunctionKey))|a(?:yout(?:RightToLeft|NotDone|CantFit|OutOfGlyphs|Done|LeftToRight)|ndscapeOrientation)|ABColorSpaceModel)|A(?:sc(?:iiWithDoubleByteEUCGlyphPacking|endingPageOrder)|n(?:y(?:Type|PredicateModifier|EventMask)|choredSearch|imation(?:Blocking|Nonblocking(?:Threaded)?|E(?:ffect(?:DisappearingItemDefault|Poof)|ase(?:In(?:Out)?|Out))|Linear)|dPredicateType)|t(?:Bottom|tachmentCharacter|omicWrite|Top)|SCIIStringEncoding|d(?:obe(?:GB1CharacterCollection|CNS1CharacterCollection|Japan(?:1CharacterCollection|2CharacterCollection)|Korea1CharacterCollection)|dTraitFontAction|minApplicationDirectory)|uto(?:saveOperation|Pagination)|pp(?:lication(?:SupportDirectory|D(?:irectory|e(?:fined(?:Mask)?|legateReply(?:Success|Cancel|Failure)|activatedEventType))|ActivatedEventType)|KitDefined(?:Mask)?)|l(?:ternateKeyMask|pha(?:ShiftKeyMask|NonpremultipliedBitmapFormat|FirstBitmapFormat)|ert(?:SecondButtonReturn|ThirdButtonReturn|OtherReturn|DefaultReturn|ErrorReturn|FirstButtonReturn|AlternateReturn)|l(?:ScrollerParts|DomainsMask|PredicateModifier|LibrariesDirectory|ApplicationsDirectory))|rgument(?:sWrongScriptError|EvaluationScriptError)|bove(?:Bottom|Top)|WTEventType)))(?:\\b)" +},{token:"support.function.C99.c",regex:i.cFunctions},{token:r.getKeywords(),regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.section.scope.begin.objc",regex:"\\[",next:"bracketed_content"},{token:"meta.function.objc",regex:"^(?:-|\\+)\\s*"}],constant_NSString:[{token:"constant.character.escape.objc",regex:e},{token:"invalid.illegal.unknown-escape.objc",regex:"\\\\."},{token:"string",regex:'[^"\\\\]+'},{token:"punctuation.definition.string.end",regex:'"',next:"start"}],protocol_list:[{token:"punctuation.section.scope.end.objc",regex:">",next:"start"},{token:"support.other.protocol.objc",regex:"\bNS(?:GlyphStorage|M(?:utableCopying|enuItem)|C(?:hangeSpelling|o(?:ding|pying|lorPicking(?:Custom|Default)))|T(?:oolbarItemValidations|ext(?:Input|AttachmentCell))|I(?:nputServ(?:iceProvider|erMouseTracker)|gnoreMisspelledWords)|Obj(?:CTypeSerializationCallBack|ect)|D(?:ecimalNumberBehaviors|raggingInfo)|U(?:serInterfaceValidations|RL(?:HandleClient|DownloadDelegate|ProtocolClient|AuthenticationChallengeSender))|Validated(?:ToobarItem|UserInterfaceItem)|Locking)\b"}],selectors:[{token:"support.function.any-method.name-of-parameter.objc",regex:"\\b(?:[a-zA-Z_:][\\w]*)+"},{token:"punctuation",regex:"\\)",next:"start"}],bracketed_content:[{token:"punctuation.section.scope.end.objc",regex:"]",next:"start"},{token:["support.function.any-method.objc"],regex:"(?:predicateWithFormat:| NSPredicate predicateWithFormat:)",next:"start"},{token:"support.function.any-method.objc",regex:"\\w+(?::|(?=]))",next:"start"}],bracketed_strings:[{token:"punctuation.section.scope.end.objc",regex:"]",next:"start"},{token:"keyword.operator.logical.predicate.cocoa",regex:"\\b(?:AND|OR|NOT|IN)\\b"},{token:["invalid.illegal.unknown-method.objc","punctuation.separator.arguments.objc"],regex:"\\b(w+)(:)"},{regex:"\\b(?:ALL|ANY|SOME|NONE)\\b",token:"constant.language.predicate.cocoa"},{regex:"\\b(?:NULL|NIL|SELF|TRUE|YES|FALSE|NO|FIRST|LAST|SIZE)\\b",token:"constant.language.predicate.cocoa"},{regex:"\\b(?:MATCHES|CONTAINS|BEGINSWITH|ENDSWITH|BETWEEN)\\b",token:"keyword.operator.comparison.predicate.cocoa"},{regex:"\\bC(?:ASEINSENSITIVE|I)\\b",token:"keyword.other.modifier.predicate.cocoa"},{regex:"\\b(?:ANYKEY|SUBQUERY|CAST|TRUEPREDICATE|FALSEPREDICATE)\\b",token:"keyword.other.predicate.cocoa"},{regex:e,token:"constant.character.escape.objc"},{regex:"\\\\.",token:"invalid.illegal.unknown-escape.objc"},{token:"string",regex:'[^"\\\\]'},{token:"punctuation.definition.string.end.objc",regex:'"',next:"predicates"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],methods:[{token:"meta.function.objc",regex:"(?=\\{|#)|;",next:"start"}]};for(var l in n)this.$rules[l]?this.$rules[l].push&&this.$rules[l].push.apply(this.$rules[l],n[l]):this.$rules[l]=n[l];this.$rules.bracketed_content=this.$rules.bracketed_content.concat(this.$rules.start,t),this.embedRules(o,"doc-",[o.getEndRule("start")])};n.inherits(l,a),t.ObjectiveCHighlightRules=l}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,r){"use strict";var n=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};n.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,r){var n=e.getLine(r);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var o=this._getFoldWidgetBase(e,t,r);return!o&&this.startRegionRe.test(n)?"start":o},this.getFoldWidgetRange=function(e,t,r,n){var o=e.getLine(r);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,r);var i=o.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],r,a);var l=e.getCommentFoldRange(r,a+i[0].length,1);return l&&!l.isMultiLine()&&(n?l=this.getSectionRange(e,r):"all"!=t&&(l=null)),l}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],r,a):e.getCommentFoldRange(r,a,-1)}}},this.getSectionRange=function(e,t){var r=e.getLine(t),n=r.search(/\S/),i=t,a=r.length;t+=1;for(var l=t,c=e.getLength();++ts)break;var d=this.getFoldWidgetRange(e,"all",t);if(d){if(d.start.row<=i)break;if(d.isMultiLine())t=d.end.row;else if(n==s)break}l=t}}return new o(i,a,l,e.getLine(l).length)},this.getCommentRegionBlock=function(e,t,r){for(var n=t.search(/\s*$/),i=e.getLength(),a=r,l=/^\s*(?:\/\*|\/\/)#(end)?region\b/,c=1;++ra)return new o(a,n,d,t.length)}}.call(a.prototype)}),define("ace/mode/objectivec",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/objectivec_highlight_rules","ace/mode/folding/cstyle"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=e("./text").Mode,i=e("./objectivec_highlight_rules").ObjectiveCHighlightRules,a=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=i,this.foldingRules=new a};n.inherits(l,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/objectivec"}.call(l.prototype),t.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-ocaml.js b/www/js/vendor/ace/mode-ocaml.js index 482f33270..d999680d3 100755 --- a/www/js/vendor/ace/mode-ocaml.js +++ b/www/js/vendor/ace/mode-ocaml.js @@ -1,414 +1 @@ -define("ace/mode/ocaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var OcamlHighlightRules = function() { - - var keywords = ( - "and|as|assert|begin|class|constraint|do|done|downto|else|end|" + - "exception|external|for|fun|function|functor|if|in|include|" + - "inherit|initializer|lazy|let|match|method|module|mutable|new|" + - "object|of|open|or|private|rec|sig|struct|then|to|try|type|val|" + - "virtual|when|while|with" - ); - - var builtinConstants = ("true|false"); - - var builtinFunctions = ( - "abs|abs_big_int|abs_float|abs_num|abstract_tag|accept|access|acos|add|" + - "add_available_units|add_big_int|add_buffer|add_channel|add_char|" + - "add_initializer|add_int_big_int|add_interfaces|add_num|add_string|" + - "add_substitute|add_substring|alarm|allocated_bytes|allow_only|" + - "allow_unsafe_modules|always|append|appname_get|appname_set|" + - "approx_num_exp|approx_num_fix|arg|argv|arith_status|array|" + - "array1_of_genarray|array2_of_genarray|array3_of_genarray|asin|asr|" + - "assoc|assq|at_exit|atan|atan2|auto_synchronize|background|basename|" + - "beginning_of_input|big_int_of_int|big_int_of_num|big_int_of_string|bind|" + - "bind_class|bind_tag|bits|bits_of_float|black|blit|blit_image|blue|bool|" + - "bool_of_string|bounded_full_split|bounded_split|bounded_split_delim|" + - "bprintf|break|broadcast|bscanf|button_down|c_layout|capitalize|cardinal|" + - "cardinal|catch|catch_break|ceil|ceiling_num|channel|char|char_of_int|" + - "chdir|check|check_suffix|chmod|choose|chop_extension|chop_suffix|chown|" + - "chown|chr|chroot|classify_float|clear|clear_available_units|" + - "clear_close_on_exec|clear_graph|clear_nonblock|clear_parser|" + - "close|close|closeTk|close_box|close_graph|close_in|close_in_noerr|" + - "close_out|close_out_noerr|close_process|close_process|" + - "close_process_full|close_process_in|close_process_out|close_subwindow|" + - "close_tag|close_tbox|closedir|closedir|closure_tag|code|combine|" + - "combine|combine|command|compact|compare|compare_big_int|compare_num|" + - "complex32|complex64|concat|conj|connect|contains|contains_from|contents|" + - "copy|cos|cosh|count|count|counters|create|create_alarm|create_image|" + - "create_matrix|create_matrix|create_matrix|create_object|" + - "create_object_and_run_initializers|create_object_opt|create_process|" + - "create_process|create_process_env|create_process_env|create_table|" + - "current|current_dir_name|current_point|current_x|current_y|curveto|" + - "custom_tag|cyan|data_size|decr|decr_num|default_available_units|delay|" + - "delete_alarm|descr_of_in_channel|descr_of_out_channel|destroy|diff|dim|" + - "dim1|dim2|dim3|dims|dirname|display_mode|div|div_big_int|div_num|" + - "double_array_tag|double_tag|draw_arc|draw_char|draw_circle|draw_ellipse|" + - "draw_image|draw_poly|draw_poly_line|draw_rect|draw_segments|draw_string|" + - "dummy_pos|dummy_table|dump_image|dup|dup2|elements|empty|end_of_input|" + - "environment|eprintf|epsilon_float|eq_big_int|eq_num|equal|err_formatter|" + - "error_message|escaped|establish_server|executable_name|execv|execve|execvp|" + - "execvpe|exists|exists2|exit|exp|failwith|fast_sort|fchmod|fchown|field|" + - "file|file_exists|fill|fill_arc|fill_circle|fill_ellipse|fill_poly|fill_rect|" + - "filter|final_tag|finalise|find|find_all|first_chars|firstkey|flatten|" + - "float|float32|float64|float_of_big_int|float_of_bits|float_of_int|" + - "float_of_num|float_of_string|floor|floor_num|flush|flush_all|flush_input|" + - "flush_str_formatter|fold|fold_left|fold_left2|fold_right|fold_right2|" + - "for_all|for_all2|force|force_newline|force_val|foreground|fork|" + - "format_of_string|formatter_of_buffer|formatter_of_out_channel|" + - "fortran_layout|forward_tag|fprintf|frexp|from|from_channel|from_file|" + - "from_file_bin|from_function|from_string|fscanf|fst|fstat|ftruncate|" + - "full_init|full_major|full_split|gcd_big_int|ge_big_int|ge_num|" + - "genarray_of_array1|genarray_of_array2|genarray_of_array3|get|" + - "get_all_formatter_output_functions|get_approx_printing|get_copy|" + - "get_ellipsis_text|get_error_when_null_denominator|get_floating_precision|" + - "get_formatter_output_functions|get_formatter_tag_functions|get_image|" + - "get_margin|get_mark_tags|get_max_boxes|get_max_indent|get_method|" + - "get_method_label|get_normalize_ratio|get_normalize_ratio_when_printing|" + - "get_print_tags|get_state|get_variable|getcwd|getegid|getegid|getenv|" + - "getenv|getenv|geteuid|geteuid|getgid|getgid|getgrgid|getgrgid|getgrnam|" + - "getgrnam|getgroups|gethostbyaddr|gethostbyname|gethostname|getitimer|" + - "getlogin|getpeername|getpid|getppid|getprotobyname|getprotobynumber|" + - "getpwnam|getpwuid|getservbyname|getservbyport|getsockname|getsockopt|" + - "getsockopt_float|getsockopt_int|getsockopt_optint|gettimeofday|getuid|" + - "global_replace|global_substitute|gmtime|green|grid|group_beginning|" + - "group_end|gt_big_int|gt_num|guard|handle_unix_error|hash|hash_param|" + - "hd|header_size|i|id|ignore|in_channel_length|in_channel_of_descr|incr|" + - "incr_num|index|index_from|inet_addr_any|inet_addr_of_string|infinity|" + - "infix_tag|init|init_class|input|input_binary_int|input_byte|input_char|" + - "input_line|input_value|int|int16_signed|int16_unsigned|int32|int64|" + - "int8_signed|int8_unsigned|int_of_big_int|int_of_char|int_of_float|" + - "int_of_num|int_of_string|integer_num|inter|interactive|inv|invalid_arg|" + - "is_block|is_empty|is_implicit|is_int|is_int_big_int|is_integer_num|" + - "is_relative|iter|iter2|iteri|join|junk|key_pressed|kill|kind|kprintf|" + - "kscanf|land|last_chars|layout|lazy_from_fun|lazy_from_val|lazy_is_val|" + - "lazy_tag|ldexp|le_big_int|le_num|length|lexeme|lexeme_char|lexeme_end|" + - "lexeme_end_p|lexeme_start|lexeme_start_p|lineto|link|list|listen|lnot|" + - "loadfile|loadfile_private|localtime|lock|lockf|log|log10|logand|lognot|" + - "logor|logxor|lor|lower_window|lowercase|lseek|lsl|lsr|lstat|lt_big_int|" + - "lt_num|lxor|magenta|magic|mainLoop|major|major_slice|make|make_formatter|" + - "make_image|make_lexer|make_matrix|make_self_init|map|map2|map_file|mapi|" + - "marshal|match_beginning|match_end|matched_group|matched_string|max|" + - "max_array_length|max_big_int|max_elt|max_float|max_int|max_num|" + - "max_string_length|mem|mem_assoc|mem_assq|memq|merge|min|min_big_int|" + - "min_elt|min_float|min_int|min_num|minor|minus_big_int|minus_num|" + - "minus_one|mkdir|mkfifo|mktime|mod|mod_big_int|mod_float|mod_num|modf|" + - "mouse_pos|moveto|mul|mult_big_int|mult_int_big_int|mult_num|nan|narrow|" + - "nat_of_num|nativeint|neg|neg_infinity|new_block|new_channel|new_method|" + - "new_variable|next|nextkey|nice|nice|no_scan_tag|norm|norm2|not|npeek|" + - "nth|nth_dim|num_digits_big_int|num_dims|num_of_big_int|num_of_int|" + - "num_of_nat|num_of_ratio|num_of_string|O|obj|object_tag|ocaml_version|" + - "of_array|of_channel|of_float|of_int|of_int32|of_list|of_nativeint|" + - "of_string|one|openTk|open_box|open_connection|open_graph|open_hbox|" + - "open_hovbox|open_hvbox|open_in|open_in_bin|open_in_gen|open_out|" + - "open_out_bin|open_out_gen|open_process|open_process_full|open_process_in|" + - "open_process_out|open_subwindow|open_tag|open_tbox|open_temp_file|" + - "open_vbox|opendbm|opendir|openfile|or|os_type|out_channel_length|" + - "out_channel_of_descr|output|output_binary_int|output_buffer|output_byte|" + - "output_char|output_string|output_value|over_max_boxes|pack|params|" + - "parent_dir_name|parse|parse_argv|partition|pause|peek|pipe|pixels|" + - "place|plot|plots|point_color|polar|poll|pop|pos_in|pos_out|pow|" + - "power_big_int_positive_big_int|power_big_int_positive_int|" + - "power_int_positive_big_int|power_int_positive_int|power_num|" + - "pp_close_box|pp_close_tag|pp_close_tbox|pp_force_newline|" + - "pp_get_all_formatter_output_functions|pp_get_ellipsis_text|" + - "pp_get_formatter_output_functions|pp_get_formatter_tag_functions|" + - "pp_get_margin|pp_get_mark_tags|pp_get_max_boxes|pp_get_max_indent|" + - "pp_get_print_tags|pp_open_box|pp_open_hbox|pp_open_hovbox|pp_open_hvbox|" + - "pp_open_tag|pp_open_tbox|pp_open_vbox|pp_over_max_boxes|pp_print_as|" + - "pp_print_bool|pp_print_break|pp_print_char|pp_print_cut|pp_print_float|" + - "pp_print_flush|pp_print_if_newline|pp_print_int|pp_print_newline|" + - "pp_print_space|pp_print_string|pp_print_tab|pp_print_tbreak|" + - "pp_set_all_formatter_output_functions|pp_set_ellipsis_text|" + - "pp_set_formatter_out_channel|pp_set_formatter_output_functions|" + - "pp_set_formatter_tag_functions|pp_set_margin|pp_set_mark_tags|" + - "pp_set_max_boxes|pp_set_max_indent|pp_set_print_tags|pp_set_tab|" + - "pp_set_tags|pred|pred_big_int|pred_num|prerr_char|prerr_endline|" + - "prerr_float|prerr_int|prerr_newline|prerr_string|print|print_as|" + - "print_bool|print_break|print_char|print_cut|print_endline|print_float|" + - "print_flush|print_if_newline|print_int|print_newline|print_space|" + - "print_stat|print_string|print_tab|print_tbreak|printf|prohibit|" + - "public_method_label|push|putenv|quo_num|quomod_big_int|quote|raise|" + - "raise_window|ratio_of_num|rcontains_from|read|read_float|read_int|" + - "read_key|read_line|readdir|readdir|readlink|really_input|receive|recv|" + - "recvfrom|red|ref|regexp|regexp_case_fold|regexp_string|" + - "regexp_string_case_fold|register|register_exception|rem|remember_mode|" + - "remove|remove_assoc|remove_assq|rename|replace|replace_first|" + - "replace_matched|repr|reset|reshape|reshape_1|reshape_2|reshape_3|rev|" + - "rev_append|rev_map|rev_map2|rewinddir|rgb|rhs_end|rhs_end_pos|rhs_start|" + - "rhs_start_pos|rindex|rindex_from|rlineto|rmdir|rmoveto|round_num|" + - "run_initializers|run_initializers_opt|scanf|search_backward|" + - "search_forward|seek_in|seek_out|select|self|self_init|send|sendto|set|" + - "set_all_formatter_output_functions|set_approx_printing|" + - "set_binary_mode_in|set_binary_mode_out|set_close_on_exec|" + - "set_close_on_exec|set_color|set_ellipsis_text|" + - "set_error_when_null_denominator|set_field|set_floating_precision|" + - "set_font|set_formatter_out_channel|set_formatter_output_functions|" + - "set_formatter_tag_functions|set_line_width|set_margin|set_mark_tags|" + - "set_max_boxes|set_max_indent|set_method|set_nonblock|set_nonblock|" + - "set_normalize_ratio|set_normalize_ratio_when_printing|set_print_tags|" + - "set_signal|set_state|set_tab|set_tag|set_tags|set_text_size|" + - "set_window_title|setgid|setgid|setitimer|setitimer|setsid|setsid|" + - "setsockopt|setsockopt|setsockopt_float|setsockopt_float|setsockopt_int|" + - "setsockopt_int|setsockopt_optint|setsockopt_optint|setuid|setuid|" + - "shift_left|shift_left|shift_left|shift_right|shift_right|shift_right|" + - "shift_right_logical|shift_right_logical|shift_right_logical|show_buckets|" + - "shutdown|shutdown|shutdown_connection|shutdown_connection|sigabrt|" + - "sigalrm|sigchld|sigcont|sigfpe|sighup|sigill|sigint|sigkill|sign_big_int|" + - "sign_num|signal|signal|sigpending|sigpending|sigpipe|sigprocmask|" + - "sigprocmask|sigprof|sigquit|sigsegv|sigstop|sigsuspend|sigsuspend|" + - "sigterm|sigtstp|sigttin|sigttou|sigusr1|sigusr2|sigvtalrm|sin|singleton|" + - "sinh|size|size|size_x|size_y|sleep|sleep|sleep|slice_left|slice_left|" + - "slice_left_1|slice_left_2|slice_right|slice_right|slice_right_1|" + - "slice_right_2|snd|socket|socket|socket|socketpair|socketpair|sort|sound|" + - "split|split_delim|sprintf|sprintf|sqrt|sqrt|sqrt_big_int|square_big_int|" + - "square_num|sscanf|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|" + - "stable_sort|stat|stat|stat|stat|stat|stats|stats|std_formatter|stdbuf|" + - "stderr|stderr|stderr|stdib|stdin|stdin|stdin|stdout|stdout|stdout|" + - "str_formatter|string|string_after|string_before|string_match|" + - "string_of_big_int|string_of_bool|string_of_float|string_of_format|" + - "string_of_inet_addr|string_of_inet_addr|string_of_int|string_of_num|" + - "string_partial_match|string_tag|sub|sub|sub_big_int|sub_left|sub_num|" + - "sub_right|subset|subset|substitute_first|substring|succ|succ|" + - "succ|succ|succ_big_int|succ_num|symbol_end|symbol_end_pos|symbol_start|" + - "symbol_start_pos|symlink|symlink|sync|synchronize|system|system|system|" + - "tag|take|tan|tanh|tcdrain|tcdrain|tcflow|tcflow|tcflush|tcflush|" + - "tcgetattr|tcgetattr|tcsendbreak|tcsendbreak|tcsetattr|tcsetattr|" + - "temp_file|text_size|time|time|time|timed_read|timed_write|times|times|" + - "tl|tl|tl|to_buffer|to_channel|to_float|to_hex|to_int|to_int32|to_list|" + - "to_list|to_list|to_nativeint|to_string|to_string|to_string|to_string|" + - "to_string|top|top|total_size|transfer|transp|truncate|truncate|truncate|" + - "truncate|truncate|truncate|try_lock|umask|umask|uncapitalize|uncapitalize|" + - "uncapitalize|union|union|unit_big_int|unlink|unlink|unlock|unmarshal|" + - "unsafe_blit|unsafe_fill|unsafe_get|unsafe_get|unsafe_set|unsafe_set|" + - "update|uppercase|uppercase|uppercase|uppercase|usage|utimes|utimes|wait|" + - "wait|wait|wait|wait_next_event|wait_pid|wait_read|wait_signal|" + - "wait_timed_read|wait_timed_write|wait_write|waitpid|white|" + - "widen|window_id|word_size|wrap|wrap_abort|write|yellow|yield|zero|zero_big_int|" + - - "Arg|Arith_status|Array|Array1|Array2|Array3|ArrayLabels|Big_int|Bigarray|" + - "Buffer|Callback|CamlinternalOO|Char|Complex|Condition|Dbm|Digest|Dynlink|" + - "Event|Filename|Format|Gc|Genarray|Genlex|Graphics|GraphicsX11|Hashtbl|" + - "Int32|Int64|LargeFile|Lazy|Lexing|List|ListLabels|Make|Map|Marshal|" + - "MoreLabels|Mutex|Nativeint|Num|Obj|Oo|Parsing|Pervasives|Printexc|" + - "Printf|Queue|Random|Scanf|Scanning|Set|Sort|Stack|State|StdLabels|Str|" + - "Stream|String|StringLabels|Sys|Thread|ThreadUnix|Tk|Unix|UnixLabels|Weak" - ); - - var keywordMapper = this.createKeywordMapper({ - "variable.language": "this", - "keyword": keywords, - "constant.language": builtinConstants, - "support.function": builtinFunctions - }, "identifier"); - - var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; - var octInteger = "(?:0[oO]?[0-7]+)"; - var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; - var binInteger = "(?:0[bB][01]+)"; - var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; - - var exponent = "(?:[eE][+-]?\\d+)"; - var fraction = "(?:\\.\\d+)"; - var intPart = "(?:\\d+)"; - var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; - var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; - var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; - - this.$rules = { - "start" : [ - { - token : "comment", - regex : '\\(\\*.*?\\*\\)\\s*?$' - }, - { - token : "comment", - regex : '\\(\\*.*', - next : "comment" - }, - { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, - { - token : "string", // single char - regex : "'.'" - }, - { - token : "string", // " string - regex : '"', - next : "qstring" - }, - { - token : "constant.numeric", // imaginary - regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b" - }, - { - token : "constant.numeric", // float - regex : floatNumber - }, - { - token : "constant.numeric", // integer - regex : integer + "\\b" - }, - { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, - { - token : "keyword.operator", - regex : "\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|=" - }, - { - token : "paren.lparen", - regex : "[[({]" - }, - { - token : "paren.rparen", - regex : "[\\])}]" - }, - { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\)", - next : "start" - }, - { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - - "qstring" : [ - { - token : "string", - regex : '"', - next : "start" - }, { - token : "string", - regex : '.+' - } - ] - }; -}; - -oop.inherits(OcamlHighlightRules, TextHighlightRules); - -exports.OcamlHighlightRules = OcamlHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/ocaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ocaml_highlight_rules","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var OcamlHighlightRules = require("./ocaml_highlight_rules").OcamlHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = OcamlHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); -}; -oop.inherits(Mode, TextMode); - -var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|with))\s*$/; - -(function() { - - this.toggleCommentLines = function(state, doc, startRow, endRow) { - var i, line; - var outdent = true; - var re = /^\s*\(\*(.*)\*\)/; - - for (i=startRow; i<= endRow; i++) { - if (!re.test(doc.getLine(i))) { - outdent = false; - break; - } - } - - var range = new Range(0, 0, 0, 0); - for (i=startRow; i<= endRow; i++) { - line = doc.getLine(i); - range.start.row = i; - range.end.row = i; - range.end.column = line.length; - - doc.replace(range, outdent ? line.match(re)[1] : "(*" + line + "*)"); - } - }; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - - if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') && - state === 'start' && indenter.test(line)) - indent += tab; - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/ocaml"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/ocaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(t,e,_){"use strict";var n=t("../lib/oop"),i=t("./text_highlight_rules").TextHighlightRules,r=function(){var t="and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|object|of|open|or|private|rec|sig|struct|then|to|try|type|val|virtual|when|while|with",e="true|false",_="abs|abs_big_int|abs_float|abs_num|abstract_tag|accept|access|acos|add|add_available_units|add_big_int|add_buffer|add_channel|add_char|add_initializer|add_int_big_int|add_interfaces|add_num|add_string|add_substitute|add_substring|alarm|allocated_bytes|allow_only|allow_unsafe_modules|always|append|appname_get|appname_set|approx_num_exp|approx_num_fix|arg|argv|arith_status|array|array1_of_genarray|array2_of_genarray|array3_of_genarray|asin|asr|assoc|assq|at_exit|atan|atan2|auto_synchronize|background|basename|beginning_of_input|big_int_of_int|big_int_of_num|big_int_of_string|bind|bind_class|bind_tag|bits|bits_of_float|black|blit|blit_image|blue|bool|bool_of_string|bounded_full_split|bounded_split|bounded_split_delim|bprintf|break|broadcast|bscanf|button_down|c_layout|capitalize|cardinal|cardinal|catch|catch_break|ceil|ceiling_num|channel|char|char_of_int|chdir|check|check_suffix|chmod|choose|chop_extension|chop_suffix|chown|chown|chr|chroot|classify_float|clear|clear_available_units|clear_close_on_exec|clear_graph|clear_nonblock|clear_parser|close|close|closeTk|close_box|close_graph|close_in|close_in_noerr|close_out|close_out_noerr|close_process|close_process|close_process_full|close_process_in|close_process_out|close_subwindow|close_tag|close_tbox|closedir|closedir|closure_tag|code|combine|combine|combine|command|compact|compare|compare_big_int|compare_num|complex32|complex64|concat|conj|connect|contains|contains_from|contents|copy|cos|cosh|count|count|counters|create|create_alarm|create_image|create_matrix|create_matrix|create_matrix|create_object|create_object_and_run_initializers|create_object_opt|create_process|create_process|create_process_env|create_process_env|create_table|current|current_dir_name|current_point|current_x|current_y|curveto|custom_tag|cyan|data_size|decr|decr_num|default_available_units|delay|delete_alarm|descr_of_in_channel|descr_of_out_channel|destroy|diff|dim|dim1|dim2|dim3|dims|dirname|display_mode|div|div_big_int|div_num|double_array_tag|double_tag|draw_arc|draw_char|draw_circle|draw_ellipse|draw_image|draw_poly|draw_poly_line|draw_rect|draw_segments|draw_string|dummy_pos|dummy_table|dump_image|dup|dup2|elements|empty|end_of_input|environment|eprintf|epsilon_float|eq_big_int|eq_num|equal|err_formatter|error_message|escaped|establish_server|executable_name|execv|execve|execvp|execvpe|exists|exists2|exit|exp|failwith|fast_sort|fchmod|fchown|field|file|file_exists|fill|fill_arc|fill_circle|fill_ellipse|fill_poly|fill_rect|filter|final_tag|finalise|find|find_all|first_chars|firstkey|flatten|float|float32|float64|float_of_big_int|float_of_bits|float_of_int|float_of_num|float_of_string|floor|floor_num|flush|flush_all|flush_input|flush_str_formatter|fold|fold_left|fold_left2|fold_right|fold_right2|for_all|for_all2|force|force_newline|force_val|foreground|fork|format_of_string|formatter_of_buffer|formatter_of_out_channel|fortran_layout|forward_tag|fprintf|frexp|from|from_channel|from_file|from_file_bin|from_function|from_string|fscanf|fst|fstat|ftruncate|full_init|full_major|full_split|gcd_big_int|ge_big_int|ge_num|genarray_of_array1|genarray_of_array2|genarray_of_array3|get|get_all_formatter_output_functions|get_approx_printing|get_copy|get_ellipsis_text|get_error_when_null_denominator|get_floating_precision|get_formatter_output_functions|get_formatter_tag_functions|get_image|get_margin|get_mark_tags|get_max_boxes|get_max_indent|get_method|get_method_label|get_normalize_ratio|get_normalize_ratio_when_printing|get_print_tags|get_state|get_variable|getcwd|getegid|getegid|getenv|getenv|getenv|geteuid|geteuid|getgid|getgid|getgrgid|getgrgid|getgrnam|getgrnam|getgroups|gethostbyaddr|gethostbyname|gethostname|getitimer|getlogin|getpeername|getpid|getppid|getprotobyname|getprotobynumber|getpwnam|getpwuid|getservbyname|getservbyport|getsockname|getsockopt|getsockopt_float|getsockopt_int|getsockopt_optint|gettimeofday|getuid|global_replace|global_substitute|gmtime|green|grid|group_beginning|group_end|gt_big_int|gt_num|guard|handle_unix_error|hash|hash_param|hd|header_size|i|id|ignore|in_channel_length|in_channel_of_descr|incr|incr_num|index|index_from|inet_addr_any|inet_addr_of_string|infinity|infix_tag|init|init_class|input|input_binary_int|input_byte|input_char|input_line|input_value|int|int16_signed|int16_unsigned|int32|int64|int8_signed|int8_unsigned|int_of_big_int|int_of_char|int_of_float|int_of_num|int_of_string|integer_num|inter|interactive|inv|invalid_arg|is_block|is_empty|is_implicit|is_int|is_int_big_int|is_integer_num|is_relative|iter|iter2|iteri|join|junk|key_pressed|kill|kind|kprintf|kscanf|land|last_chars|layout|lazy_from_fun|lazy_from_val|lazy_is_val|lazy_tag|ldexp|le_big_int|le_num|length|lexeme|lexeme_char|lexeme_end|lexeme_end_p|lexeme_start|lexeme_start_p|lineto|link|list|listen|lnot|loadfile|loadfile_private|localtime|lock|lockf|log|log10|logand|lognot|logor|logxor|lor|lower_window|lowercase|lseek|lsl|lsr|lstat|lt_big_int|lt_num|lxor|magenta|magic|mainLoop|major|major_slice|make|make_formatter|make_image|make_lexer|make_matrix|make_self_init|map|map2|map_file|mapi|marshal|match_beginning|match_end|matched_group|matched_string|max|max_array_length|max_big_int|max_elt|max_float|max_int|max_num|max_string_length|mem|mem_assoc|mem_assq|memq|merge|min|min_big_int|min_elt|min_float|min_int|min_num|minor|minus_big_int|minus_num|minus_one|mkdir|mkfifo|mktime|mod|mod_big_int|mod_float|mod_num|modf|mouse_pos|moveto|mul|mult_big_int|mult_int_big_int|mult_num|nan|narrow|nat_of_num|nativeint|neg|neg_infinity|new_block|new_channel|new_method|new_variable|next|nextkey|nice|nice|no_scan_tag|norm|norm2|not|npeek|nth|nth_dim|num_digits_big_int|num_dims|num_of_big_int|num_of_int|num_of_nat|num_of_ratio|num_of_string|O|obj|object_tag|ocaml_version|of_array|of_channel|of_float|of_int|of_int32|of_list|of_nativeint|of_string|one|openTk|open_box|open_connection|open_graph|open_hbox|open_hovbox|open_hvbox|open_in|open_in_bin|open_in_gen|open_out|open_out_bin|open_out_gen|open_process|open_process_full|open_process_in|open_process_out|open_subwindow|open_tag|open_tbox|open_temp_file|open_vbox|opendbm|opendir|openfile|or|os_type|out_channel_length|out_channel_of_descr|output|output_binary_int|output_buffer|output_byte|output_char|output_string|output_value|over_max_boxes|pack|params|parent_dir_name|parse|parse_argv|partition|pause|peek|pipe|pixels|place|plot|plots|point_color|polar|poll|pop|pos_in|pos_out|pow|power_big_int_positive_big_int|power_big_int_positive_int|power_int_positive_big_int|power_int_positive_int|power_num|pp_close_box|pp_close_tag|pp_close_tbox|pp_force_newline|pp_get_all_formatter_output_functions|pp_get_ellipsis_text|pp_get_formatter_output_functions|pp_get_formatter_tag_functions|pp_get_margin|pp_get_mark_tags|pp_get_max_boxes|pp_get_max_indent|pp_get_print_tags|pp_open_box|pp_open_hbox|pp_open_hovbox|pp_open_hvbox|pp_open_tag|pp_open_tbox|pp_open_vbox|pp_over_max_boxes|pp_print_as|pp_print_bool|pp_print_break|pp_print_char|pp_print_cut|pp_print_float|pp_print_flush|pp_print_if_newline|pp_print_int|pp_print_newline|pp_print_space|pp_print_string|pp_print_tab|pp_print_tbreak|pp_set_all_formatter_output_functions|pp_set_ellipsis_text|pp_set_formatter_out_channel|pp_set_formatter_output_functions|pp_set_formatter_tag_functions|pp_set_margin|pp_set_mark_tags|pp_set_max_boxes|pp_set_max_indent|pp_set_print_tags|pp_set_tab|pp_set_tags|pred|pred_big_int|pred_num|prerr_char|prerr_endline|prerr_float|prerr_int|prerr_newline|prerr_string|print|print_as|print_bool|print_break|print_char|print_cut|print_endline|print_float|print_flush|print_if_newline|print_int|print_newline|print_space|print_stat|print_string|print_tab|print_tbreak|printf|prohibit|public_method_label|push|putenv|quo_num|quomod_big_int|quote|raise|raise_window|ratio_of_num|rcontains_from|read|read_float|read_int|read_key|read_line|readdir|readdir|readlink|really_input|receive|recv|recvfrom|red|ref|regexp|regexp_case_fold|regexp_string|regexp_string_case_fold|register|register_exception|rem|remember_mode|remove|remove_assoc|remove_assq|rename|replace|replace_first|replace_matched|repr|reset|reshape|reshape_1|reshape_2|reshape_3|rev|rev_append|rev_map|rev_map2|rewinddir|rgb|rhs_end|rhs_end_pos|rhs_start|rhs_start_pos|rindex|rindex_from|rlineto|rmdir|rmoveto|round_num|run_initializers|run_initializers_opt|scanf|search_backward|search_forward|seek_in|seek_out|select|self|self_init|send|sendto|set|set_all_formatter_output_functions|set_approx_printing|set_binary_mode_in|set_binary_mode_out|set_close_on_exec|set_close_on_exec|set_color|set_ellipsis_text|set_error_when_null_denominator|set_field|set_floating_precision|set_font|set_formatter_out_channel|set_formatter_output_functions|set_formatter_tag_functions|set_line_width|set_margin|set_mark_tags|set_max_boxes|set_max_indent|set_method|set_nonblock|set_nonblock|set_normalize_ratio|set_normalize_ratio_when_printing|set_print_tags|set_signal|set_state|set_tab|set_tag|set_tags|set_text_size|set_window_title|setgid|setgid|setitimer|setitimer|setsid|setsid|setsockopt|setsockopt|setsockopt_float|setsockopt_float|setsockopt_int|setsockopt_int|setsockopt_optint|setsockopt_optint|setuid|setuid|shift_left|shift_left|shift_left|shift_right|shift_right|shift_right|shift_right_logical|shift_right_logical|shift_right_logical|show_buckets|shutdown|shutdown|shutdown_connection|shutdown_connection|sigabrt|sigalrm|sigchld|sigcont|sigfpe|sighup|sigill|sigint|sigkill|sign_big_int|sign_num|signal|signal|sigpending|sigpending|sigpipe|sigprocmask|sigprocmask|sigprof|sigquit|sigsegv|sigstop|sigsuspend|sigsuspend|sigterm|sigtstp|sigttin|sigttou|sigusr1|sigusr2|sigvtalrm|sin|singleton|sinh|size|size|size_x|size_y|sleep|sleep|sleep|slice_left|slice_left|slice_left_1|slice_left_2|slice_right|slice_right|slice_right_1|slice_right_2|snd|socket|socket|socket|socketpair|socketpair|sort|sound|split|split_delim|sprintf|sprintf|sqrt|sqrt|sqrt_big_int|square_big_int|square_num|sscanf|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|stat|stat|stat|stat|stat|stats|stats|std_formatter|stdbuf|stderr|stderr|stderr|stdib|stdin|stdin|stdin|stdout|stdout|stdout|str_formatter|string|string_after|string_before|string_match|string_of_big_int|string_of_bool|string_of_float|string_of_format|string_of_inet_addr|string_of_inet_addr|string_of_int|string_of_num|string_partial_match|string_tag|sub|sub|sub_big_int|sub_left|sub_num|sub_right|subset|subset|substitute_first|substring|succ|succ|succ|succ|succ_big_int|succ_num|symbol_end|symbol_end_pos|symbol_start|symbol_start_pos|symlink|symlink|sync|synchronize|system|system|system|tag|take|tan|tanh|tcdrain|tcdrain|tcflow|tcflow|tcflush|tcflush|tcgetattr|tcgetattr|tcsendbreak|tcsendbreak|tcsetattr|tcsetattr|temp_file|text_size|time|time|time|timed_read|timed_write|times|times|tl|tl|tl|to_buffer|to_channel|to_float|to_hex|to_int|to_int32|to_list|to_list|to_list|to_nativeint|to_string|to_string|to_string|to_string|to_string|top|top|total_size|transfer|transp|truncate|truncate|truncate|truncate|truncate|truncate|try_lock|umask|umask|uncapitalize|uncapitalize|uncapitalize|union|union|unit_big_int|unlink|unlink|unlock|unmarshal|unsafe_blit|unsafe_fill|unsafe_get|unsafe_get|unsafe_set|unsafe_set|update|uppercase|uppercase|uppercase|uppercase|usage|utimes|utimes|wait|wait|wait|wait|wait_next_event|wait_pid|wait_read|wait_signal|wait_timed_read|wait_timed_write|wait_write|waitpid|white|widen|window_id|word_size|wrap|wrap_abort|write|yellow|yield|zero|zero_big_int|Arg|Arith_status|Array|Array1|Array2|Array3|ArrayLabels|Big_int|Bigarray|Buffer|Callback|CamlinternalOO|Char|Complex|Condition|Dbm|Digest|Dynlink|Event|Filename|Format|Gc|Genarray|Genlex|Graphics|GraphicsX11|Hashtbl|Int32|Int64|LargeFile|Lazy|Lexing|List|ListLabels|Make|Map|Marshal|MoreLabels|Mutex|Nativeint|Num|Obj|Oo|Parsing|Pervasives|Printexc|Printf|Queue|Random|Scanf|Scanning|Set|Sort|Stack|State|StdLabels|Str|Stream|String|StringLabels|Sys|Thread|ThreadUnix|Tk|Unix|UnixLabels|Weak",n=this.createKeywordMapper({"variable.language":"this",keyword:t,"constant.language":e,"support.function":_},"identifier"),i="(?:(?:[1-9]\\d*)|(?:0))",r="(?:0[oO]?[0-7]+)",a="(?:0[xX][\\dA-Fa-f]+)",o="(?:0[bB][01]+)",s="(?:"+i+"|"+r+"|"+a+"|"+o+")",l="(?:[eE][+-]?\\d+)",p="(?:\\.\\d+)",c="(?:\\d+)",g="(?:(?:"+c+"?"+p+")|(?:"+c+"\\.))",u="(?:(?:"+g+"|"+c+")"+l+")",m="(?:"+u+"|"+g+")";this.$rules={start:[{token:"comment",regex:"\\(\\*.*?\\*\\)\\s*?$"},{token:"comment",regex:"\\(\\*.*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"'.'"},{token:"string",regex:'"',next:"qstring"},{token:"constant.numeric",regex:"(?:"+m+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:m},{token:"constant.numeric",regex:s+"\\b"},{token:n,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|="},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\)",next:"start"},{token:"comment",regex:".+"}],qstring:[{token:"string",regex:'"',next:"start"},{token:"string",regex:".+"}]}};n.inherits(r,i),e.OcamlHighlightRules=r}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(t,e,_){"use strict";var n=t("../range").Range,i=function(){};(function(){this.checkOutdent=function(t,e){return!!/^\s+$/.test(t)&&/^\s*\}/.test(e)},this.autoOutdent=function(t,e){var _=t.getLine(e),i=_.match(/^(\s*\})/);if(!i)return 0;var r=i[1].length,a=t.findMatchingBracket({row:e,column:r});if(!a||a.row==e)return 0;var o=this.$getIndent(t.getLine(a.row));t.replace(new n(e,0,e,r-1),o)},this.$getIndent=function(t){return t.match(/^\s*/)[0]}}).call(i.prototype),e.MatchingBraceOutdent=i}),define("ace/mode/ocaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ocaml_highlight_rules","ace/mode/matching_brace_outdent","ace/range"],function(t,e,_){"use strict";var n=t("../lib/oop"),i=t("./text").Mode,r=t("./ocaml_highlight_rules").OcamlHighlightRules,a=t("./matching_brace_outdent").MatchingBraceOutdent,o=t("../range").Range,s=function(){this.HighlightRules=r,this.$outdent=new a};n.inherits(s,i);var l=/(?:[({[=:]|[-=]>|\b(?:else|try|with))\s*$/;(function(){this.toggleCommentLines=function(t,e,_,n){var i,r,a=!0,s=/^\s*\(\*(.*)\*\)/;for(i=_;i<=n;i++)if(!s.test(e.getLine(i))){a=!1;break}var l=new o(0,0,0,0);for(i=_;i<=n;i++)r=e.getLine(i),l.start.row=i,l.end.row=i,l.end.column=r.length,e.replace(l,a?r.match(s)[1]:"(*"+r+"*)")},this.getNextLineIndent=function(t,e,_){var n=this.$getIndent(e),i=this.getTokenizer().getLineTokens(e,t).tokens;return i.length&&"comment"===i[i.length-1].type||"start"!==t||!l.test(e)||(n+=_),n},this.checkOutdent=function(t,e,_){return this.$outdent.checkOutdent(e,_)},this.autoOutdent=function(t,e,_){this.$outdent.autoOutdent(e,_)},this.$id="ace/mode/ocaml"}).call(s.prototype),e.Mode=s}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-pascal.js b/www/js/vendor/ace/mode-pascal.js index 82262c1d7..0d8307a61 100755 --- a/www/js/vendor/ace/mode-pascal.js +++ b/www/js/vendor/ace/mode-pascal.js @@ -1,197 +1 @@ -define("ace/mode/pascal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var PascalHighlightRules = function() { - - this.$rules = { start: - [ { caseInsensitive: true, - token: 'keyword.control.pascal', - regex: '\\b(?:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|do|else|end|except|export|exports|external|far|file|finalization|finally|for|forward|goto|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|shl|shr|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor))\\b' }, - { caseInsensitive: true, - token: - [ 'variable.pascal', "text", - 'storage.type.prototype.pascal', - 'entity.name.function.prototype.pascal' ], - regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?(?=(?:\\(.*?\\))?;\\s*(?:attribute|forward|external))' }, - { caseInsensitive: true, - token: - [ 'variable.pascal', "text", - 'storage.type.function.pascal', - 'entity.name.function.pascal' ], - regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?' }, - { token: 'constant.numeric.pascal', - regex: '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b' }, - { token: 'punctuation.definition.comment.pascal', - regex: '--.*$', - push_: - [ { token: 'comment.line.double-dash.pascal.one', - regex: '$', - next: 'pop' }, - { defaultToken: 'comment.line.double-dash.pascal.one' } ] }, - { token: 'punctuation.definition.comment.pascal', - regex: '//.*$', - push_: - [ { token: 'comment.line.double-slash.pascal.two', - regex: '$', - next: 'pop' }, - { defaultToken: 'comment.line.double-slash.pascal.two' } ] }, - { token: 'punctuation.definition.comment.pascal', - regex: '\\(\\*', - push: - [ { token: 'punctuation.definition.comment.pascal', - regex: '\\*\\)', - next: 'pop' }, - { defaultToken: 'comment.block.pascal.one' } ] }, - { token: 'punctuation.definition.comment.pascal', - regex: '\\{', - push: - [ { token: 'punctuation.definition.comment.pascal', - regex: '\\}', - next: 'pop' }, - { defaultToken: 'comment.block.pascal.two' } ] }, - { token: 'punctuation.definition.string.begin.pascal', - regex: '"', - push: - [ { token: 'constant.character.escape.pascal', regex: '\\\\.' }, - { token: 'punctuation.definition.string.end.pascal', - regex: '"', - next: 'pop' }, - { defaultToken: 'string.quoted.double.pascal' } ], - }, - { token: 'punctuation.definition.string.begin.pascal', - regex: '\'', - push: - [ { token: 'constant.character.escape.apostrophe.pascal', - regex: '\'\'' }, - { token: 'punctuation.definition.string.end.pascal', - regex: '\'', - next: 'pop' }, - { defaultToken: 'string.quoted.single.pascal' } ] }, - { token: 'keyword.operator', - regex: '[+\\-;,/*%]|:=|=' } ] } - - this.normalizeRules(); -}; - -oop.inherits(PascalHighlightRules, TextHighlightRules); - -exports.PascalHighlightRules = PascalHighlightRules; -}); - -define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/pascal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pascal_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var PascalHighlightRules = require("./pascal_highlight_rules").PascalHighlightRules; -var FoldMode = require("./folding/coffee").FoldMode; - -var Mode = function() { - this.HighlightRules = PascalHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = ["--", "//"]; - this.blockComment = [ - {start: "(*", end: "*)"}, - {start: "{", end: "}"} - ]; - - this.$id = "ace/mode/pascal"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/pascal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{caseInsensitive:!0,token:"keyword.control.pascal",regex:"\\b(?:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|do|else|end|except|export|exports|external|far|file|finalization|finally|for|forward|goto|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|shl|shr|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor))\\b"},{caseInsensitive:!0,token:["variable.pascal","text","storage.type.prototype.pascal","entity.name.function.prototype.pascal"],regex:"\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?(?=(?:\\(.*?\\))?;\\s*(?:attribute|forward|external))"},{caseInsensitive:!0,token:["variable.pascal","text","storage.type.function.pascal","entity.name.function.pascal"],regex:"\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?"},{token:"constant.numeric.pascal",regex:"\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"punctuation.definition.comment.pascal",regex:"--.*$",push_:[{token:"comment.line.double-dash.pascal.one",regex:"$",next:"pop"},{defaultToken:"comment.line.double-dash.pascal.one"}]},{token:"punctuation.definition.comment.pascal",regex:"//.*$",push_:[{token:"comment.line.double-slash.pascal.two",regex:"$",next:"pop"},{defaultToken:"comment.line.double-slash.pascal.two"}]},{token:"punctuation.definition.comment.pascal",regex:"\\(\\*",push:[{token:"punctuation.definition.comment.pascal",regex:"\\*\\)",next:"pop"},{defaultToken:"comment.block.pascal.one"}]},{token:"punctuation.definition.comment.pascal",regex:"\\{",push:[{token:"punctuation.definition.comment.pascal",regex:"\\}",next:"pop"},{defaultToken:"comment.block.pascal.two"}]},{token:"punctuation.definition.string.begin.pascal",regex:'"',push:[{token:"constant.character.escape.pascal",regex:"\\\\."},{token:"punctuation.definition.string.end.pascal",regex:'"',next:"pop"},{defaultToken:"string.quoted.double.pascal"}]},{token:"punctuation.definition.string.begin.pascal",regex:"'",push:[{token:"constant.character.escape.apostrophe.pascal",regex:"''"},{token:"punctuation.definition.string.end.pascal",regex:"'",next:"pop"},{defaultToken:"string.quoted.single.pascal"}]},{token:"keyword.operator",regex:"[+\\-;,/*%]|:=|="}]},this.normalizeRules()};o.inherits(a,i),t.PascalHighlightRules=a}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var o=e("../../lib/oop"),i=e("./fold_mode").FoldMode,a=e("../../range").Range,r=t.FoldMode=function(){};o.inherits(r,i),function(){this.getFoldWidgetRange=function(e,t,n){var o=this.indentationBlock(e,n);if(o)return o;var i=/\S/,r=e.getLine(n),s=r.search(i);if(s!=-1&&"#"==r[s]){for(var l=r.length,c=e.getLength(),d=n,p=n;++nd){var g=e.getLine(p).length;return new a(d,l,p,g)}}},this.getFoldWidget=function(e,t,n){var o=e.getLine(n),i=o.search(/\S/),a=e.getLine(n+1),r=e.getLine(n-1),s=r.search(/\S/),l=a.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=s!=-1&&s>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)" - }, { - token : "comment", - regex : "#.*$" - }, { - token : "lparen", - regex : "[[({]" - }, { - token : "rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "qqstring" : [ - { - token : "string", - regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', - next : "start" - }, { - token : "string", - regex : '.+' - } - ], - "qstring" : [ - { - token : "string", - regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", - next : "start" - }, { - token : "string", - regex : '.+' - } - ], - "block_comment": [ - { - token: "comment.doc", - regex: "^=cut\\b", - next: "start" - }, - { - defaultToken: "comment.doc" - } - ] - }; -}; - -oop.inherits(PerlHighlightRules, TextHighlightRules); - -exports.PerlHighlightRules = PerlHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/perl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/perl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = PerlHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.foldingRules = new CStyleFoldMode({start: "^=(begin|item)\\b", end: "^=(cut)\\b"}); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "#"; - this.blockComment = [ - {start: "=begin", end: "=cut"}, - {start: "=item", end: "=cut"} - ]; - - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[\:]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/perl"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars",t="ARGV|ENV|INC|SIG",n="getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|getpeername|setpriority|getprotoent|setprotoent|getpriority|endprotoent|getservent|setservent|endservent|sethostent|socketpair|getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|map|die|uc|lc|do",r=this.createKeywordMapper({keyword:e,"constant.language":t,"support.function":n},"identifier");this.$rules={start:[{token:"comment.doc",regex:"^=(?:begin|item)\\b",next:"block_comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0x[0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"%#|\\$#|\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"},{token:"comment",regex:"#.*$"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}],block_comment:[{token:"comment.doc",regex:"^=cut\\b",next:"start"},{defaultToken:"comment.doc"}]}};r.inherits(o,i),t.PerlHighlightRules=o}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var o=i[1].length,s=e.findMatchingBracket({row:t,column:o});if(!s||s.row==t)return 0;var a=this.$getIndent(e.getLine(s.row));e.replace(new r(t,0,t,o-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,o),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var o=i.match(this.foldingStartMarker);if(o){var s=o.index;if(o[1])return this.openingBracketBlock(e,o[1],n,s);var a=e.getCommentFoldRange(n,s+o[0].length,1);return a&&!a.isMultiLine()&&(r?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t){var o=i.match(this.foldingStopMarker);if(o){var s=o.index+o[0].length;return o[1]?this.closingBracketBlock(e,o[1],n,s):e.getCommentFoldRange(n,s,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),o=t,s=n.length;t+=1;for(var a=t,g=e.getLength();++tc)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=o)break;if(l.isMultiLine())t=l.end.row;else if(r==c)break}a=t}}return new i(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/)#(end)?region\b/,g=1;++ns)return new i(s,r,l,t.length)}}.call(s.prototype)}),define("ace/mode/perl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/perl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,o=e("./perl_highlight_rules").PerlHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=(e("../range").Range,e("./folding/cstyle").FoldMode),g=function(){this.HighlightRules=o,this.$outdent=new s,this.foldingRules=new a({start:"^=(begin|item)\\b",end:"^=(cut)\\b"})};r.inherits(g,i),function(){this.lineCommentStart="#",this.blockComment=[{start:"=begin",end:"=cut"},{start:"=item",end:"=cut"}],this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),o=i.tokens;if(o.length&&"comment"==o[o.length-1].type)return r;if("start"==e){var s=t.match(/^.*[\{\(\[\:]\s*$/);s&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/perl"}.call(g.prototype),t.Mode=g}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-pgsql.js b/www/js/vendor/ace/mode-pgsql.js index 3c65e3796..f7a1d5d01 100755 --- a/www/js/vendor/ace/mode-pgsql.js +++ b/www/js/vendor/ace/mode-pgsql.js @@ -1,1374 +1,2 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var PerlHighlightRules = function() { - - var keywords = ( - "base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|" + - "no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars" - ); - - var buildinConstants = ("ARGV|ENV|INC|SIG"); - - var builtinFunctions = ( - "getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|" + - "gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|" + - "getpeername|setpriority|getprotoent|setprotoent|getpriority|" + - "endprotoent|getservent|setservent|endservent|sethostent|socketpair|" + - "getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|" + - "localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|" + - "closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|" + - "shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|" + - "dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|" + - "setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|" + - "lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|" + - "waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|" + - "chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|" + - "unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|" + - "length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|" + - "undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|" + - "sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|" + - "BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|" + - "join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|" + - "keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|" + - "eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|" + - "map|die|uc|lc|do" - ); - - var keywordMapper = this.createKeywordMapper({ - "keyword": keywords, - "constant.language": buildinConstants, - "support.function": builtinFunctions - }, "identifier"); - - this.$rules = { - "start" : [ - { - token : "comment.doc", - regex : "^=(?:begin|item)\\b", - next : "block_comment" - }, { - token : "string.regexp", - regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // multi line string start - regex : '["].*\\\\$', - next : "qqstring" - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "string", // multi line string start - regex : "['].*\\\\$", - next : "qstring" - }, { - token : "constant.numeric", // hex - regex : "0x[0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "%#|\\$#|\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)" - }, { - token : "comment", - regex : "#.*$" - }, { - token : "lparen", - regex : "[[({]" - }, { - token : "rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "qqstring" : [ - { - token : "string", - regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', - next : "start" - }, { - token : "string", - regex : '.+' - } - ], - "qstring" : [ - { - token : "string", - regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", - next : "start" - }, { - token : "string", - regex : '.+' - } - ], - "block_comment": [ - { - token: "comment.doc", - regex: "^=cut\\b", - next: "start" - }, - { - defaultToken: "comment.doc" - } - ] - }; -}; - -oop.inherits(PerlHighlightRules, TextHighlightRules); - -exports.PerlHighlightRules = PerlHighlightRules; -}); - -define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var PythonHighlightRules = function() { - - var keywords = ( - "and|as|assert|break|class|continue|def|del|elif|else|except|exec|" + - "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" + - "raise|return|try|while|with|yield" - ); - - var builtinConstants = ( - "True|False|None|NotImplemented|Ellipsis|__debug__" - ); - - var builtinFunctions = ( - "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" + - "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" + - "binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|" + - "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" + - "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" + - "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" + - "__import__|complex|hash|min|set|apply|delattr|help|next|setattr|" + - "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern" - ); - var keywordMapper = this.createKeywordMapper({ - "invalid.deprecated": "debugger", - "support.function": builtinFunctions, - "constant.language": builtinConstants, - "keyword": keywords - }, "identifier"); - - var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?"; - - var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; - var octInteger = "(?:0[oO]?[0-7]+)"; - var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; - var binInteger = "(?:0[bB][01]+)"; - var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; - - var exponent = "(?:[eE][+-]?\\d+)"; - var fraction = "(?:\\.\\d+)"; - var intPart = "(?:\\d+)"; - var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; - var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; - var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; - - var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; - - this.$rules = { - "start" : [ { - token : "comment", - regex : "#.*$" - }, { - token : "string", // multi line """ string start - regex : strPre + '"{3}', - next : "qqstring3" - }, { - token : "string", // " string - regex : strPre + '"(?=.)', - next : "qqstring" - }, { - token : "string", // multi line ''' string start - regex : strPre + "'{3}", - next : "qstring3" - }, { - token : "string", // ' string - regex : strPre + "'(?=.)", - next : "qstring" - }, { - token : "constant.numeric", // imaginary - regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b" - }, { - token : "constant.numeric", // float - regex : floatNumber - }, { - token : "constant.numeric", // long integer - regex : integer + "[lL]\\b" - }, { - token : "constant.numeric", // integer - regex : integer + "\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" - }, { - token : "paren.lparen", - regex : "[\\[\\(\\{]" - }, { - token : "paren.rparen", - regex : "[\\]\\)\\}]" - }, { - token : "text", - regex : "\\s+" - } ], - "qqstring3" : [ { - token : "constant.language.escape", - regex : stringEscape - }, { - token : "string", // multi line """ string end - regex : '"{3}', - next : "start" - }, { - defaultToken : "string" - } ], - "qstring3" : [ { - token : "constant.language.escape", - regex : stringEscape - }, { - token : "string", // multi line ''' string end - regex : "'{3}", - next : "start" - }, { - defaultToken : "string" - } ], - "qqstring" : [{ - token : "constant.language.escape", - regex : stringEscape - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "start" - }, { - defaultToken: "string" - }], - "qstring" : [{ - token : "constant.language.escape", - regex : stringEscape - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "start" - }, { - defaultToken: "string" - }] - }; -}; - -oop.inherits(PythonHighlightRules, TextHighlightRules); - -exports.PythonHighlightRules = PythonHighlightRules; -}); - -define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JsonHighlightRules = function() { - this.$rules = { - "start" : [ - { - token : "variable", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)' - }, { - token : "string", // single line - regex : '"', - next : "string" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : "invalid.illegal", // single quoted strings are not allowed - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "invalid.illegal", // comments are not allowed - regex : "\\/\\/.*$" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "string" : [ - { - token : "constant.language.escape", - regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/ - }, { - token : "string", - regex : '[^"\\\\]+' - }, { - token : "string", - regex : '"', - next : "start" - }, { - token : "string", - regex : "", - next : "start" - } - ] - }; - -}; - -oop.inherits(JsonHighlightRules, TextHighlightRules); - -exports.JsonHighlightRules = JsonHighlightRules; -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/pgsql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/perl_highlight_rules","ace/mode/python_highlight_rules","ace/mode/json_highlight_rules","ace/mode/javascript_highlight_rules"], function(require, exports, module) { - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules; -var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules; -var JsonHighlightRules = require("./json_highlight_rules").JsonHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; - -var PgsqlHighlightRules = function() { - var keywords = ( - "abort|absolute|abstime|access|aclitem|action|add|admin|after|aggregate|all|also|alter|always|" + - "analyse|analyze|and|any|anyarray|anyelement|anyenum|anynonarray|anyrange|array|as|asc|" + - "assertion|assignment|asymmetric|at|attribute|authorization|backward|before|begin|between|" + - "bigint|binary|bit|bool|boolean|both|box|bpchar|by|bytea|cache|called|cascade|cascaded|case|cast|" + - "catalog|chain|char|character|characteristics|check|checkpoint|cid|cidr|circle|class|close|" + - "cluster|coalesce|collate|collation|column|comment|comments|commit|committed|concurrently|" + - "configuration|connection|constraint|constraints|content|continue|conversion|copy|cost|" + - "create|cross|cstring|csv|current|current_catalog|current_date|current_role|" + - "current_schema|current_time|current_timestamp|current_user|cursor|cycle|data|database|" + - "date|daterange|day|deallocate|dec|decimal|declare|default|defaults|deferrable|deferred|" + - "definer|delete|delimiter|delimiters|desc|dictionary|disable|discard|distinct|do|document|" + - "domain|double|drop|each|else|enable|encoding|encrypted|end|enum|escape|event|event_trigger|" + - "except|exclude|excluding|exclusive|execute|exists|explain|extension|external|extract|false|" + - "family|fdw_handler|fetch|first|float|float4|float8|following|for|force|foreign|forward|" + - "freeze|from|full|function|functions|global|grant|granted|greatest|group|gtsvector|handler|" + - "having|header|hold|hour|identity|if|ilike|immediate|immutable|implicit|in|including|" + - "increment|index|indexes|inet|inherit|inherits|initially|inline|inner|inout|input|" + - "insensitive|insert|instead|int|int2|int2vector|int4|int4range|int8|int8range|integer|" + - "internal|intersect|interval|into|invoker|is|isnull|isolation|join|json|key|label|language|" + - "language_handler|large|last|lateral|lc_collate|lc_ctype|leading|leakproof|least|left|level|" + - "like|limit|line|listen|load|local|localtime|localtimestamp|location|lock|lseg|macaddr|" + - "mapping|match|materialized|maxvalue|minute|minvalue|mode|money|month|move|name|names|" + - "national|natural|nchar|next|no|none|not|nothing|notify|notnull|nowait|null|nullif|nulls|" + - "numeric|numrange|object|of|off|offset|oid|oids|oidvector|on|only|opaque|operator|option|" + - "options|or|order|out|outer|over|overlaps|overlay|owned|owner|parser|partial|partition|passing|" + - "password|path|pg_attribute|pg_auth_members|pg_authid|pg_class|pg_database|pg_node_tree|" + - "pg_proc|pg_type|placing|plans|point|polygon|position|preceding|precision|prepare|prepared|" + - "preserve|primary|prior|privileges|procedural|procedure|program|quote|range|read|real|" + - "reassign|recheck|record|recursive|ref|refcursor|references|refresh|regclass|regconfig|" + - "regdictionary|regoper|regoperator|regproc|regprocedure|regtype|reindex|relative|release|" + - "reltime|rename|repeatable|replace|replica|reset|restart|restrict|returning|returns|revoke|" + - "right|role|rollback|row|rows|rule|savepoint|schema|scroll|search|second|security|select|" + - "sequence|sequences|serializable|server|session|session_user|set|setof|share|show|similar|" + - "simple|smallint|smgr|snapshot|some|stable|standalone|start|statement|statistics|stdin|" + - "stdout|storage|strict|strip|substring|symmetric|sysid|system|table|tables|tablespace|temp|" + - "template|temporary|text|then|tid|time|timestamp|timestamptz|timetz|tinterval|to|trailing|" + - "transaction|treat|trigger|trim|true|truncate|trusted|tsquery|tsrange|tstzrange|tsvector|" + - "txid_snapshot|type|types|unbounded|uncommitted|unencrypted|union|unique|unknown|unlisten|" + - "unlogged|until|update|user|using|uuid|vacuum|valid|validate|validator|value|values|varbit|" + - "varchar|variadic|varying|verbose|version|view|void|volatile|when|where|whitespace|window|" + - "with|without|work|wrapper|write|xid|xml|xmlattributes|xmlconcat|xmlelement|xmlexists|" + - "xmlforest|xmlparse|xmlpi|xmlroot|xmlserialize|year|yes|zone" - ); - - - var builtinFunctions = ( - "RI_FKey_cascade_del|RI_FKey_cascade_upd|RI_FKey_check_ins|RI_FKey_check_upd|" + - "RI_FKey_noaction_del|RI_FKey_noaction_upd|RI_FKey_restrict_del|RI_FKey_restrict_upd|" + - "RI_FKey_setdefault_del|RI_FKey_setdefault_upd|RI_FKey_setnull_del|" + - "RI_FKey_setnull_upd|abbrev|abs|abstime|abstimeeq|abstimege|abstimegt|abstimein|abstimele|" + - "abstimelt|abstimene|abstimeout|abstimerecv|abstimesend|aclcontains|acldefault|" + - "aclexplode|aclinsert|aclitemeq|aclitemin|aclitemout|aclremove|acos|age|any_in|any_out|" + - "anyarray_in|anyarray_out|anyarray_recv|anyarray_send|anyelement_in|anyelement_out|" + - "anyenum_in|anyenum_out|anynonarray_in|anynonarray_out|anyrange_in|anyrange_out|" + - "anytextcat|area|areajoinsel|areasel|array_agg|array_agg_finalfn|array_agg_transfn|" + - "array_append|array_cat|array_dims|array_eq|array_fill|array_ge|array_gt|array_in|" + - "array_larger|array_le|array_length|array_lower|array_lt|array_ndims|array_ne|array_out|" + - "array_prepend|array_recv|array_remove|array_replace|array_send|array_smaller|" + - "array_to_json|array_to_string|array_typanalyze|array_upper|arraycontained|" + - "arraycontains|arraycontjoinsel|arraycontsel|arrayoverlap|ascii|ascii_to_mic|" + - "ascii_to_utf8|asin|atan|atan2|avg|big5_to_euc_tw|big5_to_mic|big5_to_utf8|bit_and|bit_in|" + - "bit_length|bit_or|bit_out|bit_recv|bit_send|bitand|bitcat|bitcmp|biteq|bitge|bitgt|bitle|" + - "bitlt|bitne|bitnot|bitor|bitshiftleft|bitshiftright|bittypmodin|bittypmodout|bitxor|bool|" + - "bool_and|bool_or|booland_statefunc|booleq|boolge|boolgt|boolin|boolle|boollt|boolne|" + - "boolor_statefunc|boolout|boolrecv|boolsend|box|box_above|box_above_eq|box_add|box_below|" + - "box_below_eq|box_center|box_contain|box_contain_pt|box_contained|box_distance|box_div|" + - "box_eq|box_ge|box_gt|box_in|box_intersect|box_le|box_left|box_lt|box_mul|box_out|" + - "box_overabove|box_overbelow|box_overlap|box_overleft|box_overright|box_recv|box_right|" + - "box_same|box_send|box_sub|bpchar_larger|bpchar_pattern_ge|bpchar_pattern_gt|" + - "bpchar_pattern_le|bpchar_pattern_lt|bpchar_smaller|bpcharcmp|bpchareq|bpcharge|" + - "bpchargt|bpchariclike|bpcharicnlike|bpcharicregexeq|bpcharicregexne|bpcharin|bpcharle|" + - "bpcharlike|bpcharlt|bpcharne|bpcharnlike|bpcharout|bpcharrecv|bpcharregexeq|" + - "bpcharregexne|bpcharsend|bpchartypmodin|bpchartypmodout|broadcast|btabstimecmp|" + - "btarraycmp|btbeginscan|btboolcmp|btbpchar_pattern_cmp|btbuild|btbuildempty|" + - "btbulkdelete|btcanreturn|btcharcmp|btcostestimate|btendscan|btfloat48cmp|btfloat4cmp|" + - "btfloat4sortsupport|btfloat84cmp|btfloat8cmp|btfloat8sortsupport|btgetbitmap|" + - "btgettuple|btinsert|btint24cmp|btint28cmp|btint2cmp|btint2sortsupport|btint42cmp|" + - "btint48cmp|btint4cmp|btint4sortsupport|btint82cmp|btint84cmp|btint8cmp|" + - "btint8sortsupport|btmarkpos|btnamecmp|btnamesortsupport|btoidcmp|btoidsortsupport|" + - "btoidvectorcmp|btoptions|btrecordcmp|btreltimecmp|btrescan|btrestrpos|btrim|" + - "bttext_pattern_cmp|bttextcmp|bttidcmp|bttintervalcmp|btvacuumcleanup|" + - "bytea_string_agg_finalfn|bytea_string_agg_transfn|byteacat|byteacmp|byteaeq|byteage|" + - "byteagt|byteain|byteale|bytealike|bytealt|byteane|byteanlike|byteaout|bytearecv|byteasend|" + - "cash_cmp|cash_div_cash|cash_div_flt4|cash_div_flt8|cash_div_int2|cash_div_int4|cash_eq|" + - "cash_ge|cash_gt|cash_in|cash_le|cash_lt|cash_mi|cash_mul_flt4|cash_mul_flt8|" + - "cash_mul_int2|cash_mul_int4|cash_ne|cash_out|cash_pl|cash_recv|cash_send|cash_words|" + - "cashlarger|cashsmaller|cbrt|ceil|ceiling|center|char|char_length|character_length|chareq|" + - "charge|chargt|charin|charle|charlt|charne|charout|charrecv|charsend|chr|cideq|cidin|cidout|" + - "cidr|cidr_in|cidr_out|cidr_recv|cidr_send|cidrecv|cidsend|circle|circle_above|" + - "circle_add_pt|circle_below|circle_center|circle_contain|circle_contain_pt|" + - "circle_contained|circle_distance|circle_div_pt|circle_eq|circle_ge|circle_gt|circle_in|" + - "circle_le|circle_left|circle_lt|circle_mul_pt|circle_ne|circle_out|circle_overabove|" + - "circle_overbelow|circle_overlap|circle_overleft|circle_overright|circle_recv|" + - "circle_right|circle_same|circle_send|circle_sub_pt|clock_timestamp|close_lb|close_ls|" + - "close_lseg|close_pb|close_pl|close_ps|close_sb|close_sl|col_description|concat|concat_ws|" + - "contjoinsel|contsel|convert|convert_from|convert_to|corr|cos|cot|count|covar_pop|" + - "covar_samp|cstring_in|cstring_out|cstring_recv|cstring_send|cume_dist|current_database|" + - "current_query|current_schema|current_schemas|current_setting|current_user|currtid|" + - "currtid2|currval|cursor_to_xml|cursor_to_xmlschema|database_to_xml|" + - "database_to_xml_and_xmlschema|database_to_xmlschema|date|date_cmp|date_cmp_timestamp|" + - "date_cmp_timestamptz|date_eq|date_eq_timestamp|date_eq_timestamptz|date_ge|" + - "date_ge_timestamp|date_ge_timestamptz|date_gt|date_gt_timestamp|date_gt_timestamptz|" + - "date_in|date_larger|date_le|date_le_timestamp|date_le_timestamptz|date_lt|" + - "date_lt_timestamp|date_lt_timestamptz|date_mi|date_mi_interval|date_mii|date_ne|" + - "date_ne_timestamp|date_ne_timestamptz|date_out|date_part|date_pl_interval|date_pli|" + - "date_recv|date_send|date_smaller|date_sortsupport|date_trunc|daterange|" + - "daterange_canonical|daterange_subdiff|datetime_pl|datetimetz_pl|dcbrt|decode|degrees|" + - "dense_rank|dexp|diagonal|diameter|dispell_init|dispell_lexize|dist_cpoly|dist_lb|dist_pb|" + - "dist_pc|dist_pl|dist_ppath|dist_ps|dist_sb|dist_sl|div|dlog1|dlog10|domain_in|domain_recv|" + - "dpow|dround|dsimple_init|dsimple_lexize|dsnowball_init|dsnowball_lexize|dsqrt|" + - "dsynonym_init|dsynonym_lexize|dtrunc|elem_contained_by_range|encode|enum_cmp|enum_eq|" + - "enum_first|enum_ge|enum_gt|enum_in|enum_larger|enum_last|enum_le|enum_lt|enum_ne|enum_out|" + - "enum_range|enum_recv|enum_send|enum_smaller|eqjoinsel|eqsel|euc_cn_to_mic|" + - "euc_cn_to_utf8|euc_jis_2004_to_shift_jis_2004|euc_jis_2004_to_utf8|euc_jp_to_mic|" + - "euc_jp_to_sjis|euc_jp_to_utf8|euc_kr_to_mic|euc_kr_to_utf8|euc_tw_to_big5|" + - "euc_tw_to_mic|euc_tw_to_utf8|event_trigger_in|event_trigger_out|every|exp|factorial|" + - "family|fdw_handler_in|fdw_handler_out|first_value|float4|float48div|float48eq|float48ge|" + - "float48gt|float48le|float48lt|float48mi|float48mul|float48ne|float48pl|float4_accum|" + - "float4abs|float4div|float4eq|float4ge|float4gt|float4in|float4larger|float4le|float4lt|" + - "float4mi|float4mul|float4ne|float4out|float4pl|float4recv|float4send|float4smaller|" + - "float4um|float4up|float8|float84div|float84eq|float84ge|float84gt|float84le|float84lt|" + - "float84mi|float84mul|float84ne|float84pl|float8_accum|float8_avg|float8_corr|" + - "float8_covar_pop|float8_covar_samp|float8_regr_accum|float8_regr_avgx|" + - "float8_regr_avgy|float8_regr_intercept|float8_regr_r2|float8_regr_slope|" + - "float8_regr_sxx|float8_regr_sxy|float8_regr_syy|float8_stddev_pop|float8_stddev_samp|" + - "float8_var_pop|float8_var_samp|float8abs|float8div|float8eq|float8ge|float8gt|float8in|" + - "float8larger|float8le|float8lt|float8mi|float8mul|float8ne|float8out|float8pl|float8recv|" + - "float8send|float8smaller|float8um|float8up|floor|flt4_mul_cash|flt8_mul_cash|" + - "fmgr_c_validator|fmgr_internal_validator|fmgr_sql_validator|format|format_type|" + - "gb18030_to_utf8|gbk_to_utf8|generate_series|generate_subscripts|get_bit|get_byte|" + - "get_current_ts_config|getdatabaseencoding|getpgusername|gin_cmp_prefix|" + - "gin_cmp_tslexeme|gin_extract_tsquery|gin_extract_tsvector|gin_tsquery_consistent|" + - "ginarrayconsistent|ginarrayextract|ginbeginscan|ginbuild|ginbuildempty|ginbulkdelete|" + - "gincostestimate|ginendscan|gingetbitmap|gininsert|ginmarkpos|ginoptions|" + - "ginqueryarrayextract|ginrescan|ginrestrpos|ginvacuumcleanup|gist_box_compress|" + - "gist_box_consistent|gist_box_decompress|gist_box_penalty|gist_box_picksplit|" + - "gist_box_same|gist_box_union|gist_circle_compress|gist_circle_consistent|" + - "gist_point_compress|gist_point_consistent|gist_point_distance|gist_poly_compress|" + - "gist_poly_consistent|gistbeginscan|gistbuild|gistbuildempty|gistbulkdelete|" + - "gistcostestimate|gistendscan|gistgetbitmap|gistgettuple|gistinsert|gistmarkpos|" + - "gistoptions|gistrescan|gistrestrpos|gistvacuumcleanup|gtsquery_compress|" + - "gtsquery_consistent|gtsquery_decompress|gtsquery_penalty|gtsquery_picksplit|" + - "gtsquery_same|gtsquery_union|gtsvector_compress|gtsvector_consistent|" + - "gtsvector_decompress|gtsvector_penalty|gtsvector_picksplit|gtsvector_same|" + - "gtsvector_union|gtsvectorin|gtsvectorout|has_any_column_privilege|" + - "has_column_privilege|has_database_privilege|has_foreign_data_wrapper_privilege|" + - "has_function_privilege|has_language_privilege|has_schema_privilege|" + - "has_sequence_privilege|has_server_privilege|has_table_privilege|" + - "has_tablespace_privilege|has_type_privilege|hash_aclitem|hash_array|hash_numeric|" + - "hash_range|hashbeginscan|hashbpchar|hashbuild|hashbuildempty|hashbulkdelete|hashchar|" + - "hashcostestimate|hashendscan|hashenum|hashfloat4|hashfloat8|hashgetbitmap|hashgettuple|" + - "hashinet|hashinsert|hashint2|hashint2vector|hashint4|hashint8|hashmacaddr|hashmarkpos|" + - "hashname|hashoid|hashoidvector|hashoptions|hashrescan|hashrestrpos|hashtext|" + - "hashvacuumcleanup|hashvarlena|height|host|hostmask|iclikejoinsel|iclikesel|" + - "icnlikejoinsel|icnlikesel|icregexeqjoinsel|icregexeqsel|icregexnejoinsel|icregexnesel|" + - "inet_client_addr|inet_client_port|inet_in|inet_out|inet_recv|inet_send|" + - "inet_server_addr|inet_server_port|inetand|inetmi|inetmi_int8|inetnot|inetor|inetpl|" + - "initcap|int2|int24div|int24eq|int24ge|int24gt|int24le|int24lt|int24mi|int24mul|int24ne|" + - "int24pl|int28div|int28eq|int28ge|int28gt|int28le|int28lt|int28mi|int28mul|int28ne|int28pl|" + - "int2_accum|int2_avg_accum|int2_mul_cash|int2_sum|int2abs|int2and|int2div|int2eq|int2ge|" + - "int2gt|int2in|int2larger|int2le|int2lt|int2mi|int2mod|int2mul|int2ne|int2not|int2or|int2out|" + - "int2pl|int2recv|int2send|int2shl|int2shr|int2smaller|int2um|int2up|int2vectoreq|" + - "int2vectorin|int2vectorout|int2vectorrecv|int2vectorsend|int2xor|int4|int42div|int42eq|" + - "int42ge|int42gt|int42le|int42lt|int42mi|int42mul|int42ne|int42pl|int48div|int48eq|int48ge|" + - "int48gt|int48le|int48lt|int48mi|int48mul|int48ne|int48pl|int4_accum|int4_avg_accum|" + - "int4_mul_cash|int4_sum|int4abs|int4and|int4div|int4eq|int4ge|int4gt|int4in|int4inc|" + - "int4larger|int4le|int4lt|int4mi|int4mod|int4mul|int4ne|int4not|int4or|int4out|int4pl|" + - "int4range|int4range_canonical|int4range_subdiff|int4recv|int4send|int4shl|int4shr|" + - "int4smaller|int4um|int4up|int4xor|int8|int82div|int82eq|int82ge|int82gt|int82le|int82lt|" + - "int82mi|int82mul|int82ne|int82pl|int84div|int84eq|int84ge|int84gt|int84le|int84lt|int84mi|" + - "int84mul|int84ne|int84pl|int8_accum|int8_avg|int8_avg_accum|int8_sum|int8abs|int8and|" + - "int8div|int8eq|int8ge|int8gt|int8in|int8inc|int8inc_any|int8inc_float8_float8|int8larger|" + - "int8le|int8lt|int8mi|int8mod|int8mul|int8ne|int8not|int8or|int8out|int8pl|int8pl_inet|" + - "int8range|int8range_canonical|int8range_subdiff|int8recv|int8send|int8shl|int8shr|" + - "int8smaller|int8um|int8up|int8xor|integer_pl_date|inter_lb|inter_sb|inter_sl|internal_in|" + - "internal_out|interval_accum|interval_avg|interval_cmp|interval_div|interval_eq|" + - "interval_ge|interval_gt|interval_hash|interval_in|interval_larger|interval_le|" + - "interval_lt|interval_mi|interval_mul|interval_ne|interval_out|interval_pl|" + - "interval_pl_date|interval_pl_time|interval_pl_timestamp|interval_pl_timestamptz|" + - "interval_pl_timetz|interval_recv|interval_send|interval_smaller|interval_transform|" + - "interval_um|intervaltypmodin|intervaltypmodout|intinterval|isclosed|isempty|isfinite|" + - "ishorizontal|iso8859_1_to_utf8|iso8859_to_utf8|iso_to_koi8r|iso_to_mic|iso_to_win1251|" + - "iso_to_win866|isopen|isparallel|isperp|isvertical|johab_to_utf8|json_agg|" + - "json_agg_finalfn|json_agg_transfn|json_array_element|json_array_element_text|" + - "json_array_elements|json_array_length|json_each|json_each_text|json_extract_path|" + - "json_extract_path_op|json_extract_path_text|json_extract_path_text_op|json_in|" + - "json_object_field|json_object_field_text|json_object_keys|json_out|" + - "json_populate_record|json_populate_recordset|json_recv|json_send|justify_days|" + - "justify_hours|justify_interval|koi8r_to_iso|koi8r_to_mic|koi8r_to_utf8|" + - "koi8r_to_win1251|koi8r_to_win866|koi8u_to_utf8|lag|language_handler_in|" + - "language_handler_out|last_value|lastval|latin1_to_mic|latin2_to_mic|latin2_to_win1250|" + - "latin3_to_mic|latin4_to_mic|lead|left|length|like|like_escape|likejoinsel|likesel|line|" + - "line_distance|line_eq|line_horizontal|line_in|line_interpt|line_intersect|line_out|" + - "line_parallel|line_perp|line_recv|line_send|line_vertical|ln|lo_close|lo_creat|lo_create|" + - "lo_export|lo_import|lo_lseek|lo_lseek64|lo_open|lo_tell|lo_tell64|lo_truncate|" + - "lo_truncate64|lo_unlink|log|loread|lower|lower_inc|lower_inf|lowrite|lpad|lseg|lseg_center|" + - "lseg_distance|lseg_eq|lseg_ge|lseg_gt|lseg_horizontal|lseg_in|lseg_interpt|" + - "lseg_intersect|lseg_le|lseg_length|lseg_lt|lseg_ne|lseg_out|lseg_parallel|lseg_perp|" + - "lseg_recv|lseg_send|lseg_vertical|ltrim|macaddr_and|macaddr_cmp|macaddr_eq|macaddr_ge|" + - "macaddr_gt|macaddr_in|macaddr_le|macaddr_lt|macaddr_ne|macaddr_not|macaddr_or|" + - "macaddr_out|macaddr_recv|macaddr_send|makeaclitem|masklen|max|md5|mic_to_ascii|" + - "mic_to_big5|mic_to_euc_cn|mic_to_euc_jp|mic_to_euc_kr|mic_to_euc_tw|mic_to_iso|" + - "mic_to_koi8r|mic_to_latin1|mic_to_latin2|mic_to_latin3|mic_to_latin4|mic_to_sjis|" + - "mic_to_win1250|mic_to_win1251|mic_to_win866|min|mktinterval|mod|money|mul_d_interval|" + - "name|nameeq|namege|namegt|nameiclike|nameicnlike|nameicregexeq|nameicregexne|namein|" + - "namele|namelike|namelt|namene|namenlike|nameout|namerecv|nameregexeq|nameregexne|namesend|" + - "neqjoinsel|neqsel|netmask|network|network_cmp|network_eq|network_ge|network_gt|" + - "network_le|network_lt|network_ne|network_sub|network_subeq|network_sup|network_supeq|" + - "nextval|nlikejoinsel|nlikesel|notlike|now|npoints|nth_value|ntile|numeric_abs|" + - "numeric_accum|numeric_add|numeric_avg|numeric_avg_accum|numeric_cmp|numeric_div|" + - "numeric_div_trunc|numeric_eq|numeric_exp|numeric_fac|numeric_ge|numeric_gt|numeric_in|" + - "numeric_inc|numeric_larger|numeric_le|numeric_ln|numeric_log|numeric_lt|numeric_mod|" + - "numeric_mul|numeric_ne|numeric_out|numeric_power|numeric_recv|numeric_send|" + - "numeric_smaller|numeric_sqrt|numeric_stddev_pop|numeric_stddev_samp|numeric_sub|" + - "numeric_transform|numeric_uminus|numeric_uplus|numeric_var_pop|numeric_var_samp|" + - "numerictypmodin|numerictypmodout|numnode|numrange|numrange_subdiff|obj_description|" + - "octet_length|oid|oideq|oidge|oidgt|oidin|oidlarger|oidle|oidlt|oidne|oidout|oidrecv|oidsend|" + - "oidsmaller|oidvectoreq|oidvectorge|oidvectorgt|oidvectorin|oidvectorle|oidvectorlt|" + - "oidvectorne|oidvectorout|oidvectorrecv|oidvectorsend|oidvectortypes|on_pb|on_pl|" + - "on_ppath|on_ps|on_sb|on_sl|opaque_in|opaque_out|overlaps|overlay|path|path_add|path_add_pt|" + - "path_center|path_contain_pt|path_distance|path_div_pt|path_in|path_inter|path_length|" + - "path_mul_pt|path_n_eq|path_n_ge|path_n_gt|path_n_le|path_n_lt|path_npoints|path_out|" + - "path_recv|path_send|path_sub_pt|pclose|percent_rank|pg_advisory_lock|" + - "pg_advisory_lock_shared|pg_advisory_unlock|pg_advisory_unlock_all|" + - "pg_advisory_unlock_shared|pg_advisory_xact_lock|pg_advisory_xact_lock_shared|" + - "pg_available_extension_versions|pg_available_extensions|pg_backend_pid|" + - "pg_backup_start_time|pg_cancel_backend|pg_char_to_encoding|pg_client_encoding|" + - "pg_collation_for|pg_collation_is_visible|pg_column_is_updatable|pg_column_size|" + - "pg_conf_load_time|pg_conversion_is_visible|pg_create_restore_point|" + - "pg_current_xlog_insert_location|pg_current_xlog_location|pg_cursor|pg_database_size|" + - "pg_describe_object|pg_encoding_max_length|pg_encoding_to_char|" + - "pg_event_trigger_dropped_objects|pg_export_snapshot|pg_extension_config_dump|" + - "pg_extension_update_paths|pg_function_is_visible|pg_get_constraintdef|pg_get_expr|" + - "pg_get_function_arguments|pg_get_function_identity_arguments|" + - "pg_get_function_result|pg_get_functiondef|pg_get_indexdef|pg_get_keywords|" + - "pg_get_multixact_members|pg_get_ruledef|pg_get_serial_sequence|pg_get_triggerdef|" + - "pg_get_userbyid|pg_get_viewdef|pg_has_role|pg_identify_object|pg_indexes_size|" + - "pg_is_in_backup|pg_is_in_recovery|pg_is_other_temp_schema|pg_is_xlog_replay_paused|" + - "pg_last_xact_replay_timestamp|pg_last_xlog_receive_location|" + - "pg_last_xlog_replay_location|pg_listening_channels|pg_lock_status|pg_ls_dir|" + - "pg_my_temp_schema|pg_node_tree_in|pg_node_tree_out|pg_node_tree_recv|" + - "pg_node_tree_send|pg_notify|pg_opclass_is_visible|pg_operator_is_visible|" + - "pg_opfamily_is_visible|pg_options_to_table|pg_postmaster_start_time|" + - "pg_prepared_statement|pg_prepared_xact|pg_read_binary_file|pg_read_file|" + - "pg_relation_filenode|pg_relation_filepath|pg_relation_is_updatable|pg_relation_size|" + - "pg_reload_conf|pg_rotate_logfile|pg_sequence_parameters|pg_show_all_settings|" + - "pg_size_pretty|pg_sleep|pg_start_backup|pg_stat_clear_snapshot|pg_stat_file|" + - "pg_stat_get_activity|pg_stat_get_analyze_count|pg_stat_get_autoanalyze_count|" + - "pg_stat_get_autovacuum_count|pg_stat_get_backend_activity|" + - "pg_stat_get_backend_activity_start|pg_stat_get_backend_client_addr|" + - "pg_stat_get_backend_client_port|pg_stat_get_backend_dbid|pg_stat_get_backend_idset|" + - "pg_stat_get_backend_pid|pg_stat_get_backend_start|pg_stat_get_backend_userid|" + - "pg_stat_get_backend_waiting|pg_stat_get_backend_xact_start|" + - "pg_stat_get_bgwriter_buf_written_checkpoints|" + - "pg_stat_get_bgwriter_buf_written_clean|pg_stat_get_bgwriter_maxwritten_clean|" + - "pg_stat_get_bgwriter_requested_checkpoints|pg_stat_get_bgwriter_stat_reset_time|" + - "pg_stat_get_bgwriter_timed_checkpoints|pg_stat_get_blocks_fetched|" + - "pg_stat_get_blocks_hit|pg_stat_get_buf_alloc|pg_stat_get_buf_fsync_backend|" + - "pg_stat_get_buf_written_backend|pg_stat_get_checkpoint_sync_time|" + - "pg_stat_get_checkpoint_write_time|pg_stat_get_db_blk_read_time|" + - "pg_stat_get_db_blk_write_time|pg_stat_get_db_blocks_fetched|" + - "pg_stat_get_db_blocks_hit|pg_stat_get_db_conflict_all|" + - "pg_stat_get_db_conflict_bufferpin|pg_stat_get_db_conflict_lock|" + - "pg_stat_get_db_conflict_snapshot|pg_stat_get_db_conflict_startup_deadlock|" + - "pg_stat_get_db_conflict_tablespace|pg_stat_get_db_deadlocks|" + - "pg_stat_get_db_numbackends|pg_stat_get_db_stat_reset_time|" + - "pg_stat_get_db_temp_bytes|pg_stat_get_db_temp_files|pg_stat_get_db_tuples_deleted|" + - "pg_stat_get_db_tuples_fetched|pg_stat_get_db_tuples_inserted|" + - "pg_stat_get_db_tuples_returned|pg_stat_get_db_tuples_updated|" + - "pg_stat_get_db_xact_commit|pg_stat_get_db_xact_rollback|pg_stat_get_dead_tuples|" + - "pg_stat_get_function_calls|pg_stat_get_function_self_time|" + - "pg_stat_get_function_total_time|pg_stat_get_last_analyze_time|" + - "pg_stat_get_last_autoanalyze_time|pg_stat_get_last_autovacuum_time|" + - "pg_stat_get_last_vacuum_time|pg_stat_get_live_tuples|pg_stat_get_numscans|" + - "pg_stat_get_tuples_deleted|pg_stat_get_tuples_fetched|" + - "pg_stat_get_tuples_hot_updated|pg_stat_get_tuples_inserted|" + - "pg_stat_get_tuples_returned|pg_stat_get_tuples_updated|pg_stat_get_vacuum_count|" + - "pg_stat_get_wal_senders|pg_stat_get_xact_blocks_fetched|" + - "pg_stat_get_xact_blocks_hit|pg_stat_get_xact_function_calls|" + - "pg_stat_get_xact_function_self_time|pg_stat_get_xact_function_total_time|" + - "pg_stat_get_xact_numscans|pg_stat_get_xact_tuples_deleted|" + - "pg_stat_get_xact_tuples_fetched|pg_stat_get_xact_tuples_hot_updated|" + - "pg_stat_get_xact_tuples_inserted|pg_stat_get_xact_tuples_returned|" + - "pg_stat_get_xact_tuples_updated|pg_stat_reset|pg_stat_reset_shared|" + - "pg_stat_reset_single_function_counters|pg_stat_reset_single_table_counters|" + - "pg_stop_backup|pg_switch_xlog|pg_table_is_visible|pg_table_size|" + - "pg_tablespace_databases|pg_tablespace_location|pg_tablespace_size|" + - "pg_terminate_backend|pg_timezone_abbrevs|pg_timezone_names|pg_total_relation_size|" + - "pg_trigger_depth|pg_try_advisory_lock|pg_try_advisory_lock_shared|" + - "pg_try_advisory_xact_lock|pg_try_advisory_xact_lock_shared|pg_ts_config_is_visible|" + - "pg_ts_dict_is_visible|pg_ts_parser_is_visible|pg_ts_template_is_visible|" + - "pg_type_is_visible|pg_typeof|pg_xlog_location_diff|pg_xlog_replay_pause|" + - "pg_xlog_replay_resume|pg_xlogfile_name|pg_xlogfile_name_offset|pi|plainto_tsquery|" + - "plpgsql_call_handler|plpgsql_inline_handler|plpgsql_validator|point|point_above|" + - "point_add|point_below|point_distance|point_div|point_eq|point_horiz|point_in|point_left|" + - "point_mul|point_ne|point_out|point_recv|point_right|point_send|point_sub|point_vert|" + - "poly_above|poly_below|poly_center|poly_contain|poly_contain_pt|poly_contained|" + - "poly_distance|poly_in|poly_left|poly_npoints|poly_out|poly_overabove|poly_overbelow|" + - "poly_overlap|poly_overleft|poly_overright|poly_recv|poly_right|poly_same|poly_send|" + - "polygon|popen|position|positionjoinsel|positionsel|postgresql_fdw_validator|pow|power|" + - "prsd_end|prsd_headline|prsd_lextype|prsd_nexttoken|prsd_start|pt_contained_circle|" + - "pt_contained_poly|query_to_xml|query_to_xml_and_xmlschema|query_to_xmlschema|" + - "querytree|quote_ident|quote_literal|quote_nullable|radians|radius|random|range_adjacent|" + - "range_after|range_before|range_cmp|range_contained_by|range_contains|" + - "range_contains_elem|range_eq|range_ge|range_gist_compress|range_gist_consistent|" + - "range_gist_decompress|range_gist_penalty|range_gist_picksplit|range_gist_same|" + - "range_gist_union|range_gt|range_in|range_intersect|range_le|range_lt|range_minus|" + - "range_ne|range_out|range_overlaps|range_overleft|range_overright|range_recv|range_send|" + - "range_typanalyze|range_union|rangesel|rank|record_eq|record_ge|record_gt|record_in|" + - "record_le|record_lt|record_ne|record_out|record_recv|record_send|regclass|regclassin|" + - "regclassout|regclassrecv|regclasssend|regconfigin|regconfigout|regconfigrecv|" + - "regconfigsend|regdictionaryin|regdictionaryout|regdictionaryrecv|regdictionarysend|" + - "regexeqjoinsel|regexeqsel|regexnejoinsel|regexnesel|regexp_matches|regexp_replace|" + - "regexp_split_to_array|regexp_split_to_table|regoperatorin|regoperatorout|" + - "regoperatorrecv|regoperatorsend|regoperin|regoperout|regoperrecv|regopersend|" + - "regprocedurein|regprocedureout|regprocedurerecv|regproceduresend|regprocin|regprocout|" + - "regprocrecv|regprocsend|regr_avgx|regr_avgy|regr_count|regr_intercept|regr_r2|" + - "regr_slope|regr_sxx|regr_sxy|regr_syy|regtypein|regtypeout|regtyperecv|regtypesend|" + - "reltime|reltimeeq|reltimege|reltimegt|reltimein|reltimele|reltimelt|reltimene|reltimeout|" + - "reltimerecv|reltimesend|repeat|replace|reverse|right|round|row_number|row_to_json|rpad|" + - "rtrim|scalargtjoinsel|scalargtsel|scalarltjoinsel|scalarltsel|schema_to_xml|" + - "schema_to_xml_and_xmlschema|schema_to_xmlschema|session_user|set_bit|set_byte|" + - "set_config|set_masklen|setseed|setval|setweight|shell_in|shell_out|" + - "shift_jis_2004_to_euc_jis_2004|shift_jis_2004_to_utf8|shobj_description|sign|" + - "similar_escape|sin|sjis_to_euc_jp|sjis_to_mic|sjis_to_utf8|slope|smgreq|smgrin|smgrne|" + - "smgrout|spg_kd_choose|spg_kd_config|spg_kd_inner_consistent|spg_kd_picksplit|" + - "spg_quad_choose|spg_quad_config|spg_quad_inner_consistent|spg_quad_leaf_consistent|" + - "spg_quad_picksplit|spg_range_quad_choose|spg_range_quad_config|" + - "spg_range_quad_inner_consistent|spg_range_quad_leaf_consistent|" + - "spg_range_quad_picksplit|spg_text_choose|spg_text_config|spg_text_inner_consistent|" + - "spg_text_leaf_consistent|spg_text_picksplit|spgbeginscan|spgbuild|spgbuildempty|" + - "spgbulkdelete|spgcanreturn|spgcostestimate|spgendscan|spggetbitmap|spggettuple|" + - "spginsert|spgmarkpos|spgoptions|spgrescan|spgrestrpos|spgvacuumcleanup|split_part|sqrt|" + - "statement_timestamp|stddev|stddev_pop|stddev_samp|string_agg|string_agg_finalfn|" + - "string_agg_transfn|string_to_array|strip|strpos|substr|substring|sum|" + - "suppress_redundant_updates_trigger|table_to_xml|table_to_xml_and_xmlschema|" + - "table_to_xmlschema|tan|text|text_ge|text_gt|text_larger|text_le|text_lt|text_pattern_ge|" + - "text_pattern_gt|text_pattern_le|text_pattern_lt|text_smaller|textanycat|textcat|texteq|" + - "texticlike|texticnlike|texticregexeq|texticregexne|textin|textlen|textlike|textne|" + - "textnlike|textout|textrecv|textregexeq|textregexne|textsend|thesaurus_init|" + - "thesaurus_lexize|tideq|tidge|tidgt|tidin|tidlarger|tidle|tidlt|tidne|tidout|tidrecv|tidsend|" + - "tidsmaller|time_cmp|time_eq|time_ge|time_gt|time_hash|time_in|time_larger|time_le|time_lt|" + - "time_mi_interval|time_mi_time|time_ne|time_out|time_pl_interval|time_recv|time_send|" + - "time_smaller|time_transform|timedate_pl|timemi|timenow|timeofday|timepl|timestamp_cmp|" + - "timestamp_cmp_date|timestamp_cmp_timestamptz|timestamp_eq|timestamp_eq_date|" + - "timestamp_eq_timestamptz|timestamp_ge|timestamp_ge_date|timestamp_ge_timestamptz|" + - "timestamp_gt|timestamp_gt_date|timestamp_gt_timestamptz|timestamp_hash|timestamp_in|" + - "timestamp_larger|timestamp_le|timestamp_le_date|timestamp_le_timestamptz|" + - "timestamp_lt|timestamp_lt_date|timestamp_lt_timestamptz|timestamp_mi|" + - "timestamp_mi_interval|timestamp_ne|timestamp_ne_date|timestamp_ne_timestamptz|" + - "timestamp_out|timestamp_pl_interval|timestamp_recv|timestamp_send|timestamp_smaller|" + - "timestamp_sortsupport|timestamp_transform|timestamptypmodin|timestamptypmodout|" + - "timestamptz_cmp|timestamptz_cmp_date|timestamptz_cmp_timestamp|timestamptz_eq|" + - "timestamptz_eq_date|timestamptz_eq_timestamp|timestamptz_ge|timestamptz_ge_date|" + - "timestamptz_ge_timestamp|timestamptz_gt|timestamptz_gt_date|" + - "timestamptz_gt_timestamp|timestamptz_in|timestamptz_larger|timestamptz_le|" + - "timestamptz_le_date|timestamptz_le_timestamp|timestamptz_lt|timestamptz_lt_date|" + - "timestamptz_lt_timestamp|timestamptz_mi|timestamptz_mi_interval|timestamptz_ne|" + - "timestamptz_ne_date|timestamptz_ne_timestamp|timestamptz_out|" + - "timestamptz_pl_interval|timestamptz_recv|timestamptz_send|timestamptz_smaller|" + - "timestamptztypmodin|timestamptztypmodout|timetypmodin|timetypmodout|timetz_cmp|" + - "timetz_eq|timetz_ge|timetz_gt|timetz_hash|timetz_in|timetz_larger|timetz_le|timetz_lt|" + - "timetz_mi_interval|timetz_ne|timetz_out|timetz_pl_interval|timetz_recv|timetz_send|" + - "timetz_smaller|timetzdate_pl|timetztypmodin|timetztypmodout|timezone|tinterval|" + - "tintervalct|tintervalend|tintervaleq|tintervalge|tintervalgt|tintervalin|tintervalle|" + - "tintervalleneq|tintervallenge|tintervallengt|tintervallenle|tintervallenlt|" + - "tintervallenne|tintervallt|tintervalne|tintervalout|tintervalov|tintervalrecv|" + - "tintervalrel|tintervalsame|tintervalsend|tintervalstart|to_ascii|to_char|to_date|to_hex|" + - "to_json|to_number|to_timestamp|to_tsquery|to_tsvector|transaction_timestamp|translate|" + - "trigger_in|trigger_out|trunc|ts_debug|ts_headline|ts_lexize|ts_match_qv|ts_match_tq|" + - "ts_match_tt|ts_match_vq|ts_parse|ts_rank|ts_rank_cd|ts_rewrite|ts_stat|ts_token_type|" + - "ts_typanalyze|tsmatchjoinsel|tsmatchsel|tsq_mcontained|tsq_mcontains|tsquery_and|" + - "tsquery_cmp|tsquery_eq|tsquery_ge|tsquery_gt|tsquery_le|tsquery_lt|tsquery_ne|" + - "tsquery_not|tsquery_or|tsqueryin|tsqueryout|tsqueryrecv|tsquerysend|tsrange|" + - "tsrange_subdiff|tstzrange|tstzrange_subdiff|tsvector_cmp|tsvector_concat|tsvector_eq|" + - "tsvector_ge|tsvector_gt|tsvector_le|tsvector_lt|tsvector_ne|tsvector_update_trigger|" + - "tsvector_update_trigger_column|tsvectorin|tsvectorout|tsvectorrecv|tsvectorsend|" + - "txid_current|txid_current_snapshot|txid_snapshot_in|txid_snapshot_out|" + - "txid_snapshot_recv|txid_snapshot_send|txid_snapshot_xip|txid_snapshot_xmax|" + - "txid_snapshot_xmin|txid_visible_in_snapshot|uhc_to_utf8|unique_key_recheck|unknownin|" + - "unknownout|unknownrecv|unknownsend|unnest|upper|upper_inc|upper_inf|utf8_to_ascii|" + - "utf8_to_big5|utf8_to_euc_cn|utf8_to_euc_jis_2004|utf8_to_euc_jp|utf8_to_euc_kr|" + - "utf8_to_euc_tw|utf8_to_gb18030|utf8_to_gbk|utf8_to_iso8859|utf8_to_iso8859_1|" + - "utf8_to_johab|utf8_to_koi8r|utf8_to_koi8u|utf8_to_shift_jis_2004|utf8_to_sjis|" + - "utf8_to_uhc|utf8_to_win|uuid_cmp|uuid_eq|uuid_ge|uuid_gt|uuid_hash|uuid_in|uuid_le|" + - "uuid_lt|uuid_ne|uuid_out|uuid_recv|uuid_send|var_pop|var_samp|varbit_in|varbit_out|" + - "varbit_recv|varbit_send|varbit_transform|varbitcmp|varbiteq|varbitge|varbitgt|varbitle|" + - "varbitlt|varbitne|varbittypmodin|varbittypmodout|varchar_transform|varcharin|" + - "varcharout|varcharrecv|varcharsend|varchartypmodin|varchartypmodout|variance|version|" + - "void_in|void_out|void_recv|void_send|width|width_bucket|win1250_to_latin2|" + - "win1250_to_mic|win1251_to_iso|win1251_to_koi8r|win1251_to_mic|win1251_to_win866|" + - "win866_to_iso|win866_to_koi8r|win866_to_mic|win866_to_win1251|win_to_utf8|xideq|" + - "xideqint4|xidin|xidout|xidrecv|xidsend|xml|xml_in|xml_is_well_formed|" + - "xml_is_well_formed_content|xml_is_well_formed_document|xml_out|xml_recv|xml_send|" + - "xmlagg|xmlcomment|xmlconcat2|xmlexists|xmlvalidate|xpath|xpath_exists" - ); - - var keywordMapper = this.createKeywordMapper({ - "support.function": builtinFunctions, - "keyword": keywords - }, "identifier", true); - - - var sqlRules = [{ - token : "string", // single line string -- assume dollar strings if multi-line for now - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "variable.language", // pg identifier - regex : '".*?"' - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_][a-zA-Z0-9_$]*\\b" // TODO - Unicode in identifiers - }, { - token : "keyword.operator", - regex : "!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|" + - "\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||" + - "\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|" + - "~=|~>=~|~>~|~~|~~\\*" - }, { - token : "paren.lparen", - regex : "[\\(]" - }, { - token : "paren.rparen", - regex : "[\\)]" - }, { - token : "text", - regex : "\\s+" - } - ]; - - - this.$rules = { - "start" : [{ - token : "comment", - regex : "--.*$" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi-line comment - regex : "\\/\\*", - next : "comment" - },{ - token : "keyword.statementBegin", - regex : "^[a-zA-Z]+", // Could enumerate starting keywords but this allows things to work when new statements are added. - next : "statement" - },{ - token : "support.buildin", // psql directive - regex : "^\\\\[\\S]+.*$" - } - ], - - "statement" : [{ - token : "comment", - regex : "--.*$" - }, { - token : "comment", // multi-line comment - regex : "\\/\\*", - next : "commentStatement" - }, { - token : "statementEnd", - regex : ";", - next : "start" - }, { - token : "string", - regex : "\\$perl\\$", - next : "perl-start" - }, { - token : "string", - regex : "\\$python\\$", - next : "python-start" - }, { - token : "string", - regex : "\\$json\\$", - next : "json-start" - }, { - token : "string", - regex : "\\$(js|javascript)\\$", - next : "javascript-start" - }, { - token : "string", - regex : "\\$[\\w_0-9]*\\$$", // dollar quote at the end of a line - next : "dollarSql" - }, { - token : "string", - regex : "\\$[\\w_0-9]*\\$", - next : "dollarStatementString" - } - ].concat(sqlRules), - - "dollarSql" : [{ - token : "comment", - regex : "--.*$" - }, { - token : "comment", // multi-line comment - regex : "\\/\\*", - next : "commentDollarSql" - }, { - token : "string", // end quoting with dollar at the start of a line - regex : "^\\$[\\w_0-9]*\\$", - next : "statement" - }, { - token : "string", - regex : "\\$[\\w_0-9]*\\$", - next : "dollarSqlString" - } - ].concat(sqlRules), - - "comment" : [{ - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - - "commentStatement" : [{ - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "statement" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - - "commentDollarSql" : [{ - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "dollarSql" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - - "dollarStatementString" : [{ - token : "string", // closing dollarstring - regex : ".*?\\$[\\w_0-9]*\\$", - next : "statement" - }, { - token : "string", // dollarstring spanning whole line - regex : ".+" - } - ], - - "dollarSqlString" : [{ - token : "string", // closing dollarstring - regex : ".*?\\$[\\w_0-9]*\\$", - next : "dollarSql" - }, { - token : "string", // dollarstring spanning whole line - regex : ".+" - } - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); - this.embedRules(PerlHighlightRules, "perl-", [{token : "string", regex : "\\$perl\\$", next : "statement"}]); - this.embedRules(PythonHighlightRules, "python-", [{token : "string", regex : "\\$python\\$", next : "statement"}]); - this.embedRules(JsonHighlightRules, "json-", [{token : "string", regex : "\\$json\\$", next : "statement"}]); - this.embedRules(JavaScriptHighlightRules, "javascript-", [{token : "string", regex : "\\$(js|javascript)\\$", next : "statement"}]); -}; - -oop.inherits(PgsqlHighlightRules, TextHighlightRules); - -exports.PgsqlHighlightRules = PgsqlHighlightRules; -}); - -define("ace/mode/pgsql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pgsql_highlight_rules","ace/range"], function(require, exports, module) { - -var oop = require("../lib/oop"); -var TextMode = require("../mode/text").Mode; -var PgsqlHighlightRules = require("./pgsql_highlight_rules").PgsqlHighlightRules; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = PgsqlHighlightRules; -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "--"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - if (state == "start" || state == "keyword.statementEnd") { - return ""; - } else { - return this.$getIndent(line); // Keep whatever indent the previous line has - } - } - - this.$id = "ace/mode/pgsql"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var a=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};a.inherits(i,r),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var a=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){var e="base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars",t="ARGV|ENV|INC|SIG",n="getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|getpeername|setpriority|getprotoent|setprotoent|getpriority|endprotoent|getservent|setservent|endservent|sethostent|socketpair|getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|map|die|uc|lc|do",a=this.createKeywordMapper({keyword:e,"constant.language":t,"support.function":n},"identifier");this.$rules={start:[{token:"comment.doc",regex:"^=(?:begin|item)\\b",next:"block_comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0x[0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"%#|\\$#|\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"},{token:"comment",regex:"#.*$"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}],block_comment:[{token:"comment.doc",regex:"^=cut\\b",next:"start"},{defaultToken:"comment.doc"}]}};a.inherits(i,r),t.PerlHighlightRules=i}),define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var a=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){var e="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield",t="True|False|None|NotImplemented|Ellipsis|__debug__",n="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern",a=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"constant.language":t,keyword:e},"identifier"),r="(?:r|u|ur|R|U|UR|Ur|uR)?",i="(?:(?:[1-9]\\d*)|(?:0))",_="(?:0[oO]?[0-7]+)",o="(?:0[xX][\\dA-Fa-f]+)",s="(?:0[bB][01]+)",l="(?:"+i+"|"+_+"|"+o+"|"+s+")",c="(?:[eE][+-]?\\d+)",g="(?:\\.\\d+)",p="(?:\\d+)",m="(?:(?:"+p+"?"+g+")|(?:"+p+"\\.))",d="(?:(?:"+m+"|"+p+")"+c+")",u="(?:"+d+"|"+m+")",h="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:r+'"{3}',next:"qqstring3"},{token:"string",regex:r+'"(?=.)',next:"qqstring"},{token:"string",regex:r+"'{3}",next:"qstring3"},{token:"string",regex:r+"'(?=.)",next:"qstring"},{token:"constant.numeric",regex:"(?:"+u+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:l+"[lL]\\b"},{token:"constant.numeric",regex:l+"\\b"},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring3:[{token:"constant.language.escape",regex:h},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:h},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:h},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:h},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}]}};a.inherits(i,r),t.PythonHighlightRules=i}),define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var a=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"invalid.illegal",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"invalid.illegal",regex:"\\/\\/.*$"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:'"',next:"start"},{token:"string",regex:"",next:"start"}]}};a.inherits(i,r),t.JsonHighlightRules=i}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var a=e("../lib/oop"),r=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,_=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",a="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},r.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+a+")(\\.)(prototype)(\\.)("+a+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:a},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[r.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[r.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(r,"doc-",[r.getEndRule("no_regex")]),this.normalizeRules()};a.inherits(_,i),t.JavaScriptHighlightRules=_}),define("ace/mode/pgsql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/perl_highlight_rules","ace/mode/python_highlight_rules","ace/mode/json_highlight_rules","ace/mode/javascript_highlight_rules"],function(e,t,n){var a=e("../lib/oop"),r=(e("../lib/lang"),e("./doc_comment_highlight_rules").DocCommentHighlightRules),i=e("./text_highlight_rules").TextHighlightRules,_=e("./perl_highlight_rules").PerlHighlightRules,o=e("./python_highlight_rules").PythonHighlightRules,s=e("./json_highlight_rules").JsonHighlightRules,l=e("./javascript_highlight_rules").JavaScriptHighlightRules,c=function(){var e="abort|absolute|abstime|access|aclitem|action|add|admin|after|aggregate|all|also|alter|always|analyse|analyze|and|any|anyarray|anyelement|anyenum|anynonarray|anyrange|array|as|asc|assertion|assignment|asymmetric|at|attribute|authorization|backward|before|begin|between|bigint|binary|bit|bool|boolean|both|box|bpchar|by|bytea|cache|called|cascade|cascaded|case|cast|catalog|chain|char|character|characteristics|check|checkpoint|cid|cidr|circle|class|close|cluster|coalesce|collate|collation|column|comment|comments|commit|committed|concurrently|configuration|connection|constraint|constraints|content|continue|conversion|copy|cost|create|cross|cstring|csv|current|current_catalog|current_date|current_role|current_schema|current_time|current_timestamp|current_user|cursor|cycle|data|database|date|daterange|day|deallocate|dec|decimal|declare|default|defaults|deferrable|deferred|definer|delete|delimiter|delimiters|desc|dictionary|disable|discard|distinct|do|document|domain|double|drop|each|else|enable|encoding|encrypted|end|enum|escape|event|event_trigger|except|exclude|excluding|exclusive|execute|exists|explain|extension|external|extract|false|family|fdw_handler|fetch|first|float|float4|float8|following|for|force|foreign|forward|freeze|from|full|function|functions|global|grant|granted|greatest|group|gtsvector|handler|having|header|hold|hour|identity|if|ilike|immediate|immutable|implicit|in|including|increment|index|indexes|inet|inherit|inherits|initially|inline|inner|inout|input|insensitive|insert|instead|int|int2|int2vector|int4|int4range|int8|int8range|integer|internal|intersect|interval|into|invoker|is|isnull|isolation|join|json|key|label|language|language_handler|large|last|lateral|lc_collate|lc_ctype|leading|leakproof|least|left|level|like|limit|line|listen|load|local|localtime|localtimestamp|location|lock|lseg|macaddr|mapping|match|materialized|maxvalue|minute|minvalue|mode|money|month|move|name|names|national|natural|nchar|next|no|none|not|nothing|notify|notnull|nowait|null|nullif|nulls|numeric|numrange|object|of|off|offset|oid|oids|oidvector|on|only|opaque|operator|option|options|or|order|out|outer|over|overlaps|overlay|owned|owner|parser|partial|partition|passing|password|path|pg_attribute|pg_auth_members|pg_authid|pg_class|pg_database|pg_node_tree|pg_proc|pg_type|placing|plans|point|polygon|position|preceding|precision|prepare|prepared|preserve|primary|prior|privileges|procedural|procedure|program|quote|range|read|real|reassign|recheck|record|recursive|ref|refcursor|references|refresh|regclass|regconfig|regdictionary|regoper|regoperator|regproc|regprocedure|regtype|reindex|relative|release|reltime|rename|repeatable|replace|replica|reset|restart|restrict|returning|returns|revoke|right|role|rollback|row|rows|rule|savepoint|schema|scroll|search|second|security|select|sequence|sequences|serializable|server|session|session_user|set|setof|share|show|similar|simple|smallint|smgr|snapshot|some|stable|standalone|start|statement|statistics|stdin|stdout|storage|strict|strip|substring|symmetric|sysid|system|table|tables|tablespace|temp|template|temporary|text|then|tid|time|timestamp|timestamptz|timetz|tinterval|to|trailing|transaction|treat|trigger|trim|true|truncate|trusted|tsquery|tsrange|tstzrange|tsvector|txid_snapshot|type|types|unbounded|uncommitted|unencrypted|union|unique|unknown|unlisten|unlogged|until|update|user|using|uuid|vacuum|valid|validate|validator|value|values|varbit|varchar|variadic|varying|verbose|version|view|void|volatile|when|where|whitespace|window|with|without|work|wrapper|write|xid|xml|xmlattributes|xmlconcat|xmlelement|xmlexists|xmlforest|xmlparse|xmlpi|xmlroot|xmlserialize|year|yes|zone",t="RI_FKey_cascade_del|RI_FKey_cascade_upd|RI_FKey_check_ins|RI_FKey_check_upd|RI_FKey_noaction_del|RI_FKey_noaction_upd|RI_FKey_restrict_del|RI_FKey_restrict_upd|RI_FKey_setdefault_del|RI_FKey_setdefault_upd|RI_FKey_setnull_del|RI_FKey_setnull_upd|abbrev|abs|abstime|abstimeeq|abstimege|abstimegt|abstimein|abstimele|abstimelt|abstimene|abstimeout|abstimerecv|abstimesend|aclcontains|acldefault|aclexplode|aclinsert|aclitemeq|aclitemin|aclitemout|aclremove|acos|age|any_in|any_out|anyarray_in|anyarray_out|anyarray_recv|anyarray_send|anyelement_in|anyelement_out|anyenum_in|anyenum_out|anynonarray_in|anynonarray_out|anyrange_in|anyrange_out|anytextcat|area|areajoinsel|areasel|array_agg|array_agg_finalfn|array_agg_transfn|array_append|array_cat|array_dims|array_eq|array_fill|array_ge|array_gt|array_in|array_larger|array_le|array_length|array_lower|array_lt|array_ndims|array_ne|array_out|array_prepend|array_recv|array_remove|array_replace|array_send|array_smaller|array_to_json|array_to_string|array_typanalyze|array_upper|arraycontained|arraycontains|arraycontjoinsel|arraycontsel|arrayoverlap|ascii|ascii_to_mic|ascii_to_utf8|asin|atan|atan2|avg|big5_to_euc_tw|big5_to_mic|big5_to_utf8|bit_and|bit_in|bit_length|bit_or|bit_out|bit_recv|bit_send|bitand|bitcat|bitcmp|biteq|bitge|bitgt|bitle|bitlt|bitne|bitnot|bitor|bitshiftleft|bitshiftright|bittypmodin|bittypmodout|bitxor|bool|bool_and|bool_or|booland_statefunc|booleq|boolge|boolgt|boolin|boolle|boollt|boolne|boolor_statefunc|boolout|boolrecv|boolsend|box|box_above|box_above_eq|box_add|box_below|box_below_eq|box_center|box_contain|box_contain_pt|box_contained|box_distance|box_div|box_eq|box_ge|box_gt|box_in|box_intersect|box_le|box_left|box_lt|box_mul|box_out|box_overabove|box_overbelow|box_overlap|box_overleft|box_overright|box_recv|box_right|box_same|box_send|box_sub|bpchar_larger|bpchar_pattern_ge|bpchar_pattern_gt|bpchar_pattern_le|bpchar_pattern_lt|bpchar_smaller|bpcharcmp|bpchareq|bpcharge|bpchargt|bpchariclike|bpcharicnlike|bpcharicregexeq|bpcharicregexne|bpcharin|bpcharle|bpcharlike|bpcharlt|bpcharne|bpcharnlike|bpcharout|bpcharrecv|bpcharregexeq|bpcharregexne|bpcharsend|bpchartypmodin|bpchartypmodout|broadcast|btabstimecmp|btarraycmp|btbeginscan|btboolcmp|btbpchar_pattern_cmp|btbuild|btbuildempty|btbulkdelete|btcanreturn|btcharcmp|btcostestimate|btendscan|btfloat48cmp|btfloat4cmp|btfloat4sortsupport|btfloat84cmp|btfloat8cmp|btfloat8sortsupport|btgetbitmap|btgettuple|btinsert|btint24cmp|btint28cmp|btint2cmp|btint2sortsupport|btint42cmp|btint48cmp|btint4cmp|btint4sortsupport|btint82cmp|btint84cmp|btint8cmp|btint8sortsupport|btmarkpos|btnamecmp|btnamesortsupport|btoidcmp|btoidsortsupport|btoidvectorcmp|btoptions|btrecordcmp|btreltimecmp|btrescan|btrestrpos|btrim|bttext_pattern_cmp|bttextcmp|bttidcmp|bttintervalcmp|btvacuumcleanup|bytea_string_agg_finalfn|bytea_string_agg_transfn|byteacat|byteacmp|byteaeq|byteage|byteagt|byteain|byteale|bytealike|bytealt|byteane|byteanlike|byteaout|bytearecv|byteasend|cash_cmp|cash_div_cash|cash_div_flt4|cash_div_flt8|cash_div_int2|cash_div_int4|cash_eq|cash_ge|cash_gt|cash_in|cash_le|cash_lt|cash_mi|cash_mul_flt4|cash_mul_flt8|cash_mul_int2|cash_mul_int4|cash_ne|cash_out|cash_pl|cash_recv|cash_send|cash_words|cashlarger|cashsmaller|cbrt|ceil|ceiling|center|char|char_length|character_length|chareq|charge|chargt|charin|charle|charlt|charne|charout|charrecv|charsend|chr|cideq|cidin|cidout|cidr|cidr_in|cidr_out|cidr_recv|cidr_send|cidrecv|cidsend|circle|circle_above|circle_add_pt|circle_below|circle_center|circle_contain|circle_contain_pt|circle_contained|circle_distance|circle_div_pt|circle_eq|circle_ge|circle_gt|circle_in|circle_le|circle_left|circle_lt|circle_mul_pt|circle_ne|circle_out|circle_overabove|circle_overbelow|circle_overlap|circle_overleft|circle_overright|circle_recv|circle_right|circle_same|circle_send|circle_sub_pt|clock_timestamp|close_lb|close_ls|close_lseg|close_pb|close_pl|close_ps|close_sb|close_sl|col_description|concat|concat_ws|contjoinsel|contsel|convert|convert_from|convert_to|corr|cos|cot|count|covar_pop|covar_samp|cstring_in|cstring_out|cstring_recv|cstring_send|cume_dist|current_database|current_query|current_schema|current_schemas|current_setting|current_user|currtid|currtid2|currval|cursor_to_xml|cursor_to_xmlschema|database_to_xml|database_to_xml_and_xmlschema|database_to_xmlschema|date|date_cmp|date_cmp_timestamp|date_cmp_timestamptz|date_eq|date_eq_timestamp|date_eq_timestamptz|date_ge|date_ge_timestamp|date_ge_timestamptz|date_gt|date_gt_timestamp|date_gt_timestamptz|date_in|date_larger|date_le|date_le_timestamp|date_le_timestamptz|date_lt|date_lt_timestamp|date_lt_timestamptz|date_mi|date_mi_interval|date_mii|date_ne|date_ne_timestamp|date_ne_timestamptz|date_out|date_part|date_pl_interval|date_pli|date_recv|date_send|date_smaller|date_sortsupport|date_trunc|daterange|daterange_canonical|daterange_subdiff|datetime_pl|datetimetz_pl|dcbrt|decode|degrees|dense_rank|dexp|diagonal|diameter|dispell_init|dispell_lexize|dist_cpoly|dist_lb|dist_pb|dist_pc|dist_pl|dist_ppath|dist_ps|dist_sb|dist_sl|div|dlog1|dlog10|domain_in|domain_recv|dpow|dround|dsimple_init|dsimple_lexize|dsnowball_init|dsnowball_lexize|dsqrt|dsynonym_init|dsynonym_lexize|dtrunc|elem_contained_by_range|encode|enum_cmp|enum_eq|enum_first|enum_ge|enum_gt|enum_in|enum_larger|enum_last|enum_le|enum_lt|enum_ne|enum_out|enum_range|enum_recv|enum_send|enum_smaller|eqjoinsel|eqsel|euc_cn_to_mic|euc_cn_to_utf8|euc_jis_2004_to_shift_jis_2004|euc_jis_2004_to_utf8|euc_jp_to_mic|euc_jp_to_sjis|euc_jp_to_utf8|euc_kr_to_mic|euc_kr_to_utf8|euc_tw_to_big5|euc_tw_to_mic|euc_tw_to_utf8|event_trigger_in|event_trigger_out|every|exp|factorial|family|fdw_handler_in|fdw_handler_out|first_value|float4|float48div|float48eq|float48ge|float48gt|float48le|float48lt|float48mi|float48mul|float48ne|float48pl|float4_accum|float4abs|float4div|float4eq|float4ge|float4gt|float4in|float4larger|float4le|float4lt|float4mi|float4mul|float4ne|float4out|float4pl|float4recv|float4send|float4smaller|float4um|float4up|float8|float84div|float84eq|float84ge|float84gt|float84le|float84lt|float84mi|float84mul|float84ne|float84pl|float8_accum|float8_avg|float8_corr|float8_covar_pop|float8_covar_samp|float8_regr_accum|float8_regr_avgx|float8_regr_avgy|float8_regr_intercept|float8_regr_r2|float8_regr_slope|float8_regr_sxx|float8_regr_sxy|float8_regr_syy|float8_stddev_pop|float8_stddev_samp|float8_var_pop|float8_var_samp|float8abs|float8div|float8eq|float8ge|float8gt|float8in|float8larger|float8le|float8lt|float8mi|float8mul|float8ne|float8out|float8pl|float8recv|float8send|float8smaller|float8um|float8up|floor|flt4_mul_cash|flt8_mul_cash|fmgr_c_validator|fmgr_internal_validator|fmgr_sql_validator|format|format_type|gb18030_to_utf8|gbk_to_utf8|generate_series|generate_subscripts|get_bit|get_byte|get_current_ts_config|getdatabaseencoding|getpgusername|gin_cmp_prefix|gin_cmp_tslexeme|gin_extract_tsquery|gin_extract_tsvector|gin_tsquery_consistent|ginarrayconsistent|ginarrayextract|ginbeginscan|ginbuild|ginbuildempty|ginbulkdelete|gincostestimate|ginendscan|gingetbitmap|gininsert|ginmarkpos|ginoptions|ginqueryarrayextract|ginrescan|ginrestrpos|ginvacuumcleanup|gist_box_compress|gist_box_consistent|gist_box_decompress|gist_box_penalty|gist_box_picksplit|gist_box_same|gist_box_union|gist_circle_compress|gist_circle_consistent|gist_point_compress|gist_point_consistent|gist_point_distance|gist_poly_compress|gist_poly_consistent|gistbeginscan|gistbuild|gistbuildempty|gistbulkdelete|gistcostestimate|gistendscan|gistgetbitmap|gistgettuple|gistinsert|gistmarkpos|gistoptions|gistrescan|gistrestrpos|gistvacuumcleanup|gtsquery_compress|gtsquery_consistent|gtsquery_decompress|gtsquery_penalty|gtsquery_picksplit|gtsquery_same|gtsquery_union|gtsvector_compress|gtsvector_consistent|gtsvector_decompress|gtsvector_penalty|gtsvector_picksplit|gtsvector_same|gtsvector_union|gtsvectorin|gtsvectorout|has_any_column_privilege|has_column_privilege|has_database_privilege|has_foreign_data_wrapper_privilege|has_function_privilege|has_language_privilege|has_schema_privilege|has_sequence_privilege|has_server_privilege|has_table_privilege|has_tablespace_privilege|has_type_privilege|hash_aclitem|hash_array|hash_numeric|hash_range|hashbeginscan|hashbpchar|hashbuild|hashbuildempty|hashbulkdelete|hashchar|hashcostestimate|hashendscan|hashenum|hashfloat4|hashfloat8|hashgetbitmap|hashgettuple|hashinet|hashinsert|hashint2|hashint2vector|hashint4|hashint8|hashmacaddr|hashmarkpos|hashname|hashoid|hashoidvector|hashoptions|hashrescan|hashrestrpos|hashtext|hashvacuumcleanup|hashvarlena|height|host|hostmask|iclikejoinsel|iclikesel|icnlikejoinsel|icnlikesel|icregexeqjoinsel|icregexeqsel|icregexnejoinsel|icregexnesel|inet_client_addr|inet_client_port|inet_in|inet_out|inet_recv|inet_send|inet_server_addr|inet_server_port|inetand|inetmi|inetmi_int8|inetnot|inetor|inetpl|initcap|int2|int24div|int24eq|int24ge|int24gt|int24le|int24lt|int24mi|int24mul|int24ne|int24pl|int28div|int28eq|int28ge|int28gt|int28le|int28lt|int28mi|int28mul|int28ne|int28pl|int2_accum|int2_avg_accum|int2_mul_cash|int2_sum|int2abs|int2and|int2div|int2eq|int2ge|int2gt|int2in|int2larger|int2le|int2lt|int2mi|int2mod|int2mul|int2ne|int2not|int2or|int2out|int2pl|int2recv|int2send|int2shl|int2shr|int2smaller|int2um|int2up|int2vectoreq|int2vectorin|int2vectorout|int2vectorrecv|int2vectorsend|int2xor|int4|int42div|int42eq|int42ge|int42gt|int42le|int42lt|int42mi|int42mul|int42ne|int42pl|int48div|int48eq|int48ge|int48gt|int48le|int48lt|int48mi|int48mul|int48ne|int48pl|int4_accum|int4_avg_accum|int4_mul_cash|int4_sum|int4abs|int4and|int4div|int4eq|int4ge|int4gt|int4in|int4inc|int4larger|int4le|int4lt|int4mi|int4mod|int4mul|int4ne|int4not|int4or|int4out|int4pl|int4range|int4range_canonical|int4range_subdiff|int4recv|int4send|int4shl|int4shr|int4smaller|int4um|int4up|int4xor|int8|int82div|int82eq|int82ge|int82gt|int82le|int82lt|int82mi|int82mul|int82ne|int82pl|int84div|int84eq|int84ge|int84gt|int84le|int84lt|int84mi|int84mul|int84ne|int84pl|int8_accum|int8_avg|int8_avg_accum|int8_sum|int8abs|int8and|int8div|int8eq|int8ge|int8gt|int8in|int8inc|int8inc_any|int8inc_float8_float8|int8larger|int8le|int8lt|int8mi|int8mod|int8mul|int8ne|int8not|int8or|int8out|int8pl|int8pl_inet|int8range|int8range_canonical|int8range_subdiff|int8recv|int8send|int8shl|int8shr|int8smaller|int8um|int8up|int8xor|integer_pl_date|inter_lb|inter_sb|inter_sl|internal_in|internal_out|interval_accum|interval_avg|interval_cmp|interval_div|interval_eq|interval_ge|interval_gt|interval_hash|interval_in|interval_larger|interval_le|interval_lt|interval_mi|interval_mul|interval_ne|interval_out|interval_pl|interval_pl_date|interval_pl_time|interval_pl_timestamp|interval_pl_timestamptz|interval_pl_timetz|interval_recv|interval_send|interval_smaller|interval_transform|interval_um|intervaltypmodin|intervaltypmodout|intinterval|isclosed|isempty|isfinite|ishorizontal|iso8859_1_to_utf8|iso8859_to_utf8|iso_to_koi8r|iso_to_mic|iso_to_win1251|iso_to_win866|isopen|isparallel|isperp|isvertical|johab_to_utf8|json_agg|json_agg_finalfn|json_agg_transfn|json_array_element|json_array_element_text|json_array_elements|json_array_length|json_each|json_each_text|json_extract_path|json_extract_path_op|json_extract_path_text|json_extract_path_text_op|json_in|json_object_field|json_object_field_text|json_object_keys|json_out|json_populate_record|json_populate_recordset|json_recv|json_send|justify_days|justify_hours|justify_interval|koi8r_to_iso|koi8r_to_mic|koi8r_to_utf8|koi8r_to_win1251|koi8r_to_win866|koi8u_to_utf8|lag|language_handler_in|language_handler_out|last_value|lastval|latin1_to_mic|latin2_to_mic|latin2_to_win1250|latin3_to_mic|latin4_to_mic|lead|left|length|like|like_escape|likejoinsel|likesel|line|line_distance|line_eq|line_horizontal|line_in|line_interpt|line_intersect|line_out|line_parallel|line_perp|line_recv|line_send|line_vertical|ln|lo_close|lo_creat|lo_create|lo_export|lo_import|lo_lseek|lo_lseek64|lo_open|lo_tell|lo_tell64|lo_truncate|lo_truncate64|lo_unlink|log|loread|lower|lower_inc|lower_inf|lowrite|lpad|lseg|lseg_center|lseg_distance|lseg_eq|lseg_ge|lseg_gt|lseg_horizontal|lseg_in|lseg_interpt|lseg_intersect|lseg_le|lseg_length|lseg_lt|lseg_ne|lseg_out|lseg_parallel|lseg_perp|lseg_recv|lseg_send|lseg_vertical|ltrim|macaddr_and|macaddr_cmp|macaddr_eq|macaddr_ge|macaddr_gt|macaddr_in|macaddr_le|macaddr_lt|macaddr_ne|macaddr_not|macaddr_or|macaddr_out|macaddr_recv|macaddr_send|makeaclitem|masklen|max|md5|mic_to_ascii|mic_to_big5|mic_to_euc_cn|mic_to_euc_jp|mic_to_euc_kr|mic_to_euc_tw|mic_to_iso|mic_to_koi8r|mic_to_latin1|mic_to_latin2|mic_to_latin3|mic_to_latin4|mic_to_sjis|mic_to_win1250|mic_to_win1251|mic_to_win866|min|mktinterval|mod|money|mul_d_interval|name|nameeq|namege|namegt|nameiclike|nameicnlike|nameicregexeq|nameicregexne|namein|namele|namelike|namelt|namene|namenlike|nameout|namerecv|nameregexeq|nameregexne|namesend|neqjoinsel|neqsel|netmask|network|network_cmp|network_eq|network_ge|network_gt|network_le|network_lt|network_ne|network_sub|network_subeq|network_sup|network_supeq|nextval|nlikejoinsel|nlikesel|notlike|now|npoints|nth_value|ntile|numeric_abs|numeric_accum|numeric_add|numeric_avg|numeric_avg_accum|numeric_cmp|numeric_div|numeric_div_trunc|numeric_eq|numeric_exp|numeric_fac|numeric_ge|numeric_gt|numeric_in|numeric_inc|numeric_larger|numeric_le|numeric_ln|numeric_log|numeric_lt|numeric_mod|numeric_mul|numeric_ne|numeric_out|numeric_power|numeric_recv|numeric_send|numeric_smaller|numeric_sqrt|numeric_stddev_pop|numeric_stddev_samp|numeric_sub|numeric_transform|numeric_uminus|numeric_uplus|numeric_var_pop|numeric_var_samp|numerictypmodin|numerictypmodout|numnode|numrange|numrange_subdiff|obj_description|octet_length|oid|oideq|oidge|oidgt|oidin|oidlarger|oidle|oidlt|oidne|oidout|oidrecv|oidsend|oidsmaller|oidvectoreq|oidvectorge|oidvectorgt|oidvectorin|oidvectorle|oidvectorlt|oidvectorne|oidvectorout|oidvectorrecv|oidvectorsend|oidvectortypes|on_pb|on_pl|on_ppath|on_ps|on_sb|on_sl|opaque_in|opaque_out|overlaps|overlay|path|path_add|path_add_pt|path_center|path_contain_pt|path_distance|path_div_pt|path_in|path_inter|path_length|path_mul_pt|path_n_eq|path_n_ge|path_n_gt|path_n_le|path_n_lt|path_npoints|path_out|path_recv|path_send|path_sub_pt|pclose|percent_rank|pg_advisory_lock|pg_advisory_lock_shared|pg_advisory_unlock|pg_advisory_unlock_all|pg_advisory_unlock_shared|pg_advisory_xact_lock|pg_advisory_xact_lock_shared|pg_available_extension_versions|pg_available_extensions|pg_backend_pid|pg_backup_start_time|pg_cancel_backend|pg_char_to_encoding|pg_client_encoding|pg_collation_for|pg_collation_is_visible|pg_column_is_updatable|pg_column_size|pg_conf_load_time|pg_conversion_is_visible|pg_create_restore_point|pg_current_xlog_insert_location|pg_current_xlog_location|pg_cursor|pg_database_size|pg_describe_object|pg_encoding_max_length|pg_encoding_to_char|pg_event_trigger_dropped_objects|pg_export_snapshot|pg_extension_config_dump|pg_extension_update_paths|pg_function_is_visible|pg_get_constraintdef|pg_get_expr|pg_get_function_arguments|pg_get_function_identity_arguments|pg_get_function_result|pg_get_functiondef|pg_get_indexdef|pg_get_keywords|pg_get_multixact_members|pg_get_ruledef|pg_get_serial_sequence|pg_get_triggerdef|pg_get_userbyid|pg_get_viewdef|pg_has_role|pg_identify_object|pg_indexes_size|pg_is_in_backup|pg_is_in_recovery|pg_is_other_temp_schema|pg_is_xlog_replay_paused|pg_last_xact_replay_timestamp|pg_last_xlog_receive_location|pg_last_xlog_replay_location|pg_listening_channels|pg_lock_status|pg_ls_dir|pg_my_temp_schema|pg_node_tree_in|pg_node_tree_out|pg_node_tree_recv|pg_node_tree_send|pg_notify|pg_opclass_is_visible|pg_operator_is_visible|pg_opfamily_is_visible|pg_options_to_table|pg_postmaster_start_time|pg_prepared_statement|pg_prepared_xact|pg_read_binary_file|pg_read_file|pg_relation_filenode|pg_relation_filepath|pg_relation_is_updatable|pg_relation_size|pg_reload_conf|pg_rotate_logfile|pg_sequence_parameters|pg_show_all_settings|pg_size_pretty|pg_sleep|pg_start_backup|pg_stat_clear_snapshot|pg_stat_file|pg_stat_get_activity|pg_stat_get_analyze_count|pg_stat_get_autoanalyze_count|pg_stat_get_autovacuum_count|pg_stat_get_backend_activity|pg_stat_get_backend_activity_start|pg_stat_get_backend_client_addr|pg_stat_get_backend_client_port|pg_stat_get_backend_dbid|pg_stat_get_backend_idset|pg_stat_get_backend_pid|pg_stat_get_backend_start|pg_stat_get_backend_userid|pg_stat_get_backend_waiting|pg_stat_get_backend_xact_start|pg_stat_get_bgwriter_buf_written_checkpoints|pg_stat_get_bgwriter_buf_written_clean|pg_stat_get_bgwriter_maxwritten_clean|pg_stat_get_bgwriter_requested_checkpoints|pg_stat_get_bgwriter_stat_reset_time|pg_stat_get_bgwriter_timed_checkpoints|pg_stat_get_blocks_fetched|pg_stat_get_blocks_hit|pg_stat_get_buf_alloc|pg_stat_get_buf_fsync_backend|pg_stat_get_buf_written_backend|pg_stat_get_checkpoint_sync_time|pg_stat_get_checkpoint_write_time|pg_stat_get_db_blk_read_time|pg_stat_get_db_blk_write_time|pg_stat_get_db_blocks_fetched|pg_stat_get_db_blocks_hit|pg_stat_get_db_conflict_all|pg_stat_get_db_conflict_bufferpin|pg_stat_get_db_conflict_lock|pg_stat_get_db_conflict_snapshot|pg_stat_get_db_conflict_startup_deadlock|pg_stat_get_db_conflict_tablespace|pg_stat_get_db_deadlocks|pg_stat_get_db_numbackends|pg_stat_get_db_stat_reset_time|pg_stat_get_db_temp_bytes|pg_stat_get_db_temp_files|pg_stat_get_db_tuples_deleted|pg_stat_get_db_tuples_fetched|pg_stat_get_db_tuples_inserted|pg_stat_get_db_tuples_returned|pg_stat_get_db_tuples_updated|pg_stat_get_db_xact_commit|pg_stat_get_db_xact_rollback|pg_stat_get_dead_tuples|pg_stat_get_function_calls|pg_stat_get_function_self_time|pg_stat_get_function_total_time|pg_stat_get_last_analyze_time|pg_stat_get_last_autoanalyze_time|pg_stat_get_last_autovacuum_time|pg_stat_get_last_vacuum_time|pg_stat_get_live_tuples|pg_stat_get_numscans|pg_stat_get_tuples_deleted|pg_stat_get_tuples_fetched|pg_stat_get_tuples_hot_updated|pg_stat_get_tuples_inserted|pg_stat_get_tuples_returned|pg_stat_get_tuples_updated|pg_stat_get_vacuum_count|pg_stat_get_wal_senders|pg_stat_get_xact_blocks_fetched|pg_stat_get_xact_blocks_hit|pg_stat_get_xact_function_calls|pg_stat_get_xact_function_self_time|pg_stat_get_xact_function_total_time|pg_stat_get_xact_numscans|pg_stat_get_xact_tuples_deleted|pg_stat_get_xact_tuples_fetched|pg_stat_get_xact_tuples_hot_updated|pg_stat_get_xact_tuples_inserted|pg_stat_get_xact_tuples_returned|pg_stat_get_xact_tuples_updated|pg_stat_reset|pg_stat_reset_shared|pg_stat_reset_single_function_counters|pg_stat_reset_single_table_counters|pg_stop_backup|pg_switch_xlog|pg_table_is_visible|pg_table_size|pg_tablespace_databases|pg_tablespace_location|pg_tablespace_size|pg_terminate_backend|pg_timezone_abbrevs|pg_timezone_names|pg_total_relation_size|pg_trigger_depth|pg_try_advisory_lock|pg_try_advisory_lock_shared|pg_try_advisory_xact_lock|pg_try_advisory_xact_lock_shared|pg_ts_config_is_visible|pg_ts_dict_is_visible|pg_ts_parser_is_visible|pg_ts_template_is_visible|pg_type_is_visible|pg_typeof|pg_xlog_location_diff|pg_xlog_replay_pause|pg_xlog_replay_resume|pg_xlogfile_name|pg_xlogfile_name_offset|pi|plainto_tsquery|plpgsql_call_handler|plpgsql_inline_handler|plpgsql_validator|point|point_above|point_add|point_below|point_distance|point_div|point_eq|point_horiz|point_in|point_left|point_mul|point_ne|point_out|point_recv|point_right|point_send|point_sub|point_vert|poly_above|poly_below|poly_center|poly_contain|poly_contain_pt|poly_contained|poly_distance|poly_in|poly_left|poly_npoints|poly_out|poly_overabove|poly_overbelow|poly_overlap|poly_overleft|poly_overright|poly_recv|poly_right|poly_same|poly_send|polygon|popen|position|positionjoinsel|positionsel|postgresql_fdw_validator|pow|power|prsd_end|prsd_headline|prsd_lextype|prsd_nexttoken|prsd_start|pt_contained_circle|pt_contained_poly|query_to_xml|query_to_xml_and_xmlschema|query_to_xmlschema|querytree|quote_ident|quote_literal|quote_nullable|radians|radius|random|range_adjacent|range_after|range_before|range_cmp|range_contained_by|range_contains|range_contains_elem|range_eq|range_ge|range_gist_compress|range_gist_consistent|range_gist_decompress|range_gist_penalty|range_gist_picksplit|range_gist_same|range_gist_union|range_gt|range_in|range_intersect|range_le|range_lt|range_minus|range_ne|range_out|range_overlaps|range_overleft|range_overright|range_recv|range_send|range_typanalyze|range_union|rangesel|rank|record_eq|record_ge|record_gt|record_in|record_le|record_lt|record_ne|record_out|record_recv|record_send|regclass|regclassin|regclassout|regclassrecv|regclasssend|regconfigin|regconfigout|regconfigrecv|regconfigsend|regdictionaryin|regdictionaryout|regdictionaryrecv|regdictionarysend|regexeqjoinsel|regexeqsel|regexnejoinsel|regexnesel|regexp_matches|regexp_replace|regexp_split_to_array|regexp_split_to_table|regoperatorin|regoperatorout|regoperatorrecv|regoperatorsend|regoperin|regoperout|regoperrecv|regopersend|regprocedurein|regprocedureout|regprocedurerecv|regproceduresend|regprocin|regprocout|regprocrecv|regprocsend|regr_avgx|regr_avgy|regr_count|regr_intercept|regr_r2|regr_slope|regr_sxx|regr_sxy|regr_syy|regtypein|regtypeout|regtyperecv|regtypesend|reltime|reltimeeq|reltimege|reltimegt|reltimein|reltimele|reltimelt|reltimene|reltimeout|reltimerecv|reltimesend|repeat|replace|reverse|right|round|row_number|row_to_json|rpad|rtrim|scalargtjoinsel|scalargtsel|scalarltjoinsel|scalarltsel|schema_to_xml|schema_to_xml_and_xmlschema|schema_to_xmlschema|session_user|set_bit|set_byte|set_config|set_masklen|setseed|setval|setweight|shell_in|shell_out|shift_jis_2004_to_euc_jis_2004|shift_jis_2004_to_utf8|shobj_description|sign|similar_escape|sin|sjis_to_euc_jp|sjis_to_mic|sjis_to_utf8|slope|smgreq|smgrin|smgrne|smgrout|spg_kd_choose|spg_kd_config|spg_kd_inner_consistent|spg_kd_picksplit|spg_quad_choose|spg_quad_config|spg_quad_inner_consistent|spg_quad_leaf_consistent|spg_quad_picksplit|spg_range_quad_choose|spg_range_quad_config|spg_range_quad_inner_consistent|spg_range_quad_leaf_consistent|spg_range_quad_picksplit|spg_text_choose|spg_text_config|spg_text_inner_consistent|spg_text_leaf_consistent|spg_text_picksplit|spgbeginscan|spgbuild|spgbuildempty|spgbulkdelete|spgcanreturn|spgcostestimate|spgendscan|spggetbitmap|spggettuple|spginsert|spgmarkpos|spgoptions|spgrescan|spgrestrpos|spgvacuumcleanup|split_part|sqrt|statement_timestamp|stddev|stddev_pop|stddev_samp|string_agg|string_agg_finalfn|string_agg_transfn|string_to_array|strip|strpos|substr|substring|sum|suppress_redundant_updates_trigger|table_to_xml|table_to_xml_and_xmlschema|table_to_xmlschema|tan|text|text_ge|text_gt|text_larger|text_le|text_lt|text_pattern_ge|text_pattern_gt|text_pattern_le|text_pattern_lt|text_smaller|textanycat|textcat|texteq|texticlike|texticnlike|texticregexeq|texticregexne|textin|textlen|textlike|textne|textnlike|textout|textrecv|textregexeq|textregexne|textsend|thesaurus_init|thesaurus_lexize|tideq|tidge|tidgt|tidin|tidlarger|tidle|tidlt|tidne|tidout|tidrecv|tidsend|tidsmaller|time_cmp|time_eq|time_ge|time_gt|time_hash|time_in|time_larger|time_le|time_lt|time_mi_interval|time_mi_time|time_ne|time_out|time_pl_interval|time_recv|time_send|time_smaller|time_transform|timedate_pl|timemi|timenow|timeofday|timepl|timestamp_cmp|timestamp_cmp_date|timestamp_cmp_timestamptz|timestamp_eq|timestamp_eq_date|timestamp_eq_timestamptz|timestamp_ge|timestamp_ge_date|timestamp_ge_timestamptz|timestamp_gt|timestamp_gt_date|timestamp_gt_timestamptz|timestamp_hash|timestamp_in|timestamp_larger|timestamp_le|timestamp_le_date|timestamp_le_timestamptz|timestamp_lt|timestamp_lt_date|timestamp_lt_timestamptz|timestamp_mi|timestamp_mi_interval|timestamp_ne|timestamp_ne_date|timestamp_ne_timestamptz|timestamp_out|timestamp_pl_interval|timestamp_recv|timestamp_send|timestamp_smaller|timestamp_sortsupport|timestamp_transform|timestamptypmodin|timestamptypmodout|timestamptz_cmp|timestamptz_cmp_date|timestamptz_cmp_timestamp|timestamptz_eq|timestamptz_eq_date|timestamptz_eq_timestamp|timestamptz_ge|timestamptz_ge_date|timestamptz_ge_timestamp|timestamptz_gt|timestamptz_gt_date|timestamptz_gt_timestamp|timestamptz_in|timestamptz_larger|timestamptz_le|timestamptz_le_date|timestamptz_le_timestamp|timestamptz_lt|timestamptz_lt_date|timestamptz_lt_timestamp|timestamptz_mi|timestamptz_mi_interval|timestamptz_ne|timestamptz_ne_date|timestamptz_ne_timestamp|timestamptz_out|timestamptz_pl_interval|timestamptz_recv|timestamptz_send|timestamptz_smaller|timestamptztypmodin|timestamptztypmodout|timetypmodin|timetypmodout|timetz_cmp|timetz_eq|timetz_ge|timetz_gt|timetz_hash|timetz_in|timetz_larger|timetz_le|timetz_lt|timetz_mi_interval|timetz_ne|timetz_out|timetz_pl_interval|timetz_recv|timetz_send|timetz_smaller|timetzdate_pl|timetztypmodin|timetztypmodout|timezone|tinterval|tintervalct|tintervalend|tintervaleq|tintervalge|tintervalgt|tintervalin|tintervalle|tintervalleneq|tintervallenge|tintervallengt|tintervallenle|tintervallenlt|tintervallenne|tintervallt|tintervalne|tintervalout|tintervalov|tintervalrecv|tintervalrel|tintervalsame|tintervalsend|tintervalstart|to_ascii|to_char|to_date|to_hex|to_json|to_number|to_timestamp|to_tsquery|to_tsvector|transaction_timestamp|translate|trigger_in|trigger_out|trunc|ts_debug|ts_headline|ts_lexize|ts_match_qv|ts_match_tq|ts_match_tt|ts_match_vq|ts_parse|ts_rank|ts_rank_cd|ts_rewrite|ts_stat|ts_token_type|ts_typanalyze|tsmatchjoinsel|tsmatchsel|tsq_mcontained|tsq_mcontains|tsquery_and|tsquery_cmp|tsquery_eq|tsquery_ge|tsquery_gt|tsquery_le|tsquery_lt|tsquery_ne|tsquery_not|tsquery_or|tsqueryin|tsqueryout|tsqueryrecv|tsquerysend|tsrange|tsrange_subdiff|tstzrange|tstzrange_subdiff|tsvector_cmp|tsvector_concat|tsvector_eq|tsvector_ge|tsvector_gt|tsvector_le|tsvector_lt|tsvector_ne|tsvector_update_trigger|tsvector_update_trigger_column|tsvectorin|tsvectorout|tsvectorrecv|tsvectorsend|txid_current|txid_current_snapshot|txid_snapshot_in|txid_snapshot_out|txid_snapshot_recv|txid_snapshot_send|txid_snapshot_xip|txid_snapshot_xmax|txid_snapshot_xmin|txid_visible_in_snapshot|uhc_to_utf8|unique_key_recheck|unknownin|unknownout|unknownrecv|unknownsend|unnest|upper|upper_inc|upper_inf|utf8_to_ascii|utf8_to_big5|utf8_to_euc_cn|utf8_to_euc_jis_2004|utf8_to_euc_jp|utf8_to_euc_kr|utf8_to_euc_tw|utf8_to_gb18030|utf8_to_gbk|utf8_to_iso8859|utf8_to_iso8859_1|utf8_to_johab|utf8_to_koi8r|utf8_to_koi8u|utf8_to_shift_jis_2004|utf8_to_sjis|utf8_to_uhc|utf8_to_win|uuid_cmp|uuid_eq|uuid_ge|uuid_gt|uuid_hash|uuid_in|uuid_le|uuid_lt|uuid_ne|uuid_out|uuid_recv|uuid_send|var_pop|var_samp|varbit_in|varbit_out|varbit_recv|varbit_send|varbit_transform|varbitcmp|varbiteq|varbitge|varbitgt|varbitle|varbitlt|varbitne|varbittypmodin|varbittypmodout|varchar_transform|varcharin|varcharout|varcharrecv|varcharsend|varchartypmodin|varchartypmodout|variance|version|void_in|void_out|void_recv|void_send|width|width_bucket|win1250_to_latin2|win1250_to_mic|win1251_to_iso|win1251_to_koi8r|win1251_to_mic|win1251_to_win866|win866_to_iso|win866_to_koi8r|win866_to_mic|win866_to_win1251|win_to_utf8|xideq|xideqint4|xidin|xidout|xidrecv|xidsend|xml|xml_in|xml_is_well_formed|xml_is_well_formed_content|xml_is_well_formed_document|xml_out|xml_recv|xml_send|xmlagg|xmlcomment|xmlconcat2|xmlexists|xmlvalidate|xpath|xpath_exists",n=this.createKeywordMapper({ +"support.function":t,keyword:e},"identifier",!0),a=[{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"variable.language",regex:'".*?"'},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:n,regex:"[a-zA-Z_][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|~=|~>=~|~>~|~~|~~\\*"},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}];this.$rules={start:[{token:"comment",regex:"--.*$"},r.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"keyword.statementBegin",regex:"^[a-zA-Z]+",next:"statement"},{token:"support.buildin",regex:"^\\\\[\\S]+.*$"}],statement:[{token:"comment",regex:"--.*$"},{token:"comment",regex:"\\/\\*",next:"commentStatement"},{token:"statementEnd",regex:";",next:"start"},{token:"string",regex:"\\$perl\\$",next:"perl-start"},{token:"string",regex:"\\$python\\$",next:"python-start"},{token:"string",regex:"\\$json\\$",next:"json-start"},{token:"string",regex:"\\$(js|javascript)\\$",next:"javascript-start"},{token:"string",regex:"\\$[\\w_0-9]*\\$$",next:"dollarSql"},{token:"string",regex:"\\$[\\w_0-9]*\\$",next:"dollarStatementString"}].concat(a),dollarSql:[{token:"comment",regex:"--.*$"},{token:"comment",regex:"\\/\\*",next:"commentDollarSql"},{token:"string",regex:"^\\$[\\w_0-9]*\\$",next:"statement"},{token:"string",regex:"\\$[\\w_0-9]*\\$",next:"dollarSqlString"}].concat(a),comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],commentStatement:[{token:"comment",regex:".*?\\*\\/",next:"statement"},{token:"comment",regex:".+"}],commentDollarSql:[{token:"comment",regex:".*?\\*\\/",next:"dollarSql"},{token:"comment",regex:".+"}],dollarStatementString:[{token:"string",regex:".*?\\$[\\w_0-9]*\\$",next:"statement"},{token:"string",regex:".+"}],dollarSqlString:[{token:"string",regex:".*?\\$[\\w_0-9]*\\$",next:"dollarSql"},{token:"string",regex:".+"}]},this.embedRules(r,"doc-",[r.getEndRule("start")]),this.embedRules(_,"perl-",[{token:"string",regex:"\\$perl\\$",next:"statement"}]),this.embedRules(o,"python-",[{token:"string",regex:"\\$python\\$",next:"statement"}]),this.embedRules(s,"json-",[{token:"string",regex:"\\$json\\$",next:"statement"}]),this.embedRules(l,"javascript-",[{token:"string",regex:"\\$(js|javascript)\\$",next:"statement"}])};a.inherits(c,i),t.PgsqlHighlightRules=c}),define("ace/mode/pgsql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pgsql_highlight_rules","ace/range"],function(e,t,n){var a=e("../lib/oop"),r=e("../mode/text").Mode,i=e("./pgsql_highlight_rules").PgsqlHighlightRules,_=(e("../range").Range,function(){this.HighlightRules=i});a.inherits(_,r),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){return"start"==e||"keyword.statementEnd"==e?"":this.$getIndent(t)},this.$id="ace/mode/pgsql"}.call(_.prototype),t.Mode=_}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-php.js b/www/js/vendor/ace/mode-php.js index ec1d231e3..c0325ceea 100755 --- a/www/js/vendor/ace/mode-php.js +++ b/www/js/vendor/ace/mode-php.js @@ -1,3604 +1,3 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/php_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; - -var PhpLangHighlightRules = function() { - var docComment = DocCommentHighlightRules; - var builtinFunctions = lang.arrayToMap( - ('abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|' + - 'aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|' + - 'apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|' + - 'apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|' + - 'apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|' + - 'apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|' + - 'apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|' + - 'apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_combine|' + - 'array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|' + - 'array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|' + - 'array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|' + - 'array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|' + - 'array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|' + - 'array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|' + - 'atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|' + - 'bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|' + - 'bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|' + - 'bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|' + - 'bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|' + - 'bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|' + - 'cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|' + - 'cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|' + - 'cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|' + - 'cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|' + - 'cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|' + - 'cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|' + - 'cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|' + - 'cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|' + - 'cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|' + - 'cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|' + - 'cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|' + - 'cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|' + - 'cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|' + - 'cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|' + - 'cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|' + - 'cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|' + - 'cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|' + - 'cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|' + - 'cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|' + - 'cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|' + - 'cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|' + - 'cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|' + - 'cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|' + - 'cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|' + - 'cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|' + - 'cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|' + - 'cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|' + - 'cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|' + - 'chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|' + - 'class_parents|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|' + - 'classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|' + - 'com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|' + - 'com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|' + - 'convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|' + - 'counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|' + - 'crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|' + - 'ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|' + - 'cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|' + - 'cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|' + - 'cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|' + - 'cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|' + - 'cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|' + - 'cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|' + - 'cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|' + - 'cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|' + - 'cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|' + - 'cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|' + - 'cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|' + - 'curl_copy_handle|curl_errno|curl_error|curl_exec|curl_getinfo|curl_init|curl_multi_add_handle|curl_multi_close|curl_multi_exec|' + - 'curl_multi_getcontent|curl_multi_info_read|curl_multi_init|curl_multi_remove_handle|curl_multi_select|curl_setopt|curl_setopt_array|' + - 'curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|' + - 'date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|' + - 'date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|' + - 'date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|' + - 'dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|' + - 'db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|' + - 'db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|' + - 'db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|' + - 'db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|' + - 'db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|' + - 'db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|' + - 'dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|' + - 'dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|' + - 'dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|' + - 'dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|' + - 'dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|' + - 'dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|' + - 'dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|' + - 'dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|' + - 'dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|' + - 'define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|' + - 'dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|' + - 'dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|' + - 'domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|' + - 'domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|' + - 'domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|' + - 'domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|' + - 'domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|' + - 'domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|' + - 'domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|' + - 'domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|' + - 'domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|' + - 'domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|' + - 'domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|' + - 'domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|' + - 'domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|' + - 'domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|' + - 'domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|' + - 'domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|' + - 'domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|' + - 'enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|' + - 'enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|' + - 'enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|' + - 'enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|' + - 'eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|' + - 'event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|' + - 'event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|' + - 'event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|' + - 'event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|' + - 'expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|' + - 'fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|' + - 'fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|' + - 'fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|' + - 'fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|' + - 'fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|' + - 'fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|' + - 'fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|' + - 'fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|' + - 'fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|' + - 'fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|' + - 'fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|' + - 'fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|' + - 'fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|' + - 'file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|' + - 'filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|' + - 'filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|' + - 'finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|' + - 'forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|' + - 'ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|' + - 'ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|' + - 'ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|' + - 'func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|' + - 'gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|' + - 'geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|' + - 'geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|' + - 'get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|' + - 'get_declared_interfaces|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|' + - 'get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|' + - 'get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|' + - 'getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|' + - 'gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|' + - 'getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|' + - 'getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|' + - 'gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|' + - 'gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|' + - 'gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|' + - 'gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|' + - 'gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|' + - 'gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|' + - 'gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|' + - 'grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|' + - 'gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|' + - 'gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|' + - 'gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|' + - 'gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|' + - 'gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|' + - 'gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|' + - 'gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|' + - 'gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|' + - 'gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|' + - 'gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|' + - 'halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|' + - 'haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|' + - 'harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|' + - 'harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|' + - 'harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|' + - 'harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|' + - 'harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|' + - 'harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|' + - 'harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|' + - 'harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|' + - 'haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|' + - 'harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|' + - 'harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|' + - 'haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|' + - 'haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|' + - 'harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|' + - 'harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|' + - 'harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|' + - 'harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|' + - 'harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|' + - 'harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|' + - 'harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|' + - 'harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|' + - 'harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|' + - 'harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|' + - 'harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|' + - 'harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|' + - 'harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|' + - 'harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|' + - 'hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|' + - 'header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|' + - 'html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|' + - 'http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|' + - 'http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|' + - 'http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|' + - 'http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|' + - 'http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|' + - 'http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|' + - 'http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|' + - 'http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|' + - 'httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|' + - 'httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|' + - 'httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|' + - 'httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|' + - 'httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|' + - 'httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|' + - 'httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|' + - 'httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|' + - 'httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|' + - 'httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|' + - 'httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|' + - 'httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|' + - 'httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|' + - 'httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|' + - 'httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|' + - 'httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|' + - 'httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|' + - 'httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|' + - 'httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|' + - 'httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|' + - 'httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|' + - 'httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|' + - 'httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|' + - 'httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|' + - 'httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|' + - 'httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|' + - 'httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|' + - 'httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|' + - 'httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|' + - 'hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|' + - 'hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|' + - 'hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|' + - 'hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|' + - 'hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|' + - 'hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|' + - 'hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|' + - 'hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|' + - 'hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|' + - 'hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|' + - 'hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|' + - 'hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|' + - 'hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|' + - 'hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|' + - 'ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|' + - 'ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|' + - 'ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|' + - 'ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|' + - 'ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|' + - 'ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|' + - 'ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|' + - 'iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|' + - 'id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|' + - 'idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|' + - 'ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|' + - 'ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|' + - 'ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|' + - 'ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|' + - 'iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|' + - 'iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|' + - 'iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|' + - 'imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|' + - 'imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|' + - 'imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|' + - 'imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|' + - 'imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|' + - 'imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|' + - 'imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|' + - 'imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|' + - 'imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|' + - 'imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|' + - 'imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|' + - 'imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|' + - 'imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|' + - 'imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|' + - 'imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|' + - 'imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|' + - 'imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|' + - 'imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|' + - 'imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|' + - 'imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|' + - 'imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|' + - 'imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|' + - 'imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|' + - 'imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|' + - 'imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|' + - 'imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|' + - 'imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|' + - 'imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|' + - 'imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|' + - 'imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|' + - 'imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|' + - 'imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|' + - 'imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|' + - 'imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|' + - 'imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|' + - 'imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|' + - 'imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|' + - 'imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|' + - 'imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|' + - 'imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|' + - 'imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|' + - 'imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|' + - 'imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|' + - 'imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|' + - 'imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|' + - 'imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|' + - 'imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|' + - 'imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|' + - 'imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|' + - 'imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|' + - 'imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|' + - 'imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|' + - 'imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|' + - 'imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|' + - 'imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|' + - 'imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|' + - 'imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|' + - 'imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|' + - 'imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|' + - 'imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|' + - 'imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|' + - 'imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|' + - 'imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|' + - 'imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|' + - 'imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|' + - 'imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|' + - 'imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|' + - 'imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|' + - 'imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|' + - 'imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|' + - 'imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|' + - 'imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|' + - 'imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|' + - 'imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|' + - 'imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|' + - 'imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|' + - 'imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|' + - 'imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|' + - 'imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|' + - 'imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|' + - 'imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|' + - 'imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|' + - 'imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|' + - 'imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|' + - 'imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|' + - 'imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|' + - 'imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|' + - 'imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|' + - 'imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|' + - 'imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|' + - 'imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|' + - 'imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|' + - 'imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|' + - 'imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|' + - 'imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|' + - 'imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|' + - 'imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|' + - 'imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|' + - 'imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|' + - 'imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|' + - 'imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|' + - 'imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|' + - 'imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|' + - 'imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|' + - 'imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|' + - 'imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|' + - 'imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|' + - 'imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|' + - 'imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|' + - 'imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|' + - 'include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|' + - 'ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|' + - 'ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|' + - 'ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|' + - 'ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|' + - 'ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|' + - 'inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|' + - 'intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|' + - 'is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|' + - 'is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|' + - 'iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|' + - 'iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|' + - 'jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|' + - 'json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|' + - 'kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|' + - 'kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|' + - 'ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|' + - 'ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|' + - 'ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|' + - 'ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|' + - 'ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|' + - 'libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|' + - 'limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|' + - 'lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|' + - 'm_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|' + - 'm_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|' + - 'm_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|' + - 'm_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|' + - 'mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|' + - 'mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|' + - 'mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|' + - 'maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|' + - 'maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|' + - 'maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|' + - 'maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|' + - 'maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|' + - 'maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|' + - 'maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|' + - 'maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|' + - 'maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|' + - 'maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|' + - 'maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|' + - 'maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|' + - 'maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|' + - 'maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|' + - 'maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|' + - 'mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|' + - 'mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|' + - 'mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|' + - 'mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|' + - 'mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|' + - 'mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|' + - 'mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|' + - 'mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|' + - 'mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|' + - 'mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|' + - 'mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|' + - 'mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|' + - 'mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|' + - 'mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|' + - 'mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|' + - 'ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|' + - 'mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|' + - 'mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|' + - 'mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|' + - 'mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|' + - 'mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|' + - 'msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|' + - 'msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|' + - 'msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|' + - 'msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|' + - 'msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|' + - 'msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|' + - 'msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|' + - 'mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|' + - 'mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|' + - 'mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|' + - 'mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|' + - 'mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|' + - 'mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|' + - 'mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|' + - 'mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|' + - 'mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|' + - 'mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|' + - 'mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_bind_param|' + - 'mysqli_bind_result|mysqli_client_encoding|mysqli_connect|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|' + - 'mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_escape_string|mysqli_execute|mysqli_fetch|mysqli_get_metadata|' + - 'mysqli_master_query|mysqli_param_count|mysqli_report|mysqli_result|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|' + - 'mysqli_send_long_data|mysqli_send_query|mysqli_set_opt|mysqli_slave_query|mysqli_stmt|mysqli_warning|mysqlnd_ms_get_stats|' + - 'mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|' + - 'mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|' + - 'ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|' + - 'ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|' + - 'ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|' + - 'ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|' + - 'ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|' + - 'ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|' + - 'ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|' + - 'ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|' + - 'ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|' + - 'ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|' + - 'ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|' + - 'ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|' + - 'ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|' + - 'ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|' + - 'ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|' + - 'ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|' + - 'ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|' + - 'ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|' + - 'ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|' + - 'ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|' + - 'ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|' + - 'ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|' + - 'newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|' + - 'newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|' + - 'newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|' + - 'newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|' + - 'newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|' + - 'newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|' + - 'newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|' + - 'newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|' + - 'newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|' + - 'newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|' + - 'newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|' + - 'newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|' + - 'newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|' + - 'newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|' + - 'newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|' + - 'newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|' + - 'newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|' + - 'newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|' + - 'newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|' + - 'notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|' + - 'notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|' + - 'numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|' + - 'ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|' + - 'ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|' + - 'oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|' + - 'oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|' + - 'oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|' + - 'oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|' + - 'oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|' + - 'oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|' + - 'oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|' + - 'oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|' + - 'oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|' + - 'ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|' + - 'ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|' + - 'ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|' + - 'ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|' + - 'ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|' + - 'octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|' + - 'odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|' + - 'odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|' + - 'odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|' + - 'odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|' + - 'odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|' + - 'openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|' + - 'openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|' + - 'openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|' + - 'openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|' + - 'openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|' + - 'openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|' + - 'openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|' + - 'openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|' + - 'openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|' + - 'openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|' + - 'openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|' + - 'outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|' + - 'ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|' + - 'ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|' + - 'ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|' + - 'parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|' + - 'pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|' + - 'pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|' + - 'pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|' + - 'pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|' + - 'pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|' + - 'pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|' + - 'pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|' + - 'pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|' + - 'pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|' + - 'pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|' + - 'pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|' + - 'pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|' + - 'pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|' + - 'pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|' + - 'pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|' + - 'pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|' + - 'pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|' + - 'pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|' + - 'pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|' + - 'pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|' + - 'pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|' + - 'pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|' + - 'pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|' + - 'pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|' + - 'pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|' + - 'pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|' + - 'pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|' + - 'pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|' + - 'pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|' + - 'pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|' + - 'pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|' + - 'pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|' + - 'pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|' + - 'pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|' + - 'pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|' + - 'php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|' + - 'png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|' + - 'posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|' + - 'posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|' + - 'posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|' + - 'preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|' + - 'printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|' + - 'printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|' + - 'printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|' + - 'printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|' + - 'printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|' + - 'ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|' + - 'ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|' + - 'ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|' + - 'ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|' + - 'ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|' + - 'ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|' + - 'ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|' + - 'ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|' + - 'ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|' + - 'pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|' + - 'pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|' + - 'pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|' + - 'px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|' + - 'px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|' + - 'px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|' + - 'radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|' + - 'radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|' + - 'radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|' + - 'radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|' + - 'rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|' + - 'readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|' + - 'readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|' + - 'readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|' + - 'recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|' + - 'recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|' + - 'reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|' + - 'regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|require|require_once|reset|resetValue|' + - 'resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|' + - 'rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|' + - 'rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|' + - 'runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|' + - 'runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|' + - 'runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|' + - 'runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|' + - 'samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|' + - 'samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|' + - 'sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|' + - 'sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|' + - 'sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|' + - 'sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|' + - 'sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|' + - 'sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|' + - 'sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|' + - 'sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|' + - 'sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|' + - 'sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|' + - 'sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|' + - 'sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|' + - 'sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|' + - 'sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|' + - 'sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|' + - 'sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|' + - 'sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|' + - 'sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|' + - 'sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|' + - 'sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|' + - 'session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|' + - 'session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|' + - 'session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|' + - 'session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|' + - 'set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|' + - 'setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|' + - 'shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|' + - 'similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|' + - 'snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|' + - 'snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|' + - 'snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|' + - 'soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|' + - 'socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|' + - 'socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|' + - 'socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|' + - 'solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|' + - 'solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|' + - 'solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|' + - 'spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|' + - 'splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|' + - 'splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|' + - 'sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|' + - 'sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|' + - 'sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|' + - 'sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|' + - 'sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|' + - 'sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|' + - 'ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|' + - 'ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|' + - 'ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|' + - 'ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|' + - 'stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|' + - 'stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|' + - 'stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|' + - 'stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|' + - 'stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|' + - 'stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|' + - 'stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|' + - 'stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|' + - 'stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|' + - 'stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|' + - 'stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|' + - 'stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|' + - 'str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|' + - 'stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|' + - 'stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|' + - 'stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|' + - 'stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|' + - 'stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|' + - 'stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|' + - 'stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|' + - 'stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|' + - 'stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|' + - 'strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|' + - 'svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|' + - 'svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|' + - 'svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|' + - 'svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|' + - 'svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|' + - 'svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|' + - 'swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|' + - 'swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|' + - 'swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|' + - 'swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|' + - 'swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|' + - 'swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|' + - 'swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|' + - 'swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|' + - 'swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|' + - 'swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|' + - 'swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|' + - 'swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|' + - 'swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|' + - 'sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|' + - 'sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|' + - 'sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|' + - 'sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|' + - 'tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|' + - 'tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|' + - 'time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|' + - 'timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|' + - 'tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|transliterator|traversable|trigger_error|trim|uasort|ucfirst|' + - 'ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|' + - 'udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|' + - 'udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|' + - 'uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|' + - 'urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|' + - 'variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|' + - 'variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|' + - 'variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|' + - 'vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|' + - 'vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|' + - 'vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|' + - 'w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|' + - 'wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|' + - 'win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|' + - 'win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|' + - 'wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|' + - 'wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|' + - 'wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|' + - 'wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|' + - 'xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|' + - 'xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|' + - 'xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|' + - 'xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|' + - 'xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|' + - 'xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|' + - 'xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|' + - 'xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|' + - 'xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|' + - 'xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|' + - 'xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|' + - 'xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|' + - 'xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|' + - 'xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|' + - 'xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|' + - 'xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|' + - 'xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|' + - 'xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|' + - 'xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|' + - 'xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|' + - 'xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|' + - 'xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|' + - 'yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|' + - 'yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|' + - 'yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|' + - 'yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|' + - 'zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|' + - 'ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|' + - 'ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|' + - 'ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|' + - 'ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|' + - 'ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|' + - 'ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type').split('|') - ); - var keywords = lang.arrayToMap( - ('abstract|and|array|as|break|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|endif|' + - 'endswitch|endwhile|extends|final|for|foreach|function|global|goto|if|implements|interface|instanceof|namespace|new|or|private|protected|' + - 'public|static|switch|throw|try|use|var|while|xor').split('|') - ); - var languageConstructs = lang.arrayToMap( - ('die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset').split('|') - ); - - var builtinConstants = lang.arrayToMap( - ('true|false|null|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__').split('|') - ); - - var builtinVariables = lang.arrayToMap( - ('$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|' + - '$http_response_header|$argc|$argv').split('|') - ); - var builtinFunctionsDeprecated = lang.arrayToMap( - ('key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|' + - 'com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|' + - 'cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|' + - 'hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|' + - 'maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|' + - 'mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|' + - 'mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|' + - 'mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|' + - 'mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|' + - 'mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|' + - 'mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|' + - 'ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|' + - 'ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|' + - 'ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|' + - 'ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|' + - 'ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|' + - 'PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|' + - 'PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|' + - 'PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|' + - 'PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|' + - 'PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|' + - 'PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|' + - 'PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|' + - 'PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|' + - 'px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregister' + - 'set_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|' + - 'sql_regcase').split('|') - ); - - var keywordsDeprecated = lang.arrayToMap( - ('cfunction|old_function').split('|') - ); - - var futureReserved = lang.arrayToMap([]); - - this.$rules = { - "start" : [ - { - token : "comment", - regex : /(?:#|\/\/)(?:[^?]|\?[^>])*/ - }, - docComment.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment" - }, { - token : "string.regexp", - regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)" - }, { - token : "string", // " string start - regex : '"', - next : "qqstring" - }, { - token : "string", // ' string start - regex : "'", - next : "qstring" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "constant.language", // constants - regex : "\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|" + - "ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|" + - "HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|" + - "L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|" + - "VERSION))|__COMPILER_HALT_OFFSET__)\\b" - }, { - token : ["keyword", "text", "support.class"], - regex : "\\b(new)(\\s+)(\\w+)" - }, { - token : ["support.class", "keyword.operator"], - regex : "\\b(\\w+)(::)" - }, { - token : "constant.language", // constants - regex : "\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|" + - "SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|" + - "O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|" + - "R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|" + - "YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|" + - "ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|" + - "T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|" + - "HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|" + - "I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|" + - "O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|" + - "L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|" + - "M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|" + - "OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|" + - "P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|" + - "RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|" + - "T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR)|STD(?:IN|OUT|ERR))\\b" - }, { - token : function(value) { - if (keywords.hasOwnProperty(value)) - return "keyword"; - else if (builtinConstants.hasOwnProperty(value)) - return "constant.language"; - else if (builtinVariables.hasOwnProperty(value)) - return "variable.language"; - else if (futureReserved.hasOwnProperty(value)) - return "invalid.illegal"; - else if (builtinFunctions.hasOwnProperty(value)) - return "support.function"; - else if (value == "debugger") - return "invalid.deprecated"; - else - if(value.match(/^(\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*|self|parent)$/)) - return "variable"; - return "identifier"; - }, - regex : /[a-zA-Z_$\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/ - }, { - onMatch : function(value, currentSate, state) { - value = value.substr(3); - if (value[0] == "'" || value[0] == '"') - value = value.slice(1, -1); - state.unshift(this.next, value); - return "markup.list"; - }, - regex : /<<<(?:\w+|'\w+'|"\w+")$/, - next: "heredoc" - }, { - token : "keyword.operator", - regex : "::|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|!=|!==|<=|>=|=>|<<=|>>=|>>>=|<>|<|>|=|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "heredoc" : [ - { - onMatch : function(value, currentSate, stack) { - if (stack[1] != value) - return "string"; - stack.shift(); - stack.shift(); - return "markup.list"; - }, - regex : "^\\w+(?=;?$)", - next: "start" - }, { - token: "string", - regex : ".*" - } - ], - "comment" : [ - { - token : "comment", - regex : "\\*\\/", - next : "start" - }, { - defaultToken : "comment" - } - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : '\\\\(?:[nrtvef\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})' - }, { - token : "variable", - regex : /\$[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/ - }, { - token : "variable", - regex : /\$\{[^"\}]+\}?/ // this is wrong but ok for now - }, - {token : "string", regex : '"', next : "start"}, - {defaultToken : "string"} - ], - "qstring" : [ - {token : "constant.language.escape", regex : /\\['\\]/}, - {token : "string", regex : "'", next : "start"}, - {defaultToken : "string"} - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); -}; - -oop.inherits(PhpLangHighlightRules, TextHighlightRules); - - -var PhpHighlightRules = function() { - HtmlHighlightRules.call(this); - - var startRules = [ - { - token : "support.php_tag", // php open tag - regex : "<\\?(?:php|=)?", - push : "php-start" - } - ]; - - var endRules = [ - { - token : "support.php_tag", // php close tag - regex : "\\?>", - next : "pop" - } - ]; - - for (var key in this.$rules) - this.$rules[key].unshift.apply(this.$rules[key], startRules); - - this.embedRules(PhpLangHighlightRules, "php-", endRules, ["start"]); - - this.normalizeRules(); -}; - -oop.inherits(PhpHighlightRules, HtmlHighlightRules); - -exports.PhpHighlightRules = PhpHighlightRules; -exports.PhpLangHighlightRules = PhpLangHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = CssHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.foldingRules = "cStyle"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("csslint", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/css"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === " -1; -} - -(function() { - - this.getFoldWidget = function(session, foldStyle, row) { - var tag = this._getFirstTagInLine(session, row); - - if (!tag) - return ""; - - if (tag.closing || (!tag.tagName && tag.selfClosing)) - return foldStyle == "markbeginend" ? "end" : ""; - - if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) - return ""; - - if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) - return ""; - - return "start"; - }; - this._getFirstTagInLine = function(session, row) { - var tokens = session.getTokens(row); - var tag = new Tag(); - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (is(token, "tag-open")) { - tag.end.column = tag.start.column + token.value.length; - tag.closing = is(token, "end-tag-open"); - token = tokens[++i]; - if (!token) - return null; - tag.tagName = token.value; - tag.end.column += token.value.length; - for (i++; i < tokens.length; i++) { - token = tokens[i]; - tag.end.column += token.value.length; - if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - break; - } - } - return tag; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - return tag; - } - tag.start.column += token.value.length; - } - - return null; - }; - - this._findEndTagInLine = function(session, row, tagName, startColumn) { - var tokens = session.getTokens(row); - var column = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - column += token.value.length; - if (column < startColumn) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var firstTag = this._getFirstTagInLine(session, row); - - if (!firstTag) - return null; - - var isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var MixedFoldMode = require("./mixed").FoldMode; -var XmlFoldMode = require("./xml").FoldMode; -var CStyleFoldMode = require("./cstyle").FoldMode; - -var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { - MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { - "js-": new CStyleFoldMode(), - "css-": new CStyleFoldMode() - }); -}; - -oop.inherits(FoldMode, MixedFoldMode); - -}); - -define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var TokenIterator = require("../token_iterator").TokenIterator; - -var commonAttributes = [ - "accesskey", - "class", - "contenteditable", - "contextmenu", - "dir", - "draggable", - "dropzone", - "hidden", - "id", - "inert", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "lang", - "spellcheck", - "style", - "tabindex", - "title", - "translate" -]; - -var eventAttributes = [ - "onabort", - "onblur", - "oncancel", - "oncanplay", - "oncanplaythrough", - "onchange", - "onclick", - "onclose", - "oncontextmenu", - "oncuechange", - "ondblclick", - "ondrag", - "ondragend", - "ondragenter", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onended", - "onerror", - "onfocus", - "oninput", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeyup", - "onload", - "onloadeddata", - "onloadedmetadata", - "onloadstart", - "onmousedown", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onpause", - "onplay", - "onplaying", - "onprogress", - "onratechange", - "onreset", - "onscroll", - "onseeked", - "onseeking", - "onselect", - "onshow", - "onstalled", - "onsubmit", - "onsuspend", - "ontimeupdate", - "onvolumechange", - "onwaiting" -]; - -var globalAttributes = commonAttributes.concat(eventAttributes); - -var attributeMap = { - "html": ["manifest"], - "head": [], - "title": [], - "base": ["href", "target"], - "link": ["href", "hreflang", "rel", "media", "type", "sizes"], - "meta": ["http-equiv", "name", "content", "charset"], - "style": ["type", "media", "scoped"], - "script": ["charset", "type", "src", "defer", "async"], - "noscript": ["href"], - "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], - "section": [], - "nav": [], - "article": ["pubdate"], - "aside": [], - "h1": [], - "h2": [], - "h3": [], - "h4": [], - "h5": [], - "h6": [], - "header": [], - "footer": [], - "address": [], - "main": [], - "p": [], - "hr": [], - "pre": [], - "blockquote": ["cite"], - "ol": ["start", "reversed"], - "ul": [], - "li": ["value"], - "dl": [], - "dt": [], - "dd": [], - "figure": [], - "figcaption": [], - "div": [], - "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], - "em": [], - "strong": [], - "small": [], - "s": [], - "cite": [], - "q": ["cite"], - "dfn": [], - "abbr": [], - "data": [], - "time": ["datetime"], - "code": [], - "var": [], - "samp": [], - "kbd": [], - "sub": [], - "sup": [], - "i": [], - "b": [], - "u": [], - "mark": [], - "ruby": [], - "rt": [], - "rp": [], - "bdi": [], - "bdo": [], - "span": [], - "br": [], - "wbr": [], - "ins": ["cite", "datetime"], - "del": ["cite", "datetime"], - "img": ["alt", "src", "height", "width", "usemap", "ismap"], - "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], - "embed": ["src", "height", "width", "type"], - "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], - "param": ["name", "value"], - "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], - "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], - "source": ["src", "type", "media"], - "track": ["kind", "src", "srclang", "label", "default"], - "canvas": ["width", "height"], - "map": ["name"], - "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], - "svg": [], - "math": [], - "table": ["summary"], - "caption": [], - "colgroup": ["span"], - "col": ["span"], - "tbody": [], - "thead": [], - "tfoot": [], - "tr": [], - "td": ["headers", "rowspan", "colspan"], - "th": ["headers", "rowspan", "colspan", "scope"], - "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], - "fieldset": ["disabled", "form", "name"], - "legend": [], - "label": ["form", "for"], - "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], - "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], - "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], - "datalist": [], - "optgroup": ["disabled", "label"], - "option": ["disabled", "selected", "label", "value"], - "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], - "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], - "output": ["for", "form", "name"], - "progress": ["value", "max"], - "meter": ["value", "min", "max", "low", "high", "optimum"], - "details": ["open"], - "summary": [], - "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], - "menu": ["type", "label"], - "dialog": ["open"] -}; - -var elements = Object.keys(attributeMap); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -function findTagName(session, pos) { - var iterator = new TokenIterator(session, pos.row, pos.column); - var token = iterator.getCurrentToken(); - while (token && !is(token, "tag-name")){ - token = iterator.stepBackward(); - } - if (token) - return token.value; -} - -var HtmlCompletions = function() { - -}; - -(function() { - - this.getCompletions = function(state, session, pos, prefix) { - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) - return this.getTagCompletions(state, session, pos, prefix); - if (is(token, "tag-whitespace") || is(token, "attribute-name")) - return this.getAttributeCompetions(state, session, pos, prefix); - - return []; - }; - - this.getTagCompletions = function(state, session, pos, prefix) { - return elements.map(function(element){ - return { - value: element, - meta: "tag", - score: Number.MAX_VALUE - }; - }); - }; - - this.getAttributeCompetions = function(state, session, pos, prefix) { - var tagName = findTagName(session, pos); - if (!tagName) - return []; - var attributes = globalAttributes; - if (tagName in attributeMap) { - attributes = attributes.concat(attributeMap[tagName]); - } - return attributes.map(function(attribute){ - return { - caption: attribute, - snippet: attribute + '="$0"', - meta: "attribute", - score: Number.MAX_VALUE - }; - }); - }; - -}).call(HtmlCompletions.prototype); - -exports.HtmlCompletions = HtmlCompletions; -}); - -define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var CssMode = require("./css").Mode; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; -var HtmlFoldMode = require("./folding/html").FoldMode; -var HtmlCompletions = require("./html_completions").HtmlCompletions; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; -var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; - -var Mode = function(options) { - this.fragmentContext = options && options.fragmentContext; - this.HighlightRules = HtmlHighlightRules; - this.$behaviour = new XmlBehaviour(); - this.$completer = new HtmlCompletions(); - - this.createModeDelegates({ - "js-": JavaScriptMode, - "css-": CssMode - }); - - this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.blockComment = {start: ""}; - - this.voidElements = lang.arrayToMap(voidElements); - - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - this.checkOutdent = function(state, line, input) { - return false; - }; - - this.getCompletions = function(state, session, pos, prefix) { - return this.$completer.getCompletions(state, session, pos, prefix); - }; - - this.createWorker = function(session) { - if (this.constructor != Mode) - return; - var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - if (this.fragmentContext) - worker.call("setOptions", [{context: this.fragmentContext}]); - - worker.on("error", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/html"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/php",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/php_highlight_rules","ace/mode/php_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/unicode","ace/mode/html","ace/mode/javascript","ace/mode/css"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules; -var PhpLangHighlightRules = require("./php_highlight_rules").PhpLangHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; -var unicode = require("../unicode"); -var HtmlMode = require("./html").Mode; -var JavaScriptMode = require("./javascript").Mode; -var CssMode = require("./css").Mode; - -var PhpMode = function(opts) { - this.HighlightRules = PhpLangHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(PhpMode, TextMode); - -(function() { - - this.tokenRe = new RegExp("^[" - + unicode.packages.L - + unicode.packages.Mn + unicode.packages.Mc - + unicode.packages.Nd - + unicode.packages.Pc + "\_]+", "g" - ); - - this.nonTokenRe = new RegExp("^(?:[^" - + unicode.packages.L - + unicode.packages.Mn + unicode.packages.Mc - + unicode.packages.Nd - + unicode.packages.Pc + "\_]|\s])+", "g" - ); - - - this.lineCommentStart = ["//", "#"]; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[\:]\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState != "doc-start") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/php-inline"; -}).call(PhpMode.prototype); - -var Mode = function(opts) { - if (opts && opts.inline) { - var mode = new PhpMode(); - mode.createWorker = this.createWorker; - mode.inlinePhp = true; - return mode; - } - HtmlMode.call(this); - this.HighlightRules = PhpHighlightRules; - this.createModeDelegates({ - "js-": JavaScriptMode, - "css-": CssMode, - "php-": PhpMode - }); - this.foldingRules.subModes["php-"] = new CStyleFoldMode(); -}; -oop.inherits(Mode, HtmlMode); - -(function() { - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/php_worker", "PhpWorker"); - worker.attachToDocument(session.getDocument()); - - if (this.inlinePhp) - worker.call("setOptions", [{inline: true}]); - - worker.on("error", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("ok", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/php"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,_){"use strict";var r=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(i,a),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,_){"use strict";var r=e("../lib/oop"),a=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),i=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",s=t.supportFunction="rgb|rgba|url|attr|counter|counters",o=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",n=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",c=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",l=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",d=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",m=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",p=function(){var e=this.createKeywordMapper({"support.function":s,"support.constant":o,"support.type":i,"support.constant.color":n,"support.constant.fonts":c},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+l+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:l},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:d},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:m},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};r.inherits(p,a),t.CssHighlightRules=p}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,_){"use strict";var r=e("../lib/oop"),a=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,s=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),_="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},a.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+r+")(\\.)(prototype)(\\.)("+r+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+_+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:r},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[a.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[a.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[a.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[a.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[a.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,_){return this.next="{"==e?this.nextState:"","{"==e&&_.length?(_.unshift("start",t),"paren"):"}"==e&&_.length&&(_.shift(),this.next=_.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(a,"doc-",[a.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(s,i),t.JavaScriptHighlightRules=s}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,_){"use strict";var r=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules,i=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===i&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,_){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+_+".tag-name.xml"],regex:"(<)("+_+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[_+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,_){return _.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+_+".tag-name.xml"],regex:"(|$))",next:_+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(a.prototype),r.inherits(i,a),t.XmlHighlightRules=i}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,_){"use strict";var r=e("../lib/oop"),a=e("../lib/lang"),i=e("./css_highlight_rules").CssHighlightRules,s=e("./javascript_highlight_rules").JavaScriptHighlightRules,o=e("./xml_highlight_rules").XmlHighlightRules,n=a.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),c=function(){o.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var _=n[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(_?"."+_:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(i,"css-","style"),this.embedTagRules(s,"js-","script"),this.constructor===c&&this.normalizeRules()};r.inherits(c,o),t.HtmlHighlightRules=c}),define("ace/mode/php_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,t,_){"use strict";var r=e("../lib/oop"),a=e("../lib/lang"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,o=e("./html_highlight_rules").HtmlHighlightRules,n=function(){var e=i,t=a.arrayToMap("abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_combine|array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|class_parents|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|curl_copy_handle|curl_errno|curl_error|curl_exec|curl_getinfo|curl_init|curl_multi_add_handle|curl_multi_close|curl_multi_exec|curl_multi_getcontent|curl_multi_info_read|curl_multi_init|curl_multi_remove_handle|curl_multi_select|curl_setopt|curl_setopt_array|curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|get_declared_interfaces|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|m_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|m_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|m_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|m_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_bind_param|mysqli_bind_result|mysqli_client_encoding|mysqli_connect|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_escape_string|mysqli_execute|mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_report|mysqli_result|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_send_long_data|mysqli_send_query|mysqli_set_opt|mysqli_slave_query|mysqli_stmt|mysqli_warning|mysqlnd_ms_get_stats|mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|require|require_once|reset|resetValue|resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|transliterator|traversable|trigger_error|trim|uasort|ucfirst|ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type".split("|")),_=a.arrayToMap("abstract|and|array|as|break|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|final|for|foreach|function|global|goto|if|implements|interface|instanceof|namespace|new|or|private|protected|public|static|switch|throw|try|use|var|while|xor".split("|")),r=(a.arrayToMap("die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset".split("|")), +a.arrayToMap("true|false|null|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__".split("|"))),s=a.arrayToMap("$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|$http_response_header|$argc|$argv".split("|")),o=(a.arrayToMap("key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregisterset_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|sql_regcase".split("|")),a.arrayToMap("cfunction|old_function".split("|")),a.arrayToMap([]));this.$rules={start:[{token:"comment",regex:/(?:#|\/\/)(?:[^?]|\?[^>])*/},e.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)"},{token:"string",regex:'"',next:"qqstring"},{token:"string",regex:"'",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language",regex:"\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|VERSION))|__COMPILER_HALT_OFFSET__)\\b"},{token:["keyword","text","support.class"],regex:"\\b(new)(\\s+)(\\w+)"},{token:["support.class","keyword.operator"],regex:"\\b(\\w+)(::)"},{token:"constant.language",regex:"\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR)|STD(?:IN|OUT|ERR))\\b"},{token:function(e){return _.hasOwnProperty(e)?"keyword":r.hasOwnProperty(e)?"constant.language":s.hasOwnProperty(e)?"variable.language":o.hasOwnProperty(e)?"invalid.illegal":t.hasOwnProperty(e)?"support.function":"debugger"==e?"invalid.deprecated":e.match(/^(\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*|self|parent)$/)?"variable":"identifier"},regex:/[a-zA-Z_$\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/},{onMatch:function(e,t,_){return e=e.substr(3),"'"!=e[0]&&'"'!=e[0]||(e=e.slice(1,-1)),_.unshift(this.next,e),"markup.list"},regex:/<<<(?:\w+|'\w+'|"\w+")$/,next:"heredoc"},{token:"keyword.operator",regex:"::|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|!=|!==|<=|>=|=>|<<=|>>=|>>>=|<>|<|>|=|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],heredoc:[{onMatch:function(e,t,_){return _[1]!=e?"string":(_.shift(),_.shift(),"markup.list")},regex:"^\\w+(?=;?$)",next:"start"},{token:"string",regex:".*"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"constant.language.escape",regex:'\\\\(?:[nrtvef\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})'},{token:"variable",regex:/\$[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/},{token:"variable",regex:/\$\{[^"\}]+\}?/},{token:"string",regex:'"',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string",regex:"'",next:"start"},{defaultToken:"string"}]},this.embedRules(i,"doc-",[i.getEndRule("start")])};r.inherits(n,s);var c=function(){o.call(this);var e=[{token:"support.php_tag",regex:"<\\?(?:php|=)?",push:"php-start"}],t=[{token:"support.php_tag",regex:"\\?>",next:"pop"}];for(var _ in this.$rules)this.$rules[_].unshift.apply(this.$rules[_],e);this.embedRules(n,"php-",t,["start"]),this.normalizeRules()};r.inherits(c,o),t.PhpHighlightRules=c,t.PhpLangHighlightRules=n}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,_){"use strict";var r=e("../range").Range,a=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var _=e.getLine(t),a=_.match(/^(\s*\})/);if(!a)return 0;var i=a[1].length,s=e.findMatchingBracket({row:t,column:i});if(!s||s.row==t)return 0;var o=this.$getIndent(e.getLine(s.row));e.replace(new r(t,0,t,i-1),o)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(a.prototype),t.MatchingBraceOutdent=a}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,_){"use strict";var r,a=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=e("../../lib/lang"),n=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],l={},d=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,l.rangeCount!=e.multiSelect.rangeCount&&(l={rangeCount:e.multiSelect.rangeCount})),l[t]?r=l[t]:void(r=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},m=function(){this.add("braces","insertion",function(e,t,_,a,i){var s=_.getCursorPosition(),n=a.doc.getLine(s.row);if("{"==i){d(_);var c=_.getSelectionRange(),l=a.doc.getTextRange(c);if(""!==l&&"{"!==l&&_.getWrapBehavioursEnabled())return{text:"{"+l+"}",selection:!1};if(m.isSaneInsertion(_,a))return/[\]\}\)]/.test(n[s.column])||_.inMultiSelectMode?(m.recordAutoInsert(_,a,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(_,a,"{"),{text:"{",selection:[1,1]})}else if("}"==i){d(_);var p=n.substring(s.column,s.column+1);if("}"==p){var g=a.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(null!==g&&m.isAutoInsertedClosing(s,n,i))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){d(_);var u="";m.isMaybeInsertedClosing(s,n)&&(u=o.stringRepeat("}",r.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var p=n.substring(s.column,s.column+1);if("}"===p){var f=a.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!f)return null;var h=this.$getIndent(a.getLine(f.row))}else{if(!u)return void m.clearMaybeInsertedClosing();var h=this.$getIndent(n)}var b=h+a.getTabString();return{text:"\n"+b+"\n"+h+u,selection:[1,b.length,1,b.length]}}m.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,_,a,i){var s=a.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==s){d(_);var o=a.doc.getLine(i.start.row),n=o.substring(i.end.column,i.end.column+1);if("}"==n)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,_,r,a){if("("==a){d(_);var i=_.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&_.getWrapBehavioursEnabled())return{text:"("+s+")",selection:!1};if(m.isSaneInsertion(_,r))return m.recordAutoInsert(_,r,")"),{text:"()",selection:[1,1]}}else if(")"==a){d(_);var o=_.getCursorPosition(),n=r.doc.getLine(o.row),c=n.substring(o.column,o.column+1);if(")"==c){var l=r.$findOpeningBracket(")",{column:o.column+1,row:o.row});if(null!==l&&m.isAutoInsertedClosing(o,n,a))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,_,r,a){var i=r.doc.getTextRange(a);if(!a.isMultiLine()&&"("==i){d(_);var s=r.doc.getLine(a.start.row),o=s.substring(a.start.column+1,a.start.column+2);if(")"==o)return a.end.column++,a}}),this.add("brackets","insertion",function(e,t,_,r,a){if("["==a){d(_);var i=_.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&_.getWrapBehavioursEnabled())return{text:"["+s+"]",selection:!1};if(m.isSaneInsertion(_,r))return m.recordAutoInsert(_,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==a){d(_);var o=_.getCursorPosition(),n=r.doc.getLine(o.row),c=n.substring(o.column,o.column+1);if("]"==c){var l=r.$findOpeningBracket("]",{column:o.column+1,row:o.row});if(null!==l&&m.isAutoInsertedClosing(o,n,a))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,_,r,a){var i=r.doc.getTextRange(a);if(!a.isMultiLine()&&"["==i){d(_);var s=r.doc.getLine(a.start.row),o=s.substring(a.start.column+1,a.start.column+2);if("]"==o)return a.end.column++,a}}),this.add("string_dquotes","insertion",function(e,t,_,r,a){if('"'==a||"'"==a){d(_);var i=a,s=_.getSelectionRange(),o=r.doc.getTextRange(s);if(""!==o&&"'"!==o&&'"'!=o&&_.getWrapBehavioursEnabled())return{text:i+o+i,selection:!1};var n=_.getCursorPosition(),c=r.doc.getLine(n.row),l=c.substring(n.column-1,n.column),m=c.substring(n.column,n.column+1),p=r.getTokenAt(n.row,n.column),g=r.getTokenAt(n.row,n.column+1);if("\\"==l&&p&&/escape/.test(p.type))return null;var u,f=p&&/string/.test(p.type),h=!g||/string/.test(g.type);if(m==i)u=f!==h;else{if(f&&!h)return null;if(f&&h)return null;var b=r.$mode.tokenRe;b.lastIndex=0;var x=b.test(l);b.lastIndex=0;var k=b.test(l);if(x||k)return null;if(m&&!/[\s;,.})\]\\]/.test(m))return null;u=!0}return{text:u?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,_,r,a){var i=r.doc.getTextRange(a);if(!a.isMultiLine()&&('"'==i||"'"==i)){d(_);var s=r.doc.getLine(a.start.row),o=s.substring(a.start.column+1,a.start.column+2);if(o==i)return a.end.column++,a}})};m.isSaneInsertion=function(e,t){var _=e.getCursorPosition(),r=new s(t,_.row,_.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",n)){var a=new s(t,_.row,_.column+1);if(!this.$matchTokenType(a.getCurrentToken()||"text",n))return!1}return r.stepForward(),r.getCurrentTokenRow()!==_.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},m.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},m.recordAutoInsert=function(e,t,_){var a=e.getCursorPosition(),i=t.doc.getLine(a.row);this.isAutoInsertedClosing(a,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=a.row,r.autoInsertedLineEnd=_+i.substr(a.column),r.autoInsertedBrackets++},m.recordMaybeInsert=function(e,t,_){var a=e.getCursorPosition(),i=t.doc.getLine(a.row);this.isMaybeInsertedClosing(a,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=a.row,r.maybeInsertedLineStart=i.substr(0,a.column)+_,r.maybeInsertedLineEnd=i.substr(a.column),r.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(e,t,_){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&_===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},a.inherits(m,i),t.CstyleBehaviour=m}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,_){"use strict";var r=e("../../lib/oop"),a=e("../../range").Range,i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,_){var r=e.getLine(_);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var a=this._getFoldWidgetBase(e,t,_);return!a&&this.startRegionRe.test(r)?"start":a},this.getFoldWidgetRange=function(e,t,_,r){var a=e.getLine(_);if(this.startRegionRe.test(a))return this.getCommentRegionBlock(e,a,_);var i=a.match(this.foldingStartMarker);if(i){var s=i.index;if(i[1])return this.openingBracketBlock(e,i[1],_,s);var o=e.getCommentFoldRange(_,s+i[0].length,1);return o&&!o.isMultiLine()&&(r?o=this.getSectionRange(e,_):"all"!=t&&(o=null)),o}if("markbegin"!==t){var i=a.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],_,s):e.getCommentFoldRange(_,s,-1)}}},this.getSectionRange=function(e,t){var _=e.getLine(t),r=_.search(/\S/),i=t,s=_.length;t+=1;for(var o=t,n=e.getLength();++tc)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=i)break;if(l.isMultiLine())t=l.end.row;else if(r==c)break}o=t}}return new a(i,s,o,e.getLine(o).length)},this.getCommentRegionBlock=function(e,t,_){for(var r=t.search(/\s*$/),i=e.getLength(),s=_,o=/^\s*(?:\/\*|\/\/)#(end)?region\b/,n=1;++_s)return new a(s,r,l,t.length)}}.call(s.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,_){"use strict";var r=e("../lib/oop"),a=e("./text").Mode,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,o=(e("../range").Range,e("../worker/worker_client").WorkerClient),n=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=i,this.$outdent=new s,this.$behaviour=new n,this.foldingRules=new c};r.inherits(l,a),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,_){var r=this.$getIndent(t),a=this.getTokenizer().getLineTokens(t,e),i=a.tokens,s=a.state;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e||"no_regex"==e){var o=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);o&&(r+=_)}else if("doc-start"==e){if("start"==s||"no_regex"==s)return"";var o=t.match(/^\s*(\/?)\*/);o&&(o[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,_){return this.$outdent.checkOutdent(t,_)},this.autoOutdent=function(e,t,_){this.$outdent.autoOutdent(t,_)},this.createWorker=function(e){var t=new o(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(l.prototype),t.Mode=l}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,_){"use strict";var r=e("../../lib/oop"),a=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),i=e("../../token_iterator").TokenIterator,s=function(){this.inherit(a),this.add("colon","insertion",function(e,t,_,r,a){if(":"===a){var s=_.getCursorPosition(),o=new i(r,s.row,s.column),n=o.getCurrentToken();if(n&&n.value.match(/\s+/)&&(n=o.stepBackward()),n&&"support.type"===n.type){var c=r.doc.getLine(s.row),l=c.substring(s.column,s.column+1);if(":"===l)return{text:"",selection:[1,1]};if(!c.substring(s.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,_,r,a){var s=r.doc.getTextRange(a);if(!a.isMultiLine()&&":"===s){var o=_.getCursorPosition(),n=new i(r,o.row,o.column),c=n.getCurrentToken();if(c&&c.value.match(/\s+/)&&(c=n.stepBackward()),c&&"support.type"===c.type){var l=r.doc.getLine(a.start.row),d=l.substring(a.end.column,a.end.column+1);if(";"===d)return a.end.column++,a}}}),this.add("semicolon","insertion",function(e,t,_,r,a){if(";"===a){var i=_.getCursorPosition(),s=r.doc.getLine(i.row),o=s.substring(i.column,i.column+1);if(";"===o)return{text:"",selection:[1,1]}}})};r.inherits(s,a),t.CssBehaviour=s}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,_){"use strict";var r=e("../lib/oop"),a=e("./text").Mode,i=e("./css_highlight_rules").CssHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,o=e("../worker/worker_client").WorkerClient,n=e("./behaviour/css").CssBehaviour,c=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=i,this.$outdent=new s,this.$behaviour=new n,this.foldingRules=new c};r.inherits(l,a),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,_){var r=this.$getIndent(t),a=this.getTokenizer().getLineTokens(t,e).tokens;if(a.length&&"comment"==a[a.length-1].type)return r;var i=t.match(/^.*\{\s*$/);return i&&(r+=_),r},this.checkOutdent=function(e,t,_){return this.$outdent.checkOutdent(t,_)},this.autoOutdent=function(e,t,_){this.$outdent.autoOutdent(t,_)},this.createWorker=function(e){var t=new o(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(l.prototype),t.Mode=l}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,_){"use strict";function r(e,t){return e.type.lastIndexOf(t+".xml")>-1}var a=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,o=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,_,a,i){if('"'==i||"'"==i){var o=i,n=a.doc.getTextRange(_.getSelectionRange());if(""!==n&&"'"!==n&&'"'!=n&&_.getWrapBehavioursEnabled())return{text:o+n+o,selection:!1};var c=_.getCursorPosition(),l=a.doc.getLine(c.row),d=l.substring(c.column,c.column+1),m=new s(a,c.row,c.column),p=m.getCurrentToken();if(d==o&&(r(p,"attribute-value")||r(p,"string")))return{text:"",selection:[1,1]};if(p||(p=m.stepBackward()),!p)return;for(;r(p,"tag-whitespace")||r(p,"whitespace");)p=m.stepBackward();var g=!d||d.match(/\s/);if(r(p,"attribute-equals")&&(g||">"==d)||r(p,"decl-attribute-equals")&&(g||"?"==d))return{text:o+o,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,_,r,a){var i=r.doc.getTextRange(a);if(!a.isMultiLine()&&('"'==i||"'"==i)){var s=r.doc.getLine(a.start.row),o=s.substring(a.start.column+1,a.start.column+2);if(o==i)return a.end.column++,a}}),this.add("autoclosing","insertion",function(e,t,_,a,i){if(">"==i){var o=_.getCursorPosition(),n=new s(a,o.row,o.column),c=n.getCurrentToken()||n.stepBackward();if(!c||!(r(c,"tag-name")||r(c,"tag-whitespace")||r(c,"attribute-name")||r(c,"attribute-equals")||r(c,"attribute-value")))return;if(r(c,"reference.attribute-value"))return;if(r(c,"attribute-value")){var l=c.value.charAt(0);if('"'==l||"'"==l){var d=c.value.charAt(c.value.length-1),m=n.getCurrentTokenColumn()+c.value.length;if(m>o.column||m==o.column&&l!=d)return}}for(;!r(c,"tag-name");)c=n.stepBackward();var p=n.getCurrentTokenRow(),g=n.getCurrentTokenColumn();if(r(n.stepBackward(),"end-tag-open"))return;var u=c.value;if(p==o.row&&(u=u.substring(0,o.column-g)),this.voidElements.hasOwnProperty(u.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,_,r,a){if("\n"==a){var i=_.getCursorPosition(),o=r.getLine(i.row),n=new s(r,i.row,i.column),c=n.getCurrentToken();if(c&&c.type.indexOf("tag-close")!==-1){for(;c&&c.type.indexOf("tag-name")===-1;)c=n.stepBackward();if(!c)return;var l=c.value,d=n.getCurrentTokenRow();if(c=n.stepBackward(),!c||c.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[l]){var m=r.getTokenAt(i.row,i.column+1),o=r.getLine(d),p=this.$getIndent(o),g=p+r.getTabString();return m&&"-1}var a=e("../../lib/oop"),i=(e("../../lib/lang"),e("../../range").Range),s=e("./fold_mode").FoldMode,o=e("../../token_iterator").TokenIterator,n=t.FoldMode=function(e,t){s.call(this),this.voidElements=e||{},this.optionalEndTags=a.mixin({},this.voidElements),t&&a.mixin(this.optionalEndTags,t)};a.inherits(n,s);var c=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,_){var r=this._getFirstTagInLine(e,_);return r?r.closing||!r.tagName&&r.selfClosing?"markbeginend"==t?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,_,r.tagName,r.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var _=e.getTokens(t),a=new c,i=0;i<_.length;i++){var s=_[i];if(r(s,"tag-open")){if(a.end.column=a.start.column+s.value.length,a.closing=r(s,"end-tag-open"),s=_[++i],!s)return null;for(a.tagName=s.value,a.end.column+=s.value.length,i++;i<_.length;i++)if(s=_[i],a.end.column+=s.value.length,r(s,"tag-close")){a.selfClosing="/>"==s.value;break}return a}if(r(s,"tag-close"))return a.selfClosing="/>"==s.value,a;a.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,_,a){for(var i=e.getTokens(t),s=0,o=0;o"==t.value,_.end.row=e.getCurrentTokenRow(),_.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var _=e[e.length-1];if(t&&_.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(_.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,_){var r=this._getFirstTagInLine(e,_);if(!r)return null;var a,s=r.closing||r.selfClosing,n=[];if(s)for(var c=new o(e,_,r.end.column),l={row:_,column:r.start.column};a=this._readTagBackward(c);){if(a.selfClosing){if(n.length)continue;return a.start.column+=a.tagName.length+2,a.end.column-=2,i.fromPoints(a.start,a.end)}if(a.closing)n.push(a);else if(this._pop(n,a),0==n.length)return a.start.column+=a.tagName.length+2,i.fromPoints(a.start,l)}else for(var c=new o(e,_,r.start.column),d={row:_,column:r.start.column+r.tagName.length+2};a=this._readTagForward(c);){if(a.selfClosing){if(n.length)continue;return a.start.column+=a.tagName.length+2,a.end.column-=2,i.fromPoints(a.start,a.end)}if(a.closing){if(this._pop(n,a),0==n.length)return i.fromPoints(d,a.start)}else n.push(a)}}}).call(n.prototype)}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,_){"use strict";var r=e("../../lib/oop"),a=e("./mixed").FoldMode,i=e("./xml").FoldMode,s=e("./cstyle").FoldMode,o=t.FoldMode=function(e,t){a.call(this,new i(e,t),{"js-":new s,"css-":new s})};r.inherits(o,a)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,_){"use strict";function r(e,t){return e.type.lastIndexOf(t+".xml")>-1}function a(e,t){for(var _=new i(e,t.row,t.column),a=_.getCurrentToken();a&&!r(a,"tag-name");)a=_.stepBackward();if(a)return a.value}var i=e("../token_iterator").TokenIterator,s=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],o=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],n=s.concat(o),c={html:["manifest"],head:[],title:[],base:["href","target"],link:["href","hreflang","rel","media","type","sizes"],meta:["http-equiv","name","content","charset"],style:["type","media","scoped"],script:["charset","type","src","defer","async"],noscript:["href"],body:["onafterprint","onbeforeprint","onbeforeunload","onhashchange","onmessage","onoffline","onpopstate","onredo","onresize","onstorage","onundo","onunload"],section:[],nav:[],article:["pubdate"],aside:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],footer:[],address:[],main:[],p:[],hr:[],pre:[],blockquote:["cite"],ol:["start","reversed"],ul:[],li:["value"],dl:[],dt:[],dd:[],figure:[],figcaption:[],div:[],a:["href","target","ping","rel","media","hreflang","type"],em:[],strong:[],small:[],s:[],cite:[],q:["cite"],dfn:[],abbr:[],data:[],time:["datetime"],code:[],var:[],samp:[],kbd:[],sub:[],sup:[],i:[],b:[],u:[],mark:[],ruby:[],rt:[],rp:[],bdi:[],bdo:[],span:[],br:[],wbr:[],ins:["cite","datetime"],del:["cite","datetime"],img:["alt","src","height","width","usemap","ismap"],iframe:["name","src","height","width","sandbox","seamless"],embed:["src","height","width","type"],object:["param","data","type","height","width","usemap","name","form","classid"], +param:["name","value"],video:["src","autobuffer","autoplay","loop","controls","width","height","poster"],audio:["src","autobuffer","autoplay","loop","controls"],source:["src","type","media"],track:["kind","src","srclang","label","default"],canvas:["width","height"],map:["name"],area:["shape","coords","href","hreflang","alt","target","media","rel","ping","type"],svg:[],math:[],table:["summary"],caption:[],colgroup:["span"],col:["span"],tbody:[],thead:[],tfoot:[],tr:[],td:["headers","rowspan","colspan"],th:["headers","rowspan","colspan","scope"],form:["accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],fieldset:["disabled","form","name"],legend:[],label:["form","for"],input:["type","accept","alt","autocomplete","checked","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","multiple","pattern","placeholder","readonly","required","size","src","step","width","files","value"],button:["autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","value","type"],select:["autofocus","disabled","form","multiple","name","size"],datalist:[],optgroup:["disabled","label"],option:["disabled","selected","label","value"],textarea:["autofocus","disabled","form","maxlength","name","placeholder","readonly","required","rows","cols","wrap"],keygen:["autofocus","challenge","disabled","form","keytype","name"],output:["for","form","name"],progress:["value","max"],meter:["value","min","max","low","high","optimum"],details:["open"],summary:[],command:["type","label","icon","disabled","checked","radiogroup","command"],menu:["type","label"],dialog:["open"]},l=Object.keys(c),d=function(){};(function(){this.getCompletions=function(e,t,_,a){var i=t.getTokenAt(_.row,_.column);return i?r(i,"tag-name")||r(i,"tag-open")||r(i,"end-tag-open")?this.getTagCompletions(e,t,_,a):r(i,"tag-whitespace")||r(i,"attribute-name")?this.getAttributeCompetions(e,t,_,a):[]:[]},this.getTagCompletions=function(e,t,_,r){return l.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompetions=function(e,t,_,r){var i=a(t,_);if(!i)return[];var s=n;return i in c&&(s=s.concat(c[i])),s.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})}}).call(d.prototype),t.HtmlCompletions=d}),define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,_){"use strict";var r=e("../lib/oop"),a=e("../lib/lang"),i=e("./text").Mode,s=e("./javascript").Mode,o=e("./css").Mode,n=e("./html_highlight_rules").HtmlHighlightRules,c=e("./behaviour/xml").XmlBehaviour,l=e("./folding/html").FoldMode,d=e("./html_completions").HtmlCompletions,m=e("../worker/worker_client").WorkerClient,p=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],g=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],u=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=n,this.$behaviour=new c,this.$completer=new d,this.createModeDelegates({"js-":s,"css-":o}),this.foldingRules=new l(this.voidElements,a.arrayToMap(g))};r.inherits(u,i),function(){this.blockComment={start:""},this.voidElements=a.arrayToMap(p),this.getNextLineIndent=function(e,t,_){return this.$getIndent(t)},this.checkOutdent=function(e,t,_){return!1},this.getCompletions=function(e,t,_,r){return this.$completer.getCompletions(e,t,_,r)},this.createWorker=function(e){if(this.constructor==u){var t=new m(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(u.prototype),t.Mode=u}),define("ace/mode/php",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/php_highlight_rules","ace/mode/php_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/unicode","ace/mode/html","ace/mode/javascript","ace/mode/css"],function(e,t,_){"use strict";var r=e("../lib/oop"),a=e("./text").Mode,i=e("./php_highlight_rules").PhpHighlightRules,s=e("./php_highlight_rules").PhpLangHighlightRules,o=e("./matching_brace_outdent").MatchingBraceOutdent,n=(e("../range").Range,e("../worker/worker_client").WorkerClient),c=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,d=e("../unicode"),m=e("./html").Mode,p=e("./javascript").Mode,g=e("./css").Mode,u=function(e){this.HighlightRules=s,this.$outdent=new o,this.$behaviour=new c,this.foldingRules=new l};r.inherits(u,a),function(){this.tokenRe=new RegExp("^["+d.packages.L+d.packages.Mn+d.packages.Mc+d.packages.Nd+d.packages.Pc+"_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+d.packages.L+d.packages.Mn+d.packages.Mc+d.packages.Nd+d.packages.Pc+"_]|s])+","g"),this.lineCommentStart=["//","#"],this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,_){var r=this.$getIndent(t),a=this.getTokenizer().getLineTokens(t,e),i=a.tokens,s=a.state;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e){var o=t.match(/^.*[\{\(\[\:]\s*$/);o&&(r+=_)}else if("doc-start"==e){if("doc-start"!=s)return"";var o=t.match(/^\s*(\/?)\*/);o&&(o[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,_){return this.$outdent.checkOutdent(t,_)},this.autoOutdent=function(e,t,_){this.$outdent.autoOutdent(t,_)},this.$id="ace/mode/php-inline"}.call(u.prototype);var f=function(e){if(e&&e.inline){var t=new u;return t.createWorker=this.createWorker,t.inlinePhp=!0,t}m.call(this),this.HighlightRules=i,this.createModeDelegates({"js-":p,"css-":g,"php-":u}),this.foldingRules.subModes["php-"]=new l};r.inherits(f,m),function(){this.createWorker=function(e){var t=new n(["ace"],"ace/mode/php_worker","PhpWorker");return t.attachToDocument(e.getDocument()),this.inlinePhp&&t.call("setOptions",[{inline:!0}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("ok",function(){e.clearAnnotations()}),t},this.$id="ace/mode/php"}.call(f.prototype),t.Mode=f}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-plain_text.js b/www/js/vendor/ace/mode-plain_text.js index 2eb75e1df..06a66688f 100755 --- a/www/js/vendor/ace/mode-plain_text.js +++ b/www/js/vendor/ace/mode-plain_text.js @@ -1,25 +1 @@ -define("ace/mode/plain_text",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/behaviour"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var Behaviour = require("./behaviour").Behaviour; - -var Mode = function() { - this.HighlightRules = TextHighlightRules; - this.$behaviour = new Behaviour(); -}; - -oop.inherits(Mode, TextMode); - -(function() { - this.type = "text"; - this.getNextLineIndent = function(state, line, tab) { - return ''; - }; - this.$id = "ace/mode/plain_text"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/plain_text",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/behaviour"],function(e,t,i){"use strict";var o=e("../lib/oop"),h=e("./text").Mode,n=e("./text_highlight_rules").TextHighlightRules,u=e("./behaviour").Behaviour,l=function(){this.HighlightRules=n,this.$behaviour=new u};o.inherits(l,h),function(){this.type="text",this.getNextLineIndent=function(e,t,i){return""},this.$id="ace/mode/plain_text"}.call(l.prototype),t.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-powershell.js b/www/js/vendor/ace/mode-powershell.js index 711e35df9..6a038dd14 100755 --- a/www/js/vendor/ace/mode-powershell.js +++ b/www/js/vendor/ace/mode-powershell.js @@ -1,739 +1 @@ -define("ace/mode/powershell_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var PowershellHighlightRules = function() { - - var keywords = ( - "function|if|else|elseif|switch|while|default|for|do|until|break|continue|" + - "foreach|return|filter|in|trap|throw|param|begin|process|end" - ); - - var builtinFunctions = ( - "Get-Alias|Import-Alias|New-Alias|Set-Alias|Get-AuthenticodeSignature|Set-AuthenticodeSignature|" + - "Set-Location|Get-ChildItem|Clear-Item|Get-Command|Measure-Command|Trace-Command|" + - "Add-Computer|Checkpoint-Computer|Remove-Computer|Restart-Computer|Restore-Computer|Stop-Computer|" + - "Reset-ComputerMachinePassword|Test-ComputerSecureChannel|Add-Content|Get-Content|Set-Content|Clear-Content|" + - "Get-Command|Invoke-Command|Enable-ComputerRestore|Disable-ComputerRestore|Get-ComputerRestorePoint|Test-Connection|" + - "ConvertFrom-CSV|ConvertTo-CSV|ConvertTo-Html|ConvertTo-Xml|ConvertFrom-SecureString|ConvertTo-SecureString|" + - "Copy-Item|Export-Counter|Get-Counter|Import-Counter|Get-Credential|Get-Culture|" + - "Get-ChildItem|Get-Date|Set-Date|Remove-Item|Compare-Object|Get-Event|" + - "Get-WinEvent|New-Event|Remove-Event|Unregister-Event|Wait-Event|Clear-EventLog|" + - "Get-Eventlog|Limit-EventLog|New-Eventlog|Remove-EventLog|Show-EventLog|Write-EventLog|" + - "Get-EventSubscriber|Register-EngineEvent|Register-ObjectEvent|Register-WmiEvent|Get-ExecutionPolicy|Set-ExecutionPolicy|" + - "Export-Alias|Export-Clixml|Export-Console|Export-Csv|ForEach-Object|Format-Custom|" + - "Format-List|Format-Table|Format-Wide|Export-FormatData|Get-FormatData|Get-Item|" + - "Get-ChildItem|Get-Help|Add-History|Clear-History|Get-History|Invoke-History|" + - "Get-Host|Read-Host|Write-Host|Get-HotFix|Import-Clixml|Import-Csv|" + - "Invoke-Command|Invoke-Expression|Get-Item|Invoke-Item|New-Item|Remove-Item|" + - "Set-Item|Clear-ItemProperty|Copy-ItemProperty|Get-ItemProperty|Move-ItemProperty|New-ItemProperty|" + - "Remove-ItemProperty|Rename-ItemProperty|Set-ItemProperty|Get-Job|Receive-Job|Remove-Job|" + - "Start-Job|Stop-Job|Wait-Job|Stop-Process|Update-List|Get-Location|" + - "Pop-Location|Push-Location|Set-Location|Send-MailMessage|Add-Member|Get-Member|" + - "Move-Item|Compare-Object|Group-Object|Measure-Object|New-Object|Select-Object|" + - "Sort-Object|Where-Object|Out-Default|Out-File|Out-GridView|Out-Host|" + - "Out-Null|Out-Printer|Out-String|Convert-Path|Join-Path|Resolve-Path|" + - "Split-Path|Test-Path|Get-Pfxcertificate|Pop-Location|Push-Location|Get-Process|" + - "Start-Process|Stop-Process|Wait-Process|Enable-PSBreakpoint|Disable-PSBreakpoint|Get-PSBreakpoint|" + - "Set-PSBreakpoint|Remove-PSBreakpoint|Get-PSDrive|New-PSDrive|Remove-PSDrive|Get-PSProvider|" + - "Set-PSdebug|Enter-PSSession|Exit-PSSession|Export-PSSession|Get-PSSession|Import-PSSession|" + - "New-PSSession|Remove-PSSession|Disable-PSSessionConfiguration|Enable-PSSessionConfiguration|Get-PSSessionConfiguration|Register-PSSessionConfiguration|" + - "Set-PSSessionConfiguration|Unregister-PSSessionConfiguration|New-PSSessionOption|Add-PsSnapIn|Get-PsSnapin|Remove-PSSnapin|" + - "Get-Random|Read-Host|Remove-Item|Rename-Item|Rename-ItemProperty|Select-Object|" + - "Select-XML|Send-MailMessage|Get-Service|New-Service|Restart-Service|Resume-Service|" + - "Set-Service|Start-Service|Stop-Service|Suspend-Service|Sort-Object|Start-Sleep|" + - "ConvertFrom-StringData|Select-String|Tee-Object|New-Timespan|Trace-Command|Get-Tracesource|" + - "Set-Tracesource|Start-Transaction|Complete-Transaction|Get-Transaction|Use-Transaction|Undo-Transaction|" + - "Start-Transcript|Stop-Transcript|Add-Type|Update-TypeData|Get-Uiculture|Get-Unique|" + - "Update-Formatdata|Update-Typedata|Clear-Variable|Get-Variable|New-Variable|Remove-Variable|" + - "Set-Variable|New-WebServiceProxy|Where-Object|Write-Debug|Write-Error|Write-Host|" + - "Write-Output|Write-Progress|Write-Verbose|Write-Warning|Set-WmiInstance|Invoke-WmiMethod|" + - "Get-WmiObject|Remove-WmiObject|Connect-WSMan|Disconnect-WSMan|Test-WSMan|Invoke-WSManAction|" + - "Disable-WSManCredSSP|Enable-WSManCredSSP|Get-WSManCredSSP|New-WSManInstance|Get-WSManInstance|Set-WSManInstance|" + - "Remove-WSManInstance|Set-WSManQuickConfig|New-WSManSessionOption" - ); - - var keywordMapper = this.createKeywordMapper({ - "support.function": builtinFunctions, - "keyword": keywords - }, "identifier"); - - var binaryOperatorsRe = "eq|ne|ge|gt|lt|le|like|notlike|match|notmatch|replace|contains|notcontains|" + - "ieq|ine|ige|igt|ile|ilt|ilike|inotlike|imatch|inotmatch|ireplace|icontains|inotcontains|" + - "is|isnot|as|" + - "and|or|band|bor|not"; - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "#.*$" - }, { - token : "comment.start", - regex : "<#", - next : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "constant.language.boolean", - regex : "[$](?:[Tt]rue|[Ff]alse)\\b" - }, { - token : "constant.language", - regex : "[$][Nn]ull\\b" - }, { - token : "variable.instance", - regex : "[$][a-zA-Z][a-zA-Z0-9_]*\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b" - }, { - token : "keyword.operator", - regex : "\\-(?:" + binaryOperatorsRe + ")" - }, { - token : "keyword.operator", - regex : "&|\\*|\\+|\\-|\\=|\\+=|\\-=" - }, { - token : "lparen", - regex : "[[({]" - }, { - token : "rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment.end", - regex : "#>", - next : "start" - }, { - token : "doc.comment.tag", - regex : "^\\.\\w+" - }, { - token : "comment", - regex : "\\w+" - }, { - token : "comment", - regex : "." - } - ] - }; -}; - -oop.inherits(PowershellHighlightRules, TextHighlightRules); - -exports.PowershellHighlightRules = PowershellHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/powershell",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/powershell_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var PowershellHighlightRules = require("./powershell_highlight_rules").PowershellHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = PowershellHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode({start: "^\\s*(<#)", end: "^[#\\s]>\\s*$"}); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "#"; - this.blockComment = {start: "<#", end: "#>"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - - this.createWorker = function(session) { - return null; - }; - - this.$id = "ace/mode/powershell"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/powershell_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){var e="function|if|else|elseif|switch|while|default|for|do|until|break|continue|foreach|return|filter|in|trap|throw|param|begin|process|end",t="Get-Alias|Import-Alias|New-Alias|Set-Alias|Get-AuthenticodeSignature|Set-AuthenticodeSignature|Set-Location|Get-ChildItem|Clear-Item|Get-Command|Measure-Command|Trace-Command|Add-Computer|Checkpoint-Computer|Remove-Computer|Restart-Computer|Restore-Computer|Stop-Computer|Reset-ComputerMachinePassword|Test-ComputerSecureChannel|Add-Content|Get-Content|Set-Content|Clear-Content|Get-Command|Invoke-Command|Enable-ComputerRestore|Disable-ComputerRestore|Get-ComputerRestorePoint|Test-Connection|ConvertFrom-CSV|ConvertTo-CSV|ConvertTo-Html|ConvertTo-Xml|ConvertFrom-SecureString|ConvertTo-SecureString|Copy-Item|Export-Counter|Get-Counter|Import-Counter|Get-Credential|Get-Culture|Get-ChildItem|Get-Date|Set-Date|Remove-Item|Compare-Object|Get-Event|Get-WinEvent|New-Event|Remove-Event|Unregister-Event|Wait-Event|Clear-EventLog|Get-Eventlog|Limit-EventLog|New-Eventlog|Remove-EventLog|Show-EventLog|Write-EventLog|Get-EventSubscriber|Register-EngineEvent|Register-ObjectEvent|Register-WmiEvent|Get-ExecutionPolicy|Set-ExecutionPolicy|Export-Alias|Export-Clixml|Export-Console|Export-Csv|ForEach-Object|Format-Custom|Format-List|Format-Table|Format-Wide|Export-FormatData|Get-FormatData|Get-Item|Get-ChildItem|Get-Help|Add-History|Clear-History|Get-History|Invoke-History|Get-Host|Read-Host|Write-Host|Get-HotFix|Import-Clixml|Import-Csv|Invoke-Command|Invoke-Expression|Get-Item|Invoke-Item|New-Item|Remove-Item|Set-Item|Clear-ItemProperty|Copy-ItemProperty|Get-ItemProperty|Move-ItemProperty|New-ItemProperty|Remove-ItemProperty|Rename-ItemProperty|Set-ItemProperty|Get-Job|Receive-Job|Remove-Job|Start-Job|Stop-Job|Wait-Job|Stop-Process|Update-List|Get-Location|Pop-Location|Push-Location|Set-Location|Send-MailMessage|Add-Member|Get-Member|Move-Item|Compare-Object|Group-Object|Measure-Object|New-Object|Select-Object|Sort-Object|Where-Object|Out-Default|Out-File|Out-GridView|Out-Host|Out-Null|Out-Printer|Out-String|Convert-Path|Join-Path|Resolve-Path|Split-Path|Test-Path|Get-Pfxcertificate|Pop-Location|Push-Location|Get-Process|Start-Process|Stop-Process|Wait-Process|Enable-PSBreakpoint|Disable-PSBreakpoint|Get-PSBreakpoint|Set-PSBreakpoint|Remove-PSBreakpoint|Get-PSDrive|New-PSDrive|Remove-PSDrive|Get-PSProvider|Set-PSdebug|Enter-PSSession|Exit-PSSession|Export-PSSession|Get-PSSession|Import-PSSession|New-PSSession|Remove-PSSession|Disable-PSSessionConfiguration|Enable-PSSessionConfiguration|Get-PSSessionConfiguration|Register-PSSessionConfiguration|Set-PSSessionConfiguration|Unregister-PSSessionConfiguration|New-PSSessionOption|Add-PsSnapIn|Get-PsSnapin|Remove-PSSnapin|Get-Random|Read-Host|Remove-Item|Rename-Item|Rename-ItemProperty|Select-Object|Select-XML|Send-MailMessage|Get-Service|New-Service|Restart-Service|Resume-Service|Set-Service|Start-Service|Stop-Service|Suspend-Service|Sort-Object|Start-Sleep|ConvertFrom-StringData|Select-String|Tee-Object|New-Timespan|Trace-Command|Get-Tracesource|Set-Tracesource|Start-Transaction|Complete-Transaction|Get-Transaction|Use-Transaction|Undo-Transaction|Start-Transcript|Stop-Transcript|Add-Type|Update-TypeData|Get-Uiculture|Get-Unique|Update-Formatdata|Update-Typedata|Clear-Variable|Get-Variable|New-Variable|Remove-Variable|Set-Variable|New-WebServiceProxy|Where-Object|Write-Debug|Write-Error|Write-Host|Write-Output|Write-Progress|Write-Verbose|Write-Warning|Set-WmiInstance|Invoke-WmiMethod|Get-WmiObject|Remove-WmiObject|Connect-WSMan|Disconnect-WSMan|Test-WSMan|Invoke-WSManAction|Disable-WSManCredSSP|Enable-WSManCredSSP|Get-WSManCredSSP|New-WSManInstance|Get-WSManInstance|Set-WSManInstance|Remove-WSManInstance|Set-WSManQuickConfig|New-WSManSessionOption",n=this.createKeywordMapper({"support.function":t,keyword:e},"identifier"),r="eq|ne|ge|gt|lt|le|like|notlike|match|notmatch|replace|contains|notcontains|ieq|ine|ige|igt|ile|ilt|ilike|inotlike|imatch|inotmatch|ireplace|icontains|inotcontains|is|isnot|as|and|or|band|bor|not";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.start",regex:"<#",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"[$](?:[Tt]rue|[Ff]alse)\\b"},{token:"constant.language",regex:"[$][Nn]ull\\b"},{token:"variable.instance",regex:"[$][a-zA-Z][a-zA-Z0-9_]*\\b"},{token:n,regex:"[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"},{token:"keyword.operator",regex:"\\-(?:"+r+")"},{token:"keyword.operator",regex:"&|\\*|\\+|\\-|\\=|\\+=|\\-="},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment.end",regex:"#>",next:"start"},{token:"doc.comment.tag",regex:"^\\.\\w+"},{token:"comment",regex:"\\w+"},{token:"comment",regex:"."}]}};r.inherits(i,o),t.PowershellHighlightRules=i}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),c=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],l={},d=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,l.rangeCount!=e.multiSelect.rangeCount&&(l={rangeCount:e.multiSelect.rangeCount})),l[t]?r=l[t]:void(r=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},g=function(){this.add("braces","insertion",function(e,t,n,o,i){var a=n.getCursorPosition(),c=o.doc.getLine(a.row);if("{"==i){d(n);var u=n.getSelectionRange(),l=o.doc.getTextRange(u);if(""!==l&&"{"!==l&&n.getWrapBehavioursEnabled())return{text:"{"+l+"}",selection:!1};if(g.isSaneInsertion(n,o))return/[\]\}\)]/.test(c[a.column])||n.inMultiSelectMode?(g.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(g.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){d(n);var m=c.substring(a.column,a.column+1);if("}"==m){var h=o.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==h&&g.isAutoInsertedClosing(a,c,i))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){d(n);var p="";g.isMaybeInsertedClosing(a,c)&&(p=s.stringRepeat("}",r.maybeInsertedBrackets),g.clearMaybeInsertedClosing());var m=c.substring(a.column,a.column+1);if("}"===m){var S=o.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!S)return null;var f=this.$getIndent(o.getLine(S.row))}else{if(!p)return void g.clearMaybeInsertedClosing();var f=this.$getIndent(c)}var v=f+o.getTabString();return{text:"\n"+v+"\n"+f+p,selection:[1,v.length,1,v.length]}}g.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){d(n);var s=o.doc.getLine(i.start.row),c=s.substring(i.end.column,i.end.column+1);if("}"==c)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){d(n);var i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(g.isSaneInsertion(n,r))return g.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){d(n);var s=n.getCursorPosition(),c=r.doc.getLine(s.row),u=c.substring(s.column,s.column+1);if(")"==u){var l=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==l&&g.isAutoInsertedClosing(s,c,o))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){d(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){d(n);var i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(g.isSaneInsertion(n,r))return g.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){d(n);var s=n.getCursorPosition(),c=r.doc.getLine(s.row),u=c.substring(s.column,s.column+1);if("]"==u){var l=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==l&&g.isAutoInsertedClosing(s,c,o))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){d(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){d(n);var i=o,a=n.getSelectionRange(),s=r.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var c=n.getCursorPosition(),u=r.doc.getLine(c.row),l=u.substring(c.column-1,c.column),g=u.substring(c.column,c.column+1),m=r.getTokenAt(c.row,c.column),h=r.getTokenAt(c.row,c.column+1);if("\\"==l&&m&&/escape/.test(m.type))return null;var p,S=m&&/string/.test(m.type),f=!h||/string/.test(h.type);if(g==i)p=S!==f;else{if(S&&!f)return null;if(S&&f)return null;var v=r.$mode.tokenRe;v.lastIndex=0;var b=v.test(l);v.lastIndex=0;var C=v.test(l);if(b||C)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;p=!0}return{text:p?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){d(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(s==i)return o.end.column++,o}})};g.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",c)){var o=new a(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",c))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",u)},g.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},g.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},g.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},g.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},g.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},g.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},g.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(g,i),t.CstyleBehaviour=g}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var i=o.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),i=t,a=n.length;t+=1;for(var s=t,c=e.getLength();++tu)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=i)break;if(l.isMultiLine())t=l.end.row;else if(r==u)break}s=t}}return new o(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,c=1;++na)return new o(a,r,l,t.length)}}.call(a.prototype)}),define("ace/mode/powershell",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/powershell_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./powershell_highlight_rules").PowershellHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new s,this.foldingRules=new c({start:"^\\s*(<#)",end:"^[#\\s]>\\s*$"})};r.inherits(u,o),function(){this.lineCommentStart="#",this.blockComment={start:"<#",end:"#>"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e){var a=t.match(/^.*[\{\(\[]\s*$/);a&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){return null},this.$id="ace/mode/powershell"}.call(u.prototype),t.Mode=u}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-praat.js b/www/js/vendor/ace/mode-praat.js index 1b52fdda3..5d8d84fd5 100755 --- a/www/js/vendor/ace/mode-praat.js +++ b/www/js/vendor/ace/mode-praat.js @@ -1,464 +1 @@ -define("ace/mode/praat_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var PraatHighlightRules = function() { - - var keywords = ( - "if|then|else|elsif|elif|endif|fi|" + - "endfor|endproc|" + // related keywords specified below - "while|endwhile|" + - "repeat|until|" + - "select|plus|minus|" + - "assert" - ); - - var predefinedVariables = ( - "macintosh|windows|unix|" + - "praatVersion|praatVersion\\$" + - "pi|undefined|" + - "newline\\$|tab\\$|" + - "shellDirectory\\$|homeDirectory\\$|preferencesDirectory\\$|" + - "temporaryDirectory\\$|defaultDirectory\\$" - ); - var directives = ( - "clearinfo|endSendPraat" - ); - - var functions = ( - "writeInfo|writeInfoLine|appendInfo|appendInfoLine|" + - "writeFile|writeFileLine|appendFile|appendFileLine|" + - "abs|round|floor|ceiling|min|max|imin|imax|" + - "sqrt|sin|cos|tan|arcsin|arccos|arctan|arctan2|sinc|sincpi|" + - "exp|ln|log10|log2|" + - "sinh|cosh|tanh|arcsinh|arccosh|actanh|" + - "sigmoid|invSigmoid|erf|erfc|" + - "randomUniform|randomInteger|randomGauss|randomPoisson|" + - "lnGamma|gaussP|gaussQ|invGaussQ|" + - "chiSquareP|chiSquareQ|invChiSquareQ|studentP|studentQ|invStudentQ|" + - "fisherP|fisherQ|invFisherQ|" + - "binomialP|binomialQ|invBinomialP|invBinomialQ|" + - "hertzToBark|barkToHerz|" + - "hertzToMel|melToHertz|" + - "hertzToSemitones|semitonesToHerz|" + - "erb|hertzToErb|erbToHertz|" + - "phonToDifferenceLimens|differenceLimensToPhon|" + - "beta|besselI|besselK|" + - "selected|selected\\$|numberOfSelected|variableExists|"+ - "index|rindex|startsWith|endsWith|"+ - "index_regex|rindex_regex|replace_regex\\$|"+ - "length|extractWord\\$|extractLine\\$|extractNumber|" + - "left\\$|right\\$|mid\\$|replace\\$|" + - "beginPause|endPause|" + - "demoShow|demoWindowTitle|demoInput|demoWaitForInput|" + - "demoClicked|demoClickedIn|demoX|demoY|" + - "demoKeyPressed|demoKey\\$|" + - "demoExtraControlKeyPressed|demoShiftKeyPressed|"+ - "demoCommandKeyPressed|demoOptionKeyPressed|" + - "environment\\$|chooseReadFile\\$|" + - "chooseDirectory\\$|createDirectory|fileReadable|deleteFile|" + - "selectObject|removeObject|plusObject|minusObject|" + - "runScript|exitScript|" + - "beginSendPraat|endSendPraat" - ); - - var objectTypes = ( - "Activation|AffineTransform|AmplitudeTier|Art|Artword|Autosegment|" + - "BarkFilter|CCA|Categories|Cepstrum|Cepstrumc|ChebyshevSeries|" + - "ClassificationTable|Cochleagram|Collection|Configuration|" + - "Confusion|ContingencyTable|Corpus|Correlation|Covariance|" + - "CrossCorrelationTable|CrossCorrelationTables|DTW|Diagonalizer|" + - "Discriminant|Dissimilarity|Distance|Distributions|DurationTier|" + - "EEG|ERP|ERPTier|Eigen|Excitation|Excitations|ExperimentMFC|FFNet|" + - "FeatureWeights|Formant|FormantFilter|FormantGrid|FormantPoint|" + - "FormantTier|GaussianMixture|HMM|HMM_Observation|" + - "HMM_ObservationSequence|HMM_State|HMM_StateSequence|Harmonicity|" + - "ISpline|Index|Intensity|IntensityTier|IntervalTier|KNN|KlattGrid|" + - "KlattTable|LFCC|LPC|Label|LegendreSeries|LinearRegression|" + - "LogisticRegression|LongSound|Ltas|MFCC|MSpline|ManPages|" + - "Manipulation|Matrix|MelFilter|MixingMatrix|Movie|Network|" + - "OTGrammar|OTHistory|OTMulti|PCA|PairDistribution|ParamCurve|" + - "Pattern|Permutation|Pitch|PitchTier|PointProcess|Polygon|" + - "Polynomial|Procrustes|RealPoint|RealTier|ResultsMFC|Roots|SPINET|" + - "SSCP|SVD|Salience|ScalarProduct|Similarity|SimpleString|" + - "SortedSetOfString|Sound|Speaker|Spectrogram|Spectrum|SpectrumTier|" + - "SpeechSynthesizer|SpellingChecker|Strings|StringsIndex|Table|" + - "TableOfReal|TextGrid|TextInterval|TextPoint|TextTier|Tier|" + - "Transition|VocalTract|Weight|WordList" - ); - - this.$rules = { - "start" : [ - { - token : "string.interpolated", - regex : /'((?:[a-z][a-zA-Z0-9_]*)(?:\$|#|:[0-9]+)?)'/ - }, { - token : ["text", "text", "keyword.operator", "text", "keyword"], - regex : /(^\s*)(?:([a-z][a-zA-Z0-9_]*\$?\s+)(=)(\s+))?(stopwatch)/ - }, { - token : ["text", "keyword", "text", "string"], - regex : /(^\s*)(print(?:line)?|echo|exit|pause|sendpraat|include|execute)(\s+)(.*)/ - }, { - token : ["text", "keyword"], - regex : "(^\\s*)(" + directives + ")$" - }, { - token : ["text", "keyword.operator", "text"], - regex : /(\s+)((?:\+|-|\/|\*|<|>)=?|==?|!=|%|\^|\||and|or|not)(\s+)/ - }, { - token : ["text", "text", "keyword.operator", "text", "keyword", "text", "keyword"], - regex : /(^\s*)(?:([a-z][a-zA-Z0-9_]*\$?\s+)(=)(\s+))?(?:((?:no)?warn|nocheck|noprogress)(\s+))?((?:[A-Z][^.:"]+)(?:$|(?:\.{3}|:)))/ - }, { - token : ["text", "keyword", "text", "keyword"], - regex : /(^\s*)(?:(demo)?(\s+))((?:[A-Z][^.:"]+)(?:$|(?:\.{3}|:)))/ - }, { - token : ["text", "keyword", "text", "keyword"], - regex : /^(\s*)(?:(demo)(\s+))?(10|12|14|16|24)$/ - }, { - token : ["text", "support.function", "text"], - regex : /(\s*)(do\$?)(\s*:\s*|\s*\(\s*)/ - }, { - token : "entity.name.type", - regex : "(" + objectTypes + ")" - }, { - token : "variable.language", - regex : "(" + predefinedVariables + ")" - }, { - token : ["support.function", "text"], - regex : "((?:" + functions + ")\\$?)(\\s*(?::|\\())" - }, { - token : "keyword", - regex : /(\bfor\b)/, - next : "for" - }, { - token : "keyword", - regex : "(\\b(?:" + keywords + ")\\b)" - }, { - token : "string", - regex : /"[^"]*"/ - }, { - token : "string", - regex : /"[^"]*$/, - next : "brokenstring" - }, { - token : ["text", "keyword", "text", "entity.name.section"], - regex : /(^\s*)(\bform\b)(\s+)(.*)/, - next : "form" - }, { - token : "constant.numeric", - regex : /\b[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : ["keyword", "text", "entity.name.function"], - regex : /(procedure)(\s+)(\S+)/ - }, { - token : ["entity.name.function", "text"], - regex : /(@\S+)(:|\s*\()/ - }, { - token : ["text", "keyword", "text", "entity.name.function"], - regex : /(^\s*)(call)(\s+)(\S+)/ - }, { - token : "comment", - regex : /(^\s*#|;).*$/ - }, { - token : "text", - regex : /\s+/ - } - ], - "form" : [ - { - token : ["keyword", "text", "constant.numeric"], - regex : /((?:optionmenu|choice)\s+)(\S+:\s+)([0-9]+)/ - }, { - token : ["keyword", "constant.numeric"], - regex : /((?:option|button)\s+)([+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b)/ - }, { - token : ["keyword", "string"], - regex : /((?:option|button)\s+)(.*)/ - }, { - token : ["keyword", "text", "string"], - regex : /((?:sentence|text)\s+)(\S+\s*)(.*)/ - }, { - token : ["keyword", "text", "string", "invalid.illegal"], - regex : /(word\s+)(\S+\s*)(\S+)?(\s.*)?/ - }, { - token : ["keyword", "text", "constant.language"], - regex : /(boolean\s+)(\S+\s*)(0|1|"?(?:yes|no)"?)/ - }, { - token : ["keyword", "text", "constant.numeric"], - regex : /((?:real|natural|positive|integer)\s+)(\S+\s*)([+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b)/ - }, { - token : ["keyword", "string"], - regex : /(comment\s+)(.*)/ - }, { - token : "keyword", - regex : 'endform', - next : "start" - } - ], - "for" : [ - { - token : ["keyword", "text", "constant.numeric", "text"], - regex : /(from|to)(\s+)([+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?)(\s*)/ - }, { - token : ["keyword", "text"], - regex : /(from|to)(\s+\S+\s*)/ - }, { - token : "text", - regex : /$/, - next : "start" - } - ], - "brokenstring" : [ - { - token : ["text", "string"], - regex : /(\s*\.{3})([^"]*)/ - }, { - token : "string", - regex : /"/, - next : "start" - } - ], - }; -}; - -oop.inherits(PraatHighlightRules, TextHighlightRules); - -exports.PraatHighlightRules = PraatHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/praat",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/praat_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var PraatHighlightRules = require("./praat_highlight_rules").PraatHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = PraatHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "#"; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[\:]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/praat"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/praat_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="if|then|else|elsif|elif|endif|fi|endfor|endproc|while|endwhile|repeat|until|select|plus|minus|assert",t="macintosh|windows|unix|praatVersion|praatVersion\\$pi|undefined|newline\\$|tab\\$|shellDirectory\\$|homeDirectory\\$|preferencesDirectory\\$|temporaryDirectory\\$|defaultDirectory\\$",n="clearinfo|endSendPraat",r="writeInfo|writeInfoLine|appendInfo|appendInfoLine|writeFile|writeFileLine|appendFile|appendFileLine|abs|round|floor|ceiling|min|max|imin|imax|sqrt|sin|cos|tan|arcsin|arccos|arctan|arctan2|sinc|sincpi|exp|ln|log10|log2|sinh|cosh|tanh|arcsinh|arccosh|actanh|sigmoid|invSigmoid|erf|erfc|randomUniform|randomInteger|randomGauss|randomPoisson|lnGamma|gaussP|gaussQ|invGaussQ|chiSquareP|chiSquareQ|invChiSquareQ|studentP|studentQ|invStudentQ|fisherP|fisherQ|invFisherQ|binomialP|binomialQ|invBinomialP|invBinomialQ|hertzToBark|barkToHerz|hertzToMel|melToHertz|hertzToSemitones|semitonesToHerz|erb|hertzToErb|erbToHertz|phonToDifferenceLimens|differenceLimensToPhon|beta|besselI|besselK|selected|selected\\$|numberOfSelected|variableExists|index|rindex|startsWith|endsWith|index_regex|rindex_regex|replace_regex\\$|length|extractWord\\$|extractLine\\$|extractNumber|left\\$|right\\$|mid\\$|replace\\$|beginPause|endPause|demoShow|demoWindowTitle|demoInput|demoWaitForInput|demoClicked|demoClickedIn|demoX|demoY|demoKeyPressed|demoKey\\$|demoExtraControlKeyPressed|demoShiftKeyPressed|demoCommandKeyPressed|demoOptionKeyPressed|environment\\$|chooseReadFile\\$|chooseDirectory\\$|createDirectory|fileReadable|deleteFile|selectObject|removeObject|plusObject|minusObject|runScript|exitScript|beginSendPraat|endSendPraat",i="Activation|AffineTransform|AmplitudeTier|Art|Artword|Autosegment|BarkFilter|CCA|Categories|Cepstrum|Cepstrumc|ChebyshevSeries|ClassificationTable|Cochleagram|Collection|Configuration|Confusion|ContingencyTable|Corpus|Correlation|Covariance|CrossCorrelationTable|CrossCorrelationTables|DTW|Diagonalizer|Discriminant|Dissimilarity|Distance|Distributions|DurationTier|EEG|ERP|ERPTier|Eigen|Excitation|Excitations|ExperimentMFC|FFNet|FeatureWeights|Formant|FormantFilter|FormantGrid|FormantPoint|FormantTier|GaussianMixture|HMM|HMM_Observation|HMM_ObservationSequence|HMM_State|HMM_StateSequence|Harmonicity|ISpline|Index|Intensity|IntensityTier|IntervalTier|KNN|KlattGrid|KlattTable|LFCC|LPC|Label|LegendreSeries|LinearRegression|LogisticRegression|LongSound|Ltas|MFCC|MSpline|ManPages|Manipulation|Matrix|MelFilter|MixingMatrix|Movie|Network|OTGrammar|OTHistory|OTMulti|PCA|PairDistribution|ParamCurve|Pattern|Permutation|Pitch|PitchTier|PointProcess|Polygon|Polynomial|Procrustes|RealPoint|RealTier|ResultsMFC|Roots|SPINET|SSCP|SVD|Salience|ScalarProduct|Similarity|SimpleString|SortedSetOfString|Sound|Speaker|Spectrogram|Spectrum|SpectrumTier|SpeechSynthesizer|SpellingChecker|Strings|StringsIndex|Table|TableOfReal|TextGrid|TextInterval|TextPoint|TextTier|Tier|Transition|VocalTract|Weight|WordList";this.$rules={start:[{token:"string.interpolated",regex:/'((?:[a-z][a-zA-Z0-9_]*)(?:\$|#|:[0-9]+)?)'/},{token:["text","text","keyword.operator","text","keyword"],regex:/(^\s*)(?:([a-z][a-zA-Z0-9_]*\$?\s+)(=)(\s+))?(stopwatch)/},{token:["text","keyword","text","string"],regex:/(^\s*)(print(?:line)?|echo|exit|pause|sendpraat|include|execute)(\s+)(.*)/},{token:["text","keyword"],regex:"(^\\s*)("+n+")$"},{token:["text","keyword.operator","text"],regex:/(\s+)((?:\+|-|\/|\*|<|>)=?|==?|!=|%|\^|\||and|or|not)(\s+)/},{token:["text","text","keyword.operator","text","keyword","text","keyword"],regex:/(^\s*)(?:([a-z][a-zA-Z0-9_]*\$?\s+)(=)(\s+))?(?:((?:no)?warn|nocheck|noprogress)(\s+))?((?:[A-Z][^.:"]+)(?:$|(?:\.{3}|:)))/},{token:["text","keyword","text","keyword"],regex:/(^\s*)(?:(demo)?(\s+))((?:[A-Z][^.:"]+)(?:$|(?:\.{3}|:)))/},{token:["text","keyword","text","keyword"],regex:/^(\s*)(?:(demo)(\s+))?(10|12|14|16|24)$/},{token:["text","support.function","text"],regex:/(\s*)(do\$?)(\s*:\s*|\s*\(\s*)/},{token:"entity.name.type",regex:"("+i+")"},{token:"variable.language",regex:"("+t+")"},{token:["support.function","text"],regex:"((?:"+r+")\\$?)(\\s*(?::|\\())"},{token:"keyword",regex:/(\bfor\b)/,next:"for"},{token:"keyword",regex:"(\\b(?:"+e+")\\b)"},{token:"string",regex:/"[^"]*"/},{token:"string",regex:/"[^"]*$/,next:"brokenstring"},{token:["text","keyword","text","entity.name.section"],regex:/(^\s*)(\bform\b)(\s+)(.*)/,next:"form"},{token:"constant.numeric",regex:/\b[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["keyword","text","entity.name.function"],regex:/(procedure)(\s+)(\S+)/},{token:["entity.name.function","text"],regex:/(@\S+)(:|\s*\()/},{token:["text","keyword","text","entity.name.function"],regex:/(^\s*)(call)(\s+)(\S+)/},{token:"comment",regex:/(^\s*#|;).*$/},{token:"text",regex:/\s+/}],form:[{token:["keyword","text","constant.numeric"],regex:/((?:optionmenu|choice)\s+)(\S+:\s+)([0-9]+)/},{token:["keyword","constant.numeric"],regex:/((?:option|button)\s+)([+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b)/},{token:["keyword","string"],regex:/((?:option|button)\s+)(.*)/},{token:["keyword","text","string"],regex:/((?:sentence|text)\s+)(\S+\s*)(.*)/},{token:["keyword","text","string","invalid.illegal"],regex:/(word\s+)(\S+\s*)(\S+)?(\s.*)?/},{token:["keyword","text","constant.language"],regex:/(boolean\s+)(\S+\s*)(0|1|"?(?:yes|no)"?)/},{token:["keyword","text","constant.numeric"],regex:/((?:real|natural|positive|integer)\s+)(\S+\s*)([+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b)/},{token:["keyword","string"],regex:/(comment\s+)(.*)/},{token:"keyword",regex:"endform",next:"start"}],for:[{token:["keyword","text","constant.numeric","text"],regex:/(from|to)(\s+)([+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?)(\s*)/},{token:["keyword","text"],regex:/(from|to)(\s+\S+\s*)/},{token:"text",regex:/$/,next:"start"}],brokenstring:[{token:["text","string"],regex:/(\s*\.{3})([^"]*)/},{token:"string",regex:/"/,next:"start"}]}};r.inherits(o,i),t.PraatHighlightRules=o}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var o=i[1].length,a=e.findMatchingBracket({row:t,column:o});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,o-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,o),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var o=i.match(this.foldingStartMarker);if(o){var a=o.index;if(o[1])return this.openingBracketBlock(e,o[1],n,a);var s=e.getCommentFoldRange(n,a+o[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var o=i.match(this.foldingStopMarker);if(o){var a=o.index+o[0].length;return o[1]?this.closingBracketBlock(e,o[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),o=t,a=n.length;t+=1;for(var s=t,d=e.getLength();++tl)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=o)break;if(c.isMultiLine())t=c.end.row;else if(r==l)break}s=t}}return new i(o,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),o=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,d=1;++na)return new i(a,r,c,t.length)}}.call(a.prototype)}),define("ace/mode/praat",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/praat_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,o=e("./praat_highlight_rules").PraatHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("./folding/cstyle").FoldMode,function(){this.HighlightRules=o,this.$outdent=new a});r.inherits(s,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),o=i.tokens;if(o.length&&"comment"==o[o.length-1].type)return r;if("start"==e){var a=t.match(/^.*[\{\(\[\:]\s*$/);a&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/praat"}.call(s.prototype),t.Mode=s}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-prolog.js b/www/js/vendor/ace/mode-prolog.js index 270c223b1..5dad1e1eb 100755 --- a/www/js/vendor/ace/mode-prolog.js +++ b/www/js/vendor/ace/mode-prolog.js @@ -1,364 +1 @@ -define("ace/mode/prolog_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var PrologHighlightRules = function() { - - this.$rules = { start: - [ { include: '#comment' }, - { include: '#basic_fact' }, - { include: '#rule' }, - { include: '#directive' }, - { include: '#fact' } ], - '#atom': - [ { token: 'constant.other.atom.prolog', - regex: '\\b[a-z][a-zA-Z0-9_]*\\b' }, - { token: 'constant.numeric.prolog', - regex: '-?\\d+(?:\\.\\d+)?' }, - { include: '#string' } ], - '#basic_elem': - [ { include: '#comment' }, - { include: '#statement' }, - { include: '#constants' }, - { include: '#operators' }, - { include: '#builtins' }, - { include: '#list' }, - { include: '#atom' }, - { include: '#variable' } ], - '#basic_fact': - [ { token: - [ 'entity.name.function.fact.basic.prolog', - 'punctuation.end.fact.basic.prolog' ], - regex: '([a-z]\\w*)(\\.)' } ], - '#builtins': - [ { token: 'support.function.builtin.prolog', - regex: '\\b(?:abolish|abort|ancestors|arg|ascii|assert[az]|atom(?:ic)?|body|char|close|conc|concat|consult|define|definition|dynamic|dump|fail|file|free|free_proc|functor|getc|goal|halt|head|head|integer|length|listing|match_args|member|next_clause|nl|nonvar|nth|number|cvars|nvars|offset|op|print?|prompt|putc|quoted|ratom|read|redefine|rename|retract(?:all)?|see|seeing|seen|skip|spy|statistics|system|tab|tell|telling|term|time|told|univ|unlink_clause|unspy_predicate|var|write)\\b' } ], - '#comment': - [ { token: - [ 'punctuation.definition.comment.prolog', - 'comment.line.percentage.prolog' ], - regex: '(%)(.*$)' }, - { token: 'punctuation.definition.comment.prolog', - regex: '/\\*', - push: - [ { token: 'punctuation.definition.comment.prolog', - regex: '\\*/', - next: 'pop' }, - { defaultToken: 'comment.block.prolog' } ] } ], - '#constants': - [ { token: 'constant.language.prolog', - regex: '\\b(?:true|false|yes|no)\\b' } ], - '#directive': - [ { token: 'keyword.operator.directive.prolog', - regex: ':-', - push: - [ { token: 'meta.directive.prolog', regex: '\\.', next: 'pop' }, - { include: '#comment' }, - { include: '#statement' }, - { defaultToken: 'meta.directive.prolog' } ] } ], - '#expr': - [ { include: '#comments' }, - { token: 'meta.expression.prolog', - regex: '\\(', - push: - [ { token: 'meta.expression.prolog', regex: '\\)', next: 'pop' }, - { include: '#expr' }, - { defaultToken: 'meta.expression.prolog' } ] }, - { token: 'keyword.control.cutoff.prolog', regex: '!' }, - { token: 'punctuation.control.and.prolog', regex: ',' }, - { token: 'punctuation.control.or.prolog', regex: ';' }, - { include: '#basic_elem' } ], - '#fact': - [ { token: - [ 'entity.name.function.fact.prolog', - 'punctuation.begin.fact.parameters.prolog' ], - regex: '([a-z]\\w*)(\\()(?!.*:-)', - push: - [ { token: - [ 'punctuation.end.fact.parameters.prolog', - 'punctuation.end.fact.prolog' ], - regex: '(\\))(\\.?)', - next: 'pop' }, - { include: '#parameter' }, - { defaultToken: 'meta.fact.prolog' } ] } ], - '#list': - [ { token: 'punctuation.begin.list.prolog', - regex: '\\[(?=.*\\])', - push: - [ { token: 'punctuation.end.list.prolog', - regex: '\\]', - next: 'pop' }, - { include: '#comment' }, - { token: 'punctuation.separator.list.prolog', regex: ',' }, - { token: 'punctuation.concat.list.prolog', - regex: '\\|', - push: - [ { token: 'meta.list.concat.prolog', - regex: '(?=\\s*\\])', - next: 'pop' }, - { include: '#basic_elem' }, - { defaultToken: 'meta.list.concat.prolog' } ] }, - { include: '#basic_elem' }, - { defaultToken: 'meta.list.prolog' } ] } ], - '#operators': - [ { token: 'keyword.operator.prolog', - regex: '\\\\\\+|\\bnot\\b|\\bis\\b|->|[><]|[><\\\\:=]?=|(?:=\\\\|\\\\=)=' } ], - '#parameter': - [ { token: 'variable.language.anonymous.prolog', - regex: '\\b_\\b' }, - { token: 'variable.parameter.prolog', - regex: '\\b[A-Z_]\\w*\\b' }, - { token: 'punctuation.separator.parameters.prolog', regex: ',' }, - { include: '#basic_elem' }, - { token: 'text', regex: '[^\\s]' } ], - '#rule': - [ { token: 'meta.rule.prolog', - regex: '(?=[a-z]\\w*.*:-)', - push: - [ { token: 'punctuation.rule.end.prolog', - regex: '\\.', - next: 'pop' }, - { token: 'meta.rule.signature.prolog', - regex: '(?=[a-z]\\w*.*:-)', - push: - [ { token: 'meta.rule.signature.prolog', - regex: '(?=:-)', - next: 'pop' }, - { token: 'entity.name.function.rule.prolog', - regex: '[a-z]\\w*(?=\\(|\\s*:-)' }, - { token: 'punctuation.rule.parameters.begin.prolog', - regex: '\\(', - push: - [ { token: 'punctuation.rule.parameters.end.prolog', - regex: '\\)', - next: 'pop' }, - { include: '#parameter' }, - { defaultToken: 'meta.rule.parameters.prolog' } ] }, - { defaultToken: 'meta.rule.signature.prolog' } ] }, - { token: 'keyword.operator.definition.prolog', - regex: ':-', - push: - [ { token: 'meta.rule.definition.prolog', - regex: '(?=\\.)', - next: 'pop' }, - { include: '#comment' }, - { include: '#expr' }, - { defaultToken: 'meta.rule.definition.prolog' } ] }, - { defaultToken: 'meta.rule.prolog' } ] } ], - '#statement': - [ { token: 'meta.statement.prolog', - regex: '(?=[a-z]\\w*\\()', - push: - [ { token: 'punctuation.end.statement.parameters.prolog', - regex: '\\)', - next: 'pop' }, - { include: '#builtins' }, - { include: '#atom' }, - { token: 'punctuation.begin.statement.parameters.prolog', - regex: '\\(', - push: - [ { token: 'meta.statement.parameters.prolog', - regex: '(?=\\))', - next: 'pop' }, - { token: 'punctuation.separator.statement.prolog', regex: ',' }, - { include: '#basic_elem' }, - { defaultToken: 'meta.statement.parameters.prolog' } ] }, - { defaultToken: 'meta.statement.prolog' } ] } ], - '#string': - [ { token: 'punctuation.definition.string.begin.prolog', - regex: '\'', - push: - [ { token: 'punctuation.definition.string.end.prolog', - regex: '\'', - next: 'pop' }, - { token: 'constant.character.escape.prolog', regex: '\\\\.' }, - { token: 'constant.character.escape.quote.prolog', - regex: '\'\'' }, - { defaultToken: 'string.quoted.single.prolog' } ] } ], - '#variable': - [ { token: 'variable.language.anonymous.prolog', - regex: '\\b_\\b' }, - { token: 'variable.other.prolog', - regex: '\\b[A-Z_][a-zA-Z0-9_]*\\b' } ] } - - this.normalizeRules(); -}; - -PrologHighlightRules.metaData = { fileTypes: [ 'plg', 'prolog' ], - foldingStartMarker: '(%\\s*region \\w*)|([a-z]\\w*.*:- ?)', - foldingStopMarker: '(%\\s*end(\\s*region)?)|(?=\\.)', - keyEquivalent: '^~P', - name: 'Prolog', - scopeName: 'source.prolog' } - - -oop.inherits(PrologHighlightRules, TextHighlightRules); - -exports.PrologHighlightRules = PrologHighlightRules; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/prolog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/prolog_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var PrologHighlightRules = require("./prolog_highlight_rules").PrologHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = PrologHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "%"; - this.blockComment = {start: "/*", end: "*/"}; - this.$id = "ace/mode/prolog"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/prolog_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,o){"use strict";var n=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{include:"#comment"},{include:"#basic_fact"},{include:"#rule"},{include:"#directive"},{include:"#fact"}],"#atom":[{token:"constant.other.atom.prolog",regex:"\\b[a-z][a-zA-Z0-9_]*\\b"},{token:"constant.numeric.prolog",regex:"-?\\d+(?:\\.\\d+)?"},{include:"#string"}],"#basic_elem":[{include:"#comment"},{include:"#statement"},{include:"#constants"},{include:"#operators"},{include:"#builtins"},{include:"#list"},{include:"#atom"},{include:"#variable"}],"#basic_fact":[{token:["entity.name.function.fact.basic.prolog","punctuation.end.fact.basic.prolog"],regex:"([a-z]\\w*)(\\.)"}],"#builtins":[{token:"support.function.builtin.prolog",regex:"\\b(?:abolish|abort|ancestors|arg|ascii|assert[az]|atom(?:ic)?|body|char|close|conc|concat|consult|define|definition|dynamic|dump|fail|file|free|free_proc|functor|getc|goal|halt|head|head|integer|length|listing|match_args|member|next_clause|nl|nonvar|nth|number|cvars|nvars|offset|op|print?|prompt|putc|quoted|ratom|read|redefine|rename|retract(?:all)?|see|seeing|seen|skip|spy|statistics|system|tab|tell|telling|term|time|told|univ|unlink_clause|unspy_predicate|var|write)\\b"}],"#comment":[{token:["punctuation.definition.comment.prolog","comment.line.percentage.prolog"],regex:"(%)(.*$)"},{token:"punctuation.definition.comment.prolog",regex:"/\\*",push:[{token:"punctuation.definition.comment.prolog",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.prolog"}]}],"#constants":[{token:"constant.language.prolog",regex:"\\b(?:true|false|yes|no)\\b"}],"#directive":[{token:"keyword.operator.directive.prolog",regex:":-",push:[{token:"meta.directive.prolog",regex:"\\.",next:"pop"},{include:"#comment"},{include:"#statement"},{defaultToken:"meta.directive.prolog"}]}],"#expr":[{include:"#comments"},{token:"meta.expression.prolog",regex:"\\(",push:[{token:"meta.expression.prolog",regex:"\\)",next:"pop"},{include:"#expr"},{defaultToken:"meta.expression.prolog"}]},{token:"keyword.control.cutoff.prolog",regex:"!"},{token:"punctuation.control.and.prolog",regex:","},{token:"punctuation.control.or.prolog",regex:";"},{include:"#basic_elem"}],"#fact":[{token:["entity.name.function.fact.prolog","punctuation.begin.fact.parameters.prolog"],regex:"([a-z]\\w*)(\\()(?!.*:-)",push:[{token:["punctuation.end.fact.parameters.prolog","punctuation.end.fact.prolog"],regex:"(\\))(\\.?)",next:"pop"},{include:"#parameter"},{defaultToken:"meta.fact.prolog"}]}],"#list":[{token:"punctuation.begin.list.prolog",regex:"\\[(?=.*\\])",push:[{token:"punctuation.end.list.prolog",regex:"\\]",next:"pop"},{include:"#comment"},{token:"punctuation.separator.list.prolog",regex:","},{token:"punctuation.concat.list.prolog",regex:"\\|",push:[{token:"meta.list.concat.prolog",regex:"(?=\\s*\\])",next:"pop"},{include:"#basic_elem"},{defaultToken:"meta.list.concat.prolog"}]},{include:"#basic_elem"},{defaultToken:"meta.list.prolog"}]}],"#operators":[{token:"keyword.operator.prolog",regex:"\\\\\\+|\\bnot\\b|\\bis\\b|->|[><]|[><\\\\:=]?=|(?:=\\\\|\\\\=)="}],"#parameter":[{token:"variable.language.anonymous.prolog",regex:"\\b_\\b"},{token:"variable.parameter.prolog",regex:"\\b[A-Z_]\\w*\\b"},{token:"punctuation.separator.parameters.prolog",regex:","},{include:"#basic_elem"},{token:"text",regex:"[^\\s]"}],"#rule":[{token:"meta.rule.prolog",regex:"(?=[a-z]\\w*.*:-)",push:[{token:"punctuation.rule.end.prolog",regex:"\\.",next:"pop"},{token:"meta.rule.signature.prolog",regex:"(?=[a-z]\\w*.*:-)",push:[{token:"meta.rule.signature.prolog",regex:"(?=:-)",next:"pop"},{token:"entity.name.function.rule.prolog",regex:"[a-z]\\w*(?=\\(|\\s*:-)"},{token:"punctuation.rule.parameters.begin.prolog",regex:"\\(",push:[{token:"punctuation.rule.parameters.end.prolog",regex:"\\)",next:"pop"},{include:"#parameter"},{defaultToken:"meta.rule.parameters.prolog"}]},{defaultToken:"meta.rule.signature.prolog"}]},{token:"keyword.operator.definition.prolog",regex:":-",push:[{token:"meta.rule.definition.prolog",regex:"(?=\\.)",next:"pop"},{include:"#comment"},{include:"#expr"},{defaultToken:"meta.rule.definition.prolog"}]},{defaultToken:"meta.rule.prolog"}]}],"#statement":[{token:"meta.statement.prolog",regex:"(?=[a-z]\\w*\\()",push:[{token:"punctuation.end.statement.parameters.prolog",regex:"\\)",next:"pop"},{include:"#builtins"},{include:"#atom"},{token:"punctuation.begin.statement.parameters.prolog",regex:"\\(",push:[{token:"meta.statement.parameters.prolog",regex:"(?=\\))",next:"pop"},{token:"punctuation.separator.statement.prolog",regex:","},{include:"#basic_elem"},{defaultToken:"meta.statement.parameters.prolog"}]},{defaultToken:"meta.statement.prolog"}]}],"#string":[{token:"punctuation.definition.string.begin.prolog",regex:"'",push:[{token:"punctuation.definition.string.end.prolog",regex:"'",next:"pop"},{token:"constant.character.escape.prolog",regex:"\\\\."},{token:"constant.character.escape.quote.prolog",regex:"''"},{defaultToken:"string.quoted.single.prolog"}]}],"#variable":[{token:"variable.language.anonymous.prolog",regex:"\\b_\\b"},{token:"variable.other.prolog",regex:"\\b[A-Z_][a-zA-Z0-9_]*\\b"}]},this.normalizeRules()};i.metaData={fileTypes:["plg","prolog"],foldingStartMarker:"(%\\s*region \\w*)|([a-z]\\w*.*:- ?)",foldingStopMarker:"(%\\s*end(\\s*region)?)|(?=\\.)",keyEquivalent:"^~P",name:"Prolog",scopeName:"source.prolog"},n.inherits(i,r),t.PrologHighlightRules=i}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,o){"use strict";var n=e("../../lib/oop"),r=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};n.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,o){var n=e.getLine(o);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var r=this._getFoldWidgetBase(e,t,o);return!r&&this.startRegionRe.test(n)?"start":r},this.getFoldWidgetRange=function(e,t,o,n){var r=e.getLine(o);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,o);var i=r.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],o,a);var l=e.getCommentFoldRange(o,a+i[0].length,1);return l&&!l.isMultiLine()&&(n?l=this.getSectionRange(e,o):"all"!=t&&(l=null)),l}if("markbegin"!==t){var i=r.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],o,a):e.getCommentFoldRange(o,a,-1)}}},this.getSectionRange=function(e,t){var o=e.getLine(t),n=o.search(/\S/),i=t,a=o.length;t+=1;for(var l=t,g=e.getLength();++ts)break;var p=this.getFoldWidgetRange(e,"all",t);if(p){if(p.start.row<=i)break;if(p.isMultiLine())t=p.end.row;else if(n==s)break}l=t}}return new r(i,a,l,e.getLine(l).length)},this.getCommentRegionBlock=function(e,t,o){for(var n=t.search(/\s*$/),i=e.getLength(),a=o,l=/^\s*(?:\/\*|\/\/)#(end)?region\b/,g=1;++oa)return new r(a,n,p,t.length)}}.call(a.prototype)}),define("ace/mode/prolog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/prolog_highlight_rules","ace/mode/folding/cstyle"],function(e,t,o){"use strict";var n=e("../lib/oop"),r=e("./text").Mode,i=e("./prolog_highlight_rules").PrologHighlightRules,a=e("./folding/cstyle").FoldMode,l=function(){this.HighlightRules=i,this.foldingRules=new a};n.inherits(l,r),function(){this.lineCommentStart="%",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/prolog"}.call(l.prototype),t.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-properties.js b/www/js/vendor/ace/mode-properties.js index 38e7e0687..51ac0a5db 100755 --- a/www/js/vendor/ace/mode-properties.js +++ b/www/js/vendor/ace/mode-properties.js @@ -1,72 +1 @@ -define("ace/mode/properties_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var PropertiesHighlightRules = function() { - - var escapeRe = /\\u[0-9a-fA-F]{4}|\\/; - - this.$rules = { - "start" : [ - { - token : "comment", - regex : /[!#].*$/ - }, { - token : "keyword", - regex : /[=:]$/ - }, { - token : "keyword", - regex : /[=:]/, - next : "value" - }, { - token : "constant.language.escape", - regex : escapeRe - }, { - defaultToken: "variable" - } - ], - "value" : [ - { - regex : /\\$/, - token : "string", - next : "value" - }, { - regex : /$/, - token : "string", - next : "start" - }, { - token : "constant.language.escape", - regex : escapeRe - }, { - defaultToken: "string" - } - ] - }; - -}; - -oop.inherits(PropertiesHighlightRules, TextHighlightRules); - -exports.PropertiesHighlightRules = PropertiesHighlightRules; -}); - -define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var PropertiesHighlightRules = require("./properties_highlight_rules").PropertiesHighlightRules; - -var Mode = function() { - this.HighlightRules = PropertiesHighlightRules; -}; -oop.inherits(Mode, TextMode); - -(function() { - this.$id = "ace/mode/properties"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/properties_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,i){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=/\\u[0-9a-fA-F]{4}|\\/;this.$rules={start:[{token:"comment",regex:/[!#].*$/},{token:"keyword",regex:/[=:]$/},{token:"keyword",regex:/[=:]/,next:"value"},{token:"constant.language.escape",regex:e},{defaultToken:"variable"}],value:[{regex:/\\$/,token:"string",next:"value"},{regex:/$/,token:"string",next:"start"},{token:"constant.language.escape",regex:e},{defaultToken:"string"}]}};r.inherits(s,o),t.PropertiesHighlightRules=s}),define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"],function(e,t,i){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,s=e("./properties_highlight_rules").PropertiesHighlightRules,n=function(){this.HighlightRules=s};r.inherits(n,o),function(){this.$id="ace/mode/properties"}.call(n.prototype),t.Mode=n}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-protobuf.js b/www/js/vendor/ace/mode-protobuf.js index e4d2b79b2..a197ecb18 100755 --- a/www/js/vendor/ace/mode-protobuf.js +++ b/www/js/vendor/ace/mode-protobuf.js @@ -1,940 +1 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b" - -var c_cppHighlightRules = function() { - - var keywordControls = ( - "break|case|continue|default|do|else|for|goto|if|_Pragma|" + - "return|switch|while|catch|operator|try|throw|using" - ); - - var storageType = ( - "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + - "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" + - "class|wchar_t|template" - ); - - var storageModifiers = ( - "const|extern|register|restrict|static|volatile|inline|private|" + - "protected|public|friend|explicit|virtual|export|mutable|typename|" + - "constexpr|new|delete" - ); - - var keywordOperators = ( - "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + - "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" - ); - - var builtinConstants = ( - "NULL|true|false|TRUE|FALSE" - ); - - var keywordMapper = this.$keywords = this.createKeywordMapper({ - "keyword.control" : keywordControls, - "storage.type" : storageType, - "storage.modifier" : storageModifiers, - "keyword.operator" : keywordOperators, - "variable.language": "this", - "constant.language": builtinConstants - }, "identifier"); - - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b"; - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "//", - next : "singleLineComment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // multi line string start - regex : '["].*\\\\$', - next : "qqstring" - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "string", // multi line string start - regex : "['].*\\\\$", - next : "qstring" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" - }, { - token : "keyword", // pre-compiler directives - regex : "#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b", - next : "directive" - }, { - token : "keyword", // special case pre-compiler directive - regex : "(?:#\\s*endif)\\b" - }, { - token : "support.function.C99.c", - regex : cFunctions - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)" - }, { - token : "punctuation.operator", - regex : "\\?|\\:|\\,|\\;|\\." - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - "singleLineComment" : [ - { - token : "comment", - regex : /\\$/, - next : "singleLineComment" - }, { - token : "comment", - regex : /$/, - next : "start" - }, { - defaultToken: "comment" - } - ], - "qqstring" : [ - { - token : "string", - regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', - next : "start" - }, { - defaultToken : "string" - } - ], - "qstring" : [ - { - token : "string", - regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", - next : "start" - }, { - defaultToken : "string" - } - ], - "directive" : [ - { - token : "constant.other.multiline", - regex : /\\/ - }, - { - token : "constant.other.multiline", - regex : /.*\\/ - }, - { - token : "constant.other", - regex : "\\s*<.+?>", - next : "start" - }, - { - token : "constant.other", // single line - regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', - next : "start" - }, - { - token : "constant.other", // single line - regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", - next : "start" - }, - { - token : "constant.other", - regex : /[^\\\/]+/, - next : "start" - } - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); -}; - -oop.inherits(c_cppHighlightRules, TextHighlightRules); - -exports.c_cppHighlightRules = c_cppHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var c_cppHighlightRules = require("./c_cpp_highlight_rules").c_cppHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = c_cppHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/c_cpp"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/protobuf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { - "use strict"; - - var oop = require("../lib/oop"); - var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - - var ProtobufHighlightRules = function() { - - var builtinTypes = "double|float|int32|int64|uint32|uint64|sint32|" + - "sint64|fixed32|fixed64|sfixed32|sfixed64|bool|" + - "string|bytes"; - var keywordDeclaration = "message|required|optional|repeated|package|" + - "import|option|enum"; - - var keywordMapper = this.createKeywordMapper({ - "keyword.declaration.protobuf": keywordDeclaration, - "support.type": builtinTypes - }, "identifier"); - - this.$rules = { - "start": [{ - token: "comment", - regex: /\/\/.*$/ - }, { - token: "comment", - regex: /\/\*/, - next: "comment" - }, { - token: "constant", - regex: "<[^>]+>" - }, { - regex: "=", - token: "keyword.operator.assignment.protobuf" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : '[\'](?:(?:\\\\.)|(?:[^\'\\\\]))*?[\']' - }, { - token: "constant.numeric", // hex - regex: "0[xX][0-9a-fA-F]+\\b" - }, { - token: "constant.numeric", // float - regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token: keywordMapper, - regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }], - "comment": [{ - token: "comment", // closing comment - regex: ".*?\\*\\/", - next: "start" - }, { - token: "comment", // comment spanning whole line - regex: ".+" - }] - }; - - this.normalizeRules(); - }; - - oop.inherits(ProtobufHighlightRules, TextHighlightRules); - - exports.ProtobufHighlightRules = ProtobufHighlightRules; -}); - -define("ace/mode/protobuf",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/protobuf_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var CMode = require("./c_cpp").Mode; -var ProtobufHighlightRules = require("./protobuf_highlight_rules").ProtobufHighlightRules; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - CMode.call(this); - this.foldingRules = new CStyleFoldMode(); - this.HighlightRules = ProtobufHighlightRules; -}; -oop.inherits(Mode, CMode); - -(function() { - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$id = "ace/mode/protobuf"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(i,o),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,s=t.cFunctions="\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b",a=function(){var e="break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while|catch|operator|try|throw|using",t="asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|class|wchar_t|template",n="const|extern|register|restrict|static|volatile|inline|private|protected|public|friend|explicit|virtual|export|mutable|typename|constexpr|new|delete",r="and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eqconst_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace",i="NULL|true|false|TRUE|FALSE",a=this.$keywords=this.createKeywordMapper({"keyword.control":e,"storage.type":t,"storage.modifier":n,"keyword.operator":r,"variable.language":"this","constant.language":i},"identifier");this.$rules={start:[{token:"comment",regex:"//",next:"singleLineComment"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"},{token:"keyword",regex:"#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b",next:"directive"},{token:"keyword",regex:"(?:#\\s*endif)\\b"},{token:"support.function.C99.c",regex:s},{token:a,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"punctuation.operator",regex:"\\?|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],singleLineComment:[{token:"comment",regex:/\\$/,next:"singleLineComment"},{token:"comment",regex:/$/,next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{defaultToken:"string"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{defaultToken:"string"}],directive:[{token:"constant.other.multiline",regex:/\\/},{token:"constant.other.multiline",regex:/.*\\/},{token:"constant.other",regex:"\\s*<.+?>",next:"start"},{token:"constant.other",regex:'\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]',next:"start"},{token:"constant.other",regex:"\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']",next:"start"},{token:"constant.other",regex:/[^\\\/]+/,next:"start"}]},this.embedRules(o,"doc-",[o.getEndRule("start")])};r.inherits(a,i),t.c_cppHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,s=e.findMatchingBracket({row:t,column:i});if(!s||s.row==t)return 0;var a=this.$getIndent(e.getLine(s.row));e.replace(new r(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],u={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?r=u[t]:void(r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,i){var s=n.getCursorPosition(),l=o.doc.getLine(s.row);if("{"==i){g(n);var c=n.getSelectionRange(),u=o.doc.getTextRange(c);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(l[s.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var f=l.substring(s.column,s.column+1);if("}"==f){var m=o.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(null!==m&&d.isAutoInsertedClosing(s,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var h="";d.isMaybeInsertedClosing(s,l)&&(h=a.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var f=l.substring(s.column,s.column+1);if("}"===f){var p=o.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!p)return null;var x=this.$getIndent(o.getLine(p.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var b=x+o.getTabString();return{text:"\n"+b+"\n"+x+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var s=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==s){g(n);var a=o.doc.getLine(i.start.row),l=a.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"("+s+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var a=n.getCursorPosition(),l=r.doc.getLine(a.row),c=l.substring(a.column,a.column+1);if(")"==c){var u=r.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==u&&d.isAutoInsertedClosing(a,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(")"==a)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"["+s+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var a=n.getCursorPosition(),l=r.doc.getLine(a.row),c=l.substring(a.column,a.column+1);if("]"==c){var u=r.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==u&&d.isAutoInsertedClosing(a,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if("]"==a)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var i=o,s=n.getSelectionRange(),a=r.doc.getTextRange(s);if(""!==a&&"'"!==a&&'"'!=a&&n.getWrapBehavioursEnabled())return{text:i+a+i,selection:!1};var l=n.getCursorPosition(),c=r.doc.getLine(l.row),u=c.substring(l.column-1,l.column),d=c.substring(l.column,l.column+1),f=r.getTokenAt(l.row,l.column),m=r.getTokenAt(l.row,l.column+1);if("\\"==u&&f&&/escape/.test(f.type))return null;var h,p=f&&/string/.test(f.type),x=!m||/string/.test(m.type);if(d==i)h=p!==x;else{if(p&&!x)return null;if(p&&x)return null;var b=r.$mode.tokenRe;b.lastIndex=0;var k=b.test(u);b.lastIndex=0;var v=b.test(u);if(k||v)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(a==i)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){var o=new s(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var i=o.match(this.foldingStartMarker);if(i){var s=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,s);var a=e.getCommentFoldRange(n,s+i[0].length,1);return a&&!a.isMultiLine()&&(r?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),i=t,s=n.length;t+=1;for(var a=t,l=e.getLength();++tc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=i)break;if(u.isMultiLine())t=u.end.row;else if(r==c)break}a=t}}return new o(i,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++ns)return new o(s,r,u,t.length)}}.call(s.prototype)}),define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./c_cpp_highlight_rules").c_cppHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=(e("../range").Range,e("./behaviour/cstyle").CstyleBehaviour),l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new s,this.$behaviour=new a,this.foldingRules=new l};r.inherits(c,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens,s=o.state;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e){var a=t.match(/^.*[\{\(\[]\s*$/);a&&(r+=n)}else if("doc-start"==e){if("start"==s)return"";var a=t.match(/^\s*(\/?)\*/);a&&(a[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/c_cpp"}.call(c.prototype),t.Mode=c}),define("ace/mode/protobuf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){var e="double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes",t="message|required|optional|repeated|package|import|option|enum",n=this.createKeywordMapper({"keyword.declaration.protobuf":t,"support.type":e},"identifier");this.$rules={start:[{token:"comment",regex:/\/\/.*$/},{token:"comment",regex:/\/\*/,next:"comment"},{token:"constant",regex:"<[^>]+>"},{regex:"=",token:"keyword.operator.assignment.protobuf"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:n,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}]},this.normalizeRules()};r.inherits(i,o),t.ProtobufHighlightRules=i}),define("ace/mode/protobuf",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/protobuf_highlight_rules","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./c_cpp").Mode,i=e("./protobuf_highlight_rules").ProtobufHighlightRules,s=e("./folding/cstyle").FoldMode,a=function(){o.call(this),this.foldingRules=new s,this.HighlightRules=i};r.inherits(a,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/protobuf"}.call(a.prototype),t.Mode=a}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-python.js b/www/js/vendor/ace/mode-python.js index 4549abb3d..016d6a530 100755 --- a/www/js/vendor/ace/mode-python.js +++ b/www/js/vendor/ace/mode-python.js @@ -1,264 +1 @@ -define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var PythonHighlightRules = function() { - - var keywords = ( - "and|as|assert|break|class|continue|def|del|elif|else|except|exec|" + - "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" + - "raise|return|try|while|with|yield" - ); - - var builtinConstants = ( - "True|False|None|NotImplemented|Ellipsis|__debug__" - ); - - var builtinFunctions = ( - "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" + - "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" + - "binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|" + - "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" + - "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" + - "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" + - "__import__|complex|hash|min|set|apply|delattr|help|next|setattr|" + - "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern" - ); - var keywordMapper = this.createKeywordMapper({ - "invalid.deprecated": "debugger", - "support.function": builtinFunctions, - "constant.language": builtinConstants, - "keyword": keywords - }, "identifier"); - - var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?"; - - var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; - var octInteger = "(?:0[oO]?[0-7]+)"; - var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; - var binInteger = "(?:0[bB][01]+)"; - var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; - - var exponent = "(?:[eE][+-]?\\d+)"; - var fraction = "(?:\\.\\d+)"; - var intPart = "(?:\\d+)"; - var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; - var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; - var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; - - var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; - - this.$rules = { - "start" : [ { - token : "comment", - regex : "#.*$" - }, { - token : "string", // multi line """ string start - regex : strPre + '"{3}', - next : "qqstring3" - }, { - token : "string", // " string - regex : strPre + '"(?=.)', - next : "qqstring" - }, { - token : "string", // multi line ''' string start - regex : strPre + "'{3}", - next : "qstring3" - }, { - token : "string", // ' string - regex : strPre + "'(?=.)", - next : "qstring" - }, { - token : "constant.numeric", // imaginary - regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b" - }, { - token : "constant.numeric", // float - regex : floatNumber - }, { - token : "constant.numeric", // long integer - regex : integer + "[lL]\\b" - }, { - token : "constant.numeric", // integer - regex : integer + "\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" - }, { - token : "paren.lparen", - regex : "[\\[\\(\\{]" - }, { - token : "paren.rparen", - regex : "[\\]\\)\\}]" - }, { - token : "text", - regex : "\\s+" - } ], - "qqstring3" : [ { - token : "constant.language.escape", - regex : stringEscape - }, { - token : "string", // multi line """ string end - regex : '"{3}', - next : "start" - }, { - defaultToken : "string" - } ], - "qstring3" : [ { - token : "constant.language.escape", - regex : stringEscape - }, { - token : "string", // multi line ''' string end - regex : "'{3}", - next : "start" - }, { - defaultToken : "string" - } ], - "qqstring" : [{ - token : "constant.language.escape", - regex : stringEscape - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "start" - }, { - defaultToken: "string" - }], - "qstring" : [{ - token : "constant.language.escape", - regex : stringEscape - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "start" - }, { - defaultToken: "string" - }] - }; -}; - -oop.inherits(PythonHighlightRules, TextHighlightRules); - -exports.PythonHighlightRules = PythonHighlightRules; -}); - -define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(markers) { - this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + markers + ")(?:\\s*)(?:#.*)?$"); -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var line = session.getLine(row); - var match = line.match(this.foldingStartMarker); - if (match) { - if (match[1]) - return this.openingBracketBlock(session, match[1], row, match.index); - if (match[2]) - return this.indentationBlock(session, row, match.index + match[2].length); - return this.indentationBlock(session, row); - } - } - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules; -var PythonFoldMode = require("./folding/pythonic").FoldMode; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = PythonHighlightRules; - this.foldingRules = new PythonFoldMode("\\:"); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "#"; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[\:]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - var outdents = { - "pass": 1, - "return": 1, - "raise": 1, - "break": 1, - "continue": 1 - }; - - this.checkOutdent = function(state, line, input) { - if (input !== "\r\n" && input !== "\r" && input !== "\n") - return false; - - var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; - - if (!tokens) - return false; - do { - var last = tokens.pop(); - } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); - - if (!last) - return false; - - return (last.type == "keyword" && outdents[last.value]); - }; - - this.autoOutdent = function(state, doc, row) { - - row += 1; - var indent = this.$getIndent(doc.getLine(row)); - var tab = doc.getTabString(); - if (indent.slice(-tab.length) == tab) - doc.remove(new Range(row, indent.length-tab.length, row, indent.length)); - }; - - this.$id = "ace/mode/python"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield",t="True|False|None|NotImplemented|Ellipsis|__debug__",n="abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern",r=this.createKeywordMapper({"invalid.deprecated":"debugger","support.function":n,"constant.language":t,keyword:e},"identifier"),i="(?:r|u|ur|R|U|UR|Ur|uR)?",o="(?:(?:[1-9]\\d*)|(?:0))",a="(?:0[oO]?[0-7]+)",s="(?:0[xX][\\dA-Fa-f]+)",g="(?:0[bB][01]+)",l="(?:"+o+"|"+a+"|"+s+"|"+g+")",c="(?:[eE][+-]?\\d+)",d="(?:\\.\\d+)",u="(?:\\d+)",h="(?:(?:"+u+"?"+d+")|(?:"+u+"\\.))",p="(?:(?:"+h+"|"+u+")"+c+")",x="(?:"+p+"|"+h+")",f="\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:i+'"{3}',next:"qqstring3"},{token:"string",regex:i+'"(?=.)',next:"qqstring"},{token:"string",regex:i+"'{3}",next:"qstring3"},{token:"string",regex:i+"'(?=.)",next:"qstring"},{token:"constant.numeric",regex:"(?:"+x+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:x},{token:"constant.numeric",regex:l+"[lL]\\b"},{token:"constant.numeric",regex:l+"\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring3:[{token:"constant.language.escape",regex:f},{token:"string",regex:'"{3}',next:"start"},{defaultToken:"string"}],qstring3:[{token:"constant.language.escape",regex:f},{token:"string",regex:"'{3}",next:"start"},{defaultToken:"string"}],qqstring:[{token:"constant.language.escape",regex:f},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:f},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"},{defaultToken:"string"}]}};r.inherits(o,i),t.PythonHighlightRules=o}),define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){this.foldingStartMarker=new RegExp("([\\[{])(?:\\s*)$|("+e+")(?:\\s*)(?:#.*)?$")};r.inherits(o,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=e.getLine(n),i=r.match(this.foldingStartMarker);if(i)return i[1]?this.openingBracketBlock(e,i[1],n,i.index):i[2]?this.indentationBlock(e,n,i.index+i[2].length):this.indentationBlock(e,n)}}.call(o.prototype)}),define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,o=e("./python_highlight_rules").PythonHighlightRules,a=e("./folding/pythonic").FoldMode,s=e("../range").Range,g=function(){this.HighlightRules=o,this.foldingRules=new a("\\:")};r.inherits(g,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),o=i.tokens;if(o.length&&"comment"==o[o.length-1].type)return r;if("start"==e){var a=t.match(/^.*[\{\(\[\:]\s*$/);a&&(r+=n)}return r};var e={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(t,n,r){if("\r\n"!==r&&"\r"!==r&&"\n"!==r)return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var o=i.pop();while(o&&("comment"==o.type||"text"==o.type&&o.value.match(/^\s+$/)));return!!o&&"keyword"==o.type&&e[o.value]},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new s(n,r.length-i.length,n,r.length))},this.$id="ace/mode/python"}.call(g.prototype),t.Mode=g}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-r.js b/www/js/vendor/ace/mode-r.js index 135f71da7..935c25c8e 100755 --- a/www/js/vendor/ace/mode-r.js +++ b/www/js/vendor/ace/mode-r.js @@ -1,302 +1 @@ -define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var TexHighlightRules = function(textClass) { - - if (!textClass) - textClass = "text"; - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "%.*$" - }, { - token : textClass, // non-command - regex : "\\\\[$&%#\\{\\}]" - }, { - token : "keyword", // command - regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b", - next : "nospell" - }, { - token : "keyword", // command - regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])" - }, { - token : "paren.keyword.operator", - regex : "[[({]" - }, { - token : "paren.keyword.operator", - regex : "[\\])}]" - }, { - token : textClass, - regex : "\\s+" - } - ], - "nospell" : [ - { - token : "comment", - regex : "%.*$", - next : "start" - }, { - token : "nospell." + textClass, // non-command - regex : "\\\\[$&%#\\{\\}]" - }, { - token : "keyword", // command - regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b" - }, { - token : "keyword", // command - regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])", - next : "start" - }, { - token : "paren.keyword.operator", - regex : "[[({]" - }, { - token : "paren.keyword.operator", - regex : "[\\])]" - }, { - token : "paren.keyword.operator", - regex : "}", - next : "start" - }, { - token : "nospell." + textClass, - regex : "\\s+" - }, { - token : "nospell." + textClass, - regex : "\\w+" - } - ] - }; -}; - -oop.inherits(TexHighlightRules, TextHighlightRules); - -exports.TexHighlightRules = TexHighlightRules; -}); - -define("ace/mode/r_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules"], function(require, exports, module) -{ - - var oop = require("../lib/oop"); - var lang = require("../lib/lang"); - var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules; - - var RHighlightRules = function() - { - - var keywords = lang.arrayToMap( - ("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass") - .split("|") - ); - - var buildinConstants = lang.arrayToMap( - ("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|" + - "NA_complex_").split("|") - ); - - this.$rules = { - "start" : [ - { - token : "comment.sectionhead", - regex : "#+(?!').*(?:----|====|####)\\s*$" - }, - { - token : "comment", - regex : "#+'", - next : "rd-start" - }, - { - token : "comment", - regex : "#.*$" - }, - { - token : "string", // multi line string start - regex : '["]', - next : "qqstring" - }, - { - token : "string", // multi line string start - regex : "[']", - next : "qstring" - }, - { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+[Li]?\\b" - }, - { - token : "constant.numeric", // explicit integer - regex : "\\d+L\\b" - }, - { - token : "constant.numeric", // number - regex : "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b" - }, - { - token : "constant.numeric", // number with leading decimal - regex : "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b" - }, - { - token : "constant.language.boolean", - regex : "(?:TRUE|FALSE|T|F)\\b" - }, - { - token : "identifier", - regex : "`.*?`" - }, - { - onMatch : function(value) { - if (keywords[value]) - return "keyword"; - else if (buildinConstants[value]) - return "constant.language"; - else if (value == '...' || value.match(/^\.\.\d+$/)) - return "variable.language"; - else - return "identifier"; - }, - regex : "[a-zA-Z.][a-zA-Z0-9._]*\\b" - }, - { - token : "keyword.operator", - regex : "%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:" - }, - { - token : "keyword.operator", // infix operators - regex : "%.*?%" - }, - { - token : "paren.keyword.operator", - regex : "[[({]" - }, - { - token : "paren.keyword.operator", - regex : "[\\])}]" - }, - { - token : "text", - regex : "\\s+" - } - ], - "qqstring" : [ - { - token : "string", - regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', - next : "start" - }, - { - token : "string", - regex : '.+' - } - ], - "qstring" : [ - { - token : "string", - regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", - next : "start" - }, - { - token : "string", - regex : '.+' - } - ] - }; - - var rdRules = new TexHighlightRules("comment").getRules(); - for (var i = 0; i < rdRules["start"].length; i++) { - rdRules["start"][i].token += ".virtual-comment"; - } - - this.addRules(rdRules, "rd-"); - this.$rules["rd-start"].unshift({ - token: "text", - regex: "^", - next: "start" - }); - this.$rules["rd-start"].unshift({ - token : "keyword", - regex : "@(?!@)[^ ]*" - }); - this.$rules["rd-start"].unshift({ - token : "comment", - regex : "@@" - }); - this.$rules["rd-start"].push({ - token : "comment", - regex : "[^%\\\\[({\\])}]+" - }); - }; - - oop.inherits(RHighlightRules, TextHighlightRules); - - exports.RHighlightRules = RHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/r",["require","exports","module","ace/range","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/r_highlight_rules","ace/mode/matching_brace_outdent","ace/unicode"], function(require, exports, module) { - "use strict"; - - var Range = require("../range").Range; - var oop = require("../lib/oop"); - var TextMode = require("./text").Mode; - var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - var RHighlightRules = require("./r_highlight_rules").RHighlightRules; - var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; - var unicode = require("../unicode"); - - var Mode = function() - { - this.HighlightRules = RHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - }; - oop.inherits(Mode, TextMode); - - (function() - { - this.lineCommentStart = "#"; - this.$id = "ace/mode/r"; - }).call(Mode.prototype); - exports.Mode = Mode; -}); +define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),i=function(e){e||(e="text"),this.$rules={start:[{token:"comment",regex:"%.*$"},{token:e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",next:"nospell"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:e,regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell."+e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",next:"start"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])]"},{token:"paren.keyword.operator",regex:"}",next:"start"},{token:"nospell."+e,regex:"\\s+"},{token:"nospell."+e,regex:"\\w+"}]}};n.inherits(i,o),t.TexHighlightRules=i}),define("ace/mode/r_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules"],function(e,t,r){var n=e("../lib/oop"),o=e("../lib/lang"),i=e("./text_highlight_rules").TextHighlightRules,a=e("./tex_highlight_rules").TexHighlightRules,g=function(){var e=o.arrayToMap("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass".split("|")),t=o.arrayToMap("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|NA_complex_".split("|"));this.$rules={start:[{token:"comment.sectionhead",regex:"#+(?!').*(?:----|====|####)\\s*$"},{token:"comment",regex:"#+'",next:"rd-start"},{token:"comment",regex:"#.*$"},{token:"string",regex:'["]',next:"qqstring"},{token:"string",regex:"[']",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+[Li]?\\b"},{token:"constant.numeric",regex:"\\d+L\\b"},{token:"constant.numeric",regex:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b"},{token:"constant.numeric",regex:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b"},{token:"constant.language.boolean",regex:"(?:TRUE|FALSE|T|F)\\b"},{token:"identifier",regex:"`.*?`"},{onMatch:function(r){return e[r]?"keyword":t[r]?"constant.language":"..."==r||r.match(/^\.\.\d+$/)?"variable.language":"identifier"},regex:"[a-zA-Z.][a-zA-Z0-9._]*\\b"},{token:"keyword.operator",regex:"%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:"},{token:"keyword.operator",regex:"%.*?%"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]};for(var r=new a("comment").getRules(),n=0;n=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = CssHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.foldingRules = "cStyle"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("csslint", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/css"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === " -1; -} - -(function() { - - this.getFoldWidget = function(session, foldStyle, row) { - var tag = this._getFirstTagInLine(session, row); - - if (!tag) - return ""; - - if (tag.closing || (!tag.tagName && tag.selfClosing)) - return foldStyle == "markbeginend" ? "end" : ""; - - if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) - return ""; - - if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) - return ""; - - return "start"; - }; - this._getFirstTagInLine = function(session, row) { - var tokens = session.getTokens(row); - var tag = new Tag(); - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (is(token, "tag-open")) { - tag.end.column = tag.start.column + token.value.length; - tag.closing = is(token, "end-tag-open"); - token = tokens[++i]; - if (!token) - return null; - tag.tagName = token.value; - tag.end.column += token.value.length; - for (i++; i < tokens.length; i++) { - token = tokens[i]; - tag.end.column += token.value.length; - if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - break; - } - } - return tag; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - return tag; - } - tag.start.column += token.value.length; - } - - return null; - }; - - this._findEndTagInLine = function(session, row, tagName, startColumn) { - var tokens = session.getTokens(row); - var column = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - column += token.value.length; - if (column < startColumn) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var firstTag = this._getFirstTagInLine(session, row); - - if (!firstTag) - return null; - - var isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var MixedFoldMode = require("./mixed").FoldMode; -var XmlFoldMode = require("./xml").FoldMode; -var CStyleFoldMode = require("./cstyle").FoldMode; - -var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { - MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { - "js-": new CStyleFoldMode(), - "css-": new CStyleFoldMode() - }); -}; - -oop.inherits(FoldMode, MixedFoldMode); - -}); - -define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var TokenIterator = require("../token_iterator").TokenIterator; - -var commonAttributes = [ - "accesskey", - "class", - "contenteditable", - "contextmenu", - "dir", - "draggable", - "dropzone", - "hidden", - "id", - "inert", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "lang", - "spellcheck", - "style", - "tabindex", - "title", - "translate" -]; - -var eventAttributes = [ - "onabort", - "onblur", - "oncancel", - "oncanplay", - "oncanplaythrough", - "onchange", - "onclick", - "onclose", - "oncontextmenu", - "oncuechange", - "ondblclick", - "ondrag", - "ondragend", - "ondragenter", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onended", - "onerror", - "onfocus", - "oninput", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeyup", - "onload", - "onloadeddata", - "onloadedmetadata", - "onloadstart", - "onmousedown", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onpause", - "onplay", - "onplaying", - "onprogress", - "onratechange", - "onreset", - "onscroll", - "onseeked", - "onseeking", - "onselect", - "onshow", - "onstalled", - "onsubmit", - "onsuspend", - "ontimeupdate", - "onvolumechange", - "onwaiting" -]; - -var globalAttributes = commonAttributes.concat(eventAttributes); - -var attributeMap = { - "html": ["manifest"], - "head": [], - "title": [], - "base": ["href", "target"], - "link": ["href", "hreflang", "rel", "media", "type", "sizes"], - "meta": ["http-equiv", "name", "content", "charset"], - "style": ["type", "media", "scoped"], - "script": ["charset", "type", "src", "defer", "async"], - "noscript": ["href"], - "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], - "section": [], - "nav": [], - "article": ["pubdate"], - "aside": [], - "h1": [], - "h2": [], - "h3": [], - "h4": [], - "h5": [], - "h6": [], - "header": [], - "footer": [], - "address": [], - "main": [], - "p": [], - "hr": [], - "pre": [], - "blockquote": ["cite"], - "ol": ["start", "reversed"], - "ul": [], - "li": ["value"], - "dl": [], - "dt": [], - "dd": [], - "figure": [], - "figcaption": [], - "div": [], - "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], - "em": [], - "strong": [], - "small": [], - "s": [], - "cite": [], - "q": ["cite"], - "dfn": [], - "abbr": [], - "data": [], - "time": ["datetime"], - "code": [], - "var": [], - "samp": [], - "kbd": [], - "sub": [], - "sup": [], - "i": [], - "b": [], - "u": [], - "mark": [], - "ruby": [], - "rt": [], - "rp": [], - "bdi": [], - "bdo": [], - "span": [], - "br": [], - "wbr": [], - "ins": ["cite", "datetime"], - "del": ["cite", "datetime"], - "img": ["alt", "src", "height", "width", "usemap", "ismap"], - "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], - "embed": ["src", "height", "width", "type"], - "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], - "param": ["name", "value"], - "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], - "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], - "source": ["src", "type", "media"], - "track": ["kind", "src", "srclang", "label", "default"], - "canvas": ["width", "height"], - "map": ["name"], - "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], - "svg": [], - "math": [], - "table": ["summary"], - "caption": [], - "colgroup": ["span"], - "col": ["span"], - "tbody": [], - "thead": [], - "tfoot": [], - "tr": [], - "td": ["headers", "rowspan", "colspan"], - "th": ["headers", "rowspan", "colspan", "scope"], - "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], - "fieldset": ["disabled", "form", "name"], - "legend": [], - "label": ["form", "for"], - "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], - "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], - "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], - "datalist": [], - "optgroup": ["disabled", "label"], - "option": ["disabled", "selected", "label", "value"], - "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], - "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], - "output": ["for", "form", "name"], - "progress": ["value", "max"], - "meter": ["value", "min", "max", "low", "high", "optimum"], - "details": ["open"], - "summary": [], - "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], - "menu": ["type", "label"], - "dialog": ["open"] -}; - -var elements = Object.keys(attributeMap); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -function findTagName(session, pos) { - var iterator = new TokenIterator(session, pos.row, pos.column); - var token = iterator.getCurrentToken(); - while (token && !is(token, "tag-name")){ - token = iterator.stepBackward(); - } - if (token) - return token.value; -} - -var HtmlCompletions = function() { - -}; - -(function() { - - this.getCompletions = function(state, session, pos, prefix) { - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) - return this.getTagCompletions(state, session, pos, prefix); - if (is(token, "tag-whitespace") || is(token, "attribute-name")) - return this.getAttributeCompetions(state, session, pos, prefix); - - return []; - }; - - this.getTagCompletions = function(state, session, pos, prefix) { - return elements.map(function(element){ - return { - value: element, - meta: "tag", - score: Number.MAX_VALUE - }; - }); - }; - - this.getAttributeCompetions = function(state, session, pos, prefix) { - var tagName = findTagName(session, pos); - if (!tagName) - return []; - var attributes = globalAttributes; - if (tagName in attributeMap) { - attributes = attributes.concat(attributeMap[tagName]); - } - return attributes.map(function(attribute){ - return { - caption: attribute, - snippet: attribute + '="$0"', - meta: "attribute", - score: Number.MAX_VALUE - }; - }); - }; - -}).call(HtmlCompletions.prototype); - -exports.HtmlCompletions = HtmlCompletions; -}); - -define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var CssMode = require("./css").Mode; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; -var HtmlFoldMode = require("./folding/html").FoldMode; -var HtmlCompletions = require("./html_completions").HtmlCompletions; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; -var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; - -var Mode = function(options) { - this.fragmentContext = options && options.fragmentContext; - this.HighlightRules = HtmlHighlightRules; - this.$behaviour = new XmlBehaviour(); - this.$completer = new HtmlCompletions(); - - this.createModeDelegates({ - "js-": JavaScriptMode, - "css-": CssMode - }); - - this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.blockComment = {start: ""}; - - this.voidElements = lang.arrayToMap(voidElements); - - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - this.checkOutdent = function(state, line, input) { - return false; - }; - - this.getCompletions = function(state, session, pos, prefix) { - return this.$completer.getCompletions(state, session, pos, prefix); - }; - - this.createWorker = function(session) { - if (this.constructor != Mode) - return; - var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - if (this.fragmentContext) - worker.call("setOptions", [{context: this.fragmentContext}]); - - worker.on("error", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/html"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var TexHighlightRules = function(textClass) { - - if (!textClass) - textClass = "text"; - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "%.*$" - }, { - token : textClass, // non-command - regex : "\\\\[$&%#\\{\\}]" - }, { - token : "keyword", // command - regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b", - next : "nospell" - }, { - token : "keyword", // command - regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])" - }, { - token : "paren.keyword.operator", - regex : "[[({]" - }, { - token : "paren.keyword.operator", - regex : "[\\])}]" - }, { - token : textClass, - regex : "\\s+" - } - ], - "nospell" : [ - { - token : "comment", - regex : "%.*$", - next : "start" - }, { - token : "nospell." + textClass, // non-command - regex : "\\\\[$&%#\\{\\}]" - }, { - token : "keyword", // command - regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b" - }, { - token : "keyword", // command - regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])", - next : "start" - }, { - token : "paren.keyword.operator", - regex : "[[({]" - }, { - token : "paren.keyword.operator", - regex : "[\\])]" - }, { - token : "paren.keyword.operator", - regex : "}", - next : "start" - }, { - token : "nospell." + textClass, - regex : "\\s+" - }, { - token : "nospell." + textClass, - regex : "\\w+" - } - ] - }; -}; - -oop.inherits(TexHighlightRules, TextHighlightRules); - -exports.TexHighlightRules = TexHighlightRules; -}); - -define("ace/mode/r_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules"], function(require, exports, module) -{ - - var oop = require("../lib/oop"); - var lang = require("../lib/lang"); - var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules; - - var RHighlightRules = function() - { - - var keywords = lang.arrayToMap( - ("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass") - .split("|") - ); - - var buildinConstants = lang.arrayToMap( - ("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|" + - "NA_complex_").split("|") - ); - - this.$rules = { - "start" : [ - { - token : "comment.sectionhead", - regex : "#+(?!').*(?:----|====|####)\\s*$" - }, - { - token : "comment", - regex : "#+'", - next : "rd-start" - }, - { - token : "comment", - regex : "#.*$" - }, - { - token : "string", // multi line string start - regex : '["]', - next : "qqstring" - }, - { - token : "string", // multi line string start - regex : "[']", - next : "qstring" - }, - { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+[Li]?\\b" - }, - { - token : "constant.numeric", // explicit integer - regex : "\\d+L\\b" - }, - { - token : "constant.numeric", // number - regex : "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b" - }, - { - token : "constant.numeric", // number with leading decimal - regex : "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b" - }, - { - token : "constant.language.boolean", - regex : "(?:TRUE|FALSE|T|F)\\b" - }, - { - token : "identifier", - regex : "`.*?`" - }, - { - onMatch : function(value) { - if (keywords[value]) - return "keyword"; - else if (buildinConstants[value]) - return "constant.language"; - else if (value == '...' || value.match(/^\.\.\d+$/)) - return "variable.language"; - else - return "identifier"; - }, - regex : "[a-zA-Z.][a-zA-Z0-9._]*\\b" - }, - { - token : "keyword.operator", - regex : "%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:" - }, - { - token : "keyword.operator", // infix operators - regex : "%.*?%" - }, - { - token : "paren.keyword.operator", - regex : "[[({]" - }, - { - token : "paren.keyword.operator", - regex : "[\\])}]" - }, - { - token : "text", - regex : "\\s+" - } - ], - "qqstring" : [ - { - token : "string", - regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', - next : "start" - }, - { - token : "string", - regex : '.+' - } - ], - "qstring" : [ - { - token : "string", - regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", - next : "start" - }, - { - token : "string", - regex : '.+' - } - ] - }; - - var rdRules = new TexHighlightRules("comment").getRules(); - for (var i = 0; i < rdRules["start"].length; i++) { - rdRules["start"][i].token += ".virtual-comment"; - } - - this.addRules(rdRules, "rd-"); - this.$rules["rd-start"].unshift({ - token: "text", - regex: "^", - next: "start" - }); - this.$rules["rd-start"].unshift({ - token : "keyword", - regex : "@(?!@)[^ ]*" - }); - this.$rules["rd-start"].unshift({ - token : "comment", - regex : "@@" - }); - this.$rules["rd-start"].push({ - token : "comment", - regex : "[^%\\\\[({\\])}]+" - }); - }; - - oop.inherits(RHighlightRules, TextHighlightRules); - - exports.RHighlightRules = RHighlightRules; -}); - -define("ace/mode/rhtml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/r_highlight_rules","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var RHighlightRules = require("./r_highlight_rules").RHighlightRules; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var RHtmlHighlightRules = function() { - HtmlHighlightRules.call(this); - - this.$rules["start"].unshift({ - token: "support.function.codebegin", - regex: "^<" + "!--\\s*begin.rcode\\s*(?:.*)", - next: "r-start" - }); - - this.embedRules(RHighlightRules, "r-", [{ - token: "support.function.codeend", - regex: "^\\s*end.rcode\\s*-->", - next: "start" - }], ["start"]); - - this.normalizeRules(); -}; -oop.inherits(RHtmlHighlightRules, TextHighlightRules); - -exports.RHtmlHighlightRules = RHtmlHighlightRules; -}); - -define("ace/mode/rhtml",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/rhtml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var HtmlMode = require("./html").Mode; - -var RHtmlHighlightRules = require("./rhtml_highlight_rules").RHtmlHighlightRules; - -var Mode = function(doc, session) { - HtmlMode.call(this); - this.$session = session; - this.HighlightRules = RHtmlHighlightRules; -}; -oop.inherits(Mode, HtmlMode); - -(function() { - this.insertChunkInfo = { - value: "\n", - position: {row: 0, column: 15} - }; - - this.getLanguageMode = function(position) - { - return this.$session.getState(position.row).match(/^r-/) ? 'R' : 'HTML'; - }; - - this.$id = "ace/mode/rhtml"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(i,o),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+r+")(\\.)(prototype)(\\.)("+r+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:r},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(a,i),t.JavaScriptHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?r=c[t]:void(r=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,i){var a=n.getCursorPosition(),l=o.doc.getLine(a.row);if("{"==i){g(n);var u=n.getSelectionRange(),c=o.doc.getTextRange(u);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return{text:"{"+c+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var m=l.substring(a.column,a.column+1);if("}"==m){var h=o.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==h&&d.isAutoInsertedClosing(a,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var p="";d.isMaybeInsertedClosing(a,l)&&(p=s.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=l.substring(a.column,a.column+1);if("}"===m){var f=o.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!f)return null;var x=this.$getIndent(o.getLine(f.row))}else{if(!p)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var b=x+o.getTabString();return{text:"\n"+b+"\n"+x+p,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){g(n);var s=o.doc.getLine(i.start.row),l=s.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){g(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){g(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var i=o,a=n.getSelectionRange(),s=r.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var l=n.getCursorPosition(),u=r.doc.getLine(l.row),c=u.substring(l.column-1,l.column),d=u.substring(l.column,l.column+1),m=r.getTokenAt(l.row,l.column),h=r.getTokenAt(l.row,l.column+1);if("\\"==c&&m&&/escape/.test(m.type))return null;var p,f=m&&/string/.test(m.type),x=!h||/string/.test(h.type);if(d==i)p=f!==x;else{if(f&&!x)return null;if(f&&x)return null;var b=r.$mode.tokenRe;b.lastIndex=0;var k=b.test(c);b.lastIndex=0;var v=b.test(c);if(k||v)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;p=!0}return{text:p?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){g(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(s==i)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){var o=new a(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",u)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var i=o.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),i=t,a=n.length;t+=1;for(var s=t,l=e.getLength();++tu)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=i)break;if(c.isMultiLine())t=c.end.row;else if(r==u)break}s=t}}return new o(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++na)return new o(a,r,c,t.length)}}.call(a.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};r.inherits(c,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens,a=o.state;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(r+=n)}else if("doc-start"==e){if("start"==a||"no_regex"==a)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(c.prototype),t.Mode=c}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),i=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",u=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",m=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":s,"support.type":i,"support.constant.color":l,"support.constant.fonts":u},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};r.inherits(m,o),t.CssHighlightRules=m}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),i=e("../../token_iterator").TokenIterator,a=function(){this.inherit(o),this.add("colon","insertion",function(e,t,n,r,o){if(":"===o){var a=n.getCursorPosition(),s=new i(r,a.row,a.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var u=r.doc.getLine(a.row),c=u.substring(a.column,a.column+1); +if(":"===c)return{text:"",selection:[1,1]};if(!u.substring(a.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&":"===a){var s=n.getCursorPosition(),l=new i(r,s.row,s.column),u=l.getCurrentToken();if(u&&u.value.match(/\s+/)&&(u=l.stepBackward()),u&&"support.type"===u.type){var c=r.doc.getLine(o.start.row),g=c.substring(o.end.column,o.end.column+1);if(";"===g)return o.end.column++,o}}}),this.add("semicolon","insertion",function(e,t,n,r,o){if(";"===o){var i=n.getCursorPosition(),a=r.doc.getLine(i.row),s=a.substring(i.column,i.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};r.inherits(a,o),t.CssBehaviour=a}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};r.inherits(c,o),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e).tokens;if(o.length&&"comment"==o[o.length-1].type)return r;var i=t.match(/^.*\{\s*$/);return i&&(r+=n),r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===i&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(o.prototype),r.inherits(i,o),t.XmlHighlightRules=i}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/lang"),i=e("./css_highlight_rules").CssHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=o.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),u=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(i,"css-","style"),this.embedTagRules(a,"js-","script"),this.constructor===u&&this.normalizeRules()};r.inherits(u,s),t.HtmlHighlightRules=u}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function r(e,t){return e.type.lastIndexOf(t+".xml")>-1}var o=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,o,i){if('"'==i||"'"==i){var s=i,l=o.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var u=n.getCursorPosition(),c=o.doc.getLine(u.row),g=c.substring(u.column,u.column+1),d=new a(o,u.row,u.column),m=d.getCurrentToken();if(g==s&&(r(m,"attribute-value")||r(m,"string")))return{text:"",selection:[1,1]};if(m||(m=d.stepBackward()),!m)return;for(;r(m,"tag-whitespace")||r(m,"whitespace");)m=d.stepBackward();var h=!g||g.match(/\s/);if(r(m,"attribute-equals")&&(h||">"==g)||r(m,"decl-attribute-equals")&&(h||"?"==g))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(s==i)return o.end.column++,o}}),this.add("autoclosing","insertion",function(e,t,n,o,i){if(">"==i){var s=n.getCursorPosition(),l=new a(o,s.row,s.column),u=l.getCurrentToken()||l.stepBackward();if(!u||!(r(u,"tag-name")||r(u,"tag-whitespace")||r(u,"attribute-name")||r(u,"attribute-equals")||r(u,"attribute-value")))return;if(r(u,"reference.attribute-value"))return;if(r(u,"attribute-value")){var c=u.value.charAt(0);if('"'==c||"'"==c){var g=u.value.charAt(u.value.length-1),d=l.getCurrentTokenColumn()+u.value.length;if(d>s.column||d==s.column&&c!=g)return}}for(;!r(u,"tag-name");)u=l.stepBackward();var m=l.getCurrentTokenRow(),h=l.getCurrentTokenColumn();if(r(l.stepBackward(),"end-tag-open"))return;var p=u.value;if(m==s.row&&(p=p.substring(0,s.column-h)),this.voidElements.hasOwnProperty(p.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,o){if("\n"==o){var i=n.getCursorPosition(),s=r.getLine(i.row),l=new a(r,i.row,i.column),u=l.getCurrentToken();if(u&&u.type.indexOf("tag-close")!==-1){for(;u&&u.type.indexOf("tag-name")===-1;)u=l.stepBackward();if(!u)return;var c=u.value,g=l.getCurrentTokenRow();if(u=l.stepBackward(),!u||u.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]){var d=r.getTokenAt(i.row,i.column+1),s=r.getLine(g),m=this.$getIndent(s),h=m+r.getTabString();return d&&"-1}var o=e("../../lib/oop"),i=(e("../../lib/lang"),e("../../range").Range),a=e("./fold_mode").FoldMode,s=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(e,t){a.call(this),this.voidElements=e||{},this.optionalEndTags=o.mixin({},this.voidElements),t&&o.mixin(this.optionalEndTags,t)};o.inherits(l,a);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?"markbeginend"==t?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),o=new u,i=0;i"==a.value;break}return o}if(r(a,"tag-close"))return o.selfClosing="/>"==a.value,o;o.start.column+=a.value.length}return null},this._findEndTagInLine=function(e,t,n,o){for(var i=e.getTokens(t),a=0,s=0;s"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(t&&n.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,n){var r=this._getFirstTagInLine(e,n);if(!r)return null;var o,a=r.closing||r.selfClosing,l=[];if(a)for(var u=new s(e,n,r.end.column),c={row:n,column:r.start.column};o=this._readTagBackward(u);){if(o.selfClosing){if(l.length)continue;return o.start.column+=o.tagName.length+2,o.end.column-=2,i.fromPoints(o.start,o.end)}if(o.closing)l.push(o);else if(this._pop(l,o),0==l.length)return o.start.column+=o.tagName.length+2,i.fromPoints(o.start,c)}else for(var u=new s(e,n,r.start.column),g={row:n,column:r.start.column+r.tagName.length+2};o=this._readTagForward(u);){if(o.selfClosing){if(l.length)continue;return o.start.column+=o.tagName.length+2,o.end.column-=2,i.fromPoints(o.start,o.end)}if(o.closing){if(this._pop(l,o),0==l.length)return i.fromPoints(g,o.start)}else l.push(o)}}}).call(l.prototype)}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("./mixed").FoldMode,i=e("./xml").FoldMode,a=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){o.call(this,new i(e,t),{"js-":new a,"css-":new a})};r.inherits(s,o)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function r(e,t){return e.type.lastIndexOf(t+".xml")>-1}function o(e,t){for(var n=new i(e,t.row,t.column),o=n.getCurrentToken();o&&!r(o,"tag-name");)o=n.stepBackward();if(o)return o.value}var i=e("../token_iterator").TokenIterator,a=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=a.concat(s),u={html:["manifest"],head:[],title:[],base:["href","target"],link:["href","hreflang","rel","media","type","sizes"],meta:["http-equiv","name","content","charset"],style:["type","media","scoped"],script:["charset","type","src","defer","async"],noscript:["href"],body:["onafterprint","onbeforeprint","onbeforeunload","onhashchange","onmessage","onoffline","onpopstate","onredo","onresize","onstorage","onundo","onunload"],section:[],nav:[],article:["pubdate"],aside:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],footer:[],address:[],main:[],p:[],hr:[],pre:[],blockquote:["cite"],ol:["start","reversed"],ul:[],li:["value"],dl:[],dt:[],dd:[],figure:[],figcaption:[],div:[],a:["href","target","ping","rel","media","hreflang","type"],em:[],strong:[],small:[],s:[],cite:[],q:["cite"],dfn:[],abbr:[],data:[],time:["datetime"],code:[],var:[],samp:[],kbd:[],sub:[],sup:[],i:[],b:[],u:[],mark:[],ruby:[],rt:[],rp:[],bdi:[],bdo:[],span:[],br:[],wbr:[],ins:["cite","datetime"],del:["cite","datetime"],img:["alt","src","height","width","usemap","ismap"],iframe:["name","src","height","width","sandbox","seamless"],embed:["src","height","width","type"],object:["param","data","type","height","width","usemap","name","form","classid"],param:["name","value"],video:["src","autobuffer","autoplay","loop","controls","width","height","poster"],audio:["src","autobuffer","autoplay","loop","controls"],source:["src","type","media"],track:["kind","src","srclang","label","default"],canvas:["width","height"],map:["name"],area:["shape","coords","href","hreflang","alt","target","media","rel","ping","type"],svg:[],math:[],table:["summary"],caption:[],colgroup:["span"],col:["span"],tbody:[],thead:[],tfoot:[],tr:[],td:["headers","rowspan","colspan"],th:["headers","rowspan","colspan","scope"],form:["accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],fieldset:["disabled","form","name"],legend:[],label:["form","for"],input:["type","accept","alt","autocomplete","checked","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","multiple","pattern","placeholder","readonly","required","size","src","step","width","files","value"],button:["autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","value","type"],select:["autofocus","disabled","form","multiple","name","size"],datalist:[],optgroup:["disabled","label"],option:["disabled","selected","label","value"],textarea:["autofocus","disabled","form","maxlength","name","placeholder","readonly","required","rows","cols","wrap"],keygen:["autofocus","challenge","disabled","form","keytype","name"],output:["for","form","name"],progress:["value","max"],meter:["value","min","max","low","high","optimum"],details:["open"],summary:[],command:["type","label","icon","disabled","checked","radiogroup","command"],menu:["type","label"],dialog:["open"]},c=Object.keys(u),g=function(){};(function(){this.getCompletions=function(e,t,n,o){var i=t.getTokenAt(n.row,n.column);return i?r(i,"tag-name")||r(i,"tag-open")||r(i,"end-tag-open")?this.getTagCompletions(e,t,n,o):r(i,"tag-whitespace")||r(i,"attribute-name")?this.getAttributeCompetions(e,t,n,o):[]:[]},this.getTagCompletions=function(e,t,n,r){return c.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompetions=function(e,t,n,r){var i=o(t,n);if(!i)return[];var a=l;return i in u&&(a=a.concat(u[i])),a.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})}}).call(g.prototype),t.HtmlCompletions=g}),define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/lang"),i=e("./text").Mode,a=e("./javascript").Mode,s=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,g=e("./html_completions").HtmlCompletions,d=e("../worker/worker_client").WorkerClient,m=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],h=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],p=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new u,this.$completer=new g,this.createModeDelegates({"js-":a,"css-":s}),this.foldingRules=new c(this.voidElements,o.arrayToMap(h))};r.inherits(p,i),function(){this.blockComment={start:""},this.voidElements=o.arrayToMap(m),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,r){return this.$completer.getCompletions(e,t,n,r)},this.createWorker=function(e){if(this.constructor==p){var t=new d(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(p.prototype),t.Mode=p}),define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),i=function(e){e||(e="text"),this.$rules={start:[{token:"comment",regex:"%.*$"},{token:e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",next:"nospell"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:e,regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell."+e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",next:"start"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])]"},{token:"paren.keyword.operator",regex:"}",next:"start"},{token:"nospell."+e,regex:"\\s+"},{token:"nospell."+e,regex:"\\w+"}]}};r.inherits(i,o),t.TexHighlightRules=i}),define("ace/mode/r_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules"],function(e,t,n){var r=e("../lib/oop"),o=e("../lib/lang"),i=e("./text_highlight_rules").TextHighlightRules,a=e("./tex_highlight_rules").TexHighlightRules,s=function(){var e=o.arrayToMap("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|require|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass".split("|")),t=o.arrayToMap("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|NA_complex_".split("|"));this.$rules={start:[{token:"comment.sectionhead",regex:"#+(?!').*(?:----|====|####)\\s*$"},{token:"comment",regex:"#+'",next:"rd-start"},{token:"comment",regex:"#.*$"},{token:"string",regex:'["]',next:"qqstring"},{token:"string",regex:"[']",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+[Li]?\\b"},{token:"constant.numeric",regex:"\\d+L\\b"},{token:"constant.numeric",regex:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b"},{token:"constant.numeric",regex:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b"},{token:"constant.language.boolean",regex:"(?:TRUE|FALSE|T|F)\\b"},{token:"identifier",regex:"`.*?`"},{onMatch:function(n){return e[n]?"keyword":t[n]?"constant.language":"..."==n||n.match(/^\.\.\d+$/)?"variable.language":"identifier"},regex:"[a-zA-Z.][a-zA-Z0-9._]*\\b"},{token:"keyword.operator",regex:"%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:"},{token:"keyword.operator",regex:"%.*?%"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]};for(var n=new a("comment").getRules(),r=0;r",next:"start"}],["start"]),this.normalizeRules()};r.inherits(s,a),t.RHtmlHighlightRules=s}),define("ace/mode/rhtml",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/rhtml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./html").Mode,i=e("./rhtml_highlight_rules").RHtmlHighlightRules,a=function(e,t){o.call(this),this.$session=t,this.HighlightRules=i};r.inherits(a,o),function(){this.insertChunkInfo={value:"\n",position:{row:0,column:15}},this.getLanguageMode=function(e){return this.$session.getState(e.row).match(/^r-/)?"R":"HTML"},this.$id="ace/mode/rhtml"}.call(a.prototype),t.Mode=a}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-ruby.js b/www/js/vendor/ace/mode-ruby.js index 0fee77bcf..977aac2b1 100755 --- a/www/js/vendor/ace/mode-ruby.js +++ b/www/js/vendor/ace/mode-ruby.js @@ -1,839 +1 @@ -define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var constantOtherSymbol = exports.constantOtherSymbol = { - token : "constant.other.symbol.ruby", // symbol - regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" -}; - -var qString = exports.qString = { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" -}; - -var qqString = exports.qqString = { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' -}; - -var tString = exports.tString = { - token : "string", // backtick string - regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]" -}; - -var constantNumericHex = exports.constantNumericHex = { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b" -}; - -var constantNumericFloat = exports.constantNumericFloat = { - token : "constant.numeric", // float - regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b" -}; - -var RubyHighlightRules = function() { - - var builtinFunctions = ( - "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" + - "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" + - "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" + - "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" + - "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" + - "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" + - "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" + - "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" + - "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" + - "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" + - "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" + - "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" + - "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" + - "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" + - "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" + - "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" + - "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" + - "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" + - "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" + - "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" + - "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" + - "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" + - "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" + - "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" + - "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" + - "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" + - "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" + - "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" + - "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" + - "has_many|has_one|belongs_to|has_and_belongs_to_many" - ); - - var keywords = ( - "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" + - "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" + - "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield" - ); - - var buildinConstants = ( - "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" + - "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING" - ); - - var builtinVariables = ( - "\$DEBUG|\$defout|\$FILENAME|\$LOAD_PATH|\$SAFE|\$stdin|\$stdout|\$stderr|\$VERBOSE|" + - "$!|root_url|flash|session|cookies|params|request|response|logger|self" - ); - - var keywordMapper = this.$keywords = this.createKeywordMapper({ - "keyword": keywords, - "constant.language": buildinConstants, - "variable.language": builtinVariables, - "support.function": builtinFunctions, - "invalid.deprecated": "debugger" // TODO is this a remnant from js mode? - }, "identifier"); - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "#.*$" - }, { - token : "comment", // multi line comment - regex : "^=begin(?:$|\\s.*$)", - next : "comment" - }, { - token : "string.regexp", - regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" - }, - - [{ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren.lparen"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.start", - regex : /"/, - push : [{ - token : "constant.language.escape", - regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/ - }, { - token : "paren.start", - regex : /\#{/, - push : "start" - }, { - token : "string.end", - regex : /"/, - next : "pop" - }, { - defaultToken: "string" - }] - }, { - token : "string.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/ - }, { - token : "paren.start", - regex : /\#{/, - push : "start" - }, { - token : "string.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string" - }] - }, { - token : "string.start", - regex : /'/, - push : [{ - token : "constant.language.escape", - regex : /\\['\\]/ - }, { - token : "string.end", - regex : /'/, - next : "pop" - }, { - defaultToken: "string" - }] - }], - - { - token : "text", // namespaces aren't symbols - regex : "::" - }, { - token : "variable.instance", // instance variable - regex : "@{1,2}[a-zA-Z_\\d]+" - }, { - token : "support.class", // class name - regex : "[A-Z][a-zA-Z_\\d]+" - }, - - constantOtherSymbol, - constantNumericHex, - constantNumericFloat, - - { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "punctuation.separator.key-value", - regex : "=>" - }, { - stateName: "heredoc", - onMatch : function(value, currentState, stack) { - var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; - var tokens = value.split(this.splitRegex); - stack.push(next, tokens[3]); - return [ - {type:"constant", value: tokens[1]}, - {type:"string", value: tokens[2]}, - {type:"support.class", value: tokens[3]}, - {type:"string", value: tokens[4]} - ]; - }, - regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)", - rules: { - heredoc: [{ - onMatch: function(value, currentState, stack) { - if (value === stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack[0] || "start"; - return "support.class"; - } - this.next = ""; - return "string"; - }, - regex: ".*$", - next: "start" - }], - indentedHeredoc: [{ - token: "string", - regex: "^ +" - }, { - onMatch: function(value, currentState, stack) { - if (value === stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack[0] || "start"; - return "support.class"; - } - this.next = ""; - return "string"; - }, - regex: ".*$", - next: "start" - }] - } - }, { - regex : "$", - token : "empty", - next : function(currentState, stack) { - if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") - return stack[0]; - return currentState; - } - }, { - token : "keyword.operator", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : "^=end(?:$|\\s.*$)", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ] - }; - - this.normalizeRules(); -}; - -oop.inherits(RubyHighlightRules, TextHighlightRules); - -exports.RubyHighlightRules = RubyHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/coffee"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var FoldMode = require("./folding/coffee").FoldMode; - -var Mode = function() { - this.HighlightRules = RubyHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - - this.lineCommentStart = "#"; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/); - var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/); - var startingConditional = line.match(/^\s*(if|else)\s*/) - if (match || startingClassOrMethod || startingDoBlock || startingConditional) { - indent += tab; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return /^\s+(end|else)$/.test(line + input) || this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, session, row) { - var line = session.getLine(row); - if (/}/.test(line)) - return this.$outdent.autoOutdent(session, row); - var indent = this.$getIndent(line); - var prevLine = session.getLine(row - 1); - var prevIndent = this.$getIndent(prevLine); - var tab = session.getTabString(); - if (prevIndent.length <= indent.length) { - if (indent.slice(-tab.length) == tab) - session.remove(new Range(row, indent.length-tab.length, row, indent.length)); - } - }; - - this.$id = "ace/mode/ruby"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),s=e("./text_highlight_rules").TextHighlightRules,o=t.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"},i=(t.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},t.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},t.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"},t.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"}),a=t.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"},c=function(){var e="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many",t="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield",n="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING",r="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",s=this.$keywords=this.createKeywordMapper({keyword:t,"constant.language":n,"variable.language":r,"support.function":e,"invalid.deprecated":"debugger"},"identifier");this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment",regex:"^=begin(?:$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},[{regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren.lparen"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.start",regex:/"/,push:[{token:"constant.language.escape",regex:/\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/},{token:"paren.start",regex:/\#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:/\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/},{token:"paren.start",regex:/\#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/'/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]}],{token:"text",regex:"::"},{token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]+"},o,i,a,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:s,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(e,t,n){var r="-"==e[2]?"indentedHeredoc":"heredoc",s=e.split(this.splitRegex);return n.push(r,s[3]),[{type:"constant",value:s[1]},{type:"string",value:s[2]},{type:"support.class",value:s[3]},{type:"string",value:s[4]}]},regex:"(<<-?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return"heredoc"===t[0]||"indentedHeredoc"===t[0]?t[0]:e}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"^=end(?:$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}]},this.normalizeRules()};r.inherits(c,s),t.RubyHighlightRules=c}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,s=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),s=n.match(/^(\s*\})/);if(!s)return 0;var o=s[1].length,i=e.findMatchingBracket({row:t,column:o});if(!i||i.row==t)return 0;var a=this.$getIndent(e.getLine(i.row));e.replace(new r(t,0,t,o-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(s.prototype),t.MatchingBraceOutdent=s}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,s=e("../../lib/oop"),o=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),c=["text","paren.rparen","punctuation.operator"],l=["text","paren.rparen","punctuation.operator","comment"],u={},d=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?r=u[t]:void(r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},g=function(){this.add("braces","insertion",function(e,t,n,s,o){var i=n.getCursorPosition(),c=s.doc.getLine(i.row);if("{"==o){d(n);var l=n.getSelectionRange(),u=s.doc.getTextRange(l);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(g.isSaneInsertion(n,s))return/[\]\}\)]/.test(c[i.column])||n.inMultiSelectMode?(g.recordAutoInsert(n,s,"}"),{text:"{}",selection:[1,1]}):(g.recordMaybeInsert(n,s,"{"),{text:"{",selection:[1,1]})}else if("}"==o){d(n);var _=c.substring(i.column,i.column+1);if("}"==_){var f=s.$findOpeningBracket("}",{column:i.column+1,row:i.row});if(null!==f&&g.isAutoInsertedClosing(i,c,o))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==o||"\r\n"==o){d(n);var h="";g.isMaybeInsertedClosing(i,c)&&(h=a.stringRepeat("}",r.maybeInsertedBrackets),g.clearMaybeInsertedClosing());var _=c.substring(i.column,i.column+1);if("}"===_){var m=s.findMatchingBracket({row:i.row,column:i.column+1},"}");if(!m)return null;var p=this.$getIndent(s.getLine(m.row))}else{if(!h)return void g.clearMaybeInsertedClosing();var p=this.$getIndent(c)}var x=p+s.getTabString();return{text:"\n"+x+"\n"+p+h,selection:[1,x.length,1,x.length]}}g.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,s,o){var i=s.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==i){d(n);var a=s.doc.getLine(o.start.row),c=a.substring(o.end.column,o.end.column+1);if("}"==c)return o.end.column++,o;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,s){if("("==s){d(n);var o=n.getSelectionRange(),i=r.doc.getTextRange(o);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"("+i+")",selection:!1};if(g.isSaneInsertion(n,r))return g.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==s){d(n);var a=n.getCursorPosition(),c=r.doc.getLine(a.row),l=c.substring(a.column,a.column+1);if(")"==l){var u=r.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==u&&g.isAutoInsertedClosing(a,c,s))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,s){var o=r.doc.getTextRange(s);if(!s.isMultiLine()&&"("==o){d(n);var i=r.doc.getLine(s.start.row),a=i.substring(s.start.column+1,s.start.column+2);if(")"==a)return s.end.column++,s}}),this.add("brackets","insertion",function(e,t,n,r,s){if("["==s){d(n);var o=n.getSelectionRange(),i=r.doc.getTextRange(o);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"["+i+"]",selection:!1};if(g.isSaneInsertion(n,r))return g.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==s){d(n);var a=n.getCursorPosition(),c=r.doc.getLine(a.row),l=c.substring(a.column,a.column+1);if("]"==l){var u=r.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==u&&g.isAutoInsertedClosing(a,c,s))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,s){var o=r.doc.getTextRange(s);if(!s.isMultiLine()&&"["==o){d(n);var i=r.doc.getLine(s.start.row),a=i.substring(s.start.column+1,s.start.column+2);if("]"==a)return s.end.column++,s}}),this.add("string_dquotes","insertion",function(e,t,n,r,s){if('"'==s||"'"==s){d(n);var o=s,i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&"'"!==a&&'"'!=a&&n.getWrapBehavioursEnabled())return{text:o+a+o,selection:!1};var c=n.getCursorPosition(),l=r.doc.getLine(c.row),u=l.substring(c.column-1,c.column),g=l.substring(c.column,c.column+1),_=r.getTokenAt(c.row,c.column),f=r.getTokenAt(c.row,c.column+1);if("\\"==u&&_&&/escape/.test(_.type))return null;var h,m=_&&/string/.test(_.type),p=!f||/string/.test(f.type);if(g==o)h=m!==p;else{if(m&&!p)return null;if(m&&p)return null;var x=r.$mode.tokenRe;x.lastIndex=0;var b=x.test(u);x.lastIndex=0;var v=x.test(u);if(b||v)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;h=!0}return{text:h?o+o:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,s){var o=r.doc.getTextRange(s);if(!s.isMultiLine()&&('"'==o||"'"==o)){d(n);var i=r.doc.getLine(s.start.row),a=i.substring(s.start.column+1,s.start.column+2);if(a==o)return s.end.column++,s}})};g.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new i(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",c)){var s=new i(t,n.row,n.column+1);if(!this.$matchTokenType(s.getCurrentToken()||"text",c))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",l)},g.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},g.recordAutoInsert=function(e,t,n){var s=e.getCursorPosition(),o=t.doc.getLine(s.row);this.isAutoInsertedClosing(s,o,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=s.row,r.autoInsertedLineEnd=n+o.substr(s.column),r.autoInsertedBrackets++},g.recordMaybeInsert=function(e,t,n){var s=e.getCursorPosition(),o=t.doc.getLine(s.row);this.isMaybeInsertedClosing(s,o)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=s.row,r.maybeInsertedLineStart=o.substr(0,s.column)+n,r.maybeInsertedLineEnd=o.substr(s.column),r.maybeInsertedBrackets++},g.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},g.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},g.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},g.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},s.inherits(g,o),t.CstyleBehaviour=g}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),s=e("./fold_mode").FoldMode,o=e("../../range").Range,i=t.FoldMode=function(){};r.inherits(i,s),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var s=/\S/,i=e.getLine(n),a=i.search(s);if(a!=-1&&"#"==i[a]){for(var c=i.length,l=e.getLength(),u=n,d=n;++nu){var _=e.getLine(d).length;return new o(u,c,d,_)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),s=r.search(/\S/),o=e.getLine(n+1),i=e.getLine(n-1),a=i.search(/\S/),c=o.search(/\S/);if(s==-1)return e.foldWidgets[n-1]=a!=-1&&a= stack[1]) { - if (value.length > stack[1]) - token = "invalid"; - stack.shift(); - stack.shift(); - this.next = stack.shift(); - } else { - this.next = ""; - } - return token; - }, - regex : /"#*/, - next : "start" - }, { - defaultToken : "string.quoted.raw.source.rust" - } - ] - }, - { token: 'string.quoted.double.source.rust', - regex: '"', - push: - [ { token: 'string.quoted.double.source.rust', - regex: '"', - next: 'pop' }, - { include: '#rust_escaped_character' }, - { defaultToken: 'string.quoted.double.source.rust' } ] }, - { token: [ 'keyword.source.rust', 'meta.function.source.rust', - 'entity.name.function.source.rust', 'meta.function.source.rust' ], - regex: '\\b(fn)(\\s+)([a-zA-Z_][a-zA-Z0-9_][\\w\\:,+ \\\'<>]*)(\\s*\\()' }, - { token: 'support.constant', regex: '\\b[a-zA-Z_][\\w\\d]*::' }, - { token: 'keyword.source.rust', - regex: '\\b(?:as|assert|break|claim|const|copy|Copy|do|drop|else|extern|fail|for|if|impl|in|let|log|loop|match|mod|module|move|mut|Owned|priv|pub|pure|ref|return|unchecked|unsafe|use|while|mod|Send|static|trait|class|struct|enum|type)\\b' }, - { token: 'storage.type.source.rust', - regex: '\\b(?:Self|m32|m64|m128|f80|f16|f128|int|uint|float|char|bool|u8|u16|u32|u64|f32|f64|i8|i16|i32|i64|str|option|either|c_float|c_double|c_void|FILE|fpos_t|DIR|dirent|c_char|c_schar|c_uchar|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|size_t|ptrdiff_t|clock_t|time_t|c_longlong|c_ulonglong|intptr_t|uintptr_t|off_t|dev_t|ino_t|pid_t|mode_t|ssize_t)\\b' }, - { token: 'variable.language.source.rust', regex: '\\bself\\b' }, - { token: 'keyword.operator', - regex: '!|\\$|\\*|\\-\\-|\\-|\\+\\+|\\+|-->|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|/=|%=|\\+=|\\-=|&=|\\^=|,|;' }, - { token: 'constant.language.source.rust', - regex: '\\b(?:true|false|Some|None|Left|Right|Ok|Err)\\b' }, - { token: 'support.constant.source.rust', - regex: '\\b(?:EXIT_FAILURE|EXIT_SUCCESS|RAND_MAX|EOF|SEEK_SET|SEEK_CUR|SEEK_END|_IOFBF|_IONBF|_IOLBF|BUFSIZ|FOPEN_MAX|FILENAME_MAX|L_tmpnam|TMP_MAX|O_RDONLY|O_WRONLY|O_RDWR|O_APPEND|O_CREAT|O_EXCL|O_TRUNC|S_IFIFO|S_IFCHR|S_IFBLK|S_IFDIR|S_IFREG|S_IFMT|S_IEXEC|S_IWRITE|S_IREAD|S_IRWXU|S_IXUSR|S_IWUSR|S_IRUSR|F_OK|R_OK|W_OK|X_OK|STDIN_FILENO|STDOUT_FILENO|STDERR_FILENO)\\b' }, - { token: 'meta.preprocessor.source.rust', - regex: '\\b\\w\\(\\w\\)*!|#\\[[\\w=\\(\\)_]+\\]\\b' }, - { token: 'constant.numeric.integer.source.rust', - regex: '\\b(?:[0-9][0-9_]*|[0-9][0-9_]*(?:u|u8|u16|u32|u64)|[0-9][0-9_]*(?:i|i8|i16|i32|i64))\\b' }, - { token: 'constant.numeric.hex.source.rust', - regex: '\\b(?:0x[a-fA-F0-9_]+|0x[a-fA-F0-9_]+(?:u|u8|u16|u32|u64)|0x[a-fA-F0-9_]+(?:i|i8|i16|i32|i64))\\b' }, - { token: 'constant.numeric.binary.source.rust', - regex: '\\b(?:0b[01_]+|0b[01_]+(?:u|u8|u16|u32|u64)|0b[01_]+(?:i|i8|i16|i32|i64))\\b' }, - { token: 'constant.numeric.float.source.rust', - regex: '[0-9][0-9_]*(?:f32|f64|f)|[0-9][0-9_]*[eE][+-]=[0-9_]+|[0-9][0-9_]*[eE][+-]=[0-9_]+(?:f32|f64|f)|[0-9][0-9_]*\\.[0-9_]+|[0-9][0-9_]*\\.[0-9_]+(?:f32|f64|f)|[0-9][0-9_]*\\.[0-9_]+%[eE][+-]=[0-9_]+|[0-9][0-9_]*\\.[0-9_]+%[eE][+-]=[0-9_]+(?:f32|f64|f)' }, - { token: 'comment.line.documentation.source.rust', - regex: '//!.*$', - push_: - [ { token: 'comment.line.documentation.source.rust', - regex: '$', - next: 'pop' }, - { defaultToken: 'comment.line.documentation.source.rust' } ] }, - { token: 'comment.line.double-dash.source.rust', - regex: '//.*$', - push_: - [ { token: 'comment.line.double-dash.source.rust', - regex: '$', - next: 'pop' }, - { defaultToken: 'comment.line.double-dash.source.rust' } ] }, - { token: 'comment.start.block.source.rust', - regex: '/\\*', - stateName: 'comment', - push: - [ { token: 'comment.start.block.source.rust', - regex: '/\\*', - push: 'comment' }, - { token: 'comment.end.block.source.rust', - regex: '\\*/', - next: 'pop' }, - { defaultToken: 'comment.block.source.rust' } ] } ], - '#rust_escaped_character': - [ { token: 'constant.character.escape.source.rust', - regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)' } ] } - - this.normalizeRules(); -}; - -RustHighlightRules.metaData = { fileTypes: [ 'rs', 'rc' ], - foldingStartMarker: '^.*\\bfn\\s*(\\w+\\s*)?\\([^\\)]*\\)(\\s*\\{[^\\}]*)?\\s*$', - foldingStopMarker: '^\\s*\\}', - name: 'Rust', - scopeName: 'source.rust' } - - -oop.inherits(RustHighlightRules, TextHighlightRules); - -exports.RustHighlightRules = RustHighlightRules; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/rust",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rust_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var RustHighlightRules = require("./rust_highlight_rules").RustHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = RustHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$id = "ace/mode/rust"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/rust_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var o=e("../lib/oop"),n=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"variable.other.source.rust",regex:"'[a-zA-Z_][a-zA-Z0-9_]*[^\\']"},{token:"string.quoted.single.source.rust",regex:"'",push:[{token:"string.quoted.single.source.rust",regex:"'",next:"pop"},{include:"#rust_escaped_character"},{defaultToken:"string.quoted.single.source.rust"}]},{stateName:"bracketedComment",onMatch:function(e,t,r){return r.unshift(this.next,e.length-1,t),"string.quoted.raw.source.rust"},regex:/r#*"/,next:[{onMatch:function(e,t,r){var o="string.quoted.raw.source.rust";return e.length>=r[1]?(e.length>r[1]&&(o="invalid"),r.shift(),r.shift(),this.next=r.shift()):this.next="",o},regex:/"#*/,next:"start"},{defaultToken:"string.quoted.raw.source.rust"}]},{token:"string.quoted.double.source.rust",regex:'"',push:[{token:"string.quoted.double.source.rust",regex:'"',next:"pop"},{include:"#rust_escaped_character"},{defaultToken:"string.quoted.double.source.rust"}]},{token:["keyword.source.rust","meta.function.source.rust","entity.name.function.source.rust","meta.function.source.rust"],regex:"\\b(fn)(\\s+)([a-zA-Z_][a-zA-Z0-9_][\\w\\:,+ \\'<>]*)(\\s*\\()"},{token:"support.constant",regex:"\\b[a-zA-Z_][\\w\\d]*::"},{token:"keyword.source.rust",regex:"\\b(?:as|assert|break|claim|const|copy|Copy|do|drop|else|extern|fail|for|if|impl|in|let|log|loop|match|mod|module|move|mut|Owned|priv|pub|pure|ref|return|unchecked|unsafe|use|while|mod|Send|static|trait|class|struct|enum|type)\\b"},{token:"storage.type.source.rust",regex:"\\b(?:Self|m32|m64|m128|f80|f16|f128|int|uint|float|char|bool|u8|u16|u32|u64|f32|f64|i8|i16|i32|i64|str|option|either|c_float|c_double|c_void|FILE|fpos_t|DIR|dirent|c_char|c_schar|c_uchar|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|size_t|ptrdiff_t|clock_t|time_t|c_longlong|c_ulonglong|intptr_t|uintptr_t|off_t|dev_t|ino_t|pid_t|mode_t|ssize_t)\\b"},{token:"variable.language.source.rust",regex:"\\bself\\b"},{token:"keyword.operator",regex:"!|\\$|\\*|\\-\\-|\\-|\\+\\+|\\+|-->|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|/=|%=|\\+=|\\-=|&=|\\^=|,|;"},{token:"constant.language.source.rust",regex:"\\b(?:true|false|Some|None|Left|Right|Ok|Err)\\b"},{token:"support.constant.source.rust",regex:"\\b(?:EXIT_FAILURE|EXIT_SUCCESS|RAND_MAX|EOF|SEEK_SET|SEEK_CUR|SEEK_END|_IOFBF|_IONBF|_IOLBF|BUFSIZ|FOPEN_MAX|FILENAME_MAX|L_tmpnam|TMP_MAX|O_RDONLY|O_WRONLY|O_RDWR|O_APPEND|O_CREAT|O_EXCL|O_TRUNC|S_IFIFO|S_IFCHR|S_IFBLK|S_IFDIR|S_IFREG|S_IFMT|S_IEXEC|S_IWRITE|S_IREAD|S_IRWXU|S_IXUSR|S_IWUSR|S_IRUSR|F_OK|R_OK|W_OK|X_OK|STDIN_FILENO|STDOUT_FILENO|STDERR_FILENO)\\b"},{token:"meta.preprocessor.source.rust",regex:"\\b\\w\\(\\w\\)*!|#\\[[\\w=\\(\\)_]+\\]\\b"},{token:"constant.numeric.integer.source.rust",regex:"\\b(?:[0-9][0-9_]*|[0-9][0-9_]*(?:u|u8|u16|u32|u64)|[0-9][0-9_]*(?:i|i8|i16|i32|i64))\\b"},{token:"constant.numeric.hex.source.rust",regex:"\\b(?:0x[a-fA-F0-9_]+|0x[a-fA-F0-9_]+(?:u|u8|u16|u32|u64)|0x[a-fA-F0-9_]+(?:i|i8|i16|i32|i64))\\b"},{token:"constant.numeric.binary.source.rust",regex:"\\b(?:0b[01_]+|0b[01_]+(?:u|u8|u16|u32|u64)|0b[01_]+(?:i|i8|i16|i32|i64))\\b"},{token:"constant.numeric.float.source.rust",regex:"[0-9][0-9_]*(?:f32|f64|f)|[0-9][0-9_]*[eE][+-]=[0-9_]+|[0-9][0-9_]*[eE][+-]=[0-9_]+(?:f32|f64|f)|[0-9][0-9_]*\\.[0-9_]+|[0-9][0-9_]*\\.[0-9_]+(?:f32|f64|f)|[0-9][0-9_]*\\.[0-9_]+%[eE][+-]=[0-9_]+|[0-9][0-9_]*\\.[0-9_]+%[eE][+-]=[0-9_]+(?:f32|f64|f)"},{token:"comment.line.documentation.source.rust",regex:"//!.*$",push_:[{token:"comment.line.documentation.source.rust",regex:"$",next:"pop"},{defaultToken:"comment.line.documentation.source.rust"}]},{token:"comment.line.double-dash.source.rust",regex:"//.*$",push_:[{token:"comment.line.double-dash.source.rust",regex:"$",next:"pop"},{defaultToken:"comment.line.double-dash.source.rust"}]},{token:"comment.start.block.source.rust",regex:"/\\*",stateName:"comment",push:[{token:"comment.start.block.source.rust",regex:"/\\*",push:"comment"},{token:"comment.end.block.source.rust",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.source.rust"}]}],"#rust_escaped_character":[{token:"constant.character.escape.source.rust",regex:"\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)"}]},this.normalizeRules()};s.metaData={fileTypes:["rs","rc"],foldingStartMarker:"^.*\\bfn\\s*(\\w+\\s*)?\\([^\\)]*\\)(\\s*\\{[^\\}]*)?\\s*$",foldingStopMarker:"^\\s*\\}",name:"Rust",scopeName:"source.rust"},o.inherits(s,n),t.RustHighlightRules=s}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,r){"use strict";var o=e("../../lib/oop"),n=e("../../range").Range,s=e("./fold_mode").FoldMode,i=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(i,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,r){var o=e.getLine(r);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var n=this._getFoldWidgetBase(e,t,r);return!n&&this.startRegionRe.test(o)?"start":n},this.getFoldWidgetRange=function(e,t,r,o){var n=e.getLine(r);if(this.startRegionRe.test(n))return this.getCommentRegionBlock(e,n,r);var s=n.match(this.foldingStartMarker);if(s){var i=s.index;if(s[1])return this.openingBracketBlock(e,s[1],r,i);var u=e.getCommentFoldRange(r,i+s[0].length,1);return u&&!u.isMultiLine()&&(o?u=this.getSectionRange(e,r):"all"!=t&&(u=null)),u}if("markbegin"!==t){var s=n.match(this.foldingStopMarker);if(s){var i=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],r,i):e.getCommentFoldRange(r,i,-1)}}},this.getSectionRange=function(e,t){var r=e.getLine(t),o=r.search(/\S/),s=t,i=r.length;t+=1;for(var u=t,a=e.getLength();++tc)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=s)break;if(l.isMultiLine())t=l.end.row;else if(o==c)break}u=t}}return new n(s,i,u,e.getLine(u).length)},this.getCommentRegionBlock=function(e,t,r){for(var o=t.search(/\s*$/),s=e.getLength(),i=r,u=/^\s*(?:\/\*|\/\/)#(end)?region\b/,a=1;++ri)return new n(i,o,l,t.length)}}.call(i.prototype)}),define("ace/mode/rust",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rust_highlight_rules","ace/mode/folding/cstyle"],function(e,t,r){"use strict";var o=e("../lib/oop"),n=e("./text").Mode,s=e("./rust_highlight_rules").RustHighlightRules,i=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=s,this.foldingRules=new i};o.inherits(u,n),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/rust"}.call(u.prototype),t.Mode=u}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-sass.js b/www/js/vendor/ace/mode-sass.js index 588a50eb0..4c5934c37 100755 --- a/www/js/vendor/ace/mode-sass.js +++ b/www/js/vendor/ace/mode-sass.js @@ -1,412 +1 @@ -define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var ScssHighlightRules = function() { - - var properties = lang.arrayToMap( (function () { - - var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|"); - - var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" + - "background-size|binding|border-bottom-colors|border-left-colors|" + - "border-right-colors|border-top-colors|border-end|border-end-color|" + - "border-end-style|border-end-width|border-image|border-start|" + - "border-start-color|border-start-style|border-start-width|box-align|" + - "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" + - "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" + - "column-rule-width|column-rule-style|column-rule-color|float-edge|" + - "font-feature-settings|font-language-override|force-broken-image-icon|" + - "image-region|margin-end|margin-start|opacity|outline|outline-color|" + - "outline-offset|outline-radius|outline-radius-bottomleft|" + - "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" + - "outline-style|outline-width|padding-end|padding-start|stack-sizing|" + - "tab-size|text-blink|text-decoration-color|text-decoration-line|" + - "text-decoration-style|transform|transform-origin|transition|" + - "transition-delay|transition-duration|transition-property|" + - "transition-timing-function|user-focus|user-input|user-modify|user-select|" + - "window-shadow|border-radius").split("|"); - - var properties = ("azimuth|background-attachment|background-color|background-image|" + - "background-position|background-repeat|background|border-bottom-color|" + - "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" + - "border-color|border-left-color|border-left-style|border-left-width|" + - "border-left|border-right-color|border-right-style|border-right-width|" + - "border-right|border-spacing|border-style|border-top-color|" + - "border-top-style|border-top-width|border-top|border-width|border|bottom|" + - "box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|" + - "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" + - "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" + - "font-stretch|font-style|font-variant|font-weight|font|height|left|" + - "letter-spacing|line-height|list-style-image|list-style-position|" + - "list-style-type|list-style|margin-bottom|margin-left|margin-right|" + - "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" + - "min-width|opacity|orphans|outline-color|" + - "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" + - "padding-left|padding-right|padding-top|padding|page-break-after|" + - "page-break-before|page-break-inside|page|pause-after|pause-before|" + - "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" + - "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" + - "stress|table-layout|text-align|text-decoration|text-indent|" + - "text-shadow|text-transform|top|unicode-bidi|vertical-align|" + - "visibility|voice-family|volume|white-space|widows|width|word-spacing|" + - "z-index").split("|"); - var ret = []; - for (var i=0, ln=browserPrefix.length; i|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - }, { - caseInsensitive: true - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - "qqstring" : [ - { - token : "string", - regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', - next : "start" - }, { - token : "string", - regex : '.+' - } - ], - "qstring" : [ - { - token : "string", - regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", - next : "start" - }, { - token : "string", - regex : '.+' - } - ] - }; -}; - -oop.inherits(ScssHighlightRules, TextHighlightRules); - -exports.ScssHighlightRules = ScssHighlightRules; - -}); - -define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; - -var SassHighlightRules = function() { - ScssHighlightRules.call(this); - var start = this.$rules.start; - if (start[1].token == "comment") { - start.splice(1, 1, { - onMatch: function(value, currentState, stack) { - stack.unshift(this.next, -1, value.length - 2, currentState); - return "comment"; - }, - regex: /^\s*\/\*/, - next: "comment" - }, { - token: "error.invalid", - regex: "/\\*|[{;}]" - }, { - token: "support.type", - regex: /^\s*:[\w\-]+\s/ - }); - - this.$rules.comment = [ - {regex: /^\s*/, onMatch: function(value, currentState, stack) { - if (stack[1] === -1) - stack[1] = Math.max(stack[2], value.length - 1); - if (value.length <= stack[1]) {stack.shift();stack.shift();stack.shift(); - this.next = stack.shift(); - return "text"; - } else { - this.next = ""; - return "comment"; - } - }, next: "start"}, - {defaultToken: "comment"} - ] - } -}; - -oop.inherits(SassHighlightRules, ScssHighlightRules); - -exports.SassHighlightRules = SassHighlightRules; - -}); - -define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/sass",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sass_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var SassHighlightRules = require("./sass_highlight_rules").SassHighlightRules; -var FoldMode = require("./folding/coffee").FoldMode; - -var Mode = function() { - this.HighlightRules = SassHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "//"; - this.$id = "ace/mode/sass"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var o=e("../lib/oop"),i=e("../lib/lang"),a=e("./text_highlight_rules").TextHighlightRules,n=function(){var e=i.arrayToMap(function(){for(var e="-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-".split("|"),t="appearance|background-clip|background-inline-policy|background-origin|background-size|binding|border-bottom-colors|border-left-colors|border-right-colors|border-top-colors|border-end|border-end-color|border-end-style|border-end-width|border-image|border-start|border-start-color|border-start-style|border-start-width|box-align|box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|box-pack|box-sizing|column-count|column-gap|column-width|column-rule|column-rule-width|column-rule-style|column-rule-color|float-edge|font-feature-settings|font-language-override|force-broken-image-icon|image-region|margin-end|margin-start|opacity|outline|outline-color|outline-offset|outline-radius|outline-radius-bottomleft|outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|outline-style|outline-width|padding-end|padding-start|stack-sizing|tab-size|text-blink|text-decoration-color|text-decoration-line|text-decoration-style|transform|transform-origin|transition|transition-delay|transition-duration|transition-property|transition-timing-function|user-focus|user-input|user-modify|user-select|window-shadow|border-radius".split("|"),r="azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|"),o=[],i=0,a=e.length;i|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]}};o.inherits(n,a),t.ScssHighlightRules=n}),define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"],function(e,t,r){"use strict";var o=e("../lib/oop"),i=(e("../lib/lang"),e("./scss_highlight_rules").ScssHighlightRules),a=function(){i.call(this);var e=this.$rules.start;"comment"==e[1].token&&(e.splice(1,1,{onMatch:function(e,t,r){return r.unshift(this.next,-1,e.length-2,t),"comment"},regex:/^\s*\/\*/,next:"comment"},{token:"error.invalid",regex:"/\\*|[{;}]"},{token:"support.type",regex:/^\s*:[\w\-]+\s/}),this.$rules.comment=[{regex:/^\s*/,onMatch:function(e,t,r){return r[1]===-1&&(r[1]=Math.max(r[2],e.length-1)),e.length<=r[1]?(r.shift(),r.shift(),r.shift(),this.next=r.shift(),"text"):(this.next="","comment")},next:"start"},{defaultToken:"comment"}])};o.inherits(a,i),t.SassHighlightRules=a}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,r){"use strict";var o=e("../../lib/oop"),i=e("./fold_mode").FoldMode,a=e("../../range").Range,n=t.FoldMode=function(){};o.inherits(n,i),function(){this.getFoldWidgetRange=function(e,t,r){var o=this.indentationBlock(e,r);if(o)return o;var i=/\S/,n=e.getLine(r),s=n.search(i);if(s!=-1&&"#"==n[s]){for(var l=n.length,d=e.getLength(),g=r,c=r;++rg){var p=e.getLine(c).length;return new a(g,l,c,p)}}},this.getFoldWidget=function(e,t,r){var o=e.getLine(r),i=o.search(/\S/),a=e.getLine(r+1),n=e.getLine(r-1),s=n.search(/\S/),l=a.search(/\S/);if(i==-1)return e.foldWidgets[r-1]=s!=-1&&s - regex : "<[a-zA-Z0-9.]+>" - }, { - token : "keyword", // pre-compiler directivs - regex : "(?:use|include)" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - "qqstring" : [ - { - token : "string", - regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', - next : "start" - }, { - token : "string", - regex : '.+' - } - ], - "qstring" : [ - { - token : "string", - regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", - next : "start" - }, { - token : "string", - regex : '.+' - } - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); -}; - -oop.inherits(scadHighlightRules, TextHighlightRules); - -exports.scadHighlightRules = scadHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/scad",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scad_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var scadHighlightRules = require("./scad_highlight_rules").scadHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = scadHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/scad"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(i,o),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/scad_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=(e("../lib/lang"),e("./doc_comment_highlight_rules").DocCommentHighlightRules),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=this.createKeywordMapper({"variable.language":"this",keyword:"module|if|else|for","constant.language":"NULL"},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},o.getStartRule("start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant",regex:"<[a-zA-Z0-9.]+>"},{token:"keyword",regex:"(?:use|include)"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]},this.embedRules(o,"doc-",[o.getEndRule("start")])};r.inherits(s,i),t.scadHighlightRules=s}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,s=e.findMatchingBracket({row:t,column:i});if(!s||s.row==t)return 0;var a=this.$getIndent(e.getLine(s.row));e.replace(new r(t,0,t,i-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],l={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,l.rangeCount!=e.multiSelect.rangeCount&&(l={rangeCount:e.multiSelect.rangeCount})),l[t]?r=l[t]:void(r=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,i){var s=n.getCursorPosition(),u=o.doc.getLine(s.row);if("{"==i){g(n);var c=n.getSelectionRange(),l=o.doc.getTextRange(c);if(""!==l&&"{"!==l&&n.getWrapBehavioursEnabled())return{text:"{"+l+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(u[s.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var m=u.substring(s.column,s.column+1);if("}"==m){var h=o.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(null!==h&&d.isAutoInsertedClosing(s,u,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var f="";d.isMaybeInsertedClosing(s,u)&&(f=a.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=u.substring(s.column,s.column+1);if("}"===m){var k=o.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!k)return null;var b=this.$getIndent(o.getLine(k.row))}else{if(!f)return void d.clearMaybeInsertedClosing();var b=this.$getIndent(u)}var x=b+o.getTabString();return{text:"\n"+x+"\n"+b+f,selection:[1,x.length,1,x.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var s=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==s){g(n);var a=o.doc.getLine(i.start.row),u=a.substring(i.end.column,i.end.column+1);if("}"==u)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"("+s+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var a=n.getCursorPosition(),u=r.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if(")"==c){var l=r.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==l&&d.isAutoInsertedClosing(a,u,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(")"==a)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"["+s+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var a=n.getCursorPosition(),u=r.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if("]"==c){var l=r.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==l&&d.isAutoInsertedClosing(a,u,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if("]"==a)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var i=o,s=n.getSelectionRange(),a=r.doc.getTextRange(s);if(""!==a&&"'"!==a&&'"'!=a&&n.getWrapBehavioursEnabled())return{text:i+a+i,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),l=c.substring(u.column-1,u.column),d=c.substring(u.column,u.column+1),m=r.getTokenAt(u.row,u.column),h=r.getTokenAt(u.row,u.column+1);if("\\"==l&&m&&/escape/.test(m.type))return null;var f,k=m&&/string/.test(m.type),b=!h||/string/.test(h.type);if(d==i)f=k!==b;else{if(k&&!b)return null;if(k&&b)return null;var x=r.$mode.tokenRe;x.lastIndex=0;var v=x.test(l);x.lastIndex=0;var p=x.test(l);if(v||p)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;f=!0}return{text:f?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){g(n);var s=r.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(a==i)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var o=new s(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var i=o.match(this.foldingStartMarker);if(i){var s=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,s);var a=e.getCommentFoldRange(n,s+i[0].length,1);return a&&!a.isMultiLine()&&(r?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var s=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,s):e.getCommentFoldRange(n,s,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),i=t,s=n.length;t+=1;for(var a=t,u=e.getLength();++tc)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=i)break;if(l.isMultiLine())t=l.end.row;else if(r==c)break}a=t}}return new o(i,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/)#(end)?region\b/,u=1;++ns)return new o(s,r,l,t.length)}}.call(s.prototype)}),define("ace/mode/scad",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scad_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./scad_highlight_rules").scadHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=(e("../range").Range,e("./behaviour/cstyle").CstyleBehaviour),u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new s,this.$behaviour=new a,this.foldingRules=new u};r.inherits(c,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens,s=o.state;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e){var a=t.match(/^.*[\{\(\[]\s*$/);a&&(r+=n)}else if("doc-start"==e){if("start"==s)return"";var a=t.match(/^\s*(\/?)\*/);a&&(a[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/scad"}.call(c.prototype),t.Mode=c}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-scala.js b/www/js/vendor/ace/mode-scala.js index 3a81c1abc..60eb16be0 100755 --- a/www/js/vendor/ace/mode-scala.js +++ b/www/js/vendor/ace/mode-scala.js @@ -1,1205 +1 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/scala_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var ScalaHighlightRules = function() { - var keywords = ( - "case|default|do|else|for|if|match|while|throw|return|try|catch|finally|yield|" + - "abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|" + - "override|package|private|protected|sealed|super|this|trait|type|val|var|with" - ); - - var buildinConstants = ("true|false"); - - var langClasses = ( - "AbstractMethodError|AssertionError|ClassCircularityError|"+ - "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+ - "ExceptionInInitializerError|IllegalAccessError|"+ - "IllegalThreadStateException|InstantiationError|InternalError|"+ - - "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+ - "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+ - "SuppressWarnings|TypeNotPresentException|UnknownError|"+ - "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+ - "InstantiationException|IndexOutOfBoundsException|"+ - "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+ - "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+ - "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+ - "InterruptedException|NoSuchMethodException|IllegalAccessException|"+ - "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+ - "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+ - "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+ - "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+ - "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+ - "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+ - "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+ - "ArrayStoreException|ClassCastException|LinkageError|"+ - "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+ - "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+ - "Cloneable|Class|CharSequence|Comparable|String|Object|" + - "Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|" + - "Option|Array|Char|Byte|Short|Int|Long|Nothing" - - - ); - - var keywordMapper = this.createKeywordMapper({ - "variable.language": "this", - "keyword": keywords, - "support.function": langClasses, - "constant.language": buildinConstants - }, "identifier"); - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "\\/\\/.*$" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment" - }, { - token : "string.regexp", - regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" - }, { - token : "string", - regex : '"""', - next : "tstring" - }, { - token : "string", - regex : '"(?=.)', // " strings can't span multiple lines - next : "string" - }, { - token : "symbol.constant", // single line - regex : "'[\\w\\d_]+" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - "string" : [ - { - token : "escape", - regex : '\\\\"' - }, { - token : "string", - regex : '"', - next : "start" - }, { - token : "string.invalid", - regex : '[^"\\\\]*$', - next : "start" - }, { - token : "string", - regex : '[^"\\\\]+' - } - ], - "tstring" : [ - { - token : "string", // closing comment - regex : '"{3,5}', - next : "start" - }, { - token : "string", // comment spanning whole line - regex : ".+?" - } - ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); -}; - -oop.inherits(ScalaHighlightRules, TextHighlightRules); - -exports.ScalaHighlightRules = ScalaHighlightRules; -}); - -define("ace/mode/scala",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/scala_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var JavaScriptMode = require("./javascript").Mode; -var ScalaHighlightRules = require("./scala_highlight_rules").ScalaHighlightRules; - -var Mode = function() { - JavaScriptMode.call(this); - - this.HighlightRules = ScalaHighlightRules; -}; -oop.inherits(Mode, JavaScriptMode); - -(function() { - - this.createWorker = function(session) { - return null; - }; - - this.$id = "ace/mode/scala"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},a.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(a,o),a.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},a.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},a.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=a}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",a="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+r+")(\\.)(prototype)(\\.)("+r+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:r},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:a},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(i,a),t.JavaScriptHighlightRules=i}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var a=o[1].length,i=e.findMatchingBracket({row:t,column:a});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new r(t,0,t,a-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),a=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],u={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?r=u[t]:void(r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,a){var i=n.getCursorPosition(),l=o.doc.getLine(i.row);if("{"==a){g(n);var c=n.getSelectionRange(),u=o.doc.getTextRange(c);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(l[i.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==a){g(n);var m=l.substring(i.column,i.column+1);if("}"==m){var p=o.$findOpeningBracket("}",{column:i.column+1,row:i.row});if(null!==p&&d.isAutoInsertedClosing(i,l,a))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==a||"\r\n"==a){g(n);var h="";d.isMaybeInsertedClosing(i,l)&&(h=s.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=l.substring(i.column,i.column+1);if("}"===m){var x=o.findMatchingBracket({row:i.row,column:i.column+1},"}");if(!x)return null;var f=this.$getIndent(o.getLine(x.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var f=this.$getIndent(l)}var k=f+o.getTabString();return{text:"\n"+k+"\n"+f+h,selection:[1,k.length,1,k.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,a){var i=o.doc.getTextRange(a);if(!a.isMultiLine()&&"{"==i){g(n);var s=o.doc.getLine(a.start.row),l=s.substring(a.end.column,a.end.column+1);if("}"==l)return a.end.column++,a;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var a=n.getSelectionRange(),i=r.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"("+i+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if(")"==c){var u=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==a){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var a=n.getSelectionRange(),i=r.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"["+i+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if("]"==c){var u=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==a){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var a=o,i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:a+s+a,selection:!1};var l=n.getCursorPosition(),c=r.doc.getLine(l.row),u=c.substring(l.column-1,l.column),d=c.substring(l.column,l.column+1),m=r.getTokenAt(l.row,l.column),p=r.getTokenAt(l.row,l.column+1);if("\\"==u&&m&&/escape/.test(m.type))return null;var h,x=m&&/string/.test(m.type),f=!p||/string/.test(p.type);if(d==a)h=x!==f;else{if(x&&!f)return null;if(x&&f)return null;var k=r.$mode.tokenRe;k.lastIndex=0;var b=k.test(u);k.lastIndex=0;var y=k.test(u);if(b||y)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?a+a:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==a||"'"==a)){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(s==a)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new i(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){var o=new i(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",c)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),a=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,a,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+a.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),a=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,a)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=a.substr(0,o.column)+n,r.maybeInsertedLineEnd=a.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,a),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,a=e("./fold_mode").FoldMode,i=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(i,a),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var a=o.match(this.foldingStartMarker);if(a){var i=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,i);var s=e.getCommentFoldRange(n,i+a[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var a=o.match(this.foldingStopMarker);if(a){var i=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,i):e.getCommentFoldRange(n,i,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),a=t,i=n.length;t+=1;for(var s=t,l=e.getLength();++tc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=a)break;if(u.isMultiLine())t=u.end.row;else if(r==c)break}s=t}}return new o(a,i,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),a=e.getLength(),i=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++ni)return new o(i,r,u,t.length)}}.call(i.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),l=e("./behaviour/cstyle").CstyleBehaviour,c=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new l,this.foldingRules=new c};r.inherits(u,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),a=o.tokens,i=o.state;if(a.length&&"comment"==a[a.length-1].type)return r;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(r+=n)}else if("doc-start"==e){if("start"==i||"no_regex"==i)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(u.prototype),t.Mode=u}),define("ace/mode/scala_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(){var e="case|default|do|else|for|if|match|while|throw|return|try|catch|finally|yield|abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|override|package|private|protected|sealed|super|this|trait|type|val|var|with",t="true|false",n="AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object|Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|Option|Array|Char|Byte|Short|Int|Long|Nothing",r=this.createKeywordMapper({"variable.language":"this",keyword:e,"support.function":n,"constant.language":t},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'"""',next:"tstring"},{token:"string",regex:'"(?=.)',next:"string"},{token:"symbol.constant",regex:"'[\\w\\d_]+"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],string:[{token:"escape",regex:'\\\\"'},{token:"string",regex:'"',next:"start"},{token:"string.invalid",regex:'[^"\\\\]*$',next:"start"},{token:"string",regex:'[^"\\\\]+'}],tstring:[{token:"string",regex:'"{3,5}',next:"start"},{token:"string",regex:".+?"}]},this.embedRules(o,"doc-",[o.getEndRule("start")])};r.inherits(i,a),t.ScalaHighlightRules=i}),define("ace/mode/scala",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/scala_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./javascript").Mode,a=e("./scala_highlight_rules").ScalaHighlightRules,i=function(){o.call(this),this.HighlightRules=a};r.inherits(i,o),function(){this.createWorker=function(e){return null},this.$id="ace/mode/scala"}.call(i.prototype),t.Mode=i}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-scheme.js b/www/js/vendor/ace/mode-scheme.js index 5e71420d0..0c4bfeaed 100755 --- a/www/js/vendor/ace/mode-scheme.js +++ b/www/js/vendor/ace/mode-scheme.js @@ -1,107 +1 @@ -define("ace/mode/scheme_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var SchemeHighlightRules = function() { - var keywordControl = "case|do|let|loop|if|else|when"; - var keywordOperator = "eq?|eqv?|equal?|and|or|not|null?"; - var constantLanguage = "#t|#f"; - var supportFunctions = "cons|car|cdr|cond|lambda|lambda*|syntax-rules|format|set!|quote|eval|append|list|list?|member?|load"; - - var keywordMapper = this.createKeywordMapper({ - "keyword.control": keywordControl, - "keyword.operator": keywordOperator, - "constant.language": constantLanguage, - "support.function": supportFunctions - }, "identifier", true); - - this.$rules = - { - "start": [ - { - token : "comment", - regex : ";.*$" - }, - { - "token": ["storage.type.function-type.scheme", "text", "entity.name.function.scheme"], - "regex": "(?:\\b(?:(define|define-syntax|define-macro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)" - }, - { - "token": "punctuation.definition.constant.character.scheme", - "regex": "#:\\S+" - }, - { - "token": ["punctuation.definition.variable.scheme", "variable.other.global.scheme", "punctuation.definition.variable.scheme"], - "regex": "(\\*)(\\S*)(\\*)" - }, - { - "token" : "constant.numeric", // hex - "regex" : "#[xXoObB][0-9a-fA-F]+" - }, - { - "token" : "constant.numeric", // float - "regex" : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?" - }, - { - "token" : keywordMapper, - "regex" : "[a-zA-Z_#][a-zA-Z0-9_\\-\\?\\!\\*]*" - }, - { - "token" : "string", - "regex" : '"(?=.)', - "next" : "qqstring" - } - ], - "qqstring": [ - { - "token": "constant.character.escape.scheme", - "regex": "\\\\." - }, - { - "token" : "string", - "regex" : '[^"\\\\]+', - "merge" : true - }, { - "token" : "string", - "regex" : "\\\\$", - "next" : "qqstring", - "merge" : true - }, { - "token" : "string", - "regex" : '"|$', - "next" : "start", - "merge" : true - } - ] -} - -}; - -oop.inherits(SchemeHighlightRules, TextHighlightRules); - -exports.SchemeHighlightRules = SchemeHighlightRules; -}); - -define("ace/mode/scheme",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scheme_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var SchemeHighlightRules = require("./scheme_highlight_rules").SchemeHighlightRules; - -var Mode = function() { - this.HighlightRules = SchemeHighlightRules; -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = ";"; - - this.$id = "ace/mode/scheme"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/scheme_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,r=function(){var e="case|do|let|loop|if|else|when",t="eq?|eqv?|equal?|and|or|not|null?",n="#t|#f",i="cons|car|cdr|cond|lambda|lambda*|syntax-rules|format|set!|quote|eval|append|list|list?|member?|load",o=this.createKeywordMapper({"keyword.control":e,"keyword.operator":t,"constant.language":n,"support.function":i},"identifier",!0);this.$rules={start:[{token:"comment",regex:";.*$"},{token:["storage.type.function-type.scheme","text","entity.name.function.scheme"],regex:"(?:\\b(?:(define|define-syntax|define-macro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"},{token:"punctuation.definition.constant.character.scheme",regex:"#:\\S+"},{token:["punctuation.definition.variable.scheme","variable.other.global.scheme","punctuation.definition.variable.scheme"],regex:"(\\*)(\\S*)(\\*)"},{token:"constant.numeric",regex:"#[xXoObB][0-9a-fA-F]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?"},{token:o,regex:"[a-zA-Z_#][a-zA-Z0-9_\\-\\?\\!\\*]*"},{token:"string",regex:'"(?=.)',next:"qqstring"}],qqstring:[{token:"constant.character.escape.scheme",regex:"\\\\."},{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}]}};i.inherits(r,o),t.SchemeHighlightRules=r}),define("ace/mode/scheme",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scheme_highlight_rules"],function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("./text").Mode,r=e("./scheme_highlight_rules").SchemeHighlightRules,s=function(){this.HighlightRules=r};i.inherits(s,o),function(){this.lineCommentStart=";",this.$id="ace/mode/scheme"}.call(s.prototype),t.Mode=s}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-scss.js b/www/js/vendor/ace/mode-scss.js index 9e8ad04e3..4ba101b3a 100755 --- a/www/js/vendor/ace/mode-scss.js +++ b/www/js/vendor/ace/mode-scss.js @@ -1,922 +1 @@ -define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var ScssHighlightRules = function() { - - var properties = lang.arrayToMap( (function () { - - var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|"); - - var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" + - "background-size|binding|border-bottom-colors|border-left-colors|" + - "border-right-colors|border-top-colors|border-end|border-end-color|" + - "border-end-style|border-end-width|border-image|border-start|" + - "border-start-color|border-start-style|border-start-width|box-align|" + - "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" + - "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" + - "column-rule-width|column-rule-style|column-rule-color|float-edge|" + - "font-feature-settings|font-language-override|force-broken-image-icon|" + - "image-region|margin-end|margin-start|opacity|outline|outline-color|" + - "outline-offset|outline-radius|outline-radius-bottomleft|" + - "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" + - "outline-style|outline-width|padding-end|padding-start|stack-sizing|" + - "tab-size|text-blink|text-decoration-color|text-decoration-line|" + - "text-decoration-style|transform|transform-origin|transition|" + - "transition-delay|transition-duration|transition-property|" + - "transition-timing-function|user-focus|user-input|user-modify|user-select|" + - "window-shadow|border-radius").split("|"); - - var properties = ("azimuth|background-attachment|background-color|background-image|" + - "background-position|background-repeat|background|border-bottom-color|" + - "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" + - "border-color|border-left-color|border-left-style|border-left-width|" + - "border-left|border-right-color|border-right-style|border-right-width|" + - "border-right|border-spacing|border-style|border-top-color|" + - "border-top-style|border-top-width|border-top|border-width|border|bottom|" + - "box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|" + - "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" + - "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" + - "font-stretch|font-style|font-variant|font-weight|font|height|left|" + - "letter-spacing|line-height|list-style-image|list-style-position|" + - "list-style-type|list-style|margin-bottom|margin-left|margin-right|" + - "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" + - "min-width|opacity|orphans|outline-color|" + - "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" + - "padding-left|padding-right|padding-top|padding|page-break-after|" + - "page-break-before|page-break-inside|page|pause-after|pause-before|" + - "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" + - "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" + - "stress|table-layout|text-align|text-decoration|text-indent|" + - "text-shadow|text-transform|top|unicode-bidi|vertical-align|" + - "visibility|voice-family|volume|white-space|widows|width|word-spacing|" + - "z-index").split("|"); - var ret = []; - for (var i=0, ln=browserPrefix.length; i|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - }, { - caseInsensitive: true - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - "qqstring" : [ - { - token : "string", - regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', - next : "start" - }, { - token : "string", - regex : '.+' - } - ], - "qstring" : [ - { - token : "string", - regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", - next : "start" - }, { - token : "string", - regex : '.+' - } - ] - }; -}; - -oop.inherits(ScssHighlightRules, TextHighlightRules); - -exports.ScssHighlightRules = ScssHighlightRules; - -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/scss",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = ScssHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/scss"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=e("../lib/lang"),i=e("./text_highlight_rules").TextHighlightRules,a=function(){var e=o.arrayToMap(function(){for(var e="-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-".split("|"),t="appearance|background-clip|background-inline-policy|background-origin|background-size|binding|border-bottom-colors|border-left-colors|border-right-colors|border-top-colors|border-end|border-end-color|border-end-style|border-end-width|border-image|border-start|border-start-color|border-start-style|border-start-width|box-align|box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|box-pack|box-sizing|column-count|column-gap|column-width|column-rule|column-rule-width|column-rule-style|column-rule-color|float-edge|font-feature-settings|font-language-override|force-broken-image-icon|image-region|margin-end|margin-start|opacity|outline|outline-color|outline-offset|outline-radius|outline-radius-bottomleft|outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|outline-style|outline-width|padding-end|padding-start|stack-sizing|tab-size|text-blink|text-decoration-color|text-decoration-line|text-decoration-style|transform|transform-origin|transition|transition-delay|transition-duration|transition-property|transition-timing-function|user-focus|user-input|user-modify|user-select|window-shadow|border-radius".split("|"),r="azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|"),n=[],o=0,i=e.length;o|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",regex:".+"}]}};n.inherits(a,i),t.ScssHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,r){"use strict";var n=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var r=e.getLine(t),o=r.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new n(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,r){"use strict";var n,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},d=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?n=c[t]:void(n=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},g=function(){this.add("braces","insertion",function(e,t,r,o,i){var a=r.getCursorPosition(),l=o.doc.getLine(a.row);if("{"==i){d(r);var u=r.getSelectionRange(),c=o.doc.getTextRange(u);if(""!==c&&"{"!==c&&r.getWrapBehavioursEnabled())return{text:"{"+c+"}",selection:!1};if(g.isSaneInsertion(r,o))return/[\]\}\)]/.test(l[a.column])||r.inMultiSelectMode?(g.recordAutoInsert(r,o,"}"),{text:"{}",selection:[1,1]}):(g.recordMaybeInsert(r,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){d(r);var p=l.substring(a.column,a.column+1);if("}"==p){var h=o.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==h&&g.isAutoInsertedClosing(a,l,i))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){d(r);var m="";g.isMaybeInsertedClosing(a,l)&&(m=s.stringRepeat("}",n.maybeInsertedBrackets),g.clearMaybeInsertedClosing());var p=l.substring(a.column,a.column+1);if("}"===p){var b=o.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!b)return null;var f=this.$getIndent(o.getLine(b.row))}else{if(!m)return void g.clearMaybeInsertedClosing();var f=this.$getIndent(l)}var k=f+o.getTabString();return{text:"\n"+k+"\n"+f+m,selection:[1,k.length,1,k.length]}}g.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,r,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){d(r);var s=o.doc.getLine(i.start.row),l=s.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;n.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,r,n,o){if("("==o){d(r);var i=r.getSelectionRange(),a=n.doc.getTextRange(i);if(""!==a&&r.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(g.isSaneInsertion(r,n))return g.recordAutoInsert(r,n,")"),{text:"()",selection:[1,1]}}else if(")"==o){d(r);var s=r.getCursorPosition(),l=n.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=n.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&g.isAutoInsertedClosing(s,l,o))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,r,n,o){var i=n.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){d(r);var a=n.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,r,n,o){if("["==o){d(r);var i=r.getSelectionRange(),a=n.doc.getTextRange(i);if(""!==a&&r.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(g.isSaneInsertion(r,n))return g.recordAutoInsert(r,n,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){d(r);var s=r.getCursorPosition(),l=n.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=n.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&g.isAutoInsertedClosing(s,l,o))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,r,n,o){var i=n.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){d(r);var a=n.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,r,n,o){if('"'==o||"'"==o){d(r);var i=o,a=r.getSelectionRange(),s=n.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&r.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var l=r.getCursorPosition(),u=n.doc.getLine(l.row),c=u.substring(l.column-1,l.column),g=u.substring(l.column,l.column+1),p=n.getTokenAt(l.row,l.column),h=n.getTokenAt(l.row,l.column+1);if("\\"==c&&p&&/escape/.test(p.type))return null;var m,b=p&&/string/.test(p.type),f=!h||/string/.test(h.type);if(g==i)m=b!==f;else{if(b&&!f)return null;if(b&&f)return null;var k=n.$mode.tokenRe;k.lastIndex=0;var v=k.test(c);k.lastIndex=0;var x=k.test(c);if(v||x)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;m=!0}return{text:m?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,r,n,o){var i=n.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){d(r);var a=n.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(s==i)return o.end.column++,o}})};g.isSaneInsertion=function(e,t){var r=e.getCursorPosition(),n=new a(t,r.row,r.column);if(!this.$matchTokenType(n.getCurrentToken()||"text",l)){var o=new a(t,r.row,r.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return n.stepForward(),n.getCurrentTokenRow()!==r.row||this.$matchTokenType(n.getCurrentToken()||"text",u)},g.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},g.recordAutoInsert=function(e,t,r){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=o.row,n.autoInsertedLineEnd=r+i.substr(o.column),n.autoInsertedBrackets++},g.recordMaybeInsert=function(e,t,r){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=o.row,n.maybeInsertedLineStart=i.substr(0,o.column)+r,n.maybeInsertedLineEnd=i.substr(o.column),n.maybeInsertedBrackets++},g.isAutoInsertedClosing=function(e,t,r){return n.autoInsertedBrackets>0&&e.row===n.autoInsertedRow&&r===n.autoInsertedLineEnd[0]&&t.substr(e.column)===n.autoInsertedLineEnd},g.isMaybeInsertedClosing=function(e,t){return n.maybeInsertedBrackets>0&&e.row===n.maybeInsertedRow&&t.substr(e.column)===n.maybeInsertedLineEnd&&t.substr(0,e.column)==n.maybeInsertedLineStart},g.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},g.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},o.inherits(g,i),t.CstyleBehaviour=g}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,r){"use strict";var n=e("../../lib/oop"),o=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),i=e("../../token_iterator").TokenIterator,a=function(){this.inherit(o),this.add("colon","insertion",function(e,t,r,n,o){if(":"===o){var a=r.getCursorPosition(),s=new i(n,a.row,a.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var u=n.doc.getLine(a.row),c=u.substring(a.column,a.column+1);if(":"===c)return{text:"",selection:[1,1]};if(!u.substring(a.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,r,n,o){var a=n.doc.getTextRange(o);if(!o.isMultiLine()&&":"===a){var s=r.getCursorPosition(),l=new i(n,s.row,s.column),u=l.getCurrentToken();if(u&&u.value.match(/\s+/)&&(u=l.stepBackward()),u&&"support.type"===u.type){var c=n.doc.getLine(o.start.row),d=c.substring(o.end.column,o.end.column+1);if(";"===d)return o.end.column++,o}}}),this.add("semicolon","insertion",function(e,t,r,n,o){if(";"===o){var i=r.getCursorPosition(),a=n.doc.getLine(i.row),s=a.substring(i.column,i.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};n.inherits(a,o),t.CssBehaviour=a}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,r){"use strict";var n=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};n.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,r){var n=e.getLine(r);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var o=this._getFoldWidgetBase(e,t,r);return!o&&this.startRegionRe.test(n)?"start":o},this.getFoldWidgetRange=function(e,t,r,n){var o=e.getLine(r);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,r);var i=o.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],r,a);var s=e.getCommentFoldRange(r,a+i[0].length,1);return s&&!s.isMultiLine()&&(n?s=this.getSectionRange(e,r):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],r,a):e.getCommentFoldRange(r,a,-1)}}},this.getSectionRange=function(e,t){var r=e.getLine(t),n=r.search(/\S/),i=t,a=r.length;t+=1;for(var s=t,l=e.getLength();++tu)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=i)break;if(c.isMultiLine())t=c.end.row;else if(n==u)break}s=t}}return new o(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,r){for(var n=t.search(/\s*$/),i=e.getLength(),a=r,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++ra)return new o(a,n,c,t.length)}}.call(a.prototype)}),define("ace/mode/scss",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=e("./text").Mode,i=e("./scss_highlight_rules").ScssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("./behaviour/css").CssBehaviour,l=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new s,this.foldingRules=new l};n.inherits(u,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,r){var n=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e).tokens;if(o.length&&"comment"==o[o.length-1].type)return n;var i=t.match(/^.*\{\s*$/);return i&&(n+=r),n},this.checkOutdent=function(e,t,r){return this.$outdent.checkOutdent(t,r)},this.autoOutdent=function(e,t,r){this.$outdent.autoOutdent(t,r)},this.$id="ace/mode/scss"}.call(u.prototype),t.Mode=u}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-sh.js b/www/js/vendor/ace/mode-sh.js index a3b13899b..a7f1e5226 100755 --- a/www/js/vendor/ace/mode-sh.js +++ b/www/js/vendor/ace/mode-sh.js @@ -1,752 +1 @@ -define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var reservedKeywords = exports.reservedKeywords = ( - '!|{|}|case|do|done|elif|else|'+ - 'esac|fi|for|if|in|then|until|while|'+ - '&|;|export|local|read|typeset|unset|'+ - 'elif|select|set' - ); - -var languageConstructs = exports.languageConstructs = ( - '[|]|alias|bg|bind|break|builtin|'+ - 'cd|command|compgen|complete|continue|'+ - 'dirs|disown|echo|enable|eval|exec|'+ - 'exit|fc|fg|getopts|hash|help|history|'+ - 'jobs|kill|let|logout|popd|printf|pushd|'+ - 'pwd|return|set|shift|shopt|source|'+ - 'suspend|test|times|trap|type|ulimit|'+ - 'umask|unalias|wait' -); - -var ShHighlightRules = function() { - var keywordMapper = this.createKeywordMapper({ - "keyword": reservedKeywords, - "support.function.builtin": languageConstructs, - "invalid.deprecated": "debugger" - }, "identifier"); - - var integer = "(?:(?:[1-9]\\d*)|(?:0))"; - - var fraction = "(?:\\.\\d+)"; - var intPart = "(?:\\d+)"; - var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; - var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")"; - var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; - var fileDescriptor = "(?:&" + intPart + ")"; - - var variableName = "[a-zA-Z_][a-zA-Z0-9_]*"; - var variable = "(?:(?:\\$" + variableName + ")|(?:" + variableName + "=))"; - - var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))"; - - var func = "(?:" + variableName + "\\s*\\(\\))"; - - this.$rules = { - "start" : [{ - token : "constant", - regex : /\\./ - }, { - token : ["text", "comment"], - regex : /(^|\s)(#.*)$/ - }, { - token : "string", - regex : '"', - push : [{ - token : "constant.language.escape", - regex : /\\(?:[$abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/ - }, { - token : "constant", - regex : /\$\w+/ - }, { - token : "string", - regex : '"', - next: "pop" - }, { - defaultToken: "string" - }] - }, { - regex : "<<<", - token : "keyword.operator" - }, { - stateName: "heredoc", - regex : "(<<)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)", - onMatch : function(value, currentState, stack) { - var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; - var tokens = value.split(this.splitRegex); - stack.push(next, tokens[4]); - return [ - {type:"constant", value: tokens[1]}, - {type:"text", value: tokens[2]}, - {type:"string", value: tokens[3]}, - {type:"support.class", value: tokens[4]}, - {type:"string", value: tokens[5]} - ]; - }, - rules: { - heredoc: [{ - onMatch: function(value, currentState, stack) { - if (value === stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack[0] || "start"; - return "support.class"; - } - this.next = ""; - return "string"; - }, - regex: ".*$", - next: "start" - }], - indentedHeredoc: [{ - token: "string", - regex: "^\t+" - }, { - onMatch: function(value, currentState, stack) { - if (value === stack[1]) { - stack.shift(); - stack.shift(); - this.next = stack[0] || "start"; - return "support.class"; - } - this.next = ""; - return "string"; - }, - regex: ".*$", - next: "start" - }] - } - }, { - regex : "$", - token : "empty", - next : function(currentState, stack) { - if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") - return stack[0]; - return currentState; - } - }, { - token : "variable.language", - regex : builtinVariable - }, { - token : "variable", - regex : variable - }, { - token : "support.function", - regex : func - }, { - token : "support.function", - regex : fileDescriptor - }, { - token : "string", // ' string - start : "'", end : "'" - }, { - token : "constant.numeric", // float - regex : floatNumber - }, { - token : "constant.numeric", // integer - regex : integer + "\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b" - }, { - token : "keyword.operator", - regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=" - }, { - token : "paren.lparen", - regex : "[\\[\\(\\{]" - }, { - token : "paren.rparen", - regex : "[\\]\\)\\}]" - } ] - }; - - this.normalizeRules(); -}; - -oop.inherits(ShHighlightRules, TextHighlightRules); - -exports.ShHighlightRules = ShHighlightRules; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules; -var Range = require("../range").Range; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; - -var Mode = function() { - this.HighlightRules = ShHighlightRules; - this.foldingRules = new CStyleFoldMode(); - this.$behaviour = new CstyleBehaviour(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - - this.lineCommentStart = "#"; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[\:]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - var outdents = { - "pass": 1, - "return": 1, - "raise": 1, - "break": 1, - "continue": 1 - }; - - this.checkOutdent = function(state, line, input) { - if (input !== "\r\n" && input !== "\r" && input !== "\n") - return false; - - var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; - - if (!tokens) - return false; - do { - var last = tokens.pop(); - } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); - - if (!last) - return false; - - return (last.type == "keyword" && outdents[last.value]); - }; - - this.autoOutdent = function(state, doc, row) { - - row += 1; - var indent = this.$getIndent(doc.getLine(row)); - var tab = doc.getTabString(); - if (indent.slice(-tab.length) == tab) - doc.remove(new Range(row, indent.length-tab.length, row, indent.length)); - }; - - this.$id = "ace/mode/sh"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=t.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set",s=t.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",a=function(){var e=this.createKeywordMapper({keyword:o,"support.function.builtin":s,"invalid.deprecated":"debugger"},"identifier"),t="(?:(?:[1-9]\\d*)|(?:0))",n="(?:\\.\\d+)",r="(?:\\d+)",i="(?:(?:"+r+"?"+n+")|(?:"+r+"\\.))",a="(?:(?:"+i+"|"+r+"))",u="(?:"+a+"|"+i+")",l="(?:&"+r+")",c="[a-zA-Z_][a-zA-Z0-9_]*",g="(?:(?:\\$"+c+")|(?:"+c+"=))",d="(?:\\$(?:SHLVL|\\$|\\!|\\?))",h="(?:"+c+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"constant",regex:/\$\w+/},{token:"string",regex:'"',next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(e,t,n){var r="-"==e[2]?"indentedHeredoc":"heredoc",i=e.split(this.splitRegex);return n.push(r,i[4]),[{type:"constant",value:i[1]},{type:"text",value:i[2]},{type:"string",value:i[3]},{type:"support.class",value:i[4]},{type:"string",value:i[5]}]},rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^\t+"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return"heredoc"===t[0]||"indentedHeredoc"===t[0]?t[0]:e}},{token:"variable.language",regex:d},{token:"variable",regex:g},{token:"support.function",regex:h},{token:"support.function",regex:l},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:u},{token:"constant.numeric",regex:t+"\\b"},{token:e,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!="},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]\\)\\}]"}]},this.normalizeRules()};r.inherits(a,i),t.ShHighlightRules=a}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,s=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(s,o),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var o=i.match(this.foldingStartMarker);if(o){var s=o.index;if(o[1])return this.openingBracketBlock(e,o[1],n,s);var a=e.getCommentFoldRange(n,s+o[0].length,1);return a&&!a.isMultiLine()&&(r?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t){var o=i.match(this.foldingStopMarker);if(o){var s=o.index+o[0].length;return o[1]?this.closingBracketBlock(e,o[1],n,s):e.getCommentFoldRange(n,s,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),o=t,s=n.length;t+=1;for(var a=t,u=e.getLength();++tl)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=o)break;if(c.isMultiLine())t=c.end.row;else if(r==l)break}a=t}}return new i(o,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),o=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/)#(end)?region\b/,u=1;++ns)return new i(s,r,c,t.length)}}.call(s.prototype)}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,i=e("../../lib/oop"),o=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),u=["text","paren.rparen","punctuation.operator"],l=["text","paren.rparen","punctuation.operator","comment"],c={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?r=c[t]:void(r=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,i,o){var s=n.getCursorPosition(),u=i.doc.getLine(s.row);if("{"==o){g(n);var l=n.getSelectionRange(),c=i.doc.getTextRange(l);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return{text:"{"+c+"}",selection:!1};if(d.isSaneInsertion(n,i))return/[\]\}\)]/.test(u[s.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,i,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,i,"{"),{text:"{",selection:[1,1]})}else if("}"==o){g(n);var h=u.substring(s.column,s.column+1);if("}"==h){var f=i.$findOpeningBracket("}",{column:s.column+1,row:s.row});if(null!==f&&d.isAutoInsertedClosing(s,u,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==o||"\r\n"==o){g(n);var m="";d.isMaybeInsertedClosing(s,u)&&(m=a.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var h=u.substring(s.column,s.column+1);if("}"===h){var p=i.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!p)return null;var k=this.$getIndent(i.getLine(p.row))}else{if(!m)return void d.clearMaybeInsertedClosing();var k=this.$getIndent(u)}var v=k+i.getTabString();return{text:"\n"+v+"\n"+k+m,selection:[1,v.length,1,v.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,i,o){var s=i.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==s){g(n);var a=i.doc.getLine(o.start.row),u=a.substring(o.end.column,o.end.column+1);if("}"==u)return o.end.column++,o;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,i){if("("==i){g(n);var o=n.getSelectionRange(),s=r.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"("+s+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==i){g(n);var a=n.getCursorPosition(),u=r.doc.getLine(a.row),l=u.substring(a.column,a.column+1);if(")"==l){var c=r.$findOpeningBracket(")",{column:a.column+1,row:a.row});if(null!==c&&d.isAutoInsertedClosing(a,u,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"("==o){g(n);var s=r.doc.getLine(i.start.row),a=s.substring(i.start.column+1,i.start.column+2);if(")"==a)return i.end.column++,i}}),this.add("brackets","insertion",function(e,t,n,r,i){if("["==i){g(n);var o=n.getSelectionRange(),s=r.doc.getTextRange(o);if(""!==s&&n.getWrapBehavioursEnabled())return{text:"["+s+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==i){g(n);var a=n.getCursorPosition(),u=r.doc.getLine(a.row),l=u.substring(a.column,a.column+1);if("]"==l){var c=r.$findOpeningBracket("]",{column:a.column+1,row:a.row});if(null!==c&&d.isAutoInsertedClosing(a,u,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&"["==o){g(n);var s=r.doc.getLine(i.start.row),a=s.substring(i.start.column+1,i.start.column+2);if("]"==a)return i.end.column++,i}}),this.add("string_dquotes","insertion",function(e,t,n,r,i){if('"'==i||"'"==i){g(n);var o=i,s=n.getSelectionRange(),a=r.doc.getTextRange(s);if(""!==a&&"'"!==a&&'"'!=a&&n.getWrapBehavioursEnabled())return{text:o+a+o,selection:!1};var u=n.getCursorPosition(),l=r.doc.getLine(u.row),c=l.substring(u.column-1,u.column),d=l.substring(u.column,u.column+1),h=r.getTokenAt(u.row,u.column),f=r.getTokenAt(u.row,u.column+1);if("\\"==c&&h&&/escape/.test(h.type))return null;var m,p=h&&/string/.test(h.type),k=!f||/string/.test(f.type);if(d==o)m=p!==k;else{if(p&&!k)return null;if(p&&k)return null;var v=r.$mode.tokenRe;v.lastIndex=0;var b=v.test(c);v.lastIndex=0;var x=v.test(c);if(b||x)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;m=!0}return{text:m?o+o:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,i){var o=r.doc.getTextRange(i);if(!i.isMultiLine()&&('"'==o||"'"==o)){g(n);var s=r.doc.getLine(i.start.row),a=s.substring(i.start.column+1,i.start.column+2);if(a==o)return i.end.column++,i}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new s(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",u)){var i=new s(t,n.row,n.column+1);if(!this.$matchTokenType(i.getCurrentToken()||"text",u))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",l)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isAutoInsertedClosing(i,o,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=i.row,r.autoInsertedLineEnd=n+o.substr(i.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var i=e.getCursorPosition(),o=t.doc.getLine(i.row);this.isMaybeInsertedClosing(i,o)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=i.row,r.maybeInsertedLineStart=o.substr(0,i.column)+n,r.maybeInsertedLineEnd=o.substr(i.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},i.inherits(d,o),t.CstyleBehaviour=d}),define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,o=e("./sh_highlight_rules").ShHighlightRules,s=e("../range").Range,a=e("./folding/cstyle").FoldMode,u=e("./behaviour/cstyle").CstyleBehaviour,l=function(){this.HighlightRules=o,this.foldingRules=new a,this.$behaviour=new u};r.inherits(l,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),o=i.tokens;if(o.length&&"comment"==o[o.length-1].type)return r;if("start"==e){var s=t.match(/^.*[\{\(\[\:]\s*$/);s&&(r+=n)}return r};var e={pass:1,return:1,raise:1,break:1,continue:1};this.checkOutdent=function(t,n,r){if("\r\n"!==r&&"\r"!==r&&"\n"!==r)return!1;var i=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!i)return!1;do var o=i.pop();while(o&&("comment"==o.type||"text"==o.type&&o.value.match(/^\s+$/)));return!!o&&"keyword"==o.type&&e[o.value]},this.autoOutdent=function(e,t,n){n+=1;var r=this.$getIndent(t.getLine(n)),i=t.getTabString();r.slice(-i.length)==i&&t.remove(new s(n,r.length-i.length,n,r.length))},this.$id="ace/mode/sh"}.call(l.prototype),t.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-sjs.js b/www/js/vendor/ace/mode-sjs.js index abfc0bff9..708f89fea 100755 --- a/www/js/vendor/ace/mode-sjs.js +++ b/www/js/vendor/ace/mode-sjs.js @@ -1,1242 +1 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/sjs_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var SJSHighlightRules = function() { - var parent = new JavaScriptHighlightRules({noES6: true}); - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - var contextAware = function(f) { - f.isContextAware = true; - return f; - }; - - var ctxBegin = function(opts) { - return { - token: opts.token, - regex: opts.regex, - next: contextAware(function(currentState, stack) { - if (stack.length === 0) - stack.unshift(currentState); - stack.unshift(opts.next); - return opts.next; - }), - }; - }; - - var ctxEnd = function(opts) { - return { - token: opts.token, - regex: opts.regex, - next: contextAware(function(currentState, stack) { - stack.shift(); - return stack[0] || "start"; - }), - }; - }; - - this.$rules = parent.$rules; - this.$rules.no_regex = [ - { - token: "keyword", - regex: "(waitfor|or|and|collapse|spawn|retract)\\b" - }, - { - token: "keyword.operator", - regex: "(->|=>|\\.\\.)" - }, - { - token: "variable.language", - regex: "(hold|default)\\b" - }, - ctxBegin({ - token: "string", - regex: "`", - next: "bstring" - }), - ctxBegin({ - token: "string", - regex: '"', - next: "qqstring" - }), - ctxBegin({ - token: "string", - regex: '"', - next: "qqstring" - }), - { - token: ["paren.lparen", "text", "paren.rparen"], - regex: "(\\{)(\\s*)(\\|)", - next: "block_arguments", - } - - ].concat(this.$rules.no_regex); - - this.$rules.block_arguments = [ - { - token: "paren.rparen", - regex: "\\|", - next: "no_regex", - } - ].concat(this.$rules.function_arguments); - - this.$rules.bstring = [ - { - token : "constant.language.escape", - regex : escapedRe - }, - { - token : "string", - regex : "\\\\$", - next: "bstring" - }, - ctxBegin({ - token : "paren.lparen", - regex : "\\$\\{", - next: "string_interp" - }), - ctxBegin({ - token : "paren.lparen", - regex : "\\$", - next: "bstring_interp_single" - }), - ctxEnd({ - token : "string", - regex : "`", - }), - { - defaultToken: "string" - } - ]; - - this.$rules.qqstring = [ - { - token : "constant.language.escape", - regex : escapedRe - }, - { - token : "string", - regex : "\\\\$", - next: "qqstring", - }, - ctxBegin({ - token : "paren.lparen", - regex : "#\\{", - next: "string_interp" - }), - ctxEnd({ - token : "string", - regex : '"', - }), - { - defaultToken: "string" - } - ]; - var embeddableRules = []; - for (var i=0; i < this.$rules.no_regex.length; i++) { - var rule = this.$rules.no_regex[i]; - var token = String(rule.token); - if (token.indexOf('paren') == -1 && (!rule.next || rule.next.isContextAware)) { - embeddableRules.push(rule); - } - }; - - this.$rules.string_interp = [ - ctxEnd({ - token: "paren.rparen", - regex: "\\}" - }), - ctxBegin({ - token: "paren.lparen", - regex: '{', - next: "string_interp" - }) - ].concat(embeddableRules); - this.$rules.bstring_interp_single = [ - { - token: ["identifier", "paren.lparen"], - regex: '(\\w+)(\\()', - next: 'bstring_interp_single_call' - }, - ctxEnd({ - token : "identifier", - regex : "\\w*", - }) - ]; - this.$rules.bstring_interp_single_call = [ - ctxBegin({ - token: "paren.lparen", - regex: "\\(", - next: "bstring_interp_single_call" - }), - ctxEnd({ - token: "paren.rparen", - regex: "\\)" - }) - ].concat(embeddableRules); -} -oop.inherits(SJSHighlightRules, TextHighlightRules); - -exports.SJSHighlightRules = SJSHighlightRules; -}); - -define("ace/mode/sjs",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/sjs_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; -var oop = require("../lib/oop"); -var JSMode = require("./javascript").Mode; -var SJSHighlightRules = require("./sjs_highlight_rules").SJSHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = SJSHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, JSMode); -(function() { - this.createWorker = function(session) { - return null; - } - this.$id = "ace/mode/sjs"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(i,o),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+r+")(\\.)(prototype)(\\.)("+r+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:r},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(a,i),t.JavaScriptHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],g={},c=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,g.rangeCount!=e.multiSelect.rangeCount&&(g={rangeCount:e.multiSelect.rangeCount})),g[t]?r=g[t]:void(r=g[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,i){var a=n.getCursorPosition(),l=o.doc.getLine(a.row);if("{"==i){c(n);var u=n.getSelectionRange(),g=o.doc.getTextRange(u);if(""!==g&&"{"!==g&&n.getWrapBehavioursEnabled())return{text:"{"+g+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){c(n);var p=l.substring(a.column,a.column+1);if("}"==p){var m=o.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==m&&d.isAutoInsertedClosing(a,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){c(n);var h="";d.isMaybeInsertedClosing(a,l)&&(h=s.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var p=l.substring(a.column,a.column+1);if("}"===p){var x=o.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!x)return null;var f=this.$getIndent(o.getLine(x.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var f=this.$getIndent(l)}var k=f+o.getTabString();return{text:"\n"+k+"\n"+f+h,selection:[1,k.length,1,k.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){c(n);var s=o.doc.getLine(i.start.row),l=s.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){c(n);var i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){c(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var g=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==g&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){c(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){c(n);var i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){c(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var g=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==g&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){c(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){c(n);var i=o,a=n.getSelectionRange(),s=r.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var l=n.getCursorPosition(),u=r.doc.getLine(l.row),g=u.substring(l.column-1,l.column),d=u.substring(l.column,l.column+1),p=r.getTokenAt(l.row,l.column),m=r.getTokenAt(l.row,l.column+1);if("\\"==g&&p&&/escape/.test(p.type))return null;var h,x=p&&/string/.test(p.type),f=!m||/string/.test(m.type);if(d==i)h=x!==f;else{if(x&&!f)return null;if(x&&f)return null;var k=r.$mode.tokenRe;k.lastIndex=0;var b=k.test(g);k.lastIndex=0;var y=k.test(g);if(b||y)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){c(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(s==i)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){var o=new a(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",u)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var i=o.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),i=t,a=n.length;t+=1;for(var s=t,l=e.getLength();++tu)break;var g=this.getFoldWidgetRange(e,"all",t);if(g){if(g.start.row<=i)break;if(g.isMultiLine())t=g.end.row;else if(r==u)break}s=t}}return new o(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++na)return new o(a,r,g,t.length)}}.call(a.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,g=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};r.inherits(g,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens,a=o.state;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(r+=n)}else if("doc-start"==e){if("start"==a||"no_regex"==a)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(g.prototype),t.Mode=g}),define("ace/mode/sjs_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(){var e=new o({noES6:!0}),t="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)",n=function(e){return e.isContextAware=!0,e},r=function(e){return{token:e.token,regex:e.regex,next:n(function(t,n){return 0===n.length&&n.unshift(t),n.unshift(e.next),e.next})}},i=function(e){return{token:e.token,regex:e.regex,next:n(function(e,t){return t.shift(),t[0]||"start"})}};this.$rules=e.$rules,this.$rules.no_regex=[{token:"keyword",regex:"(waitfor|or|and|collapse|spawn|retract)\\b"},{token:"keyword.operator",regex:"(->|=>|\\.\\.)"},{token:"variable.language",regex:"(hold|default)\\b"},r({token:"string",regex:"`",next:"bstring"}),r({token:"string",regex:'"',next:"qqstring"}),r({token:"string",regex:'"',next:"qqstring"}),{token:["paren.lparen","text","paren.rparen"],regex:"(\\{)(\\s*)(\\|)",next:"block_arguments"}].concat(this.$rules.no_regex),this.$rules.block_arguments=[{token:"paren.rparen",regex:"\\|",next:"no_regex"}].concat(this.$rules.function_arguments),this.$rules.bstring=[{token:"constant.language.escape",regex:t},{token:"string",regex:"\\\\$",next:"bstring"},r({token:"paren.lparen",regex:"\\$\\{",next:"string_interp"}),r({token:"paren.lparen",regex:"\\$",next:"bstring_interp_single"}),i({token:"string",regex:"`"}),{defaultToken:"string"}],this.$rules.qqstring=[{token:"constant.language.escape",regex:t},{token:"string",regex:"\\\\$",next:"qqstring"},r({token:"paren.lparen",regex:"#\\{",next:"string_interp"}),i({token:"string",regex:'"'}),{defaultToken:"string"}];for(var a=[],s=0;s=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = CssHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.foldingRules = "cStyle"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("csslint", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/css"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === " -1; -} - -(function() { - - this.getFoldWidget = function(session, foldStyle, row) { - var tag = this._getFirstTagInLine(session, row); - - if (!tag) - return ""; - - if (tag.closing || (!tag.tagName && tag.selfClosing)) - return foldStyle == "markbeginend" ? "end" : ""; - - if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) - return ""; - - if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) - return ""; - - return "start"; - }; - this._getFirstTagInLine = function(session, row) { - var tokens = session.getTokens(row); - var tag = new Tag(); - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (is(token, "tag-open")) { - tag.end.column = tag.start.column + token.value.length; - tag.closing = is(token, "end-tag-open"); - token = tokens[++i]; - if (!token) - return null; - tag.tagName = token.value; - tag.end.column += token.value.length; - for (i++; i < tokens.length; i++) { - token = tokens[i]; - tag.end.column += token.value.length; - if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - break; - } - } - return tag; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - return tag; - } - tag.start.column += token.value.length; - } - - return null; - }; - - this._findEndTagInLine = function(session, row, tagName, startColumn) { - var tokens = session.getTokens(row); - var column = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - column += token.value.length; - if (column < startColumn) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var firstTag = this._getFirstTagInLine(session, row); - - if (!firstTag) - return null; - - var isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var MixedFoldMode = require("./mixed").FoldMode; -var XmlFoldMode = require("./xml").FoldMode; -var CStyleFoldMode = require("./cstyle").FoldMode; - -var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { - MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { - "js-": new CStyleFoldMode(), - "css-": new CStyleFoldMode() - }); -}; - -oop.inherits(FoldMode, MixedFoldMode); - -}); - -define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var TokenIterator = require("../token_iterator").TokenIterator; - -var commonAttributes = [ - "accesskey", - "class", - "contenteditable", - "contextmenu", - "dir", - "draggable", - "dropzone", - "hidden", - "id", - "inert", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "lang", - "spellcheck", - "style", - "tabindex", - "title", - "translate" -]; - -var eventAttributes = [ - "onabort", - "onblur", - "oncancel", - "oncanplay", - "oncanplaythrough", - "onchange", - "onclick", - "onclose", - "oncontextmenu", - "oncuechange", - "ondblclick", - "ondrag", - "ondragend", - "ondragenter", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onended", - "onerror", - "onfocus", - "oninput", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeyup", - "onload", - "onloadeddata", - "onloadedmetadata", - "onloadstart", - "onmousedown", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onpause", - "onplay", - "onplaying", - "onprogress", - "onratechange", - "onreset", - "onscroll", - "onseeked", - "onseeking", - "onselect", - "onshow", - "onstalled", - "onsubmit", - "onsuspend", - "ontimeupdate", - "onvolumechange", - "onwaiting" -]; - -var globalAttributes = commonAttributes.concat(eventAttributes); - -var attributeMap = { - "html": ["manifest"], - "head": [], - "title": [], - "base": ["href", "target"], - "link": ["href", "hreflang", "rel", "media", "type", "sizes"], - "meta": ["http-equiv", "name", "content", "charset"], - "style": ["type", "media", "scoped"], - "script": ["charset", "type", "src", "defer", "async"], - "noscript": ["href"], - "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], - "section": [], - "nav": [], - "article": ["pubdate"], - "aside": [], - "h1": [], - "h2": [], - "h3": [], - "h4": [], - "h5": [], - "h6": [], - "header": [], - "footer": [], - "address": [], - "main": [], - "p": [], - "hr": [], - "pre": [], - "blockquote": ["cite"], - "ol": ["start", "reversed"], - "ul": [], - "li": ["value"], - "dl": [], - "dt": [], - "dd": [], - "figure": [], - "figcaption": [], - "div": [], - "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], - "em": [], - "strong": [], - "small": [], - "s": [], - "cite": [], - "q": ["cite"], - "dfn": [], - "abbr": [], - "data": [], - "time": ["datetime"], - "code": [], - "var": [], - "samp": [], - "kbd": [], - "sub": [], - "sup": [], - "i": [], - "b": [], - "u": [], - "mark": [], - "ruby": [], - "rt": [], - "rp": [], - "bdi": [], - "bdo": [], - "span": [], - "br": [], - "wbr": [], - "ins": ["cite", "datetime"], - "del": ["cite", "datetime"], - "img": ["alt", "src", "height", "width", "usemap", "ismap"], - "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], - "embed": ["src", "height", "width", "type"], - "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], - "param": ["name", "value"], - "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], - "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], - "source": ["src", "type", "media"], - "track": ["kind", "src", "srclang", "label", "default"], - "canvas": ["width", "height"], - "map": ["name"], - "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], - "svg": [], - "math": [], - "table": ["summary"], - "caption": [], - "colgroup": ["span"], - "col": ["span"], - "tbody": [], - "thead": [], - "tfoot": [], - "tr": [], - "td": ["headers", "rowspan", "colspan"], - "th": ["headers", "rowspan", "colspan", "scope"], - "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], - "fieldset": ["disabled", "form", "name"], - "legend": [], - "label": ["form", "for"], - "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], - "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], - "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], - "datalist": [], - "optgroup": ["disabled", "label"], - "option": ["disabled", "selected", "label", "value"], - "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], - "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], - "output": ["for", "form", "name"], - "progress": ["value", "max"], - "meter": ["value", "min", "max", "low", "high", "optimum"], - "details": ["open"], - "summary": [], - "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], - "menu": ["type", "label"], - "dialog": ["open"] -}; - -var elements = Object.keys(attributeMap); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -function findTagName(session, pos) { - var iterator = new TokenIterator(session, pos.row, pos.column); - var token = iterator.getCurrentToken(); - while (token && !is(token, "tag-name")){ - token = iterator.stepBackward(); - } - if (token) - return token.value; -} - -var HtmlCompletions = function() { - -}; - -(function() { - - this.getCompletions = function(state, session, pos, prefix) { - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) - return this.getTagCompletions(state, session, pos, prefix); - if (is(token, "tag-whitespace") || is(token, "attribute-name")) - return this.getAttributeCompetions(state, session, pos, prefix); - - return []; - }; - - this.getTagCompletions = function(state, session, pos, prefix) { - return elements.map(function(element){ - return { - value: element, - meta: "tag", - score: Number.MAX_VALUE - }; - }); - }; - - this.getAttributeCompetions = function(state, session, pos, prefix) { - var tagName = findTagName(session, pos); - if (!tagName) - return []; - var attributes = globalAttributes; - if (tagName in attributeMap) { - attributes = attributes.concat(attributeMap[tagName]); - } - return attributes.map(function(attribute){ - return { - caption: attribute, - snippet: attribute + '="$0"', - meta: "attribute", - score: Number.MAX_VALUE - }; - }); - }; - -}).call(HtmlCompletions.prototype); - -exports.HtmlCompletions = HtmlCompletions; -}); - -define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var CssMode = require("./css").Mode; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; -var HtmlFoldMode = require("./folding/html").FoldMode; -var HtmlCompletions = require("./html_completions").HtmlCompletions; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; -var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; - -var Mode = function(options) { - this.fragmentContext = options && options.fragmentContext; - this.HighlightRules = HtmlHighlightRules; - this.$behaviour = new XmlBehaviour(); - this.$completer = new HtmlCompletions(); - - this.createModeDelegates({ - "js-": JavaScriptMode, - "css-": CssMode - }); - - this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.blockComment = {start: ""}; - - this.voidElements = lang.arrayToMap(voidElements); - - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - this.checkOutdent = function(state, line, input) { - return false; - }; - - this.getCompletions = function(state, session, pos, prefix) { - return this.$completer.getCompletions(state, session, pos, prefix); - }; - - this.createWorker = function(session) { - if (this.constructor != Mode) - return; - var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - if (this.fragmentContext) - worker.call("setOptions", [{context: this.fragmentContext}]); - - worker.on("error", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/html"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/smarty_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; - -var SmartyHighlightRules = function() { - HtmlHighlightRules.call(this); - var smartyRules = { start: - [ { include: '#comments' }, - { include: '#blocks' } ], - '#blocks': - [ { token: 'punctuation.section.embedded.begin.smarty', - regex: '\\{%?', - push: - [ { token: 'punctuation.section.embedded.end.smarty', - regex: '%?\\}', - next: 'pop' }, - { include: '#strings' }, - { include: '#variables' }, - { include: '#lang' }, - { defaultToken: 'source.smarty' } ] } ], - '#comments': - [ { token: - [ 'punctuation.definition.comment.smarty', - 'comment.block.smarty' ], - regex: '(\\{%?)(\\*)', - push: - [ { token: 'comment.block.smarty', regex: '\\*%?\\}', next: 'pop' }, - { defaultToken: 'comment.block.smarty' } ] } ], - '#lang': - [ { token: 'keyword.operator.smarty', - regex: '(?:!=|!|<=|>=|<|>|===|==|%|&&|\\|\\|)|\\b(?:and|or|eq|neq|ne|gte|gt|ge|lte|lt|le|not|mod)\\b' }, - { token: 'constant.language.smarty', - regex: '\\b(?:TRUE|FALSE|true|false)\\b' }, - { token: 'keyword.control.smarty', - regex: '\\b(?:if|else|elseif|foreach|foreachelse|section|switch|case|break|default)\\b' }, - { token: 'variable.parameter.smarty', regex: '\\b[a-zA-Z]+=' }, - { token: 'support.function.built-in.smarty', - regex: '\\b(?:capture|config_load|counter|cycle|debug|eval|fetch|include_php|include|insert|literal|math|strip|rdelim|ldelim|assign|constant|block|html_[a-z_]*)\\b' }, - { token: 'support.function.variable-modifier.smarty', - regex: '\\|(?:capitalize|cat|count_characters|count_paragraphs|count_sentences|count_words|date_format|default|escape|indent|lower|nl2br|regex_replace|replace|spacify|string_format|strip_tags|strip|truncate|upper|wordwrap)' } ], - '#strings': - [ { token: 'punctuation.definition.string.begin.smarty', - regex: '\'', - push: - [ { token: 'punctuation.definition.string.end.smarty', - regex: '\'', - next: 'pop' }, - { token: 'constant.character.escape.smarty', regex: '\\\\.' }, - { defaultToken: 'string.quoted.single.smarty' } ] }, - { token: 'punctuation.definition.string.begin.smarty', - regex: '"', - push: - [ { token: 'punctuation.definition.string.end.smarty', - regex: '"', - next: 'pop' }, - { token: 'constant.character.escape.smarty', regex: '\\\\.' }, - { defaultToken: 'string.quoted.double.smarty' } ] } ], - '#variables': - [ { token: - [ 'punctuation.definition.variable.smarty', - 'variable.other.global.smarty' ], - regex: '\\b(\\$)(Smarty\\.)' }, - { token: - [ 'punctuation.definition.variable.smarty', - 'variable.other.smarty' ], - regex: '(\\$)([a-zA-Z_][a-zA-Z0-9_]*)\\b' }, - { token: [ 'keyword.operator.smarty', 'variable.other.property.smarty' ], - regex: '(->)([a-zA-Z_][a-zA-Z0-9_]*)\\b' }, - { token: - [ 'keyword.operator.smarty', - 'meta.function-call.object.smarty', - 'punctuation.definition.variable.smarty', - 'variable.other.smarty', - 'punctuation.definition.variable.smarty' ], - regex: '(->)([a-zA-Z_][a-zA-Z0-9_]*)(\\()(.*?)(\\))' } ] } - - var smartyStart = smartyRules.start; - - for (var rule in this.$rules) { - this.$rules[rule].unshift.apply(this.$rules[rule], smartyStart); - } - - Object.keys(smartyRules).forEach(function(x) { - if (!this.$rules[x]) - this.$rules[x] = smartyRules[x]; - }, this); - - this.normalizeRules(); -}; - -SmartyHighlightRules.metaData = { fileTypes: [ 'tpl' ], - foldingStartMarker: '\\{%?', - foldingStopMarker: '%?\\}', - name: 'Smarty', - scopeName: 'text.html.smarty' } - - -oop.inherits(SmartyHighlightRules, HtmlHighlightRules); - -exports.SmartyHighlightRules = SmartyHighlightRules; -}); - -define("ace/mode/smarty",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/smarty_highlight_rules"], function(require, exports, module) { - "use strict"; - -var oop = require("../lib/oop"); -var HtmlMode = require("./html").Mode; -var SmartyHighlightRules = require("./smarty_highlight_rules").SmartyHighlightRules; - -var Mode = function() { - HtmlMode.call(this); - this.HighlightRules = SmartyHighlightRules; -}; - -oop.inherits(Mode, HtmlMode); - -(function() { - - this.$id = "ace/mode/smarty"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},a.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};o.inherits(a,r),a.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},a.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},a.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=a}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",o="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",a="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},r.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[r.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[r.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:a},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(r,"doc-",[r.getEndRule("no_regex")]),this.normalizeRules()};o.inherits(i,a),t.JavaScriptHighlightRules=i}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),r=n.match(/^(\s*\})/);if(!r)return 0;var a=r[1].length,i=e.findMatchingBracket({row:t,column:a});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new o(t,0,t,a-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var o,r=e("../../lib/oop"),a=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?o=c[t]:void(o=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,r,a){var i=n.getCursorPosition(),l=r.doc.getLine(i.row);if("{"==a){g(n);var u=n.getSelectionRange(),c=r.doc.getTextRange(u);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return{text:"{"+c+"}",selection:!1};if(d.isSaneInsertion(n,r))return/[\]\}\)]/.test(l[i.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if("}"==a){g(n);var m=l.substring(i.column,i.column+1);if("}"==m){var p=r.$findOpeningBracket("}",{column:i.column+1,row:i.row});if(null!==p&&d.isAutoInsertedClosing(i,l,a))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==a||"\r\n"==a){g(n);var h="";d.isMaybeInsertedClosing(i,l)&&(h=s.stringRepeat("}",o.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=l.substring(i.column,i.column+1);if("}"===m){var f=r.findMatchingBracket({row:i.row,column:i.column+1},"}");if(!f)return null;var x=this.$getIndent(r.getLine(f.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var b=x+r.getTabString();return{text:"\n"+b+"\n"+x+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,a){var i=r.doc.getTextRange(a);if(!a.isMultiLine()&&"{"==i){g(n);var s=r.doc.getLine(a.start.row),l=s.substring(a.end.column,a.end.column+1);if("}"==l)return a.end.column++,a;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,o,r){if("("==r){g(n);var a=n.getSelectionRange(),i=o.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"("+i+")",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,")"),{text:"()",selection:[1,1]}}else if(")"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=o.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&"("==a){g(n);var i=o.doc.getLine(r.start.row),s=i.substring(r.start.column+1,r.start.column+2);if(")"==s)return r.end.column++,r}}),this.add("brackets","insertion",function(e,t,n,o,r){if("["==r){g(n);var a=n.getSelectionRange(),i=o.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"["+i+"]",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=o.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&"["==a){g(n);var i=o.doc.getLine(r.start.row),s=i.substring(r.start.column+1,r.start.column+2);if("]"==s)return r.end.column++,r}}),this.add("string_dquotes","insertion",function(e,t,n,o,r){if('"'==r||"'"==r){g(n);var a=r,i=n.getSelectionRange(),s=o.doc.getTextRange(i);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:a+s+a,selection:!1};var l=n.getCursorPosition(),u=o.doc.getLine(l.row),c=u.substring(l.column-1,l.column),d=u.substring(l.column,l.column+1),m=o.getTokenAt(l.row,l.column),p=o.getTokenAt(l.row,l.column+1);if("\\"==c&&m&&/escape/.test(m.type))return null;var h,f=m&&/string/.test(m.type),x=!p||/string/.test(p.type);if(d==a)h=f!==x;else{if(f&&!x)return null;if(f&&x)return null;var b=o.$mode.tokenRe;b.lastIndex=0;var k=b.test(c);b.lastIndex=0;var v=b.test(c);if(k||v)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?a+a:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==a||"'"==a)){g(n);var i=o.doc.getLine(r.start.row),s=i.substring(r.start.column+1,r.start.column+2);if(s==a)return r.end.column++,r}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),o=new i(t,n.row,n.column);if(!this.$matchTokenType(o.getCurrentToken()||"text",l)){var r=new i(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return o.stepForward(),o.getCurrentTokenRow()!==n.row||this.$matchTokenType(o.getCurrentToken()||"text",u)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),a=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,a,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=r.row,o.autoInsertedLineEnd=n+a.substr(r.column),o.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),a=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,a)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=r.row,o.maybeInsertedLineStart=a.substr(0,r.column)+n,o.maybeInsertedLineEnd=a.substr(r.column),o.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return o.autoInsertedBrackets>0&&e.row===o.autoInsertedRow&&n===o.autoInsertedLineEnd[0]&&t.substr(e.column)===o.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return o.maybeInsertedBrackets>0&&e.row===o.maybeInsertedRow&&t.substr(e.column)===o.maybeInsertedLineEnd&&t.substr(0,e.column)==o.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},r.inherits(d,a),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../range").Range,a=e("./fold_mode").FoldMode,i=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(i,a),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(o)?"start":r},this.getFoldWidgetRange=function(e,t,n,o){var r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);var a=r.match(this.foldingStartMarker);if(a){var i=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,i);var s=e.getCommentFoldRange(n,i+a[0].length,1);return s&&!s.isMultiLine()&&(o?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var a=r.match(this.foldingStopMarker);if(a){var i=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,i):e.getCommentFoldRange(n,i,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),o=n.search(/\S/),a=t,i=n.length;t+=1;for(var s=t,l=e.getLength();++tu)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=a)break;if(c.isMultiLine())t=c.end.row;else if(o==u)break}s=t}}return new r(a,i,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),a=e.getLength(),i=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++ni)return new r(i,o,c,t.length)}}.call(i.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),a=r.tokens,i=r.state;if(a.length&&"comment"==a[a.length-1].type)return o;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(o+=n)}else if("doc-start"==e){if("start"==i||"no_regex"==i)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(o+=" "),o+="* ")}return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(c.prototype),t.Mode=c}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),a=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",i=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",u=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",m=function(){var e=this.createKeywordMapper({"support.function":i,"support.constant":s,"support.type":a,"support.constant.color":l,"support.constant.fonts":u},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};o.inherits(m,r),t.CssHighlightRules=m}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),a=e("../../token_iterator").TokenIterator,i=function(){this.inherit(r),this.add("colon","insertion",function(e,t,n,o,r){if(":"===r){var i=n.getCursorPosition(),s=new a(o,i.row,i.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var u=o.doc.getLine(i.row),c=u.substring(i.column,i.column+1); +if(":"===c)return{text:"",selection:[1,1]};if(!u.substring(i.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&":"===i){var s=n.getCursorPosition(),l=new a(o,s.row,s.column),u=l.getCurrentToken();if(u&&u.value.match(/\s+/)&&(u=l.stepBackward()),u&&"support.type"===u.type){var c=o.doc.getLine(r.start.row),g=c.substring(r.end.column,r.end.column+1);if(";"===g)return r.end.column++,r}}}),this.add("semicolon","insertion",function(e,t,n,o,r){if(";"===r){var a=n.getCursorPosition(),i=o.doc.getLine(a.row),s=i.substring(a.column,a.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};o.inherits(i,r),t.CssBehaviour=i}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,a=e("./css_highlight_rules").CssHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e).tokens;if(r.length&&"comment"==r[r.length-1].type)return o;var a=t.match(/^.*\{\s*$/);return a&&(o+=n),o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,a=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===a&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(r.prototype),o.inherits(a,r),t.XmlHighlightRules=a}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),a=e("./css_highlight_rules").CssHighlightRules,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=r.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),u=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(a,"css-","style"),this.embedTagRules(i,"js-","script"),this.constructor===u&&this.normalizeRules()};o.inherits(u,s),t.HtmlHighlightRules=u}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),a=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,s=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,r,a){if('"'==a||"'"==a){var s=a,l=r.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),g=c.substring(u.column,u.column+1),d=new i(r,u.row,u.column),m=d.getCurrentToken();if(g==s&&(o(m,"attribute-value")||o(m,"string")))return{text:"",selection:[1,1]};if(m||(m=d.stepBackward()),!m)return;for(;o(m,"tag-whitespace")||o(m,"whitespace");)m=d.stepBackward();var p=!g||g.match(/\s/);if(o(m,"attribute-equals")&&(p||">"==g)||o(m,"decl-attribute-equals")&&(p||"?"==g))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==a||"'"==a)){var i=o.doc.getLine(r.start.row),s=i.substring(r.start.column+1,r.start.column+2);if(s==a)return r.end.column++,r}}),this.add("autoclosing","insertion",function(e,t,n,r,a){if(">"==a){var s=n.getCursorPosition(),l=new i(r,s.row,s.column),u=l.getCurrentToken()||l.stepBackward();if(!u||!(o(u,"tag-name")||o(u,"tag-whitespace")||o(u,"attribute-name")||o(u,"attribute-equals")||o(u,"attribute-value")))return;if(o(u,"reference.attribute-value"))return;if(o(u,"attribute-value")){var c=u.value.charAt(0);if('"'==c||"'"==c){var g=u.value.charAt(u.value.length-1),d=l.getCurrentTokenColumn()+u.value.length;if(d>s.column||d==s.column&&c!=g)return}}for(;!o(u,"tag-name");)u=l.stepBackward();var m=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn();if(o(l.stepBackward(),"end-tag-open"))return;var h=u.value;if(m==s.row&&(h=h.substring(0,s.column-p)),this.voidElements.hasOwnProperty(h.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,o,r){if("\n"==r){var a=n.getCursorPosition(),s=o.getLine(a.row),l=new i(o,a.row,a.column),u=l.getCurrentToken();if(u&&u.type.indexOf("tag-close")!==-1){for(;u&&u.type.indexOf("tag-name")===-1;)u=l.stepBackward();if(!u)return;var c=u.value,g=l.getCurrentTokenRow();if(u=l.stepBackward(),!u||u.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]){var d=o.getTokenAt(a.row,a.column+1),s=o.getLine(g),m=this.$getIndent(s),p=m+o.getTabString();return d&&"-1}var r=e("../../lib/oop"),a=(e("../../lib/lang"),e("../../range").Range),i=e("./fold_mode").FoldMode,s=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(e,t){i.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(l,i);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var o=this._getFirstTagInLine(e,n);return o?o.closing||!o.tagName&&o.selfClosing?"markbeginend"==t?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,o.tagName,o.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new u,a=0;a"==i.value;break}return r}if(o(i,"tag-close"))return r.selfClosing="/>"==i.value,r;r.start.column+=i.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var a=e.getTokens(t),i=0,s=0;s"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(t&&n.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,n){var o=this._getFirstTagInLine(e,n);if(!o)return null;var r,i=o.closing||o.selfClosing,l=[];if(i)for(var u=new s(e,n,o.end.column),c={row:n,column:o.start.column};r=this._readTagBackward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,a.fromPoints(r.start,r.end)}if(r.closing)l.push(r);else if(this._pop(l,r),0==l.length)return r.start.column+=r.tagName.length+2,a.fromPoints(r.start,c)}else for(var u=new s(e,n,o.start.column),g={row:n,column:o.start.column+o.tagName.length+2};r=this._readTagForward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,a.fromPoints(r.start,r.end)}if(r.closing){if(this._pop(l,r),0==l.length)return a.fromPoints(g,r.start)}else l.push(r)}}}).call(l.prototype)}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./mixed").FoldMode,a=e("./xml").FoldMode,i=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){r.call(this,new a(e,t),{"js-":new i,"css-":new i})};o.inherits(s,r)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}function r(e,t){for(var n=new a(e,t.row,t.column),r=n.getCurrentToken();r&&!o(r,"tag-name");)r=n.stepBackward();if(r)return r.value}var a=e("../token_iterator").TokenIterator,i=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=i.concat(s),u={html:["manifest"],head:[],title:[],base:["href","target"],link:["href","hreflang","rel","media","type","sizes"],meta:["http-equiv","name","content","charset"],style:["type","media","scoped"],script:["charset","type","src","defer","async"],noscript:["href"],body:["onafterprint","onbeforeprint","onbeforeunload","onhashchange","onmessage","onoffline","onpopstate","onredo","onresize","onstorage","onundo","onunload"],section:[],nav:[],article:["pubdate"],aside:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],footer:[],address:[],main:[],p:[],hr:[],pre:[],blockquote:["cite"],ol:["start","reversed"],ul:[],li:["value"],dl:[],dt:[],dd:[],figure:[],figcaption:[],div:[],a:["href","target","ping","rel","media","hreflang","type"],em:[],strong:[],small:[],s:[],cite:[],q:["cite"],dfn:[],abbr:[],data:[],time:["datetime"],code:[],var:[],samp:[],kbd:[],sub:[],sup:[],i:[],b:[],u:[],mark:[],ruby:[],rt:[],rp:[],bdi:[],bdo:[],span:[],br:[],wbr:[],ins:["cite","datetime"],del:["cite","datetime"],img:["alt","src","height","width","usemap","ismap"],iframe:["name","src","height","width","sandbox","seamless"],embed:["src","height","width","type"],object:["param","data","type","height","width","usemap","name","form","classid"],param:["name","value"],video:["src","autobuffer","autoplay","loop","controls","width","height","poster"],audio:["src","autobuffer","autoplay","loop","controls"],source:["src","type","media"],track:["kind","src","srclang","label","default"],canvas:["width","height"],map:["name"],area:["shape","coords","href","hreflang","alt","target","media","rel","ping","type"],svg:[],math:[],table:["summary"],caption:[],colgroup:["span"],col:["span"],tbody:[],thead:[],tfoot:[],tr:[],td:["headers","rowspan","colspan"],th:["headers","rowspan","colspan","scope"],form:["accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],fieldset:["disabled","form","name"],legend:[],label:["form","for"],input:["type","accept","alt","autocomplete","checked","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","multiple","pattern","placeholder","readonly","required","size","src","step","width","files","value"],button:["autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","value","type"],select:["autofocus","disabled","form","multiple","name","size"],datalist:[],optgroup:["disabled","label"],option:["disabled","selected","label","value"],textarea:["autofocus","disabled","form","maxlength","name","placeholder","readonly","required","rows","cols","wrap"],keygen:["autofocus","challenge","disabled","form","keytype","name"],output:["for","form","name"],progress:["value","max"],meter:["value","min","max","low","high","optimum"],details:["open"],summary:[],command:["type","label","icon","disabled","checked","radiogroup","command"],menu:["type","label"],dialog:["open"]},c=Object.keys(u),g=function(){};(function(){this.getCompletions=function(e,t,n,r){var a=t.getTokenAt(n.row,n.column);return a?o(a,"tag-name")||o(a,"tag-open")||o(a,"end-tag-open")?this.getTagCompletions(e,t,n,r):o(a,"tag-whitespace")||o(a,"attribute-name")?this.getAttributeCompetions(e,t,n,r):[]:[]},this.getTagCompletions=function(e,t,n,o){return c.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompetions=function(e,t,n,o){var a=r(t,n);if(!a)return[];var i=l;return a in u&&(i=i.concat(u[a])),i.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})}}).call(g.prototype),t.HtmlCompletions=g}),define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),a=e("./text").Mode,i=e("./javascript").Mode,s=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,g=e("./html_completions").HtmlCompletions,d=e("../worker/worker_client").WorkerClient,m=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],p=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],h=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new u,this.$completer=new g,this.createModeDelegates({"js-":i,"css-":s}),this.foldingRules=new c(this.voidElements,r.arrayToMap(p))};o.inherits(h,a),function(){this.blockComment={start:""},this.voidElements=r.arrayToMap(m),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,o){return this.$completer.getCompletions(e,t,n,o)},this.createWorker=function(e){if(this.constructor==h){var t=new d(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(h.prototype),t.Mode=h}),define("ace/mode/smarty_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./html_highlight_rules").HtmlHighlightRules,a=function(){r.call(this);var e={start:[{include:"#comments"},{include:"#blocks"}],"#blocks":[{token:"punctuation.section.embedded.begin.smarty",regex:"\\{%?",push:[{token:"punctuation.section.embedded.end.smarty",regex:"%?\\}",next:"pop"},{include:"#strings"},{include:"#variables"},{include:"#lang"},{defaultToken:"source.smarty"}]}],"#comments":[{token:["punctuation.definition.comment.smarty","comment.block.smarty"],regex:"(\\{%?)(\\*)",push:[{token:"comment.block.smarty",regex:"\\*%?\\}",next:"pop"},{defaultToken:"comment.block.smarty"}]}],"#lang":[{token:"keyword.operator.smarty",regex:"(?:!=|!|<=|>=|<|>|===|==|%|&&|\\|\\|)|\\b(?:and|or|eq|neq|ne|gte|gt|ge|lte|lt|le|not|mod)\\b"},{token:"constant.language.smarty",regex:"\\b(?:TRUE|FALSE|true|false)\\b"},{token:"keyword.control.smarty",regex:"\\b(?:if|else|elseif|foreach|foreachelse|section|switch|case|break|default)\\b"},{token:"variable.parameter.smarty",regex:"\\b[a-zA-Z]+="},{token:"support.function.built-in.smarty",regex:"\\b(?:capture|config_load|counter|cycle|debug|eval|fetch|include_php|include|insert|literal|math|strip|rdelim|ldelim|assign|constant|block|html_[a-z_]*)\\b"},{token:"support.function.variable-modifier.smarty",regex:"\\|(?:capitalize|cat|count_characters|count_paragraphs|count_sentences|count_words|date_format|default|escape|indent|lower|nl2br|regex_replace|replace|spacify|string_format|strip_tags|strip|truncate|upper|wordwrap)"}],"#strings":[{token:"punctuation.definition.string.begin.smarty",regex:"'",push:[{token:"punctuation.definition.string.end.smarty",regex:"'",next:"pop"},{token:"constant.character.escape.smarty",regex:"\\\\."},{defaultToken:"string.quoted.single.smarty"}]},{token:"punctuation.definition.string.begin.smarty",regex:'"',push:[{token:"punctuation.definition.string.end.smarty",regex:'"',next:"pop"},{token:"constant.character.escape.smarty",regex:"\\\\."},{defaultToken:"string.quoted.double.smarty"}]}],"#variables":[{token:["punctuation.definition.variable.smarty","variable.other.global.smarty"],regex:"\\b(\\$)(Smarty\\.)"},{token:["punctuation.definition.variable.smarty","variable.other.smarty"],regex:"(\\$)([a-zA-Z_][a-zA-Z0-9_]*)\\b"},{token:["keyword.operator.smarty","variable.other.property.smarty"],regex:"(->)([a-zA-Z_][a-zA-Z0-9_]*)\\b"},{token:["keyword.operator.smarty","meta.function-call.object.smarty","punctuation.definition.variable.smarty","variable.other.smarty","punctuation.definition.variable.smarty"],regex:"(->)([a-zA-Z_][a-zA-Z0-9_]*)(\\()(.*?)(\\))"}]},t=e.start;for(var n in this.$rules)this.$rules[n].unshift.apply(this.$rules[n],t);Object.keys(e).forEach(function(t){this.$rules[t]||(this.$rules[t]=e[t])},this),this.normalizeRules()};a.metaData={fileTypes:["tpl"],foldingStartMarker:"\\{%?",foldingStopMarker:"%?\\}",name:"Smarty",scopeName:"text.html.smarty"},o.inherits(a,r),t.SmartyHighlightRules=a}),define("ace/mode/smarty",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/smarty_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./html").Mode,a=e("./smarty_highlight_rules").SmartyHighlightRules,i=function(){r.call(this),this.HighlightRules=a};o.inherits(i,r),function(){this.$id="ace/mode/smarty"}.call(i.prototype),t.Mode=i}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-snippets.js b/www/js/vendor/ace/mode-snippets.js index d9f020db7..9719ce4b5 100755 --- a/www/js/vendor/ace/mode-snippets.js +++ b/www/js/vendor/ace/mode-snippets.js @@ -1,198 +1 @@ -define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/snippets",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var SnippetHighlightRules = function() { - - var builtins = "SELECTION|CURRENT_WORD|SELECTED_TEXT|CURRENT_LINE|LINE_INDEX|" + - "LINE_NUMBER|SOFT_TABS|TAB_SIZE|FILENAME|FILEPATH|FULLNAME"; - - this.$rules = { - "start" : [ - {token:"constant.language.escape", regex: /\\[\$}`\\]/}, - {token:"keyword", regex: "\\$(?:TM_)?(?:" + builtins + ")\\b"}, - {token:"variable", regex: "\\$\\w+"}, - {onMatch: function(value, state, stack) { - if (stack[1]) - stack[1]++; - else - stack.unshift(state, 1); - return this.tokenName; - }, tokenName: "markup.list", regex: "\\${", next: "varDecl"}, - {onMatch: function(value, state, stack) { - if (!stack[1]) - return "text"; - stack[1]--; - if (!stack[1]) - stack.splice(0,2); - return this.tokenName; - }, tokenName: "markup.list", regex: "}"}, - {token: "doc.comment", regex:/^\${2}-{5,}$/} - ], - "varDecl" : [ - {regex: /\d+\b/, token: "constant.numeric"}, - {token:"keyword", regex: "(?:TM_)?(?:" + builtins + ")\\b"}, - {token:"variable", regex: "\\w+"}, - {regex: /:/, token: "punctuation.operator", next: "start"}, - {regex: /\//, token: "string.regex", next: "regexp"}, - {regex: "", next: "start"} - ], - "regexp" : [ - {regex: /\\./, token: "escape"}, - {regex: /\[/, token: "regex.start", next: "charClass"}, - {regex: "/", token: "string.regex", next: "format"}, - {"token": "string.regex", regex:"."} - ], - charClass : [ - {regex: "\\.", token: "escape"}, - {regex: "\\]", token: "regex.end", next: "regexp"}, - {"token": "string.regex", regex:"."} - ], - "format" : [ - {regex: /\\[ulULE]/, token: "keyword"}, - {regex: /\$\d+/, token: "variable"}, - {regex: "/[gim]*:?", token: "string.regex", next: "start"}, - {"token": "string", regex:"."} - ] - }; -}; -oop.inherits(SnippetHighlightRules, TextHighlightRules); - -exports.SnippetHighlightRules = SnippetHighlightRules; - -var SnippetGroupHighlightRules = function() { - this.$rules = { - "start" : [ - {token: "text", regex: "^\\t", next: "sn-start"}, - {token:"invalid", regex: /^ \s*/}, - {token:"comment", regex: /^#.*/}, - {token:"constant.language.escape", regex: "^regex ", next: "regex"}, - {token:"constant.language.escape", regex: "^(trigger|endTrigger|name|snippet|guard|endGuard|tabTrigger|key)\\b"} - ], - "regex" : [ - {token:"text", regex: "\\."}, - {token:"keyword", regex: "/"}, - {token:"empty", regex: "$", next: "start"} - ] - }; - this.embedRules(SnippetHighlightRules, "sn-", [ - {token: "text", regex: "^\\t", next: "sn-start"}, - {onMatch: function(value, state, stack) { - stack.splice(stack.length); - return this.tokenName; - }, tokenName: "text", regex: "^(?!\t)", next: "start"} - ]) - -}; - -oop.inherits(SnippetGroupHighlightRules, TextHighlightRules); - -exports.SnippetGroupHighlightRules = SnippetGroupHighlightRules; - -var FoldMode = require("./folding/coffee").FoldMode; - -var Mode = function() { - this.HighlightRules = SnippetGroupHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.$indentWithTabs = true; - this.lineCommentStart = "#"; - this.$id = "ace/mode/snippets"; -}).call(Mode.prototype); -exports.Mode = Mode; - - -}); +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("./fold_mode").FoldMode,i=e("../../range").Range,g=t.FoldMode=function(){};r.inherits(g,o),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var o=/\S/,g=e.getLine(n),a=g.search(o);if(a!=-1&&"#"==g[a]){for(var s=g.length,x=e.getLength(),l=n,d=n;++nl){var u=e.getLine(d).length;return new i(l,s,d,u)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),o=r.search(/\S/),i=e.getLine(n+1),g=e.getLine(n-1),a=g.search(/\S/),s=i.search(/\S/);if(o==-1)return e.foldWidgets[n-1]=a!=-1&&a=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = CssHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.foldingRules = "cStyle"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("csslint", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/css"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === " -1; -} - -(function() { - - this.getFoldWidget = function(session, foldStyle, row) { - var tag = this._getFirstTagInLine(session, row); - - if (!tag) - return ""; - - if (tag.closing || (!tag.tagName && tag.selfClosing)) - return foldStyle == "markbeginend" ? "end" : ""; - - if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) - return ""; - - if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) - return ""; - - return "start"; - }; - this._getFirstTagInLine = function(session, row) { - var tokens = session.getTokens(row); - var tag = new Tag(); - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (is(token, "tag-open")) { - tag.end.column = tag.start.column + token.value.length; - tag.closing = is(token, "end-tag-open"); - token = tokens[++i]; - if (!token) - return null; - tag.tagName = token.value; - tag.end.column += token.value.length; - for (i++; i < tokens.length; i++) { - token = tokens[i]; - tag.end.column += token.value.length; - if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - break; - } - } - return tag; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - return tag; - } - tag.start.column += token.value.length; - } - - return null; - }; - - this._findEndTagInLine = function(session, row, tagName, startColumn) { - var tokens = session.getTokens(row); - var column = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - column += token.value.length; - if (column < startColumn) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var firstTag = this._getFirstTagInLine(session, row); - - if (!firstTag) - return null; - - var isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var MixedFoldMode = require("./mixed").FoldMode; -var XmlFoldMode = require("./xml").FoldMode; -var CStyleFoldMode = require("./cstyle").FoldMode; - -var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { - MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { - "js-": new CStyleFoldMode(), - "css-": new CStyleFoldMode() - }); -}; - -oop.inherits(FoldMode, MixedFoldMode); - -}); - -define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var TokenIterator = require("../token_iterator").TokenIterator; - -var commonAttributes = [ - "accesskey", - "class", - "contenteditable", - "contextmenu", - "dir", - "draggable", - "dropzone", - "hidden", - "id", - "inert", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "lang", - "spellcheck", - "style", - "tabindex", - "title", - "translate" -]; - -var eventAttributes = [ - "onabort", - "onblur", - "oncancel", - "oncanplay", - "oncanplaythrough", - "onchange", - "onclick", - "onclose", - "oncontextmenu", - "oncuechange", - "ondblclick", - "ondrag", - "ondragend", - "ondragenter", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onended", - "onerror", - "onfocus", - "oninput", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeyup", - "onload", - "onloadeddata", - "onloadedmetadata", - "onloadstart", - "onmousedown", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onpause", - "onplay", - "onplaying", - "onprogress", - "onratechange", - "onreset", - "onscroll", - "onseeked", - "onseeking", - "onselect", - "onshow", - "onstalled", - "onsubmit", - "onsuspend", - "ontimeupdate", - "onvolumechange", - "onwaiting" -]; - -var globalAttributes = commonAttributes.concat(eventAttributes); - -var attributeMap = { - "html": ["manifest"], - "head": [], - "title": [], - "base": ["href", "target"], - "link": ["href", "hreflang", "rel", "media", "type", "sizes"], - "meta": ["http-equiv", "name", "content", "charset"], - "style": ["type", "media", "scoped"], - "script": ["charset", "type", "src", "defer", "async"], - "noscript": ["href"], - "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], - "section": [], - "nav": [], - "article": ["pubdate"], - "aside": [], - "h1": [], - "h2": [], - "h3": [], - "h4": [], - "h5": [], - "h6": [], - "header": [], - "footer": [], - "address": [], - "main": [], - "p": [], - "hr": [], - "pre": [], - "blockquote": ["cite"], - "ol": ["start", "reversed"], - "ul": [], - "li": ["value"], - "dl": [], - "dt": [], - "dd": [], - "figure": [], - "figcaption": [], - "div": [], - "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], - "em": [], - "strong": [], - "small": [], - "s": [], - "cite": [], - "q": ["cite"], - "dfn": [], - "abbr": [], - "data": [], - "time": ["datetime"], - "code": [], - "var": [], - "samp": [], - "kbd": [], - "sub": [], - "sup": [], - "i": [], - "b": [], - "u": [], - "mark": [], - "ruby": [], - "rt": [], - "rp": [], - "bdi": [], - "bdo": [], - "span": [], - "br": [], - "wbr": [], - "ins": ["cite", "datetime"], - "del": ["cite", "datetime"], - "img": ["alt", "src", "height", "width", "usemap", "ismap"], - "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], - "embed": ["src", "height", "width", "type"], - "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], - "param": ["name", "value"], - "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], - "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], - "source": ["src", "type", "media"], - "track": ["kind", "src", "srclang", "label", "default"], - "canvas": ["width", "height"], - "map": ["name"], - "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], - "svg": [], - "math": [], - "table": ["summary"], - "caption": [], - "colgroup": ["span"], - "col": ["span"], - "tbody": [], - "thead": [], - "tfoot": [], - "tr": [], - "td": ["headers", "rowspan", "colspan"], - "th": ["headers", "rowspan", "colspan", "scope"], - "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], - "fieldset": ["disabled", "form", "name"], - "legend": [], - "label": ["form", "for"], - "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], - "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], - "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], - "datalist": [], - "optgroup": ["disabled", "label"], - "option": ["disabled", "selected", "label", "value"], - "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], - "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], - "output": ["for", "form", "name"], - "progress": ["value", "max"], - "meter": ["value", "min", "max", "low", "high", "optimum"], - "details": ["open"], - "summary": [], - "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], - "menu": ["type", "label"], - "dialog": ["open"] -}; - -var elements = Object.keys(attributeMap); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -function findTagName(session, pos) { - var iterator = new TokenIterator(session, pos.row, pos.column); - var token = iterator.getCurrentToken(); - while (token && !is(token, "tag-name")){ - token = iterator.stepBackward(); - } - if (token) - return token.value; -} - -var HtmlCompletions = function() { - -}; - -(function() { - - this.getCompletions = function(state, session, pos, prefix) { - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) - return this.getTagCompletions(state, session, pos, prefix); - if (is(token, "tag-whitespace") || is(token, "attribute-name")) - return this.getAttributeCompetions(state, session, pos, prefix); - - return []; - }; - - this.getTagCompletions = function(state, session, pos, prefix) { - return elements.map(function(element){ - return { - value: element, - meta: "tag", - score: Number.MAX_VALUE - }; - }); - }; - - this.getAttributeCompetions = function(state, session, pos, prefix) { - var tagName = findTagName(session, pos); - if (!tagName) - return []; - var attributes = globalAttributes; - if (tagName in attributeMap) { - attributes = attributes.concat(attributeMap[tagName]); - } - return attributes.map(function(attribute){ - return { - caption: attribute, - snippet: attribute + '="$0"', - meta: "attribute", - score: Number.MAX_VALUE - }; - }); - }; - -}).call(HtmlCompletions.prototype); - -exports.HtmlCompletions = HtmlCompletions; -}); - -define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var CssMode = require("./css").Mode; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; -var HtmlFoldMode = require("./folding/html").FoldMode; -var HtmlCompletions = require("./html_completions").HtmlCompletions; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; -var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; - -var Mode = function(options) { - this.fragmentContext = options && options.fragmentContext; - this.HighlightRules = HtmlHighlightRules; - this.$behaviour = new XmlBehaviour(); - this.$completer = new HtmlCompletions(); - - this.createModeDelegates({ - "js-": JavaScriptMode, - "css-": CssMode - }); - - this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.blockComment = {start: ""}; - - this.voidElements = lang.arrayToMap(voidElements); - - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - this.checkOutdent = function(state, line, input) { - return false; - }; - - this.getCompletions = function(state, session, pos, prefix) { - return this.$completer.getCompletions(state, session, pos, prefix); - }; - - this.createWorker = function(session) { - if (this.constructor != Mode) - return; - var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - if (this.fragmentContext) - worker.call("setOptions", [{context: this.fragmentContext}]); - - worker.on("error", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/html"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/soy_template_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; - -var SoyTemplateHighlightRules = function() { - HtmlHighlightRules.call(this); - - var soyRules = { start: - [ { include: '#template' }, - { include: '#if' }, - { include: '#comment-line' }, - { include: '#comment-block' }, - { include: '#comment-doc' }, - { include: '#call' }, - { include: '#css' }, - { include: '#param' }, - { include: '#print' }, - { include: '#msg' }, - { include: '#for' }, - { include: '#foreach' }, - { include: '#switch' }, - { include: '#tag' }, - { include: 'text.html.basic' } ], - '#call': - [ { token: - [ 'punctuation.definition.tag.begin.soy', - 'meta.tag.call.soy' ], - regex: '(\\{/?)(\\s*)(?=call|delcall)', - push: - [ { token: 'punctuation.definition.tag.end.soy', - regex: '\\}', - next: 'pop' }, - { include: '#string-quoted-single' }, - { include: '#string-quoted-double' }, - { token: ['entity.name.tag.soy', 'variable.parameter.soy'], - regex: '(call|delcall)(\\s+[\\.\\w]+)'}, - { token: - [ 'entity.other.attribute-name.soy', - 'text', - 'keyword.operator.soy' ], - regex: '\\b(data)(\\s*)(=)' }, - { defaultToken: 'meta.tag.call.soy' } ] } ], - '#comment-line': - [ { token: - [ 'comment.line.double-slash.soy', - 'punctuation.definition.comment.soy', - 'comment.line.double-slash.soy' ], - regex: '(\\s+)(//)(.*$)' } ], - '#comment-block': - [ { token: 'punctuation.definition.comment.begin.soy', - regex: '/\\*(?!\\*)', - push: - [ { token: 'punctuation.definition.comment.end.soy', - regex: '\\*/', - next: 'pop' }, - { defaultToken: 'comment.block.soy' } ] } ], - '#comment-doc': - [ { token: 'punctuation.definition.comment.begin.soy', - regex: '/\\*\\*(?!/)', - push: - [ { token: 'punctuation.definition.comment.end.soy', - regex: '\\*/', - next: 'pop' }, - { token: [ 'support.type.soy', 'text', 'variable.parameter.soy' ], - regex: '(@param|@param\\?)(\\s+)(\\w+)' }, - { defaultToken: 'comment.block.documentation.soy' } ] } ], - '#css': - [ { token: - [ 'punctuation.definition.tag.begin.soy', - 'meta.tag.css.soy', - 'entity.name.tag.soy' ], - regex: '(\\{/?)(\\s*)(css)\\b', - push: - [ { token: 'punctuation.definition.tag.end.soy', - regex: '\\}', - next: 'pop' }, - { token: 'support.constant.soy', - regex: '\\b(?:LITERAL|REFERENCE|BACKEND_SPECIFIC|GOOG)\\b' }, - { defaultToken: 'meta.tag.css.soy' } ] } ], - '#for': - [ { token: - [ 'punctuation.definition.tag.begin.soy', - 'meta.tag.for.soy', - 'entity.name.tag.soy' ], - regex: '(\\{/?)(\\s*)(for)\\b', - push: - [ { token: 'punctuation.definition.tag.end.soy', - regex: '\\}', - next: 'pop' }, - { token: 'keyword.operator.soy', regex: '\\bin\\b' }, - { token: 'support.function.soy', regex: '\\brange\\b' }, - { include: '#variable' }, - { include: '#number' }, - { include: '#primitive' }, - { defaultToken: 'meta.tag.for.soy' } ] } ], - '#foreach': - [ { token: - [ 'punctuation.definition.tag.begin.soy', - 'meta.tag.foreach.soy', - 'entity.name.tag.soy' ], - regex: '(\\{/?)(\\s*)(foreach)\\b', - push: - [ { token: 'punctuation.definition.tag.end.soy', - regex: '\\}', - next: 'pop' }, - { token: 'keyword.operator.soy', regex: '\\bin\\b' }, - { include: '#variable' }, - { defaultToken: 'meta.tag.foreach.soy' } ] } ], - '#function': - [ { token: 'support.function.soy', - regex: '\\b(?:isFirst|isLast|index|hasData|length|keys|round|floor|ceiling|min|max|randomInt)\\b' } ], - '#if': - [ { token: - [ 'punctuation.definition.tag.begin.soy', - 'meta.tag.if.soy', - 'entity.name.tag.soy' ], - regex: '(\\{/?)(\\s*)(if|elseif)\\b', - push: - [ { token: 'punctuation.definition.tag.end.soy', - regex: '\\}', - next: 'pop' }, - { include: '#variable' }, - { include: '#operator' }, - { include: '#function' }, - { include: '#string-quoted-single' }, - { include: '#string-quoted-double' }, - { defaultToken: 'meta.tag.if.soy' } ] } ], - '#namespace': - [ { token: [ 'entity.name.tag.soy', 'text', 'variable.parameter.soy' ], - regex: '(namespace|delpackage)(\\s+)([\\w\\.]+)' } ], - '#number': [ { token: 'constant.numeric', regex: '[\\d]+' } ], - '#operator': - [ { token: 'keyword.operator.soy', - regex: '==|!=|\\band\\b|\\bor\\b|\\bnot\\b|-|\\+|/|\\?:' } ], - '#param': - [ { token: - [ 'punctuation.definition.tag.begin.soy', - 'meta.tag.param.soy', - 'entity.name.tag.soy' ], - regex: '(\\{/?)(\\s*)(param)', - push: - [ { token: 'punctuation.definition.tag.end.soy', - regex: '\\}', - next: 'pop' }, - { include: '#variable' }, - { token: - [ 'entity.other.attribute-name.soy', - 'text', - 'keyword.operator.soy' ], - regex: '\\b([\\w]+)(\\s*)((?::)?)' }, - { defaultToken: 'meta.tag.param.soy' } ] } ], - '#primitive': - [ { token: 'constant.language.soy', - regex: '\\b(?:null|false|true)\\b' } ], - '#msg': - [ { token: - [ 'punctuation.definition.tag.begin.soy', - 'meta.tag.msg.soy', - 'entity.name.tag.soy' ], - regex: '(\\{/?)(\\s*)(msg)\\b', - push: - [ { token: 'punctuation.definition.tag.end.soy', - regex: '\\}', - next: 'pop' }, - { include: '#string-quoted-single' }, - { include: '#string-quoted-double' }, - { token: - [ 'entity.other.attribute-name.soy', - 'text', - 'keyword.operator.soy' ], - regex: '\\b(meaning|desc)(\\s*)(=)' }, - { defaultToken: 'meta.tag.msg.soy' } ] } ], - '#print': - [ { token: - [ 'punctuation.definition.tag.begin.soy', - 'meta.tag.print.soy', - 'entity.name.tag.soy' ], - regex: '(\\{/?)(\\s*)(print)\\b', - push: - [ { token: 'punctuation.definition.tag.end.soy', - regex: '\\}', - next: 'pop' }, - { include: '#variable' }, - { include: '#print-parameter' }, - { include: '#number' }, - { include: '#primitive' }, - { include: '#attribute-lookup' }, - { defaultToken: 'meta.tag.print.soy' } ] } ], - '#print-parameter': - [ { token: 'keyword.operator.soy', regex: '\\|' }, - { token: 'variable.parameter.soy', - regex: 'noAutoescape|id|escapeHtml|escapeJs|insertWorkBreaks|truncate' } ], - '#special-character': - [ { token: 'support.constant.soy', - regex: '\\bsp\\b|\\bnil\\b|\\\\r|\\\\n|\\\\t|\\blb\\b|\\brb\\b' } ], - '#string-quoted-double': [ { token: 'string.quoted.double', regex: '"[^"]*"' } ], - '#string-quoted-single': [ { token: 'string.quoted.single', regex: '\'[^\']*\'' } ], - '#switch': - [ { token: - [ 'punctuation.definition.tag.begin.soy', - 'meta.tag.switch.soy', - 'entity.name.tag.soy' ], - regex: '(\\{/?)(\\s*)(switch|case)\\b', - push: - [ { token: 'punctuation.definition.tag.end.soy', - regex: '\\}', - next: 'pop' }, - { include: '#variable' }, - { include: '#function' }, - { include: '#number' }, - { include: '#string-quoted-single' }, - { include: '#string-quoted-double' }, - { defaultToken: 'meta.tag.switch.soy' } ] } ], - '#attribute-lookup': - [ { token: 'punctuation.definition.attribute-lookup.begin.soy', - regex: '\\[', - push: - [ { token: 'punctuation.definition.attribute-lookup.end.soy', - regex: '\\]', - next: 'pop' }, - { include: '#variable' }, - { include: '#function' }, - { include: '#operator' }, - { include: '#number' }, - { include: '#primitive' }, - { include: '#string-quoted-single' }, - { include: '#string-quoted-double' } ] } ], - '#tag': - [ { token: 'punctuation.definition.tag.begin.soy', - regex: '\\{', - push: - [ { token: 'punctuation.definition.tag.end.soy', - regex: '\\}', - next: 'pop' }, - { include: '#namespace' }, - { include: '#variable' }, - { include: '#special-character' }, - { include: '#tag-simple' }, - { include: '#function' }, - { include: '#operator' }, - { include: '#attribute-lookup' }, - { include: '#number' }, - { include: '#primitive' }, - { include: '#print-parameter' } ] } ], - '#tag-simple': - [ { token: 'entity.name.tag.soy', - regex: '{{\\s*(?:literal|else|ifempty|default)\\s*(?=\\})'} ], - '#template': - [ { token: - [ 'punctuation.definition.tag.begin.soy', - 'meta.tag.template.soy' ], - regex: '(\\{/?)(\\s*)(?=template|deltemplate)', - push: - [ { token: 'punctuation.definition.tag.end.soy', - regex: '\\}', - next: 'pop' }, - { token: ['entity.name.tag.soy', 'text', 'entity.name.function.soy' ], - regex: '(template|deltemplate)(\\s+)([\\.\\w]+)', - originalRegex: '(?<=template|deltemplate)\\s+([\\.\\w]+)' }, - { token: - [ 'entity.other.attribute-name.soy', - 'text', - 'keyword.operator.soy', - 'text', - 'string.quoted.double.soy' ], - regex: '\\b(private)(\\s*)(=)(\\s*)("true"|"false")' }, - { token: - [ 'entity.other.attribute-name.soy', - 'text', - 'keyword.operator.soy', - 'text', - 'string.quoted.single.soy' ], - regex: '\\b(private)(\\s*)(=)(\\s*)(\'true\'|\'false\')' }, - { token: - [ 'entity.other.attribute-name.soy', - 'text', - 'keyword.operator.soy', - 'text', - 'string.quoted.double.soy' ], - regex: '\\b(autoescape)(\\s*)(=)(\\s*)("true"|"false"|"contextual")' }, - { token: - [ 'entity.other.attribute-name.soy', - 'text', - 'keyword.operator.soy', - 'text', - 'string.quoted.single.soy' ], - regex: '\\b(autoescape)(\\s*)(=)(\\s*)(\'true\'|\'false\'|\'contextual\')' }, - { defaultToken: 'meta.tag.template.soy' } ] } ], - '#variable': [ { token: 'variable.other.soy', regex: '\\$[\\w\\.]+' } ] } - - - for (var i in soyRules) { - if (this.$rules[i]) { - this.$rules[i].unshift.call(this.$rules[i], soyRules[i]); - } else { - this.$rules[i] = soyRules[i]; - } - } - - this.normalizeRules(); -}; - -SoyTemplateHighlightRules.metaData = { comment: 'SoyTemplate', - fileTypes: [ 'soy' ], - firstLineMatch: '\\{\\s*namespace\\b', - foldingStartMarker: '\\{\\s*template\\s+[^\\}]*\\}', - foldingStopMarker: '\\{\\s*/\\s*template\\s*\\}', - name: 'SoyTemplate', - scopeName: 'source.soy' } - - -oop.inherits(SoyTemplateHighlightRules, HtmlHighlightRules); - -exports.SoyTemplateHighlightRules = SoyTemplateHighlightRules; -}); - -define("ace/mode/soy_template",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/soy_template_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var HtmlMode = require("./html").Mode; -var SoyTemplateHighlightRules = require("./soy_template_highlight_rules").SoyTemplateHighlightRules; - -var Mode = function() { - HtmlMode.call(this); - this.HighlightRules = SoyTemplateHighlightRules; -}; -oop.inherits(Mode, HtmlMode); - -(function() { - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - this.$id = "ace/mode/soy_template"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};o.inherits(i,r),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",o="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},r.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[r.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[r.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(r,"doc-",[r.getEndRule("no_regex")]),this.normalizeRules()};o.inherits(a,i),t.JavaScriptHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),r=n.match(/^(\s*\})/);if(!r)return 0;var i=r[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new o(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var o,r=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?o=c[t]:void(o=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,r,i){var a=n.getCursorPosition(),l=r.doc.getLine(a.row);if("{"==i){g(n);var u=n.getSelectionRange(),c=r.doc.getTextRange(u);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return{text:"{"+c+"}",selection:!1};if(d.isSaneInsertion(n,r))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var m=l.substring(a.column,a.column+1);if("}"==m){var p=r.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==p&&d.isAutoInsertedClosing(a,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var h="";d.isMaybeInsertedClosing(a,l)&&(h=s.stringRepeat("}",o.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=l.substring(a.column,a.column+1);if("}"===m){var f=r.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!f)return null;var x=this.$getIndent(r.getLine(f.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var b=x+r.getTabString();return{text:"\n"+b+"\n"+x+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,i){var a=r.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){g(n);var s=r.doc.getLine(i.start.row),l=s.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,o,r){if("("==r){g(n);var i=n.getSelectionRange(),a=o.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,")"),{text:"()",selection:[1,1]}}else if(")"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=o.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"("==i){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(")"==s)return r.end.column++,r}}),this.add("brackets","insertion",function(e,t,n,o,r){if("["==r){g(n);var i=n.getSelectionRange(),a=o.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=o.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"["==i){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if("]"==s)return r.end.column++,r}}),this.add("string_dquotes","insertion",function(e,t,n,o,r){if('"'==r||"'"==r){g(n);var i=r,a=n.getSelectionRange(),s=o.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var l=n.getCursorPosition(),u=o.doc.getLine(l.row),c=u.substring(l.column-1,l.column),d=u.substring(l.column,l.column+1),m=o.getTokenAt(l.row,l.column),p=o.getTokenAt(l.row,l.column+1);if("\\"==c&&m&&/escape/.test(m.type))return null;var h,f=m&&/string/.test(m.type),x=!p||/string/.test(p.type);if(d==i)h=f!==x;else{if(f&&!x)return null;if(f&&x)return null;var b=o.$mode.tokenRe;b.lastIndex=0;var k=b.test(c);b.lastIndex=0;var y=b.test(c);if(k||y)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==i||"'"==i)){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(s==i)return r.end.column++,r}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),o=new a(t,n.row,n.column);if(!this.$matchTokenType(o.getCurrentToken()||"text",l)){var r=new a(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return o.stepForward(),o.getCurrentTokenRow()!==n.row||this.$matchTokenType(o.getCurrentToken()||"text",u)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=r.row,o.autoInsertedLineEnd=n+i.substr(r.column),o.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=r.row,o.maybeInsertedLineStart=i.substr(0,r.column)+n,o.maybeInsertedLineEnd=i.substr(r.column),o.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return o.autoInsertedBrackets>0&&e.row===o.autoInsertedRow&&n===o.autoInsertedLineEnd[0]&&t.substr(e.column)===o.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return o.maybeInsertedBrackets>0&&e.row===o.maybeInsertedRow&&t.substr(e.column)===o.maybeInsertedLineEnd&&t.substr(0,e.column)==o.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},r.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(o)?"start":r},this.getFoldWidgetRange=function(e,t,n,o){var r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);var i=r.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(o?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=r.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),o=n.search(/\S/),i=t,a=n.length;t+=1;for(var s=t,l=e.getLength();++tu)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=i)break;if(c.isMultiLine())t=c.end.row;else if(o==u)break}s=t}}return new r(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++na)return new r(a,o,c,t.length)}}.call(a.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),i=r.tokens,a=r.state;if(i.length&&"comment"==i[i.length-1].type)return o;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(o+=n)}else if("doc-start"==e){if("start"==a||"no_regex"==a)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(o+=" "),o+="* ")}return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(c.prototype),t.Mode=c}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),i=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",u=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",m=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":s,"support.type":i,"support.constant.color":l,"support.constant.fonts":u},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};o.inherits(m,r),t.CssHighlightRules=m}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),i=e("../../token_iterator").TokenIterator,a=function(){this.inherit(r),this.add("colon","insertion",function(e,t,n,o,r){if(":"===r){var a=n.getCursorPosition(),s=new i(o,a.row,a.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var u=o.doc.getLine(a.row),c=u.substring(a.column,a.column+1); +if(":"===c)return{text:"",selection:[1,1]};if(!u.substring(a.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&":"===a){var s=n.getCursorPosition(),l=new i(o,s.row,s.column),u=l.getCurrentToken();if(u&&u.value.match(/\s+/)&&(u=l.stepBackward()),u&&"support.type"===u.type){var c=o.doc.getLine(r.start.row),g=c.substring(r.end.column,r.end.column+1);if(";"===g)return r.end.column++,r}}}),this.add("semicolon","insertion",function(e,t,n,o,r){if(";"===r){var i=n.getCursorPosition(),a=o.doc.getLine(i.row),s=a.substring(i.column,i.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};o.inherits(a,r),t.CssBehaviour=a}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e).tokens;if(r.length&&"comment"==r[r.length-1].type)return o;var i=t.match(/^.*\{\s*$/);return i&&(o+=n),o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===i&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(r.prototype),o.inherits(i,r),t.XmlHighlightRules=i}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./css_highlight_rules").CssHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=r.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),u=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(i,"css-","style"),this.embedTagRules(a,"js-","script"),this.constructor===u&&this.normalizeRules()};o.inherits(u,s),t.HtmlHighlightRules=u}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if('"'==i||"'"==i){var s=i,l=r.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),g=c.substring(u.column,u.column+1),d=new a(r,u.row,u.column),m=d.getCurrentToken();if(g==s&&(o(m,"attribute-value")||o(m,"string")))return{text:"",selection:[1,1]};if(m||(m=d.stepBackward()),!m)return;for(;o(m,"tag-whitespace")||o(m,"whitespace");)m=d.stepBackward();var p=!g||g.match(/\s/);if(o(m,"attribute-equals")&&(p||">"==g)||o(m,"decl-attribute-equals")&&(p||"?"==g))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==i||"'"==i)){var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(s==i)return r.end.column++,r}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(">"==i){var s=n.getCursorPosition(),l=new a(r,s.row,s.column),u=l.getCurrentToken()||l.stepBackward();if(!u||!(o(u,"tag-name")||o(u,"tag-whitespace")||o(u,"attribute-name")||o(u,"attribute-equals")||o(u,"attribute-value")))return;if(o(u,"reference.attribute-value"))return;if(o(u,"attribute-value")){var c=u.value.charAt(0);if('"'==c||"'"==c){var g=u.value.charAt(u.value.length-1),d=l.getCurrentTokenColumn()+u.value.length;if(d>s.column||d==s.column&&c!=g)return}}for(;!o(u,"tag-name");)u=l.stepBackward();var m=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn();if(o(l.stepBackward(),"end-tag-open"))return;var h=u.value;if(m==s.row&&(h=h.substring(0,s.column-p)),this.voidElements.hasOwnProperty(h.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,o,r){if("\n"==r){var i=n.getCursorPosition(),s=o.getLine(i.row),l=new a(o,i.row,i.column),u=l.getCurrentToken();if(u&&u.type.indexOf("tag-close")!==-1){for(;u&&u.type.indexOf("tag-name")===-1;)u=l.stepBackward();if(!u)return;var c=u.value,g=l.getCurrentTokenRow();if(u=l.stepBackward(),!u||u.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]){var d=o.getTokenAt(i.row,i.column+1),s=o.getLine(g),m=this.$getIndent(s),p=m+o.getTabString();return d&&"-1}var r=e("../../lib/oop"),i=(e("../../lib/lang"),e("../../range").Range),a=e("./fold_mode").FoldMode,s=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(e,t){a.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(l,a);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var o=this._getFirstTagInLine(e,n);return o?o.closing||!o.tagName&&o.selfClosing?"markbeginend"==t?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,o.tagName,o.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new u,i=0;i"==a.value;break}return r}if(o(a,"tag-close"))return r.selfClosing="/>"==a.value,r;r.start.column+=a.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var i=e.getTokens(t),a=0,s=0;s"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(t&&n.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,n){var o=this._getFirstTagInLine(e,n);if(!o)return null;var r,a=o.closing||o.selfClosing,l=[];if(a)for(var u=new s(e,n,o.end.column),c={row:n,column:o.start.column};r=this._readTagBackward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,i.fromPoints(r.start,r.end)}if(r.closing)l.push(r);else if(this._pop(l,r),0==l.length)return r.start.column+=r.tagName.length+2,i.fromPoints(r.start,c)}else for(var u=new s(e,n,o.start.column),g={row:n,column:o.start.column+o.tagName.length+2};r=this._readTagForward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,i.fromPoints(r.start,r.end)}if(r.closing){if(this._pop(l,r),0==l.length)return i.fromPoints(g,r.start)}else l.push(r)}}}).call(l.prototype)}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./mixed").FoldMode,i=e("./xml").FoldMode,a=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){r.call(this,new i(e,t),{"js-":new a,"css-":new a})};o.inherits(s,r)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}function r(e,t){for(var n=new i(e,t.row,t.column),r=n.getCurrentToken();r&&!o(r,"tag-name");)r=n.stepBackward();if(r)return r.value}var i=e("../token_iterator").TokenIterator,a=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=a.concat(s),u={html:["manifest"],head:[],title:[],base:["href","target"],link:["href","hreflang","rel","media","type","sizes"],meta:["http-equiv","name","content","charset"],style:["type","media","scoped"],script:["charset","type","src","defer","async"],noscript:["href"],body:["onafterprint","onbeforeprint","onbeforeunload","onhashchange","onmessage","onoffline","onpopstate","onredo","onresize","onstorage","onundo","onunload"],section:[],nav:[],article:["pubdate"],aside:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],footer:[],address:[],main:[],p:[],hr:[],pre:[],blockquote:["cite"],ol:["start","reversed"],ul:[],li:["value"],dl:[],dt:[],dd:[],figure:[],figcaption:[],div:[],a:["href","target","ping","rel","media","hreflang","type"],em:[],strong:[],small:[],s:[],cite:[],q:["cite"],dfn:[],abbr:[],data:[],time:["datetime"],code:[],var:[],samp:[],kbd:[],sub:[],sup:[],i:[],b:[],u:[],mark:[],ruby:[],rt:[],rp:[],bdi:[],bdo:[],span:[],br:[],wbr:[],ins:["cite","datetime"],del:["cite","datetime"],img:["alt","src","height","width","usemap","ismap"],iframe:["name","src","height","width","sandbox","seamless"],embed:["src","height","width","type"],object:["param","data","type","height","width","usemap","name","form","classid"],param:["name","value"],video:["src","autobuffer","autoplay","loop","controls","width","height","poster"],audio:["src","autobuffer","autoplay","loop","controls"],source:["src","type","media"],track:["kind","src","srclang","label","default"],canvas:["width","height"],map:["name"],area:["shape","coords","href","hreflang","alt","target","media","rel","ping","type"],svg:[],math:[],table:["summary"],caption:[],colgroup:["span"],col:["span"],tbody:[],thead:[],tfoot:[],tr:[],td:["headers","rowspan","colspan"],th:["headers","rowspan","colspan","scope"],form:["accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],fieldset:["disabled","form","name"],legend:[],label:["form","for"],input:["type","accept","alt","autocomplete","checked","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","multiple","pattern","placeholder","readonly","required","size","src","step","width","files","value"],button:["autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","value","type"],select:["autofocus","disabled","form","multiple","name","size"],datalist:[],optgroup:["disabled","label"],option:["disabled","selected","label","value"],textarea:["autofocus","disabled","form","maxlength","name","placeholder","readonly","required","rows","cols","wrap"],keygen:["autofocus","challenge","disabled","form","keytype","name"],output:["for","form","name"],progress:["value","max"],meter:["value","min","max","low","high","optimum"],details:["open"],summary:[],command:["type","label","icon","disabled","checked","radiogroup","command"],menu:["type","label"],dialog:["open"]},c=Object.keys(u),g=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);return i?o(i,"tag-name")||o(i,"tag-open")||o(i,"end-tag-open")?this.getTagCompletions(e,t,n,r):o(i,"tag-whitespace")||o(i,"attribute-name")?this.getAttributeCompetions(e,t,n,r):[]:[]},this.getTagCompletions=function(e,t,n,o){return c.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompetions=function(e,t,n,o){var i=r(t,n);if(!i)return[];var a=l;return i in u&&(a=a.concat(u[i])),a.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})}}).call(g.prototype),t.HtmlCompletions=g}),define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./text").Mode,a=e("./javascript").Mode,s=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,g=e("./html_completions").HtmlCompletions,d=e("../worker/worker_client").WorkerClient,m=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],p=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],h=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new u,this.$completer=new g,this.createModeDelegates({"js-":a,"css-":s}),this.foldingRules=new c(this.voidElements,r.arrayToMap(p))};o.inherits(h,i),function(){this.blockComment={start:""},this.voidElements=r.arrayToMap(m),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,o){return this.$completer.getCompletions(e,t,n,o)},this.createWorker=function(e){if(this.constructor==h){var t=new d(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(h.prototype),t.Mode=h}),define("ace/mode/soy_template_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./html_highlight_rules").HtmlHighlightRules,i=function(){r.call(this);var e={start:[{include:"#template"},{include:"#if"},{include:"#comment-line"},{include:"#comment-block"},{include:"#comment-doc"},{include:"#call"},{include:"#css"},{include:"#param"},{include:"#print"},{include:"#msg"},{include:"#for"},{include:"#foreach"},{include:"#switch"},{include:"#tag"},{include:"text.html.basic"}],"#call":[{token:["punctuation.definition.tag.begin.soy","meta.tag.call.soy"],regex:"(\\{/?)(\\s*)(?=call|delcall)",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{include:"#string-quoted-single"},{include:"#string-quoted-double"},{token:["entity.name.tag.soy","variable.parameter.soy"],regex:"(call|delcall)(\\s+[\\.\\w]+)"},{token:["entity.other.attribute-name.soy","text","keyword.operator.soy"],regex:"\\b(data)(\\s*)(=)"},{defaultToken:"meta.tag.call.soy"}]}],"#comment-line":[{token:["comment.line.double-slash.soy","punctuation.definition.comment.soy","comment.line.double-slash.soy"],regex:"(\\s+)(//)(.*$)"}],"#comment-block":[{token:"punctuation.definition.comment.begin.soy",regex:"/\\*(?!\\*)",push:[{token:"punctuation.definition.comment.end.soy",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.soy"}]}],"#comment-doc":[{token:"punctuation.definition.comment.begin.soy",regex:"/\\*\\*(?!/)",push:[{token:"punctuation.definition.comment.end.soy",regex:"\\*/",next:"pop"},{token:["support.type.soy","text","variable.parameter.soy"],regex:"(@param|@param\\?)(\\s+)(\\w+)"},{defaultToken:"comment.block.documentation.soy"}]}],"#css":[{token:["punctuation.definition.tag.begin.soy","meta.tag.css.soy","entity.name.tag.soy"],regex:"(\\{/?)(\\s*)(css)\\b",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{token:"support.constant.soy",regex:"\\b(?:LITERAL|REFERENCE|BACKEND_SPECIFIC|GOOG)\\b"},{defaultToken:"meta.tag.css.soy"}]}],"#for":[{token:["punctuation.definition.tag.begin.soy","meta.tag.for.soy","entity.name.tag.soy"],regex:"(\\{/?)(\\s*)(for)\\b",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{token:"keyword.operator.soy",regex:"\\bin\\b"},{token:"support.function.soy",regex:"\\brange\\b"},{include:"#variable"},{include:"#number"},{include:"#primitive"},{defaultToken:"meta.tag.for.soy"}]}],"#foreach":[{token:["punctuation.definition.tag.begin.soy","meta.tag.foreach.soy","entity.name.tag.soy"],regex:"(\\{/?)(\\s*)(foreach)\\b",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{token:"keyword.operator.soy",regex:"\\bin\\b"},{include:"#variable"},{defaultToken:"meta.tag.foreach.soy"}]}],"#function":[{token:"support.function.soy",regex:"\\b(?:isFirst|isLast|index|hasData|length|keys|round|floor|ceiling|min|max|randomInt)\\b"}],"#if":[{token:["punctuation.definition.tag.begin.soy","meta.tag.if.soy","entity.name.tag.soy"],regex:"(\\{/?)(\\s*)(if|elseif)\\b",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{include:"#variable"},{include:"#operator"},{include:"#function"},{include:"#string-quoted-single"},{include:"#string-quoted-double"},{defaultToken:"meta.tag.if.soy"}]}],"#namespace":[{token:["entity.name.tag.soy","text","variable.parameter.soy"],regex:"(namespace|delpackage)(\\s+)([\\w\\.]+)"}],"#number":[{token:"constant.numeric",regex:"[\\d]+"}],"#operator":[{token:"keyword.operator.soy",regex:"==|!=|\\band\\b|\\bor\\b|\\bnot\\b|-|\\+|/|\\?:"}],"#param":[{token:["punctuation.definition.tag.begin.soy","meta.tag.param.soy","entity.name.tag.soy"],regex:"(\\{/?)(\\s*)(param)",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{include:"#variable"},{token:["entity.other.attribute-name.soy","text","keyword.operator.soy"],regex:"\\b([\\w]+)(\\s*)((?::)?)"},{defaultToken:"meta.tag.param.soy"}]}],"#primitive":[{token:"constant.language.soy",regex:"\\b(?:null|false|true)\\b"}],"#msg":[{token:["punctuation.definition.tag.begin.soy","meta.tag.msg.soy","entity.name.tag.soy"],regex:"(\\{/?)(\\s*)(msg)\\b",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{include:"#string-quoted-single"},{include:"#string-quoted-double"},{token:["entity.other.attribute-name.soy","text","keyword.operator.soy"],regex:"\\b(meaning|desc)(\\s*)(=)"},{defaultToken:"meta.tag.msg.soy"}]}],"#print":[{token:["punctuation.definition.tag.begin.soy","meta.tag.print.soy","entity.name.tag.soy"],regex:"(\\{/?)(\\s*)(print)\\b",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{include:"#variable"},{include:"#print-parameter"},{include:"#number"},{include:"#primitive"},{include:"#attribute-lookup"},{defaultToken:"meta.tag.print.soy"}]}],"#print-parameter":[{token:"keyword.operator.soy",regex:"\\|"},{token:"variable.parameter.soy",regex:"noAutoescape|id|escapeHtml|escapeJs|insertWorkBreaks|truncate"}],"#special-character":[{token:"support.constant.soy",regex:"\\bsp\\b|\\bnil\\b|\\\\r|\\\\n|\\\\t|\\blb\\b|\\brb\\b"}],"#string-quoted-double":[{token:"string.quoted.double",regex:'"[^"]*"'}],"#string-quoted-single":[{token:"string.quoted.single",regex:"'[^']*'"}],"#switch":[{token:["punctuation.definition.tag.begin.soy","meta.tag.switch.soy","entity.name.tag.soy"],regex:"(\\{/?)(\\s*)(switch|case)\\b",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{include:"#variable"},{include:"#function"},{include:"#number"},{include:"#string-quoted-single"},{include:"#string-quoted-double"},{defaultToken:"meta.tag.switch.soy"}]}],"#attribute-lookup":[{token:"punctuation.definition.attribute-lookup.begin.soy",regex:"\\[",push:[{token:"punctuation.definition.attribute-lookup.end.soy",regex:"\\]",next:"pop"},{include:"#variable"},{include:"#function"},{include:"#operator"},{include:"#number"},{include:"#primitive"},{include:"#string-quoted-single"},{include:"#string-quoted-double"}]}],"#tag":[{token:"punctuation.definition.tag.begin.soy",regex:"\\{",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{include:"#namespace"},{include:"#variable"},{include:"#special-character"},{include:"#tag-simple"},{include:"#function"},{include:"#operator"},{include:"#attribute-lookup"},{include:"#number"},{include:"#primitive"},{include:"#print-parameter"}]}],"#tag-simple":[{token:"entity.name.tag.soy",regex:"{{\\s*(?:literal|else|ifempty|default)\\s*(?=\\})"}],"#template":[{token:["punctuation.definition.tag.begin.soy","meta.tag.template.soy"],regex:"(\\{/?)(\\s*)(?=template|deltemplate)",push:[{token:"punctuation.definition.tag.end.soy",regex:"\\}",next:"pop"},{token:["entity.name.tag.soy","text","entity.name.function.soy"],regex:"(template|deltemplate)(\\s+)([\\.\\w]+)",originalRegex:"(?<=template|deltemplate)\\s+([\\.\\w]+)"},{token:["entity.other.attribute-name.soy","text","keyword.operator.soy","text","string.quoted.double.soy"],regex:'\\b(private)(\\s*)(=)(\\s*)("true"|"false")'},{token:["entity.other.attribute-name.soy","text","keyword.operator.soy","text","string.quoted.single.soy"],regex:"\\b(private)(\\s*)(=)(\\s*)('true'|'false')"},{token:["entity.other.attribute-name.soy","text","keyword.operator.soy","text","string.quoted.double.soy"],regex:'\\b(autoescape)(\\s*)(=)(\\s*)("true"|"false"|"contextual")'},{token:["entity.other.attribute-name.soy","text","keyword.operator.soy","text","string.quoted.single.soy"],regex:"\\b(autoescape)(\\s*)(=)(\\s*)('true'|'false'|'contextual')"},{defaultToken:"meta.tag.template.soy"}]}],"#variable":[{token:"variable.other.soy",regex:"\\$[\\w\\.]+"}]};for(var t in e)this.$rules[t]?this.$rules[t].unshift.call(this.$rules[t],e[t]):this.$rules[t]=e[t];this.normalizeRules()};i.metaData={comment:"SoyTemplate",fileTypes:["soy"],firstLineMatch:"\\{\\s*namespace\\b",foldingStartMarker:"\\{\\s*template\\s+[^\\}]*\\}",foldingStopMarker:"\\{\\s*/\\s*template\\s*\\}",name:"SoyTemplate",scopeName:"source.soy"},o.inherits(i,r),t.SoyTemplateHighlightRules=i}),define("ace/mode/soy_template",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/soy_template_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./html").Mode,i=e("./soy_template_highlight_rules").SoyTemplateHighlightRules,a=function(){r.call(this),this.HighlightRules=i};o.inherits(a,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/soy_template"}.call(a.prototype),t.Mode=a}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-space.js b/www/js/vendor/ace/mode-space.js index 2d649b7b9..316ac4e97 100755 --- a/www/js/vendor/ace/mode-space.js +++ b/www/js/vendor/ace/mode-space.js @@ -1,159 +1 @@ -define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/space_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var SpaceHighlightRules = function() { - this.$rules = { - "start" : [ - { - token : "empty_line", - regex : / */, - next : "key" - }, - { - token : "empty_line", - regex : /$/, - next : "key" - } - ], - "key" : [ - { - token : "variable", - regex : /\S+/ - }, - { - token : "empty_line", - regex : /$/, - next : "start" - },{ - token : "keyword.operator", - regex : / /, - next : "value" - } - ], - "value" : [ - { - token : "keyword.operator", - regex : /$/, - next : "start" - }, - { - token : "string", - regex : /[^$]/ - } - ] - }; - -}; - -oop.inherits(SpaceHighlightRules, TextHighlightRules); - -exports.SpaceHighlightRules = SpaceHighlightRules; -}); - -define("ace/mode/space",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/folding/coffee","ace/mode/space_highlight_rules"], function(require, exports, module) { -"use strict"; -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var FoldMode = require("./folding/coffee").FoldMode; -var SpaceHighlightRules = require("./space_highlight_rules").SpaceHighlightRules; -var Mode = function() { - this.HighlightRules = SpaceHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); -(function() { - - this.$id = "ace/mode/space"; -}).call(Mode.prototype); -exports.Mode = Mode; -}); +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,i){"use strict";var o=e("../../lib/oop"),r=e("./fold_mode").FoldMode,n=e("../../range").Range,l=t.FoldMode=function(){};o.inherits(l,r),function(){this.getFoldWidgetRange=function(e,t,i){var o=this.indentationBlock(e,i);if(o)return o;var r=/\S/,l=e.getLine(i),s=l.search(r);if(s!=-1&&"#"==l[s]){for(var a=l.length,g=e.getLength(),d=i,c=i;++id){var h=e.getLine(c).length;return new n(d,a,c,h)}}},this.getFoldWidget=function(e,t,i){var o=e.getLine(i),r=o.search(/\S/),n=e.getLine(i+1),l=e.getLine(i-1),s=l.search(/\S/),a=n.search(/\S/);if(r==-1)return e.foldWidgets[i-1]=s!=-1&&s|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" - }, { - token : "paren.lparen", - regex : "[\\(]" - }, { - token : "paren.rparen", - regex : "[\\)]" - }, { - token : "text", - regex : "\\s+" - } ] - }; - this.normalizeRules(); -}; - -oop.inherits(SqlHighlightRules, TextHighlightRules); - -exports.SqlHighlightRules = SqlHighlightRules; -}); - -define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var SqlHighlightRules = require("./sql_highlight_rules").SqlHighlightRules; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = SqlHighlightRules; -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "--"; - - this.$id = "ace/mode/sql"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){var e="select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|when|else|end|type|left|right|join|on|outer|desc|asc|union",t="true|false|null",r="count|min|max|avg|sum|rank|now|coalesce",n=this.createKeywordMapper({"support.function":r,keyword:e,"constant.language":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:n,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};n.inherits(i,o),t.SqlHighlightRules=i}),define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules","ace/range"],function(e,t,r){"use strict";var n=e("../lib/oop"),o=e("./text").Mode,i=e("./sql_highlight_rules").SqlHighlightRules,s=(e("../range").Range,function(){this.HighlightRules=i});n.inherits(s,o),function(){this.lineCommentStart="--",this.$id="ace/mode/sql"}.call(s.prototype),t.Mode=s}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-stylus.js b/www/js/vendor/ace/mode-stylus.js index 25985cc13..30eb727ce 100755 --- a/www/js/vendor/ace/mode-stylus.js +++ b/www/js/vendor/ace/mode-stylus.js @@ -1,414 +1 @@ -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/stylus_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var CssHighlightRules = require("./css_highlight_rules"); - -var StylusHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.type": CssHighlightRules.supportType, - "support.function": CssHighlightRules.supportFunction, - "support.constant": CssHighlightRules.supportConstant, - "support.constant.color": CssHighlightRules.supportConstantColor, - "support.constant.fonts": CssHighlightRules.supportConstantFonts - }, "text", true); - - this.$rules = { - start: [ - { - token : "comment", - regex : /\/\/.*$/ - }, - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, - { - token: ["entity.name.function.stylus", "text"], - regex: "^([-a-zA-Z_][-\\w]*)?(\\()" - }, - { - token: ["entity.other.attribute-name.class.stylus"], - regex: "\\.-?[_a-zA-Z]+[_a-zA-Z0-9-]*" - }, - { - token: ["entity.language.stylus"], - regex: "^ *&" - }, - { - token: ["variable.language.stylus"], - regex: "(arguments)" - }, - { - token: ["keyword.stylus"], - regex: "@[-\\w]+" - }, - { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : CssHighlightRules.pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : CssHighlightRules.pseudoClasses - }, - { - token: ["entity.name.tag.stylus"], - regex: "(?:\\b)(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(?:h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)(?:\\b)" - }, - { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, - { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, - { - token: ["punctuation.definition.entity.stylus", "entity.other.attribute-name.id.stylus"], - regex: "(#)([a-zA-Z][a-zA-Z0-9_-]*)" - }, - { - token: "meta.vendor-prefix.stylus", - regex: "-webkit-|-moz\\-|-ms-|-o-" - }, - { - token: "keyword.control.stylus", - regex: "(?:!important|for|in|return|true|false|null|if|else|unless|return)\\b" - }, - { - token: "keyword.operator.stylus", - regex: "!|~|\\+|-|(?:\\*)?\\*|\\/|%|(?:\\.)\\.\\.|<|>|(?:=|:|\\?|\\+|-|\\*|\\/|%|<|>)?=|!=" - }, - { - token: "keyword.operator.stylus", - regex: "(?:in|is(?:nt)?|not)\\b" - }, - { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, - { - token : "constant.numeric", - regex : CssHighlightRules.numRe - }, - { - token : "keyword", - regex : "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\\b" - }, - { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : ".*?\\*\\/", - next : "start" - }, { - token : "comment", // comment spanning whole line - regex : ".+" - } - ], - "qqstring" : [ - { - token : "string", - regex : '[^"\\\\]+' - }, - { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, - { - token : "string", - regex : '"|$', - next : "start" - } - ], - "qstring" : [ - { - token : "string", - regex : "[^'\\\\]+" - }, - { - token : "string", - regex : "\\\\$", - next : "qstring" - }, - { - token : "string", - regex : "'|$", - next : "start" - } - ] -} - -}; - -oop.inherits(StylusHighlightRules, TextHighlightRules); - -exports.StylusHighlightRules = StylusHighlightRules; -}); - -define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/stylus",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/stylus_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var StylusHighlightRules = require("./stylus_highlight_rules").StylusHighlightRules; -var FoldMode = require("./folding/coffee").FoldMode; - -var Mode = function() { - this.HighlightRules = StylusHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.$id = "ace/mode/stylus"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,o){"use strict";var r=e("../lib/oop"),i=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),n=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",c=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",d=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",u=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",g=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",p=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":s,"support.type":n,"support.constant.color":l,"support.constant.fonts":c},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+d+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:d},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:u},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:g},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};r.inherits(p,i),t.CssHighlightRules=p}),define("ace/mode/stylus_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"],function(e,t,o){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,n=e("./css_highlight_rules"),a=function(){var e=this.createKeywordMapper({"support.type":n.supportType,"support.function":n.supportFunction,"support.constant":n.supportConstant,"support.constant.color":n.supportConstantColor,"support.constant.fonts":n.supportConstantFonts},"text",!0);this.$rules={start:[{token:"comment",regex:/\/\/.*$/},{token:"comment",regex:/\/\*/,next:"comment"},{token:["entity.name.function.stylus","text"],regex:"^([-a-zA-Z_][-\\w]*)?(\\()"},{token:["entity.other.attribute-name.class.stylus"],regex:"\\.-?[_a-zA-Z]+[_a-zA-Z0-9-]*"},{token:["entity.language.stylus"],regex:"^ *&"},{token:["variable.language.stylus"],regex:"(arguments)"},{token:["keyword.stylus"],regex:"@[-\\w]+"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:n.pseudoElements},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:n.pseudoClasses},{token:["entity.name.tag.stylus"],regex:"(?:\\b)(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(?:h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)(?:\\b)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation.definition.entity.stylus","entity.other.attribute-name.id.stylus"],regex:"(#)([a-zA-Z][a-zA-Z0-9_-]*)"},{token:"meta.vendor-prefix.stylus",regex:"-webkit-|-moz\\-|-ms-|-o-"},{token:"keyword.control.stylus",regex:"(?:!important|for|in|return|true|false|null|if|else|unless|return)\\b"},{token:"keyword.operator.stylus",regex:"!|~|\\+|-|(?:\\*)?\\*|\\/|%|(?:\\.)\\.\\.|<|>|(?:=|:|\\?|\\+|-|\\*|\\/|%|<|>)?=|!="},{token:"keyword.operator.stylus",regex:"(?:in|is(?:nt)?|not)\\b"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:n.numRe},{token:"keyword",regex:"(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\\b"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",regex:".+"}],qqstring:[{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"start"}],qstring:[{token:"string",regex:"[^'\\\\]+"},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"start"}]}};r.inherits(a,i),t.StylusHighlightRules=a}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,o){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,n=e("../../range").Range,a=t.FoldMode=function(){};r.inherits(a,i),function(){this.getFoldWidgetRange=function(e,t,o){var r=this.indentationBlock(e,o);if(r)return r;var i=/\S/,a=e.getLine(o),s=a.search(i);if(s!=-1&&"#"==a[s]){for(var l=a.length,c=e.getLength(),d=o,u=o;++od){var p=e.getLine(u).length;return new n(d,l,u,p)}}},this.getFoldWidget=function(e,t,o){var r=e.getLine(o),i=r.search(/\S/),n=e.getLine(o+1),a=e.getLine(o-1),s=a.search(/\S/),l=n.search(/\S/);if(i==-1)return e.foldWidgets[o-1]=s!=-1&&s", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === " -1; -} - -(function() { - - this.getFoldWidget = function(session, foldStyle, row) { - var tag = this._getFirstTagInLine(session, row); - - if (!tag) - return ""; - - if (tag.closing || (!tag.tagName && tag.selfClosing)) - return foldStyle == "markbeginend" ? "end" : ""; - - if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) - return ""; - - if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) - return ""; - - return "start"; - }; - this._getFirstTagInLine = function(session, row) { - var tokens = session.getTokens(row); - var tag = new Tag(); - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (is(token, "tag-open")) { - tag.end.column = tag.start.column + token.value.length; - tag.closing = is(token, "end-tag-open"); - token = tokens[++i]; - if (!token) - return null; - tag.tagName = token.value; - tag.end.column += token.value.length; - for (i++; i < tokens.length; i++) { - token = tokens[i]; - tag.end.column += token.value.length; - if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - break; - } - } - return tag; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - return tag; - } - tag.start.column += token.value.length; - } - - return null; - }; - - this._findEndTagInLine = function(session, row, tagName, startColumn) { - var tokens = session.getTokens(row); - var column = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - column += token.value.length; - if (column < startColumn) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var firstTag = this._getFirstTagInLine(session, row); - - if (!firstTag) - return null; - - var isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextMode = require("./text").Mode; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; -var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; -var XmlFoldMode = require("./folding/xml").FoldMode; - -var Mode = function() { - this.HighlightRules = XmlHighlightRules; - this.$behaviour = new XmlBehaviour(); - this.foldingRules = new XmlFoldMode(); -}; - -oop.inherits(Mode, TextMode); - -(function() { - - this.voidElements = lang.arrayToMap([]); - - this.blockComment = {start: ""}; - - this.$id = "ace/mode/xml"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/svg_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var SvgHighlightRules = function() { - XmlHighlightRules.call(this); - - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - this.normalizeRules(); -}; - -oop.inherits(SvgHighlightRules, XmlHighlightRules); - -exports.SvgHighlightRules = SvgHighlightRules; -}); - -define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(defaultMode, subModes) { - this.defaultMode = defaultMode; - this.subModes = subModes; -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - - this.$getMode = function(state) { - if (typeof state != "string") - state = state[0]; - for (var key in this.subModes) { - if (state.indexOf(key) === 0) - return this.subModes[key]; - } - return null; - }; - - this.$tryMode = function(state, session, foldStyle, row) { - var mode = this.$getMode(state); - return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); - }; - - this.getFoldWidget = function(session, foldStyle, row) { - return ( - this.$tryMode(session.getState(row-1), session, foldStyle, row) || - this.$tryMode(session.getState(row), session, foldStyle, row) || - this.defaultMode.getFoldWidget(session, foldStyle, row) - ); - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var mode = this.$getMode(session.getState(row-1)); - - if (!mode || !mode.getFoldWidget(session, foldStyle, row)) - mode = this.$getMode(session.getState(row)); - - if (!mode || !mode.getFoldWidget(session, foldStyle, row)) - mode = this.defaultMode; - - return mode.getFoldWidgetRange(session, foldStyle, row); - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/svg",["require","exports","module","ace/lib/oop","ace/mode/xml","ace/mode/javascript","ace/mode/svg_highlight_rules","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var XmlMode = require("./xml").Mode; -var JavaScriptMode = require("./javascript").Mode; -var SvgHighlightRules = require("./svg_highlight_rules").SvgHighlightRules; -var MixedFoldMode = require("./folding/mixed").FoldMode; -var XmlFoldMode = require("./folding/xml").FoldMode; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - XmlMode.call(this); - - this.HighlightRules = SvgHighlightRules; - - this.createModeDelegates({ - "js-": JavaScriptMode - }); - - this.foldingRules = new MixedFoldMode(new XmlFoldMode(), { - "js-": new CStyleFoldMode() - }); -}; - -oop.inherits(Mode, XmlMode); - -(function() { - - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - - this.$id = "ace/mode/svg"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===i&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(o.prototype),r.inherits(i,o),t.XmlHighlightRules=i}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function r(e,t){return e.type.lastIndexOf(t+".xml")>-1}var o=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,o,i){if('"'==i||"'"==i){var s=i,l=o.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var u=n.getCursorPosition(),g=o.doc.getLine(u.row),c=g.substring(u.column,u.column+1),d=new a(o,u.row,u.column),m=d.getCurrentToken();if(c==s&&(r(m,"attribute-value")||r(m,"string")))return{text:"",selection:[1,1]};if(m||(m=d.stepBackward()),!m)return;for(;r(m,"tag-whitespace")||r(m,"whitespace");)m=d.stepBackward();var h=!c||c.match(/\s/);if(r(m,"attribute-equals")&&(h||">"==c)||r(m,"decl-attribute-equals")&&(h||"?"==c))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(s==i)return o.end.column++,o}}),this.add("autoclosing","insertion",function(e,t,n,o,i){if(">"==i){var s=n.getCursorPosition(),l=new a(o,s.row,s.column),u=l.getCurrentToken()||l.stepBackward();if(!u||!(r(u,"tag-name")||r(u,"tag-whitespace")||r(u,"attribute-name")||r(u,"attribute-equals")||r(u,"attribute-value")))return;if(r(u,"reference.attribute-value"))return;if(r(u,"attribute-value")){var g=u.value.charAt(0);if('"'==g||"'"==g){var c=u.value.charAt(u.value.length-1),d=l.getCurrentTokenColumn()+u.value.length;if(d>s.column||d==s.column&&g!=c)return}}for(;!r(u,"tag-name");)u=l.stepBackward();var m=l.getCurrentTokenRow(),h=l.getCurrentTokenColumn();if(r(l.stepBackward(),"end-tag-open"))return;var x=u.value;if(m==s.row&&(x=x.substring(0,s.column-h)),this.voidElements.hasOwnProperty(x.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,o){if("\n"==o){var i=n.getCursorPosition(),s=r.getLine(i.row),l=new a(r,i.row,i.column),u=l.getCurrentToken();if(u&&u.type.indexOf("tag-close")!==-1){for(;u&&u.type.indexOf("tag-name")===-1;)u=l.stepBackward();if(!u)return;var g=u.value,c=l.getCurrentTokenRow();if(u=l.stepBackward(),!u||u.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[g]){var d=r.getTokenAt(i.row,i.column+1),s=r.getLine(c),m=this.$getIndent(s),h=m+r.getTabString();return d&&"-1}var o=e("../../lib/oop"),i=(e("../../lib/lang"),e("../../range").Range),a=e("./fold_mode").FoldMode,s=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(e,t){a.call(this),this.voidElements=e||{},this.optionalEndTags=o.mixin({},this.voidElements),t&&o.mixin(this.optionalEndTags,t)};o.inherits(l,a);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?"markbeginend"==t?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),o=new u,i=0;i"==a.value;break}return o}if(r(a,"tag-close"))return o.selfClosing="/>"==a.value,o;o.start.column+=a.value.length}return null},this._findEndTagInLine=function(e,t,n,o){for(var i=e.getTokens(t),a=0,s=0;s"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(t&&n.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,n){var r=this._getFirstTagInLine(e,n);if(!r)return null;var o,a=r.closing||r.selfClosing,l=[];if(a)for(var u=new s(e,n,r.end.column),g={row:n,column:r.start.column};o=this._readTagBackward(u);){if(o.selfClosing){if(l.length)continue;return o.start.column+=o.tagName.length+2,o.end.column-=2,i.fromPoints(o.start,o.end)}if(o.closing)l.push(o);else if(this._pop(l,o),0==l.length)return o.start.column+=o.tagName.length+2,i.fromPoints(o.start,g)}else for(var u=new s(e,n,r.start.column),c={row:n,column:r.start.column+r.tagName.length+2};o=this._readTagForward(u);){if(o.selfClosing){if(l.length)continue;return o.start.column+=o.tagName.length+2,o.end.column-=2,i.fromPoints(o.start,o.end)}if(o.closing){if(this._pop(l,o),0==l.length)return i.fromPoints(c,o.start)}else l.push(o)}}}).call(l.prototype)}),define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("../lib/lang"),i=e("./text").Mode,a=e("./xml_highlight_rules").XmlHighlightRules,s=e("./behaviour/xml").XmlBehaviour,l=e("./folding/xml").FoldMode,u=function(){this.HighlightRules=a,this.$behaviour=new s,this.foldingRules=new l};r.inherits(u,i),function(){this.voidElements=o.arrayToMap([]),this.blockComment={start:""},this.$id="ace/mode/xml"}.call(u.prototype),t.Mode=u}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(i,o),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+r+")(\\.)(prototype)(\\.)("+r+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:r},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(a,i),t.JavaScriptHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],g={},c=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,g.rangeCount!=e.multiSelect.rangeCount&&(g={rangeCount:e.multiSelect.rangeCount})),g[t]?r=g[t]:void(r=g[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,i){var a=n.getCursorPosition(),l=o.doc.getLine(a.row);if("{"==i){c(n);var u=n.getSelectionRange(),g=o.doc.getTextRange(u);if(""!==g&&"{"!==g&&n.getWrapBehavioursEnabled())return{text:"{"+g+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==i){c(n);var m=l.substring(a.column,a.column+1);if("}"==m){var h=o.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==h&&d.isAutoInsertedClosing(a,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){c(n);var x="";d.isMaybeInsertedClosing(a,l)&&(x=s.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=l.substring(a.column,a.column+1);if("}"===m){var p=o.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!p)return null;var f=this.$getIndent(o.getLine(p.row))}else{if(!x)return void d.clearMaybeInsertedClosing();var f=this.$getIndent(l)}var k=f+o.getTabString();return{text:"\n"+k+"\n"+f+x,selection:[1,k.length,1,k.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,i){var a=o.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){c(n);var s=o.doc.getLine(i.start.row),l=s.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){c(n);var i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){c(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var g=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==g&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==i){c(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){c(n);var i=n.getSelectionRange(),a=r.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){c(n);var s=n.getCursorPosition(),l=r.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var g=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==g&&d.isAutoInsertedClosing(s,l,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==i){c(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){c(n);var i=o,a=n.getSelectionRange(),s=r.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var l=n.getCursorPosition(),u=r.doc.getLine(l.row),g=u.substring(l.column-1,l.column),d=u.substring(l.column,l.column+1),m=r.getTokenAt(l.row,l.column),h=r.getTokenAt(l.row,l.column+1);if("\\"==g&&m&&/escape/.test(m.type))return null;var x,p=m&&/string/.test(m.type),f=!h||/string/.test(h.type);if(d==i)x=p!==f;else{if(p&&!f)return null;if(p&&f)return null;var k=r.$mode.tokenRe;k.lastIndex=0;var v=k.test(g);k.lastIndex=0;var b=k.test(g);if(v||b)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;x=!0}return{text:x?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var i=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==i||"'"==i)){c(n);var a=r.doc.getLine(o.start.row),s=a.substring(o.start.column+1,o.start.column+2);if(s==i)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new a(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",l)){var o=new a(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",u)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,i,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+i.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),i=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,i)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=i.substr(0,o.column)+n,r.maybeInsertedLineEnd=i.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var i=o.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=o.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),i=t,a=n.length;t+=1;for(var s=t,l=e.getLength();++tu)break;var g=this.getFoldWidgetRange(e,"all",t);if(g){if(g.start.row<=i)break; +if(g.isMultiLine())t=g.end.row;else if(r==u)break}s=t}}return new o(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++na)return new o(a,r,g,t.length)}}.call(a.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,g=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};r.inherits(g,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),i=o.tokens,a=o.state;if(i.length&&"comment"==i[i.length-1].type)return r;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(r+=n)}else if("doc-start"==e){if("start"==a||"no_regex"==a)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(g.prototype),t.Mode=g}),define("ace/mode/svg_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./xml_highlight_rules").XmlHighlightRules,a=function(){i.call(this),this.embedTagRules(o,"js-","script"),this.normalizeRules()};r.inherits(a,i),t.SvgHighlightRules=a}),define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("./fold_mode").FoldMode,i=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};r.inherits(i,o),function(){this.$getMode=function(e){"string"!=typeof e&&(e=e[0]);for(var t in this.subModes)if(0===e.indexOf(t))return this.subModes[t];return null},this.$tryMode=function(e,t,n,r){var o=this.$getMode(e);return o?o.getFoldWidget(t,n,r):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var r=this.$getMode(e.getState(n-1));return r&&r.getFoldWidget(e,t,n)||(r=this.$getMode(e.getState(n))),r&&r.getFoldWidget(e,t,n)||(r=this.defaultMode),r.getFoldWidgetRange(e,t,n)}}.call(i.prototype)}),define("ace/mode/svg",["require","exports","module","ace/lib/oop","ace/mode/xml","ace/mode/javascript","ace/mode/svg_highlight_rules","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./xml").Mode,i=e("./javascript").Mode,a=e("./svg_highlight_rules").SvgHighlightRules,s=e("./folding/mixed").FoldMode,l=e("./folding/xml").FoldMode,u=e("./folding/cstyle").FoldMode,g=function(){o.call(this),this.HighlightRules=a,this.createModeDelegates({"js-":i}),this.foldingRules=new s(new l,{"js-":new u})};r.inherits(g,o),function(){this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.$id="ace/mode/svg"}.call(g.prototype),t.Mode=g}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-tcl.js b/www/js/vendor/ace/mode-tcl.js index 3e7425269..d0d461ba6 100755 --- a/www/js/vendor/ace/mode-tcl.js +++ b/www/js/vendor/ace/mode-tcl.js @@ -1,376 +1 @@ -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/tcl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var TclHighlightRules = function() { - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "#.*\\\\$", - next : "commentfollow" - }, { - token : "comment", - regex : "#.*$" - }, { - token : "support.function", - regex : '[\\\\]$', - next : "splitlineStart" - }, { - token : "text", - regex : '[\\\\](?:["]|[{]|[}]|[[]|[]]|[$]|[\])' - }, { - token : "text", // last value before command - regex : '^|[^{][;][^}]|[/\r/]', - next : "commandItem" - }, { - token : "string", // single line - regex : '[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // multi line """ string start - regex : '[ ]*["]', - next : "qqstring" - }, { - token : "variable.instance", - regex : "[$]", - next : "variable" - }, { - token : "support.function", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|{\\*}|;|::" - }, { - token : "identifier", - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "paren.lparen", - regex : "[[{]", - next : "commandItem" - }, { - token : "paren.lparen", - regex : "[(]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "commandItem" : [ - { - token : "comment", - regex : "#.*\\\\$", - next : "commentfollow" - }, { - token : "comment", - regex : "#.*$", - next : "start" - }, { - token : "string", // single line - regex : '[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "variable.instance", - regex : "[$]", - next : "variable" - }, { - token : "support.function", - regex : "(?:[:][:])[a-zA-Z0-9_/]+(?:[:][:])", - next : "commandItem" - }, { - token : "support.function", - regex : "[a-zA-Z0-9_/]+(?:[:][:])", - next : "commandItem" - }, { - token : "support.function", - regex : "(?:[:][:])", - next : "commandItem" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "support.function", - regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|{\\*}|;|::" - }, { - token : "keyword", - regex : "[a-zA-Z0-9_/]+", - next : "start" - } ], - "commentfollow" : [ - { - token : "comment", - regex : ".*\\\\$", - next : "commentfollow" - }, { - token : "comment", - regex : '.+', - next : "start" - } ], - "splitlineStart" : [ - { - token : "text", - regex : "^.", - next : "start" - }], - "variable" : [ - { - token : "variable.instance", // variable tcl - regex : "[a-zA-Z_\\d]+(?:[(][a-zA-Z_\\d]+[)])?", - next : "start" - }, { - token : "variable.instance", // variable tcl with braces - regex : "{?[a-zA-Z_\\d]+}?", - next : "start" - }], - "qqstring" : [ { - token : "string", // multi line """ string end - regex : '(?:[^\\\\]|\\\\.)*?["]', - next : "start" - }, { - token : "string", - regex : '.+' - } ] - }; -}; - -oop.inherits(TclHighlightRules, TextHighlightRules); - -exports.TclHighlightRules = TclHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/tcl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/folding/cstyle","ace/mode/tcl_highlight_rules","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; -var TclHighlightRules = require("./tcl_highlight_rules").TclHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = TclHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "#"; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/tcl"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(a,o),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var i=this._getFoldWidgetBase(e,t,n);return!i&&this.startRegionRe.test(r)?"start":i},this.getFoldWidgetRange=function(e,t,n,r){var i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);var o=i.match(this.foldingStartMarker);if(o){var a=o.index;if(o[1])return this.openingBracketBlock(e,o[1],n,a);var g=e.getCommentFoldRange(n,a+o[0].length,1);return g&&!g.isMultiLine()&&(r?g=this.getSectionRange(e,n):"all"!=t&&(g=null)),g}if("markbegin"!==t){var o=i.match(this.foldingStopMarker);if(o){var a=o.index+o[0].length;return o[1]?this.closingBracketBlock(e,o[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),o=t,a=n.length;t+=1;for(var g=t,s=e.getLength();++tc)break;var l=this.getFoldWidgetRange(e,"all",t);if(l){if(l.start.row<=o)break;if(l.isMultiLine())t=l.end.row;else if(r==c)break}g=t}}return new i(o,a,g,e.getLine(g).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),o=e.getLength(),a=n,g=/^\s*(?:\/\*|\/\/)#(end)?region\b/,s=1;++na)return new i(a,r,l,t.length)}}.call(a.prototype)}),define("ace/mode/tcl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment",regex:"#.*\\\\$",next:"commentfollow"},{token:"comment",regex:"#.*$"},{token:"support.function",regex:"[\\\\]$",next:"splitlineStart"},{token:"text",regex:'[\\\\](?:["]|[{]|[}]|[[]|[]]|[$]|[])'},{token:"text",regex:"^|[^{][;][^}]|[/\r/]",next:"commandItem"},{token:"string",regex:'[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'[ ]*["]',next:"qqstring"},{token:"variable.instance",regex:"[$]",next:"variable"},{token:"support.function",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|{\\*}|;|::"},{token:"identifier",regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"paren.lparen",regex:"[[{]",next:"commandItem"},{token:"paren.lparen",regex:"[(]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],commandItem:[{token:"comment",regex:"#.*\\\\$",next:"commentfollow"},{token:"comment",regex:"#.*$",next:"start"},{token:"string",regex:'[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"variable.instance",regex:"[$]",next:"variable"},{token:"support.function",regex:"(?:[:][:])[a-zA-Z0-9_/]+(?:[:][:])",next:"commandItem"},{token:"support.function",regex:"[a-zA-Z0-9_/]+(?:[:][:])",next:"commandItem"},{token:"support.function",regex:"(?:[:][:])",next:"commandItem"},{token:"paren.rparen",regex:"[\\])}]"},{token:"support.function",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|{\\*}|;|::"},{token:"keyword",regex:"[a-zA-Z0-9_/]+",next:"start"}],commentfollow:[{token:"comment",regex:".*\\\\$",next:"commentfollow"},{token:"comment",regex:".+",next:"start"}],splitlineStart:[{token:"text",regex:"^.",next:"start"}],variable:[{token:"variable.instance",regex:"[a-zA-Z_\\d]+(?:[(][a-zA-Z_\\d]+[)])?",next:"start"},{token:"variable.instance",regex:"{?[a-zA-Z_\\d]+}?",next:"start"}],qqstring:[{token:"string",regex:'(?:[^\\\\]|\\\\.)*?["]',next:"start"},{token:"string",regex:".+"}]}};r.inherits(o,i),t.TclHighlightRules=o}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var o=i[1].length,a=e.findMatchingBracket({row:t,column:o});if(!a||a.row==t)return 0;var g=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,o-1),g)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/tcl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/folding/cstyle","ace/mode/tcl_highlight_rules","ace/mode/matching_brace_outdent","ace/range"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,o=e("./folding/cstyle").FoldMode,a=e("./tcl_highlight_rules").TclHighlightRules,g=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,function(){this.HighlightRules=a,this.$outdent=new g,this.foldingRules=new o});r.inherits(s,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),i=this.getTokenizer().getLineTokens(t,e),o=i.tokens;if(o.length&&"comment"==o[o.length-1].type)return r;if("start"==e){var a=t.match(/^.*[\{\(\[]\s*$/);a&&(r+=n)}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/tcl"}.call(s.prototype),t.Mode=s}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-tex.js b/www/js/vendor/ace/mode-tex.js index 295bebcda..ae1cd54d9 100755 --- a/www/js/vendor/ace/mode-tex.js +++ b/www/js/vendor/ace/mode-tex.js @@ -1,150 +1 @@ -define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var TexHighlightRules = function(textClass) { - - if (!textClass) - textClass = "text"; - - this.$rules = { - "start" : [ - { - token : "comment", - regex : "%.*$" - }, { - token : textClass, // non-command - regex : "\\\\[$&%#\\{\\}]" - }, { - token : "keyword", // command - regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b", - next : "nospell" - }, { - token : "keyword", // command - regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])" - }, { - token : "paren.keyword.operator", - regex : "[[({]" - }, { - token : "paren.keyword.operator", - regex : "[\\])}]" - }, { - token : textClass, - regex : "\\s+" - } - ], - "nospell" : [ - { - token : "comment", - regex : "%.*$", - next : "start" - }, { - token : "nospell." + textClass, // non-command - regex : "\\\\[$&%#\\{\\}]" - }, { - token : "keyword", // command - regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b" - }, { - token : "keyword", // command - regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])", - next : "start" - }, { - token : "paren.keyword.operator", - regex : "[[({]" - }, { - token : "paren.keyword.operator", - regex : "[\\])]" - }, { - token : "paren.keyword.operator", - regex : "}", - next : "start" - }, { - token : "nospell." + textClass, - regex : "\\s+" - }, { - token : "nospell." + textClass, - regex : "\\w+" - } - ] - }; -}; - -oop.inherits(TexHighlightRules, TextHighlightRules); - -exports.TexHighlightRules = TexHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/tex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var TexHighlightRules = require("./tex_highlight_rules").TexHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; - -var Mode = function(suppressHighlighting) { - if (suppressHighlighting) - this.HighlightRules = TextHighlightRules; - else - this.HighlightRules = TexHighlightRules; - this.$outdent = new MatchingBraceOutdent(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - this.allowAutoInsert = function() { - return false; - }; - this.$id = "ace/mode/tex"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),i=function(e){e||(e="text"),this.$rules={start:[{token:"comment",regex:"%.*$"},{token:e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b",next:"nospell"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:e,regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell."+e,regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",next:"start"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])]"},{token:"paren.keyword.operator",regex:"}",next:"start"},{token:"nospell."+e,regex:"\\s+"},{token:"nospell."+e,regex:"\\w+"}]}};r.inherits(i,o),t.TexHighlightRules=i}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var i=o[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var c=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,i-1),c)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/tex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,i=e("./text_highlight_rules").TextHighlightRules,a=e("./tex_highlight_rules").TexHighlightRules,c=e("./matching_brace_outdent").MatchingBraceOutdent,g=function(e){e?this.HighlightRules=i:this.HighlightRules=a,this.$outdent=new c};r.inherits(g,o),function(){this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.allowAutoInsert=function(){return!1},this.$id="ace/mode/tex"}.call(g.prototype),t.Mode=g}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-text.js b/www/js/vendor/ace/mode-text.js index 8b1378917..e69de29bb 100755 --- a/www/js/vendor/ace/mode-text.js +++ b/www/js/vendor/ace/mode-text.js @@ -1 +0,0 @@ - diff --git a/www/js/vendor/ace/mode-textile.js b/www/js/vendor/ace/mode-textile.js index b1ad856eb..8f2618c8d 100755 --- a/www/js/vendor/ace/mode-textile.js +++ b/www/js/vendor/ace/mode-textile.js @@ -1,141 +1 @@ -define("ace/mode/textile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var TextileHighlightRules = function() { - this.$rules = { - "start" : [ - { - token : function(value) { - if (value.charAt(0) == "h") - return "markup.heading." + value.charAt(1); - else - return "markup.heading"; - }, - regex : "h1|h2|h3|h4|h5|h6|bq|p|bc|pre", - next : "blocktag" - }, - { - token : "keyword", - regex : "[\\*]+|[#]+" - }, - { - token : "text", - regex : ".+" - } - ], - "blocktag" : [ - { - token : "keyword", - regex : "\\. ", - next : "start" - }, - { - token : "keyword", - regex : "\\(", - next : "blocktagproperties" - } - ], - "blocktagproperties" : [ - { - token : "keyword", - regex : "\\)", - next : "blocktag" - }, - { - token : "string", - regex : "[a-zA-Z0-9\\-_]+" - }, - { - token : "keyword", - regex : "#" - } - ] - }; -}; - -oop.inherits(TextileHighlightRules, TextHighlightRules); - -exports.TextileHighlightRules = TextileHighlightRules; - -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/textile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/textile_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var TextileHighlightRules = require("./textile_highlight_rules").TextileHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; - -var Mode = function() { - this.HighlightRules = TextileHighlightRules; - this.$outdent = new MatchingBraceOutdent(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.type = "text"; - this.getNextLineIndent = function(state, line, tab) { - if (state == "intag") - return tab; - - return ""; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/textile"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/textile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:function(e){return"h"==e.charAt(0)?"markup.heading."+e.charAt(1):"markup.heading"},regex:"h1|h2|h3|h4|h5|h6|bq|p|bc|pre",next:"blocktag"},{token:"keyword",regex:"[\\*]+|[#]+"},{token:"text",regex:".+"}],blocktag:[{token:"keyword",regex:"\\. ",next:"start"},{token:"keyword",regex:"\\(",next:"blocktagproperties"}],blocktagproperties:[{token:"keyword",regex:"\\)",next:"blocktag"},{token:"string",regex:"[a-zA-Z0-9\\-_]+"},{token:"keyword",regex:"#"}]}};i.inherits(o,r),t.TextileHighlightRules=o}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var i=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),r=n.match(/^(\s*\})/);if(!r)return 0;var o=r[1].length,h=e.findMatchingBracket({row:t,column:o});if(!h||h.row==t)return 0;var c=this.$getIndent(e.getLine(h.row));e.replace(new i(t,0,t,o-1),c)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),define("ace/mode/textile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/textile_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var i=e("../lib/oop"),r=e("./text").Mode,o=e("./textile_highlight_rules").TextileHighlightRules,h=e("./matching_brace_outdent").MatchingBraceOutdent,c=function(){this.HighlightRules=o,this.$outdent=new h};i.inherits(c,r),function(){this.type="text",this.getNextLineIndent=function(e,t,n){return"intag"==e?n:""},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/textile"}.call(c.prototype),t.Mode=c}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-toml.js b/www/js/vendor/ace/mode-toml.js index 94663bfc4..710548e13 100755 --- a/www/js/vendor/ace/mode-toml.js +++ b/www/js/vendor/ace/mode-toml.js @@ -1,141 +1 @@ -define("ace/mode/toml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var TomlHighlightRules = function() { - var keywordMapper = this.createKeywordMapper({ - "constant.language.boolean": "true|false" - }, "identifier"); - - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - this.$rules = { - "start": [ - { - token: "comment.toml", - regex: /#.*$/ - }, - { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, - { - token: ["variable.keygroup.toml"], - regex: "(?:^\\s*)(\\[([^\\]]+)\\])" - }, - { - token : keywordMapper, - regex : identifierRe - }, - { - token : "support.date.toml", - regex: "\\d{4}-\\d{2}-\\d{2}(T)\\d{2}:\\d{2}:\\d{2}(Z)" - }, - { - token: "constant.numeric.toml", - regex: "-?\\d+(\\.?\\d+)?" - } - ], - "qqstring" : [ - { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, - { - token : "constant.language.escape", - regex : '\\\\[0tnr"\\\\]' - }, - { - token : "string", - regex : '"|$', - next : "start" - }, - { - defaultToken: "string" - } - ] - } - -}; - -oop.inherits(TomlHighlightRules, TextHighlightRules); - -exports.TomlHighlightRules = TomlHighlightRules; -}); - -define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function() { -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /^\s*\[([^\])]*)]\s*(?:$|[;#])/; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var re = this.foldingStartMarker; - var line = session.getLine(row); - - var m = line.match(re); - - if (!m) return; - - var startName = m[1] + "."; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - if (/^\s*$/.test(line)) - continue; - m = line.match(re); - if (m && m[1].lastIndexOf(startName, 0) !== 0) - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/toml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/toml_highlight_rules","ace/mode/folding/ini"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var TomlHighlightRules = require("./toml_highlight_rules").TomlHighlightRules; -var FoldMode = require("./folding/ini").FoldMode; - -var Mode = function() { - this.HighlightRules = TomlHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "#"; - this.$id = "ace/mode/toml"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/toml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,i){"use strict";var o=e("../lib/oop"),n=e("./text_highlight_rules").TextHighlightRules,r=function(){var e=this.createKeywordMapper({"constant.language.boolean":"true|false"},"identifier"),t="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b";this.$rules={start:[{token:"comment.toml",regex:/#.*$/},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:["variable.keygroup.toml"],regex:"(?:^\\s*)(\\[([^\\]]+)\\])"},{token:e,regex:t},{token:"support.date.toml",regex:"\\d{4}-\\d{2}-\\d{2}(T)\\d{2}:\\d{2}:\\d{2}(Z)"},{token:"constant.numeric.toml",regex:"-?\\d+(\\.?\\d+)?"}],qqstring:[{token:"string",regex:"\\\\$",next:"qqstring"},{token:"constant.language.escape",regex:'\\\\[0tnr"\\\\]'},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}]}};o.inherits(r,n),t.TomlHighlightRules=r}),define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,i){"use strict";var o=e("../../lib/oop"),n=e("../../range").Range,r=e("./fold_mode").FoldMode,l=t.FoldMode=function(){};o.inherits(l,r),function(){this.foldingStartMarker=/^\s*\[([^\])]*)]\s*(?:$|[;#])/,this.getFoldWidgetRange=function(e,t,i){var o=this.foldingStartMarker,r=e.getLine(i),l=r.match(o);if(l){for(var g=l[1]+".",a=r.length,s=e.getLength(),d=i,h=i;++id){var u=e.getLine(h).length;return new n(d,a,h,u)}}}}.call(l.prototype)}),define("ace/mode/toml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/toml_highlight_rules","ace/mode/folding/ini"],function(e,t,i){"use strict";var o=e("../lib/oop"),n=e("./text").Mode,r=e("./toml_highlight_rules").TomlHighlightRules,l=e("./folding/ini").FoldMode,g=function(){this.HighlightRules=r,this.foldingRules=new l};o.inherits(g,n),function(){this.lineCommentStart="#",this.$id="ace/mode/toml"}.call(g.prototype),t.Mode=g}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-twig.js b/www/js/vendor/ace/mode-twig.js index e8a499799..ed54706c0 100755 --- a/www/js/vendor/ace/mode-twig.js +++ b/www/js/vendor/ace/mode-twig.js @@ -1,2611 +1,2 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = CssHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.foldingRules = "cStyle"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("csslint", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/css"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === " -1; -} - -(function() { - - this.getFoldWidget = function(session, foldStyle, row) { - var tag = this._getFirstTagInLine(session, row); - - if (!tag) - return ""; - - if (tag.closing || (!tag.tagName && tag.selfClosing)) - return foldStyle == "markbeginend" ? "end" : ""; - - if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) - return ""; - - if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) - return ""; - - return "start"; - }; - this._getFirstTagInLine = function(session, row) { - var tokens = session.getTokens(row); - var tag = new Tag(); - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (is(token, "tag-open")) { - tag.end.column = tag.start.column + token.value.length; - tag.closing = is(token, "end-tag-open"); - token = tokens[++i]; - if (!token) - return null; - tag.tagName = token.value; - tag.end.column += token.value.length; - for (i++; i < tokens.length; i++) { - token = tokens[i]; - tag.end.column += token.value.length; - if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - break; - } - } - return tag; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - return tag; - } - tag.start.column += token.value.length; - } - - return null; - }; - - this._findEndTagInLine = function(session, row, tagName, startColumn) { - var tokens = session.getTokens(row); - var column = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - column += token.value.length; - if (column < startColumn) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var firstTag = this._getFirstTagInLine(session, row); - - if (!firstTag) - return null; - - var isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var MixedFoldMode = require("./mixed").FoldMode; -var XmlFoldMode = require("./xml").FoldMode; -var CStyleFoldMode = require("./cstyle").FoldMode; - -var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { - MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { - "js-": new CStyleFoldMode(), - "css-": new CStyleFoldMode() - }); -}; - -oop.inherits(FoldMode, MixedFoldMode); - -}); - -define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var TokenIterator = require("../token_iterator").TokenIterator; - -var commonAttributes = [ - "accesskey", - "class", - "contenteditable", - "contextmenu", - "dir", - "draggable", - "dropzone", - "hidden", - "id", - "inert", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "lang", - "spellcheck", - "style", - "tabindex", - "title", - "translate" -]; - -var eventAttributes = [ - "onabort", - "onblur", - "oncancel", - "oncanplay", - "oncanplaythrough", - "onchange", - "onclick", - "onclose", - "oncontextmenu", - "oncuechange", - "ondblclick", - "ondrag", - "ondragend", - "ondragenter", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onended", - "onerror", - "onfocus", - "oninput", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeyup", - "onload", - "onloadeddata", - "onloadedmetadata", - "onloadstart", - "onmousedown", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onpause", - "onplay", - "onplaying", - "onprogress", - "onratechange", - "onreset", - "onscroll", - "onseeked", - "onseeking", - "onselect", - "onshow", - "onstalled", - "onsubmit", - "onsuspend", - "ontimeupdate", - "onvolumechange", - "onwaiting" -]; - -var globalAttributes = commonAttributes.concat(eventAttributes); - -var attributeMap = { - "html": ["manifest"], - "head": [], - "title": [], - "base": ["href", "target"], - "link": ["href", "hreflang", "rel", "media", "type", "sizes"], - "meta": ["http-equiv", "name", "content", "charset"], - "style": ["type", "media", "scoped"], - "script": ["charset", "type", "src", "defer", "async"], - "noscript": ["href"], - "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], - "section": [], - "nav": [], - "article": ["pubdate"], - "aside": [], - "h1": [], - "h2": [], - "h3": [], - "h4": [], - "h5": [], - "h6": [], - "header": [], - "footer": [], - "address": [], - "main": [], - "p": [], - "hr": [], - "pre": [], - "blockquote": ["cite"], - "ol": ["start", "reversed"], - "ul": [], - "li": ["value"], - "dl": [], - "dt": [], - "dd": [], - "figure": [], - "figcaption": [], - "div": [], - "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], - "em": [], - "strong": [], - "small": [], - "s": [], - "cite": [], - "q": ["cite"], - "dfn": [], - "abbr": [], - "data": [], - "time": ["datetime"], - "code": [], - "var": [], - "samp": [], - "kbd": [], - "sub": [], - "sup": [], - "i": [], - "b": [], - "u": [], - "mark": [], - "ruby": [], - "rt": [], - "rp": [], - "bdi": [], - "bdo": [], - "span": [], - "br": [], - "wbr": [], - "ins": ["cite", "datetime"], - "del": ["cite", "datetime"], - "img": ["alt", "src", "height", "width", "usemap", "ismap"], - "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], - "embed": ["src", "height", "width", "type"], - "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], - "param": ["name", "value"], - "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], - "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], - "source": ["src", "type", "media"], - "track": ["kind", "src", "srclang", "label", "default"], - "canvas": ["width", "height"], - "map": ["name"], - "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], - "svg": [], - "math": [], - "table": ["summary"], - "caption": [], - "colgroup": ["span"], - "col": ["span"], - "tbody": [], - "thead": [], - "tfoot": [], - "tr": [], - "td": ["headers", "rowspan", "colspan"], - "th": ["headers", "rowspan", "colspan", "scope"], - "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], - "fieldset": ["disabled", "form", "name"], - "legend": [], - "label": ["form", "for"], - "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], - "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], - "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], - "datalist": [], - "optgroup": ["disabled", "label"], - "option": ["disabled", "selected", "label", "value"], - "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], - "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], - "output": ["for", "form", "name"], - "progress": ["value", "max"], - "meter": ["value", "min", "max", "low", "high", "optimum"], - "details": ["open"], - "summary": [], - "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], - "menu": ["type", "label"], - "dialog": ["open"] -}; - -var elements = Object.keys(attributeMap); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -function findTagName(session, pos) { - var iterator = new TokenIterator(session, pos.row, pos.column); - var token = iterator.getCurrentToken(); - while (token && !is(token, "tag-name")){ - token = iterator.stepBackward(); - } - if (token) - return token.value; -} - -var HtmlCompletions = function() { - -}; - -(function() { - - this.getCompletions = function(state, session, pos, prefix) { - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) - return this.getTagCompletions(state, session, pos, prefix); - if (is(token, "tag-whitespace") || is(token, "attribute-name")) - return this.getAttributeCompetions(state, session, pos, prefix); - - return []; - }; - - this.getTagCompletions = function(state, session, pos, prefix) { - return elements.map(function(element){ - return { - value: element, - meta: "tag", - score: Number.MAX_VALUE - }; - }); - }; - - this.getAttributeCompetions = function(state, session, pos, prefix) { - var tagName = findTagName(session, pos); - if (!tagName) - return []; - var attributes = globalAttributes; - if (tagName in attributeMap) { - attributes = attributes.concat(attributeMap[tagName]); - } - return attributes.map(function(attribute){ - return { - caption: attribute, - snippet: attribute + '="$0"', - meta: "attribute", - score: Number.MAX_VALUE - }; - }); - }; - -}).call(HtmlCompletions.prototype); - -exports.HtmlCompletions = HtmlCompletions; -}); - -define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var CssMode = require("./css").Mode; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; -var HtmlFoldMode = require("./folding/html").FoldMode; -var HtmlCompletions = require("./html_completions").HtmlCompletions; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; -var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; - -var Mode = function(options) { - this.fragmentContext = options && options.fragmentContext; - this.HighlightRules = HtmlHighlightRules; - this.$behaviour = new XmlBehaviour(); - this.$completer = new HtmlCompletions(); - - this.createModeDelegates({ - "js-": JavaScriptMode, - "css-": CssMode - }); - - this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.blockComment = {start: ""}; - - this.voidElements = lang.arrayToMap(voidElements); - - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - this.checkOutdent = function(state, line, input) { - return false; - }; - - this.getCompletions = function(state, session, pos, prefix) { - return this.$completer.getCompletions(state, session, pos, prefix); - }; - - this.createWorker = function(session) { - if (this.constructor != Mode) - return; - var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - if (this.fragmentContext) - worker.call("setOptions", [{context: this.fragmentContext}]); - - worker.on("error", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/html"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/twig_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var TwigHighlightRules = function() { - HtmlHighlightRules.call(this); - - var tags = "autoescape|block|do|embed|extends|filter|flush|for|from|if|import|include|macro|sandbox|set|spaceless|use|verbatim"; - tags = tags + "|end" + tags.replace(/\|/g, "|end"); - var filters = "abs|batch|capitalize|convert_encoding|date|date_modify|default|e|escape|first|format|join|json_encode|keys|last|length|lower|merge|nl2br|number_format|raw|replace|reverse|slice|sort|split|striptags|title|trim|upper|url_encode"; - var functions = "attribute|constant|cycle|date|dump|parent|random|range|template_from_string"; - var tests = "constant|divisibleby|sameas|defined|empty|even|iterable|odd"; - var constants = "null|none|true|false"; - var operators = "b-and|b-xor|b-or|in|is|and|or|not" - - var keywordMapper = this.createKeywordMapper({ - "keyword.control.twig": tags, - "support.function.twig": [filters, functions, tests].join("|"), - "keyword.operator.twig": operators, - "constant.language.twig": constants - }, "identifier"); - for (var rule in this.$rules) { - this.$rules[rule].unshift({ - token : "variable.other.readwrite.local.twig", - regex : "\\{\\{-?", - push : "twig-start" - }, { - token : "meta.tag.twig", - regex : "\\{%-?", - push : "twig-start" - }, { - token : "comment.block.twig", - regex : "\\{#-?", - push : "twig-comment" - }); - } - this.$rules["twig-comment"] = [{ - token : "comment.block.twig", - regex : ".*-?#\\}", - next : "pop" - }]; - - this.$rules["twig-start"] = [{ - token : "variable.other.readwrite.local.twig", - regex : "-?\\}\\}", - next : "pop" - }, { - token : "meta.tag.twig", - regex : "-?%\\}", - next : "pop" - }, { - token : "string", - regex : "'", - next : "twig-qstring" - }, { - token : "string", - regex : '"', - next : "twig-qqstring" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator.assignment", - regex : "=|~" - }, { - token : "keyword.operator.comparison", - regex : "==|!=|<|>|>=|<=|===" - }, { - token : "keyword.operator.arithmetic", - regex : "\\+|-|/|%|//|\\*|\\*\\*" - }, { - token : "keyword.operator.other", - regex : "\\.\\.|\\|" - }, { - token : "punctuation.operator", - regex : /\?|\:|\,|\;|\./ - }, { - token : "paren.lparen", - regex : /[\[\({]/ - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token : "text", - regex : "\\s+" - } ]; - - this.$rules["twig-qqstring"] = [{ - token : "constant.language.escape", - regex : /\\[\\"$#ntr]|#{[^"}]*}/ - }, { - token : "string", - regex : '"', - next : "twig-start" - }, { - defaultToken : "string" - } - ]; - - this.$rules["twig-qstring"] = [{ - token : "constant.language.escape", - regex : /\\[\\'ntr]}/ - }, { - token : "string", - regex : "'", - next : "twig-start" - }, { - defaultToken : "string" - } - ]; - - this.normalizeRules(); -}; - -oop.inherits(TwigHighlightRules, TextHighlightRules); - -exports.TwigHighlightRules = TwigHighlightRules; -}); - -define("ace/mode/twig",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/twig_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var HtmlMode = require("./html").Mode; -var TwigHighlightRules = require("./twig_highlight_rules").TwigHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; - -var Mode = function() { - HtmlMode.call(this); - this.HighlightRules = TwigHighlightRules; - this.$outdent = new MatchingBraceOutdent(); -}; -oop.inherits(Mode, HtmlMode); - -(function() { - this.blockComment = {start: "{#", end: "#}"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - this.$id = "ace/mode/twig"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};o.inherits(i,r),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",o="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},r.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[r.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[r.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(r,"doc-",[r.getEndRule("no_regex")]),this.normalizeRules()};o.inherits(a,i),t.JavaScriptHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),r=n.match(/^(\s*\})/);if(!r)return 0;var i=r[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new o(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var o,r=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?o=c[t]:void(o=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,r,i){var a=n.getCursorPosition(),l=r.doc.getLine(a.row);if("{"==i){g(n);var u=n.getSelectionRange(),c=r.doc.getTextRange(u);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return{text:"{"+c+"}",selection:!1};if(d.isSaneInsertion(n,r))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var m=l.substring(a.column,a.column+1);if("}"==m){var p=r.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==p&&d.isAutoInsertedClosing(a,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var h="";d.isMaybeInsertedClosing(a,l)&&(h=s.stringRepeat("}",o.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=l.substring(a.column,a.column+1);if("}"===m){var f=r.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!f)return null;var x=this.$getIndent(r.getLine(f.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var b=x+r.getTabString();return{text:"\n"+b+"\n"+x+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,i){var a=r.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){g(n);var s=r.doc.getLine(i.start.row),l=s.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,o,r){if("("==r){g(n);var i=n.getSelectionRange(),a=o.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,")"),{text:"()",selection:[1,1]}}else if(")"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=o.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"("==i){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(")"==s)return r.end.column++,r}}),this.add("brackets","insertion",function(e,t,n,o,r){if("["==r){g(n);var i=n.getSelectionRange(),a=o.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=o.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"["==i){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if("]"==s)return r.end.column++,r}}),this.add("string_dquotes","insertion",function(e,t,n,o,r){if('"'==r||"'"==r){g(n);var i=r,a=n.getSelectionRange(),s=o.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var l=n.getCursorPosition(),u=o.doc.getLine(l.row),c=u.substring(l.column-1,l.column),d=u.substring(l.column,l.column+1),m=o.getTokenAt(l.row,l.column),p=o.getTokenAt(l.row,l.column+1);if("\\"==c&&m&&/escape/.test(m.type))return null;var h,f=m&&/string/.test(m.type),x=!p||/string/.test(p.type);if(d==i)h=f!==x;else{if(f&&!x)return null;if(f&&x)return null;var b=o.$mode.tokenRe;b.lastIndex=0;var k=b.test(c);b.lastIndex=0;var v=b.test(c);if(k||v)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==i||"'"==i)){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(s==i)return r.end.column++,r}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),o=new a(t,n.row,n.column);if(!this.$matchTokenType(o.getCurrentToken()||"text",l)){var r=new a(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return o.stepForward(),o.getCurrentTokenRow()!==n.row||this.$matchTokenType(o.getCurrentToken()||"text",u)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=r.row,o.autoInsertedLineEnd=n+i.substr(r.column),o.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=r.row,o.maybeInsertedLineStart=i.substr(0,r.column)+n,o.maybeInsertedLineEnd=i.substr(r.column),o.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return o.autoInsertedBrackets>0&&e.row===o.autoInsertedRow&&n===o.autoInsertedLineEnd[0]&&t.substr(e.column)===o.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return o.maybeInsertedBrackets>0&&e.row===o.maybeInsertedRow&&t.substr(e.column)===o.maybeInsertedLineEnd&&t.substr(0,e.column)==o.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},r.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(o)?"start":r},this.getFoldWidgetRange=function(e,t,n,o){var r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);var i=r.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(o?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=r.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),o=n.search(/\S/),i=t,a=n.length;t+=1;for(var s=t,l=e.getLength();++tu)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=i)break;if(c.isMultiLine())t=c.end.row;else if(o==u)break}s=t}}return new r(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++na)return new r(a,o,c,t.length)}}.call(a.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),i=r.tokens,a=r.state;if(i.length&&"comment"==i[i.length-1].type)return o;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(o+=n)}else if("doc-start"==e){if("start"==a||"no_regex"==a)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(o+=" "),o+="* ")}return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(c.prototype),t.Mode=c}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),i=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",u=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",m=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":s,"support.type":i,"support.constant.color":l,"support.constant.fonts":u},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};o.inherits(m,r),t.CssHighlightRules=m}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),i=e("../../token_iterator").TokenIterator,a=function(){this.inherit(r),this.add("colon","insertion",function(e,t,n,o,r){if(":"===r){var a=n.getCursorPosition(),s=new i(o,a.row,a.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var u=o.doc.getLine(a.row),c=u.substring(a.column,a.column+1); +if(":"===c)return{text:"",selection:[1,1]};if(!u.substring(a.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&":"===a){var s=n.getCursorPosition(),l=new i(o,s.row,s.column),u=l.getCurrentToken();if(u&&u.value.match(/\s+/)&&(u=l.stepBackward()),u&&"support.type"===u.type){var c=o.doc.getLine(r.start.row),g=c.substring(r.end.column,r.end.column+1);if(";"===g)return r.end.column++,r}}}),this.add("semicolon","insertion",function(e,t,n,o,r){if(";"===r){var i=n.getCursorPosition(),a=o.doc.getLine(i.row),s=a.substring(i.column,i.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};o.inherits(a,r),t.CssBehaviour=a}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e).tokens;if(r.length&&"comment"==r[r.length-1].type)return o;var i=t.match(/^.*\{\s*$/);return i&&(o+=n),o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===i&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(r.prototype),o.inherits(i,r),t.XmlHighlightRules=i}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./css_highlight_rules").CssHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=r.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),u=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(i,"css-","style"),this.embedTagRules(a,"js-","script"),this.constructor===u&&this.normalizeRules()};o.inherits(u,s),t.HtmlHighlightRules=u}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if('"'==i||"'"==i){var s=i,l=r.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),g=c.substring(u.column,u.column+1),d=new a(r,u.row,u.column),m=d.getCurrentToken();if(g==s&&(o(m,"attribute-value")||o(m,"string")))return{text:"",selection:[1,1]};if(m||(m=d.stepBackward()),!m)return;for(;o(m,"tag-whitespace")||o(m,"whitespace");)m=d.stepBackward();var p=!g||g.match(/\s/);if(o(m,"attribute-equals")&&(p||">"==g)||o(m,"decl-attribute-equals")&&(p||"?"==g))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==i||"'"==i)){var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(s==i)return r.end.column++,r}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(">"==i){var s=n.getCursorPosition(),l=new a(r,s.row,s.column),u=l.getCurrentToken()||l.stepBackward();if(!u||!(o(u,"tag-name")||o(u,"tag-whitespace")||o(u,"attribute-name")||o(u,"attribute-equals")||o(u,"attribute-value")))return;if(o(u,"reference.attribute-value"))return;if(o(u,"attribute-value")){var c=u.value.charAt(0);if('"'==c||"'"==c){var g=u.value.charAt(u.value.length-1),d=l.getCurrentTokenColumn()+u.value.length;if(d>s.column||d==s.column&&c!=g)return}}for(;!o(u,"tag-name");)u=l.stepBackward();var m=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn();if(o(l.stepBackward(),"end-tag-open"))return;var h=u.value;if(m==s.row&&(h=h.substring(0,s.column-p)),this.voidElements.hasOwnProperty(h.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,o,r){if("\n"==r){var i=n.getCursorPosition(),s=o.getLine(i.row),l=new a(o,i.row,i.column),u=l.getCurrentToken();if(u&&u.type.indexOf("tag-close")!==-1){for(;u&&u.type.indexOf("tag-name")===-1;)u=l.stepBackward();if(!u)return;var c=u.value,g=l.getCurrentTokenRow();if(u=l.stepBackward(),!u||u.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]){var d=o.getTokenAt(i.row,i.column+1),s=o.getLine(g),m=this.$getIndent(s),p=m+o.getTabString();return d&&"-1}var r=e("../../lib/oop"),i=(e("../../lib/lang"),e("../../range").Range),a=e("./fold_mode").FoldMode,s=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(e,t){a.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(l,a);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var o=this._getFirstTagInLine(e,n);return o?o.closing||!o.tagName&&o.selfClosing?"markbeginend"==t?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,o.tagName,o.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new u,i=0;i"==a.value;break}return r}if(o(a,"tag-close"))return r.selfClosing="/>"==a.value,r;r.start.column+=a.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var i=e.getTokens(t),a=0,s=0;s"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(t&&n.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,n){var o=this._getFirstTagInLine(e,n);if(!o)return null;var r,a=o.closing||o.selfClosing,l=[];if(a)for(var u=new s(e,n,o.end.column),c={row:n,column:o.start.column};r=this._readTagBackward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,i.fromPoints(r.start,r.end)}if(r.closing)l.push(r);else if(this._pop(l,r),0==l.length)return r.start.column+=r.tagName.length+2,i.fromPoints(r.start,c)}else for(var u=new s(e,n,o.start.column),g={row:n,column:o.start.column+o.tagName.length+2};r=this._readTagForward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,i.fromPoints(r.start,r.end)}if(r.closing){if(this._pop(l,r),0==l.length)return i.fromPoints(g,r.start)}else l.push(r)}}}).call(l.prototype)}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./mixed").FoldMode,i=e("./xml").FoldMode,a=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){r.call(this,new i(e,t),{"js-":new a,"css-":new a})};o.inherits(s,r)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}function r(e,t){for(var n=new i(e,t.row,t.column),r=n.getCurrentToken();r&&!o(r,"tag-name");)r=n.stepBackward();if(r)return r.value}var i=e("../token_iterator").TokenIterator,a=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=a.concat(s),u={html:["manifest"],head:[],title:[],base:["href","target"],link:["href","hreflang","rel","media","type","sizes"],meta:["http-equiv","name","content","charset"],style:["type","media","scoped"],script:["charset","type","src","defer","async"],noscript:["href"],body:["onafterprint","onbeforeprint","onbeforeunload","onhashchange","onmessage","onoffline","onpopstate","onredo","onresize","onstorage","onundo","onunload"],section:[],nav:[],article:["pubdate"],aside:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],footer:[],address:[],main:[],p:[],hr:[],pre:[],blockquote:["cite"],ol:["start","reversed"],ul:[],li:["value"],dl:[],dt:[],dd:[],figure:[],figcaption:[],div:[],a:["href","target","ping","rel","media","hreflang","type"],em:[],strong:[],small:[],s:[],cite:[],q:["cite"],dfn:[],abbr:[],data:[],time:["datetime"],code:[],var:[],samp:[],kbd:[],sub:[],sup:[],i:[],b:[],u:[],mark:[],ruby:[],rt:[],rp:[],bdi:[],bdo:[],span:[],br:[],wbr:[],ins:["cite","datetime"],del:["cite","datetime"],img:["alt","src","height","width","usemap","ismap"],iframe:["name","src","height","width","sandbox","seamless"],embed:["src","height","width","type"],object:["param","data","type","height","width","usemap","name","form","classid"],param:["name","value"],video:["src","autobuffer","autoplay","loop","controls","width","height","poster"],audio:["src","autobuffer","autoplay","loop","controls"],source:["src","type","media"],track:["kind","src","srclang","label","default"],canvas:["width","height"],map:["name"],area:["shape","coords","href","hreflang","alt","target","media","rel","ping","type"],svg:[],math:[],table:["summary"],caption:[],colgroup:["span"],col:["span"],tbody:[],thead:[],tfoot:[],tr:[],td:["headers","rowspan","colspan"],th:["headers","rowspan","colspan","scope"],form:["accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],fieldset:["disabled","form","name"],legend:[],label:["form","for"],input:["type","accept","alt","autocomplete","checked","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","multiple","pattern","placeholder","readonly","required","size","src","step","width","files","value"],button:["autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","value","type"],select:["autofocus","disabled","form","multiple","name","size"],datalist:[],optgroup:["disabled","label"],option:["disabled","selected","label","value"],textarea:["autofocus","disabled","form","maxlength","name","placeholder","readonly","required","rows","cols","wrap"],keygen:["autofocus","challenge","disabled","form","keytype","name"],output:["for","form","name"],progress:["value","max"],meter:["value","min","max","low","high","optimum"],details:["open"],summary:[],command:["type","label","icon","disabled","checked","radiogroup","command"],menu:["type","label"],dialog:["open"]},c=Object.keys(u),g=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);return i?o(i,"tag-name")||o(i,"tag-open")||o(i,"end-tag-open")?this.getTagCompletions(e,t,n,r):o(i,"tag-whitespace")||o(i,"attribute-name")?this.getAttributeCompetions(e,t,n,r):[]:[]},this.getTagCompletions=function(e,t,n,o){return c.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompetions=function(e,t,n,o){var i=r(t,n);if(!i)return[];var a=l;return i in u&&(a=a.concat(u[i])),a.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})}}).call(g.prototype),t.HtmlCompletions=g}),define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./text").Mode,a=e("./javascript").Mode,s=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,g=e("./html_completions").HtmlCompletions,d=e("../worker/worker_client").WorkerClient,m=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],p=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],h=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new u,this.$completer=new g,this.createModeDelegates({"js-":a,"css-":s}),this.foldingRules=new c(this.voidElements,r.arrayToMap(p))};o.inherits(h,i),function(){this.blockComment={start:""},this.voidElements=r.arrayToMap(m),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,o){return this.$completer.getCompletions(e,t,n,o)},this.createWorker=function(e){if(this.constructor==h){var t=new d(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(h.prototype),t.Mode=h}),define("ace/mode/twig_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=(e("../lib/lang"),e("./html_highlight_rules").HtmlHighlightRules),i=e("./text_highlight_rules").TextHighlightRules,a=function(){r.call(this);var e="autoescape|block|do|embed|extends|filter|flush|for|from|if|import|include|macro|sandbox|set|spaceless|use|verbatim";e=e+"|end"+e.replace(/\|/g,"|end");var t="abs|batch|capitalize|convert_encoding|date|date_modify|default|e|escape|first|format|join|json_encode|keys|last|length|lower|merge|nl2br|number_format|raw|replace|reverse|slice|sort|split|striptags|title|trim|upper|url_encode",n="attribute|constant|cycle|date|dump|parent|random|range|template_from_string",o="constant|divisibleby|sameas|defined|empty|even|iterable|odd",i="null|none|true|false",a="b-and|b-xor|b-or|in|is|and|or|not",s=this.createKeywordMapper({"keyword.control.twig":e,"support.function.twig":[t,n,o].join("|"),"keyword.operator.twig":a,"constant.language.twig":i},"identifier");for(var l in this.$rules)this.$rules[l].unshift({token:"variable.other.readwrite.local.twig",regex:"\\{\\{-?",push:"twig-start"},{token:"meta.tag.twig",regex:"\\{%-?",push:"twig-start"},{token:"comment.block.twig",regex:"\\{#-?",push:"twig-comment"});this.$rules["twig-comment"]=[{token:"comment.block.twig",regex:".*-?#\\}",next:"pop"}],this.$rules["twig-start"]=[{token:"variable.other.readwrite.local.twig",regex:"-?\\}\\}",next:"pop"},{token:"meta.tag.twig",regex:"-?%\\}",next:"pop"},{token:"string",regex:"'",next:"twig-qstring"},{token:"string",regex:'"',next:"twig-qqstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:s,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator.assignment",regex:"=|~"},{token:"keyword.operator.comparison",regex:"==|!=|<|>|>=|<=|==="},{token:"keyword.operator.arithmetic",regex:"\\+|-|/|%|//|\\*|\\*\\*"},{token:"keyword.operator.other",regex:"\\.\\.|\\|"},{token:"punctuation.operator",regex:/\?|\:|\,|\;|\./},{token:"paren.lparen",regex:/[\[\({]/},{token:"paren.rparen",regex:/[\])}]/},{token:"text",regex:"\\s+"}],this.$rules["twig-qqstring"]=[{token:"constant.language.escape",regex:/\\[\\"$#ntr]|#{[^"}]*}/},{token:"string",regex:'"',next:"twig-start"},{defaultToken:"string"}],this.$rules["twig-qstring"]=[{token:"constant.language.escape",regex:/\\[\\'ntr]}/},{token:"string",regex:"'",next:"twig-start"},{defaultToken:"string"}],this.normalizeRules()};o.inherits(a,i),t.TwigHighlightRules=a}),define("ace/mode/twig",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/twig_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./html").Mode,i=e("./twig_highlight_rules").TwigHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=function(){r.call(this),this.HighlightRules=i,this.$outdent=new a};o.inherits(s,r),function(){this.blockComment={start:"{#",end:"#}"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),i=r.tokens;if(r.state,i.length&&"comment"==i[i.length-1].type)return o;if("start"==e){var a=t.match(/^.*[\{\(\[]\s*$/);a&&(o+=n)}return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/twig"}.call(s.prototype),t.Mode=s}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-typescript.js b/www/js/vendor/ace/mode-typescript.js index 7aacf8a3e..8c3ba336b 100755 --- a/www/js/vendor/ace/mode-typescript.js +++ b/www/js/vendor/ace/mode-typescript.js @@ -1,1108 +1 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; - -var TypeScriptHighlightRules = function() { - - var tsRules = [ - { - token: ["keyword.operator.ts", "text", "variable.parameter.function.ts", "text"], - regex: "\\b(module)(\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*\\{)" - }, - { - token: ["storage.type.variable.ts", "text", "keyword.other.ts", "text"], - regex: "(super)(\\s*\\()([a-zA-Z0-9,_?.$\\s]+\\s*)(\\))" - }, - { - token: ["entity.name.function.ts","paren.lparen", "paren.rparen"], - regex: "([a-zA-Z_?.$][\\w?.$]*)(\\()(\\))" - }, - { - token: ["variable.parameter.function.ts", "text", "variable.parameter.function.ts"], - regex: "([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*:\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)" - }, - { - token: ["keyword.operator.ts"], - regex: "(?:\\b(constructor|declare|interface|as|AS|public|private|class|extends|export|super)\\b)" - }, - { - token: ["storage.type.variable.ts"], - regex: "(?:\\b(this\\.|string\\b|bool\\b|number)\\b)" - }, - { - token: ["keyword.operator.ts", "storage.type.variable.ts", "keyword.operator.ts", "storage.type.variable.ts"], - regex: "(class)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)(extends)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)?" - }, - { - token: "keyword", - regex: "(?:super|export|class|extends|import)\\b" - } - ]; - - var JSRules = new JavaScriptHighlightRules().getRules(); - - JSRules.start = tsRules.concat(JSRules.start); - this.$rules = JSRules; -}; - -oop.inherits(TypeScriptHighlightRules, JavaScriptHighlightRules); - -exports.TypeScriptHighlightRules = TypeScriptHighlightRules; -}); - -define("ace/mode/typescript",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/typescript_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var jsMode = require("./javascript").Mode; -var TypeScriptHighlightRules = require("./typescript_highlight_rules").TypeScriptHighlightRules; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; - -var Mode = function() { - this.HighlightRules = TypeScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, jsMode); - -(function() { - this.createWorker = function(session) { - return null; - }; - this.$id = "ace/mode/typescript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,a=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},a.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};r.inherits(a,o),a.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},a.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},a.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=a}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./doc_comment_highlight_rules").DocCommentHighlightRules,a=e("./text_highlight_rules").TextHighlightRules,i=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",r="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",a="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},o.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+r+")(\\.)(prototype)(\\.)("+r+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+r+")(\\.)("+r+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+r+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+r+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:r},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[o.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:r},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[o.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[o.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[o.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:a},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:a},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(o,"doc-",[o.getEndRule("no_regex")]),this.normalizeRules()};r.inherits(i,a),t.JavaScriptHighlightRules=i}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var a=o[1].length,i=e.findMatchingBracket({row:t,column:a});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new r(t,0,t,a-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var r,o=e("../../lib/oop"),a=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),c=["text","paren.rparen","punctuation.operator"],l=["text","paren.rparen","punctuation.operator","comment"],u={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?r=u[t]:void(r=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,o,a){var i=n.getCursorPosition(),c=o.doc.getLine(i.row);if("{"==a){g(n);var l=n.getSelectionRange(),u=o.doc.getTextRange(l);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(d.isSaneInsertion(n,o))return/[\]\}\)]/.test(c[i.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==a){g(n);var p=c.substring(i.column,i.column+1);if("}"==p){var m=o.$findOpeningBracket("}",{column:i.column+1,row:i.row});if(null!==m&&d.isAutoInsertedClosing(i,c,a))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==a||"\r\n"==a){g(n);var h="";d.isMaybeInsertedClosing(i,c)&&(h=s.stringRepeat("}",r.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var p=c.substring(i.column,i.column+1);if("}"===p){var f=o.findMatchingBracket({row:i.row,column:i.column+1},"}");if(!f)return null;var x=this.$getIndent(o.getLine(f.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(c)}var k=x+o.getTabString();return{text:"\n"+k+"\n"+x+h,selection:[1,k.length,1,k.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,a){var i=o.doc.getTextRange(a);if(!a.isMultiLine()&&"{"==i){g(n);var s=o.doc.getLine(a.start.row),c=s.substring(a.end.column,a.end.column+1);if("}"==c)return a.end.column++,a;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,r,o){if("("==o){g(n);var a=n.getSelectionRange(),i=r.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"("+i+")",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,")"),{text:"()",selection:[1,1]}}else if(")"==o){g(n);var s=n.getCursorPosition(),c=r.doc.getLine(s.row),l=c.substring(s.column,s.column+1);if(")"==l){var u=r.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,c,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"("==a){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,r,o){if("["==o){g(n);var a=n.getSelectionRange(),i=r.doc.getTextRange(a);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"["+i+"]",selection:!1};if(d.isSaneInsertion(n,r))return d.recordAutoInsert(n,r,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){g(n);var s=n.getCursorPosition(),c=r.doc.getLine(s.row),l=c.substring(s.column,s.column+1);if("]"==l){var u=r.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==u&&d.isAutoInsertedClosing(s,c,o))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&"["==a){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,r,o){if('"'==o||"'"==o){g(n);var a=o,i=n.getSelectionRange(),s=r.doc.getTextRange(i);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:a+s+a,selection:!1};var c=n.getCursorPosition(),l=r.doc.getLine(c.row),u=l.substring(c.column-1,c.column),d=l.substring(c.column,c.column+1),p=r.getTokenAt(c.row,c.column),m=r.getTokenAt(c.row,c.column+1);if("\\"==u&&p&&/escape/.test(p.type))return null;var h,f=p&&/string/.test(p.type),x=!m||/string/.test(m.type);if(d==a)h=f!==x;else{if(f&&!x)return null;if(f&&x)return null;var k=r.$mode.tokenRe;k.lastIndex=0;var b=k.test(u);k.lastIndex=0;var y=k.test(u);if(b||y)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?a+a:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,o){var a=r.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==a||"'"==a)){g(n);var i=r.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(s==a)return o.end.column++,o}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),r=new i(t,n.row,n.column);if(!this.$matchTokenType(r.getCurrentToken()||"text",c)){var o=new i(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",c))return!1}return r.stepForward(),r.getCurrentTokenRow()!==n.row||this.$matchTokenType(r.getCurrentToken()||"text",l)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),a=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,a,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=o.row,r.autoInsertedLineEnd=n+a.substr(o.column),r.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),a=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,a)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=o.row,r.maybeInsertedLineStart=a.substr(0,o.column)+n,r.maybeInsertedLineEnd=a.substr(o.column),r.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return r.autoInsertedBrackets>0&&e.row===r.autoInsertedRow&&n===r.autoInsertedLineEnd[0]&&t.substr(e.column)===r.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return r.maybeInsertedBrackets>0&&e.row===r.maybeInsertedRow&&t.substr(e.column)===r.maybeInsertedLineEnd&&t.substr(0,e.column)==r.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},o.inherits(d,a),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var r=e("../../lib/oop"),o=e("../../range").Range,a=e("./fold_mode").FoldMode,i=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};r.inherits(i,a),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var r=e.getLine(n);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(r)?"start":o},this.getFoldWidgetRange=function(e,t,n,r){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var a=o.match(this.foldingStartMarker);if(a){var i=a.index;if(a[1])return this.openingBracketBlock(e,a[1],n,i);var s=e.getCommentFoldRange(n,i+a[0].length,1);return s&&!s.isMultiLine()&&(r?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var a=o.match(this.foldingStopMarker);if(a){var i=a.index+a[0].length;return a[1]?this.closingBracketBlock(e,a[1],n,i):e.getCommentFoldRange(n,i,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),r=n.search(/\S/),a=t,i=n.length;t+=1;for(var s=t,c=e.getLength();++tl)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=a)break;if(u.isMultiLine())t=u.end.row;else if(r==l)break}s=t}}return new o(a,i,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var r=t.search(/\s*$/),a=e.getLength(),i=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,c=1;++ni)return new o(i,r,u,t.length)}}.call(i.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./text").Mode,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,i=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),c=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,u=function(){this.HighlightRules=a,this.$outdent=new i,this.$behaviour=new c,this.foldingRules=new l};r.inherits(u,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var r=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),a=o.tokens,i=o.state;if(a.length&&"comment"==a[a.length-1].type)return r;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(r+=n)}else if("doc-start"==e){if("start"==i||"no_regex"==i)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(r+=" "),r+="* ")}return r},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(u.prototype),t.Mode=u}),define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=function(){var e=[{token:["keyword.operator.ts","text","variable.parameter.function.ts","text"],regex:"\\b(module)(\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*\\{)"},{token:["storage.type.variable.ts","text","keyword.other.ts","text"],regex:"(super)(\\s*\\()([a-zA-Z0-9,_?.$\\s]+\\s*)(\\))"},{token:["entity.name.function.ts","paren.lparen","paren.rparen"],regex:"([a-zA-Z_?.$][\\w?.$]*)(\\()(\\))"},{token:["variable.parameter.function.ts","text","variable.parameter.function.ts"],regex:"([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*:\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)"},{token:["keyword.operator.ts"],regex:"(?:\\b(constructor|declare|interface|as|AS|public|private|class|extends|export|super)\\b)"},{token:["storage.type.variable.ts"],regex:"(?:\\b(this\\.|string\\b|bool\\b|number)\\b)"},{token:["keyword.operator.ts","storage.type.variable.ts","keyword.operator.ts","storage.type.variable.ts"],regex:"(class)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)(extends)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)?"},{token:"keyword",regex:"(?:super|export|class|extends|import)\\b"}],t=(new o).getRules();t.start=e.concat(t.start),this.$rules=t};r.inherits(a,o),t.TypeScriptHighlightRules=a}),define("ace/mode/typescript",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/typescript_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),o=e("./javascript").Mode,a=e("./typescript_highlight_rules").TypeScriptHighlightRules,i=e("./behaviour/cstyle").CstyleBehaviour,s=e("./folding/cstyle").FoldMode,c=e("./matching_brace_outdent").MatchingBraceOutdent,l=function(){this.HighlightRules=a,this.$outdent=new c,this.$behaviour=new i,this.foldingRules=new s};r.inherits(l,o),function(){this.createWorker=function(e){return null},this.$id="ace/mode/typescript"}.call(l.prototype),t.Mode=l}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-vala.js b/www/js/vendor/ace/mode-vala.js index 95731cf65..f708b44e3 100755 --- a/www/js/vendor/ace/mode-vala.js +++ b/www/js/vendor/ace/mode-vala.js @@ -1,1026 +1 @@ -define("ace/mode/vala_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var ValaHighlightRules = function() { - - this.$rules = { start: - [ { token: - [ 'meta.using.vala', - 'keyword.other.using.vala', - 'meta.using.vala', - 'storage.modifier.using.vala', - 'meta.using.vala', - 'punctuation.terminator.vala' ], - regex: '^(\\s*)(using)\\b(?:(\\s*)([^ ;$]+)(\\s*)((?:;)?))?' }, - { include: '#code' } ], - '#all-types': - [ { include: '#primitive-arrays' }, - { include: '#primitive-types' }, - { include: '#object-types' } ], - '#annotations': - [ { token: - [ 'storage.type.annotation.vala', - 'punctuation.definition.annotation-arguments.begin.vala' ], - regex: '(@[^ (]+)(\\()', - push: - [ { token: 'punctuation.definition.annotation-arguments.end.vala', - regex: '\\)', - next: 'pop' }, - { token: - [ 'constant.other.key.vala', - 'text', - 'keyword.operator.assignment.vala' ], - regex: '(\\w*)(\\s*)(=)' }, - { include: '#code' }, - { token: 'punctuation.seperator.property.vala', regex: ',' }, - { defaultToken: 'meta.declaration.annotation.vala' } ] }, - { token: 'storage.type.annotation.vala', regex: '@\\w*' } ], - '#anonymous-classes-and-new': - [ { token: 'keyword.control.new.vala', - regex: '\\bnew\\b', - push_disabled: - [ { token: 'text', - regex: '(?<=\\)|\\])(?!\\s*{)|(?<=})|(?=;)', - TODO: 'FIXME: regexp doesn\'t have js equivalent', - originalRegex: '(?<=\\)|\\])(?!\\s*{)|(?<=})|(?=;)', - next: 'pop' }, - { token: [ 'storage.type.vala', 'text' ], - regex: '(\\w+)(\\s*)(?=\\[)', - push: - [ { token: 'text', regex: '}|(?=;|\\))', next: 'pop' }, - { token: 'text', - regex: '\\[', - push: - [ { token: 'text', regex: '\\]', next: 'pop' }, - { include: '#code' } ] }, - { token: 'text', - regex: '{', - push: - [ { token: 'text', regex: '(?=})', next: 'pop' }, - { include: '#code' } ] } ] }, - { token: 'text', - regex: '(?=\\w.*\\()', - push: - [ { token: 'text', - regex: '(?<=\\))', - TODO: 'FIXME: regexp doesn\'t have js equivalent', - originalRegex: '(?<=\\))', - next: 'pop' }, - { include: '#object-types' }, - { token: 'text', - regex: '\\(', - push: - [ { token: 'text', regex: '\\)', next: 'pop' }, - { include: '#code' } ] } ] }, - { token: 'meta.inner-class.vala', - regex: '{', - push: - [ { token: 'meta.inner-class.vala', regex: '}', next: 'pop' }, - { include: '#class-body' }, - { defaultToken: 'meta.inner-class.vala' } ] } ] } ], - '#assertions': - [ { token: - [ 'keyword.control.assert.vala', - 'meta.declaration.assertion.vala' ], - regex: '\\b(assert|requires|ensures)(\\s)', - push: - [ { token: 'meta.declaration.assertion.vala', - regex: '$', - next: 'pop' }, - { token: 'keyword.operator.assert.expression-seperator.vala', - regex: ':' }, - { include: '#code' }, - { defaultToken: 'meta.declaration.assertion.vala' } ] } ], - '#class': - [ { token: 'meta.class.vala', - regex: '(?=\\w?[\\w\\s]*(?:class|(?:@)?interface|enum|struct|namespace)\\s+\\w+)', - push: - [ { token: 'paren.vala', - regex: '}', - next: 'pop' }, - { include: '#storage-modifiers' }, - { include: '#comments' }, - { token: - [ 'storage.modifier.vala', - 'meta.class.identifier.vala', - 'entity.name.type.class.vala' ], - regex: '(class|(?:@)?interface|enum|struct|namespace)(\\s+)([\\w\\.]+)' }, - { token: 'storage.modifier.extends.vala', - regex: ':', - push: - [ { token: 'meta.definition.class.inherited.classes.vala', - regex: '(?={|,)', - next: 'pop' }, - { include: '#object-types-inherited' }, - { include: '#comments' }, - { defaultToken: 'meta.definition.class.inherited.classes.vala' } ] }, - { token: - [ 'storage.modifier.implements.vala', - 'meta.definition.class.implemented.interfaces.vala' ], - regex: '(,)(\\s)', - push: - [ { token: 'meta.definition.class.implemented.interfaces.vala', - regex: '(?=\\{)', - next: 'pop' }, - { include: '#object-types-inherited' }, - { include: '#comments' }, - { defaultToken: 'meta.definition.class.implemented.interfaces.vala' } ] }, - { token: 'paren.vala', - regex: '{', - push: - [ { token: 'paren.vala', regex: '(?=})', next: 'pop' }, - { include: '#class-body' }, - { defaultToken: 'meta.class.body.vala' } ] }, - { defaultToken: 'meta.class.vala' } ], - comment: 'attempting to put namespace in here.' } ], - '#class-body': - [ { include: '#comments' }, - { include: '#class' }, - { include: '#enums' }, - { include: '#methods' }, - { include: '#annotations' }, - { include: '#storage-modifiers' }, - { include: '#code' } ], - '#code': - [ { include: '#comments' }, - { include: '#class' }, - { token: 'text', - regex: '{', - push: - [ { token: 'text', regex: '}', next: 'pop' }, - { include: '#code' } ] }, - { include: '#assertions' }, - { include: '#parens' }, - { include: '#constants-and-special-vars' }, - { include: '#anonymous-classes-and-new' }, - { include: '#keywords' }, - { include: '#storage-modifiers' }, - { include: '#strings' }, - { include: '#all-types' } ], - '#comments': - [ { token: 'punctuation.definition.comment.vala', - regex: '/\\*\\*/' }, - { include: 'text.html.javadoc' }, - { include: '#comments-inline' } ], - '#comments-inline': - [ { token: 'punctuation.definition.comment.vala', - regex: '/\\*', - push: - [ { token: 'punctuation.definition.comment.vala', - regex: '\\*/', - next: 'pop' }, - { defaultToken: 'comment.block.vala' } ] }, - { token: - [ 'text', - 'punctuation.definition.comment.vala', - 'comment.line.double-slash.vala' ], - regex: '(\\s*)(//)(.*$)' } ], - '#constants-and-special-vars': - [ { token: 'constant.language.vala', - regex: '\\b(?:true|false|null)\\b' }, - { token: 'variable.language.vala', - regex: '\\b(?:this|base)\\b' }, - { token: 'constant.numeric.vala', - regex: '\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:[LlFfUuDd]|UL|ul)?\\b' }, - { token: [ 'keyword.operator.dereference.vala', 'constant.other.vala' ], - regex: '((?:\\.)?)\\b([A-Z][A-Z0-9_]+)(?!<|\\.class|\\s*\\w+\\s*=)\\b' } ], - '#enums': - [ { token: 'text', - regex: '^(?=\\s*[A-Z0-9_]+\\s*(?:{|\\(|,))', - push: - [ { token: 'text', regex: '(?=;|})', next: 'pop' }, - { token: 'constant.other.enum.vala', - regex: '\\w+', - push: - [ { token: 'meta.enum.vala', regex: '(?=,|;|})', next: 'pop' }, - { include: '#parens' }, - { token: 'text', - regex: '{', - push: - [ { token: 'text', regex: '}', next: 'pop' }, - { include: '#class-body' } ] }, - { defaultToken: 'meta.enum.vala' } ] } ] } ], - '#keywords': - [ { token: 'keyword.control.catch-exception.vala', - regex: '\\b(?:try|catch|finally|throw)\\b' }, - { token: 'keyword.control.vala', regex: '\\?|:|\\?\\?' }, - { token: 'keyword.control.vala', - regex: '\\b(?:return|break|case|continue|default|do|while|for|foreach|switch|if|else|in|yield|get|set|value)\\b' }, - { token: 'keyword.operator.vala', - regex: '\\b(?:typeof|is|as)\\b' }, - { token: 'keyword.operator.comparison.vala', - regex: '==|!=|<=|>=|<>|<|>' }, - { token: 'keyword.operator.assignment.vala', regex: '=' }, - { token: 'keyword.operator.increment-decrement.vala', - regex: '\\-\\-|\\+\\+' }, - { token: 'keyword.operator.arithmetic.vala', - regex: '\\-|\\+|\\*|\\/|%' }, - { token: 'keyword.operator.logical.vala', regex: '!|&&|\\|\\|' }, - { token: 'keyword.operator.dereference.vala', - regex: '\\.(?=\\S)', - originalRegex: '(?<=\\S)\\.(?=\\S)' }, - { token: 'punctuation.terminator.vala', regex: ';' }, - { token: 'keyword.operator.ownership', regex: 'owned|unowned' } ], - '#methods': - [ { token: 'meta.method.vala', - regex: '(?!new)(?=\\w.*\\s+)(?=[^=]+\\()', - push: - [ { token: 'paren.vala', regex: '}|(?=;)', next: 'pop' }, - { include: '#storage-modifiers' }, - { token: [ 'entity.name.function.vala', 'meta.method.identifier.vala' ], - regex: '([\\~\\w\\.]+)(\\s*\\()', - push: - [ { token: 'meta.method.identifier.vala', - regex: '\\)', - next: 'pop' }, - { include: '#parameters' }, - { defaultToken: 'meta.method.identifier.vala' } ] }, - { token: 'meta.method.return-type.vala', - regex: '(?=\\w.*\\s+\\w+\\s*\\()', - push: - [ { token: 'meta.method.return-type.vala', - regex: '(?=\\w+\\s*\\()', - next: 'pop' }, - { include: '#all-types' }, - { defaultToken: 'meta.method.return-type.vala' } ] }, - { include: '#throws' }, - { token: 'paren.vala', - regex: '{', - push: - [ { token: 'paren.vala', regex: '(?=})', next: 'pop' }, - { include: '#code' }, - { defaultToken: 'meta.method.body.vala' } ] }, - { defaultToken: 'meta.method.vala' } ] } ], - '#namespace': - [ { token: 'text', - regex: '^(?=\\s*[A-Z0-9_]+\\s*(?:{|\\(|,))', - push: - [ { token: 'text', regex: '(?=;|})', next: 'pop' }, - { token: 'constant.other.namespace.vala', - regex: '\\w+', - push: - [ { token: 'meta.namespace.vala', regex: '(?=,|;|})', next: 'pop' }, - { include: '#parens' }, - { token: 'text', - regex: '{', - push: - [ { token: 'text', regex: '}', next: 'pop' }, - { include: '#code' } ] }, - { defaultToken: 'meta.namespace.vala' } ] } ], - comment: 'This is not quite right. See the class grammar right now' } ], - '#object-types': - [ { token: 'storage.type.generic.vala', - regex: '\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*<', - push: - [ { token: 'storage.type.generic.vala', - regex: '>|[^\\w\\s,\\?<\\[()\\]]', - TODO: 'FIXME: regexp doesn\'t have js equivalent', - originalRegex: '>|[^\\w\\s,\\?<\\[(?:[,]+)\\]]', - next: 'pop' }, - { include: '#object-types' }, - { token: 'storage.type.generic.vala', - regex: '<', - push: - [ { token: 'storage.type.generic.vala', - regex: '>|[^\\w\\s,\\[\\]<]', - next: 'pop' }, - { defaultToken: 'storage.type.generic.vala' } ], - comment: 'This is just to support <>\'s with no actual type prefix' }, - { defaultToken: 'storage.type.generic.vala' } ] }, - { token: 'storage.type.object.array.vala', - regex: '\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*(?=\\[)', - push: - [ { token: 'storage.type.object.array.vala', - regex: '(?=[^\\]\\s])', - next: 'pop' }, - { token: 'text', - regex: '\\[', - push: - [ { token: 'text', regex: '\\]', next: 'pop' }, - { include: '#code' } ] }, - { defaultToken: 'storage.type.object.array.vala' } ] }, - { token: - [ 'storage.type.vala', - 'keyword.operator.dereference.vala', - 'storage.type.vala' ], - regex: '\\b(?:([a-z]\\w*)(\\.))*([A-Z]+\\w*\\b)' } ], - '#object-types-inherited': - [ { token: 'entity.other.inherited-class.vala', - regex: '\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*<', - push: - [ { token: 'entity.other.inherited-class.vala', - regex: '>|[^\\w\\s,<]', - next: 'pop' }, - { include: '#object-types' }, - { token: 'storage.type.generic.vala', - regex: '<', - push: - [ { token: 'storage.type.generic.vala', - regex: '>|[^\\w\\s,<]', - next: 'pop' }, - { defaultToken: 'storage.type.generic.vala' } ], - comment: 'This is just to support <>\'s with no actual type prefix' }, - { defaultToken: 'entity.other.inherited-class.vala' } ] }, - { token: - [ 'entity.other.inherited-class.vala', - 'keyword.operator.dereference.vala', - 'entity.other.inherited-class.vala' ], - regex: '\\b(?:([a-z]\\w*)(\\.))*([A-Z]+\\w*)' } ], - '#parameters': - [ { token: 'storage.modifier.vala', regex: 'final' }, - { include: '#primitive-arrays' }, - { include: '#primitive-types' }, - { include: '#object-types' }, - { token: 'variable.parameter.vala', regex: '\\w+' } ], - '#parens': - [ { token: 'text', - regex: '\\(', - push: - [ { token: 'text', regex: '\\)', next: 'pop' }, - { include: '#code' } ] } ], - '#primitive-arrays': - [ { token: 'storage.type.primitive.array.vala', - regex: '\\b(?:bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|int8|int16|int32|int64|uint8|uint16|uint32|uint64)(?:\\[\\])*\\b' } ], - '#primitive-types': - [ { token: 'storage.type.primitive.vala', - regex: '\\b(?:var|bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|signal|int8|int16|int32|int64|uint8|uint16|uint32|uint64)\\b', - comment: 'var is not really a primitive, but acts like one in most cases' } ], - '#storage-modifiers': - [ { token: 'storage.modifier.vala', - regex: '\\b(?:public|private|protected|internal|static|final|sealed|virtual|override|abstract|readonly|volatile|dynamic|async|unsafe|out|ref|weak|owned|unowned|const)\\b', - comment: 'Not sure about unsafe and readonly' } ], - '#strings': - [ { token: 'punctuation.definition.string.begin.vala', - regex: '@"', - push: - [ { token: 'punctuation.definition.string.end.vala', - regex: '"', - next: 'pop' }, - { token: 'constant.character.escape.vala', - regex: '\\\\.|%[\\w\\.\\-]+|\\$(?:\\w+|\\([\\w\\s\\+\\-\\*\\/]+\\))' }, - { defaultToken: 'string.quoted.interpolated.vala' } ] }, - { token: 'punctuation.definition.string.begin.vala', - regex: '"', - push: - [ { token: 'punctuation.definition.string.end.vala', - regex: '"', - next: 'pop' }, - { token: 'constant.character.escape.vala', regex: '\\\\.' }, - { token: 'constant.character.escape.vala', - regex: '%[\\w\\.\\-]+' }, - { defaultToken: 'string.quoted.double.vala' } ] }, - { token: 'punctuation.definition.string.begin.vala', - regex: '\'', - push: - [ { token: 'punctuation.definition.string.end.vala', - regex: '\'', - next: 'pop' }, - { token: 'constant.character.escape.vala', regex: '\\\\.' }, - { defaultToken: 'string.quoted.single.vala' } ] }, - { token: 'punctuation.definition.string.begin.vala', - regex: '"""', - push: - [ { token: 'punctuation.definition.string.end.vala', - regex: '"""', - next: 'pop' }, - { token: 'constant.character.escape.vala', - regex: '%[\\w\\.\\-]+' }, - { defaultToken: 'string.quoted.triple.vala' } ] } ], - '#throws': - [ { token: 'storage.modifier.vala', - regex: 'throws', - push: - [ { token: 'meta.throwables.vala', regex: '(?={|;)', next: 'pop' }, - { include: '#object-types' }, - { defaultToken: 'meta.throwables.vala' } ] } ], - '#values': - [ { include: '#strings' }, - { include: '#object-types' }, - { include: '#constants-and-special-vars' } ] } - - this.normalizeRules(); -}; - -ValaHighlightRules.metaData = { - comment: 'Based heavily on the Java bundle\'s language syntax. TODO:\n* Closures\n* Delegates\n* Properties: Better support for properties.\n* Annotations\n* Error domains\n* Named arguments\n* Array slicing, negative indexes, multidimensional\n* construct blocks\n* lock blocks?\n* regex literals\n* DocBlock syntax highlighting. (Currently importing javadoc)\n* Folding rule for comments.\n', - fileTypes: [ 'vala' ], - foldingStartMarker: '(\\{\\s*(//.*)?$|^\\s*// \\{\\{\\{)', - foldingStopMarker: '^\\s*(\\}|// \\}\\}\\}$)', - name: 'Vala', - scopeName: 'source.vala' } - - -oop.inherits(ValaHighlightRules, TextHighlightRules); - -exports.ValaHighlightRules = ValaHighlightRules; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/vala",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/vala_highlight_rules","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var Tokenizer = require("../tokenizer").Tokenizer; -var ValaHighlightRules = require("./vala_highlight_rules").ValaHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; - -var Mode = function() { - this.HighlightRules = ValaHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - this.$id = "ace/mode/vala" -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/vala_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var a=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{token:["meta.using.vala","keyword.other.using.vala","meta.using.vala","storage.modifier.using.vala","meta.using.vala","punctuation.terminator.vala"],regex:"^(\\s*)(using)\\b(?:(\\s*)([^ ;$]+)(\\s*)((?:;)?))?"},{include:"#code"}],"#all-types":[{include:"#primitive-arrays"},{include:"#primitive-types"},{include:"#object-types"}],"#annotations":[{token:["storage.type.annotation.vala","punctuation.definition.annotation-arguments.begin.vala"],regex:"(@[^ (]+)(\\()",push:[{token:"punctuation.definition.annotation-arguments.end.vala",regex:"\\)",next:"pop"},{token:["constant.other.key.vala","text","keyword.operator.assignment.vala"],regex:"(\\w*)(\\s*)(=)"},{include:"#code"},{token:"punctuation.seperator.property.vala",regex:","},{defaultToken:"meta.declaration.annotation.vala"}]},{token:"storage.type.annotation.vala",regex:"@\\w*"}],"#anonymous-classes-and-new":[{token:"keyword.control.new.vala",regex:"\\bnew\\b",push_disabled:[{token:"text",regex:"(?<=\\)|\\])(?!\\s*{)|(?<=})|(?=;)",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?<=\\)|\\])(?!\\s*{)|(?<=})|(?=;)",next:"pop"},{token:["storage.type.vala","text"],regex:"(\\w+)(\\s*)(?=\\[)",push:[{token:"text",regex:"}|(?=;|\\))",next:"pop"},{token:"text",regex:"\\[",push:[{token:"text",regex:"\\]",next:"pop"},{include:"#code"}]},{token:"text",regex:"{",push:[{token:"text",regex:"(?=})",next:"pop"},{include:"#code"}]}]},{token:"text",regex:"(?=\\w.*\\()",push:[{token:"text",regex:"(?<=\\))",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:"(?<=\\))",next:"pop"},{include:"#object-types"},{token:"text",regex:"\\(",push:[{token:"text",regex:"\\)",next:"pop"},{include:"#code"}]}]},{token:"meta.inner-class.vala",regex:"{",push:[{token:"meta.inner-class.vala",regex:"}",next:"pop"},{include:"#class-body"},{defaultToken:"meta.inner-class.vala"}]}]}],"#assertions":[{token:["keyword.control.assert.vala","meta.declaration.assertion.vala"],regex:"\\b(assert|requires|ensures)(\\s)",push:[{token:"meta.declaration.assertion.vala",regex:"$",next:"pop"},{token:"keyword.operator.assert.expression-seperator.vala",regex:":"},{include:"#code"},{defaultToken:"meta.declaration.assertion.vala"}]}],"#class":[{token:"meta.class.vala",regex:"(?=\\w?[\\w\\s]*(?:class|(?:@)?interface|enum|struct|namespace)\\s+\\w+)",push:[{token:"paren.vala",regex:"}",next:"pop"},{include:"#storage-modifiers"},{include:"#comments"},{token:["storage.modifier.vala","meta.class.identifier.vala","entity.name.type.class.vala"],regex:"(class|(?:@)?interface|enum|struct|namespace)(\\s+)([\\w\\.]+)"},{token:"storage.modifier.extends.vala",regex:":",push:[{token:"meta.definition.class.inherited.classes.vala",regex:"(?={|,)",next:"pop"},{include:"#object-types-inherited"},{include:"#comments"},{defaultToken:"meta.definition.class.inherited.classes.vala"}]},{token:["storage.modifier.implements.vala","meta.definition.class.implemented.interfaces.vala"],regex:"(,)(\\s)",push:[{token:"meta.definition.class.implemented.interfaces.vala",regex:"(?=\\{)",next:"pop"},{include:"#object-types-inherited"},{include:"#comments"},{defaultToken:"meta.definition.class.implemented.interfaces.vala"}]},{token:"paren.vala",regex:"{",push:[{token:"paren.vala",regex:"(?=})",next:"pop"},{include:"#class-body"},{defaultToken:"meta.class.body.vala"}]},{defaultToken:"meta.class.vala"}],comment:"attempting to put namespace in here."}],"#class-body":[{include:"#comments"},{include:"#class"},{include:"#enums"},{include:"#methods"},{include:"#annotations"},{include:"#storage-modifiers"},{include:"#code"}],"#code":[{include:"#comments"},{include:"#class"},{token:"text",regex:"{",push:[{token:"text",regex:"}",next:"pop"},{include:"#code"}]},{include:"#assertions"},{include:"#parens"},{include:"#constants-and-special-vars"},{include:"#anonymous-classes-and-new"},{include:"#keywords"},{include:"#storage-modifiers"},{include:"#strings"},{include:"#all-types"}],"#comments":[{token:"punctuation.definition.comment.vala",regex:"/\\*\\*/"},{include:"text.html.javadoc"},{include:"#comments-inline"}],"#comments-inline":[{token:"punctuation.definition.comment.vala",regex:"/\\*",push:[{token:"punctuation.definition.comment.vala",regex:"\\*/",next:"pop"},{defaultToken:"comment.block.vala"}]},{token:["text","punctuation.definition.comment.vala","comment.line.double-slash.vala"],regex:"(\\s*)(//)(.*$)"}],"#constants-and-special-vars":[{token:"constant.language.vala",regex:"\\b(?:true|false|null)\\b"},{token:"variable.language.vala",regex:"\\b(?:this|base)\\b"},{token:"constant.numeric.vala",regex:"\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:[LlFfUuDd]|UL|ul)?\\b"},{token:["keyword.operator.dereference.vala","constant.other.vala"],regex:"((?:\\.)?)\\b([A-Z][A-Z0-9_]+)(?!<|\\.class|\\s*\\w+\\s*=)\\b"}],"#enums":[{token:"text",regex:"^(?=\\s*[A-Z0-9_]+\\s*(?:{|\\(|,))",push:[{token:"text",regex:"(?=;|})",next:"pop"},{token:"constant.other.enum.vala",regex:"\\w+",push:[{token:"meta.enum.vala",regex:"(?=,|;|})",next:"pop"},{include:"#parens"},{token:"text",regex:"{",push:[{token:"text",regex:"}",next:"pop"},{include:"#class-body"}]},{defaultToken:"meta.enum.vala"}]}]}],"#keywords":[{token:"keyword.control.catch-exception.vala",regex:"\\b(?:try|catch|finally|throw)\\b"},{token:"keyword.control.vala",regex:"\\?|:|\\?\\?"},{token:"keyword.control.vala",regex:"\\b(?:return|break|case|continue|default|do|while|for|foreach|switch|if|else|in|yield|get|set|value)\\b"},{token:"keyword.operator.vala",regex:"\\b(?:typeof|is|as)\\b"},{token:"keyword.operator.comparison.vala",regex:"==|!=|<=|>=|<>|<|>"},{token:"keyword.operator.assignment.vala",regex:"="},{token:"keyword.operator.increment-decrement.vala",regex:"\\-\\-|\\+\\+"},{token:"keyword.operator.arithmetic.vala",regex:"\\-|\\+|\\*|\\/|%"},{token:"keyword.operator.logical.vala",regex:"!|&&|\\|\\|"},{token:"keyword.operator.dereference.vala",regex:"\\.(?=\\S)",originalRegex:"(?<=\\S)\\.(?=\\S)"},{token:"punctuation.terminator.vala",regex:";"},{token:"keyword.operator.ownership",regex:"owned|unowned"}],"#methods":[{token:"meta.method.vala",regex:"(?!new)(?=\\w.*\\s+)(?=[^=]+\\()",push:[{token:"paren.vala",regex:"}|(?=;)",next:"pop"},{include:"#storage-modifiers"},{token:["entity.name.function.vala","meta.method.identifier.vala"],regex:"([\\~\\w\\.]+)(\\s*\\()",push:[{token:"meta.method.identifier.vala",regex:"\\)",next:"pop"},{include:"#parameters"},{defaultToken:"meta.method.identifier.vala"}]},{token:"meta.method.return-type.vala",regex:"(?=\\w.*\\s+\\w+\\s*\\()",push:[{token:"meta.method.return-type.vala",regex:"(?=\\w+\\s*\\()",next:"pop"},{include:"#all-types"},{defaultToken:"meta.method.return-type.vala"}]},{include:"#throws"},{token:"paren.vala",regex:"{",push:[{token:"paren.vala",regex:"(?=})",next:"pop"},{include:"#code"},{defaultToken:"meta.method.body.vala"}]},{defaultToken:"meta.method.vala"}]}],"#namespace":[{token:"text",regex:"^(?=\\s*[A-Z0-9_]+\\s*(?:{|\\(|,))",push:[{token:"text",regex:"(?=;|})",next:"pop"},{token:"constant.other.namespace.vala",regex:"\\w+",push:[{token:"meta.namespace.vala",regex:"(?=,|;|})",next:"pop"},{include:"#parens"},{token:"text",regex:"{",push:[{token:"text",regex:"}",next:"pop"},{include:"#code"}]},{defaultToken:"meta.namespace.vala"}]}],comment:"This is not quite right. See the class grammar right now"}],"#object-types":[{token:"storage.type.generic.vala",regex:"\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*<",push:[{token:"storage.type.generic.vala",regex:">|[^\\w\\s,\\?<\\[()\\]]",TODO:"FIXME: regexp doesn't have js equivalent",originalRegex:">|[^\\w\\s,\\?<\\[(?:[,]+)\\]]",next:"pop"},{include:"#object-types"},{token:"storage.type.generic.vala",regex:"<",push:[{token:"storage.type.generic.vala",regex:">|[^\\w\\s,\\[\\]<]",next:"pop"},{defaultToken:"storage.type.generic.vala"}],comment:"This is just to support <>'s with no actual type prefix"},{defaultToken:"storage.type.generic.vala"}]},{token:"storage.type.object.array.vala",regex:"\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*(?=\\[)",push:[{token:"storage.type.object.array.vala",regex:"(?=[^\\]\\s])",next:"pop"},{token:"text",regex:"\\[",push:[{token:"text",regex:"\\]",next:"pop"},{include:"#code"}]},{defaultToken:"storage.type.object.array.vala"}]},{token:["storage.type.vala","keyword.operator.dereference.vala","storage.type.vala"],regex:"\\b(?:([a-z]\\w*)(\\.))*([A-Z]+\\w*\\b)"}],"#object-types-inherited":[{token:"entity.other.inherited-class.vala",regex:"\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*<",push:[{token:"entity.other.inherited-class.vala",regex:">|[^\\w\\s,<]",next:"pop"},{include:"#object-types"},{token:"storage.type.generic.vala",regex:"<",push:[{token:"storage.type.generic.vala",regex:">|[^\\w\\s,<]",next:"pop"},{defaultToken:"storage.type.generic.vala"}],comment:"This is just to support <>'s with no actual type prefix"},{defaultToken:"entity.other.inherited-class.vala"}]},{token:["entity.other.inherited-class.vala","keyword.operator.dereference.vala","entity.other.inherited-class.vala"],regex:"\\b(?:([a-z]\\w*)(\\.))*([A-Z]+\\w*)"}],"#parameters":[{token:"storage.modifier.vala",regex:"final"},{include:"#primitive-arrays"},{include:"#primitive-types"},{include:"#object-types"},{token:"variable.parameter.vala",regex:"\\w+"}],"#parens":[{token:"text",regex:"\\(",push:[{token:"text",regex:"\\)",next:"pop"},{include:"#code"}]}],"#primitive-arrays":[{token:"storage.type.primitive.array.vala",regex:"\\b(?:bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|int8|int16|int32|int64|uint8|uint16|uint32|uint64)(?:\\[\\])*\\b"}],"#primitive-types":[{token:"storage.type.primitive.vala",regex:"\\b(?:var|bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|signal|int8|int16|int32|int64|uint8|uint16|uint32|uint64)\\b",comment:"var is not really a primitive, but acts like one in most cases"}],"#storage-modifiers":[{token:"storage.modifier.vala",regex:"\\b(?:public|private|protected|internal|static|final|sealed|virtual|override|abstract|readonly|volatile|dynamic|async|unsafe|out|ref|weak|owned|unowned|const)\\b",comment:"Not sure about unsafe and readonly"}],"#strings":[{token:"punctuation.definition.string.begin.vala",regex:'@"',push:[{token:"punctuation.definition.string.end.vala",regex:'"',next:"pop"},{token:"constant.character.escape.vala",regex:"\\\\.|%[\\w\\.\\-]+|\\$(?:\\w+|\\([\\w\\s\\+\\-\\*\\/]+\\))"},{defaultToken:"string.quoted.interpolated.vala"}]},{token:"punctuation.definition.string.begin.vala",regex:'"',push:[{token:"punctuation.definition.string.end.vala",regex:'"',next:"pop"},{token:"constant.character.escape.vala",regex:"\\\\."},{token:"constant.character.escape.vala",regex:"%[\\w\\.\\-]+"},{defaultToken:"string.quoted.double.vala"}]},{token:"punctuation.definition.string.begin.vala",regex:"'",push:[{token:"punctuation.definition.string.end.vala",regex:"'",next:"pop"},{token:"constant.character.escape.vala",regex:"\\\\."},{defaultToken:"string.quoted.single.vala"}]},{token:"punctuation.definition.string.begin.vala",regex:'"""',push:[{token:"punctuation.definition.string.end.vala",regex:'"""',next:"pop"},{token:"constant.character.escape.vala",regex:"%[\\w\\.\\-]+"},{defaultToken:"string.quoted.triple.vala"}]}],"#throws":[{token:"storage.modifier.vala",regex:"throws",push:[{token:"meta.throwables.vala",regex:"(?={|;)",next:"pop"},{include:"#object-types"},{defaultToken:"meta.throwables.vala"}]}],"#values":[{include:"#strings"},{include:"#object-types"},{include:"#constants-and-special-vars"}]},this.normalizeRules()};r.metaData={comment:"Based heavily on the Java bundle's language syntax. TODO:\n* Closures\n* Delegates\n* Properties: Better support for properties.\n* Annotations\n* Error domains\n* Named arguments\n* Array slicing, negative indexes, multidimensional\n* construct blocks\n* lock blocks?\n* regex literals\n* DocBlock syntax highlighting. (Currently importing javadoc)\n* Folding rule for comments.\n",fileTypes:["vala"],foldingStartMarker:"(\\{\\s*(//.*)?$|^\\s*// \\{\\{\\{)",foldingStopMarker:"^\\s*(\\}|// \\}\\}\\}$)",name:"Vala",scopeName:"source.vala"},a.inherits(r,o),t.ValaHighlightRules=r}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var a=e("../../lib/oop"),o=e("../../range").Range,r=e("./fold_mode").FoldMode,i=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};a.inherits(i,r),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var a=e.getLine(n);if(this.singleLineBlockCommentRe.test(a)&&!this.startRegionRe.test(a)&&!this.tripleStarBlockCommentRe.test(a))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(a)?"start":o},this.getFoldWidgetRange=function(e,t,n,a){var o=e.getLine(n);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,n);var r=o.match(this.foldingStartMarker);if(r){var i=r.index;if(r[1])return this.openingBracketBlock(e,r[1],n,i);var s=e.getCommentFoldRange(n,i+r[0].length,1);return s&&!s.isMultiLine()&&(a?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var r=o.match(this.foldingStopMarker);if(r){var i=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],n,i):e.getCommentFoldRange(n,i,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),a=n.search(/\S/),r=t,i=n.length;t+=1;for(var s=t,l=e.getLength();++tc)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=r)break;if(u.isMultiLine())t=u.end.row;else if(a==c)break}s=t}}return new o(r,i,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var a=t.search(/\s*$/),r=e.getLength(),i=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++ni)return new o(i,a,u,t.length)}}.call(i.prototype)}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var a,o=e("../../lib/oop"),r=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],c=["text","paren.rparen","punctuation.operator","comment"],u={},d=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t]?a=u[t]:void(a=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},g=function(){this.add("braces","insertion",function(e,t,n,o,r){var i=n.getCursorPosition(),l=o.doc.getLine(i.row);if("{"==r){d(n);var c=n.getSelectionRange(),u=o.doc.getTextRange(c);if(""!==u&&"{"!==u&&n.getWrapBehavioursEnabled())return{text:"{"+u+"}",selection:!1};if(g.isSaneInsertion(n,o))return/[\]\}\)]/.test(l[i.column])||n.inMultiSelectMode?(g.recordAutoInsert(n,o,"}"),{text:"{}",selection:[1,1]}):(g.recordMaybeInsert(n,o,"{"),{text:"{",selection:[1,1]})}else if("}"==r){d(n);var p=l.substring(i.column,i.column+1);if("}"==p){var m=o.$findOpeningBracket("}",{column:i.column+1,row:i.row});if(null!==m&&g.isAutoInsertedClosing(i,l,r))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==r||"\r\n"==r){d(n);var h="";g.isMaybeInsertedClosing(i,l)&&(h=s.stringRepeat("}",a.maybeInsertedBrackets),g.clearMaybeInsertedClosing());var p=l.substring(i.column,i.column+1);if("}"===p){var v=o.findMatchingBracket({row:i.row,column:i.column+1},"}");if(!v)return null;var x=this.$getIndent(o.getLine(v.row))}else{if(!h)return void g.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var k=x+o.getTabString();return{text:"\n"+k+"\n"+x+h,selection:[1,k.length,1,k.length]}}g.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"{"==i){d(n);var s=o.doc.getLine(r.start.row),l=s.substring(r.end.column,r.end.column+1);if("}"==l)return r.end.column++,r;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,a,o){if("("==o){d(n);var r=n.getSelectionRange(),i=a.doc.getTextRange(r);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"("+i+")",selection:!1};if(g.isSaneInsertion(n,a))return g.recordAutoInsert(n,a,")"),{text:"()",selection:[1,1]}}else if(")"==o){d(n);var s=n.getCursorPosition(),l=a.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if(")"==c){var u=a.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==u&&g.isAutoInsertedClosing(s,l,o))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,a,o){var r=a.doc.getTextRange(o);if(!o.isMultiLine()&&"("==r){d(n);var i=a.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(")"==s)return o.end.column++,o}}),this.add("brackets","insertion",function(e,t,n,a,o){if("["==o){d(n);var r=n.getSelectionRange(),i=a.doc.getTextRange(r);if(""!==i&&n.getWrapBehavioursEnabled())return{text:"["+i+"]",selection:!1};if(g.isSaneInsertion(n,a))return g.recordAutoInsert(n,a,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){d(n);var s=n.getCursorPosition(),l=a.doc.getLine(s.row),c=l.substring(s.column,s.column+1);if("]"==c){var u=a.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==u&&g.isAutoInsertedClosing(s,l,o))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,a,o){var r=a.doc.getTextRange(o);if(!o.isMultiLine()&&"["==r){d(n);var i=a.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if("]"==s)return o.end.column++,o}}),this.add("string_dquotes","insertion",function(e,t,n,a,o){if('"'==o||"'"==o){d(n);var r=o,i=n.getSelectionRange(),s=a.doc.getTextRange(i);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:r+s+r,selection:!1};var l=n.getCursorPosition(),c=a.doc.getLine(l.row),u=c.substring(l.column-1,l.column),g=c.substring(l.column,l.column+1),p=a.getTokenAt(l.row,l.column),m=a.getTokenAt(l.row,l.column+1);if("\\"==u&&p&&/escape/.test(p.type))return null;var h,v=p&&/string/.test(p.type),x=!m||/string/.test(m.type);if(g==r)h=v!==x;else{if(v&&!x)return null;if(v&&x)return null;var k=a.$mode.tokenRe;k.lastIndex=0;var f=k.test(u);k.lastIndex=0;var b=k.test(u);if(f||b)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;h=!0}return{text:h?r+r:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,a,o){var r=a.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==r||"'"==r)){d(n);var i=a.doc.getLine(o.start.row),s=i.substring(o.start.column+1,o.start.column+2);if(s==r)return o.end.column++,o}})};g.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),a=new i(t,n.row,n.column);if(!this.$matchTokenType(a.getCurrentToken()||"text",l)){var o=new i(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",l))return!1}return a.stepForward(),a.getCurrentTokenRow()!==n.row||this.$matchTokenType(a.getCurrentToken()||"text",c)},g.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},g.recordAutoInsert=function(e,t,n){var o=e.getCursorPosition(),r=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,r,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=o.row,a.autoInsertedLineEnd=n+r.substr(o.column),a.autoInsertedBrackets++},g.recordMaybeInsert=function(e,t,n){var o=e.getCursorPosition(),r=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,r)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=o.row,a.maybeInsertedLineStart=r.substr(0,o.column)+n,a.maybeInsertedLineEnd=r.substr(o.column),a.maybeInsertedBrackets++},g.isAutoInsertedClosing=function(e,t,n){return a.autoInsertedBrackets>0&&e.row===a.autoInsertedRow&&n===a.autoInsertedLineEnd[0]&&t.substr(e.column)===a.autoInsertedLineEnd},g.isMaybeInsertedClosing=function(e,t){return a.maybeInsertedBrackets>0&&e.row===a.maybeInsertedRow&&t.substr(e.column)===a.maybeInsertedLineEnd&&t.substr(0,e.column)==a.maybeInsertedLineStart},g.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},g.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},o.inherits(g,r),t.CstyleBehaviour=g}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var a=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var r=o[1].length,i=e.findMatchingBracket({row:t,column:r});if(!i||i.row==t)return 0;var s=this.$getIndent(e.getLine(i.row));e.replace(new a(t,0,t,r-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o}),define("ace/mode/vala",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/vala_highlight_rules","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var a=e("../lib/oop"),o=e("./text").Mode,r=(e("../tokenizer").Tokenizer,e("./vala_highlight_rules").ValaHighlightRules),i=(e("./folding/cstyle").FoldMode,e("./behaviour/cstyle").CstyleBehaviour),s=e("./folding/cstyle").FoldMode,l=e("./matching_brace_outdent").MatchingBraceOutdent,c=function(){this.HighlightRules=r,this.$outdent=new l,this.$behaviour=new i,this.foldingRules=new s};a.inherits(c,o),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var a=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),r=o.tokens,i=o.state;if(r.length&&"comment"==r[r.length-1].type)return a;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(a+=n)}else if("doc-start"==e){if("start"==i||"no_regex"==i)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(a+=" "),a+="* ")}return a},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/vala"}.call(c.prototype),t.Mode=c}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-vbscript.js b/www/js/vendor/ace/mode-vbscript.js index fe3420bd7..e48eccc1a 100755 --- a/www/js/vendor/ace/mode-vbscript.js +++ b/www/js/vendor/ace/mode-vbscript.js @@ -1,213 +1 @@ -define("ace/mode/vbscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var VBScriptHighlightRules = function() { - - this.$rules = { - "start": [ - { - token: [ - "meta.ending-space" - ], - regex: "$" - }, - { - token: [ - null - ], - regex: "^(?=\\t)", - next: "state_3" - }, - { - token: [null], - regex: "^(?= )", - next: "state_4" - }, - { - token: [ - "text", - "storage.type.function.asp", - "text", - "entity.name.function.asp", - "text", - "punctuation.definition.parameters.asp", - "variable.parameter.function.asp", - "punctuation.definition.parameters.asp" - ], - regex: "^(\\s*)(Function|Sub)(\\s*)([a-zA-Z_]\\w*)(\\s*)(\\()([^)]*)(\\))" - }, - { - token: "punctuation.definition.comment.asp", - regex: "'|REM", - next: "comment" - }, - { - token: [ - "keyword.control.asp" - ], - regex: "\\b(?:If|Then|Else|ElseIf|Else If|End If|While|Wend|For|To|Each|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub|IIf)\\b" - }, - { - token: "keyword.operator.asp", - regex: "\\b(?:Mod|And|Not|Or|Xor|as)\\b" - }, - { - token: "storage.type.asp", - regex: "Dim|Call|Class|Const|Dim|Redim|Function|Sub|Private Sub|Public Sub|End sub|End Function|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo" - }, - { - token: "storage.modifier.asp", - regex: "\\b(?:Private|Public|Default)\\b" - }, - { - token: "constant.language.asp", - regex: "\\b(?:Empty|False|Nothing|Null|True)\\b" - }, - { - token: "punctuation.definition.string.begin.asp", - regex: '"', - next: "string" - }, - { - token: [ - "punctuation.definition.variable.asp" - ], - regex: "(\\$)[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b\\s*" - }, - { - token: "support.class.asp", - regex: "\\b(?:Application|ObjectContext|Request|Response|Server|Session)\\b" - }, - { - token: "support.class.collection.asp", - regex: "\\b(?:Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables)\\b" - }, - { - token: "support.constant.asp", - regex: "\\b(?:TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout)\\b" - }, - { - token: "support.function.asp", - regex: "\\b(?:Lock|Unlock|SetAbort|SetComplete|BinaryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\\b" - }, - { - token: "support.function.event.asp", - regex: "\\b(?:Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart)\\b" - }, - { - token: "support.function.vb.asp", - regex: "\\b(?:Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year)\\b" - }, - { - token: [ - "constant.numeric.asp" - ], - regex: "-?\\b(?:(?:0(?:x|X)[0-9a-fA-F]*)|(?:(?:[0-9]+\\.?[0-9]*)|(?:\\.[0-9]+))(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b" - }, - { - token: "support.type.vb.asp", - regex: "\\b(?:vbtrue|vbfalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|int32|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray)\\b" - }, - { - token: [ - "entity.name.function.asp" - ], - regex: "(?:(\\b[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b)(?=\\(\\)?))" - }, - { - token: [ - "keyword.operator.asp" - ], - regex: "\\-|\\+|\\*\\\/|\\>|\\<|\\=|\\&" - } - ], - "state_3": [ - { - token: [ - "meta.odd-tab.tabs", - "meta.even-tab.tabs" - ], - regex: "(\\t)(\\t)?" - }, - { - token: "meta.leading-space", - regex: "(?=[^\\t])", - next: "start" - }, - { - token: "meta.leading-space", - regex: ".", - next: "state_3" - } - ], - "state_4": [ - { - token: ["meta.odd-tab.spaces", "meta.even-tab.spaces"], - regex: "( )( )?" - }, - { - token: "meta.leading-space", - regex: "(?=[^ ])", - next: "start" - }, - { - defaultToken: "meta.leading-space" - } - ], - "comment": [ - { - token: "comment.line.apostrophe.asp", - regex: "$|(?=(?:%>))", - next: "start" - }, - { - defaultToken: "comment.line.apostrophe.asp" - } - ], - "string": [ - { - token: "constant.character.escape.apostrophe.asp", - regex: '""' - }, - { - token: "string.quoted.double.asp", - regex: '"', - next: "start" - }, - { - defaultToken: "string.quoted.double.asp" - } - ] -} - -}; - -oop.inherits(VBScriptHighlightRules, TextHighlightRules); - -exports.VBScriptHighlightRules = VBScriptHighlightRules; -}); - -define("ace/mode/vbscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vbscript_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var VBScriptHighlightRules = require("./vbscript_highlight_rules").VBScriptHighlightRules; - -var Mode = function() { - this.HighlightRules = VBScriptHighlightRules; -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = ["'", "REM"]; - - this.$id = "ace/mode/vbscript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/vbscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var a=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,r=function(){this.$rules={start:[{token:["meta.ending-space"],regex:"$"},{token:[null],regex:"^(?=\\t)",next:"state_3"},{token:[null],regex:"^(?= )",next:"state_4"},{token:["text","storage.type.function.asp","text","entity.name.function.asp","text","punctuation.definition.parameters.asp","variable.parameter.function.asp","punctuation.definition.parameters.asp"],regex:"^(\\s*)(Function|Sub)(\\s*)([a-zA-Z_]\\w*)(\\s*)(\\()([^)]*)(\\))"},{token:"punctuation.definition.comment.asp",regex:"'|REM",next:"comment"},{token:["keyword.control.asp"],regex:"\\b(?:If|Then|Else|ElseIf|Else If|End If|While|Wend|For|To|Each|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub|IIf)\\b"},{token:"keyword.operator.asp",regex:"\\b(?:Mod|And|Not|Or|Xor|as)\\b"},{token:"storage.type.asp",regex:"Dim|Call|Class|Const|Dim|Redim|Function|Sub|Private Sub|Public Sub|End sub|End Function|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo"},{token:"storage.modifier.asp",regex:"\\b(?:Private|Public|Default)\\b"},{token:"constant.language.asp",regex:"\\b(?:Empty|False|Nothing|Null|True)\\b"},{token:"punctuation.definition.string.begin.asp",regex:'"',next:"string"},{token:["punctuation.definition.variable.asp"],regex:"(\\$)[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b\\s*"},{token:"support.class.asp",regex:"\\b(?:Application|ObjectContext|Request|Response|Server|Session)\\b"},{token:"support.class.collection.asp",regex:"\\b(?:Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables)\\b"},{token:"support.constant.asp",regex:"\\b(?:TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout)\\b"},{token:"support.function.asp",regex:"\\b(?:Lock|Unlock|SetAbort|SetComplete|BinaryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\\b"},{token:"support.function.event.asp",regex:"\\b(?:Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart)\\b"},{token:"support.function.vb.asp",regex:"\\b(?:Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year)\\b"},{token:["constant.numeric.asp"],regex:"-?\\b(?:(?:0(?:x|X)[0-9a-fA-F]*)|(?:(?:[0-9]+\\.?[0-9]*)|(?:\\.[0-9]+))(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b"},{token:"support.type.vb.asp",regex:"\\b(?:vbtrue|vbfalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|int32|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray)\\b"},{token:["entity.name.function.asp"],regex:"(?:(\\b[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b)(?=\\(\\)?))"},{token:["keyword.operator.asp"],regex:"\\-|\\+|\\*\\/|\\>|\\<|\\=|\\&"}],state_3:[{token:["meta.odd-tab.tabs","meta.even-tab.tabs"],regex:"(\\t)(\\t)?"},{token:"meta.leading-space",regex:"(?=[^\\t])",next:"start"},{token:"meta.leading-space",regex:".",next:"state_3"}],state_4:[{token:["meta.odd-tab.spaces","meta.even-tab.spaces"],regex:"( )( )?"},{token:"meta.leading-space",regex:"(?=[^ ])",next:"start"},{defaultToken:"meta.leading-space"}],comment:[{token:"comment.line.apostrophe.asp",regex:"$|(?=(?:%>))",next:"start"},{defaultToken:"comment.line.apostrophe.asp"}],string:[{token:"constant.character.escape.apostrophe.asp",regex:'""'},{token:"string.quoted.double.asp",regex:'"',next:"start"},{defaultToken:"string.quoted.double.asp"}]}};a.inherits(r,o),t.VBScriptHighlightRules=r}),define("ace/mode/vbscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vbscript_highlight_rules"],function(e,t,n){"use strict";var a=e("../lib/oop"),o=e("./text").Mode,r=e("./vbscript_highlight_rules").VBScriptHighlightRules,i=function(){this.HighlightRules=r};a.inherits(i,o),function(){this.lineCommentStart=["'","REM"],this.$id="ace/mode/vbscript"}.call(i.prototype),t.Mode=i}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-velocity.js b/www/js/vendor/ace/mode-velocity.js index 2130fdc2d..2b8f78ec2 100755 --- a/www/js/vendor/ace/mode-velocity.js +++ b/www/js/vendor/ace/mode-velocity.js @@ -1,2709 +1,2 @@ -define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["punctuation.operator", "support.function"], - regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : ["punctuation.operator", "support.function.dom"], - regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : ["punctuation.operator", "support.constant"], - regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "keyword.operator", - regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = JavaScriptHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CstyleBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start" || state == "no_regex") { - var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start" || endState == "no_regex") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "* "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); - worker.attachToDocument(session.getDocument()); - - worker.on("jslint", function(results) { - session.setAnnotations(results.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/javascript"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = CssHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.foldingRules = "cStyle"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.createWorker = function(session) { - var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - worker.on("csslint", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/css"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); - -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === " -1; -} - -(function() { - - this.getFoldWidget = function(session, foldStyle, row) { - var tag = this._getFirstTagInLine(session, row); - - if (!tag) - return ""; - - if (tag.closing || (!tag.tagName && tag.selfClosing)) - return foldStyle == "markbeginend" ? "end" : ""; - - if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) - return ""; - - if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) - return ""; - - return "start"; - }; - this._getFirstTagInLine = function(session, row) { - var tokens = session.getTokens(row); - var tag = new Tag(); - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (is(token, "tag-open")) { - tag.end.column = tag.start.column + token.value.length; - tag.closing = is(token, "end-tag-open"); - token = tokens[++i]; - if (!token) - return null; - tag.tagName = token.value; - tag.end.column += token.value.length; - for (i++; i < tokens.length; i++) { - token = tokens[i]; - tag.end.column += token.value.length; - if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - break; - } - } - return tag; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - return tag; - } - tag.start.column += token.value.length; - } - - return null; - }; - - this._findEndTagInLine = function(session, row, tagName, startColumn) { - var tokens = session.getTokens(row); - var column = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - column += token.value.length; - if (column < startColumn) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var firstTag = this._getFirstTagInLine(session, row); - - if (!firstTag) - return null; - - var isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var MixedFoldMode = require("./mixed").FoldMode; -var XmlFoldMode = require("./xml").FoldMode; -var CStyleFoldMode = require("./cstyle").FoldMode; - -var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { - MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { - "js-": new CStyleFoldMode(), - "css-": new CStyleFoldMode() - }); -}; - -oop.inherits(FoldMode, MixedFoldMode); - -}); - -define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var TokenIterator = require("../token_iterator").TokenIterator; - -var commonAttributes = [ - "accesskey", - "class", - "contenteditable", - "contextmenu", - "dir", - "draggable", - "dropzone", - "hidden", - "id", - "inert", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "lang", - "spellcheck", - "style", - "tabindex", - "title", - "translate" -]; - -var eventAttributes = [ - "onabort", - "onblur", - "oncancel", - "oncanplay", - "oncanplaythrough", - "onchange", - "onclick", - "onclose", - "oncontextmenu", - "oncuechange", - "ondblclick", - "ondrag", - "ondragend", - "ondragenter", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onended", - "onerror", - "onfocus", - "oninput", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeyup", - "onload", - "onloadeddata", - "onloadedmetadata", - "onloadstart", - "onmousedown", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onpause", - "onplay", - "onplaying", - "onprogress", - "onratechange", - "onreset", - "onscroll", - "onseeked", - "onseeking", - "onselect", - "onshow", - "onstalled", - "onsubmit", - "onsuspend", - "ontimeupdate", - "onvolumechange", - "onwaiting" -]; - -var globalAttributes = commonAttributes.concat(eventAttributes); - -var attributeMap = { - "html": ["manifest"], - "head": [], - "title": [], - "base": ["href", "target"], - "link": ["href", "hreflang", "rel", "media", "type", "sizes"], - "meta": ["http-equiv", "name", "content", "charset"], - "style": ["type", "media", "scoped"], - "script": ["charset", "type", "src", "defer", "async"], - "noscript": ["href"], - "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], - "section": [], - "nav": [], - "article": ["pubdate"], - "aside": [], - "h1": [], - "h2": [], - "h3": [], - "h4": [], - "h5": [], - "h6": [], - "header": [], - "footer": [], - "address": [], - "main": [], - "p": [], - "hr": [], - "pre": [], - "blockquote": ["cite"], - "ol": ["start", "reversed"], - "ul": [], - "li": ["value"], - "dl": [], - "dt": [], - "dd": [], - "figure": [], - "figcaption": [], - "div": [], - "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], - "em": [], - "strong": [], - "small": [], - "s": [], - "cite": [], - "q": ["cite"], - "dfn": [], - "abbr": [], - "data": [], - "time": ["datetime"], - "code": [], - "var": [], - "samp": [], - "kbd": [], - "sub": [], - "sup": [], - "i": [], - "b": [], - "u": [], - "mark": [], - "ruby": [], - "rt": [], - "rp": [], - "bdi": [], - "bdo": [], - "span": [], - "br": [], - "wbr": [], - "ins": ["cite", "datetime"], - "del": ["cite", "datetime"], - "img": ["alt", "src", "height", "width", "usemap", "ismap"], - "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], - "embed": ["src", "height", "width", "type"], - "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], - "param": ["name", "value"], - "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], - "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], - "source": ["src", "type", "media"], - "track": ["kind", "src", "srclang", "label", "default"], - "canvas": ["width", "height"], - "map": ["name"], - "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], - "svg": [], - "math": [], - "table": ["summary"], - "caption": [], - "colgroup": ["span"], - "col": ["span"], - "tbody": [], - "thead": [], - "tfoot": [], - "tr": [], - "td": ["headers", "rowspan", "colspan"], - "th": ["headers", "rowspan", "colspan", "scope"], - "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], - "fieldset": ["disabled", "form", "name"], - "legend": [], - "label": ["form", "for"], - "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "required", "size", "src", "step", "width", "files", "value"], - "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], - "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], - "datalist": [], - "optgroup": ["disabled", "label"], - "option": ["disabled", "selected", "label", "value"], - "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "required", "rows", "cols", "wrap"], - "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], - "output": ["for", "form", "name"], - "progress": ["value", "max"], - "meter": ["value", "min", "max", "low", "high", "optimum"], - "details": ["open"], - "summary": [], - "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], - "menu": ["type", "label"], - "dialog": ["open"] -}; - -var elements = Object.keys(attributeMap); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -function findTagName(session, pos) { - var iterator = new TokenIterator(session, pos.row, pos.column); - var token = iterator.getCurrentToken(); - while (token && !is(token, "tag-name")){ - token = iterator.stepBackward(); - } - if (token) - return token.value; -} - -var HtmlCompletions = function() { - -}; - -(function() { - - this.getCompletions = function(state, session, pos, prefix) { - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) - return this.getTagCompletions(state, session, pos, prefix); - if (is(token, "tag-whitespace") || is(token, "attribute-name")) - return this.getAttributeCompetions(state, session, pos, prefix); - - return []; - }; - - this.getTagCompletions = function(state, session, pos, prefix) { - return elements.map(function(element){ - return { - value: element, - meta: "tag", - score: Number.MAX_VALUE - }; - }); - }; - - this.getAttributeCompetions = function(state, session, pos, prefix) { - var tagName = findTagName(session, pos); - if (!tagName) - return []; - var attributes = globalAttributes; - if (tagName in attributeMap) { - attributes = attributes.concat(attributeMap[tagName]); - } - return attributes.map(function(attribute){ - return { - caption: attribute, - snippet: attribute + '="$0"', - meta: "attribute", - score: Number.MAX_VALUE - }; - }); - }; - -}).call(HtmlCompletions.prototype); - -exports.HtmlCompletions = HtmlCompletions; -}); - -define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextMode = require("./text").Mode; -var JavaScriptMode = require("./javascript").Mode; -var CssMode = require("./css").Mode; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; -var HtmlFoldMode = require("./folding/html").FoldMode; -var HtmlCompletions = require("./html_completions").HtmlCompletions; -var WorkerClient = require("../worker/worker_client").WorkerClient; -var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; -var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; - -var Mode = function(options) { - this.fragmentContext = options && options.fragmentContext; - this.HighlightRules = HtmlHighlightRules; - this.$behaviour = new XmlBehaviour(); - this.$completer = new HtmlCompletions(); - - this.createModeDelegates({ - "js-": JavaScriptMode, - "css-": CssMode - }); - - this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.blockComment = {start: ""}; - - this.voidElements = lang.arrayToMap(voidElements); - - this.getNextLineIndent = function(state, line, tab) { - return this.$getIndent(line); - }; - - this.checkOutdent = function(state, line, input) { - return false; - }; - - this.getCompletions = function(state, session, pos, prefix) { - return this.$completer.getCompletions(state, session, pos, prefix); - }; - - this.createWorker = function(session) { - if (this.constructor != Mode) - return; - var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); - worker.attachToDocument(session.getDocument()); - - if (this.fragmentContext) - worker.call("setOptions", [{context: this.fragmentContext}]); - - worker.on("error", function(e) { - session.setAnnotations(e.data); - }); - - worker.on("terminate", function() { - session.clearAnnotations(); - }); - - return worker; - }; - - this.$id = "ace/mode/html"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); - -define("ace/mode/velocity_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; - -var VelocityHighlightRules = function() { - HtmlHighlightRules.call(this); - - var builtinConstants = lang.arrayToMap( - ('true|false|null').split('|') - ); - - var builtinFunctions = lang.arrayToMap( - ("_DateTool|_DisplayTool|_EscapeTool|_FieldTool|_MathTool|_NumberTool|_SerializerTool|_SortTool|_StringTool|_XPathTool").split('|') - ); - - var builtinVariables = lang.arrayToMap( - ('$contentRoot|$foreach').split('|') - ); - - var keywords = lang.arrayToMap( - ("#set|#macro|#include|#parse|" + - "#if|#elseif|#else|#foreach|" + - "#break|#end|#stop" - ).split('|') - ); - - this.$rules.start.push( - { - token : "comment", - regex : "##.*$" - },{ - token : "comment.block", // multi line comment - regex : "#\\*", - next : "vm_comment" - }, { - token : "string.regexp", - regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : function(value) { - if (keywords.hasOwnProperty(value)) - return "keyword"; - else if (builtinConstants.hasOwnProperty(value)) - return "constant.language"; - else if (builtinVariables.hasOwnProperty(value)) - return "variable.language"; - else if (builtinFunctions.hasOwnProperty(value) || builtinFunctions.hasOwnProperty(value.substring(1))) - return "support.function"; - else if (value == "debugger") - return "invalid.deprecated"; - else - if(value.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*)$/)) - return "variable"; - return "identifier"; - }, - regex : "[a-zA-Z$#][a-zA-Z0-9_]*\\b" - }, { - token : "keyword.operator", - regex : "!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|" - }, { - token : "lparen", - regex : "[[({]" - }, { - token : "rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ); - - this.$rules["vm_comment"] = [ - { - token : "comment", // closing comment - regex : "\\*#|-->", - next : "start" - }, { - defaultToken: "comment" - } - ]; - - this.$rules["vm_start"] = [ - { - token: "variable", - regex: "}", - next: "pop" - }, { - token : "string.regexp", - regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : function(value) { - if (keywords.hasOwnProperty(value)) - return "keyword"; - else if (builtinConstants.hasOwnProperty(value)) - return "constant.language"; - else if (builtinVariables.hasOwnProperty(value)) - return "variable.language"; - else if (builtinFunctions.hasOwnProperty(value) || builtinFunctions.hasOwnProperty(value.substring(1))) - return "support.function"; - else if (value == "debugger") - return "invalid.deprecated"; - else - if(value.match(/^(\$[a-zA-Z_$][a-zA-Z0-9_]*)$/)) - return "variable"; - return "identifier"; - }, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|" - }, { - token : "lparen", - regex : "[[({]" - }, { - token : "rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ]; - - for (var i in this.$rules) { - this.$rules[i].unshift({ - token: "variable", - regex: "\\${", - push: "vm_start" - }); - } - - this.normalizeRules(); -}; - -oop.inherits(VelocityHighlightRules, TextHighlightRules); - -exports.VelocityHighlightRules = VelocityHighlightRules; -}); - -define("ace/mode/folding/velocity",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "##") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "##") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "##" && next[indent] == "##") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "##" && prev[indent] == "##") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/velocity",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/velocity_highlight_rules","ace/mode/folding/velocity"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var HtmlMode = require("./html").Mode; -var VelocityHighlightRules = require("./velocity_highlight_rules").VelocityHighlightRules; -var FoldMode = require("./folding/velocity").FoldMode; - -var Mode = function() { - HtmlMode.call(this); - this.HighlightRules = VelocityHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, HtmlMode); - -(function() { - this.lineCommentStart = "##"; - this.blockComment = {start: "#*", end: "*#"}; - this.$id = "ace/mode/velocity"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},i.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};o.inherits(i,r),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",o="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*\\b",i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[{token:"comment",regex:"\\/\\/",next:"line_comment"},r.getStartRule("doc-start"),{token:"comment",regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:o},{token:"keyword.operator",regex:/--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],start:[r.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/",next:"line_comment_regex_allowed"},{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],comment:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],line_comment_regex_allowed:[r.getTagRule(),{token:"comment",regex:"$|^",next:"start"},{defaultToken:"comment",caseInsensitive:!0}],line_comment:[r.getTagRule(),{token:"comment",regex:"$|^",next:"no_regex"},{defaultToken:"comment",caseInsensitive:!0}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qqstring"},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",next:"qstring"},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){return this.next="{"==e?this.nextState:"","{"==e&&n.length?(n.unshift("start",t),"paren"):"}"==e&&n.length&&(n.shift(),this.next=n.shift(),this.next.indexOf("string")!=-1)?"paren.quasi.end":"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),this.embedRules(r,"doc-",[r.getEndRule("no_regex")]),this.normalizeRules()};o.inherits(a,i),t.JavaScriptHighlightRules=a}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var o=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),r=n.match(/^(\s*\})/);if(!r)return 0;var i=r[1].length,a=e.findMatchingBracket({row:t,column:i});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new o(t,0,t,i-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var o,r=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],c={},g=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t]?o=c[t]:void(o=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},d=function(){this.add("braces","insertion",function(e,t,n,r,i){var a=n.getCursorPosition(),l=r.doc.getLine(a.row);if("{"==i){g(n);var u=n.getSelectionRange(),c=r.doc.getTextRange(u);if(""!==c&&"{"!==c&&n.getWrapBehavioursEnabled())return{text:"{"+c+"}",selection:!1};if(d.isSaneInsertion(n,r))return/[\]\}\)]/.test(l[a.column])||n.inMultiSelectMode?(d.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(d.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if("}"==i){g(n);var m=l.substring(a.column,a.column+1);if("}"==m){var p=r.$findOpeningBracket("}",{column:a.column+1,row:a.row});if(null!==p&&d.isAutoInsertedClosing(a,l,i))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==i||"\r\n"==i){g(n);var h="";d.isMaybeInsertedClosing(a,l)&&(h=s.stringRepeat("}",o.maybeInsertedBrackets),d.clearMaybeInsertedClosing());var m=l.substring(a.column,a.column+1);if("}"===m){var f=r.findMatchingBracket({row:a.row,column:a.column+1},"}");if(!f)return null;var x=this.$getIndent(r.getLine(f.row))}else{if(!h)return void d.clearMaybeInsertedClosing();var x=this.$getIndent(l)}var b=x+r.getTabString();return{text:"\n"+b+"\n"+x+h,selection:[1,b.length,1,b.length]}}d.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,i){var a=r.doc.getTextRange(i);if(!i.isMultiLine()&&"{"==a){g(n);var s=r.doc.getLine(i.start.row),l=s.substring(i.end.column,i.end.column+1);if("}"==l)return i.end.column++,i;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,o,r){if("("==r){g(n);var i=n.getSelectionRange(),a=o.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"("+a+")",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,")"),{text:"()",selection:[1,1]}}else if(")"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if(")"==u){var c=o.$findOpeningBracket(")",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"("==i){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(")"==s)return r.end.column++,r}}),this.add("brackets","insertion",function(e,t,n,o,r){if("["==r){g(n);var i=n.getSelectionRange(),a=o.doc.getTextRange(i);if(""!==a&&n.getWrapBehavioursEnabled())return{text:"["+a+"]",selection:!1};if(d.isSaneInsertion(n,o))return d.recordAutoInsert(n,o,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){g(n);var s=n.getCursorPosition(),l=o.doc.getLine(s.row),u=l.substring(s.column,s.column+1);if("]"==u){var c=o.$findOpeningBracket("]",{column:s.column+1,row:s.row});if(null!==c&&d.isAutoInsertedClosing(s,l,r))return d.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&"["==i){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if("]"==s)return r.end.column++,r}}),this.add("string_dquotes","insertion",function(e,t,n,o,r){if('"'==r||"'"==r){g(n);var i=r,a=n.getSelectionRange(),s=o.doc.getTextRange(a);if(""!==s&&"'"!==s&&'"'!=s&&n.getWrapBehavioursEnabled())return{text:i+s+i,selection:!1};var l=n.getCursorPosition(),u=o.doc.getLine(l.row),c=u.substring(l.column-1,l.column),d=u.substring(l.column,l.column+1),m=o.getTokenAt(l.row,l.column),p=o.getTokenAt(l.row,l.column+1);if("\\"==c&&m&&/escape/.test(m.type))return null;var h,f=m&&/string/.test(m.type),x=!p||/string/.test(p.type);if(d==i)h=f!==x;else{if(f&&!x)return null;if(f&&x)return null;var b=o.$mode.tokenRe;b.lastIndex=0;var k=b.test(c);b.lastIndex=0;var v=b.test(c);if(k||v)return null;if(d&&!/[\s;,.})\]\\]/.test(d))return null;h=!0}return{text:h?i+i:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==i||"'"==i)){g(n);var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(s==i)return r.end.column++,r}})};d.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),o=new a(t,n.row,n.column);if(!this.$matchTokenType(o.getCurrentToken()||"text",l)){var r=new a(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return o.stepForward(),o.getCurrentTokenRow()!==n.row||this.$matchTokenType(o.getCurrentToken()||"text",u)},d.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},d.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,i,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=r.row,o.autoInsertedLineEnd=n+i.substr(r.column),o.autoInsertedBrackets++},d.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),i=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,i)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=r.row,o.maybeInsertedLineStart=i.substr(0,r.column)+n,o.maybeInsertedLineEnd=i.substr(r.column),o.maybeInsertedBrackets++},d.isAutoInsertedClosing=function(e,t,n){return o.autoInsertedBrackets>0&&e.row===o.autoInsertedRow&&n===o.autoInsertedLineEnd[0]&&t.substr(e.column)===o.autoInsertedLineEnd},d.isMaybeInsertedClosing=function(e,t){return o.maybeInsertedBrackets>0&&e.row===o.maybeInsertedRow&&t.substr(e.column)===o.maybeInsertedLineEnd&&t.substr(0,e.column)==o.maybeInsertedLineStart},d.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},d.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},r.inherits(d,i),t.CstyleBehaviour=d}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(a,i),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(o)?"start":r},this.getFoldWidgetRange=function(e,t,n,o){var r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);var i=r.match(this.foldingStartMarker);if(i){var a=i.index;if(i[1])return this.openingBracketBlock(e,i[1],n,a);var s=e.getCommentFoldRange(n,a+i[0].length,1);return s&&!s.isMultiLine()&&(o?s=this.getSectionRange(e,n):"all"!=t&&(s=null)),s}if("markbegin"!==t){var i=r.match(this.foldingStopMarker);if(i){var a=i.index+i[0].length;return i[1]?this.closingBracketBlock(e,i[1],n,a):e.getCommentFoldRange(n,a,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),o=n.search(/\S/),i=t,a=n.length;t+=1;for(var s=t,l=e.getLength();++tu)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=i)break;if(c.isMultiLine())t=c.end.row;else if(o==u)break}s=t}}return new r(i,a,s,e.getLine(s).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),i=e.getLength(),a=n,s=/^\s*(?:\/\*|\/\/)#(end)?region\b/,l=1;++na)return new r(a,o,c,t.length)}}.call(a.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./javascript_highlight_rules").JavaScriptHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=(e("../range").Range,e("../worker/worker_client").WorkerClient),l=e("./behaviour/cstyle").CstyleBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),i=r.tokens,a=r.state;if(i.length&&"comment"==i[i.length-1].type)return o;if("start"==e||"no_regex"==e){var s=t.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);s&&(o+=n)}else if("doc-start"==e){if("start"==a||"no_regex"==a)return"";var s=t.match(/^\s*(\/?)\*/);s&&(s[1]&&(o+=" "),o+="* ")}return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("jslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(c.prototype),t.Mode=c}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),i=t.supportType="animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index",a=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero",l=t.supportConstantColor="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow",u=t.supportConstantFonts="arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",g=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",d=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",m=function(){var e=this.createKeywordMapper({"support.function":a,"support.constant":s,"support.type":i,"support.constant.color":l,"support.constant.fonts":u},"text",!0);this.$rules={start:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"@.*?{",push:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{token:"comment",regex:"\\/\\*",push:"comment"},{token:"paren.lparen",regex:"\\{",push:"ruleset"},{token:"string",regex:"\\}",next:"pop"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],comment:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}],ruleset:[{token:"paren.rparen",regex:"\\}",next:"pop"},{token:"comment",regex:"\\/\\*",push:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:g},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:d},{token:["support.function","string","support.function"],regex:"(url\\()(.*)(\\))"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}]},this.normalizeRules()};o.inherits(m,r),t.CssHighlightRules=m}),define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),i=e("../../token_iterator").TokenIterator,a=function(){this.inherit(r),this.add("colon","insertion",function(e,t,n,o,r){if(":"===r){var a=n.getCursorPosition(),s=new i(o,a.row,a.column),l=s.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=s.stepBackward()),l&&"support.type"===l.type){var u=o.doc.getLine(a.row),c=u.substring(a.column,a.column+1); +if(":"===c)return{text:"",selection:[1,1]};if(!u.substring(a.column).match(/^\s*;/))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,o,r){var a=o.doc.getTextRange(r);if(!r.isMultiLine()&&":"===a){var s=n.getCursorPosition(),l=new i(o,s.row,s.column),u=l.getCurrentToken();if(u&&u.value.match(/\s+/)&&(u=l.stepBackward()),u&&"support.type"===u.type){var c=o.doc.getLine(r.start.row),g=c.substring(r.end.column,r.end.column+1);if(";"===g)return r.end.column++,r}}}),this.add("semicolon","insertion",function(e,t,n,o,r){if(";"===r){var i=n.getCursorPosition(),a=o.doc.getLine(i.row),s=a.substring(i.column,i.column+1);if(";"===s)return{text:"",selection:[1,1]}}})};o.inherits(a,r),t.CssBehaviour=a}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./css_highlight_rules").CssHighlightRules,a=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,l=e("./behaviour/css").CssBehaviour,u=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=i,this.$outdent=new a,this.$behaviour=new l,this.foldingRules=new u};o.inherits(c,r),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e).tokens;if(r.length&&"comment"==r[r.length-1].type)return o;var i=t.match(/^.*\{\s*$/);return i&&(o+=n),o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("csslint",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(c.prototype),t.Mode=c}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===i&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(r.prototype),o.inherits(i,r),t.XmlHighlightRules=i}),define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./css_highlight_rules").CssHighlightRules,a=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,l=r.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),u=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=l[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(i,"css-","style"),this.embedTagRules(a,"js-","script"),this.constructor===u&&this.normalizeRules()};o.inherits(u,s),t.HtmlHighlightRules=u}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),i=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,s=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,r,i){if('"'==i||"'"==i){var s=i,l=r.doc.getTextRange(n.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&n.getWrapBehavioursEnabled())return{text:s+l+s,selection:!1};var u=n.getCursorPosition(),c=r.doc.getLine(u.row),g=c.substring(u.column,u.column+1),d=new a(r,u.row,u.column),m=d.getCurrentToken();if(g==s&&(o(m,"attribute-value")||o(m,"string")))return{text:"",selection:[1,1]};if(m||(m=d.stepBackward()),!m)return;for(;o(m,"tag-whitespace")||o(m,"whitespace");)m=d.stepBackward();var p=!g||g.match(/\s/);if(o(m,"attribute-equals")&&(p||">"==g)||o(m,"decl-attribute-equals")&&(p||"?"==g))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,o,r){var i=o.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==i||"'"==i)){var a=o.doc.getLine(r.start.row),s=a.substring(r.start.column+1,r.start.column+2);if(s==i)return r.end.column++,r}}),this.add("autoclosing","insertion",function(e,t,n,r,i){if(">"==i){var s=n.getCursorPosition(),l=new a(r,s.row,s.column),u=l.getCurrentToken()||l.stepBackward();if(!u||!(o(u,"tag-name")||o(u,"tag-whitespace")||o(u,"attribute-name")||o(u,"attribute-equals")||o(u,"attribute-value")))return;if(o(u,"reference.attribute-value"))return;if(o(u,"attribute-value")){var c=u.value.charAt(0);if('"'==c||"'"==c){var g=u.value.charAt(u.value.length-1),d=l.getCurrentTokenColumn()+u.value.length;if(d>s.column||d==s.column&&c!=g)return}}for(;!o(u,"tag-name");)u=l.stepBackward();var m=l.getCurrentTokenRow(),p=l.getCurrentTokenColumn();if(o(l.stepBackward(),"end-tag-open"))return;var h=u.value;if(m==s.row&&(h=h.substring(0,s.column-p)),this.voidElements.hasOwnProperty(h.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,o,r){if("\n"==r){var i=n.getCursorPosition(),s=o.getLine(i.row),l=new a(o,i.row,i.column),u=l.getCurrentToken();if(u&&u.type.indexOf("tag-close")!==-1){for(;u&&u.type.indexOf("tag-name")===-1;)u=l.stepBackward();if(!u)return;var c=u.value,g=l.getCurrentTokenRow();if(u=l.stepBackward(),!u||u.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[c]){var d=o.getTokenAt(i.row,i.column+1),s=o.getLine(g),m=this.$getIndent(s),p=m+o.getTabString();return d&&"-1}var r=e("../../lib/oop"),i=(e("../../lib/lang"),e("../../range").Range),a=e("./fold_mode").FoldMode,s=e("../../token_iterator").TokenIterator,l=t.FoldMode=function(e,t){a.call(this),this.voidElements=e||{},this.optionalEndTags=r.mixin({},this.voidElements),t&&r.mixin(this.optionalEndTags,t)};r.inherits(l,a);var u=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var o=this._getFirstTagInLine(e,n);return o?o.closing||!o.tagName&&o.selfClosing?"markbeginend"==t?"end":"":!o.tagName||o.selfClosing||this.voidElements.hasOwnProperty(o.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,o.tagName,o.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),r=new u,i=0;i"==a.value;break}return r}if(o(a,"tag-close"))return r.selfClosing="/>"==a.value,r;r.start.column+=a.value.length}return null},this._findEndTagInLine=function(e,t,n,r){for(var i=e.getTokens(t),a=0,s=0;s"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(t&&n.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,n){var o=this._getFirstTagInLine(e,n);if(!o)return null;var r,a=o.closing||o.selfClosing,l=[];if(a)for(var u=new s(e,n,o.end.column),c={row:n,column:o.start.column};r=this._readTagBackward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,i.fromPoints(r.start,r.end)}if(r.closing)l.push(r);else if(this._pop(l,r),0==l.length)return r.start.column+=r.tagName.length+2,i.fromPoints(r.start,c)}else for(var u=new s(e,n,o.start.column),g={row:n,column:o.start.column+o.tagName.length+2};r=this._readTagForward(u);){if(r.selfClosing){if(l.length)continue;return r.start.column+=r.tagName.length+2,r.end.column-=2,i.fromPoints(r.start,r.end)}if(r.closing){if(this._pop(l,r),0==l.length)return i.fromPoints(g,r.start)}else l.push(r)}}}).call(l.prototype)}),define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./mixed").FoldMode,i=e("./xml").FoldMode,a=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){r.call(this,new i(e,t),{"js-":new a,"css-":new a})};o.inherits(s,r)}),define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}function r(e,t){for(var n=new i(e,t.row,t.column),r=n.getCurrentToken();r&&!o(r,"tag-name");)r=n.stepBackward();if(r)return r.value}var i=e("../token_iterator").TokenIterator,a=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"],s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],l=a.concat(s),u={html:["manifest"],head:[],title:[],base:["href","target"],link:["href","hreflang","rel","media","type","sizes"],meta:["http-equiv","name","content","charset"],style:["type","media","scoped"],script:["charset","type","src","defer","async"],noscript:["href"],body:["onafterprint","onbeforeprint","onbeforeunload","onhashchange","onmessage","onoffline","onpopstate","onredo","onresize","onstorage","onundo","onunload"],section:[],nav:[],article:["pubdate"],aside:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],footer:[],address:[],main:[],p:[],hr:[],pre:[],blockquote:["cite"],ol:["start","reversed"],ul:[],li:["value"],dl:[],dt:[],dd:[],figure:[],figcaption:[],div:[],a:["href","target","ping","rel","media","hreflang","type"],em:[],strong:[],small:[],s:[],cite:[],q:["cite"],dfn:[],abbr:[],data:[],time:["datetime"],code:[],var:[],samp:[],kbd:[],sub:[],sup:[],i:[],b:[],u:[],mark:[],ruby:[],rt:[],rp:[],bdi:[],bdo:[],span:[],br:[],wbr:[],ins:["cite","datetime"],del:["cite","datetime"],img:["alt","src","height","width","usemap","ismap"],iframe:["name","src","height","width","sandbox","seamless"],embed:["src","height","width","type"],object:["param","data","type","height","width","usemap","name","form","classid"],param:["name","value"],video:["src","autobuffer","autoplay","loop","controls","width","height","poster"],audio:["src","autobuffer","autoplay","loop","controls"],source:["src","type","media"],track:["kind","src","srclang","label","default"],canvas:["width","height"],map:["name"],area:["shape","coords","href","hreflang","alt","target","media","rel","ping","type"],svg:[],math:[],table:["summary"],caption:[],colgroup:["span"],col:["span"],tbody:[],thead:[],tfoot:[],tr:[],td:["headers","rowspan","colspan"],th:["headers","rowspan","colspan","scope"],form:["accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],fieldset:["disabled","form","name"],legend:[],label:["form","for"],input:["type","accept","alt","autocomplete","checked","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","list","max","maxlength","min","multiple","pattern","placeholder","readonly","required","size","src","step","width","files","value"],button:["autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","value","type"],select:["autofocus","disabled","form","multiple","name","size"],datalist:[],optgroup:["disabled","label"],option:["disabled","selected","label","value"],textarea:["autofocus","disabled","form","maxlength","name","placeholder","readonly","required","rows","cols","wrap"],keygen:["autofocus","challenge","disabled","form","keytype","name"],output:["for","form","name"],progress:["value","max"],meter:["value","min","max","low","high","optimum"],details:["open"],summary:[],command:["type","label","icon","disabled","checked","radiogroup","command"],menu:["type","label"],dialog:["open"]},c=Object.keys(u),g=function(){};(function(){this.getCompletions=function(e,t,n,r){var i=t.getTokenAt(n.row,n.column);return i?o(i,"tag-name")||o(i,"tag-open")||o(i,"end-tag-open")?this.getTagCompletions(e,t,n,r):o(i,"tag-whitespace")||o(i,"attribute-name")?this.getAttributeCompetions(e,t,n,r):[]:[]},this.getTagCompletions=function(e,t,n,o){return c.map(function(e){return{value:e,meta:"tag",score:Number.MAX_VALUE}})},this.getAttributeCompetions=function(e,t,n,o){var i=r(t,n);if(!i)return[];var a=l;return i in u&&(a=a.concat(u[i])),a.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:Number.MAX_VALUE}})}}).call(g.prototype),t.HtmlCompletions=g}),define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./text").Mode,a=e("./javascript").Mode,s=e("./css").Mode,l=e("./html_highlight_rules").HtmlHighlightRules,u=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,g=e("./html_completions").HtmlCompletions,d=e("../worker/worker_client").WorkerClient,m=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],p=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],h=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=l,this.$behaviour=new u,this.$completer=new g,this.createModeDelegates({"js-":a,"css-":s}),this.foldingRules=new c(this.voidElements,r.arrayToMap(p))};o.inherits(h,i),function(){this.blockComment={start:""},this.voidElements=r.arrayToMap(m),this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.getCompletions=function(e,t,n,o){return this.$completer.getCompletions(e,t,n,o)},this.createWorker=function(e){if(this.constructor==h){var t=new d(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(h.prototype),t.Mode=h}),define("ace/mode/velocity_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./text_highlight_rules").TextHighlightRules,a=e("./html_highlight_rules").HtmlHighlightRules,s=function(){a.call(this);var e=r.arrayToMap("true|false|null".split("|")),t=r.arrayToMap("_DateTool|_DisplayTool|_EscapeTool|_FieldTool|_MathTool|_NumberTool|_SerializerTool|_SortTool|_StringTool|_XPathTool".split("|")),n=r.arrayToMap("$contentRoot|$foreach".split("|")),o=r.arrayToMap("#set|#macro|#include|#parse|#if|#elseif|#else|#foreach|#break|#end|#stop".split("|"));this.$rules.start.push({token:"comment",regex:"##.*$"},{token:"comment.block",regex:"#\\*",next:"vm_comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(r){return o.hasOwnProperty(r)?"keyword":e.hasOwnProperty(r)?"constant.language":n.hasOwnProperty(r)?"variable.language":t.hasOwnProperty(r)||t.hasOwnProperty(r.substring(1))?"support.function":"debugger"==r?"invalid.deprecated":r.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*)$/)?"variable":"identifier"},regex:"[a-zA-Z$#][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}),this.$rules.vm_comment=[{token:"comment",regex:"\\*#|-->",next:"start"},{defaultToken:"comment"}],this.$rules.vm_start=[{token:"variable",regex:"}",next:"pop"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(r){return o.hasOwnProperty(r)?"keyword":e.hasOwnProperty(r)?"constant.language":n.hasOwnProperty(r)?"variable.language":t.hasOwnProperty(r)||t.hasOwnProperty(r.substring(1))?"support.function":"debugger"==r?"invalid.deprecated":r.match(/^(\$[a-zA-Z_$][a-zA-Z0-9_]*)$/)?"variable":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}];for(var i in this.$rules)this.$rules[i].unshift({token:"variable",regex:"\\${",push:"vm_start"});this.normalizeRules()};o.inherits(s,i),t.VelocityHighlightRules=s}),define("ace/mode/folding/velocity",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("./fold_mode").FoldMode,i=e("../../range").Range,a=t.FoldMode=function(){};o.inherits(a,r),function(){this.getFoldWidgetRange=function(e,t,n){var o=this.indentationBlock(e,n);if(o)return o;var r=/\S/,a=e.getLine(n),s=a.search(r);if(s!=-1&&"##"==a[s]){for(var l=a.length,u=e.getLength(),c=n,g=n;++nc){var m=e.getLine(g).length;return new i(c,l,g,m)}}},this.getFoldWidget=function(e,t,n){var o=e.getLine(n),r=o.search(/\S/),i=e.getLine(n+1),a=e.getLine(n-1),s=a.search(/\S/),l=i.search(/\S/);if(r==-1)return e.foldWidgets[n-1]=s!=-1&&s|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" - }, { - token : "paren.lparen", - regex : "[\\(]" - }, { - token : "paren.rparen", - regex : "[\\)]" - }, { - token : "text", - regex : "\\s+" - } ] - }; -}; - -oop.inherits(VerilogHighlightRules, TextHighlightRules); - -exports.VerilogHighlightRules = VerilogHighlightRules; -}); - -define("ace/mode/verilog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/verilog_highlight_rules","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var VerilogHighlightRules = require("./verilog_highlight_rules").VerilogHighlightRules; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = VerilogHighlightRules; -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.$id = "ace/mode/verilog"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/verilog_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,n,i){"use strict";var t=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="always|and|assign|automatic|begin|buf|bufif0|bufif1|case|casex|casez|cell|cmos|config|deassign|default|defparam|design|disable|edge|else|end|endcase|endconfig|endfunction|endgenerate|endmodule|endprimitive|endspecify|endtable|endtask|event|for|force|forever|fork|function|generate|genvar|highz0|highz1|if|ifnone|incdir|include|initial|inout|input|instance|integer|join|large|liblist|library|localparam|macromodule|medium|module|nand|negedge|nmos|nor|noshowcancelled|not|notif0|notif1|or|output|parameter|pmos|posedge|primitive|pull0|pull1|pulldown|pullup|pulsestyle_onevent|pulsestyle_ondetect|rcmos|real|realtime|reg|release|repeat|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|showcancelled|signed|small|specify|specparam|strong0|strong1|supply0|supply1|table|task|time|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|unsigned|use|vectored|wait|wand|weak0|weak1|while|wire|wor|xnor|xorbegin|bufif0|bufif1|case|casex|casez|config|else|end|endcase|endconfig|endfunction|endgenerate|endmodule|endprimitive|endspecify|endtable|endtask|for|forever|function|generate|if|ifnone|macromodule|module|primitive|repeat|specify|table|task|while",n="true|false|null",i="count|min|max|avg|sum|rank|now|coalesce|main",t=this.createKeywordMapper({"support.function":i,keyword:e,"constant.language":n},"identifier",!0);this.$rules={start:[{token:"comment",regex:"//.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:t,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]}};t.inherits(o,r),n.VerilogHighlightRules=o}),define("ace/mode/verilog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/verilog_highlight_rules","ace/range"],function(e,n,i){"use strict";var t=e("../lib/oop"),r=e("./text").Mode,o=e("./verilog_highlight_rules").VerilogHighlightRules,a=(e("../range").Range,function(){this.HighlightRules=o});t.inherits(a,r),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/verilog"}.call(a.prototype),n.Mode=a}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-vhdl.js b/www/js/vendor/ace/mode-vhdl.js index a91853b1e..032353036 100755 --- a/www/js/vendor/ace/mode-vhdl.js +++ b/www/js/vendor/ace/mode-vhdl.js @@ -1,110 +1 @@ -define("ace/mode/vhdl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var VHDLHighlightRules = function() { - - - - var keywords = "access|after|ailas|all|architecture|assert|attribute|"+ - "begin|block|buffer|bus|case|component|configuration|"+ - "disconnect|downto|else|elsif|end|entity|file|for|function|"+ - "generate|generic|guarded|if|impure|in|inertial|inout|is|"+ - "label|linkage|literal|loop|mapnew|next|of|on|open|"+ - "others|out|port|process|pure|range|record|reject|"+ - "report|return|select|shared|subtype|then|to|transport|"+ - "type|unaffected|united|until|wait|when|while|with"; - - var storageType = "bit|bit_vector|boolean|character|integer|line|natural|"+ - "positive|real|register|severity|signal|signed|"+ - "std_logic|std_logic_vector|string||text|time|unsigned|"+ - "variable"; - - var storageModifiers = "array|constant"; - - var keywordOperators = "abs|and|mod|nand|nor|not|rem|rol|ror|sla|sll|sra"+ - "srl|xnor|xor"; - - var builtinConstants = ( - "true|false|null" - ); - - - var keywordMapper = this.createKeywordMapper({ - "keyword.operator": keywordOperators, - "keyword": keywords, - "constant.language": builtinConstants, - "storage.modifier": storageModifiers, - "storage.type": storageType - }, "identifier", true); - - this.$rules = { - "start" : [ { - token : "comment", - regex : "--.*$" - }, { - token : "string", // " string - regex : '".*?"' - }, { - token : "string", // ' string - regex : "'.*?'" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "keyword", // pre-compiler directives - regex : "\\s*(?:library|package|use)\\b", - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "&|\\*|\\+|\\-|\\/|<|=|>|\\||=>|\\*\\*|:=|\\/=|>=|<=|<>" - }, { - token : "punctuation.operator", - regex : "\\'|\\:|\\,|\\;|\\." - },{ - token : "paren.lparen", - regex : "[[(]" - }, { - token : "paren.rparen", - regex : "[\\])]" - }, { - token : "text", - regex : "\\s+" - } ], - - - }; -}; - -oop.inherits(VHDLHighlightRules, TextHighlightRules); - -exports.VHDLHighlightRules = VHDLHighlightRules; -}); - -define("ace/mode/vhdl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vhdl_highlight_rules","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var VHDLHighlightRules = require("./vhdl_highlight_rules").VHDLHighlightRules; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = VHDLHighlightRules; -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "--"; - - this.$id = "ace/mode/vhdl"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/vhdl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,r){"use strict";var i=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,n=function(){var e="access|after|ailas|all|architecture|assert|attribute|begin|block|buffer|bus|case|component|configuration|disconnect|downto|else|elsif|end|entity|file|for|function|generate|generic|guarded|if|impure|in|inertial|inout|is|label|linkage|literal|loop|mapnew|next|of|on|open|others|out|port|process|pure|range|record|reject|report|return|select|shared|subtype|then|to|transport|type|unaffected|united|until|wait|when|while|with",t="bit|bit_vector|boolean|character|integer|line|natural|positive|real|register|severity|signal|signed|std_logic|std_logic_vector|string||text|time|unsigned|variable",r="array|constant",i="abs|and|mod|nand|nor|not|rem|rol|ror|sla|sll|srasrl|xnor|xor",o="true|false|null",n=this.createKeywordMapper({"keyword.operator":i,keyword:e,"constant.language":o,"storage.modifier":r,"storage.type":t},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"keyword",regex:"\\s*(?:library|package|use)\\b"},{token:n,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"&|\\*|\\+|\\-|\\/|<|=|>|\\||=>|\\*\\*|:=|\\/=|>=|<=|<>"},{token:"punctuation.operator",regex:"\\'|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[(]"},{token:"paren.rparen",regex:"[\\])]"},{token:"text",regex:"\\s+"}]}};i.inherits(n,o),t.VHDLHighlightRules=n}),define("ace/mode/vhdl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vhdl_highlight_rules","ace/range"],function(e,t,r){"use strict";var i=e("../lib/oop"),o=e("./text").Mode,n=e("./vhdl_highlight_rules").VHDLHighlightRules,a=(e("../range").Range,function(){this.HighlightRules=n});i.inherits(a,o),function(){this.lineCommentStart="--",this.$id="ace/mode/vhdl"}.call(a.prototype),t.Mode=a}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-xml.js b/www/js/vendor/ace/mode-xml.js index 9f20415d5..3e70e1b6f 100755 --- a/www/js/vendor/ace/mode-xml.js +++ b/www/js/vendor/ace/mode-xml.js @@ -1,637 +1 @@ -define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)([-_a-zA-Z0-9]+)", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === " -1; -} - -(function() { - - this.getFoldWidget = function(session, foldStyle, row) { - var tag = this._getFirstTagInLine(session, row); - - if (!tag) - return ""; - - if (tag.closing || (!tag.tagName && tag.selfClosing)) - return foldStyle == "markbeginend" ? "end" : ""; - - if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) - return ""; - - if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) - return ""; - - return "start"; - }; - this._getFirstTagInLine = function(session, row) { - var tokens = session.getTokens(row); - var tag = new Tag(); - - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (is(token, "tag-open")) { - tag.end.column = tag.start.column + token.value.length; - tag.closing = is(token, "end-tag-open"); - token = tokens[++i]; - if (!token) - return null; - tag.tagName = token.value; - tag.end.column += token.value.length; - for (i++; i < tokens.length; i++) { - token = tokens[i]; - tag.end.column += token.value.length; - if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - break; - } - } - return tag; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == '/>'; - return tag; - } - tag.start.column += token.value.length; - } - - return null; - }; - - this._findEndTagInLine = function(session, row, tagName, startColumn) { - var tokens = session.getTokens(row); - var column = 0; - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - column += token.value.length; - if (column < startColumn) - continue; - if (is(token, "end-tag-open")) { - token = tokens[i + 1]; - if (token && token.value == tagName) - return true; - } - } - return false; - }; - this._readTagForward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - iterator.stepForward(); - return tag; - } - } while(token = iterator.stepForward()); - - return null; - }; - - this._readTagBackward = function(iterator) { - var token = iterator.getCurrentToken(); - if (!token) - return null; - - var tag = new Tag(); - do { - if (is(token, "tag-open")) { - tag.closing = is(token, "end-tag-open"); - tag.start.row = iterator.getCurrentTokenRow(); - tag.start.column = iterator.getCurrentTokenColumn(); - iterator.stepBackward(); - return tag; - } else if (is(token, "tag-name")) { - tag.tagName = token.value; - } else if (is(token, "tag-close")) { - tag.selfClosing = token.value == "/>"; - tag.end.row = iterator.getCurrentTokenRow(); - tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; - } - } while(token = iterator.stepBackward()); - - return null; - }; - - this._pop = function(stack, tag) { - while (stack.length) { - - var top = stack[stack.length-1]; - if (!tag || top.tagName == tag.tagName) { - return stack.pop(); - } - else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { - stack.pop(); - continue; - } else { - return null; - } - } - }; - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var firstTag = this._getFirstTagInLine(session, row); - - if (!firstTag) - return null; - - var isBackward = firstTag.closing || firstTag.selfClosing; - var stack = []; - var tag; - - if (!isBackward) { - var iterator = new TokenIterator(session, row, firstTag.start.column); - var start = { - row: row, - column: firstTag.start.column + firstTag.tagName.length + 2 - }; - while (tag = this._readTagForward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) - return Range.fromPoints(start, tag.start); - } - else { - stack.push(tag); - } - } - } - else { - var iterator = new TokenIterator(session, row, firstTag.end.column); - var end = { - row: row, - column: firstTag.start.column - }; - - while (tag = this._readTagBackward(iterator)) { - if (tag.selfClosing) { - if (!stack.length) { - tag.start.column += tag.tagName.length + 2; - tag.end.column -= 2; - return Range.fromPoints(tag.start, tag.end); - } else - continue; - } - - if (!tag.closing) { - this._pop(stack, tag); - if (stack.length == 0) { - tag.start.column += tag.tagName.length + 2; - return Range.fromPoints(tag.start, end); - } - } - else { - stack.push(tag); - } - } - } - - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextMode = require("./text").Mode; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; -var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; -var XmlFoldMode = require("./folding/xml").FoldMode; - -var Mode = function() { - this.HighlightRules = XmlHighlightRules; - this.$behaviour = new XmlBehaviour(); - this.foldingRules = new XmlFoldMode(); -}; - -oop.inherits(Mode, TextMode); - -(function() { - - this.voidElements = lang.arrayToMap([]); - - this.blockComment = {start: ""}; - - this.$id = "ace/mode/xml"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),a=e("./text_highlight_rules").TextHighlightRules,o=function(e){this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.xml-decl.xml","keyword.xml-decl.xml"],regex:"(<\\?)(xml)(?=[\\s])",next:"xml_decl",caseInsensitive:!0},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)([-_a-zA-Z0-9]+)",next:"processing_instruction"},{token:"comment.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],processing_instruction:[{token:"punctuation.instruction.xml",regex:"\\?>",next:"start"},{defaultToken:"instruction.xml"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)([-_a-zA-Z0-9]+)",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:"(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===o&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(a.prototype),r.inherits(o,a),t.XmlHighlightRules=o}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";function r(e,t){return e.type.lastIndexOf(t+".xml")>-1}var a=e("../../lib/oop"),o=e("../behaviour").Behaviour,i=e("../../token_iterator").TokenIterator,l=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,a,o){if('"'==o||"'"==o){var l=o,u=a.doc.getTextRange(n.getSelectionRange());if(""!==u&&"'"!==u&&'"'!=u&&n.getWrapBehavioursEnabled())return{text:l+u+l,selection:!1};var s=n.getCursorPosition(),g=a.doc.getLine(s.row),c=g.substring(s.column,s.column+1),m=new i(a,s.row,s.column),x=m.getCurrentToken();if(c==l&&(r(x,"attribute-value")||r(x,"string")))return{text:"",selection:[1,1]};if(x||(x=m.stepBackward()),!x)return;for(;r(x,"tag-whitespace")||r(x,"whitespace");)x=m.stepBackward();var d=!c||c.match(/\s/);if(r(x,"attribute-equals")&&(d||">"==c)||r(x,"decl-attribute-equals")&&(d||"?"==c))return{text:l+l,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,r,a){var o=r.doc.getTextRange(a);if(!a.isMultiLine()&&('"'==o||"'"==o)){var i=r.doc.getLine(a.start.row),l=i.substring(a.start.column+1,a.start.column+2);if(l==o)return a.end.column++,a}}),this.add("autoclosing","insertion",function(e,t,n,a,o){if(">"==o){var l=n.getCursorPosition(),u=new i(a,l.row,l.column),s=u.getCurrentToken()||u.stepBackward();if(!s||!(r(s,"tag-name")||r(s,"tag-whitespace")||r(s,"attribute-name")||r(s,"attribute-equals")||r(s,"attribute-value")))return;if(r(s,"reference.attribute-value"))return;if(r(s,"attribute-value")){var g=s.value.charAt(0);if('"'==g||"'"==g){var c=s.value.charAt(s.value.length-1),m=u.getCurrentTokenColumn()+s.value.length;if(m>l.column||m==l.column&&g!=c)return}}for(;!r(s,"tag-name");)s=u.stepBackward();var x=u.getCurrentTokenRow(),d=u.getCurrentTokenColumn();if(r(u.stepBackward(),"end-tag-open"))return;var h=s.value;if(x==l.row&&(h=h.substring(0,l.column-d)),this.voidElements.hasOwnProperty(h.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,r,a){if("\n"==a){var o=n.getCursorPosition(),l=r.getLine(o.row),u=new i(r,o.row,o.column),s=u.getCurrentToken();if(s&&s.type.indexOf("tag-close")!==-1){for(;s&&s.type.indexOf("tag-name")===-1;)s=u.stepBackward();if(!s)return;var g=s.value,c=u.getCurrentTokenRow();if(s=u.stepBackward(),!s||s.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[g]){var m=r.getTokenAt(o.row,o.column+1),l=r.getLine(c),x=this.$getIndent(l),d=x+r.getTabString();return m&&"-1}var a=e("../../lib/oop"),o=(e("../../lib/lang"),e("../../range").Range),i=e("./fold_mode").FoldMode,l=e("../../token_iterator").TokenIterator,u=t.FoldMode=function(e,t){i.call(this),this.voidElements=e||{},this.optionalEndTags=a.mixin({},this.voidElements),t&&a.mixin(this.optionalEndTags,t)};a.inherits(u,i);var s=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?"markbeginend"==t?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":""},this._getFirstTagInLine=function(e,t){for(var n=e.getTokens(t),a=new s,o=0;o"==i.value;break}return a}if(r(i,"tag-close"))return a.selfClosing="/>"==i.value,a;a.start.column+=i.value.length}return null},this._findEndTagInLine=function(e,t,n,a){for(var o=e.getTokens(t),i=0,l=0;l"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(t&&n.tagName!=t.tagName){if(this.optionalEndTags.hasOwnProperty(n.tagName)){e.pop();continue}return null}return e.pop()}},this.getFoldWidgetRange=function(e,t,n){var r=this._getFirstTagInLine(e,n);if(!r)return null;var a,i=r.closing||r.selfClosing,u=[];if(i)for(var s=new l(e,n,r.end.column),g={row:n,column:r.start.column};a=this._readTagBackward(s);){if(a.selfClosing){if(u.length)continue;return a.start.column+=a.tagName.length+2,a.end.column-=2,o.fromPoints(a.start,a.end)}if(a.closing)u.push(a);else if(this._pop(u,a),0==u.length)return a.start.column+=a.tagName.length+2,o.fromPoints(a.start,g)}else for(var s=new l(e,n,r.start.column),c={row:n,column:r.start.column+r.tagName.length+2};a=this._readTagForward(s);){if(a.selfClosing){if(u.length)continue;return a.start.column+=a.tagName.length+2,a.end.column-=2,o.fromPoints(a.start,a.end)}if(a.closing){if(this._pop(u,a),0==u.length)return o.fromPoints(c,a.start)}else u.push(a)}}}).call(u.prototype)}),define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml"],function(e,t,n){"use strict";var r=e("../lib/oop"),a=e("../lib/lang"),o=e("./text").Mode,i=e("./xml_highlight_rules").XmlHighlightRules,l=e("./behaviour/xml").XmlBehaviour,u=e("./folding/xml").FoldMode,s=function(){this.HighlightRules=i,this.$behaviour=new l,this.foldingRules=new u};r.inherits(s,o),function(){this.voidElements=a.arrayToMap([]),this.blockComment={start:""},this.$id="ace/mode/xml"}.call(s.prototype),t.Mode=s}); \ No newline at end of file diff --git a/www/js/vendor/ace/mode-xquery.js b/www/js/vendor/ace/mode-xquery.js index 48c3c53bd..bb7dda533 100755 --- a/www/js/vendor/ace/mode-xquery.js +++ b/www/js/vendor/ace/mode-xquery.js @@ -1,2966 +1,3 @@ -define("ace/mode/xquery/xquery_lexer",["require","exports","module"], function(require, exports, module) { -module.exports = (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0 ? XQueryTokenizer.TOKEN[o] : null; - }; - - this.getExpectedTokenSet = function(e) - { - var expected; - if (e.getExpected() < 0) - { - expected = XQueryTokenizer.getTokenSet(- e.getState()); - } - else - { - expected = [XQueryTokenizer.TOKEN[e.getExpected()]]; - } - return expected; - }; - - this.getErrorMessage = function(e) - { - var tokenSet = this.getExpectedTokenSet(e); - var found = this.getOffendingToken(e); - var prefix = input.substring(0, e.getBegin()); - var lines = prefix.split("\n"); - var line = lines.length; - var column = lines[line - 1].length + 1; - var size = e.getEnd() - e.getBegin(); - return e.getMessage() - + (found == null ? "" : ", found " + found) - + "\nwhile expecting " - + (tokenSet.length == 1 ? tokenSet[0] : ("[" + tokenSet.join(", ") + "]")) - + "\n" - + (size == 0 || found != null ? "" : "after successfully scanning " + size + " characters beginning ") - + "at line " + line + ", column " + column + ":\n..." - + input.substring(e.getBegin(), Math.min(input.length, e.getBegin() + 64)) - + "..."; - }; - - this.parse_start = function() - { - eventHandler.startNonterminal("start", e0); - lookahead1W(14); // ModuleDecl | Annotation | OptionDecl | Operator | Variable | Tag | AttrTest | - switch (l1) - { - case 55: // '' | '=' | '>' - switch (l1) - { - case 58: // '>' - shift(58); // '>' - break; - case 50: // '/>' - shift(50); // '/>' - break; - case 27: // QName - shift(27); // QName - break; - case 57: // '=' - shift(57); // '=' - break; - case 35: // '"' - shift(35); // '"' - break; - case 38: // "'" - shift(38); // "'" - break; - default: - shift(33); // EOF - } - eventHandler.endNonterminal("StartTag", e0); - }; - - this.parse_TagContent = function() - { - eventHandler.startNonterminal("TagContent", e0); - lookahead1(11); // Tag | EndTag | PredefinedEntityRef | ElementContentChar | CharRef | EOF | - switch (l1) - { - case 23: // ElementContentChar - shift(23); // ElementContentChar - break; - case 6: // Tag - shift(6); // Tag - break; - case 7: // EndTag - shift(7); // EndTag - break; - case 55: // '' - switch (l1) - { - case 11: // CDataSectionContents - shift(11); // CDataSectionContents - break; - case 64: // ']]>' - shift(64); // ']]>' - break; - default: - shift(33); // EOF - } - eventHandler.endNonterminal("CData", e0); - }; - - this.parse_XMLComment = function() - { - eventHandler.startNonterminal("XMLComment", e0); - lookahead1(0); // DirCommentContents | EOF | '-->' - switch (l1) - { - case 9: // DirCommentContents - shift(9); // DirCommentContents - break; - case 47: // '-->' - shift(47); // '-->' - break; - default: - shift(33); // EOF - } - eventHandler.endNonterminal("XMLComment", e0); - }; - - this.parse_PI = function() - { - eventHandler.startNonterminal("PI", e0); - lookahead1(3); // DirPIContents | EOF | '?' | '?>' - switch (l1) - { - case 10: // DirPIContents - shift(10); // DirPIContents - break; - case 59: // '?' - shift(59); // '?' - break; - case 60: // '?>' - shift(60); // '?>' - break; - default: - shift(33); // EOF - } - eventHandler.endNonterminal("PI", e0); - }; - - this.parse_Pragma = function() - { - eventHandler.startNonterminal("Pragma", e0); - lookahead1(2); // PragmaContents | EOF | '#' | '#)' - switch (l1) - { - case 8: // PragmaContents - shift(8); // PragmaContents - break; - case 36: // '#' - shift(36); // '#' - break; - case 37: // '#)' - shift(37); // '#)' - break; - default: - shift(33); // EOF - } - eventHandler.endNonterminal("Pragma", e0); - }; - - this.parse_Comment = function() - { - eventHandler.startNonterminal("Comment", e0); - lookahead1(4); // CommentContents | EOF | '(:' | ':)' - switch (l1) - { - case 52: // ':)' - shift(52); // ':)' - break; - case 41: // '(:' - shift(41); // '(:' - break; - case 30: // CommentContents - shift(30); // CommentContents - break; - default: - shift(33); // EOF - } - eventHandler.endNonterminal("Comment", e0); - }; - - this.parse_CommentDoc = function() - { - eventHandler.startNonterminal("CommentDoc", e0); - lookahead1(5); // DocTag | DocCommentContents | EOF | '(:' | ':)' - switch (l1) - { - case 31: // DocTag - shift(31); // DocTag - break; - case 32: // DocCommentContents - shift(32); // DocCommentContents - break; - case 52: // ':)' - shift(52); // ':)' - break; - case 41: // '(:' - shift(41); // '(:' - break; - default: - shift(33); // EOF - } - eventHandler.endNonterminal("CommentDoc", e0); - }; - - this.parse_QuotString = function() - { - eventHandler.startNonterminal("QuotString", e0); - lookahead1(6); // PredefinedEntityRef | EscapeQuot | QuotChar | CharRef | EOF | '"' - switch (l1) - { - case 18: // PredefinedEntityRef - shift(18); // PredefinedEntityRef - break; - case 29: // CharRef - shift(29); // CharRef - break; - case 19: // EscapeQuot - shift(19); // EscapeQuot - break; - case 21: // QuotChar - shift(21); // QuotChar - break; - case 35: // '"' - shift(35); // '"' - break; - default: - shift(33); // EOF - } - eventHandler.endNonterminal("QuotString", e0); - }; - - this.parse_AposString = function() - { - eventHandler.startNonterminal("AposString", e0); - lookahead1(7); // PredefinedEntityRef | EscapeApos | AposChar | CharRef | EOF | "'" - switch (l1) - { - case 18: // PredefinedEntityRef - shift(18); // PredefinedEntityRef - break; - case 29: // CharRef - shift(29); // CharRef - break; - case 20: // EscapeApos - shift(20); // EscapeApos - break; - case 22: // AposChar - shift(22); // AposChar - break; - case 38: // "'" - shift(38); // "'" - break; - default: - shift(33); // EOF - } - eventHandler.endNonterminal("AposString", e0); - }; - - this.parse_Prefix = function() - { - eventHandler.startNonterminal("Prefix", e0); - lookahead1W(13); // NCName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | - whitespace(); - parse_NCName(); - eventHandler.endNonterminal("Prefix", e0); - }; - - this.parse__EQName = function() - { - eventHandler.startNonterminal("_EQName", e0); - lookahead1W(12); // EQName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | - whitespace(); - parse_EQName(); - eventHandler.endNonterminal("_EQName", e0); - }; - - function parse_EQName() - { - eventHandler.startNonterminal("EQName", e0); - switch (l1) - { - case 77: // 'attribute' - shift(77); // 'attribute' - break; - case 91: // 'comment' - shift(91); // 'comment' - break; - case 115: // 'document-node' - shift(115); // 'document-node' - break; - case 116: // 'element' - shift(116); // 'element' - break; - case 119: // 'empty-sequence' - shift(119); // 'empty-sequence' - break; - case 140: // 'function' - shift(140); // 'function' - break; - case 147: // 'if' - shift(147); // 'if' - break; - case 160: // 'item' - shift(160); // 'item' - break; - case 180: // 'namespace-node' - shift(180); // 'namespace-node' - break; - case 186: // 'node' - shift(186); // 'node' - break; - case 211: // 'processing-instruction' - shift(211); // 'processing-instruction' - break; - case 221: // 'schema-attribute' - shift(221); // 'schema-attribute' - break; - case 222: // 'schema-element' - shift(222); // 'schema-element' - break; - case 238: // 'switch' - shift(238); // 'switch' - break; - case 239: // 'text' - shift(239); // 'text' - break; - case 248: // 'typeswitch' - shift(248); // 'typeswitch' - break; - default: - parse_FunctionName(); - } - eventHandler.endNonterminal("EQName", e0); - } - - function parse_FunctionName() - { - eventHandler.startNonterminal("FunctionName", e0); - switch (l1) - { - case 14: // EQName^Token - shift(14); // EQName^Token - break; - case 65: // 'after' - shift(65); // 'after' - break; - case 68: // 'ancestor' - shift(68); // 'ancestor' - break; - case 69: // 'ancestor-or-self' - shift(69); // 'ancestor-or-self' - break; - case 70: // 'and' - shift(70); // 'and' - break; - case 74: // 'as' - shift(74); // 'as' - break; - case 75: // 'ascending' - shift(75); // 'ascending' - break; - case 79: // 'before' - shift(79); // 'before' - break; - case 83: // 'case' - shift(83); // 'case' - break; - case 84: // 'cast' - shift(84); // 'cast' - break; - case 85: // 'castable' - shift(85); // 'castable' - break; - case 88: // 'child' - shift(88); // 'child' - break; - case 89: // 'collation' - shift(89); // 'collation' - break; - case 98: // 'copy' - shift(98); // 'copy' - break; - case 100: // 'count' - shift(100); // 'count' - break; - case 103: // 'declare' - shift(103); // 'declare' - break; - case 104: // 'default' - shift(104); // 'default' - break; - case 105: // 'delete' - shift(105); // 'delete' - break; - case 106: // 'descendant' - shift(106); // 'descendant' - break; - case 107: // 'descendant-or-self' - shift(107); // 'descendant-or-self' - break; - case 108: // 'descending' - shift(108); // 'descending' - break; - case 113: // 'div' - shift(113); // 'div' - break; - case 114: // 'document' - shift(114); // 'document' - break; - case 117: // 'else' - shift(117); // 'else' - break; - case 118: // 'empty' - shift(118); // 'empty' - break; - case 121: // 'end' - shift(121); // 'end' - break; - case 123: // 'eq' - shift(123); // 'eq' - break; - case 124: // 'every' - shift(124); // 'every' - break; - case 126: // 'except' - shift(126); // 'except' - break; - case 129: // 'first' - shift(129); // 'first' - break; - case 130: // 'following' - shift(130); // 'following' - break; - case 131: // 'following-sibling' - shift(131); // 'following-sibling' - break; - case 132: // 'for' - shift(132); // 'for' - break; - case 141: // 'ge' - shift(141); // 'ge' - break; - case 143: // 'group' - shift(143); // 'group' - break; - case 145: // 'gt' - shift(145); // 'gt' - break; - case 146: // 'idiv' - shift(146); // 'idiv' - break; - case 148: // 'import' - shift(148); // 'import' - break; - case 154: // 'insert' - shift(154); // 'insert' - break; - case 155: // 'instance' - shift(155); // 'instance' - break; - case 157: // 'intersect' - shift(157); // 'intersect' - break; - case 158: // 'into' - shift(158); // 'into' - break; - case 159: // 'is' - shift(159); // 'is' - break; - case 165: // 'last' - shift(165); // 'last' - break; - case 167: // 'le' - shift(167); // 'le' - break; - case 169: // 'let' - shift(169); // 'let' - break; - case 173: // 'lt' - shift(173); // 'lt' - break; - case 175: // 'mod' - shift(175); // 'mod' - break; - case 176: // 'modify' - shift(176); // 'modify' - break; - case 177: // 'module' - shift(177); // 'module' - break; - case 179: // 'namespace' - shift(179); // 'namespace' - break; - case 181: // 'ne' - shift(181); // 'ne' - break; - case 193: // 'only' - shift(193); // 'only' - break; - case 195: // 'or' - shift(195); // 'or' - break; - case 196: // 'order' - shift(196); // 'order' - break; - case 197: // 'ordered' - shift(197); // 'ordered' - break; - case 201: // 'parent' - shift(201); // 'parent' - break; - case 207: // 'preceding' - shift(207); // 'preceding' - break; - case 208: // 'preceding-sibling' - shift(208); // 'preceding-sibling' - break; - case 213: // 'rename' - shift(213); // 'rename' - break; - case 214: // 'replace' - shift(214); // 'replace' - break; - case 215: // 'return' - shift(215); // 'return' - break; - case 219: // 'satisfies' - shift(219); // 'satisfies' - break; - case 224: // 'self' - shift(224); // 'self' - break; - case 230: // 'some' - shift(230); // 'some' - break; - case 231: // 'stable' - shift(231); // 'stable' - break; - case 232: // 'start' - shift(232); // 'start' - break; - case 243: // 'to' - shift(243); // 'to' - break; - case 244: // 'treat' - shift(244); // 'treat' - break; - case 245: // 'try' - shift(245); // 'try' - break; - case 249: // 'union' - shift(249); // 'union' - break; - case 251: // 'unordered' - shift(251); // 'unordered' - break; - case 255: // 'validate' - shift(255); // 'validate' - break; - case 261: // 'where' - shift(261); // 'where' - break; - case 265: // 'with' - shift(265); // 'with' - break; - case 269: // 'xquery' - shift(269); // 'xquery' - break; - case 67: // 'allowing' - shift(67); // 'allowing' - break; - case 76: // 'at' - shift(76); // 'at' - break; - case 78: // 'base-uri' - shift(78); // 'base-uri' - break; - case 80: // 'boundary-space' - shift(80); // 'boundary-space' - break; - case 81: // 'break' - shift(81); // 'break' - break; - case 86: // 'catch' - shift(86); // 'catch' - break; - case 93: // 'construction' - shift(93); // 'construction' - break; - case 96: // 'context' - shift(96); // 'context' - break; - case 97: // 'continue' - shift(97); // 'continue' - break; - case 99: // 'copy-namespaces' - shift(99); // 'copy-namespaces' - break; - case 101: // 'decimal-format' - shift(101); // 'decimal-format' - break; - case 120: // 'encoding' - shift(120); // 'encoding' - break; - case 127: // 'exit' - shift(127); // 'exit' - break; - case 128: // 'external' - shift(128); // 'external' - break; - case 136: // 'ft-option' - shift(136); // 'ft-option' - break; - case 149: // 'in' - shift(149); // 'in' - break; - case 150: // 'index' - shift(150); // 'index' - break; - case 156: // 'integrity' - shift(156); // 'integrity' - break; - case 166: // 'lax' - shift(166); // 'lax' - break; - case 187: // 'nodes' - shift(187); // 'nodes' - break; - case 194: // 'option' - shift(194); // 'option' - break; - case 198: // 'ordering' - shift(198); // 'ordering' - break; - case 217: // 'revalidation' - shift(217); // 'revalidation' - break; - case 220: // 'schema' - shift(220); // 'schema' - break; - case 223: // 'score' - shift(223); // 'score' - break; - case 229: // 'sliding' - shift(229); // 'sliding' - break; - case 235: // 'strict' - shift(235); // 'strict' - break; - case 246: // 'tumbling' - shift(246); // 'tumbling' - break; - case 247: // 'type' - shift(247); // 'type' - break; - case 252: // 'updating' - shift(252); // 'updating' - break; - case 256: // 'value' - shift(256); // 'value' - break; - case 257: // 'variable' - shift(257); // 'variable' - break; - case 258: // 'version' - shift(258); // 'version' - break; - case 262: // 'while' - shift(262); // 'while' - break; - case 92: // 'constraint' - shift(92); // 'constraint' - break; - case 171: // 'loop' - shift(171); // 'loop' - break; - default: - shift(216); // 'returning' - } - eventHandler.endNonterminal("FunctionName", e0); - } - - function parse_NCName() - { - eventHandler.startNonterminal("NCName", e0); - switch (l1) - { - case 26: // NCName^Token - shift(26); // NCName^Token - break; - case 65: // 'after' - shift(65); // 'after' - break; - case 70: // 'and' - shift(70); // 'and' - break; - case 74: // 'as' - shift(74); // 'as' - break; - case 75: // 'ascending' - shift(75); // 'ascending' - break; - case 79: // 'before' - shift(79); // 'before' - break; - case 83: // 'case' - shift(83); // 'case' - break; - case 84: // 'cast' - shift(84); // 'cast' - break; - case 85: // 'castable' - shift(85); // 'castable' - break; - case 89: // 'collation' - shift(89); // 'collation' - break; - case 100: // 'count' - shift(100); // 'count' - break; - case 104: // 'default' - shift(104); // 'default' - break; - case 108: // 'descending' - shift(108); // 'descending' - break; - case 113: // 'div' - shift(113); // 'div' - break; - case 117: // 'else' - shift(117); // 'else' - break; - case 118: // 'empty' - shift(118); // 'empty' - break; - case 121: // 'end' - shift(121); // 'end' - break; - case 123: // 'eq' - shift(123); // 'eq' - break; - case 126: // 'except' - shift(126); // 'except' - break; - case 132: // 'for' - shift(132); // 'for' - break; - case 141: // 'ge' - shift(141); // 'ge' - break; - case 143: // 'group' - shift(143); // 'group' - break; - case 145: // 'gt' - shift(145); // 'gt' - break; - case 146: // 'idiv' - shift(146); // 'idiv' - break; - case 155: // 'instance' - shift(155); // 'instance' - break; - case 157: // 'intersect' - shift(157); // 'intersect' - break; - case 158: // 'into' - shift(158); // 'into' - break; - case 159: // 'is' - shift(159); // 'is' - break; - case 167: // 'le' - shift(167); // 'le' - break; - case 169: // 'let' - shift(169); // 'let' - break; - case 173: // 'lt' - shift(173); // 'lt' - break; - case 175: // 'mod' - shift(175); // 'mod' - break; - case 176: // 'modify' - shift(176); // 'modify' - break; - case 181: // 'ne' - shift(181); // 'ne' - break; - case 193: // 'only' - shift(193); // 'only' - break; - case 195: // 'or' - shift(195); // 'or' - break; - case 196: // 'order' - shift(196); // 'order' - break; - case 215: // 'return' - shift(215); // 'return' - break; - case 219: // 'satisfies' - shift(219); // 'satisfies' - break; - case 231: // 'stable' - shift(231); // 'stable' - break; - case 232: // 'start' - shift(232); // 'start' - break; - case 243: // 'to' - shift(243); // 'to' - break; - case 244: // 'treat' - shift(244); // 'treat' - break; - case 249: // 'union' - shift(249); // 'union' - break; - case 261: // 'where' - shift(261); // 'where' - break; - case 265: // 'with' - shift(265); // 'with' - break; - case 68: // 'ancestor' - shift(68); // 'ancestor' - break; - case 69: // 'ancestor-or-self' - shift(69); // 'ancestor-or-self' - break; - case 77: // 'attribute' - shift(77); // 'attribute' - break; - case 88: // 'child' - shift(88); // 'child' - break; - case 91: // 'comment' - shift(91); // 'comment' - break; - case 98: // 'copy' - shift(98); // 'copy' - break; - case 103: // 'declare' - shift(103); // 'declare' - break; - case 105: // 'delete' - shift(105); // 'delete' - break; - case 106: // 'descendant' - shift(106); // 'descendant' - break; - case 107: // 'descendant-or-self' - shift(107); // 'descendant-or-self' - break; - case 114: // 'document' - shift(114); // 'document' - break; - case 115: // 'document-node' - shift(115); // 'document-node' - break; - case 116: // 'element' - shift(116); // 'element' - break; - case 119: // 'empty-sequence' - shift(119); // 'empty-sequence' - break; - case 124: // 'every' - shift(124); // 'every' - break; - case 129: // 'first' - shift(129); // 'first' - break; - case 130: // 'following' - shift(130); // 'following' - break; - case 131: // 'following-sibling' - shift(131); // 'following-sibling' - break; - case 140: // 'function' - shift(140); // 'function' - break; - case 147: // 'if' - shift(147); // 'if' - break; - case 148: // 'import' - shift(148); // 'import' - break; - case 154: // 'insert' - shift(154); // 'insert' - break; - case 160: // 'item' - shift(160); // 'item' - break; - case 165: // 'last' - shift(165); // 'last' - break; - case 177: // 'module' - shift(177); // 'module' - break; - case 179: // 'namespace' - shift(179); // 'namespace' - break; - case 180: // 'namespace-node' - shift(180); // 'namespace-node' - break; - case 186: // 'node' - shift(186); // 'node' - break; - case 197: // 'ordered' - shift(197); // 'ordered' - break; - case 201: // 'parent' - shift(201); // 'parent' - break; - case 207: // 'preceding' - shift(207); // 'preceding' - break; - case 208: // 'preceding-sibling' - shift(208); // 'preceding-sibling' - break; - case 211: // 'processing-instruction' - shift(211); // 'processing-instruction' - break; - case 213: // 'rename' - shift(213); // 'rename' - break; - case 214: // 'replace' - shift(214); // 'replace' - break; - case 221: // 'schema-attribute' - shift(221); // 'schema-attribute' - break; - case 222: // 'schema-element' - shift(222); // 'schema-element' - break; - case 224: // 'self' - shift(224); // 'self' - break; - case 230: // 'some' - shift(230); // 'some' - break; - case 238: // 'switch' - shift(238); // 'switch' - break; - case 239: // 'text' - shift(239); // 'text' - break; - case 245: // 'try' - shift(245); // 'try' - break; - case 248: // 'typeswitch' - shift(248); // 'typeswitch' - break; - case 251: // 'unordered' - shift(251); // 'unordered' - break; - case 255: // 'validate' - shift(255); // 'validate' - break; - case 257: // 'variable' - shift(257); // 'variable' - break; - case 269: // 'xquery' - shift(269); // 'xquery' - break; - case 67: // 'allowing' - shift(67); // 'allowing' - break; - case 76: // 'at' - shift(76); // 'at' - break; - case 78: // 'base-uri' - shift(78); // 'base-uri' - break; - case 80: // 'boundary-space' - shift(80); // 'boundary-space' - break; - case 81: // 'break' - shift(81); // 'break' - break; - case 86: // 'catch' - shift(86); // 'catch' - break; - case 93: // 'construction' - shift(93); // 'construction' - break; - case 96: // 'context' - shift(96); // 'context' - break; - case 97: // 'continue' - shift(97); // 'continue' - break; - case 99: // 'copy-namespaces' - shift(99); // 'copy-namespaces' - break; - case 101: // 'decimal-format' - shift(101); // 'decimal-format' - break; - case 120: // 'encoding' - shift(120); // 'encoding' - break; - case 127: // 'exit' - shift(127); // 'exit' - break; - case 128: // 'external' - shift(128); // 'external' - break; - case 136: // 'ft-option' - shift(136); // 'ft-option' - break; - case 149: // 'in' - shift(149); // 'in' - break; - case 150: // 'index' - shift(150); // 'index' - break; - case 156: // 'integrity' - shift(156); // 'integrity' - break; - case 166: // 'lax' - shift(166); // 'lax' - break; - case 187: // 'nodes' - shift(187); // 'nodes' - break; - case 194: // 'option' - shift(194); // 'option' - break; - case 198: // 'ordering' - shift(198); // 'ordering' - break; - case 217: // 'revalidation' - shift(217); // 'revalidation' - break; - case 220: // 'schema' - shift(220); // 'schema' - break; - case 223: // 'score' - shift(223); // 'score' - break; - case 229: // 'sliding' - shift(229); // 'sliding' - break; - case 235: // 'strict' - shift(235); // 'strict' - break; - case 246: // 'tumbling' - shift(246); // 'tumbling' - break; - case 247: // 'type' - shift(247); // 'type' - break; - case 252: // 'updating' - shift(252); // 'updating' - break; - case 256: // 'value' - shift(256); // 'value' - break; - case 258: // 'version' - shift(258); // 'version' - break; - case 262: // 'while' - shift(262); // 'while' - break; - case 92: // 'constraint' - shift(92); // 'constraint' - break; - case 171: // 'loop' - shift(171); // 'loop' - break; - default: - shift(216); // 'returning' - } - eventHandler.endNonterminal("NCName", e0); - } - - function shift(t) - { - if (l1 == t) - { - whitespace(); - eventHandler.terminal(XQueryTokenizer.TOKEN[l1], b1, e1 > size ? size : e1); - b0 = b1; e0 = e1; l1 = 0; - } - else - { - error(b1, e1, 0, l1, t); - } - } - - function whitespace() - { - if (e0 != b1) - { - b0 = e0; - e0 = b1; - eventHandler.whitespace(b0, e0); - } - } - - function matchW(set) - { - var code; - for (;;) - { - code = match(set); - if (code != 28) // S^WS - { - break; - } - } - return code; - } - - function lookahead1W(set) - { - if (l1 == 0) - { - l1 = matchW(set); - b1 = begin; - e1 = end; - } - } - - function lookahead1(set) - { - if (l1 == 0) - { - l1 = match(set); - b1 = begin; - e1 = end; - } - } - - function error(b, e, s, l, t) - { - throw new self.ParseException(b, e, s, l, t); - } - - var lk, b0, e0; - var l1, b1, e1; - var eventHandler; - - var input; - var size; - var begin; - var end; - - function match(tokenSetId) - { - var nonbmp = false; - begin = end; - var current = end; - var result = XQueryTokenizer.INITIAL[tokenSetId]; - var state = 0; - - for (var code = result & 4095; code != 0; ) - { - var charclass; - var c0 = current < size ? input.charCodeAt(current) : 0; - ++current; - if (c0 < 0x80) - { - charclass = XQueryTokenizer.MAP0[c0]; - } - else if (c0 < 0xd800) - { - var c1 = c0 >> 4; - charclass = XQueryTokenizer.MAP1[(c0 & 15) + XQueryTokenizer.MAP1[(c1 & 31) + XQueryTokenizer.MAP1[c1 >> 5]]]; - } - else - { - if (c0 < 0xdc00) - { - var c1 = current < size ? input.charCodeAt(current) : 0; - if (c1 >= 0xdc00 && c1 < 0xe000) - { - ++current; - c0 = ((c0 & 0x3ff) << 10) + (c1 & 0x3ff) + 0x10000; - nonbmp = true; - } - } - var lo = 0, hi = 5; - for (var m = 3; ; m = (hi + lo) >> 1) - { - if (XQueryTokenizer.MAP2[m] > c0) hi = m - 1; - else if (XQueryTokenizer.MAP2[6 + m] < c0) lo = m + 1; - else {charclass = XQueryTokenizer.MAP2[12 + m]; break;} - if (lo > hi) {charclass = 0; break;} - } - } - - state = code; - var i0 = (charclass << 12) + code - 1; - code = XQueryTokenizer.TRANSITION[(i0 & 15) + XQueryTokenizer.TRANSITION[i0 >> 4]]; - - if (code > 4095) - { - result = code; - code &= 4095; - end = current; - } - } - - result >>= 12; - if (result == 0) - { - end = current - 1; - var c1 = end < size ? input.charCodeAt(end) : 0; - if (c1 >= 0xdc00 && c1 < 0xe000) --end; - return error(begin, end, state, -1, -1); - } - - if (nonbmp) - { - for (var i = result >> 9; i > 0; --i) - { - --end; - var c1 = end < size ? input.charCodeAt(end) : 0; - if (c1 >= 0xdc00 && c1 < 0xe000) --end; - } - } - else - { - end -= result >> 9; - } - - return (result & 511) - 1; - } -} - -XQueryTokenizer.getTokenSet = function(tokenSetId) -{ - var set = []; - var s = tokenSetId < 0 ? - tokenSetId : INITIAL[tokenSetId] & 4095; - for (var i = 0; i < 276; i += 32) - { - var j = i; - var i0 = (i >> 5) * 2062 + s - 1; - var i1 = i0 >> 2; - var i2 = i1 >> 2; - var f = XQueryTokenizer.EXPECTED[(i0 & 3) + XQueryTokenizer.EXPECTED[(i1 & 3) + XQueryTokenizer.EXPECTED[(i2 & 3) + XQueryTokenizer.EXPECTED[i2 >> 2]]]]; - for ( ; f != 0; f >>>= 1, ++j) - { - if ((f & 1) != 0) - { - set.push(XQueryTokenizer.TOKEN[j]); - } - } - } - return set; -}; - -XQueryTokenizer.MAP0 = -[ 66, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 35 -]; - -XQueryTokenizer.MAP1 = -[ 108, 124, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 156, 181, 181, 181, 181, 181, 214, 215, 213, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 247, 261, 277, 293, 309, 347, 363, 379, 416, 416, 416, 408, 331, 323, 331, 323, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 433, 433, 433, 433, 433, 433, 433, 316, 331, 331, 331, 331, 331, 331, 331, 331, 394, 416, 416, 417, 415, 416, 416, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 330, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 66, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 35, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 31, 31, 35, 35, 35, 35, 35, 35, 35, 65, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65 -]; - -XQueryTokenizer.MAP2 = -[ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 35, 31, 35, 31, 31, 35 -]; - -XQueryTokenizer.INITIAL = -[ 1, 2, 36867, 45060, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 -]; - -XQueryTokenizer.TRANSITION = -[ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22908, 18836, 17152, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17365, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 17470, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18157, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 17848, 17880, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18023, 36545, 18621, 18039, 18056, 18072, 18117, 18143, 18173, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17687, 18805, 18421, 18437, 18101, 17393, 18489, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18579, 21711, 17152, 19008, 19233, 20367, 19008, 28684, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17365, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 17470, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18157, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 17848, 17880, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18023, 36545, 18621, 18039, 18056, 18072, 18117, 18143, 18173, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17687, 18805, 18421, 18437, 18101, 17393, 18489, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 20116, 18836, 18637, 19008, 19233, 21267, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18763, 18778, 18794, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18821, 22923, 18906, 19008, 19233, 17431, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18937, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 19054, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 18953, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21843, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21696, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22429, 20131, 18720, 19008, 19233, 20367, 19008, 17173, 23559, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 18087, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 21242, 19111, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19024, 18836, 18609, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19081, 22444, 18987, 19008, 19233, 20367, 19008, 19065, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21992, 22007, 18987, 19008, 19233, 20367, 19008, 18690, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22414, 18836, 18987, 19008, 19233, 30651, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 19138, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 19280, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 19172, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21783, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 19218, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21651, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19249, 19265, 19307, 18888, 27857, 30536, 24401, 31444, 23357, 18888, 19351, 18888, 18890, 27211, 19370, 27211, 27211, 19392, 24401, 31911, 24401, 24401, 25467, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19440, 24401, 24401, 24401, 24401, 24036, 17994, 24060, 18888, 18888, 18888, 18890, 19468, 27211, 27211, 27211, 27211, 19484, 35367, 19520, 24401, 24401, 24401, 19628, 18888, 29855, 18888, 18888, 23086, 27211, 19538, 27211, 27211, 30756, 24012, 24401, 19560, 24401, 24401, 26750, 18888, 18888, 19327, 27855, 27211, 27211, 19580, 17590, 24017, 24401, 24401, 19600, 25665, 18888, 18888, 28518, 27211, 27212, 24016, 19620, 19868, 28435, 25722, 18889, 19644, 27211, 32888, 35852, 19868, 31018, 19694, 19376, 19717, 22215, 19735, 22098, 19751, 35203, 19776, 19797, 19817, 19840, 25783, 31738, 24135, 19701, 19856, 31015, 23516, 31008, 28311, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21768, 18836, 19307, 18888, 27857, 27904, 24401, 29183, 28015, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 19888, 24401, 24401, 24401, 24401, 22953, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19440, 24401, 24401, 24401, 24401, 24036, 18881, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22399, 18836, 19918, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21666, 18836, 19307, 18888, 27857, 27525, 24401, 29183, 21467, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 19946, 24401, 24401, 24401, 24401, 32382, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19998, 24401, 24401, 24401, 24401, 31500, 18467, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 20021, 24401, 24401, 24401, 24401, 24401, 34271, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 32926, 29908, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 20050, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 20101, 19039, 20191, 20412, 20903, 17569, 20309, 20872, 25633, 20623, 20505, 20218, 20242, 17189, 17208, 17281, 20355, 20265, 20306, 20328, 20383, 22490, 20796, 20619, 21354, 20654, 20410, 20956, 21232, 20765, 17421, 20535, 17192, 18127, 22459, 20312, 25531, 22470, 20309, 20428, 18964, 20466, 20491, 21342, 21070, 20521, 20682, 17714, 18326, 17543, 17559, 17585, 22497, 20559, 19504, 20279, 20575, 20290, 20475, 20604, 20639, 20226, 20670, 17661, 21190, 17703, 21176, 17730, 19494, 20698, 20711, 22480, 21046, 21116, 18971, 21130, 20727, 20755, 17675, 17753, 17832, 17590, 25518, 20394, 20781, 20831, 20202, 20847, 21401, 17292, 17934, 17979, 18549, 20863, 20588, 25542, 20888, 20919, 18072, 18117, 20935, 20972, 21032, 21062, 21086, 18239, 21102, 18563, 21146, 21162, 21206, 18351, 20949, 20902, 18340, 21222, 21258, 21283, 18360, 20249, 17405, 21295, 21311, 21327, 20739, 20343, 21370, 21386, 21417, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21977, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 21452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 21504, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 36501, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 28674, 21946, 17617, 36473, 18223, 17237, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 21575, 21534, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 21560, 30628, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21798, 18836, 21612, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21636, 18836, 18987, 19008, 19233, 17902, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21753, 19096, 21903, 19008, 19233, 20367, 19008, 19291, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17379, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 21931, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18280, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21962, 18594, 18987, 19008, 19233, 22043, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21681, 21858, 18987, 19008, 19233, 20367, 19008, 21544, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 32319, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 22231, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 31678, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 33588, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 35019, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22248, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22324, 18836, 22059, 18888, 27857, 30501, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 34365, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22354, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 27086, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 19930, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21828, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22309, 22513, 18987, 19008, 19233, 20367, 19008, 19122, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 22544, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22608, 18836, 22988, 23004, 27585, 23020, 23036, 23067, 22087, 18888, 18888, 18888, 23083, 27211, 27211, 27211, 23102, 22121, 24401, 24401, 24401, 23122, 31386, 26154, 19674, 18888, 28119, 28232, 19424, 23705, 27211, 27211, 23142, 23173, 23189, 23212, 24401, 24401, 23246, 34427, 31693, 23262, 18888, 23290, 23308, 27783, 27620, 23327, 35263, 35107, 33383, 23346, 18193, 23393, 32748, 23968, 24401, 23414, 35153, 23463, 18888, 33913, 23442, 23482, 27211, 27211, 23532, 23552, 21431, 23575, 24401, 24401, 23604, 26095, 23635, 23657, 18888, 33482, 23685, 33251, 27211, 22187, 18851, 23721, 35536, 24401, 18887, 23750, 32641, 27211, 23769, 23787, 20080, 33012, 24384, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 23803, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 28224, 31826, 23823, 26917, 34978, 23850, 26493, 25782, 23878, 23914, 23516, 31008, 22105, 19419, 27963, 19659, 29781, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22623, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 28909, 25783, 27211, 27211, 27211, 34048, 23933, 22164, 24401, 24401, 24401, 28409, 23949, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 26583, 18888, 18888, 18888, 35585, 23984, 27211, 27211, 27211, 24005, 22201, 24033, 24401, 24401, 24401, 24052, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 26496, 24076, 24126, 24151, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22638, 18836, 22059, 19678, 27857, 24185, 24401, 24201, 24217, 26592, 18888, 18888, 18890, 24252, 24268, 27211, 27211, 22121, 24287, 24303, 24401, 24401, 30613, 19781, 35432, 36007, 32649, 18888, 25783, 24322, 28966, 23771, 27211, 35072, 22164, 24358, 32106, 26829, 24400, 31500, 31693, 18888, 18888, 18888, 24801, 18890, 27211, 27211, 27211, 27211, 24418, 19484, 24401, 24401, 24401, 24401, 20167, 31181, 18888, 18888, 18888, 27833, 23086, 27211, 27211, 33540, 27211, 30756, 21431, 24401, 24401, 22972, 24401, 26095, 18888, 36131, 18888, 27855, 27211, 24440, 27211, 22187, 22968, 24401, 24459, 24401, 31699, 28454, 18888, 34528, 34570, 35779, 24478, 24402, 24494, 25659, 18888, 36228, 27211, 27211, 24515, 30981, 23734, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 24538, 31017, 27856, 31741, 30059, 23377, 24563, 19837, 25782, 19760, 31015, 23516, 25374, 22105, 19419, 29793, 24579, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22653, 18836, 22059, 25756, 19982, 34097, 23196, 29183, 24614, 24110, 23641, 24673, 26103, 24697, 24443, 24713, 28558, 22121, 24748, 24462, 24764, 23398, 30613, 18888, 18888, 18888, 18888, 24798, 25783, 27211, 27211, 27211, 34232, 35072, 22164, 24401, 24401, 24401, 33302, 31500, 22559, 24106, 24232, 18888, 18888, 34970, 24817, 30411, 27211, 27211, 32484, 19484, 29750, 35127, 24401, 24401, 19872, 31181, 24852, 18888, 18888, 24871, 29221, 27211, 27211, 32072, 27211, 30756, 34441, 24401, 24401, 31571, 24401, 26095, 33141, 27802, 27011, 27855, 25295, 25607, 24888, 22187, 22968, 19195, 34593, 24906, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 33663, 27211, 27211, 24924, 24947, 23588, 31018, 18890, 27211, 31833, 22135, 19447, 23086, 23330, 19828, 30904, 31042, 24972, 19840, 25000, 31738, 30898, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 25016, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22668, 18836, 25041, 25057, 31320, 25073, 25089, 25105, 22087, 34796, 24236, 36138, 34870, 34125, 25121, 23106, 35497, 22248, 36613, 25137, 30671, 27365, 30613, 25153, 26447, 25199, 25233, 22574, 23274, 25249, 25265, 25281, 25318, 25344, 25360, 25400, 25428, 25452, 26731, 25504, 31693, 23669, 25558, 27407, 25575, 28599, 25934, 25599, 27211, 28180, 27304, 25623, 25839, 25649, 24401, 34820, 25681, 25698, 22586, 27775, 30190, 25745, 25778, 25799, 25817, 28995, 33569, 30756, 21518, 33443, 25837, 25855, 25893, 26095, 31254, 26677, 30136, 27855, 25930, 25950, 27211, 22187, 22968, 25966, 25986, 24401, 23428, 27763, 36330, 26959, 26002, 26029, 26045, 26085, 26119, 26170, 26203, 26222, 26239, 30527, 26372, 26274, 28404, 31018, 33757, 27211, 34262, 26316, 36729, 26345, 26366, 35337, 31017, 26388, 26407, 30954, 26350, 33861, 26434, 26463, 26479, 26512, 23516, 33189, 26531, 26547, 27963, 31293, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22683, 18836, 26568, 26181, 26608, 34097, 26643, 29183, 22087, 26669, 18888, 18888, 18890, 26693, 27211, 27211, 27211, 22121, 26720, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 26774, 25783, 27211, 27211, 27211, 26619, 35072, 22164, 24401, 24401, 24401, 21596, 31500, 31693, 18888, 18888, 33978, 18888, 18890, 27211, 27211, 25801, 27211, 27211, 19484, 24401, 24401, 24401, 26792, 24401, 31181, 18888, 18888, 18888, 35464, 23086, 27211, 27211, 27211, 26809, 30756, 21431, 24401, 24401, 24401, 26828, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 31948, 18889, 35707, 27211, 19719, 26845, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 26905, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 24984, 31088, 19419, 26945, 27651, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22698, 18836, 26999, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 23051, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 27033, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 27056, 18888, 18890, 27211, 27211, 30320, 27211, 27211, 27075, 24401, 24401, 29032, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 33986, 27855, 27211, 27211, 27102, 17590, 24017, 24401, 24401, 27123, 27144, 36254, 27162, 27210, 27228, 28500, 18187, 34842, 33426, 27244, 35980, 27277, 27302, 27320, 36048, 34013, 20999, 31882, 21478, 27895, 27356, 30287, 27381, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 26329, 30087, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 27406, 27423, 27445, 35294, 27461, 22087, 18888, 18888, 30140, 18890, 27211, 27211, 27989, 27211, 22121, 24401, 24401, 25682, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 34042, 27211, 27211, 27211, 27211, 29700, 22164, 24401, 24401, 24401, 24401, 27128, 31693, 27477, 18888, 18888, 18888, 18890, 27194, 27211, 27211, 27211, 27211, 19484, 35299, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 27059, 23086, 27211, 27211, 27211, 33366, 30756, 24012, 24401, 24401, 24401, 35044, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 20815, 27211, 30818, 19960, 33969, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22713, 18836, 22059, 27496, 27516, 27541, 35231, 27557, 22087, 29662, 26292, 23292, 27573, 24836, 27601, 27211, 27636, 22121, 35544, 27686, 24401, 27721, 18866, 18888, 27799, 18888, 27818, 22071, 27853, 32260, 27211, 26013, 27873, 27920, 22164, 29419, 24401, 29946, 33413, 26742, 27751, 26881, 18888, 18888, 27261, 36776, 27936, 27211, 27211, 27211, 27988, 28005, 28031, 28052, 24401, 24401, 28069, 28088, 28135, 25488, 28152, 26069, 28167, 27211, 28340, 24657, 28196, 30756, 31523, 24401, 28212, 34176, 36174, 24956, 28248, 28266, 28290, 21488, 33077, 28327, 28356, 17590, 20986, 23126, 28391, 28425, 28102, 28451, 28470, 28490, 28516, 28534, 20034, 33728, 25868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 30241, 28274, 28553, 28574, 19406, 28590, 23086, 23330, 19828, 19452, 28615, 28660, 26147, 25783, 31738, 19837, 25782, 19760, 29613, 35958, 29276, 22105, 19419, 27963, 23157, 28700, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 22528, 18888, 18888, 18888, 18888, 18890, 27333, 27211, 27211, 27211, 27211, 19484, 30853, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22728, 18836, 28747, 28782, 28817, 28841, 28857, 28880, 28896, 24161, 28943, 32011, 36261, 27340, 28961, 29492, 28982, 29011, 24522, 29027, 25436, 29048, 23051, 27500, 29090, 29110, 30713, 18888, 23512, 29130, 25183, 27211, 29155, 28927, 27033, 29173, 23230, 24401, 29199, 35373, 31693, 18888, 18888, 25583, 32629, 29218, 27211, 27211, 31461, 30692, 29237, 27075, 24401, 24401, 24401, 29262, 29302, 19628, 18888, 34329, 18888, 18888, 23086, 27211, 29329, 27211, 27211, 30756, 24012, 35933, 24401, 24401, 24401, 27705, 31612, 18888, 18888, 29346, 29374, 27211, 35650, 17590, 21436, 29393, 24401, 25970, 18887, 33895, 18888, 27211, 32528, 27212, 24016, 32769, 19868, 25659, 18888, 26889, 27211, 27211, 29412, 23889, 24371, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31768, 19840, 25783, 31738, 19837, 29435, 29508, 31102, 29550, 29606, 22105, 30300, 29462, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22743, 18836, 22059, 29629, 29473, 34097, 33285, 29183, 29651, 27254, 18888, 29678, 33329, 32535, 27211, 29694, 29716, 22121, 19202, 24401, 32742, 29741, 18866, 26776, 33921, 28474, 18888, 18888, 25783, 29766, 27211, 29809, 27211, 35072, 22164, 35825, 24401, 29828, 24401, 24036, 36769, 25217, 18888, 18888, 29848, 18890, 27211, 29871, 27211, 26258, 27211, 29894, 24401, 29929, 24401, 36587, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 29725, 29962, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18473, 18888, 18888, 19584, 27211, 27212, 24016, 29982, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19902, 19447, 32052, 19544, 19828, 29998, 30097, 30031, 19840, 25783, 30047, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 30075, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22758, 18836, 30121, 30156, 30206, 30257, 30273, 30336, 22087, 35624, 32837, 25762, 18890, 29878, 34934, 26812, 27211, 22121, 24931, 23223, 29202, 24401, 18866, 34373, 30352, 18888, 18888, 18888, 23447, 24828, 27211, 27211, 27211, 35072, 30370, 35052, 24401, 24401, 24401, 24036, 29523, 18888, 18888, 27146, 18888, 31308, 30386, 27211, 27211, 30405, 30558, 19484, 30427, 24401, 24401, 29938, 35686, 19628, 28766, 30447, 34506, 35614, 23086, 28731, 30482, 30517, 30552, 30756, 24012, 20156, 30574, 30598, 30667, 26283, 33464, 28945, 27670, 30687, 32915, 33504, 25328, 17590, 23963, 20450, 33837, 21016, 32397, 26300, 30708, 30729, 27885, 30748, 21588, 36373, 30779, 26653, 24628, 33220, 32514, 30806, 31835, 25412, 25906, 26515, 18890, 28825, 31833, 26133, 19447, 28304, 31730, 23834, 26057, 30869, 30885, 32181, 30920, 30942, 32797, 25782, 30970, 31015, 23516, 31008, 30997, 31034, 27963, 19659, 29450, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22773, 18836, 31058, 31074, 32463, 31125, 31141, 31197, 22087, 18888, 29534, 35471, 36738, 27211, 24342, 31213, 24424, 22121, 24401, 20175, 31229, 31917, 27736, 31245, 34334, 27175, 18888, 29094, 27286, 27211, 31278, 31336, 27211, 31355, 31371, 24401, 31402, 31418, 24401, 31437, 31693, 18888, 31619, 32841, 18888, 18890, 27211, 27211, 31460, 31477, 27211, 19484, 24401, 24401, 31497, 36581, 24401, 33020, 18888, 18888, 18888, 18888, 30007, 27211, 27211, 27211, 27211, 31516, 32310, 24401, 24401, 24401, 24401, 31539, 18888, 28762, 18888, 24651, 35740, 27211, 27211, 28644, 31565, 35796, 24401, 24401, 19318, 32188, 18888, 24334, 28366, 27212, 29966, 29832, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 31587, 19868, 31635, 32435, 33693, 30105, 31663, 20005, 31715, 31757, 31784, 31812, 30015, 31851, 31878, 25783, 31898, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 31933, 30221, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22788, 18836, 22059, 25729, 30466, 31968, 24306, 31984, 32000, 32807, 35160, 27017, 29590, 34941, 19801, 29377, 33700, 22121, 27040, 30431, 29396, 28864, 29565, 18888, 18888, 18888, 32027, 18888, 25783, 27211, 27211, 23698, 27211, 35072, 22164, 24401, 24401, 30845, 24401, 24036, 32045, 18888, 26929, 18888, 18888, 18890, 27211, 31481, 32068, 27211, 27211, 32088, 24401, 33058, 32122, 24401, 24401, 33736, 18888, 18888, 33162, 18888, 23086, 27211, 27211, 29484, 27211, 28375, 32144, 24401, 24401, 33831, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 36704, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 33107, 22171, 33224, 24271, 32169, 31017, 27856, 31741, 19840, 25783, 31738, 30234, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 32204, 32232, 32252, 32677, 33295, 29074, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 23619, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 32276, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 32299, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 33886, 18889, 36065, 27211, 19719, 35326, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22803, 18836, 32335, 31647, 34666, 32351, 32367, 32417, 22087, 18888, 32433, 19335, 32451, 27211, 32479, 27107, 32500, 22121, 24401, 32551, 20085, 32572, 18866, 22287, 23753, 18888, 18888, 32602, 32665, 27211, 32693, 27211, 26972, 32713, 32729, 24401, 32764, 24401, 25877, 32785, 34768, 18888, 27390, 32823, 24594, 24855, 32857, 24890, 32878, 32904, 27211, 32942, 32977, 24401, 33000, 29313, 24401, 30790, 26206, 27666, 33904, 18888, 23086, 36353, 27211, 33036, 27211, 30756, 24012, 32153, 24401, 33056, 24401, 35861, 18888, 18888, 30354, 27972, 27211, 27211, 33800, 17590, 20145, 24401, 24401, 34638, 20811, 18888, 18888, 33074, 27211, 27212, 36167, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 34616, 24169, 33093, 33123, 33157, 27856, 31741, 23862, 26552, 34302, 19837, 25782, 19760, 31015, 23516, 31008, 33178, 19973, 27963, 23497, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22818, 18836, 33205, 28113, 33240, 34097, 33275, 29183, 22087, 33318, 35438, 18888, 18890, 33345, 26391, 33382, 27211, 22121, 33399, 28072, 33442, 24401, 18866, 22232, 18888, 33459, 18888, 18888, 33480, 33498, 25175, 27211, 27211, 26704, 22164, 24775, 35239, 24401, 24401, 25914, 29580, 18888, 18888, 31109, 25211, 33520, 33539, 27211, 27211, 33556, 36284, 19484, 33585, 24401, 24401, 33604, 32556, 19628, 18888, 18888, 31262, 33658, 23086, 27211, 27211, 33679, 27211, 30756, 24012, 24401, 24401, 33716, 24401, 26854, 27480, 18888, 33752, 27855, 33259, 34701, 27211, 17590, 32102, 24782, 23807, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 33773, 36105, 19868, 25659, 18888, 23368, 27211, 29157, 19719, 23889, 34454, 29286, 18890, 33794, 25302, 33816, 19447, 34079, 33853, 31862, 31017, 27856, 31741, 33877, 28920, 33937, 19837, 30461, 34002, 22276, 36041, 34029, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22833, 18836, 34064, 32616, 34113, 34141, 34157, 34192, 34208, 32216, 36013, 31549, 31952, 34224, 34248, 34287, 29330, 34350, 34389, 34413, 34481, 26793, 18866, 26187, 29635, 22293, 18888, 36654, 25783, 34522, 34544, 34566, 25821, 35072, 22164, 34586, 34609, 34632, 19604, 24036, 36644, 36674, 24681, 18888, 32401, 34654, 31339, 34682, 34698, 27211, 34717, 34753, 28053, 34812, 34836, 24401, 33619, 19628, 34858, 32236, 34906, 24598, 33523, 27612, 34890, 34922, 24732, 29246, 36717, 33634, 34465, 32984, 34168, 26750, 34957, 18888, 18888, 34994, 35010, 27211, 33040, 17590, 29913, 35035, 24401, 36304, 25482, 30171, 35883, 35068, 35088, 26627, 20441, 31173, 35123, 35143, 35176, 24640, 30492, 29358, 19719, 35192, 35219, 25384, 28801, 35255, 35279, 32586, 34496, 23086, 23330, 29061, 31017, 27856, 31741, 19840, 25783, 31738, 24547, 25164, 35315, 31796, 35353, 34316, 22105, 19419, 27963, 24091, 28630, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22848, 18836, 22059, 34782, 34088, 35389, 21008, 35405, 35421, 35454, 18888, 18888, 23466, 35487, 27211, 27211, 27211, 35513, 31154, 24401, 24401, 24401, 35560, 18888, 26863, 36664, 35601, 24872, 25783, 30389, 23536, 26250, 35647, 35666, 22164, 19522, 19564, 30582, 35682, 27697, 35575, 29114, 18888, 18888, 18888, 18890, 27211, 35702, 27211, 27211, 27211, 35723, 24401, 35527, 24401, 24401, 24401, 19628, 30184, 18888, 18888, 18888, 23086, 35739, 27211, 27211, 27211, 29139, 22938, 24401, 24401, 24401, 24401, 23898, 35756, 18888, 18888, 25025, 35778, 27211, 27211, 17590, 20064, 35795, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 23917, 18890, 34550, 31833, 22262, 19447, 23086, 23330, 26418, 31017, 27856, 31741, 19840, 25783, 35812, 19837, 27187, 35841, 33135, 23516, 31008, 22105, 22148, 28712, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22863, 18836, 22059, 35877, 28723, 34097, 31164, 29183, 22087, 26758, 18888, 22592, 18890, 23989, 27211, 29812, 27211, 22121, 33778, 24401, 31421, 24401, 18866, 18888, 18888, 26872, 18888, 18888, 25783, 27211, 30732, 27211, 27211, 35072, 22164, 24401, 24908, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22878, 18836, 22059, 27837, 27857, 35899, 24401, 35915, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31602, 18888, 18888, 18888, 18888, 26223, 27211, 27211, 27211, 27211, 27211, 19484, 35931, 24401, 24401, 24401, 24401, 19628, 18888, 28136, 18888, 18888, 35949, 27211, 32862, 27211, 32697, 30756, 24012, 24401, 32283, 24401, 32128, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22893, 18836, 22059, 35974, 34882, 34097, 33960, 29183, 35996, 18888, 23311, 18888, 36029, 27211, 27211, 36064, 36081, 22121, 24401, 24401, 36104, 33950, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 36121, 18888, 25559, 18888, 18888, 18890, 27211, 27211, 30313, 27211, 27211, 36154, 24401, 24401, 34397, 24401, 24401, 19628, 28250, 18888, 18888, 18888, 23086, 30926, 27211, 27211, 27211, 26983, 24012, 33642, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 19354, 27857, 36190, 24401, 36206, 22087, 18888, 18888, 18888, 18007, 27211, 27211, 27211, 24724, 22121, 24401, 24401, 24401, 30827, 18866, 18888, 36222, 18888, 28795, 18888, 25783, 35100, 27211, 27429, 27211, 35072, 22164, 30836, 24401, 24499, 24401, 24036, 31693, 18888, 36244, 18888, 18888, 18890, 27211, 36088, 27211, 27211, 27211, 19484, 24401, 28036, 24401, 24401, 24401, 19628, 18888, 18888, 35631, 18888, 35762, 27211, 27211, 36277, 27211, 34730, 24012, 24401, 24401, 36300, 24401, 36320, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 25712, 18888, 18888, 36346, 27211, 27212, 19184, 24402, 19868, 25659, 32029, 18889, 27211, 33359, 19719, 23889, 36369, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22384, 18836, 36389, 19008, 19233, 20367, 36434, 17173, 17595, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 36453, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20362, 21726, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22369, 18836, 18987, 19008, 19233, 20367, 19008, 21737, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21813, 18836, 36489, 19008, 19233, 20367, 19008, 17173, 17737, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17768, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20543, 22022, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21828, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 36517, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21828, 18836, 19307, 18888, 27857, 30756, 24401, 29183, 28015, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 36567, 24401, 24401, 24401, 24401, 22953, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 36603, 24401, 24401, 24401, 24401, 24036, 18881, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 36629, 36690, 18720, 19008, 19233, 20367, 19008, 17454, 17595, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17223, 17308, 17327, 17346, 18918, 36754, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20362, 21726, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 0, 94242, 0, 118820, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2482176, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 2207744, 2404352, 2412544, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3104768, 2605056, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2678784, 2207744, 2695168, 2207744, 2703360, 2207744, 2711552, 2752512, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 3170304, 3174400, 2158592, 0, 139, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088, 2801664, 2158592, 2158592, 2158592, 2863104, 2891776, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2785280, 2207744, 2809856, 2207744, 2207744, 2842624, 2207744, 2207744, 2207744, 2899968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2473984, 2207744, 2207744, 2494464, 2207744, 2207744, 2207744, 2523136, 2158592, 2404352, 2412544, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2564096, 2158592, 2158592, 2605056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2678784, 2158592, 2695168, 2158592, 2703360, 2158592, 2711552, 2752512, 2158592, 2158592, 2785280, 2158592, 2158592, 2785280, 2158592, 2809856, 2158592, 2158592, 2842624, 2158592, 2158592, 2158592, 2899968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 641, 0, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 32768, 0, 2158592, 0, 2158592, 2158592, 2158592, 2383872, 2158592, 2158592, 2158592, 2158592, 3006464, 2383872, 2207744, 2207744, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2572573, 2158877, 2158877, 0, 2207744, 2207744, 2596864, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2641920, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 167936, 0, 0, 2162688, 0, 0, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2146304, 2146304, 2224128, 2224128, 2232320, 2232320, 2232320, 641, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2531328, 2158592, 2158592, 2158592, 2158592, 2158592, 2617344, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2502656, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592, 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2699264, 2158592, 2158592, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088, 2801664, 2207744, 2863104, 2891776, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3018752, 2207744, 3043328, 2207744, 2207744, 2207744, 2207744, 3080192, 2207744, 2207744, 3112960, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 172310, 279, 0, 2162688, 0, 0, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2404352, 2412544, 2158592, 2510848, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2584576, 2158592, 2609152, 2158592, 2158592, 2629632, 2158592, 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 3121152, 2158592, 2158592, 2158592, 3149824, 2158592, 2158592, 3170304, 3174400, 2158592, 2367488, 2207744, 2207744, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288, 2158592, 2158592, 0, 2207744, 2207744, 2207744, 2433024, 2207744, 2453504, 2461696, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2510848, 2207744, 2207744, 2207744, 2207744, 2207744, 2531328, 2207744, 2207744, 2207744, 2207744, 2207744, 2617344, 2207744, 2207744, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288, 2158592, 2158592, 1508, 2715648, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2867200, 2207744, 2904064, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2580480, 2207744, 2207744, 2207744, 2207744, 2621440, 2207744, 2207744, 2207744, 3149824, 2207744, 2207744, 3170304, 3174400, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 2158592, 2158592, 2158592, 2404352, 2412544, 2707456, 2732032, 2207744, 2207744, 2207744, 2822144, 2826240, 2207744, 2895872, 2207744, 2207744, 2924544, 2207744, 2207744, 2973696, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 285, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 0, 0, 2535424, 2543616, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2990080, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2572288, 2981888, 2207744, 2207744, 3002368, 2207744, 3047424, 3063808, 3076096, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3203072, 2708960, 2732032, 2158592, 2158592, 2158592, 2822144, 2827748, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592, 2981888, 2158592, 2158592, 3002368, 2158592, 3047424, 3063808, 3076096, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3203072, 2981888, 2158592, 2158592, 3003876, 2158592, 3047424, 3063808, 3076096, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3203072, 2207744, 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 20480, 0, 0, 0, 0, 0, 2162688, 20480, 0, 2523136, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2908160, 2527232, 2207744, 2207744, 2576384, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2908160, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 286, 2158592, 2158592, 0, 0, 2158592, 2158592, 2158592, 2158592, 2633728, 2658304, 0, 0, 2740224, 2744320, 0, 2834432, 2207744, 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3158016, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 933, 45, 45, 45, 45, 442, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 2494464, 2158592, 2158592, 2158592, 2524757, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 1504, 2158592, 2498560, 2158592, 2158592, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 2736128, 2158592, 2158592, 0, 2158592, 2912256, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3108864, 2158592, 2158592, 3133440, 3145728, 3153920, 2375680, 2379776, 2207744, 2207744, 2420736, 2207744, 2449408, 2207744, 2207744, 2207744, 2498560, 2207744, 2207744, 2207744, 2207744, 2568192, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 551, 2158592, 2158592, 2158592, 2158592, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 2020, 2158592, 2592768, 2625536, 2207744, 2207744, 2674688, 2736128, 2207744, 2207744, 2207744, 2912256, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 542, 0, 544, 2207744, 3108864, 2207744, 2207744, 3133440, 3145728, 3153920, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 641, 0, 0, 0, 0, 0, 0, 2367488, 2158592, 2498560, 2158592, 2158592, 1621, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 1608, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1107, 97, 97, 1110, 97, 97, 3133440, 3145728, 3153920, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3014656, 2158592, 2158592, 3051520, 2158592, 2158592, 3100672, 2158592, 2158592, 3121152, 2158592, 2158592, 2158592, 3149824, 2416640, 2207744, 2465792, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2633728, 2658304, 2740224, 2744320, 2834432, 2949120, 2158592, 2985984, 2158592, 2998272, 2158592, 2158592, 2158592, 3129344, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744, 2207744, 3129344, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 32768, 0, 0, 0, 0, 0, 0, 2367488, 2949120, 2158592, 2985984, 2158592, 2998272, 2158592, 2158592, 2158592, 3129344, 2158592, 2158592, 2478080, 2158592, 2158592, 2158592, 2535424, 2543616, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3117056, 2207744, 2207744, 2478080, 2207744, 2207744, 2207744, 2207744, 2699264, 2207744, 2207744, 2207744, 2207744, 2207744, 2748416, 2756608, 2777088, 2801664, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 0, 0, 2535709, 2543901, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2990365, 2158877, 2158877, 2158730, 2158730, 2158730, 2158730, 2158730, 2572426, 2207744, 2535424, 2543616, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158592, 2158592, 2478080, 2207744, 2207744, 2990080, 2207744, 2207744, 2158592, 2158592, 2482176, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 0, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592, 2158592, 2158592, 2158592, 3039232, 2158592, 2158592, 3010560, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672, 2207744, 2838528, 2207744, 2207744, 2207744, 3010560, 2158592, 2428928, 2158592, 2514944, 0, 0, 2158592, 2588672, 2158592, 0, 2838528, 2158592, 2158592, 2158592, 3010560, 2158592, 2506752, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 0, 29315, 922, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1539, 45, 3006464, 2383872, 0, 2020, 2158592, 2158592, 2158592, 2158592, 3006464, 2158592, 2637824, 2953216, 2158592, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158592, 2637824, 2953216, 2158592, 2539520, 2158592, 2539520, 2207744, 0, 0, 2539520, 2158592, 2158592, 2158592, 2158592, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 0, 2158592, 2207744, 0, 2158592, 2158592, 2207744, 0, 2158592, 2158592, 2207744, 0, 2158592, 2965504, 2965504, 2965504, 0, 0, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2474269, 2158877, 2158877, 0, 0, 2158877, 2158877, 2158877, 2158877, 2634013, 2658589, 0, 0, 2740509, 2744605, 0, 2834717, 40976, 18, 36884, 45078, 24, 28, 90143, 94242, 118820, 102439, 106538, 98347, 118820, 118820, 118820, 40976, 18, 18, 36884, 0, 0, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 86016, 0, 0, 2211840, 102439, 0, 0, 0, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 0, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 135, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2564096, 2158592, 2158592, 2158592, 2158592, 2158592, 2596864, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2641920, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2781184, 2793472, 2494464, 2158592, 2158592, 2158592, 2523136, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 0, 27, 27, 0, 2158592, 2498560, 2158592, 2158592, 0, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2494464, 2158592, 2158592, 2158592, 3006464, 2383872, 0, 0, 2158592, 2158592, 2158592, 2158592, 3006464, 2158592, 2637824, 2953216, 2158592, 2207744, 2637824, 2953216, 40976, 18, 36884, 45078, 24, 27, 147488, 94242, 147456, 147488, 106538, 98347, 0, 0, 147456, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 0, 81920, 0, 94242, 0, 0, 0, 2211840, 0, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2428928, 2158592, 2514944, 2158592, 2588672, 2158592, 2838528, 2158592, 2158592, 40976, 18, 151573, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1315, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1487, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 130, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3096576, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 644, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 1080, 0, 1084, 0, 1088, 0, 0, 0, 0, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2531466, 2158730, 2158730, 2158730, 2158730, 2158730, 2617482, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2781184, 2793472, 2158592, 2818048, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27, 90143, 159779, 159744, 102439, 159779, 98347, 0, 0, 159744, 40976, 18, 18, 36884, 0, 45078, 0, 2224253, 172032, 2224253, 2232448, 2232448, 172032, 2232448, 90143, 0, 0, 2170880, 0, 0, 550, 829, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 124, 124, 127, 127, 127, 40976, 18, 36884, 45078, 25, 29, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 163931, 40976, 18, 18, 36884, 0, 45078, 249856, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 0, 827, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 4243810, 4243810, 24, 24, 27, 27, 27, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 57344, 286, 2158592, 2158592, 2158592, 2158592, 2707456, 2732032, 2158592, 2158592, 2158592, 2822144, 2826240, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 53248, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1613, 97, 97, 97, 97, 97, 97, 1495, 97, 97, 97, 97, 97, 97, 97, 97, 97, 566, 97, 97, 97, 97, 97, 97, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 546, 0, 0, 0, 0, 286, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 17, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 120, 121, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 53248, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 196608, 18, 266240, 24, 24, 27, 27, 27, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 0, 45, 45, 45, 45, 45, 45, 45, 1535, 45, 45, 45, 45, 45, 45, 45, 1416, 45, 45, 45, 45, 45, 45, 45, 45, 424, 45, 45, 45, 45, 45, 45, 45, 45, 45, 405, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 199, 45, 45, 67, 67, 67, 67, 67, 491, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1766, 67, 67, 67, 1767, 67, 24850, 24850, 12564, 12564, 0, 0, 2166784, 546, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 743, 57889, 0, 2170880, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1856, 45, 1858, 1859, 67, 67, 67, 1009, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1021, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367773, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2699549, 2158877, 2158877, 2158877, 2158877, 2158877, 2748701, 2756893, 2777373, 2801949, 97, 1115, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 857, 97, 67, 67, 67, 67, 67, 1258, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1826, 67, 97, 97, 97, 97, 97, 97, 1338, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 870, 97, 97, 67, 67, 67, 1463, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1579, 67, 67, 97, 97, 97, 1518, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 904, 905, 97, 97, 97, 97, 1620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 0, 0, 0, 0, 45, 1679, 67, 67, 67, 1682, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1690, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 189, 45, 45, 45, 1748, 45, 45, 45, 1749, 1750, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1959, 67, 67, 67, 67, 1768, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1791, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1802, 67, 1817, 67, 67, 67, 67, 67, 67, 1823, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 1848, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 659, 45, 45, 45, 45, 45, 45, 45, 1863, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 495, 67, 67, 67, 67, 67, 1878, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 1973, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1165, 97, 1167, 67, 24850, 24850, 12564, 12564, 0, 0, 2166784, 0, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1789, 97, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 136, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 229376, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 67, 24850, 24850, 12564, 12564, 0, 0, 280, 547, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 1788, 97, 97, 0, 97, 2024, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 235, 67, 67, 67, 67, 67, 57889, 547, 547, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1799, 45, 45, 45, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 1092, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1612, 97, 97, 97, 97, 1616, 97, 1297, 1472, 0, 0, 0, 0, 1303, 1474, 0, 0, 0, 0, 1309, 1476, 0, 0, 0, 0, 97, 97, 97, 1481, 97, 97, 97, 97, 97, 97, 1488, 97, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 607, 97, 97, 97, 97, 40976, 18, 36884, 45078, 26, 30, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 213080, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 143448, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 0, 0, 0, 0, 97, 97, 97, 97, 1482, 97, 1483, 97, 97, 97, 97, 97, 97, 1326, 97, 97, 1329, 1330, 97, 97, 97, 97, 97, 97, 1159, 1160, 97, 97, 97, 97, 97, 97, 97, 97, 590, 97, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 2211974, 102439, 0, 0, 106538, 98347, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2474122, 2158730, 2158730, 2494602, 2158730, 2158730, 2158730, 2809994, 2158730, 2158730, 2842762, 2158730, 2158730, 2158730, 2900106, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3014794, 2158730, 2158730, 3051658, 2158730, 2158730, 3100810, 2158730, 2158730, 2158730, 2158730, 3096714, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 2207744, 541, 541, 543, 543, 0, 0, 2166784, 0, 548, 549, 549, 0, 286, 2158877, 2158877, 2158877, 2863389, 2892061, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3186973, 2158877, 0, 0, 0, 0, 0, 0, 0, 0, 2367626, 2158877, 2404637, 2412829, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2564381, 2158877, 2158877, 2605341, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2679069, 2158877, 2695453, 2158877, 2703645, 2158877, 2711837, 2752797, 2158877, 0, 2158877, 2158877, 2158877, 2384010, 2158730, 2158730, 2158730, 2158730, 3006602, 2383872, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3096576, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 0, 0, 2158877, 2785565, 2158877, 2810141, 2158877, 2158877, 2842909, 2158877, 2158877, 2158877, 2900253, 2158877, 2158877, 2158877, 2158877, 2158877, 2531613, 2158877, 2158877, 2158877, 2158877, 2158877, 2617629, 2158877, 2158877, 2158877, 2158877, 2158730, 2818186, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3105053, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 0, 0, 97, 97, 97, 1611, 97, 97, 97, 97, 97, 97, 97, 1496, 97, 97, 1499, 97, 97, 97, 97, 97, 2441354, 2445450, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2502794, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2433162, 2158730, 2453642, 2461834, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2580618, 2158730, 2158730, 2158730, 2158730, 2621578, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2699402, 2158730, 2158730, 2158730, 2158730, 2678922, 2158730, 2695306, 2158730, 2703498, 2158730, 2711690, 2752650, 2158730, 2158730, 2785418, 2158730, 2158730, 2158730, 3113098, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3186826, 2158730, 2207744, 2207744, 2207744, 2207744, 2781184, 2793472, 2207744, 2818048, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 541, 0, 543, 2158877, 2502941, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2580765, 2158877, 2158877, 2158877, 2158877, 2621725, 2158877, 3019037, 2158877, 3043613, 2158877, 2158877, 2158877, 2158877, 3080477, 2158877, 2158877, 3113245, 2158877, 2158877, 2158877, 2158877, 0, 2158877, 2908445, 2158877, 2158877, 2158877, 2978077, 2158877, 2158877, 2158877, 2158877, 3039517, 2158877, 2158730, 2510986, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2584714, 2158730, 2609290, 2158730, 2158730, 2629770, 2158730, 2158730, 2158730, 2388106, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2605194, 2158730, 2158730, 2158730, 2158730, 2687114, 2158730, 2715786, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2867338, 2158730, 2904202, 2158730, 2158730, 2158730, 2642058, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2781322, 2793610, 2158730, 3121290, 2158730, 2158730, 2158730, 3149962, 2158730, 2158730, 3170442, 3174538, 2158730, 2367488, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2441216, 2445312, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2502656, 2158877, 2433309, 2158877, 2453789, 2461981, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2511133, 2158877, 2158877, 2158877, 2158877, 2584861, 2158877, 2609437, 2158877, 2158877, 2629917, 2158877, 2158877, 2158877, 2687261, 2158877, 2715933, 2158877, 2158730, 2158730, 2973834, 2158730, 2982026, 2158730, 2158730, 3002506, 2158730, 3047562, 3063946, 3076234, 2158730, 2158730, 2158730, 2158730, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158877, 2507037, 0, 0, 2158877, 2158730, 2158730, 2158730, 3203210, 2207744, 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2564096, 2207744, 2207744, 2207744, 2707741, 2732317, 2158877, 2158877, 2158877, 2822429, 2826525, 2158877, 2896157, 2158877, 2158877, 2924829, 2158877, 2158877, 2973981, 2158877, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 642, 0, 2158592, 0, 45, 1529, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1755, 45, 67, 67, 2982173, 2158877, 2158877, 3002653, 2158877, 3047709, 3064093, 3076381, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3203357, 2523274, 2527370, 2158730, 2158730, 2576522, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2908298, 2494749, 2158877, 2158877, 2158877, 2523421, 2527517, 2158877, 2158877, 2576669, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 40976, 0, 18, 18, 4321280, 2224253, 2232448, 4329472, 2232448, 2158730, 2498698, 2158730, 2158730, 2158730, 2158730, 2568330, 2158730, 2592906, 2625674, 2158730, 2158730, 2674826, 2736266, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2158730, 2912394, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3109002, 2158730, 2158730, 3133578, 3145866, 3154058, 2375680, 2207744, 3108864, 2207744, 2207744, 3133440, 3145728, 3153920, 2375965, 2380061, 2158877, 2158877, 2421021, 2158877, 2449693, 2158877, 2158877, 2158877, 3117341, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3104906, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158877, 2498845, 2158877, 2158877, 0, 2158877, 2158877, 2568477, 2158877, 2593053, 2625821, 2158877, 2158877, 2674973, 0, 0, 0, 0, 97, 97, 1480, 97, 97, 97, 97, 97, 1485, 97, 97, 97, 0, 97, 97, 1729, 97, 1731, 97, 97, 97, 97, 97, 97, 97, 311, 97, 97, 97, 97, 97, 97, 97, 97, 1520, 97, 97, 1523, 97, 97, 1526, 97, 2736413, 2158877, 2158877, 0, 2158877, 2912541, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3109149, 2158877, 2158877, 3014941, 2158877, 2158877, 3051805, 2158877, 2158877, 3100957, 2158877, 2158877, 3121437, 2158877, 2158877, 2158877, 3150109, 3133725, 3146013, 3154205, 2158730, 2408586, 2416778, 2158730, 2465930, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3018890, 2158730, 3043466, 2158730, 2158730, 2158730, 2158730, 3080330, 2633866, 2658442, 2740362, 2744458, 2834570, 2949258, 2158730, 2986122, 2158730, 2998410, 2158730, 2158730, 2158730, 3129482, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744, 2207744, 3129344, 2158877, 2408733, 2416925, 2158877, 2466077, 2158877, 2158877, 3170589, 3174685, 2158877, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2424970, 2158730, 2158730, 2158730, 2158730, 2707594, 2732170, 2158730, 2158730, 2158730, 2822282, 2826378, 2158730, 2896010, 2158730, 2158730, 2924682, 2949405, 2158877, 2986269, 2158877, 2998557, 2158877, 2158877, 2158877, 3129629, 2158730, 2158730, 2478218, 2158730, 2158730, 2158730, 2535562, 2543754, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3117194, 2207744, 2207744, 2478080, 2207744, 2207744, 2207744, 2207744, 3014656, 2207744, 2207744, 3051520, 2207744, 2207744, 3100672, 2207744, 2207744, 3121152, 2207744, 2207744, 2207744, 2207744, 2207744, 2584576, 2207744, 2609152, 2207744, 2207744, 2629632, 2207744, 2207744, 2207744, 2686976, 2207744, 2207744, 2535424, 2543616, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158877, 2158877, 2478365, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158730, 2158730, 2482314, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2387968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 823, 0, 825, 2158730, 2158730, 2158730, 2990218, 2158730, 2158730, 2207744, 2207744, 2482176, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 135, 0, 2207744, 2207744, 2990080, 2207744, 2207744, 2158877, 2158877, 2482461, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158730, 2429066, 2158730, 2515082, 2158730, 2588810, 2158730, 2838666, 2158730, 2158730, 2158730, 3010698, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672, 2207744, 2838528, 2207744, 2207744, 2207744, 3010560, 2158877, 2429213, 2158877, 2515229, 0, 0, 2158877, 2588957, 2158877, 0, 2838813, 2158877, 2158877, 2158877, 3010845, 2158730, 2506890, 2158730, 2158730, 2158730, 2748554, 2756746, 2777226, 2801802, 2158730, 2158730, 2158730, 2863242, 2891914, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2564234, 2158730, 2158730, 2158730, 2158730, 2158730, 2597002, 2158730, 2158730, 2158730, 3006464, 2384157, 0, 0, 2158877, 2158877, 2158877, 2158877, 3006749, 2158730, 2637962, 2953354, 2158730, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158877, 2638109, 2953501, 2158877, 2539658, 2158730, 2539520, 2207744, 0, 0, 2539805, 2158877, 2158730, 2158730, 2158730, 2977930, 2158730, 2158730, 2158730, 2158730, 3039370, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3158154, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2965642, 2965504, 2965789, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1484, 97, 97, 97, 97, 2158592, 18, 0, 122880, 0, 0, 0, 77824, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 356, 0, 0, 0, 0, 0, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 45, 1751, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1427, 67, 67, 67, 67, 67, 1432, 67, 67, 67, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 122880, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 1322, 550, 0, 286, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 4329472, 27, 27, 2207744, 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3158016, 542, 0, 0, 0, 542, 0, 544, 0, 0, 0, 544, 0, 550, 0, 0, 0, 0, 0, 97, 97, 1610, 97, 97, 97, 97, 97, 97, 97, 97, 898, 97, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 237568, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 192512, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 94, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 96, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 12378, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 126, 126, 126, 126, 90143, 0, 0, 2170880, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 20480, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 241664, 102439, 106538, 98347, 0, 0, 20568, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 200797, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 0, 0, 44, 0, 0, 20575, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 41, 41, 41, 0, 0, 1126400, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 89, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 131201, 27, 27, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 94242, 0, 0, 208896, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2367488, 32768, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2433024, 2158592, 2453504, 2461696, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2510848, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 245783, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 221184, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 180224, 40976, 18, 18, 36884, 155648, 45078, 0, 24, 24, 217088, 27, 27, 27, 217088, 90143, 0, 0, 2170880, 0, 0, 828, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2387968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 233472, 0, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 718, 45, 45, 45, 45, 45, 45, 45, 45, 45, 727, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 45, 1808, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 97, 0, 0, 97, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 1787, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 2029, 45, 67, 67, 67, 67, 2033, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 1798, 45, 45, 1800, 45, 45, 0, 1472, 0, 0, 0, 0, 0, 1474, 0, 0, 0, 0, 0, 1476, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 1320, 97, 97, 0, 0, 97, 97, 97, 97, 1786, 97, 0, 0, 97, 97, 0, 1790, 1527, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 663, 67, 24850, 24850, 12564, 12564, 0, 57889, 281, 0, 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 1785, 97, 97, 0, 0, 97, 97, 0, 97, 97, 1979, 97, 97, 45, 45, 1983, 45, 1984, 45, 45, 45, 45, 45, 652, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 690, 45, 45, 694, 45, 45, 40976, 19, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 262144, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 46, 67, 98, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 45, 67, 97, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 258048, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 1122423, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 1114152, 1114152, 1114152, 0, 0, 1114112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 37, 102439, 106538, 98347, 0, 0, 204800, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 57436, 40976, 18, 36884, 45078, 24, 27, 33, 33, 0, 33, 33, 33, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 124, 124, 124, 127, 127, 127, 127, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158877, 2158877, 2158877, 2388253, 2158877, 2158877, 2158877, 2158877, 2158877, 2781469, 2793757, 2158877, 2818333, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2867485, 2158877, 2904349, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3096861, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2441501, 2445597, 2158877, 2158877, 2158877, 2158877, 2158877, 40976, 122, 123, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 936, 2158592, 4243810, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 935, 45, 45, 45, 715, 45, 45, 45, 45, 45, 45, 45, 723, 45, 45, 45, 45, 45, 1182, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 430, 45, 45, 45, 45, 45, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 47, 68, 99, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 48, 69, 100, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 49, 70, 101, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 50, 71, 102, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 51, 72, 103, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 52, 73, 104, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 53, 74, 105, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 54, 75, 106, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 55, 76, 107, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 56, 77, 108, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 57, 78, 109, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 58, 79, 110, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 59, 80, 111, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 60, 81, 112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 61, 82, 113, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 62, 83, 114, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 63, 84, 115, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 64, 85, 116, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 65, 86, 117, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 66, 87, 118, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 118820, 102439, 106538, 98347, 118820, 118820, 118820, 40976, 18, 18, 0, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1314, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1321, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 0, 1315, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1360, 97, 97, 131, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 145, 149, 45, 45, 45, 45, 45, 174, 45, 179, 45, 185, 45, 188, 45, 45, 202, 67, 255, 67, 67, 269, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 292, 296, 97, 97, 97, 97, 97, 321, 97, 326, 97, 332, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 646, 335, 97, 97, 349, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 437, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 523, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 511, 67, 67, 67, 97, 97, 97, 620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1501, 1502, 97, 793, 67, 67, 796, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 808, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 2052, 67, 67, 67, 67, 813, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 830, 97, 97, 97, 97, 97, 97, 97, 97, 97, 315, 97, 97, 97, 97, 97, 97, 841, 97, 97, 97, 97, 97, 97, 97, 97, 97, 854, 97, 97, 97, 97, 97, 97, 589, 97, 97, 97, 97, 97, 97, 97, 97, 97, 867, 97, 97, 97, 97, 97, 97, 97, 891, 97, 97, 894, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 906, 45, 937, 45, 45, 940, 45, 45, 45, 45, 45, 45, 948, 45, 45, 45, 45, 45, 734, 735, 67, 737, 67, 738, 67, 740, 67, 67, 67, 45, 967, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 435, 45, 45, 45, 980, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 415, 45, 45, 67, 67, 1024, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 1081, 13112, 1085, 54074, 1089, 0, 0, 0, 0, 0, 0, 363, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 45, 1674, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1913, 67, 1914, 67, 67, 67, 1918, 67, 67, 97, 97, 97, 97, 1118, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 630, 97, 97, 97, 97, 97, 1169, 97, 97, 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1534, 45, 45, 45, 45, 45, 1538, 45, 45, 45, 45, 1233, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 742, 67, 45, 45, 1191, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 454, 67, 67, 67, 67, 1243, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1251, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 2050, 0, 97, 97, 45, 45, 45, 732, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 67, 67, 67, 1284, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 772, 67, 67, 67, 1293, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 2158592, 2158592, 2158592, 2404352, 2412544, 1323, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1331, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1737, 97, 1364, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1373, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 647, 45, 45, 1387, 45, 45, 1391, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 410, 45, 45, 45, 45, 45, 1400, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1407, 45, 45, 45, 45, 45, 941, 45, 943, 45, 45, 45, 45, 45, 45, 951, 45, 67, 1438, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1447, 67, 67, 67, 67, 67, 67, 782, 67, 67, 67, 67, 67, 67, 67, 67, 67, 756, 67, 67, 67, 67, 67, 67, 97, 1491, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1500, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1736, 97, 45, 45, 1541, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 677, 45, 45, 67, 1581, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 791, 792, 67, 67, 67, 67, 1598, 67, 1600, 67, 67, 67, 67, 67, 67, 67, 67, 1472, 97, 97, 97, 1727, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1513, 97, 97, 67, 67, 97, 1879, 97, 1881, 97, 0, 1884, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 1842, 97, 97, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1928, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1903, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 1971, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 1381, 45, 45, 45, 45, 1976, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1747, 809, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 907, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1478, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1150, 97, 97, 97, 97, 67, 67, 67, 67, 1244, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 477, 67, 67, 67, 67, 67, 67, 1294, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1324, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1374, 97, 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 945, 45, 45, 45, 45, 45, 45, 45, 45, 1908, 45, 45, 1910, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1919, 67, 0, 0, 97, 97, 97, 97, 45, 2048, 67, 2049, 0, 0, 97, 2051, 45, 45, 45, 939, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 397, 45, 45, 45, 1921, 67, 67, 1923, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1947, 45, 1935, 0, 0, 0, 97, 1939, 97, 97, 1941, 97, 45, 45, 45, 45, 45, 45, 382, 389, 45, 45, 45, 45, 45, 45, 45, 45, 1810, 45, 45, 1812, 67, 67, 67, 67, 67, 256, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 336, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 371, 373, 45, 45, 45, 955, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 413, 45, 45, 45, 457, 459, 67, 67, 67, 67, 67, 67, 67, 67, 473, 67, 478, 67, 67, 482, 67, 67, 485, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 1828, 97, 554, 556, 97, 97, 97, 97, 97, 97, 97, 97, 570, 97, 575, 97, 97, 579, 97, 97, 582, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 330, 97, 97, 67, 746, 67, 67, 67, 67, 67, 67, 67, 67, 67, 758, 67, 67, 67, 67, 67, 67, 67, 1575, 67, 67, 67, 67, 67, 67, 67, 67, 493, 67, 67, 67, 67, 67, 67, 67, 97, 97, 844, 97, 97, 97, 97, 97, 97, 97, 97, 97, 856, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1735, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1642, 97, 1644, 97, 97, 890, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 67, 67, 67, 67, 1065, 1066, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 532, 67, 67, 67, 67, 67, 67, 67, 1451, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 496, 67, 67, 97, 97, 1505, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 593, 97, 97, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1617, 97, 97, 1635, 0, 1637, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 885, 97, 97, 97, 97, 67, 67, 1704, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 565, 572, 97, 97, 97, 97, 97, 97, 97, 97, 1832, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1946, 45, 45, 67, 67, 67, 67, 67, 97, 1926, 97, 1927, 97, 0, 0, 0, 97, 97, 1934, 2043, 0, 0, 97, 97, 97, 2047, 45, 45, 67, 67, 0, 1832, 97, 97, 45, 45, 45, 981, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1227, 45, 45, 45, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 372, 45, 45, 45, 45, 1661, 1662, 45, 45, 45, 45, 45, 1666, 45, 45, 45, 45, 45, 1673, 45, 1675, 45, 45, 45, 45, 45, 45, 45, 67, 1426, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1275, 67, 67, 67, 67, 67, 45, 418, 45, 45, 420, 45, 45, 423, 45, 45, 45, 45, 45, 45, 45, 45, 959, 45, 45, 962, 45, 45, 45, 45, 458, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 483, 67, 67, 67, 67, 504, 67, 67, 506, 67, 67, 509, 67, 67, 67, 67, 67, 67, 67, 528, 67, 67, 67, 67, 67, 67, 67, 67, 1287, 67, 67, 67, 67, 67, 67, 67, 555, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 580, 97, 97, 97, 97, 601, 97, 97, 603, 97, 97, 606, 97, 97, 97, 97, 97, 97, 848, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1498, 97, 97, 97, 97, 97, 97, 45, 45, 714, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 989, 990, 45, 67, 67, 67, 67, 67, 1011, 67, 67, 67, 67, 1015, 67, 67, 67, 67, 67, 67, 67, 753, 67, 67, 67, 67, 67, 67, 67, 67, 467, 67, 67, 67, 67, 67, 67, 67, 45, 45, 1179, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1003, 1004, 67, 1217, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 728, 67, 1461, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1034, 67, 97, 1516, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 871, 97, 67, 67, 67, 1705, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 567, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1715, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 1380, 45, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1887, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 2006, 45, 45, 1907, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1920, 67, 97, 0, 2035, 97, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 1428, 67, 67, 67, 67, 67, 67, 1435, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 146, 45, 152, 45, 45, 165, 45, 175, 45, 180, 45, 45, 187, 190, 195, 45, 203, 254, 257, 262, 67, 270, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809, 53531, 97, 97, 97, 293, 97, 299, 97, 97, 312, 97, 322, 97, 327, 97, 97, 334, 337, 342, 97, 350, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 484, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 499, 97, 581, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 596, 648, 45, 650, 45, 651, 45, 653, 45, 45, 45, 657, 45, 45, 45, 45, 45, 45, 1954, 67, 67, 67, 1958, 67, 67, 67, 67, 67, 67, 67, 768, 67, 67, 67, 67, 67, 67, 67, 67, 769, 67, 67, 67, 67, 67, 67, 67, 680, 45, 45, 45, 45, 45, 45, 45, 45, 688, 689, 691, 45, 45, 45, 45, 45, 983, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 947, 45, 45, 45, 45, 952, 45, 45, 698, 699, 45, 45, 702, 703, 45, 45, 45, 45, 45, 45, 45, 711, 744, 67, 67, 67, 67, 67, 67, 67, 67, 67, 757, 67, 67, 67, 67, 761, 67, 67, 67, 67, 765, 67, 767, 67, 67, 67, 67, 67, 67, 67, 67, 775, 776, 778, 67, 67, 67, 67, 67, 67, 785, 786, 67, 67, 789, 790, 67, 67, 67, 67, 67, 67, 1442, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1775, 97, 97, 97, 67, 67, 67, 67, 67, 798, 67, 67, 67, 802, 67, 67, 67, 67, 67, 67, 67, 67, 1465, 67, 67, 1468, 67, 67, 1471, 67, 67, 810, 67, 67, 67, 67, 67, 67, 67, 67, 67, 821, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 833, 97, 835, 97, 836, 97, 838, 97, 97, 0, 0, 97, 97, 97, 2002, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1740, 45, 45, 45, 1744, 45, 45, 45, 97, 842, 97, 97, 97, 97, 97, 97, 97, 97, 97, 855, 97, 97, 97, 97, 0, 1717, 1718, 97, 97, 97, 97, 97, 1722, 97, 0, 0, 859, 97, 97, 97, 97, 863, 97, 865, 97, 97, 97, 97, 97, 97, 97, 97, 604, 97, 97, 97, 97, 97, 97, 97, 873, 874, 876, 97, 97, 97, 97, 97, 97, 883, 884, 97, 97, 887, 888, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 225280, 0, 365, 0, 367, 0, 45, 45, 45, 1531, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1199, 45, 45, 45, 45, 45, 97, 97, 908, 97, 97, 97, 97, 97, 97, 97, 97, 97, 919, 638, 0, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2425117, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2597149, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2642205, 2158877, 2158877, 2158877, 2158877, 2158877, 3158301, 0, 2375818, 2379914, 2158730, 2158730, 2420874, 2158730, 2449546, 2158730, 2158730, 953, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 965, 978, 45, 45, 45, 45, 45, 45, 985, 45, 45, 45, 45, 45, 45, 45, 45, 971, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1027, 67, 1029, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1455, 67, 67, 67, 67, 67, 67, 67, 1077, 1078, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 366, 0, 139, 2158730, 2158730, 2158730, 2404490, 2412682, 1113, 97, 97, 97, 97, 97, 97, 1121, 97, 1123, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1540, 1155, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 615, 1168, 97, 97, 1171, 1172, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 1533, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1663, 45, 45, 45, 45, 45, 45, 45, 45, 45, 183, 45, 45, 45, 45, 201, 45, 45, 45, 1219, 45, 45, 45, 45, 45, 45, 45, 1226, 45, 45, 45, 45, 45, 168, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 427, 45, 45, 45, 45, 45, 45, 45, 1231, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1242, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1046, 67, 67, 1254, 67, 1256, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 806, 807, 67, 67, 97, 1336, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1111, 97, 97, 97, 97, 97, 1351, 97, 97, 97, 1354, 97, 97, 97, 1359, 97, 97, 97, 0, 97, 97, 97, 97, 1640, 97, 97, 97, 97, 97, 97, 97, 897, 97, 97, 97, 902, 97, 97, 97, 97, 97, 97, 97, 97, 1366, 97, 97, 97, 97, 97, 97, 97, 1371, 97, 97, 97, 0, 97, 97, 97, 1730, 97, 97, 97, 97, 97, 97, 97, 97, 915, 97, 97, 97, 97, 0, 360, 0, 67, 67, 67, 1440, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1017, 67, 1019, 67, 67, 67, 67, 67, 1453, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1459, 97, 97, 97, 1493, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1525, 97, 97, 97, 97, 97, 97, 1507, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1514, 67, 67, 67, 67, 1584, 67, 67, 67, 67, 67, 1590, 67, 67, 67, 67, 67, 67, 67, 783, 67, 67, 67, 788, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1599, 1601, 67, 67, 67, 1604, 67, 1606, 1607, 67, 1472, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 1614, 97, 97, 97, 97, 45, 45, 1850, 45, 45, 45, 45, 1855, 45, 45, 45, 45, 45, 1222, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1229, 97, 1618, 97, 97, 97, 97, 97, 97, 97, 1625, 97, 97, 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 447, 45, 45, 45, 45, 45, 67, 67, 1633, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1643, 1645, 97, 97, 0, 0, 97, 97, 1784, 97, 97, 97, 0, 0, 97, 97, 0, 97, 1894, 1895, 97, 1897, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 656, 45, 45, 45, 45, 45, 45, 97, 1648, 97, 1650, 1651, 97, 0, 45, 45, 45, 1654, 45, 45, 45, 45, 45, 169, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 658, 45, 45, 45, 45, 664, 45, 45, 1659, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1187, 45, 45, 1669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1005, 67, 67, 1681, 67, 67, 67, 67, 67, 67, 67, 1686, 67, 67, 67, 67, 67, 67, 67, 784, 67, 67, 67, 67, 67, 67, 67, 67, 1055, 67, 67, 67, 67, 1060, 67, 67, 97, 97, 1713, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1378, 45, 45, 45, 45, 45, 45, 45, 408, 45, 45, 45, 45, 45, 45, 45, 45, 1547, 45, 1549, 45, 45, 45, 45, 45, 97, 97, 1780, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 2027, 2028, 45, 45, 67, 67, 2031, 2032, 67, 45, 45, 1804, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1917, 67, 67, 67, 67, 67, 67, 67, 1819, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1708, 97, 97, 97, 97, 97, 45, 45, 1862, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 497, 67, 67, 67, 1877, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 1839, 0, 0, 97, 97, 97, 97, 1936, 0, 0, 97, 97, 97, 97, 97, 97, 1943, 1944, 1945, 45, 45, 45, 45, 670, 45, 45, 45, 45, 674, 45, 45, 45, 45, 678, 45, 1948, 45, 1950, 45, 45, 45, 45, 1955, 1956, 1957, 67, 67, 67, 1960, 67, 1962, 67, 67, 67, 67, 1967, 1968, 1969, 97, 0, 0, 0, 97, 97, 1974, 97, 0, 1936, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1906, 0, 1977, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1746, 45, 45, 45, 45, 2011, 67, 67, 2013, 67, 67, 67, 2017, 97, 97, 0, 0, 2021, 97, 8192, 97, 97, 2025, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1916, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 140, 45, 45, 45, 1180, 45, 45, 45, 45, 1184, 45, 45, 45, 45, 45, 45, 45, 387, 45, 392, 45, 45, 396, 45, 45, 399, 45, 45, 67, 207, 67, 67, 67, 67, 67, 67, 236, 67, 67, 67, 67, 67, 67, 67, 800, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1603, 67, 67, 67, 67, 67, 0, 97, 97, 287, 97, 97, 97, 97, 97, 97, 316, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 1656, 1657, 45, 376, 45, 45, 45, 45, 45, 388, 45, 45, 45, 45, 45, 45, 45, 45, 1406, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 462, 67, 67, 67, 67, 67, 474, 67, 67, 67, 67, 67, 67, 67, 817, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 97, 97, 97, 559, 97, 97, 97, 97, 97, 571, 97, 97, 97, 97, 97, 97, 896, 97, 97, 97, 900, 97, 97, 97, 97, 97, 97, 912, 914, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 391, 45, 45, 45, 45, 45, 45, 45, 45, 713, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 662, 45, 1140, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 636, 67, 67, 1283, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 513, 67, 67, 1363, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 889, 97, 97, 97, 1714, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 926, 45, 45, 45, 45, 45, 45, 45, 45, 672, 45, 45, 45, 45, 45, 45, 45, 45, 686, 45, 45, 45, 45, 45, 45, 45, 45, 944, 45, 45, 45, 45, 45, 45, 45, 45, 1676, 45, 45, 45, 45, 45, 45, 67, 97, 97, 97, 1833, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1902, 45, 45, 45, 45, 45, 957, 45, 45, 45, 45, 961, 45, 963, 45, 45, 45, 67, 97, 2034, 0, 97, 97, 97, 97, 97, 2040, 45, 45, 45, 2042, 67, 67, 67, 67, 67, 67, 1574, 67, 67, 67, 67, 67, 1578, 67, 67, 67, 67, 67, 67, 799, 67, 67, 67, 804, 67, 67, 67, 67, 67, 67, 67, 1298, 0, 0, 0, 1304, 0, 0, 0, 1310, 132, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 1414, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 428, 45, 45, 45, 45, 45, 57889, 0, 0, 54074, 54074, 550, 831, 97, 97, 97, 97, 97, 97, 97, 97, 97, 568, 97, 97, 97, 97, 578, 97, 45, 45, 968, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1228, 45, 45, 67, 67, 67, 67, 67, 25398, 1082, 13112, 1086, 54074, 1090, 0, 0, 0, 0, 0, 0, 364, 0, 0, 0, 139, 2158592, 2158592, 2158592, 2404352, 2412544, 67, 67, 67, 67, 1464, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 510, 67, 67, 67, 67, 97, 97, 97, 97, 1519, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 918, 97, 0, 0, 0, 0, 1528, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 976, 45, 1554, 45, 45, 45, 45, 45, 45, 45, 45, 1562, 45, 45, 1565, 45, 45, 45, 45, 683, 45, 45, 45, 687, 45, 45, 692, 45, 45, 45, 45, 45, 1953, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1014, 67, 67, 67, 67, 67, 67, 1568, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 67, 67, 67, 67, 67, 1585, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1594, 97, 97, 1649, 97, 97, 97, 0, 45, 45, 1653, 45, 45, 45, 45, 45, 45, 383, 45, 45, 45, 45, 45, 45, 45, 45, 45, 986, 45, 45, 45, 45, 45, 45, 45, 45, 1670, 45, 1672, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 736, 67, 67, 67, 67, 67, 741, 67, 67, 67, 1680, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1074, 67, 67, 67, 1692, 67, 67, 67, 67, 67, 67, 67, 1697, 67, 1699, 67, 67, 67, 67, 67, 67, 1012, 67, 67, 67, 67, 67, 67, 67, 67, 67, 468, 475, 67, 67, 67, 67, 67, 67, 1769, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 624, 97, 97, 97, 97, 97, 97, 634, 97, 97, 1792, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 958, 45, 45, 45, 45, 45, 45, 964, 45, 150, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 977, 204, 45, 67, 67, 67, 217, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 787, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 271, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 351, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 938, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1398, 45, 45, 45, 153, 45, 161, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 660, 661, 45, 45, 205, 45, 67, 67, 67, 67, 220, 67, 228, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 280, 94, 0, 0, 67, 67, 67, 67, 67, 272, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 352, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 439, 45, 45, 45, 45, 45, 445, 45, 45, 45, 452, 45, 45, 67, 67, 212, 216, 67, 67, 67, 67, 67, 241, 67, 246, 67, 252, 67, 67, 486, 67, 67, 67, 67, 67, 67, 67, 494, 67, 67, 67, 67, 67, 67, 67, 1245, 67, 67, 67, 67, 67, 67, 67, 67, 1013, 67, 67, 1016, 67, 67, 67, 67, 67, 521, 67, 67, 525, 67, 67, 67, 67, 67, 531, 67, 67, 67, 538, 67, 0, 0, 2046, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1192, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1418, 45, 45, 1421, 97, 97, 583, 97, 97, 97, 97, 97, 97, 97, 591, 97, 97, 97, 97, 97, 97, 913, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 1384, 97, 618, 97, 97, 622, 97, 97, 97, 97, 97, 628, 97, 97, 97, 635, 97, 18, 131427, 0, 0, 0, 639, 0, 132, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 932, 45, 45, 45, 45, 45, 1544, 45, 45, 45, 45, 45, 1550, 45, 45, 45, 45, 45, 1194, 45, 1196, 45, 45, 45, 45, 45, 45, 45, 45, 999, 45, 45, 45, 45, 45, 67, 67, 45, 45, 667, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1408, 45, 45, 45, 696, 45, 45, 45, 701, 45, 45, 45, 45, 45, 45, 45, 45, 710, 45, 45, 45, 1220, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 194, 45, 45, 45, 729, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 797, 67, 67, 67, 67, 67, 67, 805, 67, 67, 67, 67, 67, 67, 67, 1587, 67, 1589, 67, 67, 67, 67, 67, 67, 67, 67, 1763, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2162968, 0, 0, 67, 67, 67, 67, 67, 814, 816, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1008, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1020, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 1429, 67, 1430, 67, 67, 67, 67, 67, 1062, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 518, 1076, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1102, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1124, 97, 1126, 97, 97, 1114, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1112, 97, 97, 1156, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 594, 97, 97, 97, 97, 1170, 97, 97, 97, 97, 0, 921, 0, 0, 0, 0, 0, 0, 45, 45, 45, 45, 1532, 45, 45, 45, 45, 1536, 45, 45, 45, 45, 45, 172, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 706, 45, 45, 709, 45, 45, 1177, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1202, 45, 1204, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1215, 45, 45, 45, 1232, 45, 45, 45, 45, 45, 45, 45, 67, 1237, 67, 67, 67, 67, 67, 67, 1053, 1054, 67, 67, 67, 67, 67, 67, 1061, 67, 67, 1282, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1289, 67, 67, 67, 1292, 97, 97, 97, 97, 1339, 97, 97, 97, 97, 97, 97, 1344, 97, 97, 97, 97, 45, 1849, 45, 1851, 45, 45, 45, 45, 45, 45, 45, 45, 721, 45, 45, 45, 45, 45, 726, 45, 1385, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1188, 45, 45, 1401, 1402, 45, 45, 45, 45, 1405, 45, 45, 45, 45, 45, 45, 45, 45, 1752, 45, 45, 45, 45, 45, 67, 67, 1410, 45, 45, 45, 1413, 45, 1415, 45, 45, 45, 45, 45, 45, 1419, 45, 45, 45, 45, 1806, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 97, 2019, 0, 97, 67, 67, 67, 1452, 67, 67, 67, 67, 67, 67, 67, 67, 1457, 67, 67, 67, 67, 67, 67, 1259, 67, 67, 67, 67, 67, 67, 1264, 67, 67, 1460, 67, 1462, 67, 67, 67, 67, 67, 67, 1466, 67, 67, 67, 67, 67, 67, 67, 67, 1588, 67, 67, 67, 67, 67, 67, 67, 0, 1300, 0, 0, 0, 1306, 0, 0, 0, 97, 97, 97, 1506, 97, 97, 97, 97, 97, 97, 97, 97, 1512, 97, 97, 97, 0, 1728, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 901, 97, 97, 97, 97, 1515, 97, 1517, 97, 97, 97, 97, 97, 97, 1521, 97, 97, 97, 97, 97, 97, 0, 45, 1652, 45, 45, 45, 1655, 45, 45, 45, 45, 45, 1542, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1552, 1553, 45, 45, 45, 1556, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 693, 45, 45, 45, 67, 67, 67, 67, 1572, 67, 67, 67, 67, 1576, 67, 67, 67, 67, 67, 67, 67, 67, 1602, 67, 67, 1605, 67, 67, 67, 0, 67, 1582, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1580, 67, 67, 1596, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 542, 0, 544, 67, 67, 67, 67, 1759, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 533, 67, 67, 67, 67, 67, 67, 67, 1770, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 1777, 97, 97, 97, 1793, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 998, 45, 45, 1001, 1002, 45, 45, 67, 67, 45, 1861, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1871, 67, 1873, 1874, 67, 0, 97, 45, 67, 0, 97, 45, 67, 16384, 97, 45, 67, 97, 0, 0, 0, 1473, 0, 1082, 0, 0, 0, 1475, 0, 1086, 0, 0, 0, 1477, 1876, 67, 97, 97, 97, 97, 97, 1883, 0, 1885, 97, 97, 97, 1889, 0, 0, 0, 286, 0, 0, 0, 286, 0, 2367488, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 126, 126, 126, 2053, 0, 2055, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 2039, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 226, 67, 67, 67, 67, 67, 67, 67, 67, 1246, 67, 67, 1249, 1250, 67, 67, 67, 132, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 141, 45, 45, 45, 1403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1186, 45, 45, 1189, 45, 45, 155, 45, 45, 45, 45, 45, 45, 45, 45, 45, 191, 45, 45, 45, 45, 700, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1753, 45, 45, 45, 67, 67, 45, 45, 67, 208, 67, 67, 67, 222, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1764, 67, 67, 67, 67, 67, 67, 67, 258, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 288, 97, 97, 97, 302, 97, 97, 97, 97, 97, 97, 97, 97, 97, 627, 97, 97, 97, 97, 97, 97, 338, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 370, 45, 45, 45, 45, 716, 45, 45, 45, 45, 45, 722, 45, 45, 45, 45, 45, 45, 1912, 67, 67, 67, 67, 67, 67, 67, 67, 67, 819, 67, 67, 25398, 542, 13112, 544, 45, 403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1409, 45, 67, 67, 67, 67, 489, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 771, 67, 67, 67, 67, 520, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 534, 67, 67, 67, 67, 67, 67, 1271, 67, 67, 67, 1274, 67, 67, 67, 1279, 67, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 553, 97, 97, 97, 97, 586, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1138, 97, 97, 97, 97, 617, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 631, 97, 97, 97, 0, 1834, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 353, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 668, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 724, 45, 45, 45, 45, 45, 682, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 949, 45, 45, 45, 67, 67, 747, 748, 67, 67, 67, 67, 755, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 1302, 0, 0, 0, 1308, 0, 67, 794, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1701, 67, 97, 97, 97, 845, 846, 97, 97, 97, 97, 853, 97, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 97, 892, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 610, 97, 97, 45, 992, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1239, 67, 67, 67, 1063, 67, 67, 67, 67, 67, 1068, 67, 67, 67, 67, 67, 67, 67, 0, 0, 1301, 0, 0, 0, 1307, 0, 0, 97, 1141, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1152, 97, 97, 0, 0, 97, 97, 2001, 0, 97, 2003, 97, 97, 97, 45, 45, 45, 1739, 45, 45, 45, 1742, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1157, 97, 97, 97, 97, 97, 1162, 97, 97, 97, 97, 97, 97, 1145, 97, 97, 97, 97, 97, 1151, 97, 97, 97, 1253, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 539, 45, 1423, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1431, 67, 67, 67, 67, 67, 67, 67, 1695, 67, 67, 67, 67, 67, 1700, 67, 1702, 67, 67, 1439, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 514, 67, 67, 97, 97, 1492, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 611, 97, 97, 1703, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 852, 97, 97, 97, 97, 97, 97, 45, 1949, 45, 1951, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1961, 67, 0, 97, 45, 67, 0, 97, 2060, 2061, 0, 2062, 45, 67, 97, 0, 0, 2036, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 223, 67, 67, 237, 67, 67, 67, 67, 67, 67, 67, 1272, 67, 67, 67, 67, 67, 67, 67, 67, 507, 67, 67, 67, 67, 67, 67, 67, 1963, 67, 67, 67, 97, 97, 97, 97, 0, 1972, 0, 97, 97, 97, 1975, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 931, 45, 45, 45, 45, 45, 407, 45, 45, 45, 45, 45, 45, 45, 45, 45, 417, 45, 45, 1989, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1996, 97, 18, 131427, 0, 0, 360, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 930, 45, 45, 45, 45, 45, 45, 444, 45, 45, 45, 45, 45, 45, 45, 67, 67, 97, 97, 1998, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1985, 45, 1986, 45, 45, 45, 156, 45, 45, 170, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 675, 45, 45, 45, 45, 679, 131427, 0, 358, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 381, 45, 45, 45, 45, 45, 45, 45, 45, 45, 400, 45, 45, 419, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 436, 67, 67, 67, 67, 67, 505, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 820, 67, 25398, 542, 13112, 544, 67, 67, 522, 67, 67, 67, 67, 67, 529, 67, 67, 67, 67, 67, 67, 67, 0, 1299, 0, 0, 0, 1305, 0, 0, 0, 97, 97, 619, 97, 97, 97, 97, 97, 626, 97, 97, 97, 97, 97, 97, 97, 1105, 97, 97, 97, 97, 1109, 97, 97, 97, 67, 67, 67, 67, 749, 67, 67, 67, 67, 67, 67, 67, 67, 67, 760, 67, 0, 97, 45, 67, 2058, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 2041, 67, 67, 67, 67, 67, 780, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 516, 67, 67, 97, 97, 97, 878, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1629, 97, 0, 45, 979, 45, 45, 45, 45, 984, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1198, 45, 45, 45, 45, 45, 45, 67, 1023, 67, 67, 67, 67, 1028, 67, 67, 67, 67, 67, 67, 67, 67, 67, 470, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1094, 0, 0, 0, 1092, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1486, 97, 1489, 97, 97, 97, 1117, 97, 97, 97, 97, 1122, 97, 97, 97, 97, 97, 97, 97, 1146, 97, 97, 97, 97, 97, 97, 97, 97, 881, 97, 97, 97, 886, 97, 97, 97, 1311, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1615, 97, 97, 97, 97, 97, 1619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1631, 97, 97, 1847, 97, 45, 45, 45, 45, 1852, 45, 45, 45, 45, 45, 45, 45, 1235, 45, 45, 45, 67, 67, 67, 67, 67, 1868, 67, 67, 67, 1872, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1882, 0, 0, 0, 97, 97, 97, 97, 0, 1891, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 1929, 0, 0, 97, 97, 97, 97, 97, 97, 45, 1900, 45, 1901, 45, 45, 45, 1905, 45, 67, 2054, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 2037, 2038, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 1867, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1774, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 142, 45, 45, 45, 1412, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 432, 45, 45, 45, 45, 45, 157, 45, 45, 171, 45, 45, 45, 182, 45, 45, 45, 45, 200, 45, 45, 45, 1543, 45, 45, 45, 45, 45, 45, 45, 45, 1551, 45, 45, 45, 45, 1181, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1211, 45, 45, 45, 1214, 45, 45, 45, 67, 209, 67, 67, 67, 224, 67, 67, 238, 67, 67, 67, 249, 67, 0, 97, 2056, 2057, 0, 2059, 45, 67, 0, 97, 45, 67, 97, 0, 0, 1937, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1741, 45, 45, 45, 45, 45, 45, 67, 67, 67, 267, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 289, 97, 97, 97, 304, 97, 97, 318, 97, 97, 97, 329, 97, 97, 0, 0, 97, 1783, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 2026, 45, 45, 45, 45, 67, 2030, 67, 67, 67, 67, 67, 67, 1041, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1044, 67, 67, 67, 67, 67, 67, 97, 97, 347, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 666, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1420, 45, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 840, 67, 1007, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 759, 67, 67, 67, 67, 67, 67, 67, 1052, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1031, 67, 67, 67, 67, 67, 97, 97, 97, 1101, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 592, 97, 97, 97, 1190, 45, 45, 45, 45, 45, 1195, 45, 1197, 45, 45, 45, 45, 1201, 45, 45, 45, 45, 1952, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 250, 67, 67, 67, 1255, 67, 1257, 67, 67, 67, 67, 1261, 67, 67, 67, 67, 67, 67, 67, 67, 1685, 67, 67, 67, 67, 67, 67, 67, 0, 24851, 12565, 0, 0, 0, 0, 28809, 53532, 67, 67, 1267, 67, 67, 67, 67, 67, 67, 1273, 67, 67, 67, 67, 67, 67, 67, 67, 1696, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2162688, 0, 0, 1281, 67, 67, 67, 67, 1285, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1070, 67, 67, 67, 67, 67, 1335, 97, 1337, 97, 97, 97, 97, 1341, 97, 97, 97, 97, 97, 97, 97, 97, 882, 97, 97, 97, 97, 97, 97, 97, 1347, 97, 97, 97, 97, 97, 97, 1353, 97, 97, 97, 97, 97, 97, 1361, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 544, 0, 550, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2158592, 2990080, 2158592, 2158592, 2207744, 2207744, 2482176, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 0, 53530, 97, 97, 97, 1365, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 608, 97, 97, 97, 45, 45, 1424, 45, 1425, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1058, 67, 67, 67, 67, 45, 1555, 45, 45, 1557, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 707, 45, 45, 45, 45, 67, 67, 1570, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 773, 67, 67, 1595, 67, 67, 1597, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 2158592, 2158592, 2158592, 2404352, 2412544, 97, 97, 97, 1636, 97, 97, 97, 1639, 97, 97, 1641, 97, 97, 97, 97, 97, 97, 1173, 0, 921, 0, 0, 0, 0, 0, 0, 45, 67, 67, 67, 1693, 67, 67, 67, 67, 67, 67, 67, 1698, 67, 67, 67, 67, 67, 67, 67, 1773, 67, 97, 97, 97, 97, 97, 97, 97, 625, 97, 97, 97, 97, 97, 97, 97, 97, 850, 97, 97, 97, 97, 97, 97, 97, 97, 880, 97, 97, 97, 97, 97, 97, 97, 97, 1106, 97, 97, 97, 97, 97, 97, 97, 1860, 45, 45, 67, 67, 1865, 67, 67, 67, 67, 1870, 67, 67, 67, 67, 1875, 67, 67, 97, 97, 1880, 97, 97, 0, 0, 0, 97, 97, 1888, 97, 0, 0, 0, 1938, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1854, 45, 45, 45, 45, 45, 45, 45, 1909, 45, 45, 1911, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1248, 67, 67, 67, 67, 67, 67, 1922, 67, 67, 1924, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 1898, 45, 45, 45, 45, 45, 45, 1904, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 16384, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1724, 2008, 2009, 45, 45, 67, 67, 67, 2014, 2015, 67, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 2022, 0, 2023, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1869, 67, 67, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 147, 151, 154, 45, 162, 45, 45, 176, 178, 181, 45, 45, 45, 192, 196, 45, 45, 45, 45, 2012, 67, 67, 67, 67, 67, 67, 2018, 97, 0, 0, 97, 1978, 97, 97, 97, 1982, 45, 45, 45, 45, 45, 45, 45, 45, 45, 972, 973, 45, 45, 45, 45, 45, 67, 259, 263, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 294, 298, 301, 97, 309, 97, 97, 323, 325, 328, 97, 97, 97, 97, 97, 560, 97, 97, 97, 569, 97, 97, 97, 97, 97, 97, 306, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1624, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 339, 343, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 67, 503, 67, 67, 67, 67, 67, 67, 67, 67, 67, 512, 67, 67, 519, 97, 97, 600, 97, 97, 97, 97, 97, 97, 97, 97, 97, 609, 97, 97, 616, 45, 649, 45, 45, 45, 45, 45, 654, 45, 45, 45, 45, 45, 45, 45, 45, 1393, 45, 45, 45, 45, 45, 45, 45, 45, 1209, 45, 45, 45, 45, 45, 45, 45, 67, 763, 67, 67, 67, 67, 67, 67, 67, 67, 770, 67, 67, 67, 774, 67, 0, 2045, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 994, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 213, 67, 219, 67, 67, 232, 67, 242, 67, 247, 67, 67, 67, 779, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1018, 67, 67, 67, 67, 811, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 834, 97, 97, 97, 97, 97, 839, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 645, 97, 97, 861, 97, 97, 97, 97, 97, 97, 97, 97, 868, 97, 97, 97, 872, 97, 97, 877, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 613, 97, 97, 97, 97, 97, 909, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 18, 18, 24, 24, 27, 27, 27, 1036, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1047, 67, 67, 67, 1050, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1033, 67, 67, 67, 97, 97, 1130, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 67, 67, 67, 1295, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 1317, 97, 97, 97, 97, 97, 97, 1375, 97, 97, 97, 0, 0, 0, 45, 1379, 45, 45, 45, 45, 45, 45, 422, 45, 45, 45, 429, 431, 45, 45, 45, 45, 0, 1090, 0, 0, 97, 1479, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1357, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1716, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1723, 0, 921, 29315, 0, 0, 0, 0, 45, 929, 45, 45, 45, 45, 45, 45, 45, 1392, 45, 45, 45, 45, 45, 45, 45, 45, 45, 960, 45, 45, 45, 45, 45, 45, 97, 97, 97, 1738, 45, 45, 45, 45, 45, 45, 45, 1743, 45, 45, 45, 45, 166, 45, 45, 45, 45, 184, 186, 45, 45, 197, 45, 45, 97, 1779, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 640, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1537, 45, 45, 45, 45, 45, 1803, 45, 45, 45, 45, 45, 1809, 45, 45, 45, 67, 67, 67, 1814, 67, 67, 67, 67, 67, 67, 1821, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 67, 67, 67, 1818, 67, 67, 67, 67, 67, 1824, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 1890, 0, 1829, 97, 97, 0, 0, 97, 97, 1836, 97, 97, 0, 0, 0, 97, 97, 97, 97, 1981, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1987, 1845, 97, 97, 97, 45, 45, 45, 45, 45, 1853, 45, 45, 45, 1857, 45, 45, 45, 67, 1864, 67, 1866, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 1710, 1711, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1886, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1838, 0, 0, 0, 97, 1843, 97, 0, 1893, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1745, 45, 45, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 1931, 97, 97, 97, 97, 97, 588, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 629, 97, 97, 97, 97, 97, 67, 2044, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1660, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 453, 45, 455, 67, 67, 67, 67, 268, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 348, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 359, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 421, 45, 45, 45, 45, 45, 45, 45, 434, 45, 45, 695, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1667, 45, 0, 921, 29315, 0, 925, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1811, 45, 67, 67, 67, 67, 67, 67, 1037, 67, 1039, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1277, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1095, 0, 0, 0, 1096, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 869, 97, 97, 97, 97, 97, 97, 1131, 97, 1133, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1370, 97, 97, 97, 97, 97, 1312, 0, 0, 0, 0, 1096, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1327, 97, 97, 97, 97, 97, 1332, 97, 97, 97, 1830, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 1896, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1548, 45, 45, 45, 45, 45, 45, 133, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 380, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 401, 45, 45, 158, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1200, 45, 45, 45, 45, 206, 67, 67, 67, 67, 67, 225, 67, 67, 67, 67, 67, 67, 67, 67, 754, 67, 67, 67, 67, 67, 67, 67, 57889, 0, 0, 54074, 54074, 550, 832, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1342, 97, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 1083, 13112, 1087, 54074, 1091, 0, 0, 0, 0, 0, 0, 1316, 0, 831, 97, 97, 97, 97, 97, 97, 97, 1174, 921, 0, 1175, 0, 0, 0, 0, 45, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 148, 67, 67, 264, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 295, 97, 97, 97, 97, 313, 97, 97, 97, 97, 331, 333, 97, 18, 131427, 356, 638, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 45, 45, 1530, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 988, 45, 45, 45, 97, 344, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 402, 404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1756, 67, 438, 45, 45, 45, 45, 45, 45, 45, 45, 449, 450, 45, 45, 45, 67, 67, 214, 218, 221, 67, 229, 67, 67, 243, 245, 248, 67, 67, 67, 67, 67, 488, 490, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1071, 67, 1073, 67, 67, 67, 67, 67, 524, 67, 67, 67, 67, 67, 67, 67, 67, 535, 536, 67, 67, 67, 67, 67, 67, 1683, 1684, 67, 67, 67, 67, 1688, 1689, 67, 67, 67, 67, 67, 67, 1586, 67, 67, 67, 67, 67, 67, 67, 67, 67, 469, 67, 67, 67, 67, 67, 67, 97, 97, 97, 585, 587, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1163, 97, 97, 97, 97, 97, 97, 97, 621, 97, 97, 97, 97, 97, 97, 97, 97, 632, 633, 97, 97, 0, 0, 1782, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 712, 45, 45, 45, 717, 45, 45, 45, 45, 45, 45, 45, 45, 725, 45, 45, 45, 163, 167, 173, 177, 45, 45, 45, 45, 45, 193, 45, 45, 45, 45, 982, 45, 45, 45, 45, 45, 45, 987, 45, 45, 45, 45, 45, 1558, 45, 1560, 45, 45, 45, 45, 45, 45, 45, 45, 704, 705, 45, 45, 45, 45, 45, 45, 45, 45, 731, 45, 45, 45, 67, 67, 67, 67, 67, 739, 67, 67, 67, 67, 67, 67, 273, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 67, 67, 67, 764, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1290, 67, 67, 67, 67, 67, 67, 812, 67, 67, 67, 67, 818, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 837, 97, 97, 97, 97, 97, 602, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1137, 97, 97, 97, 97, 97, 97, 97, 97, 97, 862, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1627, 97, 97, 97, 0, 97, 97, 97, 97, 910, 97, 97, 97, 97, 916, 97, 97, 97, 0, 0, 0, 97, 97, 1940, 97, 97, 1942, 45, 45, 45, 45, 45, 45, 385, 45, 45, 45, 45, 395, 45, 45, 45, 45, 966, 45, 969, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 975, 45, 45, 45, 406, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 974, 45, 45, 45, 67, 67, 67, 67, 1010, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1262, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1040, 67, 1042, 67, 1045, 67, 67, 67, 67, 67, 67, 67, 97, 1706, 97, 97, 97, 1709, 97, 97, 97, 67, 67, 67, 67, 1051, 67, 67, 67, 67, 67, 1057, 67, 67, 67, 67, 67, 67, 67, 1443, 67, 67, 1446, 67, 67, 67, 67, 67, 67, 67, 1297, 0, 0, 0, 1303, 0, 0, 0, 1309, 67, 67, 67, 67, 1079, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 1098, 97, 97, 97, 97, 97, 1104, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1356, 97, 97, 97, 97, 97, 97, 1128, 97, 97, 97, 97, 97, 97, 1134, 97, 1136, 97, 1139, 97, 97, 97, 97, 97, 97, 1622, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 0, 1176, 0, 646, 45, 67, 67, 67, 1268, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1469, 67, 67, 67, 97, 1348, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1127, 97, 67, 1569, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1448, 1449, 67, 1816, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1825, 67, 67, 1827, 97, 97, 0, 1781, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 1831, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 1980, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1395, 45, 45, 45, 45, 45, 97, 1846, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1212, 45, 45, 45, 45, 45, 45, 2010, 45, 67, 67, 67, 67, 67, 2016, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 2007, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 143, 45, 45, 45, 1671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1813, 67, 67, 1815, 45, 45, 67, 210, 67, 67, 67, 67, 67, 67, 239, 67, 67, 67, 67, 67, 67, 67, 1454, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1445, 67, 67, 67, 67, 67, 67, 97, 97, 290, 97, 97, 97, 97, 97, 97, 319, 97, 97, 97, 97, 97, 97, 303, 97, 97, 317, 97, 97, 97, 97, 97, 97, 305, 97, 97, 97, 97, 97, 97, 97, 97, 97, 899, 97, 97, 97, 97, 97, 97, 375, 45, 45, 45, 379, 45, 45, 390, 45, 45, 394, 45, 45, 45, 45, 45, 443, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 461, 67, 67, 67, 465, 67, 67, 476, 67, 67, 480, 67, 67, 67, 67, 67, 67, 1694, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1288, 67, 67, 67, 67, 67, 67, 500, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1075, 97, 97, 97, 558, 97, 97, 97, 562, 97, 97, 573, 97, 97, 577, 97, 97, 97, 97, 97, 895, 97, 97, 97, 97, 97, 97, 903, 97, 97, 97, 0, 97, 97, 1638, 97, 97, 97, 97, 97, 97, 97, 97, 1646, 597, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1334, 45, 681, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1396, 45, 45, 1399, 45, 45, 730, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1434, 67, 67, 67, 67, 67, 67, 750, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1456, 67, 67, 67, 67, 67, 45, 45, 993, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1238, 67, 67, 1006, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1280, 1048, 1049, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1059, 67, 67, 67, 67, 67, 67, 1286, 67, 67, 67, 67, 67, 67, 67, 1291, 67, 97, 97, 1100, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 920, 97, 97, 1142, 1143, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1153, 97, 97, 97, 97, 97, 1158, 97, 97, 97, 1161, 97, 97, 97, 97, 1166, 97, 97, 97, 97, 97, 1325, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1328, 97, 97, 97, 97, 97, 97, 97, 45, 1218, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1678, 45, 45, 45, 67, 67, 67, 67, 67, 1269, 67, 67, 67, 67, 67, 67, 67, 67, 1278, 67, 67, 67, 67, 67, 67, 1761, 67, 67, 67, 67, 67, 67, 67, 67, 67, 530, 67, 67, 67, 67, 67, 67, 97, 97, 1349, 97, 97, 97, 97, 97, 97, 97, 97, 1358, 97, 97, 97, 97, 97, 97, 1623, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 926, 0, 0, 0, 45, 45, 1411, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1754, 45, 45, 67, 67, 1301, 0, 1307, 0, 1313, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 21054, 97, 97, 97, 97, 67, 1757, 67, 67, 67, 1760, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1467, 67, 67, 67, 67, 67, 1778, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 97, 97, 1352, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1511, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 1820, 67, 1822, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1933, 97, 1892, 97, 97, 97, 97, 97, 97, 1899, 45, 45, 45, 45, 45, 45, 45, 45, 1664, 45, 45, 45, 45, 45, 45, 45, 45, 1546, 45, 45, 45, 45, 45, 45, 45, 45, 1208, 45, 45, 45, 45, 45, 45, 45, 45, 1224, 45, 45, 45, 45, 45, 45, 45, 45, 673, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1925, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 623, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 307, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1796, 97, 45, 45, 45, 45, 45, 45, 45, 970, 45, 45, 45, 45, 45, 45, 45, 45, 1417, 45, 45, 45, 45, 45, 45, 45, 67, 1964, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1721, 97, 97, 0, 0, 1997, 97, 0, 0, 2000, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 733, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 803, 67, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 144, 45, 45, 45, 1805, 45, 1807, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 231, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 45, 45, 67, 211, 67, 67, 67, 67, 230, 234, 240, 244, 67, 67, 67, 67, 67, 67, 464, 67, 67, 67, 67, 67, 67, 479, 67, 67, 67, 260, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 291, 97, 97, 97, 97, 310, 314, 320, 324, 97, 97, 97, 97, 97, 97, 1367, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1355, 97, 97, 97, 97, 97, 97, 1362, 340, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 360, 0, 362, 0, 365, 28809, 367, 139, 369, 45, 45, 45, 374, 67, 67, 460, 67, 67, 67, 67, 466, 67, 67, 67, 67, 67, 67, 67, 67, 801, 67, 67, 67, 67, 67, 67, 67, 67, 67, 487, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 498, 67, 67, 67, 67, 67, 67, 1772, 67, 67, 97, 97, 97, 97, 97, 97, 97, 0, 921, 922, 1175, 0, 0, 0, 0, 45, 67, 502, 67, 67, 67, 67, 67, 67, 67, 508, 67, 67, 67, 515, 517, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1932, 97, 97, 0, 1999, 97, 97, 97, 0, 97, 97, 2004, 2005, 97, 45, 45, 45, 45, 1193, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 676, 45, 45, 45, 45, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 552, 97, 97, 97, 97, 97, 1377, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 655, 45, 45, 45, 45, 45, 45, 45, 97, 97, 557, 97, 97, 97, 97, 563, 97, 97, 97, 97, 97, 97, 97, 97, 1135, 97, 97, 97, 97, 97, 97, 97, 97, 97, 584, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 595, 97, 97, 97, 97, 97, 911, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 1319, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1733, 97, 97, 97, 97, 97, 97, 1340, 97, 97, 97, 1343, 97, 97, 1345, 97, 1346, 97, 599, 97, 97, 97, 97, 97, 97, 97, 605, 97, 97, 97, 612, 614, 97, 97, 97, 97, 97, 1794, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 1207, 45, 45, 45, 45, 45, 45, 1213, 45, 45, 745, 67, 67, 67, 67, 751, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1577, 67, 67, 67, 67, 67, 762, 67, 67, 67, 67, 766, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1765, 67, 67, 67, 67, 67, 777, 67, 67, 781, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1592, 1593, 67, 67, 97, 843, 97, 97, 97, 97, 849, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1510, 97, 97, 97, 97, 97, 97, 97, 860, 97, 97, 97, 97, 864, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1797, 45, 45, 45, 45, 1801, 45, 97, 875, 97, 97, 879, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1522, 97, 97, 97, 97, 97, 991, 45, 45, 45, 45, 996, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 215, 67, 67, 67, 67, 233, 67, 67, 67, 67, 251, 253, 1022, 67, 67, 67, 1026, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1035, 67, 67, 1038, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1458, 67, 67, 67, 67, 67, 1064, 67, 67, 67, 1067, 67, 67, 67, 67, 1072, 67, 67, 67, 67, 67, 67, 1296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367488, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 1096, 0, 921, 29315, 0, 0, 0, 0, 928, 45, 45, 45, 45, 45, 934, 45, 45, 45, 164, 45, 45, 45, 45, 45, 45, 45, 45, 45, 198, 45, 45, 45, 378, 45, 45, 45, 45, 45, 45, 393, 45, 45, 45, 398, 45, 97, 97, 1116, 97, 97, 97, 1120, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1147, 1148, 97, 97, 97, 97, 97, 97, 97, 1129, 97, 97, 1132, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1626, 97, 97, 97, 97, 0, 45, 1178, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1185, 45, 45, 45, 45, 441, 45, 45, 45, 45, 45, 45, 451, 45, 45, 67, 67, 67, 67, 67, 227, 67, 67, 67, 67, 67, 67, 67, 67, 1260, 67, 67, 67, 1263, 67, 67, 1265, 1203, 45, 45, 1205, 45, 1206, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1216, 67, 1266, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1276, 67, 67, 67, 67, 67, 67, 492, 67, 67, 67, 67, 67, 67, 67, 67, 67, 471, 67, 67, 67, 67, 481, 67, 45, 1386, 45, 1389, 45, 45, 45, 45, 1394, 45, 45, 45, 1397, 45, 45, 45, 45, 995, 45, 997, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1915, 67, 67, 67, 67, 67, 1422, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1433, 67, 1436, 67, 67, 67, 67, 1441, 67, 67, 67, 1444, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809, 53531, 97, 97, 97, 97, 1494, 97, 97, 97, 1497, 97, 97, 97, 97, 97, 97, 97, 1368, 97, 97, 97, 97, 97, 97, 97, 97, 851, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1571, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1583, 67, 67, 67, 67, 67, 67, 67, 67, 1591, 67, 67, 67, 67, 67, 67, 752, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1056, 67, 67, 67, 67, 67, 67, 97, 1634, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1125, 97, 97, 97, 1647, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1183, 45, 45, 45, 45, 45, 45, 45, 45, 45, 409, 45, 45, 45, 45, 45, 45, 1658, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1668, 1712, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 1835, 97, 97, 97, 97, 0, 0, 0, 97, 97, 1844, 97, 97, 1726, 0, 97, 97, 97, 97, 97, 1732, 97, 1734, 97, 97, 97, 97, 97, 300, 97, 308, 97, 97, 97, 97, 97, 97, 97, 97, 866, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1758, 67, 67, 67, 1762, 67, 67, 67, 67, 67, 67, 67, 67, 1043, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1771, 67, 67, 67, 97, 97, 97, 97, 97, 1776, 97, 97, 97, 97, 297, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1108, 97, 97, 97, 97, 67, 67, 67, 1966, 97, 97, 97, 1970, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 1720, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1837, 97, 0, 1840, 1841, 97, 97, 97, 1988, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1994, 1995, 67, 97, 97, 97, 97, 97, 1103, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 917, 97, 97, 0, 0, 0, 67, 67, 265, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 345, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 361, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 411, 45, 45, 414, 45, 45, 45, 45, 377, 45, 45, 45, 386, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1223, 45, 45, 45, 45, 45, 45, 45, 45, 45, 426, 45, 45, 433, 45, 45, 45, 67, 67, 67, 67, 67, 463, 67, 67, 67, 472, 67, 67, 67, 67, 67, 67, 67, 527, 67, 67, 67, 67, 67, 67, 537, 67, 540, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 97, 97, 97, 1119, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1509, 97, 97, 97, 97, 97, 97, 97, 97, 564, 97, 97, 97, 97, 97, 97, 97, 637, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 927, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1234, 45, 45, 45, 45, 67, 67, 67, 67, 1240, 45, 697, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 708, 45, 45, 45, 45, 1221, 45, 45, 45, 45, 1225, 45, 45, 45, 45, 45, 45, 384, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1210, 45, 45, 45, 45, 45, 45, 67, 67, 795, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1470, 67, 67, 67, 67, 67, 67, 67, 815, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 97, 97, 893, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1164, 97, 97, 97, 67, 67, 67, 1025, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1687, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 1097, 1241, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1450, 45, 45, 1388, 45, 1390, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1236, 67, 67, 67, 67, 67, 1437, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1472, 1490, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1503, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 1930, 0, 97, 97, 97, 97, 97, 847, 97, 97, 97, 97, 97, 97, 97, 97, 97, 858, 67, 67, 1965, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 1719, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 1382, 45, 1383, 45, 45, 45, 159, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1563, 45, 45, 45, 45, 45, 67, 261, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 341, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 1099, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1333, 97, 1230, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1992, 67, 1993, 67, 67, 67, 97, 97, 45, 45, 160, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1665, 45, 45, 45, 45, 45, 131427, 357, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 684, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 412, 45, 45, 45, 416, 45, 45, 45, 440, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1990, 67, 1991, 67, 67, 67, 67, 67, 67, 67, 97, 97, 1707, 97, 97, 97, 97, 97, 97, 501, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1691, 67, 67, 67, 67, 67, 526, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1030, 67, 1032, 67, 67, 67, 67, 598, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1632, 0, 921, 29315, 923, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 425, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 1093, 0, 0, 0, 0, 0, 97, 1609, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1369, 97, 97, 97, 1372, 97, 97, 67, 67, 266, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 346, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 665, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1677, 45, 45, 45, 45, 67, 45, 45, 954, 45, 956, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1545, 45, 45, 45, 45, 45, 45, 45, 45, 45, 448, 45, 45, 45, 45, 67, 456, 67, 67, 67, 67, 67, 1270, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1069, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1350, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1524, 97, 97, 97, 97, 97, 97, 97, 1376, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 1559, 1561, 45, 45, 45, 1564, 45, 1566, 1567, 45, 67, 67, 67, 67, 67, 1573, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1247, 67, 67, 67, 67, 67, 1252, 97, 1725, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1628, 97, 1630, 0, 0, 94242, 0, 0, 0, 2211840, 0, 1118208, 0, 0, 0, 0, 2158592, 2158731, 2158592, 2158592, 2158592, 3117056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3018752, 2158592, 3043328, 2158592, 2158592, 2158592, 2158592, 3080192, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158878, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2605056, 2158592, 2158592, 2207744, 0, 542, 0, 544, 0, 0, 2166784, 0, 0, 0, 550, 0, 0, 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2867200, 2158592, 2904064, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 94242, 0, 0, 0, 2211840, 0, 0, 1130496, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0, 139, 0, 0, 0, 139, 0, 2367488, 2207744, 0, 0, 0, 0, 176128, 0, 2166784, 0, 0, 0, 0, 0, 286, 2158592, 2158592, 3170304, 3174400, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 1508, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592, 2158592, 2158592, 2158592, 3039232, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 67, 24850, 24850, 12564, 12564, 0, 0, 0, 0, 0, 53531, 53531, 0, 286, 97, 97, 97, 97, 97, 1144, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1149, 97, 97, 97, 97, 1154, 57889, 0, 0, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 561, 97, 97, 97, 97, 97, 97, 576, 97, 97, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 0, 0, 139264, 0, 921, 29315, 0, 0, 926, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 719, 720, 45, 45, 45, 45, 45, 45, 45, 45, 685, 45, 45, 45, 45, 45, 45, 45, 45, 45, 942, 45, 45, 946, 45, 45, 45, 950, 45, 45, 0, 2146304, 2146304, 0, 0, 0, 0, 2224128, 2224128, 2224128, 2232320, 2232320, 2232320, 2232320, 0, 0, 1301, 0, 0, 0, 0, 0, 1307, 0, 0, 0, 0, 0, 1313, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1318, 97, 97, 97, 97, 97, 97, 1795, 97, 97, 45, 45, 45, 45, 45, 45, 45, 446, 45, 45, 45, 45, 45, 45, 67, 67, 2158592, 2146304, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 924, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1000, 45, 45, 45, 45, 67, 67 -]; - -XQueryTokenizer.EXPECTED = -[ 290, 300, 304, 353, 296, 309, 305, 319, 315, 324, 328, 352, 354, 334, 338, 330, 320, 345, 349, 293, 358, 362, 341, 366, 312, 370, 374, 378, 382, 386, 390, 394, 398, 737, 402, 634, 439, 604, 634, 634, 634, 634, 408, 634, 634, 634, 404, 634, 634, 634, 457, 634, 634, 963, 634, 634, 413, 634, 634, 634, 634, 634, 634, 634, 663, 418, 422, 903, 902, 426, 431, 548, 634, 437, 521, 919, 443, 615, 409, 449, 455, 624, 731, 751, 634, 461, 465, 672, 470, 469, 474, 481, 485, 477, 489, 493, 629, 542, 497, 505, 603, 602, 991, 648, 510, 804, 634, 515, 958, 526, 525, 530, 768, 634, 546, 552, 711, 710, 593, 558, 562, 618, 566, 570, 574, 578, 582, 586, 590, 608, 612, 660, 822, 821, 634, 622, 596, 444, 628, 533, 724, 633, 640, 653, 647, 652, 536, 1008, 451, 450, 445, 657, 670, 676, 685, 689, 693, 697, 701, 704, 707, 715, 719, 798, 815, 634, 723, 762, 996, 634, 728, 969, 730, 735, 908, 634, 741, 679, 889, 511, 747, 634, 750, 755, 499, 666, 499, 501, 759, 772, 776, 780, 634, 787, 784, 797, 802, 809, 808, 427, 814, 1006, 517, 634, 519, 853, 634, 813, 850, 793, 634, 819, 826, 833, 832, 837, 843, 847, 857, 861, 863, 867, 871, 875, 879, 883, 643, 887, 539, 980, 979, 634, 893, 944, 634, 900, 896, 634, 907, 933, 506, 912, 917, 828, 433, 636, 635, 554, 961, 923, 930, 927, 937, 941, 634, 634, 634, 974, 948, 952, 985, 913, 968, 967, 743, 634, 973, 839, 634, 978, 599, 634, 984, 989, 765, 444, 995, 1000, 634, 1003, 790, 955, 1012, 681, 634, 634, 634, 634, 634, 414, 1016, 1020, 1024, 1085, 1027, 1090, 1090, 1046, 1080, 1137, 1108, 1215, 1049, 1032, 1039, 1085, 1085, 1085, 1085, 1058, 1062, 1068, 1085, 1086, 1090, 1090, 1091, 1072, 1064, 1107, 1090, 1090, 1090, 1118, 1123, 1138, 1078, 1074, 1084, 1085, 1085, 1085, 1087, 1090, 1062, 1052, 1060, 1114, 1062, 1104, 1085, 1085, 1090, 1090, 1028, 1122, 1063, 1128, 1139, 1127, 1158, 1085, 1085, 1151, 1090, 1090, 1090, 1095, 1090, 1132, 1073, 1136, 1143, 1061, 1150, 1085, 1155, 1098, 1101, 1146, 1162, 1169, 1101, 1185, 1151, 1090, 1110, 1173, 1054, 1087, 1109, 1177, 1165, 1089, 1204, 1184, 1107, 1189, 1193, 1088, 1197, 1180, 1201, 1208, 1042, 1212, 1219, 1223, 1227, 1231, 1235, 1245, 1777, 1527, 1686, 1686, 1238, 1686, 1254, 1686, 1686, 1686, 1294, 1669, 1686, 1686, 1686, 1322, 1625, 1534, 1268, 1624, 1275, 1281, 1443, 1292, 1300, 1686, 1686, 1686, 1350, 1826, 1306, 1686, 1686, 1240, 2032, 1317, 1321, 1686, 1686, 1253, 1686, 1326, 1686, 1686, 1686, 1418, 1709, 1446, 1686, 1686, 1686, 1492, 1686, 1295, 1447, 1686, 1686, 1258, 1686, 1736, 1686, 1686, 1520, 1355, 1686, 1288, 1348, 1361, 1686, 1359, 1686, 1364, 1498, 1368, 1302, 1362, 1381, 1389, 1395, 1486, 1686, 1371, 1377, 1370, 1686, 1375, 1382, 1384, 1402, 1408, 1385, 1383, 1619, 1413, 1423, 1428, 1433, 1686, 1686, 1270, 1686, 1338, 1686, 1440, 1686, 1686, 1686, 1499, 1465, 1686, 1686, 1686, 1639, 1473, 1884, 1686, 1686, 1293, 1864, 1686, 1686, 1296, 1321, 1483, 1686, 1686, 1686, 1646, 1686, 1748, 1496, 1686, 1418, 1675, 1686, 1418, 1702, 1686, 1418, 1981, 1686, 1429, 1409, 1427, 1504, 1692, 1686, 1686, 1313, 1448, 1651, 1508, 1686, 1686, 1340, 1686, 1903, 1686, 1686, 1435, 1513, 1686, 1283, 1287, 1519, 1686, 1524, 1363, 1568, 1938, 1539, 1566, 1579, 1479, 1533, 1538, 1553, 1544, 1552, 1557, 1563, 1574, 1557, 1583, 1589, 1590, 1759, 1594, 1603, 1607, 1611, 1686, 1436, 1514, 1686, 1434, 1656, 1686, 1434, 1680, 1686, 1453, 1686, 1686, 1686, 1559, 1617, 1686, 1770, 1418, 1623, 1769, 1629, 1686, 1515, 1335, 1686, 1285, 1686, 1671, 1921, 1650, 1686, 1686, 1344, 1308, 1666, 1686, 1686, 1686, 1659, 1685, 1686, 1686, 1686, 1686, 1241, 1686, 1686, 1844, 1691, 1686, 1630, 1977, 1970, 1362, 1686, 1686, 1686, 1693, 1698, 1686, 1686, 1686, 1697, 1686, 1764, 1715, 1686, 1634, 1638, 1686, 1599, 1585, 1686, 1271, 1686, 1269, 1686, 1721, 1686, 1686, 1354, 1686, 1801, 1686, 1799, 1686, 1640, 1686, 1686, 1461, 1686, 1686, 1732, 1686, 1944, 1686, 1740, 1686, 1746, 1415, 1396, 1686, 1598, 1547, 1417, 1597, 1416, 1577, 1546, 1397, 1577, 1547, 1548, 1570, 1398, 1753, 1686, 1652, 1509, 1686, 1686, 1686, 1757, 1686, 1419, 1686, 1763, 1418, 1768, 1781, 1686, 1686, 1686, 1705, 1686, 2048, 1792, 1686, 1686, 1686, 1735, 1686, 1797, 1686, 1686, 1404, 1686, 1639, 1815, 1686, 1686, 1418, 2017, 1820, 1686, 1686, 1803, 1686, 1686, 1686, 1736, 1489, 1686, 1686, 1825, 1338, 1260, 1263, 1686, 1686, 1785, 1686, 1686, 1728, 1686, 1686, 1749, 1497, 1830, 1830, 1262, 1248, 1261, 1329, 1260, 1264, 1329, 1248, 1249, 1259, 1540, 1849, 1842, 1686, 1686, 1835, 1686, 1686, 1816, 1686, 1686, 1831, 1882, 1848, 1686, 1686, 1686, 1774, 2071, 1854, 1686, 1686, 1469, 1884, 1686, 1821, 1859, 1686, 1686, 1350, 1883, 1686, 1686, 1686, 1781, 1391, 1875, 1686, 1686, 1613, 1644, 1686, 1686, 1889, 1686, 1686, 1662, 1884, 1686, 1885, 1890, 1686, 1686, 1686, 1894, 1686, 1686, 1678, 1686, 1907, 1686, 1686, 1529, 1914, 1686, 1838, 1686, 1686, 1881, 1686, 1686, 1872, 1876, 1836, 1919, 1686, 1837, 1692, 1910, 1686, 1925, 1928, 1742, 1686, 1811, 1811, 1930, 1810, 1929, 1935, 1928, 1900, 1942, 1867, 1868, 1931, 1035, 1788, 1948, 1952, 1956, 1960, 1964, 1686, 1976, 1686, 1686, 1686, 2065, 1686, 1992, 2037, 1686, 1686, 1998, 2009, 1972, 2002, 1686, 1686, 1686, 2077, 1300, 2023, 1686, 1686, 1686, 1807, 2031, 1686, 1686, 1686, 1860, 1500, 2032, 1686, 1686, 1686, 2083, 1686, 2036, 1686, 1277, 1276, 2042, 1877, 1686, 1686, 2041, 1686, 1686, 2027, 2037, 2012, 1686, 2012, 1855, 1850, 1686, 2046, 1686, 1686, 2054, 1996, 1686, 1897, 1309, 2059, 2052, 1686, 2058, 1686, 1686, 2081, 1686, 1717, 1477, 1686, 1331, 1686, 1686, 1687, 1686, 1860, 1681, 1686, 1686, 1686, 1966, 1724, 1686, 1686, 1686, 1984, 2015, 1686, 1686, 1686, 1988, 1686, 2063, 1686, 1686, 1686, 2005, 1686, 1727, 1686, 1686, 1711, 1457, 2069, 1686, 1686, 1686, 2019, 2075, 1686, 1686, 1915, 1686, 1686, 1793, 1874, 1686, 1686, 1491, 1362, 1449, 1686, 1686, 1460, 2098, 2087, 2091, 2095, 2184, 2102, 2113, 2780, 2117, 2134, 2142, 2281, 2146, 2146, 2146, 2304, 2296, 2181, 2639, 2591, 2872, 2592, 2873, 2313, 2195, 2200, 2281, 2146, 2273, 2226, 2204, 2152, 2219, 2276, 2167, 2177, 2276, 2235, 2276, 2276, 2230, 2281, 2276, 2296, 2276, 2293, 2276, 2276, 2276, 2276, 2234, 2276, 2311, 2314, 2210, 2199, 2217, 2222, 2276, 2276, 2276, 2240, 2276, 2294, 2276, 2276, 2173, 2276, 2198, 2281, 2281, 2281, 2281, 2282, 2146, 2146, 2146, 2146, 2205, 2146, 2204, 2248, 2276, 2235, 2276, 2297, 2276, 2276, 2276, 2277, 2256, 2281, 2283, 2146, 2146, 2146, 2275, 2276, 2295, 2276, 2276, 2293, 2146, 2304, 2264, 2269, 2221, 2276, 2276, 2276, 2293, 2295, 2276, 2276, 2276, 2295, 2263, 2205, 2268, 2220, 2172, 2276, 2276, 2276, 2296, 2276, 2276, 2296, 2294, 2276, 2276, 2278, 2281, 2281, 2280, 2281, 2281, 2281, 2283, 2206, 2223, 2276, 2276, 2279, 2281, 2281, 2146, 2273, 2276, 2276, 2281, 2281, 2281, 2276, 2292, 2276, 2298, 2225, 2276, 2298, 2169, 2224, 2292, 2298, 2171, 2229, 2281, 2281, 2171, 2236, 2281, 2281, 2281, 2146, 2275, 2225, 2292, 2299, 2276, 2229, 2281, 2146, 2276, 2290, 2297, 2283, 2146, 2146, 2274, 2224, 2227, 2298, 2225, 2297, 2276, 2230, 2170, 2230, 2282, 2146, 2147, 2151, 2156, 2288, 2276, 2230, 2303, 2308, 2236, 2284, 2228, 2318, 2318, 2318, 2326, 2335, 2339, 2343, 2349, 2416, 2693, 2357, 2592, 2109, 2592, 2592, 2162, 2943, 2823, 2646, 2592, 2361, 2592, 2122, 2592, 2592, 2122, 2470, 2592, 2592, 2592, 2109, 2107, 2592, 2592, 2592, 2123, 2592, 2592, 2592, 2125, 2592, 2413, 2592, 2592, 2592, 2127, 2592, 2592, 2414, 2592, 2592, 2592, 2130, 2952, 2592, 2594, 2592, 2592, 2212, 2609, 2252, 2592, 2592, 2592, 2446, 2434, 2592, 2592, 2592, 2212, 2446, 2450, 2456, 2431, 2435, 2592, 2592, 2243, 2478, 2448, 2439, 2946, 2592, 2592, 2592, 2368, 2809, 2813, 2450, 2441, 2212, 2812, 2449, 2440, 2947, 2592, 2592, 2592, 2345, 2451, 2457, 2948, 2592, 2124, 2592, 2592, 2650, 2823, 2449, 2455, 2946, 2592, 2128, 2592, 2592, 2649, 2952, 2592, 2810, 2448, 2461, 2991, 2467, 2592, 2592, 2329, 2817, 2474, 2990, 2466, 2592, 2592, 2373, 2447, 2992, 2469, 2592, 2592, 2592, 2373, 2447, 2477, 2468, 2592, 2592, 2353, 2469, 2592, 2495, 2592, 2592, 2415, 2483, 2592, 2415, 2496, 2592, 2592, 2352, 2592, 2592, 2352, 2352, 2469, 2592, 2592, 2363, 2331, 2494, 2592, 2592, 2592, 2375, 2592, 2375, 2415, 2504, 2592, 2592, 2367, 2372, 2503, 2592, 2592, 2592, 2389, 2418, 2415, 2592, 2592, 2373, 2592, 2592, 2592, 2593, 2732, 2417, 2415, 2592, 2417, 2520, 2592, 2592, 2592, 2390, 2521, 2521, 2592, 2592, 2592, 2401, 2599, 2585, 2526, 2531, 2120, 2592, 2212, 2426, 2450, 2463, 2948, 2592, 2592, 2592, 2213, 2389, 2527, 2532, 2121, 2542, 2551, 2105, 2592, 2213, 2592, 2592, 2592, 2558, 2538, 2544, 2553, 2557, 2537, 2543, 2552, 2421, 2572, 2576, 2546, 2543, 2547, 2592, 2592, 2373, 2615, 2575, 2545, 2105, 2592, 2244, 2479, 2592, 2129, 2592, 2592, 2628, 2690, 2469, 2562, 2566, 2592, 2592, 2592, 2415, 2928, 2934, 2401, 2570, 2574, 2564, 2572, 2585, 2590, 2592, 2592, 2585, 2965, 2592, 2592, 2592, 2445, 2251, 2592, 2592, 2592, 2474, 2592, 2609, 2892, 2592, 2362, 2592, 2592, 2138, 2851, 2159, 2592, 2592, 2592, 2509, 2888, 2892, 2592, 2592, 2592, 2490, 2418, 2891, 2592, 2592, 2376, 2592, 2592, 2374, 2592, 2889, 2388, 2592, 2373, 2373, 2890, 2592, 2592, 2387, 2592, 2887, 2505, 2892, 2592, 2373, 2610, 2388, 2592, 2592, 2376, 2373, 2592, 2887, 2891, 2592, 2374, 2592, 2592, 2608, 2159, 2614, 2620, 2592, 2592, 2394, 2594, 2887, 2399, 2592, 2887, 2397, 2508, 2374, 2507, 2592, 2375, 2592, 2592, 2592, 2595, 2508, 2506, 2592, 2506, 2505, 2505, 2592, 2507, 2637, 2505, 2592, 2592, 2401, 2661, 2592, 2643, 2592, 2592, 2417, 2592, 2655, 2592, 2592, 2592, 2510, 2414, 2656, 2592, 2592, 2592, 2516, 2592, 2593, 2660, 2665, 2880, 2592, 2592, 2592, 2522, 2767, 2666, 2881, 2592, 2592, 2420, 2571, 2696, 2592, 2592, 2592, 2580, 2572, 2686, 2632, 2698, 2592, 2383, 2514, 2592, 2163, 2932, 2465, 2685, 2631, 2697, 2592, 2388, 2592, 2592, 2212, 2604, 2671, 2632, 2678, 2592, 2401, 2405, 2409, 2592, 2592, 2592, 2679, 2592, 2592, 2592, 2592, 2108, 2677, 2591, 2592, 2592, 2592, 2419, 2592, 2683, 2187, 2191, 2469, 2671, 2189, 2467, 2592, 2401, 2629, 2633, 2702, 2468, 2592, 2592, 2421, 2536, 2703, 2469, 2592, 2592, 2422, 2573, 2593, 2672, 2467, 2592, 2402, 2406, 2592, 2402, 2979, 2592, 2592, 2626, 2673, 2467, 2592, 2446, 2259, 2947, 2592, 2377, 2709, 2592, 2592, 2522, 2862, 2713, 2468, 2592, 2592, 2581, 2572, 2562, 2374, 2374, 2592, 2376, 2721, 2724, 2592, 2592, 2624, 2373, 2731, 2592, 2592, 2592, 2626, 2732, 2592, 2592, 2592, 2755, 2656, 2726, 2736, 2741, 2592, 2486, 2593, 2381, 2592, 2727, 2737, 2742, 2715, 2747, 2753, 2592, 2498, 2469, 2873, 2743, 2592, 2592, 2592, 2791, 2759, 2763, 2592, 2592, 2627, 2704, 2592, 2592, 2522, 2789, 2593, 2761, 2753, 2592, 2498, 2863, 2592, 2592, 2767, 2592, 2592, 2592, 2792, 2789, 2592, 2592, 2592, 2803, 2126, 2592, 2592, 2592, 2811, 2122, 2592, 2592, 2592, 2834, 2777, 2592, 2592, 2592, 2848, 2936, 2591, 2489, 2797, 2592, 2592, 2670, 2631, 2490, 2798, 2592, 2592, 2592, 2963, 2807, 2592, 2592, 2592, 2965, 2838, 2592, 2592, 2592, 2975, 2330, 2818, 2829, 2592, 2498, 2939, 2592, 2498, 2592, 2791, 2331, 2819, 2830, 2592, 2592, 2592, 2982, 2834, 2817, 2828, 2106, 2592, 2592, 2592, 2405, 2405, 2817, 2828, 2592, 2592, 2415, 2849, 2842, 2592, 2522, 2773, 2592, 2522, 2868, 2592, 2580, 2600, 2586, 2137, 2850, 2843, 2592, 2592, 2855, 2937, 2844, 2592, 2592, 2592, 2987, 2936, 2591, 2592, 2592, 2684, 2630, 2592, 2856, 2938, 2592, 2592, 2860, 2939, 2592, 2592, 2872, 2592, 2861, 2591, 2592, 2592, 2887, 2616, 2592, 2867, 2592, 2592, 2708, 2592, 2498, 2469, 2498, 2497, 2785, 2773, 2499, 2783, 2770, 2877, 2877, 2877, 2772, 2592, 2592, 2345, 2885, 2592, 2592, 2592, 2715, 2762, 2515, 2896, 2592, 2592, 2715, 2917, 2516, 2897, 2592, 2592, 2592, 2901, 2906, 2911, 2592, 2592, 2956, 2960, 2715, 2902, 2907, 2912, 2593, 2916, 2920, 2820, 2922, 2822, 2592, 2592, 2715, 2927, 2921, 2821, 2106, 2592, 2592, 2974, 2408, 2321, 2821, 2106, 2592, 2592, 2983, 2592, 2593, 2404, 2408, 2592, 2592, 2717, 2749, 2716, 2928, 2322, 2822, 2593, 2926, 2919, 2820, 2934, 2823, 2592, 2592, 2592, 2651, 2824, 2592, 2592, 2592, 2130, 2952, 2592, 2592, 2592, 2592, 2964, 2592, 2592, 2716, 2748, 2592, 2969, 2592, 2592, 2716, 2918, 2368, 2970, 2592, 2592, 2592, 2403, 2407, 2592, 2592, 2787, 2211, 2404, 2409, 2592, 2592, 2802, 2837, 2987, 2592, 2592, 2592, 2809, 2427, 2592, 2793, 2592, 2592, 2809, 2447, 1073741824, 0x80000000, 539754496, 542375936, 402653184, 554434560, 571736064, 545521856, 268451840, 335544320, 268693630, 512, 2048, 256, 1024, 0, 1024, 0, 1073741824, 0x80000000, 0, 0, 0, 8388608, 0, 0, 1073741824, 1073741824, 0, 0x80000000, 537133056, 4194304, 1048576, 268435456, -1073741824, 0, 0, 0, 1048576, 0, 0, 0, 1572864, 0, 0, 0, 4194304, 0, 134217728, 16777216, 0, 0, 32, 64, 98304, 0, 33554432, 8388608, 192, 67108864, 67108864, 67108864, 67108864, 16, 32, 4, 0, 8192, 196608, 196608, 229376, 80, 4096, 524288, 8388608, 0, 0, 32, 128, 256, 24576, 24600, 24576, 24576, 2, 24576, 24576, 24576, 24584, 24592, 24576, 24578, 24576, 24578, 24576, 24576, 16, 512, 2048, 2048, 256, 4096, 32768, 1048576, 4194304, 67108864, 134217728, 268435456, 262144, 134217728, 0, 128, 128, 64, 16384, 16384, 16384, 67108864, 32, 32, 4, 4, 4096, 262144, 134217728, 0, 0, 0, 2, 0, 8192, 131072, 131072, 4096, 4096, 4096, 4096, 24576, 24576, 24576, 8, 8, 24576, 24576, 16384, 16384, 16384, 24576, 24584, 24576, 24576, 24576, 16384, 24576, 536870912, 262144, 0, 0, 32, 2048, 8192, 4, 4096, 4096, 4096, 786432, 8388608, 16777216, 0, 128, 16384, 16384, 16384, 32768, 65536, 2097152, 32, 32, 32, 32, 4, 4, 4, 4, 4, 4096, 67108864, 67108864, 67108864, 24576, 24576, 24576, 24576, 0, 16384, 16384, 16384, 16384, 67108864, 67108864, 8, 67108864, 24576, 8, 8, 8, 24576, 24576, 24576, 24578, 24576, 24576, 24576, 2, 2, 2, 16384, 67108864, 67108864, 67108864, 32, 67108864, 8, 8, 24576, 2048, 0x80000000, 536870912, 262144, 262144, 262144, 67108864, 8, 24576, 16384, 32768, 1048576, 4194304, 25165824, 67108864, 24576, 32770, 2, 4, 112, 512, 98304, 524288, 50, 402653186, 1049090, 1049091, 10, 66, 100925514, 10, 66, 12582914, 0, 0, -1678194207, -1678194207, -1041543218, 0, 32768, 0, 0, 32, 65536, 268435456, 1, 1, 513, 1048577, 0, 12582912, 0, 0, 0, 4, 1792, 0, 0, 0, 7, 29360128, 0, 0, 0, 8, 0, 0, 0, 12, 1, 1, 0, 0, -604102721, -604102721, 4194304, 8388608, 0, 0, 0, 31, 925600, 997981306, 997981306, 997981306, 0, 0, 2048, 8388608, 0, 0, 1, 2, 4, 32, 64, 512, 8192, 0, 0, 0, 245760, 997720064, 0, 0, 0, 32, 0, 0, 0, 3, 12, 16, 32, 8, 112, 3072, 12288, 16384, 32768, 65536, 131072, 7864320, 16777216, 973078528, 0, 0, 65536, 131072, 3670016, 4194304, 16777216, 33554432, 2, 8, 48, 2048, 8192, 16384, 32768, 65536, 131072, 524288, 131072, 524288, 3145728, 4194304, 16777216, 33554432, 65536, 131072, 2097152, 4194304, 16777216, 33554432, 134217728, 268435456, 536870912, 0, 0, 0, 1024, 0, 8, 48, 2048, 8192, 65536, 33554432, 268435456, 536870912, 65536, 268435456, 536870912, 0, 0, 32768, 0, 0, 126, 623104, 65011712, 0, 32, 65536, 536870912, 0, 0, 65536, 524288, 0, 32, 65536, 0, 0, 0, 2048, 0, 0, 0, 15482, 245760, -604102721, 0, 0, 0, 18913, 33062912, 925600, -605028352, 0, 0, 0, 65536, 31, 8096, 131072, 786432, 3145728, 3145728, 12582912, 50331648, 134217728, 268435456, 160, 256, 512, 7168, 131072, 786432, 131072, 786432, 1048576, 2097152, 12582912, 16777216, 268435456, 1073741824, 0x80000000, 12582912, 16777216, 33554432, 268435456, 1073741824, 0x80000000, 3, 12, 16, 160, 256, 7168, 786432, 1048576, 12582912, 16777216, 268435456, 1073741824, 0, 8, 16, 32, 128, 256, 512, 7168, 786432, 1048576, 2097152, 0, 1, 2, 8, 16, 7168, 786432, 1048576, 8388608, 16777216, 16777216, 1073741824, 0, 0, 0, 0, 1, 0, 0, 8, 32, 128, 256, 7168, 8, 32, 0, 3072, 0, 8, 32, 3072, 4096, 524288, 8, 32, 0, 0, 3072, 4096, 0, 2048, 524288, 8388608, 8, 2048, 0, 0, 1, 12, 256, 4096, 32768, 262144, 1048576, 4194304, 67108864, 0, 2048, 0, 2048, 2048, 1073741824, -58805985, -58805985, -58805985, 0, 0, 262144, 0, 0, 32, 4194304, 16777216, 134217728, 4382, 172032, -58982400, 0, 0, 2, 28, 256, 4096, 8192, 8192, 32768, 131072, 262144, 524288, 1, 2, 12, 256, 4096, 0, 0, 4194304, 67108864, 134217728, 805306368, 1073741824, 0, 0, 1, 2, 12, 16, 256, 4096, 1048576, 67108864, 134217728, 268435456, 0, 512, 1048576, 4194304, 201326592, 1879048192, 0, 0, 12, 256, 4096, 134217728, 268435456, 536870912, 12, 256, 268435456, 536870912, 0, 12, 256, 0, 0, 1, 32, 64, 512, 0, 0, 205236961, 205236961, 0, 0, 0, 1, 96, 640, 1, 10976, 229376, 204996608, 0, 640, 2048, 8192, 229376, 1572864, 1572864, 2097152, 201326592, 0, 0, 0, 64, 512, 2048, 229376, 1572864, 201326592, 1572864, 201326592, 0, 0, 1, 4382, 0, 1, 32, 2048, 65536, 131072, 1572864, 201326592, 131072, 1572864, 134217728, 0, 0, 524288, 524288, 0, 0, 0, -68582786, -68582786, -68582786, 0, 0, 2097152, 524288, 0, 524288, 0, 0, 65536, 131072, 1572864, 0, 0, 2, 4, 0, 0, 65011712, -134217728, 0, 0, 0, 0, 2, 4, 120, 512, -268435456, 0, 0, 0, 2, 8, 48, 64, 2048, 8192, 98304, 524288, 2097152, 4194304, 25165824, 33554432, 134217728, 268435456, 0x80000000, 0, 0, 25165824, 33554432, 134217728, 1879048192, 0x80000000, 0, 0, 4, 112, 512, 622592, 65011712, 134217728, -268435456, 16777216, 33554432, 134217728, 1610612736, 0, 0, 0, 64, 98304, 524288, 4194304, 16777216, 33554432, 0, 98304, 524288, 16777216, 33554432, 0, 65536, 524288, 33554432, 536870912, 1073741824, 0, 65536, 524288, 536870912, 1073741824, 0, 0, 65536, 524288, 536870912, 0, 524288, 0, 524288, 524288, 1048576, 2086666240, 0x80000000, 0, -1678194207, 0, 0, 0, 8, 32, 2048, 524288, 8388608, 0, 0, 33062912, 436207616, 0x80000000, 0, 0, 32, 64, 2432, 16384, 32768, 32768, 524288, 3145728, 4194304, 25165824, 25165824, 167772160, 268435456, 0x80000000, 0, 32, 64, 384, 2048, 16384, 32768, 1048576, 2097152, 4194304, 25165824, 32, 64, 128, 256, 2048, 16384, 2048, 16384, 1048576, 4194304, 16777216, 33554432, 134217728, 536870912, 1073741824, 0, 0, 2048, 16384, 4194304, 16777216, 33554432, 134217728, 805306368, 0, 0, 16777216, 134217728, 268435456, 0x80000000, 0, 622592, 622592, 622592, 8807, 8807, 434791, 0, 0, 16777216, 0, 0, 0, 7, 608, 8192, 0, 0, 0, 3, 4, 96, 512, 32, 64, 8192, 0, 0, 16777216, 134217728, 0, 0, 2, 4, 8192, 16384, 65536, 2097152, 33554432, 268435456 -]; - -XQueryTokenizer.TOKEN = -[ - "(0)", - "ModuleDecl", - "Annotation", - "OptionDecl", - "Operator", - "Variable", - "Tag", - "EndTag", - "PragmaContents", - "DirCommentContents", - "DirPIContents", - "CDataSectionContents", - "AttrTest", - "Wildcard", - "EQName", - "IntegerLiteral", - "DecimalLiteral", - "DoubleLiteral", - "PredefinedEntityRef", - "'\"\"'", - "EscapeApos", - "QuotChar", - "AposChar", - "ElementContentChar", - "QuotAttrContentChar", - "AposAttrContentChar", - "NCName", - "QName", - "S", - "CharRef", - "CommentContents", - "DocTag", - "DocCommentContents", - "EOF", - "'!'", - "'\"'", - "'#'", - "'#)'", - "''''", - "'('", - "'(#'", - "'(:'", - "'(:~'", - "')'", - "'*'", - "'*'", - "','", - "'-->'", - "'.'", - "'/'", - "'/>'", - "':'", - "':)'", - "';'", - "''), token: xmlcomment, next: function(stack){ stack.pop(); } } - ], - CData: [ - { name: 'CDataSectionContents', token: cdata }, - { name: n(']]>'), token: cdata, next: function(stack){ stack.pop(); } } - ], - PI: [ - { name: 'DirPIContents', token: pi }, - { name: n('?'), token: pi }, - { name: n('?>'), token: pi, next: function(stack){ stack.pop(); } } - ], - AposString: [ - { name: n('\'\''), token: 'string', next: function(stack){ stack.pop(); } }, - { name: 'PredefinedEntityRef', token: 'constant.language.escape' }, - { name: 'CharRef', token: 'constant.language.escape' }, - { name: 'EscapeApos', token: 'constant.language.escape' }, - { name: 'AposChar', token: 'string' } - ], - QuotString: [ - { name: n('"'), token: 'string', next: function(stack){ stack.pop(); } }, - { name: 'PredefinedEntityRef', token: 'constant.language.escape' }, - { name: 'CharRef', token: 'constant.language.escape' }, - { name: 'EscapeQuot', token: 'constant.language.escape' }, - { name: 'QuotChar', token: 'string' } - ] -}; - -exports.XQueryLexer = function(){ return new Lexer(XQueryTokenizer, Rules); }; -}, -{"./XQueryTokenizer":1,"./lexer":2}]},{},[3]) -(3) - -}); - -define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; -var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; - -var context; -var contextCache = {}; -var initContext = function(editor) { - var id = -1; - if (editor.multiSelect) { - id = editor.selection.index; - if (contextCache.rangeCount != editor.multiSelect.rangeCount) - contextCache = {rangeCount: editor.multiSelect.rangeCount}; - } - if (contextCache[id]) - return context = contextCache[id]; - context = contextCache[id] = { - autoInsertedBrackets: 0, - autoInsertedRow: -1, - autoInsertedLineEnd: "", - maybeInsertedBrackets: 0, - maybeInsertedRow: -1, - maybeInsertedLineStart: "", - maybeInsertedLineEnd: "" - }; -}; - -var CstyleBehaviour = function() { - this.add("braces", "insertion", function(state, action, editor, session, text) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (text == '{') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { - return { - text: '{' + selected + '}', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) { - CstyleBehaviour.recordAutoInsert(editor, session, "}"); - return { - text: '{}', - selection: [1, 1] - }; - } else { - CstyleBehaviour.recordMaybeInsert(editor, session, "{"); - return { - text: '{', - selection: [1, 1] - }; - } - } - } else if (text == '}') { - initContext(editor); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == '}') { - var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } else if (text == "\n" || text == "\r\n") { - initContext(editor); - var closing = ""; - if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { - closing = lang.stringRepeat("}", context.maybeInsertedBrackets); - CstyleBehaviour.clearMaybeInsertedClosing(); - } - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === '}') { - var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); - if (!openBracePos) - return null; - var next_indent = this.$getIndent(session.getLine(openBracePos.row)); - } else if (closing) { - var next_indent = this.$getIndent(line); - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - return; - } - var indent = next_indent + session.getTabString(); - - return { - text: '\n' + indent + '\n' + next_indent + closing, - selection: [1, indent.length, 1, indent.length] - }; - } else { - CstyleBehaviour.clearMaybeInsertedClosing(); - } - }); - - this.add("braces", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '{') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar == '}') { - range.end.column++; - return range; - } else { - context.maybeInsertedBrackets--; - } - } - }); - - this.add("parens", "insertion", function(state, action, editor, session, text) { - if (text == '(') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '(' + selected + ')', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, ")"); - return { - text: '()', - selection: [1, 1] - }; - } - } else if (text == ')') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ')') { - var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("parens", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '(') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ')') { - range.end.column++; - return range; - } - } - }); - - this.add("brackets", "insertion", function(state, action, editor, session, text) { - if (text == '[') { - initContext(editor); - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && editor.getWrapBehavioursEnabled()) { - return { - text: '[' + selected + ']', - selection: false - }; - } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { - CstyleBehaviour.recordAutoInsert(editor, session, "]"); - return { - text: '[]', - selection: [1, 1] - }; - } - } else if (text == ']') { - initContext(editor); - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar == ']') { - var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); - if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { - CstyleBehaviour.popAutoInsertedClosing(); - return { - text: '', - selection: [1, 1] - }; - } - } - } - }); - - this.add("brackets", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected == '[') { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == ']') { - range.end.column++; - return range; - } - } - }); - - this.add("string_dquotes", "insertion", function(state, action, editor, session, text) { - if (text == '"' || text == "'") { - initContext(editor); - var quote = text; - var selection = editor.getSelectionRange(); - var selected = session.doc.getTextRange(selection); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } else { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var leftChar = line.substring(cursor.column-1, cursor.column); - var rightChar = line.substring(cursor.column, cursor.column + 1); - - var token = session.getTokenAt(cursor.row, cursor.column); - var rightToken = session.getTokenAt(cursor.row, cursor.column + 1); - if (leftChar == "\\" && token && /escape/.test(token.type)) - return null; - - var stringBefore = token && /string/.test(token.type); - var stringAfter = !rightToken || /string/.test(rightToken.type); - - var pair; - if (rightChar == quote) { - pair = stringBefore !== stringAfter; - } else { - if (stringBefore && !stringAfter) - return null; // wrap string with different quote - if (stringBefore && stringAfter) - return null; // do not pair quotes inside strings - var wordRe = session.$mode.tokenRe; - wordRe.lastIndex = 0; - var isWordBefore = wordRe.test(leftChar); - wordRe.lastIndex = 0; - var isWordAfter = wordRe.test(leftChar); - if (isWordBefore || isWordAfter) - return null; // before or after alphanumeric - if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) - return null; // there is rightChar and it isn't closing - pair = true; - } - return { - text: pair ? quote + quote : "", - selection: [1,1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - initContext(editor); - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - -}; - - -CstyleBehaviour.isSaneInsertion = function(editor, session) { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { - var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); - if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) - return false; - } - iterator.stepForward(); - return iterator.getCurrentTokenRow() !== cursor.row || - this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); -}; - -CstyleBehaviour.$matchTokenType = function(token, types) { - return types.indexOf(token.type || token) > -1; -}; - -CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0])) - context.autoInsertedBrackets = 0; - context.autoInsertedRow = cursor.row; - context.autoInsertedLineEnd = bracket + line.substr(cursor.column); - context.autoInsertedBrackets++; -}; - -CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - if (!this.isMaybeInsertedClosing(cursor, line)) - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = cursor.row; - context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; - context.maybeInsertedLineEnd = line.substr(cursor.column); - context.maybeInsertedBrackets++; -}; - -CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { - return context.autoInsertedBrackets > 0 && - cursor.row === context.autoInsertedRow && - bracket === context.autoInsertedLineEnd[0] && - line.substr(cursor.column) === context.autoInsertedLineEnd; -}; - -CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { - return context.maybeInsertedBrackets > 0 && - cursor.row === context.maybeInsertedRow && - line.substr(cursor.column) === context.maybeInsertedLineEnd && - line.substr(0, cursor.column) == context.maybeInsertedLineStart; -}; - -CstyleBehaviour.popAutoInsertedClosing = function() { - context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1); - context.autoInsertedBrackets--; -}; - -CstyleBehaviour.clearMaybeInsertedClosing = function() { - if (context) { - context.maybeInsertedBrackets = 0; - context.maybeInsertedRow = -1; - } -}; - - - -oop.inherits(CstyleBehaviour, Behaviour); - -exports.CstyleBehaviour = CstyleBehaviour; -}); - -define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; -var lang = require("../../lib/lang"); - -function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; -} - -var XmlBehaviour = function () { - - this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { - if (text == '"' || text == "'") { - var quote = text; - var selected = session.doc.getTextRange(editor.getSelectionRange()); - if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { - return { - text: quote + selected + quote, - selection: false - }; - } - - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { - return { - text: "", - selection: [1, 1] - }; - } - - if (!token) - token = iterator.stepBackward(); - - if (!token) - return; - - while (is(token, "tag-whitespace") || is(token, "whitespace")) { - token = iterator.stepBackward(); - } - var rightSpace = !rightChar || rightChar.match(/\s/); - if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { - return { - text: quote + quote, - selection: [1, 1] - }; - } - } - }); - - this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.start.column + 1, range.start.column + 2); - if (rightChar == selected) { - range.end.column++; - return range; - } - } - }); - - this.add("autoclosing", "insertion", function (state, action, editor, session, text) { - if (text == '>') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken() || iterator.stepBackward(); - if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) - return; - if (is(token, "reference.attribute-value")) - return; - if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) - return; - } - } - while (!is(token, "tag-name")) { - token = iterator.stepBackward(); - } - - var tokenRow = iterator.getCurrentTokenRow(); - var tokenColumn = iterator.getCurrentTokenColumn(); - if (is(iterator.stepBackward(), "end-tag-open")) - return; - - var element = token.value; - if (tokenRow == position.row) - element = element.substring(0, position.column - tokenColumn); - - if (this.voidElements.hasOwnProperty(element.toLowerCase())) - return; - - return { - text: ">" + "", - selection: [1, 1] - }; - } - }); - - this.add("autoindent", "insertion", function (state, action, editor, session, text) { - if (text == "\n") { - var cursor = editor.getCursorPosition(); - var line = session.getLine(cursor.row); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - - if (token && token.type.indexOf("tag-close") !== -1) { - while (token && token.type.indexOf("tag-name") === -1) { - token = iterator.stepBackward(); - } - - if (!token) { - return; - } - - var tag = token.value; - var row = iterator.getCurrentTokenRow(); - token = iterator.stepBackward(); - if (!token || token.type.indexOf("end-tag") !== -1) { - return; - } - - if (this.voidElements && !this.voidElements[tag]) { - var nextToken = session.getTokenAt(cursor.row, cursor.column+1); - var line = session.getLine(row); - var nextIndent = this.$getIndent(line); - var indent = nextIndent + session.getTabString(); - - if (nextToken && nextToken.value === "') { - var position = editor.getCursorPosition(); - var iterator = new TokenIterator(session, position.row, position.column); - var token = iterator.getCurrentToken(); - var atCursor = false; - var state = JSON.parse(state).pop(); - if ((token && token.value === '>') || state !== "StartTag") return; - if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ - do { - token = iterator.stepBackward(); - } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); - } else { - atCursor = true; - } - var previous = iterator.stepBackward(); - if (!token || !hasType(token, 'meta.tag') || (previous !== null && previous.value.match('/'))) { - return - } - var tag = token.value.substring(1); - if (atCursor){ - var tag = tag.substring(0, position.column - token.start); - } - - return { - text: '>' + '', - selection: [1, 1] - } - } - }); - - } - oop.inherits(XQueryBehaviour, Behaviour); - - exports.XQueryBehaviour = XQueryBehaviour; -}); - -define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/xquery",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/xquery_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor"], function(require, exports, module) { -"use strict"; - -var WorkerClient = require("../worker/worker_client").WorkerClient; -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var XQueryLexer = require("./xquery/xquery_lexer").XQueryLexer; -var Range = require("../range").Range; -var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; -var Anchor = require("../anchor").Anchor; - -var Mode = function() { - this.$tokenizer = new XQueryLexer(); - this.$behaviour = new XQueryBehaviour(); - this.foldingRules = new CStyleFoldMode(); - this.$highlightRules = new TextHighlightRules(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.completer = { - getCompletions: function(editor, session, pos, prefix, callback) { - if (!session.$worker) - return callback(); - session.$worker.emit("complete", { data: { pos: pos, prefix: prefix } }); - session.$worker.on("complete", function(e){ - callback(null, e.data); - }); - } - }; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var match = line.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/); - if (match) - indent += tab; - return indent; - }; - - this.checkOutdent = function(state, line, input) { - if (! /^\s+$/.test(line)) - return false; - - return (/^\s*[\}\)]/).test(input); - }; - - this.autoOutdent = function(state, doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*[\}\)])/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.toggleCommentLines = function(state, doc, startRow, endRow) { - var i, line; - var outdent = true; - var re = /^\s*\(:(.*):\)/; - - for (i=startRow; i<= endRow; i++) { - if (!re.test(doc.getLine(i))) { - outdent = false; - break; - } - } - - var range = new Range(0, 0, 0, 0); - for (i=startRow; i<= endRow; i++) { - line = doc.getLine(i); - range.start.row = i; - range.end.row = i; - range.end.column = line.length; - - doc.replace(range, outdent ? line.match(re)[1] : "(:" + line + ":)"); - } - }; - - this.createWorker = function(session) { - - var worker = new WorkerClient(["ace"], "ace/mode/xquery_worker", "XQueryWorker"); - var that = this; - - worker.attachToDocument(session.getDocument()); - - worker.on("ok", function(e) { - session.clearAnnotations(); - }); - - worker.on("markers", function(e) { - session.clearAnnotations(); - that.addMarkers(e.data, session); - }); - - worker.on("highlight", function(tokens) { - that.$tokenizer.tokens = tokens.data.tokens; - that.$tokenizer.lines = session.getDocument().getAllLines(); - - var rows = Object.keys(that.$tokenizer.tokens); - for(var i=0; i < rows.length; i++) { - var row = parseInt(rows[i]); - delete session.bgTokenizer.lines[row]; - delete session.bgTokenizer.states[row]; - session.bgTokenizer.fireUpdateEvent(row, row); - } - }); - - return worker; - }; - - this.removeMarkers = function(session) { - var markers = session.getMarkers(false); - for (var id in markers) { - if (markers[id].clazz.indexOf('language_highlight_') === 0) { - session.removeMarker(id); - } - } - for (var i = 0; i < session.markerAnchors.length; i++) { - session.markerAnchors[i].detach(); - } - session.markerAnchors = []; - }; - - this.addMarkers = function(annos, mySession) { - var _self = this; - - if (!mySession.markerAnchors) mySession.markerAnchors = []; - this.removeMarkers(mySession); - mySession.languageAnnos = []; - annos.forEach(function(anno) { - var anchor = new Anchor(mySession.getDocument(), anno.pos.sl, anno.pos.sc || 0); - mySession.markerAnchors.push(anchor); - var markerId; - var colDiff = anno.pos.ec - anno.pos.sc; - var rowDiff = anno.pos.el - anno.pos.sl; - var gutterAnno = { - guttertext: anno.message, - type: anno.level || "warning", - text: anno.message - }; - - function updateFloat(single) { - if (markerId) - mySession.removeMarker(markerId); - gutterAnno.row = anchor.row; - if (anno.pos.sc !== undefined && anno.pos.ec !== undefined) { - var range = new Range(anno.pos.sl, anno.pos.sc, anno.pos.el, anno.pos.ec); - markerId = mySession.addMarker(range, "language_highlight_" + (anno.type ? anno.type : "default")); - } - if (single) mySession.setAnnotations(mySession.languageAnnos); - } - updateFloat(); - anchor.on("change", function() { - updateFloat(true); - }); - if (anno.message) mySession.languageAnnos.push(gutterAnno); - }); - mySession.setAnnotations(mySession.languageAnnos); - }; - - this.$id = "ace/mode/xquery"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); +define("ace/mode/xquery/xquery_lexer",["require","exports","module"],function(e,t,n){n.exports=function t(n,a,r){function s(i,c){if(!a[i]){if(!n[i]){var u="function"==typeof e&&e;if(!c&&u)return u(i,!0);if(o)return o(i,!0);throw new Error("Cannot find module '"+i+"'")}var k=a[i]={exports:{}};n[i][0].call(k.exports,function(e){var t=n[i][1][e];return s(t?t:e)},k,k.exports,t,n,a,r)}return a[i].exports}for(var o="function"==typeof e&&e,i=0;iy?y:x),f=v,h=x,p=0):g(v,x,0,p,t)}function u(){h!=v&&(f=h,h=v,w.whitespace(f,h))}function k(e){for(var t;t=m(e),28==t;);return t}function l(e){0==p&&(p=k(e),v=T,x=I)}function b(e){0==p&&(p=m(e),v=T,x=I)}function g(e,t,n,a,r){throw new d.ParseException(e,t,n,a,r)}function m(t){var n=!1;T=I;for(var a=I,r=e.INITIAL[t],s=0,o=4095&r;0!=o;){var i,c=a>4;i=e.MAP1[(15&c)+e.MAP1[(31&u)+e.MAP1[u>>5]]]}else{if(c<56320){var u=a=56320&&u<57344&&(++a,c=((1023&c)<<10)+(1023&u)+65536,n=!0)}for(var k=0,l=5,b=3;;b=l+k>>1){if(e.MAP2[b]>c)l=b-1;else{if(!(e.MAP2[6+b]l){i=0;break}}}s=o;var m=(i<<12)+o-1;o=e.TRANSITION[(15&m)+e.TRANSITION[m>>4]],o>4095&&(r=o,o&=4095,I=a)}if(r>>=12,0==r){I=a-1;var u=I=56320&&u<57344&&--I,g(T,I,s,-1,-1)}if(n)for(var d=r>>9;d>0;--d){--I;var u=I=56320&&u<57344&&--I}else I-=r>>9;return(511&r)-1}a(t,n);var d=this;this.ParseException=function(e,t,n,a,r){var s=e,o=t,i=n,c=a,u=r;this.getBegin=function(){return s},this.getEnd=function(){return o},this.getState=function(){return i},this.getExpected=function(){return u},this.getOffending=function(){return c},this.getMessage=function(){return c<0?"lexical analysis failed":"syntax error"}},this.getInput=function(){return C},this.getOffendingToken=function(t){var n=t.getOffending();return n>=0?e.TOKEN[n]:null},this.getExpectedTokenSet=function(t){var n;return n=t.getExpected()<0?e.getTokenSet(-t.getState()):[e.TOKEN[t.getExpected()]]},this.getErrorMessage=function(e){var t=this.getExpectedTokenSet(e),n=this.getOffendingToken(e),a=C.substring(0,e.getBegin()),r=a.split("\n"),s=r.length,o=r[s-1].length+1,i=e.getEnd()-e.getBegin();return e.getMessage()+(null==n?"":", found "+n)+"\nwhile expecting "+(1==t.length?t[0]:"["+t.join(", ")+"]")+"\n"+(0==i||null!=n?"":"after successfully scanning "+i+" characters beginning ")+"at line "+s+", column "+o+":\n..."+C.substring(e.getBegin(),Math.min(C.length,e.getBegin()+64))+"..."},this.parse_start=function(){switch(w.startNonterminal("start",h),l(14),p){case 55:c(55);break;case 54:c(54);break;case 56:c(56);break;case 40:c(40);break;case 42:c(42);break;case 41:c(41);break;case 35:c(35);break;case 38:c(38);break;case 274:c(274);break;case 271:c(271);break;case 39:c(39);break;case 43:c(43);break;case 49:c(49);break;case 62:c(62);break;case 63:c(63);break;case 46:c(46);break;case 48:c(48);break;case 53:c(53);break;case 51:c(51);break;case 34:c(34);break;case 273:c(273);break;case 2:c(2);break;case 1:c(1);break;case 3:c(3);break;case 12:c(12);break;case 13:c(13);break;case 15:c(15);break;case 16:c(16);break;case 17:c(17);break;case 5:c(5);break;case 6:c(6);break;case 4:c(4);break;case 33:c(33);break;default:s()}w.endNonterminal("start",h)},this.parse_StartTag=function(){switch(w.startNonterminal("StartTag",h),l(8),p){case 58:c(58);break;case 50:c(50);break;case 27:c(27);break;case 57:c(57);break;case 35:c(35);break;case 38:c(38);break;default:c(33)}w.endNonterminal("StartTag",h)},this.parse_TagContent=function(){switch(w.startNonterminal("TagContent",h),b(11),p){case 23:c(23);break;case 6:c(6);break;case 7:c(7);break;case 55:c(55);break;case 54:c(54);break;case 18:c(18);break;case 29:c(29);break;case 272:c(272);break;case 275:c(275);break;case 271:c(271);break;default:c(33)}w.endNonterminal("TagContent",h)},this.parse_AposAttr=function(){switch(w.startNonterminal("AposAttr",h),b(10),p){case 20:c(20);break;case 25:c(25);break;case 18:c(18);break;case 29:c(29);break;case 272:c(272);break;case 275:c(275);break;case 271:c(271);break;case 38:c(38);break;default:c(33)}w.endNonterminal("AposAttr",h)},this.parse_QuotAttr=function(){switch(w.startNonterminal("QuotAttr",h),b(9),p){case 19:c(19);break;case 24:c(24);break;case 18:c(18);break;case 29:c(29);break;case 272:c(272);break;case 275:c(275);break;case 271:c(271);break;case 35:c(35);break;default:c(33)}w.endNonterminal("QuotAttr",h)},this.parse_CData=function(){switch(w.startNonterminal("CData",h),b(1),p){case 11:c(11);break;case 64:c(64);break;default:c(33)}w.endNonterminal("CData",h)},this.parse_XMLComment=function(){switch(w.startNonterminal("XMLComment",h),b(0),p){case 9:c(9);break;case 47:c(47);break;default:c(33)}w.endNonterminal("XMLComment",h)},this.parse_PI=function(){switch(w.startNonterminal("PI",h),b(3),p){case 10:c(10);break;case 59:c(59);break;case 60:c(60);break;default:c(33)}w.endNonterminal("PI",h)},this.parse_Pragma=function(){switch(w.startNonterminal("Pragma",h),b(2),p){case 8:c(8);break;case 36:c(36);break;case 37:c(37);break;default:c(33)}w.endNonterminal("Pragma",h)},this.parse_Comment=function(){switch(w.startNonterminal("Comment",h),b(4),p){case 52:c(52);break;case 41:c(41);break;case 30:c(30);break;default:c(33)}w.endNonterminal("Comment",h)},this.parse_CommentDoc=function(){switch(w.startNonterminal("CommentDoc",h),b(5),p){case 31:c(31);break;case 32:c(32);break;case 52:c(52);break;case 41:c(41);break;default:c(33)}w.endNonterminal("CommentDoc",h)},this.parse_QuotString=function(){switch(w.startNonterminal("QuotString",h),b(6),p){case 18:c(18);break;case 29:c(29);break;case 19:c(19);break;case 21:c(21);break;case 35:c(35);break;default:c(33)}w.endNonterminal("QuotString",h)},this.parse_AposString=function(){switch(w.startNonterminal("AposString",h),b(7),p){case 18:c(18);break;case 29:c(29);break;case 20:c(20);break;case 22:c(22);break;case 38:c(38);break;default:c(33)}w.endNonterminal("AposString",h)},this.parse_Prefix=function(){w.startNonterminal("Prefix",h),l(13),u(),i(),w.endNonterminal("Prefix",h)},this.parse__EQName=function(){w.startNonterminal("_EQName",h),l(12),u(),s(),w.endNonterminal("_EQName",h)};var f,h,p,v,x,w,C,y,T,I};a.getTokenSet=function(e){for(var t=[],n=e<0?-e:4095&INITIAL[e],r=0;r<276;r+=32)for(var s=r,o=2062*(r>>5)+n-1,i=o>>2,c=i>>2,u=a.EXPECTED[(3&o)+a.EXPECTED[(3&i)+a.EXPECTED[(3&c)+a.EXPECTED[c>>2]]]];0!=u;u>>>=1,++s)0!=(1&u)&&t.push(a.TOKEN[s]);return t},a.MAP0=[66,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,18,18,18,18,18,18,18,18,18,19,20,21,22,23,24,25,26,27,28,29,30,27,31,31,31,31,31,31,31,31,31,31,32,31,31,33,31,31,31,31,31,31,34,35,36,35,31,35,37,38,39,40,41,42,43,44,45,31,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,31,61,62,63,64,35],a.MAP1=[108,124,214,214,214,214,214,214,214,214,214,214,214,214,214,214,156,181,181,181,181,181,214,215,213,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,247,261,277,293,309,347,363,379,416,416,416,408,331,323,331,323,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,433,433,433,433,433,433,433,316,331,331,331,331,331,331,331,331,394,416,416,417,415,416,416,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,416,330,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,331,416,66,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,18,18,18,18,18,18,18,18,18,19,20,21,22,23,24,25,26,27,28,29,30,27,31,31,31,31,31,31,31,31,31,31,31,31,31,31,35,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,32,31,31,33,31,31,31,31,31,31,34,35,36,35,31,35,37,38,39,40,41,42,43,44,45,31,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,31,61,62,63,64,35,35,35,35,35,35,35,35,35,35,35,35,31,31,35,35,35,35,35,35,35,65,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65,65],a.MAP2=[57344,63744,64976,65008,65536,983040,63743,64975,65007,65533,983039,1114111,35,31,35,31,31,35],a.INITIAL=[1,2,36867,45060,5,6,7,8,9,10,11,12,13,14,15],a.TRANSITION=[17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22908,18836,17152,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,17365,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,17470,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,18157,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,17848,17880,18731,17918,36551,17292,17934,17979,18727,18023,36545,18621,18039,18056,18072,18117,18143,18173,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17687,18805,18421,18437,18101,17393,18489,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,18579,21711,17152,19008,19233,20367,19008,28684,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,17365,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,17470,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,18157,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,17848,17880,18731,17918,36551,17292,17934,17979,18727,18023,36545,18621,18039,18056,18072,18117,18143,18173,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17687,18805,18421,18437,18101,17393,18489,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,20116,18836,18637,19008,19233,21267,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,18763,18778,18794,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,18821,22923,18906,19008,19233,17431,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18937,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,19054,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,18953,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21843,18836,18987,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21696,18836,18987,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22429,20131,18720,19008,19233,20367,19008,17173,23559,36437,17330,17349,18921,17189,17208,17281,20355,18087,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,21242,19111,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,19024,18836,18609,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,19081,22444,18987,19008,19233,20367,19008,19065,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21992,22007,18987,19008,19233,20367,19008,18690,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22414,18836,18987,19008,19233,30651,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,19138,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,19280,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,19172,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21783,18836,18987,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,19218,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21651,18836,18987,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,19249,19265,19307,18888,27857,30536,24401,31444,23357,18888,19351,18888,18890,27211,19370,27211,27211,19392,24401,31911,24401,24401,25467,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,28537,19440,24401,24401,24401,24401,24036,17994,24060,18888,18888,18888,18890,19468,27211,27211,27211,27211,19484,35367,19520,24401,24401,24401,19628,18888,29855,18888,18888,23086,27211,19538,27211,27211,30756,24012,24401,19560,24401,24401,26750,18888,18888,19327,27855,27211,27211,19580,17590,24017,24401,24401,19600,25665,18888,18888,28518,27211,27212,24016,19620,19868,28435,25722,18889,19644,27211,32888,35852,19868,31018,19694,19376,19717,22215,19735,22098,19751,35203,19776,19797,19817,19840,25783,31738,24135,19701,19856,31015,23516,31008,28311,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21768,18836,19307,18888,27857,27904,24401,29183,28015,18888,18888,18888,18890,27211,27211,27211,27211,19888,24401,24401,24401,24401,22953,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,28537,19440,24401,24401,24401,24401,24036,18881,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,24012,24401,24401,24401,24401,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22399,18836,19918,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21666,18836,19307,18888,27857,27525,24401,29183,21467,18888,18888,18888,18890,27211,27211,27211,27211,19946,24401,24401,24401,24401,32382,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,28537,19998,24401,24401,24401,24401,31500,18467,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,20021,24401,24401,24401,24401,24401,34271,18888,18888,18888,18888,23086,27211,27211,27211,27211,32926,29908,24401,24401,24401,24401,26095,18888,18888,18888,27855,27211,27211,27211,20050,22968,24401,24401,24401,18887,18888,18888,27211,27211,35779,20080,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,20101,19039,20191,20412,20903,17569,20309,20872,25633,20623,20505,20218,20242,17189,17208,17281,20355,20265,20306,20328,20383,22490,20796,20619,21354,20654,20410,20956,21232,20765,17421,20535,17192,18127,22459,20312,25531,22470,20309,20428,18964,20466,20491,21342,21070,20521,20682,17714,18326,17543,17559,17585,22497,20559,19504,20279,20575,20290,20475,20604,20639,20226,20670,17661,21190,17703,21176,17730,19494,20698,20711,22480,21046,21116,18971,21130,20727,20755,17675,17753,17832,17590,25518,20394,20781,20831,20202,20847,21401,17292,17934,17979,18549,20863,20588,25542,20888,20919,18072,18117,20935,20972,21032,21062,21086,18239,21102,18563,21146,21162,21206,18351,20949,20902,18340,21222,21258,21283,18360,20249,17405,21295,21311,21327,20739,20343,21370,21386,21417,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21977,18836,18987,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,21452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,21504,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,36501,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,28674,21946,17617,36473,18223,17237,17477,19152,17860,17892,17675,17753,17832,21575,21534,17481,19156,17864,18731,17918,36551,17292,17934,21560,30628,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21798,18836,21612,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21636,18836,18987,19008,19233,17902,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21753,19096,21903,19008,19233,20367,19008,19291,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,17379,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,21931,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,18280,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21962,18594,18987,19008,19233,22043,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21681,21858,18987,19008,19233,20367,19008,21544,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,18888,27857,34097,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,30613,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,31500,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,32319,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,21431,24401,24401,24401,24401,26095,18888,18888,18888,27855,27211,27211,27211,22187,22968,24401,24401,24401,22231,18888,18888,27211,27211,35779,20080,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,18888,27857,34097,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,30613,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,31500,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,31181,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,21431,24401,24401,24401,24401,26095,18888,18888,18888,27855,27211,27211,27211,22187,22968,24401,24401,24401,18887,18888,18888,27211,27211,35779,20080,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,18888,27857,34097,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,31678,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,31500,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,31181,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,21431,24401,24401,24401,24401,26095,18888,18888,18888,27855,27211,27211,27211,22187,22968,24401,24401,24401,18887,18888,18888,27211,27211,35779,20080,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,18888,27857,34097,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,30613,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,33588,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,31181,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,21431,24401,24401,24401,24401,26095,18888,18888,18888,27855,27211,27211,27211,22187,22968,24401,24401,24401,18887,18888,18888,27211,27211,35779,20080,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,18888,27857,35019,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22248,24401,24401,24401,24401,30613,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,31500,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,31181,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,21431,24401,24401,24401,24401,26095,18888,18888,18888,27855,27211,27211,27211,22187,22968,24401,24401,24401,18887,18888,18888,27211,27211,35779,20080,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,18888,27857,34097,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,18866,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,24036,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,24012,24401,24401,24401,24401,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22324,18836,22059,18888,27857,30501,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,18866,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,24036,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,24012,24401,24401,24401,24401,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,18888,27857,34097,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,18866,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,24036,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,24012,24401,24401,24401,24401,34365,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22354,18836,18987,19008,19233,20367,19008,17173,27086,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,19930,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21828,18836,18987,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22309,22513,18987,19008,19233,20367,19008,19122,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,22544,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22608,18836,22988,23004,27585,23020,23036,23067,22087,18888,18888,18888,23083,27211,27211,27211,23102,22121,24401,24401,24401,23122,31386,26154,19674,18888,28119,28232,19424,23705,27211,27211,23142,23173,23189,23212,24401,24401,23246,34427,31693,23262,18888,23290,23308,27783,27620,23327,35263,35107,33383,23346,18193,23393,32748,23968,24401,23414,35153,23463,18888,33913,23442,23482,27211,27211,23532,23552,21431,23575,24401,24401,23604,26095,23635,23657,18888,33482,23685,33251,27211,22187,18851,23721,35536,24401,18887,23750,32641,27211,23769,23787,20080,33012,24384,25659,18888,18889,27211,27211,19719,23889,23803,31018,18890,27211,31833,19406,19447,23086,23330,19828,28224,31826,23823,26917,34978,23850,26493,25782,23878,23914,23516,31008,22105,19419,27963,19659,29781,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22623,18836,22059,18888,27857,34097,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,30613,18888,18888,18888,18888,28909,25783,27211,27211,27211,34048,23933,22164,24401,24401,24401,28409,23949,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,31181,26583,18888,18888,18888,35585,23984,27211,27211,27211,24005,22201,24033,24401,24401,24401,24052,18888,18888,18888,27855,27211,27211,27211,22187,22968,24401,24401,24401,18887,18888,18888,27211,27211,35779,20080,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,26496,24076,24126,24151,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22638,18836,22059,19678,27857,24185,24401,24201,24217,26592,18888,18888,18890,24252,24268,27211,27211,22121,24287,24303,24401,24401,30613,19781,35432,36007,32649,18888,25783,24322,28966,23771,27211,35072,22164,24358,32106,26829,24400,31500,31693,18888,18888,18888,24801,18890,27211,27211,27211,27211,24418,19484,24401,24401,24401,24401,20167,31181,18888,18888,18888,27833,23086,27211,27211,33540,27211,30756,21431,24401,24401,22972,24401,26095,18888,36131,18888,27855,27211,24440,27211,22187,22968,24401,24459,24401,31699,28454,18888,34528,34570,35779,24478,24402,24494,25659,18888,36228,27211,27211,24515,30981,23734,31018,18890,27211,31833,19406,19447,23086,23330,24538,31017,27856,31741,30059,23377,24563,19837,25782,19760,31015,23516,25374,22105,19419,29793,24579,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22653,18836,22059,25756,19982,34097,23196,29183,24614,24110,23641,24673,26103,24697,24443,24713,28558,22121,24748,24462,24764,23398,30613,18888,18888,18888,18888,24798,25783,27211,27211,27211,34232,35072,22164,24401,24401,24401,33302,31500,22559,24106,24232,18888,18888,34970,24817,30411,27211,27211,32484,19484,29750,35127,24401,24401,19872,31181,24852,18888,18888,24871,29221,27211,27211,32072,27211,30756,34441,24401,24401,31571,24401,26095,33141,27802,27011,27855,25295,25607,24888,22187,22968,19195,34593,24906,18887,18888,18888,27211,27211,35779,20080,24402,19868,25659,18888,33663,27211,27211,24924,24947,23588,31018,18890,27211,31833,22135,19447,23086,23330,19828,30904,31042,24972,19840,25e3,31738,30898,25782,19760,31015,23516,31008,22105,19419,25016,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22668,18836,25041,25057,31320,25073,25089,25105,22087,34796,24236,36138,34870,34125,25121,23106,35497,22248,36613,25137,30671,27365,30613,25153,26447,25199,25233,22574,23274,25249,25265,25281,25318,25344,25360,25400,25428,25452,26731,25504,31693,23669,25558,27407,25575,28599,25934,25599,27211,28180,27304,25623,25839,25649,24401,34820,25681,25698,22586,27775,30190,25745,25778,25799,25817,28995,33569,30756,21518,33443,25837,25855,25893,26095,31254,26677,30136,27855,25930,25950,27211,22187,22968,25966,25986,24401,23428,27763,36330,26959,26002,26029,26045,26085,26119,26170,26203,26222,26239,30527,26372,26274,28404,31018,33757,27211,34262,26316,36729,26345,26366,35337,31017,26388,26407,30954,26350,33861,26434,26463,26479,26512,23516,33189,26531,26547,27963,31293,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22683,18836,26568,26181,26608,34097,26643,29183,22087,26669,18888,18888,18890,26693,27211,27211,27211,22121,26720,24401,24401,24401,30613,18888,18888,18888,18888,26774,25783,27211,27211,27211,26619,35072,22164,24401,24401,24401,21596,31500,31693,18888,18888,33978,18888,18890,27211,27211,25801,27211,27211,19484,24401,24401,24401,26792,24401,31181,18888,18888,18888,35464,23086,27211,27211,27211,26809,30756,21431,24401,24401,24401,26828,26095,18888,18888,18888,27855,27211,27211,27211,22187,22968,24401,24401,24401,18887,18888,18888,27211,27211,35779,20080,24402,19868,25659,31948,18889,35707,27211,19719,26845,19868,31018,18890,27211,31833,19406,19447,23086,23330,26905,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,24984,31088,19419,26945,27651,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22698,18836,26999,18888,27857,34097,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,23051,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,27033,24401,24401,24401,24401,24036,31693,18888,18888,27056,18888,18890,27211,27211,30320,27211,27211,27075,24401,24401,29032,24401,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,24012,24401,24401,24401,24401,26750,18888,18888,33986,27855,27211,27211,27102,17590,24017,24401,24401,27123,27144,36254,27162,27210,27228,28500,18187,34842,33426,27244,35980,27277,27302,27320,36048,34013,20999,31882,21478,27895,27356,30287,27381,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,26329,30087,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,27406,27423,27445,35294,27461,22087,18888,18888,30140,18890,27211,27211,27989,27211,22121,24401,24401,25682,24401,18866,18888,18888,18888,18888,18888,34042,27211,27211,27211,27211,29700,22164,24401,24401,24401,24401,27128,31693,27477,18888,18888,18888,18890,27194,27211,27211,27211,27211,19484,35299,24401,24401,24401,24401,19628,18888,18888,18888,27059,23086,27211,27211,27211,33366,30756,24012,24401,24401,24401,35044,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,20815,27211,30818,19960,33969,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22713,18836,22059,27496,27516,27541,35231,27557,22087,29662,26292,23292,27573,24836,27601,27211,27636,22121,35544,27686,24401,27721,18866,18888,27799,18888,27818,22071,27853,32260,27211,26013,27873,27920,22164,29419,24401,29946,33413,26742,27751,26881,18888,18888,27261,36776,27936,27211,27211,27211,27988,28005,28031,28052,24401,24401,28069,28088,28135,25488,28152,26069,28167,27211,28340,24657,28196,30756,31523,24401,28212,34176,36174,24956,28248,28266,28290,21488,33077,28327,28356,17590,20986,23126,28391,28425,28102,28451,28470,28490,28516,28534,20034,33728,25868,25659,18888,18889,27211,27211,19719,23889,19868,30241,28274,28553,28574,19406,28590,23086,23330,19828,19452,28615,28660,26147,25783,31738,19837,25782,19760,29613,35958,29276,22105,19419,27963,23157,28700,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,18888,27857,34097,24401,29183,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,18866,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,24036,22528,18888,18888,18888,18888,18890,27333,27211,27211,27211,27211,19484,30853,24401,24401,24401,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,24012,24401,24401,24401,24401,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22728,18836,28747,28782,28817,28841,28857,28880,28896,24161,28943,32011,36261,27340,28961,29492,28982,29011,24522,29027,25436,29048,23051,27500,29090,29110,30713,18888,23512,29130,25183,27211,29155,28927,27033,29173,23230,24401,29199,35373,31693,18888,18888,25583,32629,29218,27211,27211,31461,30692,29237,27075,24401,24401,24401,29262,29302,19628,18888,34329,18888,18888,23086,27211,29329,27211,27211,30756,24012,35933,24401,24401,24401,27705,31612,18888,18888,29346,29374,27211,35650,17590,21436,29393,24401,25970,18887,33895,18888,27211,32528,27212,24016,32769,19868,25659,18888,26889,27211,27211,29412,23889,24371,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31768,19840,25783,31738,19837,29435,29508,31102,29550,29606,22105,30300,29462,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22743,18836,22059,29629,29473,34097,33285,29183,29651,27254,18888,29678,33329,32535,27211,29694,29716,22121,19202,24401,32742,29741,18866,26776,33921,28474,18888,18888,25783,29766,27211,29809,27211,35072,22164,35825,24401,29828,24401,24036,36769,25217,18888,18888,29848,18890,27211,29871,27211,26258,27211,29894,24401,29929,24401,36587,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,29725,29962,24401,24401,24401,24401,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18473,18888,18888,19584,27211,27212,24016,29982,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19902,19447,32052,19544,19828,29998,30097,30031,19840,25783,30047,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,30075,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22758,18836,30121,30156,30206,30257,30273,30336,22087,35624,32837,25762,18890,29878,34934,26812,27211,22121,24931,23223,29202,24401,18866,34373,30352,18888,18888,18888,23447,24828,27211,27211,27211,35072,30370,35052,24401,24401,24401,24036,29523,18888,18888,27146,18888,31308,30386,27211,27211,30405,30558,19484,30427,24401,24401,29938,35686,19628,28766,30447,34506,35614,23086,28731,30482,30517,30552,30756,24012,20156,30574,30598,30667,26283,33464,28945,27670,30687,32915,33504,25328,17590,23963,20450,33837,21016,32397,26300,30708,30729,27885,30748,21588,36373,30779,26653,24628,33220,32514,30806,31835,25412,25906,26515,18890,28825,31833,26133,19447,28304,31730,23834,26057,30869,30885,32181,30920,30942,32797,25782,30970,31015,23516,31008,30997,31034,27963,19659,29450,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22773,18836,31058,31074,32463,31125,31141,31197,22087,18888,29534,35471,36738,27211,24342,31213,24424,22121,24401,20175,31229,31917,27736,31245,34334,27175,18888,29094,27286,27211,31278,31336,27211,31355,31371,24401,31402,31418,24401,31437,31693,18888,31619,32841,18888,18890,27211,27211,31460,31477,27211,19484,24401,24401,31497,36581,24401,33020,18888,18888,18888,18888,30007,27211,27211,27211,27211,31516,32310,24401,24401,24401,24401,31539,18888,28762,18888,24651,35740,27211,27211,28644,31565,35796,24401,24401,19318,32188,18888,24334,28366,27212,29966,29832,19868,25659,18888,18889,27211,27211,19719,31587,19868,31635,32435,33693,30105,31663,20005,31715,31757,31784,31812,30015,31851,31878,25783,31898,19837,25782,19760,31015,23516,31008,22105,19419,27963,31933,30221,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22788,18836,22059,25729,30466,31968,24306,31984,32e3,32807,35160,27017,29590,34941,19801,29377,33700,22121,27040,30431,29396,28864,29565,18888,18888,18888,32027,18888,25783,27211,27211,23698,27211,35072,22164,24401,24401,30845,24401,24036,32045,18888,26929,18888,18888,18890,27211,31481,32068,27211,27211,32088,24401,33058,32122,24401,24401,33736,18888,18888,33162,18888,23086,27211,27211,29484,27211,28375,32144,24401,24401,33831,24401,26750,18888,18888,18888,27855,27211,27211,27211,36704,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,33107,22171,33224,24271,32169,31017,27856,31741,19840,25783,31738,30234,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,32204,32232,32252,32677,33295,29074,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,23619,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,32276,24401,24401,24401,24401,24036,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,32299,24401,24401,24401,24401,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,24012,24401,24401,24401,24401,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,33886,18889,36065,27211,19719,35326,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22803,18836,32335,31647,34666,32351,32367,32417,22087,18888,32433,19335,32451,27211,32479,27107,32500,22121,24401,32551,20085,32572,18866,22287,23753,18888,18888,32602,32665,27211,32693,27211,26972,32713,32729,24401,32764,24401,25877,32785,34768,18888,27390,32823,24594,24855,32857,24890,32878,32904,27211,32942,32977,24401,33e3,29313,24401,30790,26206,27666,33904,18888,23086,36353,27211,33036,27211,30756,24012,32153,24401,33056,24401,35861,18888,18888,30354,27972,27211,27211,33800,17590,20145,24401,24401,34638,20811,18888,18888,33074,27211,27212,36167,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,34616,24169,33093,33123,33157,27856,31741,23862,26552,34302,19837,25782,19760,31015,23516,31008,33178,19973,27963,23497,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22818,18836,33205,28113,33240,34097,33275,29183,22087,33318,35438,18888,18890,33345,26391,33382,27211,22121,33399,28072,33442,24401,18866,22232,18888,33459,18888,18888,33480,33498,25175,27211,27211,26704,22164,24775,35239,24401,24401,25914,29580,18888,18888,31109,25211,33520,33539,27211,27211,33556,36284,19484,33585,24401,24401,33604,32556,19628,18888,18888,31262,33658,23086,27211,27211,33679,27211,30756,24012,24401,24401,33716,24401,26854,27480,18888,33752,27855,33259,34701,27211,17590,32102,24782,23807,24401,18887,18888,18888,27211,27211,27212,33773,36105,19868,25659,18888,23368,27211,29157,19719,23889,34454,29286,18890,33794,25302,33816,19447,34079,33853,31862,31017,27856,31741,33877,28920,33937,19837,30461,34002,22276,36041,34029,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22833,18836,34064,32616,34113,34141,34157,34192,34208,32216,36013,31549,31952,34224,34248,34287,29330,34350,34389,34413,34481,26793,18866,26187,29635,22293,18888,36654,25783,34522,34544,34566,25821,35072,22164,34586,34609,34632,19604,24036,36644,36674,24681,18888,32401,34654,31339,34682,34698,27211,34717,34753,28053,34812,34836,24401,33619,19628,34858,32236,34906,24598,33523,27612,34890,34922,24732,29246,36717,33634,34465,32984,34168,26750,34957,18888,18888,34994,35010,27211,33040,17590,29913,35035,24401,36304,25482,30171,35883,35068,35088,26627,20441,31173,35123,35143,35176,24640,30492,29358,19719,35192,35219,25384,28801,35255,35279,32586,34496,23086,23330,29061,31017,27856,31741,19840,25783,31738,24547,25164,35315,31796,35353,34316,22105,19419,27963,24091,28630,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22848,18836,22059,34782,34088,35389,21008,35405,35421,35454,18888,18888,23466,35487,27211,27211,27211,35513,31154,24401,24401,24401,35560,18888,26863,36664,35601,24872,25783,30389,23536,26250,35647,35666,22164,19522,19564,30582,35682,27697,35575,29114,18888,18888,18888,18890,27211,35702,27211,27211,27211,35723,24401,35527,24401,24401,24401,19628,30184,18888,18888,18888,23086,35739,27211,27211,27211,29139,22938,24401,24401,24401,24401,23898,35756,18888,18888,25025,35778,27211,27211,17590,20064,35795,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,23917,18890,34550,31833,22262,19447,23086,23330,26418,31017,27856,31741,19840,25783,35812,19837,27187,35841,33135,23516,31008,22105,22148,28712,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22863,18836,22059,35877,28723,34097,31164,29183,22087,26758,18888,22592,18890,23989,27211,29812,27211,22121,33778,24401,31421,24401,18866,18888,18888,26872,18888,18888,25783,27211,30732,27211,27211,35072,22164,24401,24908,24401,24401,24036,31693,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,24012,24401,24401,24401,24401,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22878,18836,22059,27837,27857,35899,24401,35915,22087,18888,18888,18888,18890,27211,27211,27211,27211,22121,24401,24401,24401,24401,18866,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,24036,31602,18888,18888,18888,18888,26223,27211,27211,27211,27211,27211,19484,35931,24401,24401,24401,24401,19628,18888,28136,18888,18888,35949,27211,32862,27211,32697,30756,24012,24401,32283,24401,32128,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22893,18836,22059,35974,34882,34097,33960,29183,35996,18888,23311,18888,36029,27211,27211,36064,36081,22121,24401,24401,36104,33950,18866,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,35072,22164,24401,24401,24401,24401,24036,36121,18888,25559,18888,18888,18890,27211,27211,30313,27211,27211,36154,24401,24401,34397,24401,24401,19628,28250,18888,18888,18888,23086,30926,27211,27211,27211,26983,24012,33642,24401,24401,24401,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22339,18836,22059,19354,27857,36190,24401,36206,22087,18888,18888,18888,18007,27211,27211,27211,24724,22121,24401,24401,24401,30827,18866,18888,36222,18888,28795,18888,25783,35100,27211,27429,27211,35072,22164,30836,24401,24499,24401,24036,31693,18888,36244,18888,18888,18890,27211,36088,27211,27211,27211,19484,24401,28036,24401,24401,24401,19628,18888,18888,35631,18888,35762,27211,27211,36277,27211,34730,24012,24401,24401,36300,24401,36320,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,25712,18888,18888,36346,27211,27212,19184,24402,19868,25659,32029,18889,27211,33359,19719,23889,36369,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22384,18836,36389,19008,19233,20367,36434,17173,17595,36437,17330,17349,18921,17189,17208,17281,20355,36453,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,20362,21726,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,22369,18836,18987,19008,19233,20367,19008,21737,30763,36437,17330,17349,18921,17189,17208,17281,20355,17949,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21813,18836,36489,19008,19233,20367,19008,17173,17737,36437,17330,17349,18921,17189,17208,17281,20355,17768,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,20543,22022,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21828,18836,18987,19008,19233,20367,19008,17173,30763,36437,17330,17349,18921,17189,17208,17281,20355,36517,17308,17327,17346,18918,18452,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,18127,21873,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,21828,18836,19307,18888,27857,30756,24401,29183,28015,18888,18888,18888,18890,27211,27211,27211,27211,36567,24401,24401,24401,24401,22953,18888,18888,18888,18888,18888,25783,27211,27211,27211,27211,28537,36603,24401,24401,24401,24401,24036,18881,18888,18888,18888,18888,18890,27211,27211,27211,27211,27211,19484,24401,24401,24401,24401,24401,19628,18888,18888,18888,18888,23086,27211,27211,27211,27211,30756,24012,24401,24401,24401,24401,26750,18888,18888,18888,27855,27211,27211,27211,17590,24017,24401,24401,24401,18887,18888,18888,27211,27211,27212,24016,24402,19868,25659,18888,18889,27211,27211,19719,23889,19868,31018,18890,27211,31833,19406,19447,23086,23330,19828,31017,27856,31741,19840,25783,31738,19837,25782,19760,31015,23516,31008,22105,19419,27963,19659,27951,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,36629,36690,18720,19008,19233,20367,19008,17454,17595,36437,17330,17349,18921,17189,17208,17281,20355,17223,17308,17327,17346,18918,36754,21880,18649,18665,19006,17265,22033,20765,17421,20535,17192,20362,21726,17311,18658,18999,19008,17447,32952,17497,17520,17251,36411,17782,20682,17714,18326,17543,17559,17585,21887,17504,17527,17258,36418,21915,21940,17611,36467,18217,17633,17661,21190,17703,21176,17730,34737,21946,17617,36473,18223,36531,17477,19152,17860,17892,17675,17753,17832,17590,21620,17481,19156,17864,18731,17918,36551,17292,17934,17979,18727,18681,18405,18621,18039,18056,18072,18117,18143,18706,18052,18209,18250,18239,18266,17963,18296,18312,18376,17807,36403,19232,17796,17163,30642,18392,17816,32961,17645,18805,18421,18437,18519,17393,18747,18505,18535,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,17590,0,94242,0,118820,0,2211840,102439,0,0,106538,98347,0,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2482176,2158592,2158592,2158592,2158592,2158592,2158592,0,40976,0,18,18,24,24,27,27,27,2207744,2404352,2412544,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,3104768,2605056,2207744,2207744,2207744,2207744,2207744,2207744,2678784,2207744,2695168,2207744,2703360,2207744,2711552,2752512,2207744,0,0,0,0,0,0,2166784,0,0,0,0,0,0,2158592,2158592,3170304,3174400,2158592,0,139,0,2158592,2158592,2158592,2158592,2158592,2424832,2158592,2158592,2158592,2748416,2756608,2777088,2801664,2158592,2158592,2158592,2863104,2891776,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,3104768,2158592,2158592,2158592,2158592,2158592,2158592,2207744,2785280,2207744,2809856,2207744,2207744,2842624,2207744,2207744,2207744,2899968,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2473984,2207744,2207744,2494464,2207744,2207744,2207744,2523136,2158592,2404352,2412544,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2564096,2158592,2158592,2605056,2158592,2158592,2158592,2158592,2158592,2158592,2678784,2158592,2695168,2158592,2703360,2158592,2711552,2752512,2158592,2158592,2785280,2158592,2158592,2785280,2158592,2809856,2158592,2158592,2842624,2158592,2158592,2158592,2899968,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,18,0,0,0,0,0,0,0,2211840,0,0,641,0,2158592,0,0,0,0,0,0,0,0,2211840,0,0,32768,0,2158592,0,2158592,2158592,2158592,2383872,2158592,2158592,2158592,2158592,3006464,2383872,2207744,2207744,2207744,2207744,2158877,2158877,2158877,2158877,0,0,0,2158877,2572573,2158877,2158877,0,2207744,2207744,2596864,2207744,2207744,2207744,2207744,2207744,2207744,2641920,2207744,2207744,2207744,2207744,2207744,2207744,2207744,0,0,0,167936,0,0,2162688,0,0,3104768,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,0,0,0,2146304,2146304,2224128,2224128,2232320,2232320,2232320,641,0,0,0,0,0,0,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2531328,2158592,2158592,2158592,2158592,2158592,2617344,2158592,2158592,2158592,2158592,2441216,2445312,2158592,2158592,2158592,2158592,2158592,2158592,2502656,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2580480,2158592,2158592,2158592,2158592,2621440,2158592,2580480,2158592,2158592,2158592,2158592,2621440,2158592,2158592,2158592,2158592,2158592,2158592,2699264,2158592,2158592,2158592,2158592,2158592,2748416,2756608,2777088,2801664,2207744,2863104,2891776,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,3018752,2207744,3043328,2207744,2207744,2207744,2207744,3080192,2207744,2207744,3112960,2207744,2207744,2207744,2207744,2207744,2207744,2207744,0,0,0,172310,279,0,2162688,0,0,2207744,2207744,2207744,3186688,2207744,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2158592,2158592,2158592,2404352,2412544,2158592,2510848,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2584576,2158592,2609152,2158592,2158592,2629632,2158592,2158592,2158592,2686976,2158592,2715648,2158592,2158592,3121152,2158592,2158592,2158592,3149824,2158592,2158592,3170304,3174400,2158592,2367488,2207744,2207744,2207744,2207744,2158592,2158592,2158592,2158592,0,0,0,2158592,2572288,2158592,2158592,0,2207744,2207744,2207744,2433024,2207744,2453504,2461696,2207744,2207744,2207744,2207744,2207744,2207744,2510848,2207744,2207744,2207744,2207744,2207744,2531328,2207744,2207744,2207744,2207744,2207744,2617344,2207744,2207744,2207744,2207744,2158592,2158592,2158592,2158592,0,0,0,2158592,2572288,2158592,2158592,1508,2715648,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2867200,2207744,2904064,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2580480,2207744,2207744,2207744,2207744,2621440,2207744,2207744,2207744,3149824,2207744,2207744,3170304,3174400,2207744,0,0,0,0,0,0,0,0,0,0,138,2158592,2158592,2158592,2404352,2412544,2707456,2732032,2207744,2207744,2207744,2822144,2826240,2207744,2895872,2207744,2207744,2924544,2207744,2207744,2973696,2207744,0,0,0,0,0,0,2166784,0,0,0,0,0,285,2158592,2158592,3112960,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,3186688,2158592,2207744,2207744,2158592,2158592,2158592,2158592,2158592,0,0,0,2158592,2158592,2158592,2158592,0,0,2535424,2543616,2158592,2158592,2158592,0,0,0,2158592,2158592,2158592,2990080,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2572288,2981888,2207744,2207744,3002368,2207744,3047424,3063808,3076096,2207744,2207744,2207744,2207744,2207744,2207744,2207744,3203072,2708960,2732032,2158592,2158592,2158592,2822144,2827748,2158592,2895872,2158592,2158592,2924544,2158592,2158592,2973696,2158592,2981888,2158592,2158592,3002368,2158592,3047424,3063808,3076096,2158592,2158592,2158592,2158592,2158592,2158592,2158592,3203072,2981888,2158592,2158592,3003876,2158592,3047424,3063808,3076096,2158592,2158592,2158592,2158592,2158592,2158592,2158592,3203072,2207744,2207744,2207744,2207744,2207744,2424832,2207744,2207744,2207744,2207744,2207744,2207744,2207744,20480,0,0,0,0,0,2162688,20480,0,2523136,2527232,2158592,2158592,2576384,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2908160,2527232,2207744,2207744,2576384,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2908160,2207744,0,0,0,0,0,0,2166784,0,0,0,0,0,286,2158592,2158592,0,0,2158592,2158592,2158592,2158592,2633728,2658304,0,0,2740224,2744320,0,2834432,2207744,2207744,2977792,2207744,2207744,2207744,2207744,3039232,2207744,2207744,2207744,2207744,2207744,2207744,3158016,0,0,29315,0,0,0,0,45,45,45,45,45,933,45,45,45,45,442,45,45,45,45,45,45,45,45,45,67,67,2494464,2158592,2158592,2158592,2524757,2527232,2158592,2158592,2576384,2158592,2158592,2158592,2158592,2158592,2158592,1504,2158592,2498560,2158592,2158592,2158592,2158592,2568192,2158592,2592768,2625536,2158592,2158592,2674688,2736128,2158592,2158592,0,2158592,2912256,2158592,2158592,2158592,2158592,2158592,2158592,2158592,3108864,2158592,2158592,3133440,3145728,3153920,2375680,2379776,2207744,2207744,2420736,2207744,2449408,2207744,2207744,2207744,2498560,2207744,2207744,2207744,2207744,2568192,2207744,0,0,0,0,0,0,2166784,0,0,0,0,0,551,2158592,2158592,2158592,2158592,2207744,2506752,2207744,2207744,2207744,2207744,2207744,2158592,2506752,0,2020,2158592,2592768,2625536,2207744,2207744,2674688,2736128,2207744,2207744,2207744,2912256,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,0,542,0,544,2207744,3108864,2207744,2207744,3133440,3145728,3153920,2375680,2379776,2158592,2158592,2420736,2158592,2449408,2158592,2158592,2158592,2158592,2158592,3186688,2158592,0,641,0,0,0,0,0,0,2367488,2158592,2498560,2158592,2158592,1621,2158592,2158592,2568192,2158592,2592768,2625536,2158592,2158592,2674688,0,0,0,0,0,1608,97,97,97,97,97,97,97,97,97,97,1107,97,97,1110,97,97,3133440,3145728,3153920,2158592,2408448,2416640,2158592,2465792,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,3014656,2158592,2158592,3051520,2158592,2158592,3100672,2158592,2158592,3121152,2158592,2158592,2158592,3149824,2416640,2207744,2465792,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2633728,2658304,2740224,2744320,2834432,2949120,2158592,2985984,2158592,2998272,2158592,2158592,2158592,3129344,2207744,2408448,2949120,2207744,2985984,2207744,2998272,2207744,2207744,2207744,3129344,2158592,2408448,2416640,2158592,2465792,2158592,2158592,2158592,2158592,2158592,3186688,2158592,0,32768,0,0,0,0,0,0,2367488,2949120,2158592,2985984,2158592,2998272,2158592,2158592,2158592,3129344,2158592,2158592,2478080,2158592,2158592,2158592,2535424,2543616,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,3117056,2207744,2207744,2478080,2207744,2207744,2207744,2207744,2699264,2207744,2207744,2207744,2207744,2207744,2748416,2756608,2777088,2801664,2207744,2207744,2158877,2158877,2158877,2158877,2158877,0,0,0,2158877,2158877,2158877,2158877,0,0,2535709,2543901,2158877,2158877,2158877,0,0,0,2158877,2158877,2158877,2990365,2158877,2158877,2158730,2158730,2158730,2158730,2158730,2572426,2207744,2535424,2543616,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,3117056,2158592,2158592,2478080,2207744,2207744,2990080,2207744,2207744,2158592,2158592,2482176,2158592,2158592,0,0,0,2158592,2158592,2158592,0,2158592,2908160,2158592,2158592,2158592,2977792,2158592,2158592,2158592,2158592,3039232,2158592,2158592,3010560,2207744,2428928,2207744,2514944,2207744,2588672,2207744,2838528,2207744,2207744,2207744,3010560,2158592,2428928,2158592,2514944,0,0,2158592,2588672,2158592,0,2838528,2158592,2158592,2158592,3010560,2158592,2506752,2158592,18,0,0,0,0,0,0,0,2211840,0,0,0,0,2158592,0,0,29315,922,0,0,0,45,45,45,45,45,45,45,45,45,45,45,45,45,1539,45,3006464,2383872,0,2020,2158592,2158592,2158592,2158592,3006464,2158592,2637824,2953216,2158592,2207744,2637824,2953216,2207744,0,0,2158592,2637824,2953216,2158592,2539520,2158592,2539520,2207744,0,0,2539520,2158592,2158592,2158592,2158592,2207744,2506752,2207744,2207744,2207744,2207744,2207744,2158592,2506752,0,0,2158592,2207744,0,2158592,2158592,2207744,0,2158592,2158592,2207744,0,2158592,2965504,2965504,2965504,0,0,0,0,0,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2474269,2158877,2158877,0,0,2158877,2158877,2158877,2158877,2634013,2658589,0,0,2740509,2744605,0,2834717,40976,18,36884,45078,24,28,90143,94242,118820,102439,106538,98347,118820,118820,118820,40976,18,18,36884,0,0,0,24,24,24,27,27,27,27,90143,0,0,86016,0,0,2211840,102439,0,0,0,98347,0,2158592,2158592,2158592,2158592,2158592,3158016,0,2375680,2379776,2158592,2158592,2420736,2158592,2449408,2158592,2158592,0,94242,0,0,0,2211840,102439,0,0,106538,98347,135,2158592,2158592,2158592,2158592,2158592,2158592,2564096,2158592,2158592,2158592,2158592,2158592,2596864,2158592,2158592,2158592,2158592,2158592,2158592,2641920,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2781184,2793472,2494464,2158592,2158592,2158592,2523136,2527232,2158592,2158592,2576384,2158592,2158592,2158592,2158592,2158592,2158592,0,40976,0,18,18,24,0,27,27,0,2158592,2498560,2158592,2158592,0,2158592,2158592,2568192,2158592,2592768,2625536,2158592,2158592,2674688,0,0,0,0,0,2211840,0,0,0,0,0,0,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2473984,2158592,2158592,2494464,2158592,2158592,2158592,3006464,2383872,0,0,2158592,2158592,2158592,2158592,3006464,2158592,2637824,2953216,2158592,2207744,2637824,2953216,40976,18,36884,45078,24,27,147488,94242,147456,147488,106538,98347,0,0,147456,40976,18,18,36884,0,45078,0,24,24,24,27,27,27,27,0,81920,0,94242,0,0,0,2211840,0,0,0,106538,98347,0,2158592,2158592,2158592,2158592,2158592,2158592,2428928,2158592,2514944,2158592,2588672,2158592,2838528,2158592,2158592,40976,18,151573,45078,24,27,90143,94242,0,102439,106538,98347,0,0,0,40976,18,18,36884,0,45078,0,24,24,24,27,27,27,27,90143,0,0,1315,0,97,97,97,97,97,97,97,97,97,97,1487,97,18,131427,0,0,0,0,0,0,362,0,0,365,29315,367,0,0,29315,0,0,0,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,67,67,130,94242,0,0,0,2211840,102439,0,0,106538,98347,0,2158592,2158592,2158592,2158592,2158592,2158592,3096576,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2207744,2207744,2158592,18,0,0,0,0,0,0,0,2211840,0,0,0,0,2158592,644,2207744,2207744,2207744,3186688,2207744,0,1080,0,1084,0,1088,0,0,0,0,0,0,0,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2531466,2158730,2158730,2158730,2158730,2158730,2617482,0,94242,0,0,0,2211840,102439,0,0,106538,98347,0,2158592,2158592,2158592,2158592,2158592,2781184,2793472,2158592,2818048,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,40976,18,36884,45078,24,27,90143,159779,159744,102439,159779,98347,0,0,159744,40976,18,18,36884,0,45078,0,2224253,172032,2224253,2232448,2232448,172032,2232448,90143,0,0,2170880,0,0,550,829,2158592,2158592,2158592,2387968,2158592,2158592,2158592,2158592,2158592,2158592,0,40976,0,18,18,124,124,127,127,127,40976,18,36884,45078,25,29,90143,94242,0,102439,106538,98347,0,0,163931,40976,18,18,36884,0,45078,249856,24,24,24,27,27,27,27,90143,0,0,2170880,0,0,827,0,2158592,2158592,2158592,2387968,2158592,2158592,2158592,2158592,2158592,2158592,0,40976,0,4243810,4243810,24,24,27,27,27,2207744,0,0,0,0,0,0,2166784,0,0,0,0,57344,286,2158592,2158592,2158592,2158592,2707456,2732032,2158592,2158592,2158592,2822144,2826240,2158592,2895872,2158592,2158592,2924544,2158592,2158592,2973696,2158592,2207744,2207744,2207744,3186688,2207744,0,0,0,0,0,0,53248,0,0,0,0,0,97,97,97,97,97,1613,97,97,97,97,97,97,1495,97,97,97,97,97,97,97,97,97,566,97,97,97,97,97,97,2207744,0,0,0,0,0,0,2166784,546,0,0,0,0,286,2158592,2158592,2158592,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,17,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,20480,120,121,18,18,36884,0,45078,0,24,24,24,27,27,27,27,90143,0,0,2170880,0,53248,550,0,2158592,2158592,2158592,2387968,2158592,2158592,2158592,2158592,2158592,2158592,0,40976,196608,18,266240,24,24,27,27,27,0,94242,0,0,0,38,102439,0,0,106538,98347,0,45,45,45,45,45,45,45,1535,45,45,45,45,45,45,45,1416,45,45,45,45,45,45,45,45,424,45,45,45,45,45,45,45,45,45,405,45,45,45,45,45,45,45,45,45,45,45,45,45,199,45,45,67,67,67,67,67,491,67,67,67,67,67,67,67,67,67,67,67,1766,67,67,67,1767,67,24850,24850,12564,12564,0,0,2166784,546,0,53531,53531,0,286,97,97,0,0,97,97,97,97,97,97,0,0,97,97,0,97,97,97,45,45,45,45,45,45,67,67,67,67,67,67,67,67,67,743,57889,0,2170880,0,0,550,0,97,97,97,97,97,97,97,97,97,45,45,45,45,45,45,45,45,1856,45,1858,1859,67,67,67,1009,67,67,67,67,67,67,67,67,67,67,67,1021,67,67,67,67,67,25398,0,13112,0,54074,0,0,0,0,0,0,0,0,0,2367773,2158877,2158877,2158877,2158877,2158877,2158877,2699549,2158877,2158877,2158877,2158877,2158877,2748701,2756893,2777373,2801949,97,1115,97,97,97,97,97,97,97,97,97,97,97,97,97,97,857,97,67,67,67,67,67,1258,67,67,67,67,67,67,67,67,67,67,67,1826,67,97,97,97,97,97,97,1338,97,97,97,97,97,97,97,97,97,97,97,97,97,870,97,97,67,67,67,1463,67,67,67,67,67,67,67,67,67,67,67,67,67,1579,67,67,97,97,97,1518,97,97,97,97,97,97,97,97,97,97,97,97,97,904,905,97,97,97,97,1620,97,97,97,97,97,97,97,97,97,97,97,0,921,0,0,0,0,0,0,45,1679,67,67,67,1682,67,67,67,67,67,67,67,67,67,1690,67,0,0,97,97,97,97,45,45,67,67,0,0,97,97,45,45,45,669,45,45,45,45,45,45,45,45,45,45,45,45,189,45,45,45,1748,45,45,45,1749,1750,45,45,45,45,45,45,45,45,67,67,67,67,1959,67,67,67,67,1768,67,67,67,67,67,67,67,67,97,97,97,97,97,97,97,97,97,1791,97,97,97,97,97,97,97,97,45,45,45,45,45,45,1802,67,1817,67,67,67,67,67,67,1823,67,67,67,67,97,97,97,97,0,0,0,97,97,97,97,0,97,97,97,97,1848,45,45,45,45,45,45,45,45,45,45,45,659,45,45,45,45,45,45,45,1863,67,67,67,67,67,67,67,67,67,67,67,67,495,67,67,67,67,67,1878,97,97,97,97,0,0,0,97,97,97,97,0,0,97,97,97,97,97,0,0,0,97,97,97,97,97,97,45,45,45,45,45,45,45,45,45,67,67,67,67,97,97,97,97,0,0,0,1973,97,97,97,0,97,97,97,97,97,97,97,97,97,97,97,97,97,1165,97,1167,67,24850,24850,12564,12564,0,0,2166784,0,0,53531,53531,0,286,97,97,0,0,97,97,97,97,97,97,0,0,97,97,1789,97,0,94242,0,0,0,2211840,102439,0,0,106538,98347,136,2158592,2158592,2158592,2158592,2158592,3158016,229376,2375680,2379776,2158592,2158592,2420736,2158592,2449408,2158592,2158592,67,24850,24850,12564,12564,0,0,280,547,0,53531,53531,0,286,97,97,0,0,97,97,97,97,97,97,0,1788,97,97,0,97,2024,97,45,45,45,45,45,45,67,67,67,67,67,67,67,67,235,67,67,67,67,67,57889,547,547,0,0,550,0,97,97,97,97,97,97,97,97,97,45,45,45,1799,45,45,45,67,67,67,67,67,25398,0,13112,0,54074,0,0,1092,0,0,0,0,0,97,97,97,97,1612,97,97,97,97,1616,97,1297,1472,0,0,0,0,1303,1474,0,0,0,0,1309,1476,0,0,0,0,97,97,97,1481,97,97,97,97,97,97,1488,97,0,1474,0,1476,0,97,97,97,97,97,97,97,97,97,97,97,607,97,97,97,97,40976,18,36884,45078,26,30,90143,94242,0,102439,106538,98347,0,0,213080,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,143448,40976,18,18,36884,0,45078,0,24,24,24,27,27,27,27,0,0,0,0,97,97,97,97,1482,97,1483,97,97,97,97,97,97,1326,97,97,1329,1330,97,97,97,97,97,97,1159,1160,97,97,97,97,97,97,97,97,590,97,97,97,97,97,97,97,0,94242,0,0,0,2211974,102439,0,0,106538,98347,0,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2474122,2158730,2158730,2494602,2158730,2158730,2158730,2809994,2158730,2158730,2842762,2158730,2158730,2158730,2900106,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,3014794,2158730,2158730,3051658,2158730,2158730,3100810,2158730,2158730,2158730,2158730,3096714,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2207744,2207744,2207744,2207744,2207744,2572288,2207744,2207744,2207744,2207744,541,541,543,543,0,0,2166784,0,548,549,549,0,286,2158877,2158877,2158877,2863389,2892061,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,3186973,2158877,0,0,0,0,0,0,0,0,2367626,2158877,2404637,2412829,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2564381,2158877,2158877,2605341,2158877,2158877,2158877,2158877,2158877,2158877,2679069,2158877,2695453,2158877,2703645,2158877,2711837,2752797,2158877,0,2158877,2158877,2158877,2384010,2158730,2158730,2158730,2158730,3006602,2383872,2207744,2207744,2207744,2207744,2207744,2207744,3096576,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,0,0,0,0,0,0,2162688,0,0,2158877,2785565,2158877,2810141,2158877,2158877,2842909,2158877,2158877,2158877,2900253,2158877,2158877,2158877,2158877,2158877,2531613,2158877,2158877,2158877,2158877,2158877,2617629,2158877,2158877,2158877,2158877,2158730,2818186,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,3105053,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,0,0,0,0,0,97,97,97,1611,97,97,97,97,97,97,97,1496,97,97,1499,97,97,97,97,97,2441354,2445450,2158730,2158730,2158730,2158730,2158730,2158730,2502794,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2433162,2158730,2453642,2461834,2158730,2158730,2158730,2158730,2158730,2158730,2580618,2158730,2158730,2158730,2158730,2621578,2158730,2158730,2158730,2158730,2158730,2158730,2699402,2158730,2158730,2158730,2158730,2678922,2158730,2695306,2158730,2703498,2158730,2711690,2752650,2158730,2158730,2785418,2158730,2158730,2158730,3113098,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,3186826,2158730,2207744,2207744,2207744,2207744,2781184,2793472,2207744,2818048,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,0,541,0,543,2158877,2502941,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2580765,2158877,2158877,2158877,2158877,2621725,2158877,3019037,2158877,3043613,2158877,2158877,2158877,2158877,3080477,2158877,2158877,3113245,2158877,2158877,2158877,2158877,0,2158877,2908445,2158877,2158877,2158877,2978077,2158877,2158877,2158877,2158877,3039517,2158877,2158730,2510986,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2584714,2158730,2609290,2158730,2158730,2629770,2158730,2158730,2158730,2388106,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2605194,2158730,2158730,2158730,2158730,2687114,2158730,2715786,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2867338,2158730,2904202,2158730,2158730,2158730,2642058,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2781322,2793610,2158730,3121290,2158730,2158730,2158730,3149962,2158730,2158730,3170442,3174538,2158730,2367488,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2441216,2445312,2207744,2207744,2207744,2207744,2207744,2207744,2502656,2158877,2433309,2158877,2453789,2461981,2158877,2158877,2158877,2158877,2158877,2158877,2511133,2158877,2158877,2158877,2158877,2584861,2158877,2609437,2158877,2158877,2629917,2158877,2158877,2158877,2687261,2158877,2715933,2158877,2158730,2158730,2973834,2158730,2982026,2158730,2158730,3002506,2158730,3047562,3063946,3076234,2158730,2158730,2158730,2158730,2207744,2506752,2207744,2207744,2207744,2207744,2207744,2158877,2507037,0,0,2158877,2158730,2158730,2158730,3203210,2207744,2207744,2207744,2207744,2207744,2424832,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2564096,2207744,2207744,2207744,2707741,2732317,2158877,2158877,2158877,2822429,2826525,2158877,2896157,2158877,2158877,2924829,2158877,2158877,2973981,2158877,18,0,0,0,0,0,0,0,2211840,0,0,642,0,2158592,0,45,1529,45,45,45,45,45,45,45,45,45,45,45,45,45,1755,45,67,67,2982173,2158877,2158877,3002653,2158877,3047709,3064093,3076381,2158877,2158877,2158877,2158877,2158877,2158877,2158877,3203357,2523274,2527370,2158730,2158730,2576522,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2908298,2494749,2158877,2158877,2158877,2523421,2527517,2158877,2158877,2576669,2158877,2158877,2158877,2158877,2158877,2158877,0,40976,0,18,18,4321280,2224253,2232448,4329472,2232448,2158730,2498698,2158730,2158730,2158730,2158730,2568330,2158730,2592906,2625674,2158730,2158730,2674826,2736266,2158730,2158730,2158730,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2158730,2912394,2158730,2158730,2158730,2158730,2158730,2158730,2158730,3109002,2158730,2158730,3133578,3145866,3154058,2375680,2207744,3108864,2207744,2207744,3133440,3145728,3153920,2375965,2380061,2158877,2158877,2421021,2158877,2449693,2158877,2158877,2158877,3117341,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,3104906,2158730,2158730,2158730,2158730,2158730,2158730,2158877,2498845,2158877,2158877,0,2158877,2158877,2568477,2158877,2593053,2625821,2158877,2158877,2674973,0,0,0,0,97,97,1480,97,97,97,97,97,1485,97,97,97,0,97,97,1729,97,1731,97,97,97,97,97,97,97,311,97,97,97,97,97,97,97,97,1520,97,97,1523,97,97,1526,97,2736413,2158877,2158877,0,2158877,2912541,2158877,2158877,2158877,2158877,2158877,2158877,2158877,3109149,2158877,2158877,3014941,2158877,2158877,3051805,2158877,2158877,3100957,2158877,2158877,3121437,2158877,2158877,2158877,3150109,3133725,3146013,3154205,2158730,2408586,2416778,2158730,2465930,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,3018890,2158730,3043466,2158730,2158730,2158730,2158730,3080330,2633866,2658442,2740362,2744458,2834570,2949258,2158730,2986122,2158730,2998410,2158730,2158730,2158730,3129482,2207744,2408448,2949120,2207744,2985984,2207744,2998272,2207744,2207744,2207744,3129344,2158877,2408733,2416925,2158877,2466077,2158877,2158877,3170589,3174685,2158877,0,0,0,2158730,2158730,2158730,2158730,2158730,2424970,2158730,2158730,2158730,2158730,2707594,2732170,2158730,2158730,2158730,2822282,2826378,2158730,2896010,2158730,2158730,2924682,2949405,2158877,2986269,2158877,2998557,2158877,2158877,2158877,3129629,2158730,2158730,2478218,2158730,2158730,2158730,2535562,2543754,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,2158730,3117194,2207744,2207744,2478080,2207744,2207744,2207744,2207744,3014656,2207744,2207744,3051520,2207744,2207744,3100672,2207744,2207744,3121152,2207744,2207744,2207744,2207744,2207744,2584576,2207744,2609152,2207744,2207744,2629632,2207744,2207744,2207744,2686976,2207744,2207744,2535424,2543616,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,3117056,2158877,2158877,2478365,0,2158877,2158877,2158877,2158877,2158877,2158877,2158730,2158730,2482314,2158730,2158730,2158730,2158730,2158730,2158730,2207744,2207744,2207744,2387968,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,2207744,0,823,0,825,2158730,2158730,2158730,2990218,2158730,2158730,2207744,2207744,2482176,2207744,2207744,2207744,2207744,2207744,2207744,2207744,0,0,0,0,0,0,2162688,135,0,2207744,2207744,2990080,2207744,2207744,2158877,2158877,2482461,2158877,2158877,0,0,0,2158877,2158877,2158877,2158877,2158877,2158730,2429066,2158730,2515082,2158730,2588810,2158730,2838666,2158730,2158730,2158730,3010698,2207744,2428928,2207744,2514944,2207744,2588672,2207744,2838528,2207744,2207744,2207744,3010560,2158877,2429213,2158877,2515229,0,0,2158877,2588957,2158877,0,2838813,2158877,2158877,2158877,3010845,2158730,2506890,2158730,2158730,2158730,2748554,2756746,2777226,2801802,2158730,2158730,2158730,2863242,2891914,2158730,2158730,2158730,2158730,2158730,2158730,2564234,2158730,2158730,2158730,2158730,2158730,2597002,2158730,2158730,2158730,3006464,2384157,0,0,2158877,2158877,2158877,2158877,3006749,2158730,2637962,2953354,2158730,2207744,2637824,2953216,2207744,0,0,2158877,2638109,2953501,2158877,2539658,2158730,2539520,2207744,0,0,2539805,2158877,2158730,2158730,2158730,2977930,2158730,2158730,2158730,2158730,3039370,2158730,2158730,2158730,2158730,2158730,2158730,3158154,2207744,0,2158877,2158730,2207744,0,2158877,2158730,2207744,0,2158877,2965642,2965504,2965789,0,0,0,0,1315,0,0,0,0,97,97,97,97,97,97,97,1484,97,97,97,97,2158592,18,0,122880,0,0,0,77824,0,2211840,0,0,0,0,2158592,0,356,0,0,0,0,0,0,28809,0,139,45,45,45,45,45,45,1751,45,45,45,45,45,45,45,67,67,1427,67,67,67,67,67,1432,67,67,67,3104768,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,122880,0,0,0,0,1315,0,0,0,0,97,97,97,97,97,97,1322,550,0,286,0,2158592,2158592,2158592,2158592,2158592,2424832,2158592,2158592,2158592,2158592,2158592,2158592,0,40976,0,18,18,24,24,4329472,27,27,2207744,2207744,2977792,2207744,2207744,2207744,2207744,3039232,2207744,2207744,2207744,2207744,2207744,2207744,3158016,542,0,0,0,542,0,544,0,0,0,544,0,550,0,0,0,0,0,97,97,1610,97,97,97,97,97,97,97,97,898,97,97,97,97,97,97,97,0,94242,0,0,0,2211840,0,0,0,0,0,0,2158592,2158592,2158592,2158592,2158592,2424832,2158592,2158592,2158592,2158592,2158592,2158592,40976,18,36884,45078,24,27,90143,94242,237568,102439,106538,98347,0,0,20480,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,192512,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,94,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,96,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,12378,40976,18,18,36884,0,45078,0,24,24,24,126,126,126,126,90143,0,0,2170880,0,0,0,0,2158592,2158592,2158592,2387968,2158592,2158592,2158592,2158592,2158592,2158592,20480,40976,0,18,18,24,24,27,27,27,40976,18,36884,45078,24,27,90143,94242,241664,102439,106538,98347,0,0,20568,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,200797,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,20480,40976,18,36884,45078,24,27,90143,94242,0,0,0,44,0,0,20575,40976,18,36884,45078,24,27,90143,94242,0,41,41,41,0,0,1126400,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,0,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,89,40976,18,18,36884,0,45078,0,24,24,24,27,131201,27,27,90143,0,0,2170880,0,0,550,0,2158592,2158592,2158592,2387968,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2441216,2445312,2158592,2158592,2158592,2158592,2158592,0,94242,0,0,208896,2211840,102439,0,0,106538,98347,0,2158592,2158592,2158592,2158592,2158592,3186688,2158592,0,0,0,0,0,0,0,0,2367488,32768,0,0,0,0,0,0,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2433024,2158592,2453504,2461696,2158592,2158592,2158592,2158592,2158592,2158592,2510848,2158592,2158592,2158592,2158592,40976,18,36884,245783,24,27,90143,94242,0,102439,106538,98347,0,0,20480,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,221184,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,180224,40976,18,18,36884,155648,45078,0,24,24,217088,27,27,27,217088,90143,0,0,2170880,0,0,828,0,2158592,2158592,2158592,2387968,2158592,2158592,2158592,2158592,2158592,2158592,2207744,2207744,2207744,2387968,2207744,2207744,2207744,2207744,2207744,2207744,2207744,0,0,0,0,0,0,2162688,233472,0,0,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,45,45,45,718,45,45,45,45,45,45,45,45,45,727,131427,0,0,0,0,362,0,365,28809,367,139,45,45,45,45,45,45,1808,45,45,45,45,67,67,67,67,67,67,67,97,97,0,0,97,67,24850,24850,12564,12564,0,57889,0,0,0,53531,53531,367,286,97,97,0,0,97,97,97,97,97,97,1787,0,97,97,0,97,97,97,45,45,45,45,2029,45,67,67,67,67,2033,57889,0,0,54074,54074,550,0,97,97,97,97,97,97,97,97,97,45,1798,45,45,1800,45,45,0,1472,0,0,0,0,0,1474,0,0,0,0,0,1476,0,0,0,0,1315,0,0,0,0,97,97,97,97,1320,97,97,0,0,97,97,97,97,1786,97,0,0,97,97,0,1790,1527,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,663,67,24850,24850,12564,12564,0,57889,281,0,0,53531,53531,367,286,97,97,0,0,97,97,97,1785,97,97,0,0,97,97,0,97,97,1979,97,97,45,45,1983,45,1984,45,45,45,45,45,652,45,45,45,45,45,45,45,45,45,45,690,45,45,694,45,45,40976,19,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,262144,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,46,67,98,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,45,67,97,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,258048,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,1122423,40976,18,36884,45078,24,27,90143,94242,0,1114152,1114152,1114152,0,0,1114112,40976,18,36884,45078,24,27,90143,94242,37,102439,106538,98347,0,0,204800,40976,18,36884,45078,24,27,90143,94242,0,102439,106538,98347,0,0,57436,40976,18,36884,45078,24,27,33,33,0,33,33,33,0,0,0,40976,18,18,36884,0,45078,0,124,124,124,127,127,127,127,90143,0,0,2170880,0,0,550,0,2158877,2158877,2158877,2388253,2158877,2158877,2158877,2158877,2158877,2781469,2793757,2158877,2818333,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2867485,2158877,2904349,2158877,2158877,2158877,2158877,2158877,2158877,2158877,3096861,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2158877,2441501,2445597,2158877,2158877,2158877,2158877,2158877,40976,122,123,36884,0,45078,0,24,24,24,27,27,27,27,90143,0,921,29315,0,0,0,0,45,45,45,45,45,45,45,45,936,2158592,4243810,0,0,0,0,0,0,0,2211840,0,0,0,0,2158592,0,921,29315,0,0,0,0,45,45,45,45,45,45,45,935,45,45,45,715,45,45,45,45,45,45,45,723,45,45,45,45,45,1182,45,45,45,45,45,45,45,45,45,45,430,45,45,45,45,45,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,47,68,99,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,48,69,100,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,49,70,101,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,50,71,102,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,51,72,103,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,52,73,104,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,53,74,105,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,54,75,106,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,55,76,107,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,56,77,108,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,57,78,109,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,58,79,110,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,59,80,111,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,60,81,112,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,61,82,113,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,62,83,114,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,63,84,115,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,64,85,116,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,65,86,117,40976,18,36884,45078,24,27,90143,94242,38,102439,106538,98347,66,87,118,40976,18,36884,45078,24,27,90143,94242,118820,102439,106538,98347,118820,118820,118820,40976,18,18,0,0,45078,0,24,24,24,27,27,27,27,90143,0,0,1314,0,0,0,0,0,0,97,97,97,97,97,1321,97,18,131427,0,0,0,0,0,0,362,0,0,365,0,367,0,0,1315,0,97,97,97,97,97,97,97,97,97,97,97,97,97,1360,97,97,131,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,45,145,149,45,45,45,45,45,174,45,179,45,185,45,188,45,45,202,67,255,67,67,269,67,67,0,24850,12564,0,0,0,0,28809,53531,97,97,97,292,296,97,97,97,97,97,321,97,326,97,332,97,18,131427,0,0,0,0,0,0,362,0,0,365,29315,367,646,335,97,97,349,97,97,0,40976,0,18,18,24,24,27,27,27,437,45,45,45,45,45,45,45,45,45,45,45,45,45,67,67,67,67,67,67,67,67,523,67,67,67,67,67,67,67,67,67,67,67,67,511,67,67,67,97,97,97,620,97,97,97,97,97,97,97,97,97,97,97,97,97,1501,1502,97,793,67,67,796,67,67,67,67,67,67,67,67,67,67,808,67,0,0,97,97,97,97,45,45,67,67,0,0,97,97,2052,67,67,67,67,813,67,67,67,67,67,67,67,25398,542,13112,544,57889,0,0,54074,54074,550,830,97,97,97,97,97,97,97,97,97,315,97,97,97,97,97,97,841,97,97,97,97,97,97,97,97,97,854,97,97,97,97,97,97,589,97,97,97,97,97,97,97,97,97,867,97,97,97,97,97,97,97,891,97,97,894,97,97,97,97,97,97,97,97,97,97,906,45,937,45,45,940,45,45,45,45,45,45,948,45,45,45,45,45,734,735,67,737,67,738,67,740,67,67,67,45,967,45,45,45,45,45,45,45,45,45,45,45,45,45,45,435,45,45,45,980,45,45,45,45,45,45,45,45,45,45,45,45,45,415,45,45,67,67,1024,67,67,67,67,67,67,67,67,67,67,67,67,67,97,97,97,67,67,67,67,67,25398,1081,13112,1085,54074,1089,0,0,0,0,0,0,363,0,28809,0,139,45,45,45,45,45,45,1674,45,45,45,45,45,45,45,45,67,1913,67,1914,67,67,67,1918,67,67,97,97,97,97,1118,97,97,97,97,97,97,97,97,97,97,97,630,97,97,97,97,97,1169,97,97,97,97,97,0,921,0,1175,0,0,0,0,45,45,45,45,45,45,1534,45,45,45,45,45,1538,45,45,45,45,1233,45,45,45,45,45,45,67,67,67,67,67,67,67,67,742,67,45,45,1191,45,45,45,45,45,45,45,45,45,45,45,45,45,454,67,67,67,67,1243,67,67,67,67,67,67,67,67,67,67,67,1251,67,0,0,97,97,97,97,45,45,67,67,2050,0,97,97,45,45,45,732,45,45,67,67,67,67,67,67,67,67,67,67,67,67,97,97,67,67,67,1284,67,67,67,67,67,67,67,67,67,67,67,67,772,67,67,67,1293,67,67,67,67,67,67,0,0,0,0,0,0,0,0,0,0,368,2158592,2158592,2158592,2404352,2412544,1323,97,97,97,97,97,97,97,97,97,97,97,1331,97,97,97,0,97,97,97,97,97,97,97,97,97,97,97,1737,97,1364,97,97,97,97,97,97,97,97,97,97,97,97,1373,97,18,131427,0,0,0,0,0,0,362,0,0,365,29315,367,647,45,45,1387,45,45,1391,45,45,45,45,45,45,45,45,45,45,410,45,45,45,45,45,1400,45,45,45,45,45,45,45,45,45,45,1407,45,45,45,45,45,941,45,943,45,45,45,45,45,45,951,45,67,1438,67,67,67,67,67,67,67,67,67,67,1447,67,67,67,67,67,67,782,67,67,67,67,67,67,67,67,67,756,67,67,67,67,67,67,97,1491,97,97,97,97,97,97,97,97,97,97,1500,97,97,97,0,97,97,97,97,97,97,97,97,97,97,1736,97,45,45,1541,45,45,45,45,45,45,45,45,45,45,45,45,45,677,45,45,67,1581,67,67,67,67,67,67,67,67,67,67,67,67,67,67,791,792,67,67,67,67,1598,67,1600,67,67,67,67,67,67,67,67,1472,97,97,97,1727,97,97,97,97,97,97,97,97,97,97,97,97,97,1513,97,97,67,67,97,1879,97,1881,97,0,1884,0,97,97,97,97,0,0,97,97,97,97,97,0,0,0,1842,97,97,67,67,67,67,67,97,97,97,97,1928,0,0,0,97,97,97,97,97,97,45,45,45,45,45,1903,45,45,45,67,67,67,67,97,97,97,97,1971,0,0,97,97,97,97,0,97,97,97,97,97,97,97,97,97,0,0,0,45,45,45,1381,45,45,45,45,1976,97,97,97,97,97,45,45,45,45,45,45,45,45,45,45,45,45,1747,809,67,67,67,67,67,67,67,67,67,67,67,25398,542,13112,544,97,907,97,97,97,97,97,97,97,97,97,97,97,638,0,0,0,0,1478,97,97,97,97,97,97,97,97,97,97,97,1150,97,97,97,97,67,67,67,67,1244,67,67,67,67,67,67,67,67,67,67,67,477,67,67,67,67,67,67,1294,67,67,67,67,0,0,0,0,0,0,0,0,0,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1324,97,97,97,97,97,97,97,97,97,97,97,97,97,0,0,0,1374,97,97,97,97,0,1175,0,45,45,45,45,45,45,45,45,945,45,45,45,45,45,45,45,45,1908,45,45,1910,45,67,67,67,67,67,67,67,67,1919,67,0,0,97,97,97,97,45,2048,67,2049,0,0,97,2051,45,45,45,939,45,45,45,45,45,45,45,45,45,45,45,45,397,45,45,45,1921,67,67,1923,67,97,97,97,97,97,0,0,0,97,97,97,97,97,97,45,45,45,45,1947,45,1935,0,0,0,97,1939,97,97,1941,97,45,45,45,45,45,45,382,389,45,45,45,45,45,45,45,45,1810,45,45,1812,67,67,67,67,67,256,67,67,67,67,67,0,24850,12564,0,0,0,0,28809,53531,336,97,97,97,97,97,0,40976,0,18,18,24,24,27,27,27,131427,0,0,0,0,362,0,365,28809,367,139,45,45,371,373,45,45,45,955,45,45,45,45,45,45,45,45,45,45,45,45,413,45,45,45,457,459,67,67,67,67,67,67,67,67,473,67,478,67,67,482,67,67,485,67,67,67,67,67,67,67,67,67,67,67,67,67,97,1828,97,554,556,97,97,97,97,97,97,97,97,570,97,575,97,97,579,97,97,582,97,97,97,97,97,97,97,97,97,97,97,97,97,330,97,97,67,746,67,67,67,67,67,67,67,67,67,758,67,67,67,67,67,67,67,1575,67,67,67,67,67,67,67,67,493,67,67,67,67,67,67,67,97,97,844,97,97,97,97,97,97,97,97,97,856,97,97,97,0,97,97,97,97,97,97,97,97,1735,97,97,97,0,97,97,97,97,97,97,97,1642,97,1644,97,97,890,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,0,67,67,67,67,1065,1066,67,67,67,67,67,67,67,67,67,67,532,67,67,67,67,67,67,67,1451,67,67,67,67,67,67,67,67,67,67,67,67,67,496,67,67,97,97,1505,97,97,97,97,97,97,97,97,97,97,97,97,97,593,97,97,0,1474,0,1476,0,97,97,97,97,97,97,97,97,97,97,1617,97,97,1635,0,1637,97,97,97,97,97,97,97,97,97,97,97,885,97,97,97,97,67,67,1704,67,67,67,67,97,97,97,97,97,97,97,97,97,565,572,97,97,97,97,97,97,97,97,1832,0,97,97,97,97,97,0,0,0,97,97,97,97,97,97,45,45,45,1946,45,45,67,67,67,67,67,97,1926,97,1927,97,0,0,0,97,97,1934,2043,0,0,97,97,97,2047,45,45,67,67,0,1832,97,97,45,45,45,981,45,45,45,45,45,45,45,45,45,45,45,45,1227,45,45,45,131427,0,0,0,0,362,0,365,28809,367,139,45,45,372,45,45,45,45,1661,1662,45,45,45,45,45,1666,45,45,45,45,45,1673,45,1675,45,45,45,45,45,45,45,67,1426,67,67,67,67,67,67,67,67,67,67,1275,67,67,67,67,67,45,418,45,45,420,45,45,423,45,45,45,45,45,45,45,45,959,45,45,962,45,45,45,45,458,67,67,67,67,67,67,67,67,67,67,67,67,67,67,483,67,67,67,67,504,67,67,506,67,67,509,67,67,67,67,67,67,67,528,67,67,67,67,67,67,67,67,1287,67,67,67,67,67,67,67,555,97,97,97,97,97,97,97,97,97,97,97,97,97,97,580,97,97,97,97,601,97,97,603,97,97,606,97,97,97,97,97,97,848,97,97,97,97,97,97,97,97,97,1498,97,97,97,97,97,97,45,45,714,45,45,45,45,45,45,45,45,45,45,45,45,45,989,990,45,67,67,67,67,67,1011,67,67,67,67,1015,67,67,67,67,67,67,67,753,67,67,67,67,67,67,67,67,467,67,67,67,67,67,67,67,45,45,1179,45,45,45,45,45,45,45,45,45,45,45,45,45,1003,1004,67,1217,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,728,67,1461,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1034,67,97,1516,97,97,97,97,97,97,97,97,97,97,97,97,97,97,871,97,67,67,67,1705,67,67,67,97,97,97,97,97,97,97,97,97,567,97,97,97,97,97,97,97,97,97,97,1715,97,97,97,97,97,97,97,97,97,0,0,0,45,45,1380,45,45,45,45,45,67,67,97,97,97,97,97,0,0,0,97,1887,97,97,0,0,97,97,97,0,97,97,97,97,97,2006,45,45,1907,45,45,45,45,45,67,67,67,67,67,67,67,67,67,1920,67,97,0,2035,97,97,97,97,97,45,45,45,45,67,67,67,1428,67,67,67,67,67,67,1435,67,0,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,45,146,45,152,45,45,165,45,175,45,180,45,45,187,190,195,45,203,254,257,262,67,270,67,67,0,24850,12564,0,0,0,281,28809,53531,97,97,97,293,97,299,97,97,312,97,322,97,327,97,97,334,337,342,97,350,97,97,0,40976,0,18,18,24,24,27,27,27,67,484,67,67,67,67,67,67,67,67,67,67,67,67,67,499,97,581,97,97,97,97,97,97,97,97,97,97,97,97,97,596,648,45,650,45,651,45,653,45,45,45,657,45,45,45,45,45,45,1954,67,67,67,1958,67,67,67,67,67,67,67,768,67,67,67,67,67,67,67,67,769,67,67,67,67,67,67,67,680,45,45,45,45,45,45,45,45,688,689,691,45,45,45,45,45,983,45,45,45,45,45,45,45,45,45,45,947,45,45,45,45,952,45,45,698,699,45,45,702,703,45,45,45,45,45,45,45,711,744,67,67,67,67,67,67,67,67,67,757,67,67,67,67,761,67,67,67,67,765,67,767,67,67,67,67,67,67,67,67,775,776,778,67,67,67,67,67,67,785,786,67,67,789,790,67,67,67,67,67,67,1442,67,67,67,67,67,67,67,67,67,97,97,97,1775,97,97,97,67,67,67,67,67,798,67,67,67,802,67,67,67,67,67,67,67,67,1465,67,67,1468,67,67,1471,67,67,810,67,67,67,67,67,67,67,67,67,821,25398,542,13112,544,57889,0,0,54074,54074,550,0,833,97,835,97,836,97,838,97,97,0,0,97,97,97,2002,97,97,97,97,97,45,45,45,45,45,1740,45,45,45,1744,45,45,45,97,842,97,97,97,97,97,97,97,97,97,855,97,97,97,97,0,1717,1718,97,97,97,97,97,1722,97,0,0,859,97,97,97,97,863,97,865,97,97,97,97,97,97,97,97,604,97,97,97,97,97,97,97,873,874,876,97,97,97,97,97,97,883,884,97,97,887,888,97,18,131427,0,0,0,0,0,0,362,225280,0,365,0,367,0,45,45,45,1531,45,45,45,45,45,45,45,45,45,45,45,1199,45,45,45,45,45,97,97,908,97,97,97,97,97,97,97,97,97,919,638,0,0,0,0,2158877,2158877,2158877,2158877,2158877,2425117,2158877,2158877,2158877,2158877,2158877,2158877,2597149,2158877,2158877,2158877,2158877,2158877,2158877,2642205,2158877,2158877,2158877,2158877,2158877,3158301,0,2375818,2379914,2158730,2158730,2420874,2158730,2449546,2158730,2158730,953,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,965,978,45,45,45,45,45,45,985,45,45,45,45,45,45,45,45,971,45,45,45,45,45,45,45,67,67,67,67,67,1027,67,1029,67,67,67,67,67,67,67,67,67,1455,67,67,67,67,67,67,67,1077,1078,67,67,25398,0,13112,0,54074,0,0,0,0,0,0,0,0,366,0,139,2158730,2158730,2158730,2404490,2412682,1113,97,97,97,97,97,97,1121,97,1123,97,97,97,97,97,97,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1540,1155,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,615,1168,97,97,1171,1172,97,97,0,921,0,1175,0,0,0,0,45,45,45,45,45,1533,45,45,45,45,45,45,45,45,45,1663,45,45,45,45,45,45,45,45,45,183,45,45,45,45,201,45,45,45,1219,45,45,45,45,45,45,45,1226,45,45,45,45,45,168,45,45,45,45,45,45,45,45,45,45,427,45,45,45,45,45,45,45,1231,45,45,45,45,45,45,45,45,67,67,67,67,67,67,67,67,67,67,67,1242,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1046,67,67,1254,67,1256,67,67,67,67,67,67,67,67,67,67,67,67,806,807,67,67,97,1336,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1111,97,97,97,97,97,1351,97,97,97,1354,97,97,97,1359,97,97,97,0,97,97,97,97,1640,97,97,97,97,97,97,97,897,97,97,97,902,97,97,97,97,97,97,97,97,1366,97,97,97,97,97,97,97,1371,97,97,97,0,97,97,97,1730,97,97,97,97,97,97,97,97,915,97,97,97,97,0,360,0,67,67,67,1440,67,67,67,67,67,67,67,67,67,67,67,67,1017,67,1019,67,67,67,67,67,1453,67,67,67,67,67,67,67,67,67,67,1459,97,97,97,1493,97,97,97,97,97,97,97,97,97,97,97,97,97,1525,97,97,97,97,97,97,1507,97,97,97,97,97,97,97,97,97,97,1514,67,67,67,67,1584,67,67,67,67,67,1590,67,67,67,67,67,67,67,783,67,67,67,788,67,67,67,67,67,67,67,67,67,1599,1601,67,67,67,1604,67,1606,1607,67,1472,0,1474,0,1476,0,97,97,97,97,97,97,1614,97,97,97,97,45,45,1850,45,45,45,45,1855,45,45,45,45,45,1222,45,45,45,45,45,45,45,45,45,1229,97,1618,97,97,97,97,97,97,97,1625,97,97,97,97,97,0,1175,0,45,45,45,45,45,45,45,45,447,45,45,45,45,45,67,67,1633,97,97,0,97,97,97,97,97,97,97,97,1643,1645,97,97,0,0,97,97,1784,97,97,97,0,0,97,97,0,97,1894,1895,97,1897,97,45,45,45,45,45,45,45,45,45,656,45,45,45,45,45,45,97,1648,97,1650,1651,97,0,45,45,45,1654,45,45,45,45,45,169,45,45,45,45,45,45,45,45,45,45,658,45,45,45,45,664,45,45,1659,45,45,45,45,45,45,45,45,45,45,45,45,45,1187,45,45,1669,45,45,45,45,45,45,45,45,45,45,45,45,45,45,67,1005,67,67,1681,67,67,67,67,67,67,67,1686,67,67,67,67,67,67,67,784,67,67,67,67,67,67,67,67,1055,67,67,67,67,1060,67,67,97,97,1713,97,0,97,97,97,97,97,97,97,97,97,0,0,0,1378,45,45,45,45,45,45,45,408,45,45,45,45,45,45,45,45,1547,45,1549,45,45,45,45,45,97,97,1780,0,97,97,97,97,97,97,0,0,97,97,0,97,97,97,45,45,2027,2028,45,45,67,67,2031,2032,67,45,45,1804,45,45,45,45,45,45,45,45,67,67,67,67,67,67,1917,67,67,67,67,67,67,67,1819,67,67,67,67,67,67,67,67,97,97,97,1708,97,97,97,97,97,45,45,1862,67,67,67,67,67,67,67,67,67,67,67,67,67,497,67,67,67,1877,97,97,97,97,97,0,0,0,97,97,97,97,0,0,97,97,97,97,97,1839,0,0,97,97,97,97,1936,0,0,97,97,97,97,97,97,1943,1944,1945,45,45,45,45,670,45,45,45,45,674,45,45,45,45,678,45,1948,45,1950,45,45,45,45,1955,1956,1957,67,67,67,1960,67,1962,67,67,67,67,1967,1968,1969,97,0,0,0,97,97,1974,97,0,1936,0,97,97,97,97,97,97,45,45,45,45,45,45,45,45,1906,0,1977,97,97,97,97,45,45,45,45,45,45,45,45,45,45,45,1746,45,45,45,45,2011,67,67,2013,67,67,67,2017,97,97,0,0,2021,97,8192,97,97,2025,45,45,45,45,45,45,67,67,67,67,67,1916,67,67,67,67,0,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,140,45,45,45,1180,45,45,45,45,1184,45,45,45,45,45,45,45,387,45,392,45,45,396,45,45,399,45,45,67,207,67,67,67,67,67,67,236,67,67,67,67,67,67,67,800,67,67,67,67,67,67,67,67,67,1603,67,67,67,67,67,0,97,97,287,97,97,97,97,97,97,316,97,97,97,97,97,97,0,45,45,45,45,45,45,45,1656,1657,45,376,45,45,45,45,45,388,45,45,45,45,45,45,45,45,1406,45,45,45,45,45,45,45,67,67,67,67,462,67,67,67,67,67,474,67,67,67,67,67,67,67,817,67,67,67,67,25398,542,13112,544,97,97,97,97,559,97,97,97,97,97,571,97,97,97,97,97,97,896,97,97,97,900,97,97,97,97,97,97,912,914,97,97,97,97,97,0,0,0,45,45,45,45,45,45,45,45,391,45,45,45,45,45,45,45,45,713,45,45,45,45,45,45,45,45,45,45,45,45,45,45,662,45,1140,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,636,67,67,1283,67,67,67,67,67,67,67,67,67,67,67,67,67,513,67,67,1363,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,889,97,97,97,1714,0,97,97,97,97,97,97,97,97,97,0,0,926,45,45,45,45,45,45,45,45,672,45,45,45,45,45,45,45,45,686,45,45,45,45,45,45,45,45,944,45,45,45,45,45,45,45,45,1676,45,45,45,45,45,45,67,97,97,97,1833,0,97,97,97,97,97,0,0,0,97,97,97,97,97,97,45,45,45,45,1902,45,45,45,45,45,957,45,45,45,45,961,45,963,45,45,45,67,97,2034,0,97,97,97,97,97,2040,45,45,45,2042,67,67,67,67,67,67,1574,67,67,67,67,67,1578,67,67,67,67,67,67,799,67,67,67,804,67,67,67,67,67,67,67,1298,0,0,0,1304,0,0,0,1310,132,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,45,45,45,1414,45,45,45,45,45,45,45,45,45,45,428,45,45,45,45,45,57889,0,0,54074,54074,550,831,97,97,97,97,97,97,97,97,97,568,97,97,97,97,578,97,45,45,968,45,45,45,45,45,45,45,45,45,45,45,45,45,1228,45,45,67,67,67,67,67,25398,1082,13112,1086,54074,1090,0,0,0,0,0,0,364,0,0,0,139,2158592,2158592,2158592,2404352,2412544,67,67,67,67,1464,67,67,67,67,67,67,67,67,67,67,67,510,67,67,67,67,97,97,97,97,1519,97,97,97,97,97,97,97,97,97,97,97,918,97,0,0,0,0,1528,45,45,45,45,45,45,45,45,45,45,45,45,45,45,976,45,1554,45,45,45,45,45,45,45,45,1562,45,45,1565,45,45,45,45,683,45,45,45,687,45,45,692,45,45,45,45,45,1953,45,67,67,67,67,67,67,67,67,67,1014,67,67,67,67,67,67,1568,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,0,67,67,67,67,67,1585,67,67,67,67,67,67,67,67,67,1594,97,97,1649,97,97,97,0,45,45,1653,45,45,45,45,45,45,383,45,45,45,45,45,45,45,45,45,986,45,45,45,45,45,45,45,45,1670,45,1672,45,45,45,45,45,45,45,45,45,45,67,736,67,67,67,67,67,741,67,67,67,1680,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1074,67,67,67,1692,67,67,67,67,67,67,67,1697,67,1699,67,67,67,67,67,67,1012,67,67,67,67,67,67,67,67,67,468,475,67,67,67,67,67,67,1769,67,67,67,67,67,67,67,97,97,97,97,97,97,97,624,97,97,97,97,97,97,634,97,97,1792,97,97,97,97,97,97,97,45,45,45,45,45,45,45,958,45,45,45,45,45,45,964,45,150,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,977,204,45,67,67,67,217,67,67,67,67,67,67,67,67,67,67,787,67,67,67,67,67,67,67,67,67,67,271,67,0,24850,12564,0,0,0,0,28809,53531,97,97,97,97,351,97,0,40976,0,18,18,24,24,27,27,27,45,45,938,45,45,45,45,45,45,45,45,45,45,45,45,45,1398,45,45,45,153,45,161,45,45,45,45,45,45,45,45,45,45,45,45,660,661,45,45,205,45,67,67,67,67,220,67,228,67,67,67,67,67,67,67,0,0,0,0,0,280,94,0,0,67,67,67,67,67,272,67,0,24850,12564,0,0,0,0,28809,53531,97,97,97,97,352,97,0,40976,0,18,18,24,24,27,27,27,45,439,45,45,45,45,45,445,45,45,45,452,45,45,67,67,212,216,67,67,67,67,67,241,67,246,67,252,67,67,486,67,67,67,67,67,67,67,494,67,67,67,67,67,67,67,1245,67,67,67,67,67,67,67,67,1013,67,67,1016,67,67,67,67,67,521,67,67,525,67,67,67,67,67,531,67,67,67,538,67,0,0,2046,97,97,97,45,45,67,67,0,0,97,97,45,45,45,1192,45,45,45,45,45,45,45,45,45,45,45,45,1418,45,45,1421,97,97,583,97,97,97,97,97,97,97,591,97,97,97,97,97,97,913,97,97,97,97,97,97,0,0,0,45,45,45,45,45,45,45,1384,97,618,97,97,622,97,97,97,97,97,628,97,97,97,635,97,18,131427,0,0,0,639,0,132,362,0,0,365,29315,367,0,921,29315,0,0,0,0,45,45,45,45,932,45,45,45,45,45,1544,45,45,45,45,45,1550,45,45,45,45,45,1194,45,1196,45,45,45,45,45,45,45,45,999,45,45,45,45,45,67,67,45,45,667,45,45,45,45,45,45,45,45,45,45,45,45,45,1408,45,45,45,696,45,45,45,701,45,45,45,45,45,45,45,45,710,45,45,45,1220,45,45,45,45,45,45,45,45,45,45,45,45,194,45,45,45,729,45,45,45,45,45,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,797,67,67,67,67,67,67,805,67,67,67,67,67,67,67,1587,67,1589,67,67,67,67,67,67,67,67,1763,67,67,67,67,67,67,67,0,0,0,0,0,0,2162968,0,0,67,67,67,67,67,814,816,67,67,67,67,67,25398,542,13112,544,67,67,1008,67,67,67,67,67,67,67,67,67,67,67,1020,67,0,97,45,67,0,97,45,67,0,97,45,67,97,0,0,97,97,97,97,97,45,45,45,45,67,67,67,67,1429,67,1430,67,67,67,67,67,1062,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,518,1076,67,67,67,67,25398,0,13112,0,54074,0,0,0,0,0,0,0,0,28809,0,139,45,45,45,45,45,97,97,97,97,1102,97,97,97,97,97,97,97,97,97,97,97,1124,97,1126,97,97,1114,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1112,97,97,1156,97,97,97,97,97,97,97,97,97,97,97,97,97,594,97,97,97,97,1170,97,97,97,97,0,921,0,0,0,0,0,0,45,45,45,45,1532,45,45,45,45,1536,45,45,45,45,45,172,45,45,45,45,45,45,45,45,45,45,706,45,45,709,45,45,1177,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1202,45,1204,45,45,45,45,45,45,45,45,45,45,45,45,1215,45,45,45,1232,45,45,45,45,45,45,45,67,1237,67,67,67,67,67,67,1053,1054,67,67,67,67,67,67,1061,67,67,1282,67,67,67,67,67,67,67,67,67,1289,67,67,67,1292,97,97,97,97,1339,97,97,97,97,97,97,1344,97,97,97,97,45,1849,45,1851,45,45,45,45,45,45,45,45,721,45,45,45,45,45,726,45,1385,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1188,45,45,1401,1402,45,45,45,45,1405,45,45,45,45,45,45,45,45,1752,45,45,45,45,45,67,67,1410,45,45,45,1413,45,1415,45,45,45,45,45,45,1419,45,45,45,45,1806,45,45,45,45,45,45,67,67,67,67,67,67,67,97,97,2019,0,97,67,67,67,1452,67,67,67,67,67,67,67,67,1457,67,67,67,67,67,67,1259,67,67,67,67,67,67,1264,67,67,1460,67,1462,67,67,67,67,67,67,1466,67,67,67,67,67,67,67,67,1588,67,67,67,67,67,67,67,0,1300,0,0,0,1306,0,0,0,97,97,97,1506,97,97,97,97,97,97,97,97,1512,97,97,97,0,1728,97,97,97,97,97,97,97,97,97,97,97,901,97,97,97,97,1515,97,1517,97,97,97,97,97,97,1521,97,97,97,97,97,97,0,45,1652,45,45,45,1655,45,45,45,45,45,1542,45,45,45,45,45,45,45,45,45,45,45,45,45,1552,1553,45,45,45,1556,45,45,45,45,45,45,45,45,45,45,45,45,45,693,45,45,45,67,67,67,67,1572,67,67,67,67,1576,67,67,67,67,67,67,67,67,1602,67,67,1605,67,67,67,0,67,1582,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1580,67,67,1596,67,67,67,67,67,67,67,67,67,67,67,67,67,0,542,0,544,67,67,67,67,1759,67,67,67,67,67,67,67,67,67,67,67,533,67,67,67,67,67,67,67,1770,67,67,67,67,67,97,97,97,97,97,97,1777,97,97,97,1793,97,97,97,97,97,45,45,45,45,45,45,45,998,45,45,1001,1002,45,45,67,67,45,1861,45,67,67,67,67,67,67,67,67,1871,67,1873,1874,67,0,97,45,67,0,97,45,67,16384,97,45,67,97,0,0,0,1473,0,1082,0,0,0,1475,0,1086,0,0,0,1477,1876,67,97,97,97,97,97,1883,0,1885,97,97,97,1889,0,0,0,286,0,0,0,286,0,2367488,2158592,2158592,2158592,2158592,2158592,2158592,0,40976,0,18,18,24,24,126,126,126,2053,0,2055,45,67,0,97,45,67,0,97,45,67,97,0,0,97,97,97,2039,97,45,45,45,45,67,67,67,67,67,226,67,67,67,67,67,67,67,67,1246,67,67,1249,1250,67,67,67,132,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,141,45,45,45,1403,45,45,45,45,45,45,45,45,45,45,45,45,1186,45,45,1189,45,45,155,45,45,45,45,45,45,45,45,45,191,45,45,45,45,700,45,45,45,45,45,45,45,45,45,45,45,1753,45,45,45,67,67,45,45,67,208,67,67,67,222,67,67,67,67,67,67,67,67,67,1764,67,67,67,67,67,67,67,258,67,67,67,67,67,0,24850,12564,0,0,0,0,28809,53531,97,97,288,97,97,97,302,97,97,97,97,97,97,97,97,97,627,97,97,97,97,97,97,338,97,97,97,97,97,0,40976,0,18,18,24,24,27,27,27,131427,0,0,0,0,362,0,365,28809,367,139,45,370,45,45,45,45,716,45,45,45,45,45,722,45,45,45,45,45,45,1912,67,67,67,67,67,67,67,67,67,819,67,67,25398,542,13112,544,45,403,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1409,45,67,67,67,67,489,67,67,67,67,67,67,67,67,67,67,67,771,67,67,67,67,520,67,67,67,67,67,67,67,67,67,67,67,534,67,67,67,67,67,67,1271,67,67,67,1274,67,67,67,1279,67,67,24850,24850,12564,12564,0,57889,0,0,0,53531,53531,367,286,97,553,97,97,97,97,586,97,97,97,97,97,97,97,97,97,97,97,1138,97,97,97,97,617,97,97,97,97,97,97,97,97,97,97,97,631,97,97,97,0,1834,97,97,97,97,97,0,0,0,97,97,97,97,97,353,0,40976,0,18,18,24,24,27,27,27,45,45,668,45,45,45,45,45,45,45,45,45,45,45,45,45,724,45,45,45,45,45,682,45,45,45,45,45,45,45,45,45,45,45,45,45,949,45,45,45,67,67,747,748,67,67,67,67,755,67,67,67,67,67,67,67,0,0,0,1302,0,0,0,1308,0,67,794,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1701,67,97,97,97,845,846,97,97,97,97,853,97,97,97,97,97,97,0,40976,0,18,18,24,24,27,27,27,97,97,892,97,97,97,97,97,97,97,97,97,97,97,97,97,610,97,97,45,992,45,45,45,45,45,45,45,45,45,45,45,45,67,67,67,1239,67,67,67,1063,67,67,67,67,67,1068,67,67,67,67,67,67,67,0,0,1301,0,0,0,1307,0,0,97,1141,97,97,97,97,97,97,97,97,97,97,97,1152,97,97,0,0,97,97,2001,0,97,2003,97,97,97,45,45,45,1739,45,45,45,1742,45,45,45,45,45,97,97,97,97,1157,97,97,97,97,97,1162,97,97,97,97,97,97,1145,97,97,97,97,97,1151,97,97,97,1253,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,539,45,1423,45,45,67,67,67,67,67,67,67,1431,67,67,67,67,67,67,67,1695,67,67,67,67,67,1700,67,1702,67,67,1439,67,67,67,67,67,67,67,67,67,67,67,67,67,514,67,67,97,97,1492,97,97,97,97,97,97,97,97,97,97,97,97,97,611,97,97,1703,67,67,67,67,67,67,97,97,97,97,97,97,97,97,97,852,97,97,97,97,97,97,45,1949,45,1951,45,45,45,67,67,67,67,67,67,67,1961,67,0,97,45,67,0,97,2060,2061,0,2062,45,67,97,0,0,2036,97,97,97,97,45,45,45,45,67,67,67,67,67,223,67,67,237,67,67,67,67,67,67,67,1272,67,67,67,67,67,67,67,67,507,67,67,67,67,67,67,67,1963,67,67,67,97,97,97,97,0,1972,0,97,97,97,1975,0,921,29315,0,0,0,0,45,45,45,931,45,45,45,45,45,407,45,45,45,45,45,45,45,45,45,417,45,45,1989,67,67,67,67,67,67,67,67,67,67,67,1996,97,18,131427,0,0,360,0,0,0,362,0,0,365,29315,367,0,921,29315,0,0,0,0,45,45,930,45,45,45,45,45,45,444,45,45,45,45,45,45,45,67,67,97,97,1998,0,97,97,97,0,97,97,97,97,97,45,45,45,45,45,45,1985,45,1986,45,45,45,156,45,45,170,45,45,45,45,45,45,45,45,45,45,675,45,45,45,45,679,131427,0,358,0,0,362,0,365,28809,367,139,45,45,45,45,45,381,45,45,45,45,45,45,45,45,45,400,45,45,419,45,45,45,45,45,45,45,45,45,45,45,45,436,67,67,67,67,67,505,67,67,67,67,67,67,67,67,67,67,820,67,25398,542,13112,544,67,67,522,67,67,67,67,67,529,67,67,67,67,67,67,67,0,1299,0,0,0,1305,0,0,0,97,97,619,97,97,97,97,97,626,97,97,97,97,97,97,97,1105,97,97,97,97,1109,97,97,97,67,67,67,67,749,67,67,67,67,67,67,67,67,67,760,67,0,97,45,67,2058,97,45,67,0,97,45,67,97,0,0,97,97,97,97,97,45,45,45,2041,67,67,67,67,67,780,67,67,67,67,67,67,67,67,67,67,67,67,67,516,67,67,97,97,97,878,97,97,97,97,97,97,97,97,97,97,97,97,97,1629,97,0,45,979,45,45,45,45,984,45,45,45,45,45,45,45,45,45,1198,45,45,45,45,45,45,67,1023,67,67,67,67,1028,67,67,67,67,67,67,67,67,67,470,67,67,67,67,67,67,67,67,67,67,67,25398,0,13112,0,54074,0,0,0,1094,0,0,0,1092,1315,0,0,0,0,97,97,97,97,97,97,97,97,97,1486,97,1489,97,97,97,1117,97,97,97,97,1122,97,97,97,97,97,97,97,1146,97,97,97,97,97,97,97,97,881,97,97,97,886,97,97,97,1311,0,0,0,0,0,0,0,0,97,97,97,97,97,97,97,1615,97,97,97,97,97,1619,97,97,97,97,97,97,97,97,97,97,97,97,1631,97,97,1847,97,45,45,45,45,1852,45,45,45,45,45,45,45,1235,45,45,45,67,67,67,67,67,1868,67,67,67,1872,67,67,67,67,67,97,97,97,97,1882,0,0,0,97,97,97,97,0,1891,67,67,67,67,67,97,97,97,97,97,1929,0,0,97,97,97,97,97,97,45,1900,45,1901,45,45,45,1905,45,67,2054,97,45,67,0,97,45,67,0,97,45,67,97,0,0,97,2037,2038,97,97,45,45,45,45,67,67,67,67,1867,67,67,67,67,67,67,67,67,67,1774,97,97,97,97,97,97,0,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,142,45,45,45,1412,45,45,45,45,45,45,45,45,45,45,45,45,432,45,45,45,45,45,157,45,45,171,45,45,45,182,45,45,45,45,200,45,45,45,1543,45,45,45,45,45,45,45,45,1551,45,45,45,45,1181,45,45,45,45,45,45,45,45,45,45,45,1211,45,45,45,1214,45,45,45,67,209,67,67,67,224,67,67,238,67,67,67,249,67,0,97,2056,2057,0,2059,45,67,0,97,45,67,97,0,0,1937,97,97,97,97,97,97,45,45,45,45,45,45,1741,45,45,45,45,45,45,67,67,67,267,67,67,67,0,24850,12564,0,0,0,0,28809,53531,97,97,289,97,97,97,304,97,97,318,97,97,97,329,97,97,0,0,97,1783,97,97,97,97,0,0,97,97,0,97,97,97,45,2026,45,45,45,45,67,2030,67,67,67,67,67,67,1041,67,67,67,67,67,67,67,67,67,1044,67,67,67,67,67,67,97,97,347,97,97,97,0,40976,0,18,18,24,24,27,27,27,45,666,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1420,45,57889,0,0,54074,54074,550,0,97,97,97,97,97,97,97,97,840,67,1007,67,67,67,67,67,67,67,67,67,67,67,67,67,67,759,67,67,67,67,67,67,67,1052,67,67,67,67,67,67,67,67,67,67,1031,67,67,67,67,67,97,97,97,1101,97,97,97,97,97,97,97,97,97,97,97,97,592,97,97,97,1190,45,45,45,45,45,1195,45,1197,45,45,45,45,1201,45,45,45,45,1952,45,45,67,67,67,67,67,67,67,67,67,67,67,67,250,67,67,67,1255,67,1257,67,67,67,67,1261,67,67,67,67,67,67,67,67,1685,67,67,67,67,67,67,67,0,24851,12565,0,0,0,0,28809,53532,67,67,1267,67,67,67,67,67,67,1273,67,67,67,67,67,67,67,67,1696,67,67,67,67,67,67,67,0,0,0,0,0,0,2162688,0,0,1281,67,67,67,67,1285,67,67,67,67,67,67,67,67,67,67,1070,67,67,67,67,67,1335,97,1337,97,97,97,97,1341,97,97,97,97,97,97,97,97,882,97,97,97,97,97,97,97,1347,97,97,97,97,97,97,1353,97,97,97,97,97,97,1361,97,18,131427,0,638,0,0,0,0,362,0,0,365,29315,367,0,544,0,550,0,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2473984,2158592,2158592,2158592,2990080,2158592,2158592,2207744,2207744,2482176,2207744,2207744,2207744,2207744,2207744,2207744,2207744,0,0,0,0,0,0,2162688,0,53530,97,97,97,1365,97,97,97,97,97,97,97,97,97,97,97,97,608,97,97,97,45,45,1424,45,1425,67,67,67,67,67,67,67,67,67,67,67,1058,67,67,67,67,45,1555,45,45,1557,45,45,45,45,45,45,45,45,45,45,45,707,45,45,45,45,67,67,1570,67,67,67,67,67,67,67,67,67,67,67,67,67,773,67,67,1595,67,67,1597,67,67,67,67,67,67,67,67,67,67,67,0,0,0,0,0,0,0,0,0,0,139,2158592,2158592,2158592,2404352,2412544,97,97,97,1636,97,97,97,1639,97,97,1641,97,97,97,97,97,97,1173,0,921,0,0,0,0,0,0,45,67,67,67,1693,67,67,67,67,67,67,67,1698,67,67,67,67,67,67,67,1773,67,97,97,97,97,97,97,97,625,97,97,97,97,97,97,97,97,850,97,97,97,97,97,97,97,97,880,97,97,97,97,97,97,97,97,1106,97,97,97,97,97,97,97,1860,45,45,67,67,1865,67,67,67,67,1870,67,67,67,67,1875,67,67,97,97,1880,97,97,0,0,0,97,97,1888,97,0,0,0,1938,97,97,97,97,97,45,45,45,45,45,45,1854,45,45,45,45,45,45,45,1909,45,45,1911,67,67,67,67,67,67,67,67,67,67,1248,67,67,67,67,67,67,1922,67,67,1924,97,97,97,97,97,0,0,0,97,97,97,97,97,1898,45,45,45,45,45,45,1904,45,45,67,67,67,67,97,97,97,97,0,0,16384,97,97,97,97,0,97,97,97,97,97,97,97,97,97,0,1724,2008,2009,45,45,67,67,67,2014,2015,67,67,97,97,0,0,97,97,97,0,97,97,97,97,97,45,45,45,45,45,45,45,45,45,45,45,45,45,2022,0,2023,97,97,45,45,45,45,45,45,67,67,67,67,67,67,1869,67,67,67,67,67,67,0,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,45,147,151,154,45,162,45,45,176,178,181,45,45,45,192,196,45,45,45,45,2012,67,67,67,67,67,67,2018,97,0,0,97,1978,97,97,97,1982,45,45,45,45,45,45,45,45,45,972,973,45,45,45,45,45,67,259,263,67,67,67,67,0,24850,12564,0,0,0,0,28809,53531,97,97,97,294,298,301,97,309,97,97,323,325,328,97,97,97,97,97,560,97,97,97,569,97,97,97,97,97,97,306,97,97,97,97,97,97,97,97,97,1624,97,97,97,97,97,97,97,0,921,0,1175,0,0,0,0,45,339,343,97,97,97,97,0,40976,0,18,18,24,24,27,27,27,67,67,503,67,67,67,67,67,67,67,67,67,512,67,67,519,97,97,600,97,97,97,97,97,97,97,97,97,609,97,97,616,45,649,45,45,45,45,45,654,45,45,45,45,45,45,45,45,1393,45,45,45,45,45,45,45,45,1209,45,45,45,45,45,45,45,67,763,67,67,67,67,67,67,67,67,770,67,67,67,774,67,0,2045,97,97,97,97,45,45,67,67,0,0,97,97,45,45,45,994,45,45,45,45,45,45,45,45,45,45,67,67,213,67,219,67,67,232,67,242,67,247,67,67,67,779,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1018,67,67,67,67,811,67,67,67,67,67,67,67,67,67,25398,542,13112,544,57889,0,0,54074,54074,550,0,97,834,97,97,97,97,97,839,97,18,131427,0,638,0,0,0,0,362,0,0,365,29315,367,645,97,97,861,97,97,97,97,97,97,97,97,868,97,97,97,872,97,97,877,97,97,97,97,97,97,97,97,97,97,97,97,97,613,97,97,97,97,97,909,97,97,97,97,97,97,97,97,97,0,0,0,18,18,24,24,27,27,27,1036,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1047,67,67,67,1050,67,67,67,67,67,67,67,67,67,67,67,67,1033,67,67,67,97,97,1130,97,97,97,97,97,97,97,97,97,97,97,97,97,638,0,0,67,67,67,1295,67,67,67,0,0,0,0,0,0,0,0,0,97,1317,97,97,97,97,97,97,1375,97,97,97,0,0,0,45,1379,45,45,45,45,45,45,422,45,45,45,429,431,45,45,45,45,0,1090,0,0,97,1479,97,97,97,97,97,97,97,97,97,97,1357,97,97,97,97,97,97,97,97,97,1716,97,97,97,97,97,97,97,97,97,1723,0,921,29315,0,0,0,0,45,929,45,45,45,45,45,45,45,1392,45,45,45,45,45,45,45,45,45,960,45,45,45,45,45,45,97,97,97,1738,45,45,45,45,45,45,45,1743,45,45,45,45,166,45,45,45,45,184,186,45,45,197,45,45,97,1779,0,0,97,97,97,97,97,97,0,0,97,97,0,97,18,131427,0,638,0,0,0,0,362,0,640,365,29315,367,0,921,29315,0,0,0,0,45,45,45,45,45,45,45,45,45,45,1537,45,45,45,45,45,1803,45,45,45,45,45,1809,45,45,45,67,67,67,1814,67,67,67,67,67,67,1821,67,67,67,67,67,67,97,97,97,97,97,0,0,0,97,97,97,97,0,0,67,67,67,1818,67,67,67,67,67,1824,67,67,67,97,97,97,97,97,0,0,0,97,97,97,97,1890,0,1829,97,97,0,0,97,97,1836,97,97,0,0,0,97,97,97,97,1981,45,45,45,45,45,45,45,45,45,1987,1845,97,97,97,45,45,45,45,45,1853,45,45,45,1857,45,45,45,67,1864,67,1866,67,67,67,67,67,67,67,67,67,97,97,97,97,97,97,97,1710,1711,67,67,97,97,97,97,97,0,0,0,1886,97,97,97,0,0,97,97,97,97,1838,0,0,0,97,1843,97,0,1893,97,97,97,97,97,45,45,45,45,45,45,45,45,45,45,1745,45,45,67,67,67,67,67,97,97,97,97,97,0,0,1931,97,97,97,97,97,588,97,97,97,97,97,97,97,97,97,97,629,97,97,97,97,97,67,2044,0,97,97,97,97,45,45,67,67,0,0,97,97,45,45,45,1660,45,45,45,45,45,45,45,45,45,45,45,45,453,45,455,67,67,67,67,268,67,67,67,0,24850,12564,0,0,0,0,28809,53531,97,97,348,97,97,97,0,40976,0,18,18,24,24,27,27,27,131427,0,359,0,0,362,0,365,28809,367,139,45,45,45,45,45,421,45,45,45,45,45,45,45,434,45,45,695,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1667,45,0,921,29315,0,925,0,0,45,45,45,45,45,45,45,45,45,1811,45,67,67,67,67,67,67,1037,67,1039,67,67,67,67,67,67,67,67,67,67,67,67,1277,67,67,67,67,67,67,67,67,25398,0,13112,0,54074,0,0,0,1095,0,0,0,1096,97,97,97,97,97,97,97,97,97,97,97,97,869,97,97,97,97,97,97,1131,97,1133,97,97,97,97,97,97,97,97,97,97,1370,97,97,97,97,97,1312,0,0,0,0,1096,0,0,0,97,97,97,97,97,97,97,1327,97,97,97,97,97,1332,97,97,97,1830,97,0,0,97,97,97,97,97,0,0,0,97,97,97,1896,97,97,45,45,45,45,45,45,45,45,45,1548,45,45,45,45,45,45,133,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,45,45,380,45,45,45,45,45,45,45,45,45,45,401,45,45,158,45,45,45,45,45,45,45,45,45,45,45,45,45,1200,45,45,45,45,206,67,67,67,67,67,225,67,67,67,67,67,67,67,67,754,67,67,67,67,67,67,67,57889,0,0,54074,54074,550,832,97,97,97,97,97,97,97,97,97,1342,97,97,97,97,97,97,67,67,67,67,67,25398,1083,13112,1087,54074,1091,0,0,0,0,0,0,1316,0,831,97,97,97,97,97,97,97,1174,921,0,1175,0,0,0,0,45,0,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,45,148,67,67,264,67,67,67,67,0,24850,12564,0,0,0,0,28809,53531,97,97,97,295,97,97,97,97,313,97,97,97,97,331,333,97,18,131427,356,638,0,0,0,0,362,0,0,365,0,367,0,45,45,1530,45,45,45,45,45,45,45,45,45,45,45,45,988,45,45,45,97,344,97,97,97,97,0,40976,0,18,18,24,24,27,27,27,402,404,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1756,67,438,45,45,45,45,45,45,45,45,449,450,45,45,45,67,67,214,218,221,67,229,67,67,243,245,248,67,67,67,67,67,488,490,67,67,67,67,67,67,67,67,67,67,67,1071,67,1073,67,67,67,67,67,524,67,67,67,67,67,67,67,67,535,536,67,67,67,67,67,67,1683,1684,67,67,67,67,1688,1689,67,67,67,67,67,67,1586,67,67,67,67,67,67,67,67,67,469,67,67,67,67,67,67,97,97,97,585,587,97,97,97,97,97,97,97,97,97,97,97,1163,97,97,97,97,97,97,97,621,97,97,97,97,97,97,97,97,632,633,97,97,0,0,1782,97,97,97,97,97,0,0,97,97,0,97,712,45,45,45,717,45,45,45,45,45,45,45,45,725,45,45,45,163,167,173,177,45,45,45,45,45,193,45,45,45,45,982,45,45,45,45,45,45,987,45,45,45,45,45,1558,45,1560,45,45,45,45,45,45,45,45,704,705,45,45,45,45,45,45,45,45,731,45,45,45,67,67,67,67,67,739,67,67,67,67,67,67,273,0,24850,12564,0,0,0,0,28809,53531,67,67,67,764,67,67,67,67,67,67,67,67,67,67,67,67,1290,67,67,67,67,67,67,812,67,67,67,67,818,67,67,67,25398,542,13112,544,57889,0,0,54074,54074,550,0,97,97,97,97,97,837,97,97,97,97,97,602,97,97,97,97,97,97,97,97,97,97,1137,97,97,97,97,97,97,97,97,97,862,97,97,97,97,97,97,97,97,97,97,97,1627,97,97,97,0,97,97,97,97,910,97,97,97,97,916,97,97,97,0,0,0,97,97,1940,97,97,1942,45,45,45,45,45,45,385,45,45,45,45,395,45,45,45,45,966,45,969,45,45,45,45,45,45,45,45,45,45,975,45,45,45,406,45,45,45,45,45,45,45,45,45,45,45,45,974,45,45,45,67,67,67,67,1010,67,67,67,67,67,67,67,67,67,67,67,1262,67,67,67,67,67,67,67,67,67,1040,67,1042,67,1045,67,67,67,67,67,67,67,97,1706,97,97,97,1709,97,97,97,67,67,67,67,1051,67,67,67,67,67,1057,67,67,67,67,67,67,67,1443,67,67,1446,67,67,67,67,67,67,67,1297,0,0,0,1303,0,0,0,1309,67,67,67,67,1079,25398,0,13112,0,54074,0,0,0,0,0,0,0,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2207744,2207744,2207744,2207744,2207744,2572288,2207744,2207744,2207744,1098,97,97,97,97,97,1104,97,97,97,97,97,97,97,97,97,1356,97,97,97,97,97,97,1128,97,97,97,97,97,97,1134,97,1136,97,1139,97,97,97,97,97,97,1622,97,97,97,97,97,97,97,97,0,921,0,0,0,1176,0,646,45,67,67,67,1268,67,67,67,67,67,67,67,67,67,67,67,67,1469,67,67,67,97,1348,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1127,97,67,1569,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1448,1449,67,1816,67,67,67,67,67,67,67,67,67,1825,67,67,1827,97,97,0,1781,97,97,97,97,97,97,0,0,97,97,0,97,97,97,1831,0,0,97,97,97,97,97,0,0,0,97,97,97,1980,97,45,45,45,45,45,45,45,45,45,45,1395,45,45,45,45,45,97,1846,97,97,45,45,45,45,45,45,45,45,45,45,45,45,1212,45,45,45,45,45,45,2010,45,67,67,67,67,67,2016,67,97,97,0,0,97,97,97,0,97,97,97,97,97,45,45,2007,0,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,143,45,45,45,1671,45,45,45,45,45,45,45,45,45,45,45,67,1813,67,67,1815,45,45,67,210,67,67,67,67,67,67,239,67,67,67,67,67,67,67,1454,67,67,67,67,67,67,67,67,67,1445,67,67,67,67,67,67,97,97,290,97,97,97,97,97,97,319,97,97,97,97,97,97,303,97,97,317,97,97,97,97,97,97,305,97,97,97,97,97,97,97,97,97,899,97,97,97,97,97,97,375,45,45,45,379,45,45,390,45,45,394,45,45,45,45,45,443,45,45,45,45,45,45,45,45,67,67,67,67,67,461,67,67,67,465,67,67,476,67,67,480,67,67,67,67,67,67,1694,67,67,67,67,67,67,67,67,67,1288,67,67,67,67,67,67,500,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1075,97,97,97,558,97,97,97,562,97,97,573,97,97,577,97,97,97,97,97,895,97,97,97,97,97,97,903,97,97,97,0,97,97,1638,97,97,97,97,97,97,97,97,1646,597,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1334,45,681,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1396,45,45,1399,45,45,730,45,45,45,45,67,67,67,67,67,67,67,67,67,67,1434,67,67,67,67,67,67,750,67,67,67,67,67,67,67,67,67,67,1456,67,67,67,67,67,45,45,993,45,45,45,45,45,45,45,45,45,45,45,67,67,1238,67,67,1006,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1280,1048,1049,67,67,67,67,67,67,67,67,67,67,1059,67,67,67,67,67,67,1286,67,67,67,67,67,67,67,1291,67,97,97,1100,97,97,97,97,97,97,97,97,97,97,97,97,97,638,0,920,97,97,1142,1143,97,97,97,97,97,97,97,97,97,97,1153,97,97,97,97,97,1158,97,97,97,1161,97,97,97,97,1166,97,97,97,97,97,1325,97,97,97,97,97,97,97,97,97,97,1328,97,97,97,97,97,97,97,45,1218,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1678,45,45,45,67,67,67,67,67,1269,67,67,67,67,67,67,67,67,1278,67,67,67,67,67,67,1761,67,67,67,67,67,67,67,67,67,530,67,67,67,67,67,67,97,97,1349,97,97,97,97,97,97,97,97,1358,97,97,97,97,97,97,1623,97,97,97,97,97,97,97,97,0,921,0,0,926,0,0,0,45,45,1411,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1754,45,45,67,67,1301,0,1307,0,1313,97,97,97,97,97,97,97,97,97,97,97,21054,97,97,97,97,67,1757,67,67,67,1760,67,67,67,67,67,67,67,67,67,67,1467,67,67,67,67,67,1778,97,0,0,97,97,97,97,97,97,0,0,97,97,0,97,97,97,97,97,1352,97,97,97,97,97,97,97,97,97,97,1511,97,97,97,97,97,67,67,67,67,67,1820,67,1822,67,67,67,67,67,97,97,97,97,97,0,0,0,97,1933,97,1892,97,97,97,97,97,97,1899,45,45,45,45,45,45,45,45,1664,45,45,45,45,45,45,45,45,1546,45,45,45,45,45,45,45,45,1208,45,45,45,45,45,45,45,45,1224,45,45,45,45,45,45,45,45,673,45,45,45,45,45,45,45,67,67,67,67,67,1925,97,97,97,97,0,0,0,97,97,97,97,97,623,97,97,97,97,97,97,97,97,97,97,307,97,97,97,97,97,97,97,97,97,1796,97,45,45,45,45,45,45,45,970,45,45,45,45,45,45,45,45,1417,45,45,45,45,45,45,45,67,1964,67,67,97,97,97,97,0,0,0,97,97,97,97,0,97,97,97,97,97,97,1721,97,97,0,0,1997,97,0,0,2e3,97,97,0,97,97,97,97,97,45,45,45,45,733,45,67,67,67,67,67,67,67,67,67,67,803,67,67,67,67,67,0,94242,0,0,0,38,102439,0,0,106538,98347,28809,45,45,144,45,45,45,1805,45,1807,45,45,45,45,45,67,67,67,67,67,67,231,67,67,67,67,67,67,67,0,24850,12564,0,0,0,0,28809,53531,45,45,67,211,67,67,67,67,230,234,240,244,67,67,67,67,67,67,464,67,67,67,67,67,67,479,67,67,67,260,67,67,67,67,67,0,24850,12564,0,0,0,0,28809,53531,97,97,291,97,97,97,97,310,314,320,324,97,97,97,97,97,97,1367,97,97,97,97,97,97,97,97,97,1355,97,97,97,97,97,97,1362,340,97,97,97,97,97,0,40976,0,18,18,24,24,27,27,27,131427,0,0,360,0,362,0,365,28809,367,139,369,45,45,45,374,67,67,460,67,67,67,67,466,67,67,67,67,67,67,67,67,801,67,67,67,67,67,67,67,67,67,487,67,67,67,67,67,67,67,67,67,67,498,67,67,67,67,67,67,1772,67,67,97,97,97,97,97,97,97,0,921,922,1175,0,0,0,0,45,67,502,67,67,67,67,67,67,67,508,67,67,67,515,517,67,67,67,67,67,97,97,97,97,97,0,0,0,1932,97,97,0,1999,97,97,97,0,97,97,2004,2005,97,45,45,45,45,1193,45,45,45,45,45,45,45,45,45,45,45,676,45,45,45,45,67,24850,24850,12564,12564,0,57889,0,0,0,53531,53531,367,286,552,97,97,97,97,97,1377,0,0,45,45,45,45,45,45,45,45,655,45,45,45,45,45,45,45,97,97,557,97,97,97,97,563,97,97,97,97,97,97,97,97,1135,97,97,97,97,97,97,97,97,97,584,97,97,97,97,97,97,97,97,97,97,595,97,97,97,97,97,911,97,97,97,97,97,97,97,638,0,0,0,0,1315,0,0,0,0,97,97,97,1319,97,97,97,0,97,97,97,97,97,97,1733,97,97,97,97,97,97,1340,97,97,97,1343,97,97,1345,97,1346,97,599,97,97,97,97,97,97,97,605,97,97,97,612,614,97,97,97,97,97,1794,97,97,97,45,45,45,45,45,45,45,1207,45,45,45,45,45,45,1213,45,45,745,67,67,67,67,751,67,67,67,67,67,67,67,67,67,67,1577,67,67,67,67,67,762,67,67,67,67,766,67,67,67,67,67,67,67,67,67,67,1765,67,67,67,67,67,777,67,67,781,67,67,67,67,67,67,67,67,67,67,67,67,1592,1593,67,67,97,843,97,97,97,97,849,97,97,97,97,97,97,97,97,97,1510,97,97,97,97,97,97,97,860,97,97,97,97,864,97,97,97,97,97,97,97,97,97,1797,45,45,45,45,1801,45,97,875,97,97,879,97,97,97,97,97,97,97,97,97,97,97,1522,97,97,97,97,97,991,45,45,45,45,996,45,45,45,45,45,45,45,45,67,67,215,67,67,67,67,233,67,67,67,67,251,253,1022,67,67,67,1026,67,67,67,67,67,67,67,67,67,67,1035,67,67,1038,67,67,67,67,67,67,67,67,67,67,67,67,67,1458,67,67,67,67,67,1064,67,67,67,1067,67,67,67,67,1072,67,67,67,67,67,67,1296,0,0,0,0,0,0,0,0,0,2367488,2158592,2158592,2158592,2158592,2158592,2158592,67,67,67,67,67,25398,0,13112,0,54074,0,0,0,0,1096,0,921,29315,0,0,0,0,928,45,45,45,45,45,934,45,45,45,164,45,45,45,45,45,45,45,45,45,198,45,45,45,378,45,45,45,45,45,45,393,45,45,45,398,45,97,97,1116,97,97,97,1120,97,97,97,97,97,97,97,97,97,1147,1148,97,97,97,97,97,97,97,1129,97,97,1132,97,97,97,97,97,97,97,97,97,97,97,1626,97,97,97,97,0,45,1178,45,45,45,45,45,45,45,45,45,1185,45,45,45,45,441,45,45,45,45,45,45,451,45,45,67,67,67,67,67,227,67,67,67,67,67,67,67,67,1260,67,67,67,1263,67,67,1265,1203,45,45,1205,45,1206,45,45,45,45,45,45,45,45,45,1216,67,1266,67,67,67,67,67,67,67,67,67,1276,67,67,67,67,67,67,492,67,67,67,67,67,67,67,67,67,471,67,67,67,67,481,67,45,1386,45,1389,45,45,45,45,1394,45,45,45,1397,45,45,45,45,995,45,997,45,45,45,45,45,45,45,67,67,67,67,1915,67,67,67,67,67,1422,45,45,45,67,67,67,67,67,67,67,67,67,1433,67,1436,67,67,67,67,1441,67,67,67,1444,67,67,67,67,67,67,67,0,24850,12564,0,0,0,281,28809,53531,97,97,97,97,1494,97,97,97,1497,97,97,97,97,97,97,97,1368,97,97,97,97,97,97,97,97,851,97,97,97,97,97,97,97,67,67,67,1571,67,67,67,67,67,67,67,67,67,67,67,67,25398,542,13112,544,67,67,1583,67,67,67,67,67,67,67,67,1591,67,67,67,67,67,67,752,67,67,67,67,67,67,67,67,67,1056,67,67,67,67,67,67,97,1634,97,0,97,97,97,97,97,97,97,97,97,97,97,97,1125,97,97,97,1647,97,97,97,97,97,0,45,45,45,45,45,45,45,45,45,1183,45,45,45,45,45,45,45,45,45,409,45,45,45,45,45,45,1658,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1668,1712,97,97,97,0,97,97,97,97,97,97,97,97,97,0,0,1835,97,97,97,97,0,0,0,97,97,1844,97,97,1726,0,97,97,97,97,97,1732,97,1734,97,97,97,97,97,300,97,308,97,97,97,97,97,97,97,97,866,97,97,97,97,97,97,97,67,67,67,1758,67,67,67,1762,67,67,67,67,67,67,67,67,1043,67,67,67,67,67,67,67,67,67,67,67,67,1771,67,67,67,97,97,97,97,97,1776,97,97,97,97,297,97,97,97,97,97,97,97,97,97,97,97,1108,97,97,97,97,67,67,67,1966,97,97,97,1970,0,0,0,97,97,97,97,0,97,97,97,1720,97,97,97,97,97,0,0,97,97,97,1837,97,0,1840,1841,97,97,97,1988,45,67,67,67,67,67,67,67,67,67,1994,1995,67,97,97,97,97,97,1103,97,97,97,97,97,97,97,97,97,97,917,97,97,0,0,0,67,67,265,67,67,67,67,0,24850,12564,0,0,0,0,28809,53531,97,345,97,97,97,97,0,40976,0,18,18,24,24,27,27,27,131427,0,0,0,361,362,0,365,28809,367,139,45,45,45,45,45,671,45,45,45,45,45,45,45,45,45,45,411,45,45,414,45,45,45,45,377,45,45,45,386,45,45,45,45,45,45,45,45,45,1223,45,45,45,45,45,45,45,45,45,426,45,45,433,45,45,45,67,67,67,67,67,463,67,67,67,472,67,67,67,67,67,67,67,527,67,67,67,67,67,67,537,67,540,24850,24850,12564,12564,0,57889,0,0,0,53531,53531,367,286,97,97,97,97,97,1119,97,97,97,97,97,97,97,97,97,97,1509,97,97,97,97,97,97,97,97,564,97,97,97,97,97,97,97,637,18,131427,0,0,0,0,0,0,362,0,0,365,29315,367,0,921,29315,0,0,0,927,45,45,45,45,45,45,45,45,45,1234,45,45,45,45,67,67,67,67,1240,45,697,45,45,45,45,45,45,45,45,45,45,708,45,45,45,45,1221,45,45,45,45,1225,45,45,45,45,45,45,384,45,45,45,45,45,45,45,45,45,1210,45,45,45,45,45,45,67,67,795,67,67,67,67,67,67,67,67,67,67,67,67,67,1470,67,67,67,67,67,67,67,815,67,67,67,67,67,67,25398,542,13112,544,97,97,97,893,97,97,97,97,97,97,97,97,97,97,97,97,1164,97,97,97,67,67,67,1025,67,67,67,67,67,67,67,67,67,67,67,67,1687,67,67,67,67,67,67,67,67,67,25398,0,13112,0,54074,0,0,0,0,0,1097,1241,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1450,45,45,1388,45,1390,45,45,45,45,45,45,45,45,45,45,45,1236,67,67,67,67,67,1437,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1472,1490,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1503,67,67,67,67,67,97,97,97,97,97,0,1930,0,97,97,97,97,97,847,97,97,97,97,97,97,97,97,97,858,67,67,1965,67,97,97,97,97,0,0,0,97,97,97,97,0,97,97,1719,97,97,97,97,97,97,0,0,0,45,45,45,45,1382,45,1383,45,45,45,159,45,45,45,45,45,45,45,45,45,45,45,45,45,1563,45,45,45,45,45,67,261,67,67,67,67,67,0,24850,12564,0,0,0,0,28809,53531,341,97,97,97,97,97,0,40976,0,18,18,24,24,27,27,27,97,1099,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1333,97,1230,45,45,45,45,45,45,45,45,45,45,67,67,67,67,67,67,1992,67,1993,67,67,67,97,97,45,45,160,45,45,45,45,45,45,45,45,45,45,45,45,45,1665,45,45,45,45,45,131427,357,0,0,0,362,0,365,28809,367,139,45,45,45,45,45,684,45,45,45,45,45,45,45,45,45,45,412,45,45,45,416,45,45,45,440,45,45,45,45,45,45,45,45,45,45,45,67,67,1990,67,1991,67,67,67,67,67,67,67,97,97,1707,97,97,97,97,97,97,501,67,67,67,67,67,67,67,67,67,67,67,67,67,67,67,1691,67,67,67,67,67,526,67,67,67,67,67,67,67,67,67,67,1030,67,1032,67,67,67,67,598,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,1632,0,921,29315,923,0,0,0,45,45,45,45,45,45,45,45,45,1404,45,45,45,45,45,45,45,45,45,425,45,45,45,45,45,45,67,67,67,67,67,25398,0,13112,0,54074,0,0,1093,0,0,0,0,0,97,1609,97,97,97,97,97,97,97,97,97,1369,97,97,97,1372,97,97,67,67,266,67,67,67,67,0,24850,12564,0,0,0,0,28809,53531,97,346,97,97,97,97,0,40976,0,18,18,24,24,27,27,27,665,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,1677,45,45,45,45,67,45,45,954,45,956,45,45,45,45,45,45,45,45,45,45,45,1545,45,45,45,45,45,45,45,45,45,448,45,45,45,45,67,456,67,67,67,67,67,1270,67,67,67,67,67,67,67,67,67,67,1069,67,67,67,67,67,67,97,97,97,1350,97,97,97,97,97,97,97,97,97,97,97,97,1524,97,97,97,97,97,97,97,1376,0,0,0,45,45,45,45,45,45,45,45,1559,1561,45,45,45,1564,45,1566,1567,45,67,67,67,67,67,1573,67,67,67,67,67,67,67,67,67,67,1247,67,67,67,67,67,1252,97,1725,97,0,97,97,97,97,97,97,97,97,97,97,97,97,1628,97,1630,0,0,94242,0,0,0,2211840,0,1118208,0,0,0,0,2158592,2158731,2158592,2158592,2158592,3117056,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,3018752,2158592,3043328,2158592,2158592,2158592,2158592,3080192,2158592,2158592,3112960,2158592,2158592,2158592,2158592,2158592,2158878,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2605056,2158592,2158592,2207744,0,542,0,544,0,0,2166784,0,0,0,550,0,0,2158592,2158592,2686976,2158592,2715648,2158592,2158592,2158592,2158592,2158592,2158592,2158592,2867200,2158592,2904064,2158592,2158592,2158592,2158592,2158592,2158592,2158592,0,94242,0,0,0,2211840,0,0,1130496,0,0,0,2158592,2158592,2158592,2158592,2158592,3186688,2158592,0,0,139,0,0,0,139,0,2367488,2207744,0,0,0,0,176128,0,2166784,0,0,0,0,0,286,2158592,2158592,3170304,3174400,2158592,0,0,0,2158592,2158592,2158592,2158592,2158592,2424832,2158592,2158592,2158592,1508,2158592,2908160,2158592,2158592,2158592,2977792,2158592,2158592,2158592,2158592,3039232,2158592,2158592,2158592,2158592,2158592,2158592,3158016,67,24850,24850,12564,12564,0,0,0,0,0,53531,53531,0,286,97,97,97,97,97,1144,97,97,97,97,97,97,97,97,97,97,1149,97,97,97,97,1154,57889,0,0,0,0,550,0,97,97,97,97,97,97,97,97,97,561,97,97,97,97,97,97,576,97,97,139264,139264,139264,139264,139264,139264,139264,139264,139264,139264,139264,139264,0,0,139264,0,921,29315,0,0,926,0,45,45,45,45,45,45,45,45,45,719,720,45,45,45,45,45,45,45,45,685,45,45,45,45,45,45,45,45,45,942,45,45,946,45,45,45,950,45,45,0,2146304,2146304,0,0,0,0,2224128,2224128,2224128,2232320,2232320,2232320,2232320,0,0,1301,0,0,0,0,0,1307,0,0,0,0,0,1313,0,0,0,0,0,0,0,97,97,1318,97,97,97,97,97,97,1795,97,97,45,45,45,45,45,45,45,446,45,45,45,45,45,45,67,67,2158592,2146304,0,0,0,0,0,0,0,2211840,0,0,0,0,2158592,0,921,29315,0,924,0,0,45,45,45,45,45,45,45,45,45,1e3,45,45,45,45,67,67], +a.EXPECTED=[290,300,304,353,296,309,305,319,315,324,328,352,354,334,338,330,320,345,349,293,358,362,341,366,312,370,374,378,382,386,390,394,398,737,402,634,439,604,634,634,634,634,408,634,634,634,404,634,634,634,457,634,634,963,634,634,413,634,634,634,634,634,634,634,663,418,422,903,902,426,431,548,634,437,521,919,443,615,409,449,455,624,731,751,634,461,465,672,470,469,474,481,485,477,489,493,629,542,497,505,603,602,991,648,510,804,634,515,958,526,525,530,768,634,546,552,711,710,593,558,562,618,566,570,574,578,582,586,590,608,612,660,822,821,634,622,596,444,628,533,724,633,640,653,647,652,536,1008,451,450,445,657,670,676,685,689,693,697,701,704,707,715,719,798,815,634,723,762,996,634,728,969,730,735,908,634,741,679,889,511,747,634,750,755,499,666,499,501,759,772,776,780,634,787,784,797,802,809,808,427,814,1006,517,634,519,853,634,813,850,793,634,819,826,833,832,837,843,847,857,861,863,867,871,875,879,883,643,887,539,980,979,634,893,944,634,900,896,634,907,933,506,912,917,828,433,636,635,554,961,923,930,927,937,941,634,634,634,974,948,952,985,913,968,967,743,634,973,839,634,978,599,634,984,989,765,444,995,1e3,634,1003,790,955,1012,681,634,634,634,634,634,414,1016,1020,1024,1085,1027,1090,1090,1046,1080,1137,1108,1215,1049,1032,1039,1085,1085,1085,1085,1058,1062,1068,1085,1086,1090,1090,1091,1072,1064,1107,1090,1090,1090,1118,1123,1138,1078,1074,1084,1085,1085,1085,1087,1090,1062,1052,1060,1114,1062,1104,1085,1085,1090,1090,1028,1122,1063,1128,1139,1127,1158,1085,1085,1151,1090,1090,1090,1095,1090,1132,1073,1136,1143,1061,1150,1085,1155,1098,1101,1146,1162,1169,1101,1185,1151,1090,1110,1173,1054,1087,1109,1177,1165,1089,1204,1184,1107,1189,1193,1088,1197,1180,1201,1208,1042,1212,1219,1223,1227,1231,1235,1245,1777,1527,1686,1686,1238,1686,1254,1686,1686,1686,1294,1669,1686,1686,1686,1322,1625,1534,1268,1624,1275,1281,1443,1292,1300,1686,1686,1686,1350,1826,1306,1686,1686,1240,2032,1317,1321,1686,1686,1253,1686,1326,1686,1686,1686,1418,1709,1446,1686,1686,1686,1492,1686,1295,1447,1686,1686,1258,1686,1736,1686,1686,1520,1355,1686,1288,1348,1361,1686,1359,1686,1364,1498,1368,1302,1362,1381,1389,1395,1486,1686,1371,1377,1370,1686,1375,1382,1384,1402,1408,1385,1383,1619,1413,1423,1428,1433,1686,1686,1270,1686,1338,1686,1440,1686,1686,1686,1499,1465,1686,1686,1686,1639,1473,1884,1686,1686,1293,1864,1686,1686,1296,1321,1483,1686,1686,1686,1646,1686,1748,1496,1686,1418,1675,1686,1418,1702,1686,1418,1981,1686,1429,1409,1427,1504,1692,1686,1686,1313,1448,1651,1508,1686,1686,1340,1686,1903,1686,1686,1435,1513,1686,1283,1287,1519,1686,1524,1363,1568,1938,1539,1566,1579,1479,1533,1538,1553,1544,1552,1557,1563,1574,1557,1583,1589,1590,1759,1594,1603,1607,1611,1686,1436,1514,1686,1434,1656,1686,1434,1680,1686,1453,1686,1686,1686,1559,1617,1686,1770,1418,1623,1769,1629,1686,1515,1335,1686,1285,1686,1671,1921,1650,1686,1686,1344,1308,1666,1686,1686,1686,1659,1685,1686,1686,1686,1686,1241,1686,1686,1844,1691,1686,1630,1977,1970,1362,1686,1686,1686,1693,1698,1686,1686,1686,1697,1686,1764,1715,1686,1634,1638,1686,1599,1585,1686,1271,1686,1269,1686,1721,1686,1686,1354,1686,1801,1686,1799,1686,1640,1686,1686,1461,1686,1686,1732,1686,1944,1686,1740,1686,1746,1415,1396,1686,1598,1547,1417,1597,1416,1577,1546,1397,1577,1547,1548,1570,1398,1753,1686,1652,1509,1686,1686,1686,1757,1686,1419,1686,1763,1418,1768,1781,1686,1686,1686,1705,1686,2048,1792,1686,1686,1686,1735,1686,1797,1686,1686,1404,1686,1639,1815,1686,1686,1418,2017,1820,1686,1686,1803,1686,1686,1686,1736,1489,1686,1686,1825,1338,1260,1263,1686,1686,1785,1686,1686,1728,1686,1686,1749,1497,1830,1830,1262,1248,1261,1329,1260,1264,1329,1248,1249,1259,1540,1849,1842,1686,1686,1835,1686,1686,1816,1686,1686,1831,1882,1848,1686,1686,1686,1774,2071,1854,1686,1686,1469,1884,1686,1821,1859,1686,1686,1350,1883,1686,1686,1686,1781,1391,1875,1686,1686,1613,1644,1686,1686,1889,1686,1686,1662,1884,1686,1885,1890,1686,1686,1686,1894,1686,1686,1678,1686,1907,1686,1686,1529,1914,1686,1838,1686,1686,1881,1686,1686,1872,1876,1836,1919,1686,1837,1692,1910,1686,1925,1928,1742,1686,1811,1811,1930,1810,1929,1935,1928,1900,1942,1867,1868,1931,1035,1788,1948,1952,1956,1960,1964,1686,1976,1686,1686,1686,2065,1686,1992,2037,1686,1686,1998,2009,1972,2002,1686,1686,1686,2077,1300,2023,1686,1686,1686,1807,2031,1686,1686,1686,1860,1500,2032,1686,1686,1686,2083,1686,2036,1686,1277,1276,2042,1877,1686,1686,2041,1686,1686,2027,2037,2012,1686,2012,1855,1850,1686,2046,1686,1686,2054,1996,1686,1897,1309,2059,2052,1686,2058,1686,1686,2081,1686,1717,1477,1686,1331,1686,1686,1687,1686,1860,1681,1686,1686,1686,1966,1724,1686,1686,1686,1984,2015,1686,1686,1686,1988,1686,2063,1686,1686,1686,2005,1686,1727,1686,1686,1711,1457,2069,1686,1686,1686,2019,2075,1686,1686,1915,1686,1686,1793,1874,1686,1686,1491,1362,1449,1686,1686,1460,2098,2087,2091,2095,2184,2102,2113,2780,2117,2134,2142,2281,2146,2146,2146,2304,2296,2181,2639,2591,2872,2592,2873,2313,2195,2200,2281,2146,2273,2226,2204,2152,2219,2276,2167,2177,2276,2235,2276,2276,2230,2281,2276,2296,2276,2293,2276,2276,2276,2276,2234,2276,2311,2314,2210,2199,2217,2222,2276,2276,2276,2240,2276,2294,2276,2276,2173,2276,2198,2281,2281,2281,2281,2282,2146,2146,2146,2146,2205,2146,2204,2248,2276,2235,2276,2297,2276,2276,2276,2277,2256,2281,2283,2146,2146,2146,2275,2276,2295,2276,2276,2293,2146,2304,2264,2269,2221,2276,2276,2276,2293,2295,2276,2276,2276,2295,2263,2205,2268,2220,2172,2276,2276,2276,2296,2276,2276,2296,2294,2276,2276,2278,2281,2281,2280,2281,2281,2281,2283,2206,2223,2276,2276,2279,2281,2281,2146,2273,2276,2276,2281,2281,2281,2276,2292,2276,2298,2225,2276,2298,2169,2224,2292,2298,2171,2229,2281,2281,2171,2236,2281,2281,2281,2146,2275,2225,2292,2299,2276,2229,2281,2146,2276,2290,2297,2283,2146,2146,2274,2224,2227,2298,2225,2297,2276,2230,2170,2230,2282,2146,2147,2151,2156,2288,2276,2230,2303,2308,2236,2284,2228,2318,2318,2318,2326,2335,2339,2343,2349,2416,2693,2357,2592,2109,2592,2592,2162,2943,2823,2646,2592,2361,2592,2122,2592,2592,2122,2470,2592,2592,2592,2109,2107,2592,2592,2592,2123,2592,2592,2592,2125,2592,2413,2592,2592,2592,2127,2592,2592,2414,2592,2592,2592,2130,2952,2592,2594,2592,2592,2212,2609,2252,2592,2592,2592,2446,2434,2592,2592,2592,2212,2446,2450,2456,2431,2435,2592,2592,2243,2478,2448,2439,2946,2592,2592,2592,2368,2809,2813,2450,2441,2212,2812,2449,2440,2947,2592,2592,2592,2345,2451,2457,2948,2592,2124,2592,2592,2650,2823,2449,2455,2946,2592,2128,2592,2592,2649,2952,2592,2810,2448,2461,2991,2467,2592,2592,2329,2817,2474,2990,2466,2592,2592,2373,2447,2992,2469,2592,2592,2592,2373,2447,2477,2468,2592,2592,2353,2469,2592,2495,2592,2592,2415,2483,2592,2415,2496,2592,2592,2352,2592,2592,2352,2352,2469,2592,2592,2363,2331,2494,2592,2592,2592,2375,2592,2375,2415,2504,2592,2592,2367,2372,2503,2592,2592,2592,2389,2418,2415,2592,2592,2373,2592,2592,2592,2593,2732,2417,2415,2592,2417,2520,2592,2592,2592,2390,2521,2521,2592,2592,2592,2401,2599,2585,2526,2531,2120,2592,2212,2426,2450,2463,2948,2592,2592,2592,2213,2389,2527,2532,2121,2542,2551,2105,2592,2213,2592,2592,2592,2558,2538,2544,2553,2557,2537,2543,2552,2421,2572,2576,2546,2543,2547,2592,2592,2373,2615,2575,2545,2105,2592,2244,2479,2592,2129,2592,2592,2628,2690,2469,2562,2566,2592,2592,2592,2415,2928,2934,2401,2570,2574,2564,2572,2585,2590,2592,2592,2585,2965,2592,2592,2592,2445,2251,2592,2592,2592,2474,2592,2609,2892,2592,2362,2592,2592,2138,2851,2159,2592,2592,2592,2509,2888,2892,2592,2592,2592,2490,2418,2891,2592,2592,2376,2592,2592,2374,2592,2889,2388,2592,2373,2373,2890,2592,2592,2387,2592,2887,2505,2892,2592,2373,2610,2388,2592,2592,2376,2373,2592,2887,2891,2592,2374,2592,2592,2608,2159,2614,2620,2592,2592,2394,2594,2887,2399,2592,2887,2397,2508,2374,2507,2592,2375,2592,2592,2592,2595,2508,2506,2592,2506,2505,2505,2592,2507,2637,2505,2592,2592,2401,2661,2592,2643,2592,2592,2417,2592,2655,2592,2592,2592,2510,2414,2656,2592,2592,2592,2516,2592,2593,2660,2665,2880,2592,2592,2592,2522,2767,2666,2881,2592,2592,2420,2571,2696,2592,2592,2592,2580,2572,2686,2632,2698,2592,2383,2514,2592,2163,2932,2465,2685,2631,2697,2592,2388,2592,2592,2212,2604,2671,2632,2678,2592,2401,2405,2409,2592,2592,2592,2679,2592,2592,2592,2592,2108,2677,2591,2592,2592,2592,2419,2592,2683,2187,2191,2469,2671,2189,2467,2592,2401,2629,2633,2702,2468,2592,2592,2421,2536,2703,2469,2592,2592,2422,2573,2593,2672,2467,2592,2402,2406,2592,2402,2979,2592,2592,2626,2673,2467,2592,2446,2259,2947,2592,2377,2709,2592,2592,2522,2862,2713,2468,2592,2592,2581,2572,2562,2374,2374,2592,2376,2721,2724,2592,2592,2624,2373,2731,2592,2592,2592,2626,2732,2592,2592,2592,2755,2656,2726,2736,2741,2592,2486,2593,2381,2592,2727,2737,2742,2715,2747,2753,2592,2498,2469,2873,2743,2592,2592,2592,2791,2759,2763,2592,2592,2627,2704,2592,2592,2522,2789,2593,2761,2753,2592,2498,2863,2592,2592,2767,2592,2592,2592,2792,2789,2592,2592,2592,2803,2126,2592,2592,2592,2811,2122,2592,2592,2592,2834,2777,2592,2592,2592,2848,2936,2591,2489,2797,2592,2592,2670,2631,2490,2798,2592,2592,2592,2963,2807,2592,2592,2592,2965,2838,2592,2592,2592,2975,2330,2818,2829,2592,2498,2939,2592,2498,2592,2791,2331,2819,2830,2592,2592,2592,2982,2834,2817,2828,2106,2592,2592,2592,2405,2405,2817,2828,2592,2592,2415,2849,2842,2592,2522,2773,2592,2522,2868,2592,2580,2600,2586,2137,2850,2843,2592,2592,2855,2937,2844,2592,2592,2592,2987,2936,2591,2592,2592,2684,2630,2592,2856,2938,2592,2592,2860,2939,2592,2592,2872,2592,2861,2591,2592,2592,2887,2616,2592,2867,2592,2592,2708,2592,2498,2469,2498,2497,2785,2773,2499,2783,2770,2877,2877,2877,2772,2592,2592,2345,2885,2592,2592,2592,2715,2762,2515,2896,2592,2592,2715,2917,2516,2897,2592,2592,2592,2901,2906,2911,2592,2592,2956,2960,2715,2902,2907,2912,2593,2916,2920,2820,2922,2822,2592,2592,2715,2927,2921,2821,2106,2592,2592,2974,2408,2321,2821,2106,2592,2592,2983,2592,2593,2404,2408,2592,2592,2717,2749,2716,2928,2322,2822,2593,2926,2919,2820,2934,2823,2592,2592,2592,2651,2824,2592,2592,2592,2130,2952,2592,2592,2592,2592,2964,2592,2592,2716,2748,2592,2969,2592,2592,2716,2918,2368,2970,2592,2592,2592,2403,2407,2592,2592,2787,2211,2404,2409,2592,2592,2802,2837,2987,2592,2592,2592,2809,2427,2592,2793,2592,2592,2809,2447,1073741824,2147483648,539754496,542375936,402653184,554434560,571736064,545521856,268451840,335544320,268693630,512,2048,256,1024,0,1024,0,1073741824,2147483648,0,0,0,8388608,0,0,1073741824,1073741824,0,2147483648,537133056,4194304,1048576,268435456,-1073741824,0,0,0,1048576,0,0,0,1572864,0,0,0,4194304,0,134217728,16777216,0,0,32,64,98304,0,33554432,8388608,192,67108864,67108864,67108864,67108864,16,32,4,0,8192,196608,196608,229376,80,4096,524288,8388608,0,0,32,128,256,24576,24600,24576,24576,2,24576,24576,24576,24584,24592,24576,24578,24576,24578,24576,24576,16,512,2048,2048,256,4096,32768,1048576,4194304,67108864,134217728,268435456,262144,134217728,0,128,128,64,16384,16384,16384,67108864,32,32,4,4,4096,262144,134217728,0,0,0,2,0,8192,131072,131072,4096,4096,4096,4096,24576,24576,24576,8,8,24576,24576,16384,16384,16384,24576,24584,24576,24576,24576,16384,24576,536870912,262144,0,0,32,2048,8192,4,4096,4096,4096,786432,8388608,16777216,0,128,16384,16384,16384,32768,65536,2097152,32,32,32,32,4,4,4,4,4,4096,67108864,67108864,67108864,24576,24576,24576,24576,0,16384,16384,16384,16384,67108864,67108864,8,67108864,24576,8,8,8,24576,24576,24576,24578,24576,24576,24576,2,2,2,16384,67108864,67108864,67108864,32,67108864,8,8,24576,2048,2147483648,536870912,262144,262144,262144,67108864,8,24576,16384,32768,1048576,4194304,25165824,67108864,24576,32770,2,4,112,512,98304,524288,50,402653186,1049090,1049091,10,66,100925514,10,66,12582914,0,0,-1678194207,-1678194207,-1041543218,0,32768,0,0,32,65536,268435456,1,1,513,1048577,0,12582912,0,0,0,4,1792,0,0,0,7,29360128,0,0,0,8,0,0,0,12,1,1,0,0,-604102721,-604102721,4194304,8388608,0,0,0,31,925600,997981306,997981306,997981306,0,0,2048,8388608,0,0,1,2,4,32,64,512,8192,0,0,0,245760,997720064,0,0,0,32,0,0,0,3,12,16,32,8,112,3072,12288,16384,32768,65536,131072,7864320,16777216,973078528,0,0,65536,131072,3670016,4194304,16777216,33554432,2,8,48,2048,8192,16384,32768,65536,131072,524288,131072,524288,3145728,4194304,16777216,33554432,65536,131072,2097152,4194304,16777216,33554432,134217728,268435456,536870912,0,0,0,1024,0,8,48,2048,8192,65536,33554432,268435456,536870912,65536,268435456,536870912,0,0,32768,0,0,126,623104,65011712,0,32,65536,536870912,0,0,65536,524288,0,32,65536,0,0,0,2048,0,0,0,15482,245760,-604102721,0,0,0,18913,33062912,925600,-605028352,0,0,0,65536,31,8096,131072,786432,3145728,3145728,12582912,50331648,134217728,268435456,160,256,512,7168,131072,786432,131072,786432,1048576,2097152,12582912,16777216,268435456,1073741824,2147483648,12582912,16777216,33554432,268435456,1073741824,2147483648,3,12,16,160,256,7168,786432,1048576,12582912,16777216,268435456,1073741824,0,8,16,32,128,256,512,7168,786432,1048576,2097152,0,1,2,8,16,7168,786432,1048576,8388608,16777216,16777216,1073741824,0,0,0,0,1,0,0,8,32,128,256,7168,8,32,0,3072,0,8,32,3072,4096,524288,8,32,0,0,3072,4096,0,2048,524288,8388608,8,2048,0,0,1,12,256,4096,32768,262144,1048576,4194304,67108864,0,2048,0,2048,2048,1073741824,-58805985,-58805985,-58805985,0,0,262144,0,0,32,4194304,16777216,134217728,4382,172032,-58982400,0,0,2,28,256,4096,8192,8192,32768,131072,262144,524288,1,2,12,256,4096,0,0,4194304,67108864,134217728,805306368,1073741824,0,0,1,2,12,16,256,4096,1048576,67108864,134217728,268435456,0,512,1048576,4194304,201326592,1879048192,0,0,12,256,4096,134217728,268435456,536870912,12,256,268435456,536870912,0,12,256,0,0,1,32,64,512,0,0,205236961,205236961,0,0,0,1,96,640,1,10976,229376,204996608,0,640,2048,8192,229376,1572864,1572864,2097152,201326592,0,0,0,64,512,2048,229376,1572864,201326592,1572864,201326592,0,0,1,4382,0,1,32,2048,65536,131072,1572864,201326592,131072,1572864,134217728,0,0,524288,524288,0,0,0,-68582786,-68582786,-68582786,0,0,2097152,524288,0,524288,0,0,65536,131072,1572864,0,0,2,4,0,0,65011712,-134217728,0,0,0,0,2,4,120,512,-268435456,0,0,0,2,8,48,64,2048,8192,98304,524288,2097152,4194304,25165824,33554432,134217728,268435456,2147483648,0,0,25165824,33554432,134217728,1879048192,2147483648,0,0,4,112,512,622592,65011712,134217728,-268435456,16777216,33554432,134217728,1610612736,0,0,0,64,98304,524288,4194304,16777216,33554432,0,98304,524288,16777216,33554432,0,65536,524288,33554432,536870912,1073741824,0,65536,524288,536870912,1073741824,0,0,65536,524288,536870912,0,524288,0,524288,524288,1048576,2086666240,2147483648,0,-1678194207,0,0,0,8,32,2048,524288,8388608,0,0,33062912,436207616,2147483648,0,0,32,64,2432,16384,32768,32768,524288,3145728,4194304,25165824,25165824,167772160,268435456,2147483648,0,32,64,384,2048,16384,32768,1048576,2097152,4194304,25165824,32,64,128,256,2048,16384,2048,16384,1048576,4194304,16777216,33554432,134217728,536870912,1073741824,0,0,2048,16384,4194304,16777216,33554432,134217728,805306368,0,0,16777216,134217728,268435456,2147483648,0,622592,622592,622592,8807,8807,434791,0,0,16777216,0,0,0,7,608,8192,0,0,0,3,4,96,512,32,64,8192,0,0,16777216,134217728,0,0,2,4,8192,16384,65536,2097152,33554432,268435456],a.TOKEN=["(0)","ModuleDecl","Annotation","OptionDecl","Operator","Variable","Tag","EndTag","PragmaContents","DirCommentContents","DirPIContents","CDataSectionContents","AttrTest","Wildcard","EQName","IntegerLiteral","DecimalLiteral","DoubleLiteral","PredefinedEntityRef","'\"\"'","EscapeApos","QuotChar","AposChar","ElementContentChar","QuotAttrContentChar","AposAttrContentChar","NCName","QName","S","CharRef","CommentContents","DocTag","DocCommentContents","EOF","'!'","'\"'","'#'","'#)'","''''","'('","'(#'","'(:'","'(:~'","')'","'*'","'*'","','","'-->'","'.'","'/'","'/>'","':'","':)'","';'","'"),token:k,next:function(e){e.pop()}}],CData:[{name:"CDataSectionContents",token:c},{name:g("]]>"),token:c,next:function(e){e.pop()}}],PI:[{name:"DirPIContents",token:l},{name:g("?"),token:l},{name:g("?>"),token:l,next:function(e){e.pop()}}],AposString:[{name:g("''"),token:"string",next:function(e){e.pop()}},{name:"PredefinedEntityRef",token:"constant.language.escape"},{name:"CharRef",token:"constant.language.escape"},{name:"EscapeApos",token:"constant.language.escape"},{name:"AposChar",token:"string"}],QuotString:[{name:g('"'),token:"string",next:function(e){e.pop()}},{name:"PredefinedEntityRef",token:"constant.language.escape"},{name:"CharRef",token:"constant.language.escape"},{name:"EscapeQuot",token:"constant.language.escape"},{name:"QuotChar",token:"string"}]};n.XQueryLexer=function(){return new r(a,m)}},{"./XQueryTokenizer":1,"./lexer":2}]},{},[3])(3)}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){"use strict";var a,r=e("../../lib/oop"),s=e("../behaviour").Behaviour,o=e("../../token_iterator").TokenIterator,i=e("../../lib/lang"),c=["text","paren.rparen","punctuation.operator"],u=["text","paren.rparen","punctuation.operator","comment"],k={},l=function(e){var t=-1;return e.multiSelect&&(t=e.selection.index,k.rangeCount!=e.multiSelect.rangeCount&&(k={rangeCount:e.multiSelect.rangeCount})),k[t]?a=k[t]:void(a=k[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},b=function(){this.add("braces","insertion",function(e,t,n,r,s){var o=n.getCursorPosition(),c=r.doc.getLine(o.row);if("{"==s){l(n);var u=n.getSelectionRange(),k=r.doc.getTextRange(u);if(""!==k&&"{"!==k&&n.getWrapBehavioursEnabled())return{text:"{"+k+"}",selection:!1};if(b.isSaneInsertion(n,r))return/[\]\}\)]/.test(c[o.column])||n.inMultiSelectMode?(b.recordAutoInsert(n,r,"}"),{text:"{}",selection:[1,1]}):(b.recordMaybeInsert(n,r,"{"),{text:"{",selection:[1,1]})}else if("}"==s){l(n);var g=c.substring(o.column,o.column+1);if("}"==g){var m=r.$findOpeningBracket("}",{column:o.column+1,row:o.row});if(null!==m&&b.isAutoInsertedClosing(o,c,s))return b.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==s||"\r\n"==s){l(n);var d="";b.isMaybeInsertedClosing(o,c)&&(d=i.stringRepeat("}",a.maybeInsertedBrackets),b.clearMaybeInsertedClosing());var g=c.substring(o.column,o.column+1);if("}"===g){var f=r.findMatchingBracket({row:o.row,column:o.column+1},"}");if(!f)return null;var h=this.$getIndent(r.getLine(f.row))}else{if(!d)return void b.clearMaybeInsertedClosing();var h=this.$getIndent(c)}var p=h+r.getTabString();return{text:"\n"+p+"\n"+h+d,selection:[1,p.length,1,p.length]}}b.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,r,s){var o=r.doc.getTextRange(s);if(!s.isMultiLine()&&"{"==o){l(n);var i=r.doc.getLine(s.start.row),c=i.substring(s.end.column,s.end.column+1);if("}"==c)return s.end.column++,s;a.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,a,r){if("("==r){l(n);var s=n.getSelectionRange(),o=a.doc.getTextRange(s);if(""!==o&&n.getWrapBehavioursEnabled())return{text:"("+o+")",selection:!1};if(b.isSaneInsertion(n,a))return b.recordAutoInsert(n,a,")"),{text:"()",selection:[1,1]}}else if(")"==r){l(n);var i=n.getCursorPosition(),c=a.doc.getLine(i.row),u=c.substring(i.column,i.column+1);if(")"==u){var k=a.$findOpeningBracket(")",{column:i.column+1,row:i.row});if(null!==k&&b.isAutoInsertedClosing(i,c,r))return b.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(e,t,n,a,r){var s=a.doc.getTextRange(r);if(!r.isMultiLine()&&"("==s){l(n);var o=a.doc.getLine(r.start.row),i=o.substring(r.start.column+1,r.start.column+2);if(")"==i)return r.end.column++,r}}),this.add("brackets","insertion",function(e,t,n,a,r){if("["==r){l(n);var s=n.getSelectionRange(),o=a.doc.getTextRange(s);if(""!==o&&n.getWrapBehavioursEnabled())return{text:"["+o+"]",selection:!1};if(b.isSaneInsertion(n,a))return b.recordAutoInsert(n,a,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){l(n);var i=n.getCursorPosition(),c=a.doc.getLine(i.row),u=c.substring(i.column,i.column+1);if("]"==u){var k=a.$findOpeningBracket("]",{column:i.column+1,row:i.row});if(null!==k&&b.isAutoInsertedClosing(i,c,r))return b.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(e,t,n,a,r){var s=a.doc.getTextRange(r);if(!r.isMultiLine()&&"["==s){l(n);var o=a.doc.getLine(r.start.row),i=o.substring(r.start.column+1,r.start.column+2);if("]"==i)return r.end.column++,r}}),this.add("string_dquotes","insertion",function(e,t,n,a,r){if('"'==r||"'"==r){l(n);var s=r,o=n.getSelectionRange(),i=a.doc.getTextRange(o);if(""!==i&&"'"!==i&&'"'!=i&&n.getWrapBehavioursEnabled())return{text:s+i+s,selection:!1};var c=n.getCursorPosition(),u=a.doc.getLine(c.row),k=u.substring(c.column-1,c.column),b=u.substring(c.column,c.column+1),g=a.getTokenAt(c.row,c.column),m=a.getTokenAt(c.row,c.column+1);if("\\"==k&&g&&/escape/.test(g.type))return null;var d,f=g&&/string/.test(g.type),h=!m||/string/.test(m.type);if(b==s)d=f!==h;else{if(f&&!h)return null;if(f&&h)return null;var p=a.$mode.tokenRe;p.lastIndex=0;var v=p.test(k);p.lastIndex=0;var x=p.test(k);if(v||x)return null;if(b&&!/[\s;,.})\]\\]/.test(b))return null;d=!0}return{text:d?s+s:"",selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,a,r){var s=a.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==s||"'"==s)){l(n);var o=a.doc.getLine(r.start.row),i=o.substring(r.start.column+1,r.start.column+2);if(i==s)return r.end.column++,r}})};b.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),a=new o(t,n.row,n.column);if(!this.$matchTokenType(a.getCurrentToken()||"text",c)){var r=new o(t,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",c))return!1}return a.stepForward(),a.getCurrentTokenRow()!==n.row||this.$matchTokenType(a.getCurrentToken()||"text",u)},b.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},b.recordAutoInsert=function(e,t,n){var r=e.getCursorPosition(),s=t.doc.getLine(r.row);this.isAutoInsertedClosing(r,s,a.autoInsertedLineEnd[0])||(a.autoInsertedBrackets=0),a.autoInsertedRow=r.row,a.autoInsertedLineEnd=n+s.substr(r.column),a.autoInsertedBrackets++},b.recordMaybeInsert=function(e,t,n){var r=e.getCursorPosition(),s=t.doc.getLine(r.row);this.isMaybeInsertedClosing(r,s)||(a.maybeInsertedBrackets=0),a.maybeInsertedRow=r.row,a.maybeInsertedLineStart=s.substr(0,r.column)+n,a.maybeInsertedLineEnd=s.substr(r.column),a.maybeInsertedBrackets++},b.isAutoInsertedClosing=function(e,t,n){return a.autoInsertedBrackets>0&&e.row===a.autoInsertedRow&&n===a.autoInsertedLineEnd[0]&&t.substr(e.column)===a.autoInsertedLineEnd},b.isMaybeInsertedClosing=function(e,t){return a.maybeInsertedBrackets>0&&e.row===a.maybeInsertedRow&&t.substr(e.column)===a.maybeInsertedLineEnd&&t.substr(0,e.column)==a.maybeInsertedLineStart},b.popAutoInsertedClosing=function(){a.autoInsertedLineEnd=a.autoInsertedLineEnd.substr(1),a.autoInsertedBrackets--},b.clearMaybeInsertedClosing=function(){a&&(a.maybeInsertedBrackets=0,a.maybeInsertedRow=-1)},r.inherits(b,s),t.CstyleBehaviour=b}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,n){ +"use strict";function a(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../../lib/oop"),s=e("../behaviour").Behaviour,o=e("../../token_iterator").TokenIterator,i=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,n,r,s){if('"'==s||"'"==s){var i=s,c=r.doc.getTextRange(n.getSelectionRange());if(""!==c&&"'"!==c&&'"'!=c&&n.getWrapBehavioursEnabled())return{text:i+c+i,selection:!1};var u=n.getCursorPosition(),k=r.doc.getLine(u.row),l=k.substring(u.column,u.column+1),b=new o(r,u.row,u.column),g=b.getCurrentToken();if(l==i&&(a(g,"attribute-value")||a(g,"string")))return{text:"",selection:[1,1]};if(g||(g=b.stepBackward()),!g)return;for(;a(g,"tag-whitespace")||a(g,"whitespace");)g=b.stepBackward();var m=!l||l.match(/\s/);if(a(g,"attribute-equals")&&(m||">"==l)||a(g,"decl-attribute-equals")&&(m||"?"==l))return{text:i+i,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,a,r){var s=a.doc.getTextRange(r);if(!r.isMultiLine()&&('"'==s||"'"==s)){var o=a.doc.getLine(r.start.row),i=o.substring(r.start.column+1,r.start.column+2);if(i==s)return r.end.column++,r}}),this.add("autoclosing","insertion",function(e,t,n,r,s){if(">"==s){var i=n.getCursorPosition(),c=new o(r,i.row,i.column),u=c.getCurrentToken()||c.stepBackward();if(!u||!(a(u,"tag-name")||a(u,"tag-whitespace")||a(u,"attribute-name")||a(u,"attribute-equals")||a(u,"attribute-value")))return;if(a(u,"reference.attribute-value"))return;if(a(u,"attribute-value")){var k=u.value.charAt(0);if('"'==k||"'"==k){var l=u.value.charAt(u.value.length-1),b=c.getCurrentTokenColumn()+u.value.length;if(b>i.column||b==i.column&&k!=l)return}}for(;!a(u,"tag-name");)u=c.stepBackward();var g=c.getCurrentTokenRow(),m=c.getCurrentTokenColumn();if(a(c.stepBackward(),"end-tag-open"))return;var d=u.value;if(g==i.row&&(d=d.substring(0,i.column-m)),this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,a,r){if("\n"==r){var s=n.getCursorPosition(),i=a.getLine(s.row),c=new o(a,s.row,s.column),u=c.getCurrentToken();if(u&&u.type.indexOf("tag-close")!==-1){for(;u&&u.type.indexOf("tag-name")===-1;)u=c.stepBackward();if(!u)return;var k=u.value,l=c.getCurrentTokenRow();if(u=c.stepBackward(),!u||u.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[k]){var b=a.getTokenAt(s.row,s.column+1),i=a.getLine(l),g=this.$getIndent(i),m=g+a.getTabString();return b&&""==s){var o=n.getCursorPosition(),i=new c(r,o.row,o.column),u=i.getCurrentToken(),k=!1,e=JSON.parse(e).pop();if(u&&">"===u.value||"StartTag"!==e)return;if(u&&(a(u,"meta.tag")||a(u,"text")&&u.value.match("/")))k=!0;else do u=i.stepBackward();while(u&&(a(u,"string")||a(u,"keyword.operator")||a(u,"entity.attribute-name")||a(u,"text")));var l=i.stepBackward();if(!u||!a(u,"meta.tag")||null!==l&&l.value.match("/"))return;var b=u.value.substring(1);if(k)var b=b.substring(0,o.column-u.start);return{text:">",selection:[1,1]}}})};r.inherits(u,s),t.XQueryBehaviour=u}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t,n){"use strict";var a=e("../../lib/oop"),r=e("../../range").Range,s=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};a.inherits(o,s),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var a=e.getLine(n);if(this.singleLineBlockCommentRe.test(a)&&!this.startRegionRe.test(a)&&!this.tripleStarBlockCommentRe.test(a))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(a)?"start":r},this.getFoldWidgetRange=function(e,t,n,a){var r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);var s=r.match(this.foldingStartMarker);if(s){var o=s.index;if(s[1])return this.openingBracketBlock(e,s[1],n,o);var i=e.getCommentFoldRange(n,o+s[0].length,1);return i&&!i.isMultiLine()&&(a?i=this.getSectionRange(e,n):"all"!=t&&(i=null)),i}if("markbegin"!==t){var s=r.match(this.foldingStopMarker);if(s){var o=s.index+s[0].length;return s[1]?this.closingBracketBlock(e,s[1],n,o):e.getCommentFoldRange(n,o,-1)}}},this.getSectionRange=function(e,t){var n=e.getLine(t),a=n.search(/\S/),s=t,o=n.length;t+=1;for(var i=t,c=e.getLength();++tu)break;var k=this.getFoldWidgetRange(e,"all",t);if(k){if(k.start.row<=s)break;if(k.isMultiLine())t=k.end.row;else if(a==u)break}i=t}}return new r(s,o,i,e.getLine(i).length)},this.getCommentRegionBlock=function(e,t,n){for(var a=t.search(/\s*$/),s=e.getLength(),o=n,i=/^\s*(?:\/\*|\/\/)#(end)?region\b/,c=1;++no)return new r(o,a,k,t.length)}}.call(o.prototype)}),define("ace/mode/xquery",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/xquery_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor"],function(e,t,n){"use strict";var a=e("../worker/worker_client").WorkerClient,r=e("../lib/oop"),s=e("./text").Mode,o=e("./text_highlight_rules").TextHighlightRules,i=e("./xquery/xquery_lexer").XQueryLexer,c=e("../range").Range,u=e("./behaviour/xquery").XQueryBehaviour,k=e("./folding/cstyle").FoldMode,l=e("../anchor").Anchor,b=function(){this.$tokenizer=new i,this.$behaviour=new u,this.foldingRules=new k,this.$highlightRules=new o};r.inherits(b,s),function(){this.completer={getCompletions:function(e,t,n,a,r){return t.$worker?(t.$worker.emit("complete",{data:{pos:n,prefix:a}}),void t.$worker.on("complete",function(e){r(null,e.data)})):r()}},this.getNextLineIndent=function(e,t,n){var a=this.$getIndent(t),r=t.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/);return r&&(a+=n),a},this.checkOutdent=function(e,t,n){return!!/^\s+$/.test(t)&&/^\s*[\}\)]/.test(n)},this.autoOutdent=function(e,t,n){var a=t.getLine(n),r=a.match(/^(\s*[\}\)])/);if(!r)return 0;var s=r[1].length,o=t.findMatchingBracket({row:n,column:s});if(!o||o.row==n)return 0;var i=this.$getIndent(t.getLine(o.row));t.replace(new c(n,0,n,s-1),i)},this.toggleCommentLines=function(e,t,n,a){var r,s,o=!0,i=/^\s*\(:(.*):\)/;for(r=n;r<=a;r++)if(!i.test(t.getLine(r))){o=!1;break}var u=new c(0,0,0,0);for(r=n;r<=a;r++)s=t.getLine(r),u.start.row=r,u.end.row=r,u.end.column=s.length,t.replace(u,o?s.match(i)[1]:"(:"+s+":)")},this.createWorker=function(e){var t=new a(["ace"],"ace/mode/xquery_worker","XQueryWorker"),n=this;return t.attachToDocument(e.getDocument()),t.on("ok",function(t){e.clearAnnotations()}),t.on("markers",function(t){e.clearAnnotations(),n.addMarkers(t.data,e)}),t.on("highlight",function(t){n.$tokenizer.tokens=t.data.tokens,n.$tokenizer.lines=e.getDocument().getAllLines();for(var a=Object.keys(n.$tokenizer.tokens),r=0;r][-+\\d\\s]*$', - next : "qqstring" - }, { - token : "string", // single quoted string - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "constant.numeric", // float - regex : /(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)/ - }, { - token : "constant.numeric", // other number - regex : /[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/ - }, { - token : "constant.language.boolean", - regex : "(?:true|false|TRUE|FALSE|True|False|yes|no)\\b" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - } - ], - "qqstring" : [ - { - token : "string", - regex : '(?=(?:(?:\\\\.)|(?:[^:]))*?:)', - next : "start" - }, { - token : "string", - regex : '.+' - } - ]}; - -}; - -oop.inherits(YamlHighlightRules, TextHighlightRules); - -exports.YamlHighlightRules = YamlHighlightRules; -}); - -define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -define("ace/mode/yaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/yaml_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var YamlHighlightRules = require("./yaml_highlight_rules").YamlHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var FoldMode = require("./folding/coffee").FoldMode; - -var Mode = function() { - this.HighlightRules = YamlHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "#"; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - - this.$id = "ace/mode/yaml"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); +define("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"list.markup",regex:/^(?:-{3}|\.{3})\s*(?=#|$)/},{token:"list.markup",regex:/^\s*[\-?](?:$|\s)/},{token:"constant",regex:"!![\\w//]+"},{token:"constant.language",regex:"[&\\*][a-zA-Z0-9-_]+"},{token:["meta.tag","keyword"],regex:/^(\s*\w.*?)(\:(?:\s+|$))/},{token:["meta.tag","keyword"],regex:/(\w+?)(\s*\:(?:\s+|$))/},{token:"keyword.operator",regex:"<<\\w*:\\w*"},{token:"keyword.operator",regex:"-\\s*(?=[{])"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"[|>][-+\\d\\s]*$",next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)/},{token:"constant.numeric",regex:/[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/},{token:"constant.language.boolean",regex:"(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"}],qqstring:[{token:"string",regex:"(?=(?:(?:\\\\.)|(?:[^:]))*?:)",next:"start"},{token:"string",regex:".+"}]}};r.inherits(o,i),t.YamlHighlightRules=o}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var o=i[1].length,a=e.findMatchingBracket({row:t,column:o});if(!a||a.row==t)return 0;var s=this.$getIndent(e.getLine(a.row));e.replace(new r(t,0,t,o-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t,n){"use strict";var r=e("../../lib/oop"),i=e("./fold_mode").FoldMode,o=e("../../range").Range,a=t.FoldMode=function(){};r.inherits(a,i),function(){this.getFoldWidgetRange=function(e,t,n){var r=this.indentationBlock(e,n);if(r)return r;var i=/\S/,a=e.getLine(n),s=a.search(i);if(s!=-1&&"#"==a[s]){for(var g=a.length,d=e.getLength(),c=n,u=n;++nc){var h=e.getLine(u).length;return new o(c,g,u,h)}}},this.getFoldWidget=function(e,t,n){var r=e.getLine(n),i=r.search(/\S/),o=e.getLine(n+1),a=e.getLine(n-1),s=a.search(/\S/),g=o.search(/\S/);if(i==-1)return e.foldWidgets[n-1]=s!=-1&&s\n\ - ${2:body}\n\ - end\n\ -# case expression\n\ -snippet case\n\ - case ${1:expression} of\n\ - ${2:pattern} ->\n\ - ${3:body};\n\ - end\n\ -# anonymous function\n\ -snippet fun\n\ - fun (${1:Parameters}) -> ${2:body} end${3}\n\ -# try...catch\n\ -snippet try\n\ - try\n\ - ${1}\n\ - catch\n\ - ${2:_:_} -> ${3:got_some_exception}\n\ - end\n\ -# record directive\n\ -snippet rec\n\ - -record(${1:record}, {\n\ - ${2:field}=${3:value}}).${4}\n\ -# todo comment\n\ -snippet todo\n\ - %% TODO: ${1}\n\ -## Snippets below (starting with '%') are in EDoc format.\n\ -## See http://www.erlang.org/doc/apps/edoc/chapter.html#id56887 for more details\n\ -# doc comment\n\ -snippet %d\n\ - %% @doc ${1}\n\ -# end of doc comment\n\ -snippet %e\n\ - %% @end\n\ -# specification comment\n\ -snippet %s\n\ - %% @spec ${1}\n\ -# private function marker\n\ -snippet %p\n\ - %% @private\n\ -# OTP application\n\ -snippet application\n\ - -module(${1:`Filename('', 'my')`}).\n\ -\n\ - -behaviour(application).\n\ -\n\ - -export([start/2, stop/1]).\n\ -\n\ - start(_Type, _StartArgs) ->\n\ - case ${2:root_supervisor}:start_link() of\n\ - {ok, Pid} ->\n\ - {ok, Pid};\n\ - Other ->\n\ - {error, Other}\n\ - end.\n\ -\n\ - stop(_State) ->\n\ - ok. \n\ -# OTP supervisor\n\ -snippet supervisor\n\ - -module(${1:`Filename('', 'my')`}).\n\ -\n\ - -behaviour(supervisor).\n\ -\n\ - %% API\n\ - -export([start_link/0]).\n\ -\n\ - %% Supervisor callbacks\n\ - -export([init/1]).\n\ -\n\ - -define(SERVER, ?MODULE).\n\ -\n\ - start_link() ->\n\ - supervisor:start_link({local, ?SERVER}, ?MODULE, []).\n\ -\n\ - init([]) ->\n\ - Server = {${2:my_server}, {$2, start_link, []},\n\ - permanent, 2000, worker, [$2]},\n\ - Children = [Server],\n\ - RestartStrategy = {one_for_one, 0, 1},\n\ - {ok, {RestartStrategy, Children}}.\n\ -# OTP gen_server\n\ -snippet gen_server\n\ - -module(${1:`Filename('', 'my')`}).\n\ -\n\ - -behaviour(gen_server).\n\ -\n\ - %% API\n\ - -export([\n\ - start_link/0\n\ - ]).\n\ -\n\ - %% gen_server callbacks\n\ - -export([init/1, handle_call/3, handle_cast/2, handle_info/2,\n\ - terminate/2, code_change/3]).\n\ -\n\ - -define(SERVER, ?MODULE).\n\ -\n\ - -record(state, {}).\n\ -\n\ - %%%===================================================================\n\ - %%% API\n\ - %%%===================================================================\n\ -\n\ - start_link() ->\n\ - gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).\n\ -\n\ - %%%===================================================================\n\ - %%% gen_server callbacks\n\ - %%%===================================================================\n\ -\n\ - init([]) ->\n\ - {ok, #state{}}.\n\ -\n\ - handle_call(_Request, _From, State) ->\n\ - Reply = ok,\n\ - {reply, Reply, State}.\n\ -\n\ - handle_cast(_Msg, State) ->\n\ - {noreply, State}.\n\ -\n\ - handle_info(_Info, State) ->\n\ - {noreply, State}.\n\ -\n\ - terminate(_Reason, _State) ->\n\ - ok.\n\ -\n\ - code_change(_OldVsn, State, _Extra) ->\n\ - {ok, State}.\n\ -\n\ - %%%===================================================================\n\ - %%% Internal functions\n\ - %%%===================================================================\n\ -\n\ -"; -exports.scope = "erlang"; - -}); +define("ace/snippets/erlang",["require","exports","module"],function(n,t,e){"use strict";t.snippetText="# module and export all\nsnippet mod\n\t-module(${1:`Filename('', 'my')`}).\n\t\n\t-compile([export_all]).\n\t\n\tstart() ->\n\t ${2}\n\t\n\tstop() ->\n\t ok.\n# define directive\nsnippet def\n\t-define(${1:macro}, ${2:body}).${3}\n# export directive\nsnippet exp\n\t-export([${1:function}/${2:arity}]).\n# include directive\nsnippet inc\n\t-include(\"${1:file}\").${2}\n# behavior directive\nsnippet beh\n\t-behaviour(${1:behaviour}).${2}\n# if expression\nsnippet if\n\tif\n\t ${1:guard} ->\n\t ${2:body}\n\tend\n# case expression\nsnippet case\n\tcase ${1:expression} of\n\t ${2:pattern} ->\n\t ${3:body};\n\tend\n# anonymous function\nsnippet fun\n\tfun (${1:Parameters}) -> ${2:body} end${3}\n# try...catch\nsnippet try\n\ttry\n\t ${1}\n\tcatch\n\t ${2:_:_} -> ${3:got_some_exception}\n\tend\n# record directive\nsnippet rec\n\t-record(${1:record}, {\n\t ${2:field}=${3:value}}).${4}\n# todo comment\nsnippet todo\n\t%% TODO: ${1}\n## Snippets below (starting with '%') are in EDoc format.\n## See http://www.erlang.org/doc/apps/edoc/chapter.html#id56887 for more details\n# doc comment\nsnippet %d\n\t%% @doc ${1}\n# end of doc comment\nsnippet %e\n\t%% @end\n# specification comment\nsnippet %s\n\t%% @spec ${1}\n# private function marker\nsnippet %p\n\t%% @private\n# OTP application\nsnippet application\n\t-module(${1:`Filename('', 'my')`}).\n\n\t-behaviour(application).\n\n\t-export([start/2, stop/1]).\n\n\tstart(_Type, _StartArgs) ->\n\t case ${2:root_supervisor}:start_link() of\n\t {ok, Pid} ->\n\t {ok, Pid};\n\t Other ->\n\t\t {error, Other}\n\t end.\n\n\tstop(_State) ->\n\t ok.\t\n# OTP supervisor\nsnippet supervisor\n\t-module(${1:`Filename('', 'my')`}).\n\n\t-behaviour(supervisor).\n\n\t%% API\n\t-export([start_link/0]).\n\n\t%% Supervisor callbacks\n\t-export([init/1]).\n\n\t-define(SERVER, ?MODULE).\n\n\tstart_link() ->\n\t supervisor:start_link({local, ?SERVER}, ?MODULE, []).\n\n\tinit([]) ->\n\t Server = {${2:my_server}, {$2, start_link, []},\n\t permanent, 2000, worker, [$2]},\n\t Children = [Server],\n\t RestartStrategy = {one_for_one, 0, 1},\n\t {ok, {RestartStrategy, Children}}.\n# OTP gen_server\nsnippet gen_server\n\t-module(${1:`Filename('', 'my')`}).\n\n\t-behaviour(gen_server).\n\n\t%% API\n\t-export([\n\t start_link/0\n\t ]).\n\n\t%% gen_server callbacks\n\t-export([init/1, handle_call/3, handle_cast/2, handle_info/2,\n\t terminate/2, code_change/3]).\n\n\t-define(SERVER, ?MODULE).\n\n\t-record(state, {}).\n\n\t%%%===================================================================\n\t%%% API\n\t%%%===================================================================\n\n\tstart_link() ->\n\t gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).\n\n\t%%%===================================================================\n\t%%% gen_server callbacks\n\t%%%===================================================================\n\n\tinit([]) ->\n\t {ok, #state{}}.\n\n\thandle_call(_Request, _From, State) ->\n\t Reply = ok,\n\t {reply, Reply, State}.\n\n\thandle_cast(_Msg, State) ->\n\t {noreply, State}.\n\n\thandle_info(_Info, State) ->\n\t {noreply, State}.\n\n\tterminate(_Reason, _State) ->\n\t ok.\n\n\tcode_change(_OldVsn, State, _Extra) ->\n\t {ok, State}.\n\n\t%%%===================================================================\n\t%%% Internal functions\n\t%%%===================================================================\n\n",t.scope="erlang"}); \ No newline at end of file diff --git a/www/js/vendor/ace/snippets/forth.js b/www/js/vendor/ace/snippets/forth.js index f81b5a3f3..5756dfefd 100755 --- a/www/js/vendor/ace/snippets/forth.js +++ b/www/js/vendor/ace/snippets/forth.js @@ -1,7 +1 @@ -define("ace/snippets/forth",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "forth"; - -}); +define("ace/snippets/forth",["require","exports","module"],function(e,t,i){"use strict";t.snippetText=void 0,t.scope="forth"}); \ No newline at end of file diff --git a/www/js/vendor/ace/snippets/ftl.js b/www/js/vendor/ace/snippets/ftl.js index 8f8e7c1d2..a649e8d34 100755 --- a/www/js/vendor/ace/snippets/ftl.js +++ b/www/js/vendor/ace/snippets/ftl.js @@ -1,7 +1 @@ -define("ace/snippets/ftl",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "ftl"; - -}); +define("ace/snippets/ftl",["require","exports","module"],function(e,t,i){"use strict";t.snippetText=void 0,t.scope="ftl"}); \ No newline at end of file diff --git a/www/js/vendor/ace/snippets/gcode.js b/www/js/vendor/ace/snippets/gcode.js index f00c381f6..017f9f0fb 100755 --- a/www/js/vendor/ace/snippets/gcode.js +++ b/www/js/vendor/ace/snippets/gcode.js @@ -1,7 +1 @@ -define("ace/snippets/gcode",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "gcode"; - -}); +define("ace/snippets/gcode",["require","exports","module"],function(e,i,o){"use strict";i.snippetText=void 0,i.scope="gcode"}); \ No newline at end of file diff --git a/www/js/vendor/ace/snippets/gherkin.js b/www/js/vendor/ace/snippets/gherkin.js index 6b3de21c7..a7f6415b2 100755 --- a/www/js/vendor/ace/snippets/gherkin.js +++ b/www/js/vendor/ace/snippets/gherkin.js @@ -1,7 +1 @@ -define("ace/snippets/gherkin",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "gherkin"; - -}); +define("ace/snippets/gherkin",["require","exports","module"],function(e,i,n){"use strict";i.snippetText=void 0,i.scope="gherkin"}); \ No newline at end of file diff --git a/www/js/vendor/ace/snippets/gitignore.js b/www/js/vendor/ace/snippets/gitignore.js index c9f18286f..1783dc08c 100755 --- a/www/js/vendor/ace/snippets/gitignore.js +++ b/www/js/vendor/ace/snippets/gitignore.js @@ -1,7 +1 @@ -define("ace/snippets/gitignore",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "gitignore"; - -}); +define("ace/snippets/gitignore",["require","exports","module"],function(e,i,t){"use strict";i.snippetText=void 0,i.scope="gitignore"}); \ No newline at end of file diff --git a/www/js/vendor/ace/snippets/glsl.js b/www/js/vendor/ace/snippets/glsl.js index fff970ff2..fb8c86950 100755 --- a/www/js/vendor/ace/snippets/glsl.js +++ b/www/js/vendor/ace/snippets/glsl.js @@ -1,7 +1 @@ -define("ace/snippets/glsl",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "glsl"; - -}); +define("ace/snippets/glsl",["require","exports","module"],function(e,s,i){"use strict";s.snippetText=void 0,s.scope="glsl"}); \ No newline at end of file diff --git a/www/js/vendor/ace/snippets/golang.js b/www/js/vendor/ace/snippets/golang.js index 81d2ab9f3..2189a78eb 100755 --- a/www/js/vendor/ace/snippets/golang.js +++ b/www/js/vendor/ace/snippets/golang.js @@ -1,7 +1 @@ -define("ace/snippets/golang",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "golang"; - -}); +define("ace/snippets/golang",["require","exports","module"],function(e,i,n){"use strict";i.snippetText=void 0,i.scope="golang"}); \ No newline at end of file diff --git a/www/js/vendor/ace/snippets/groovy.js b/www/js/vendor/ace/snippets/groovy.js index f5a16581c..a1561470e 100755 --- a/www/js/vendor/ace/snippets/groovy.js +++ b/www/js/vendor/ace/snippets/groovy.js @@ -1,7 +1 @@ -define("ace/snippets/groovy",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "groovy"; - -}); +define("ace/snippets/groovy",["require","exports","module"],function(e,o,i){"use strict";o.snippetText=void 0,o.scope="groovy"}); \ No newline at end of file diff --git a/www/js/vendor/ace/snippets/haml.js b/www/js/vendor/ace/snippets/haml.js index cfb954774..096ced921 100755 --- a/www/js/vendor/ace/snippets/haml.js +++ b/www/js/vendor/ace/snippets/haml.js @@ -1,27 +1 @@ -define("ace/snippets/haml",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet t\n\ - %table\n\ - %tr\n\ - %th\n\ - ${1:headers}\n\ - %tr\n\ - %td\n\ - ${2:headers}\n\ -snippet ul\n\ - %ul\n\ - %li\n\ - ${1:item}\n\ - %li\n\ -snippet =rp\n\ - = render :partial => '${1:partial}'\n\ -snippet =rpl\n\ - = render :partial => '${1:partial}', :locals => {}\n\ -snippet =rpc\n\ - = render :partial => '${1:partial}', :collection => @$1\n\ -\n\ -"; -exports.scope = "haml"; - -}); +define("ace/snippets/haml",["require","exports","module"],function(t,n,e){"use strict";n.snippetText="snippet t\n\t%table\n\t\t%tr\n\t\t\t%th\n\t\t\t\t${1:headers}\n\t\t%tr\n\t\t\t%td\n\t\t\t\t${2:headers}\nsnippet ul\n\t%ul\n\t\t%li\n\t\t\t${1:item}\n\t\t%li\nsnippet =rp\n\t= render :partial => '${1:partial}'\nsnippet =rpl\n\t= render :partial => '${1:partial}', :locals => {}\nsnippet =rpc\n\t= render :partial => '${1:partial}', :collection => @$1\n\n",n.scope="haml"}); \ No newline at end of file diff --git a/www/js/vendor/ace/snippets/handlebars.js b/www/js/vendor/ace/snippets/handlebars.js index 85eacaa50..d2f2e5784 100755 --- a/www/js/vendor/ace/snippets/handlebars.js +++ b/www/js/vendor/ace/snippets/handlebars.js @@ -1,7 +1 @@ -define("ace/snippets/handlebars",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "handlebars"; - -}); +define("ace/snippets/handlebars",["require","exports","module"],function(e,s,i){"use strict";s.snippetText=void 0,s.scope="handlebars"}); \ No newline at end of file diff --git a/www/js/vendor/ace/snippets/haskell.js b/www/js/vendor/ace/snippets/haskell.js index b4f504a6d..5f26c8090 100755 --- a/www/js/vendor/ace/snippets/haskell.js +++ b/www/js/vendor/ace/snippets/haskell.js @@ -1,89 +1 @@ -define("ace/snippets/haskell",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet lang\n\ - {-# LANGUAGE ${1:OverloadedStrings} #-}\n\ -snippet info\n\ - -- |\n\ - -- Module : ${1:Module.Namespace}\n\ - -- Copyright : ${2:Author} ${3:2011-2012}\n\ - -- License : ${4:BSD3}\n\ - --\n\ - -- Maintainer : ${5:email@something.com}\n\ - -- Stability : ${6:experimental}\n\ - -- Portability : ${7:unknown}\n\ - --\n\ - -- ${8:Description}\n\ - --\n\ -snippet import\n\ - import ${1:Data.Text}\n\ -snippet import2\n\ - import ${1:Data.Text} (${2:head})\n\ -snippet importq\n\ - import qualified ${1:Data.Text} as ${2:T}\n\ -snippet inst\n\ - instance ${1:Monoid} ${2:Type} where\n\ - ${3}\n\ -snippet type\n\ - type ${1:Type} = ${2:Type}\n\ -snippet data\n\ - data ${1:Type} = ${2:$1} ${3:Int}\n\ -snippet newtype\n\ - newtype ${1:Type} = ${2:$1} ${3:Int}\n\ -snippet class\n\ - class ${1:Class} a where\n\ - ${2}\n\ -snippet module\n\ - module `substitute(substitute(expand('%:r'), '[/\\\\]','.','g'),'^\\%(\\l*\\.\\)\\?','','')` (\n\ - ) where\n\ - `expand('%') =~ 'Main' ? \"\\n\\nmain = do\\n print \\\"hello world\\\"\" : \"\"`\n\ -\n\ -snippet const\n\ - ${1:name} :: ${2:a}\n\ - $1 = ${3:undefined}\n\ -snippet fn\n\ - ${1:fn} :: ${2:a} -> ${3:a}\n\ - $1 ${4} = ${5:undefined}\n\ -snippet fn2\n\ - ${1:fn} :: ${2:a} -> ${3:a} -> ${4:a}\n\ - $1 ${5} = ${6:undefined}\n\ -snippet ap\n\ - ${1:map} ${2:fn} ${3:list}\n\ -snippet do\n\ - do\n\ - \n\ -snippet λ\n\ - \\${1:x} -> ${2}\n\ -snippet \\\n\ - \\${1:x} -> ${2}\n\ -snippet <-\n\ - ${1:a} <- ${2:m a}\n\ -snippet ←\n\ - ${1:a} <- ${2:m a}\n\ -snippet ->\n\ - ${1:m a} -> ${2:a}\n\ -snippet →\n\ - ${1:m a} -> ${2:a}\n\ -snippet tup\n\ - (${1:a}, ${2:b})\n\ -snippet tup2\n\ - (${1:a}, ${2:b}, ${3:c})\n\ -snippet tup3\n\ - (${1:a}, ${2:b}, ${3:c}, ${4:d})\n\ -snippet rec\n\ - ${1:Record} { ${2:recFieldA} = ${3:undefined}\n\ - , ${4:recFieldB} = ${5:undefined}\n\ - }\n\ -snippet case\n\ - case ${1:something} of\n\ - ${2} -> ${3}\n\ -snippet let\n\ - let ${1} = ${2}\n\ - in ${3}\n\ -snippet where\n\ - where\n\ - ${1:fn} = ${2:undefined}\n\ -"; -exports.scope = "haskell"; - -}); +define("ace/snippets/haskell",["require","exports","module"],function(n,t,e){"use strict";t.snippetText="snippet lang\n\t{-# LANGUAGE ${1:OverloadedStrings} #-}\nsnippet info\n\t-- |\n\t-- Module : ${1:Module.Namespace}\n\t-- Copyright : ${2:Author} ${3:2011-2012}\n\t-- License : ${4:BSD3}\n\t--\n\t-- Maintainer : ${5:email@something.com}\n\t-- Stability : ${6:experimental}\n\t-- Portability : ${7:unknown}\n\t--\n\t-- ${8:Description}\n\t--\nsnippet import\n\timport ${1:Data.Text}\nsnippet import2\n\timport ${1:Data.Text} (${2:head})\nsnippet importq\n\timport qualified ${1:Data.Text} as ${2:T}\nsnippet inst\n\tinstance ${1:Monoid} ${2:Type} where\n\t\t${3}\nsnippet type\n\ttype ${1:Type} = ${2:Type}\nsnippet data\n\tdata ${1:Type} = ${2:$1} ${3:Int}\nsnippet newtype\n\tnewtype ${1:Type} = ${2:$1} ${3:Int}\nsnippet class\n\tclass ${1:Class} a where\n\t\t${2}\nsnippet module\n\tmodule `substitute(substitute(expand('%:r'), '[/\\\\]','.','g'),'^\\%(\\l*\\.\\)\\?','','')` (\n\t)\twhere\n\t`expand('%') =~ 'Main' ? \"\\n\\nmain = do\\n print \\\"hello world\\\"\" : \"\"`\n\nsnippet const\n\t${1:name} :: ${2:a}\n\t$1 = ${3:undefined}\nsnippet fn\n\t${1:fn} :: ${2:a} -> ${3:a}\n\t$1 ${4} = ${5:undefined}\nsnippet fn2\n\t${1:fn} :: ${2:a} -> ${3:a} -> ${4:a}\n\t$1 ${5} = ${6:undefined}\nsnippet ap\n\t${1:map} ${2:fn} ${3:list}\nsnippet do\n\tdo\n\t\t\nsnippet λ\n\t\\${1:x} -> ${2}\nsnippet \\\n\t\\${1:x} -> ${2}\nsnippet <-\n\t${1:a} <- ${2:m a}\nsnippet ←\n\t${1:a} <- ${2:m a}\nsnippet ->\n\t${1:m a} -> ${2:a}\nsnippet →\n\t${1:m a} -> ${2:a}\nsnippet tup\n\t(${1:a}, ${2:b})\nsnippet tup2\n\t(${1:a}, ${2:b}, ${3:c})\nsnippet tup3\n\t(${1:a}, ${2:b}, ${3:c}, ${4:d})\nsnippet rec\n\t${1:Record} { ${2:recFieldA} = ${3:undefined}\n\t\t\t\t, ${4:recFieldB} = ${5:undefined}\n\t\t\t\t}\nsnippet case\n\tcase ${1:something} of\n\t\t${2} -> ${3}\nsnippet let\n\tlet ${1} = ${2}\n\tin ${3}\nsnippet where\n\twhere\n\t\t${1:fn} = ${2:undefined}\n",t.scope="haskell"}); \ No newline at end of file diff --git a/www/js/vendor/ace/snippets/haxe.js b/www/js/vendor/ace/snippets/haxe.js index 6a42a5076..fad64f7fd 100755 --- a/www/js/vendor/ace/snippets/haxe.js +++ b/www/js/vendor/ace/snippets/haxe.js @@ -1,7 +1 @@ -define("ace/snippets/haxe",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "haxe"; - -}); +define("ace/snippets/haxe",["require","exports","module"],function(e,i,s){"use strict";i.snippetText=void 0,i.scope="haxe"}); \ No newline at end of file diff --git a/www/js/vendor/ace/snippets/html.js b/www/js/vendor/ace/snippets/html.js index 3466ecb72..76957d4d4 100755 --- a/www/js/vendor/ace/snippets/html.js +++ b/www/js/vendor/ace/snippets/html.js @@ -1,835 +1 @@ -define("ace/snippets/html",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# Some useful Unicode entities\n\ -# Non-Breaking Space\n\ -snippet nbs\n\ -  \n\ -# ←\n\ -snippet left\n\ - ←\n\ -# →\n\ -snippet right\n\ - →\n\ -# ↑\n\ -snippet up\n\ - ↑\n\ -# ↓\n\ -snippet down\n\ - ↓\n\ -# ↩\n\ -snippet return\n\ - ↩\n\ -# ⇤\n\ -snippet backtab\n\ - ⇤\n\ -# ⇥\n\ -snippet tab\n\ - ⇥\n\ -# ⇧\n\ -snippet shift\n\ - ⇧\n\ -# ⌃\n\ -snippet ctrl\n\ - ⌃\n\ -# ⌅\n\ -snippet enter\n\ - ⌅\n\ -# ⌘\n\ -snippet cmd\n\ - ⌘\n\ -# ⌥\n\ -snippet option\n\ - ⌥\n\ -# ⌦\n\ -snippet delete\n\ - ⌦\n\ -# ⌫\n\ -snippet backspace\n\ - ⌫\n\ -# ⎋\n\ -snippet esc\n\ - ⎋\n\ -# Generic Doctype\n\ -snippet doctype HTML 4.01 Strict\n\ - \n\ -snippet doctype HTML 4.01 Transitional\n\ - \n\ -snippet doctype HTML 5\n\ - \n\ -snippet doctype XHTML 1.0 Frameset\n\ - \n\ -snippet doctype XHTML 1.0 Strict\n\ - \n\ -snippet doctype XHTML 1.0 Transitional\n\ - \n\ -snippet doctype XHTML 1.1\n\ - \n\ -# HTML Doctype 4.01 Strict\n\ -snippet docts\n\ - \n\ -# HTML Doctype 4.01 Transitional\n\ -snippet doct\n\ - \n\ -# HTML Doctype 5\n\ -snippet doct5\n\ - \n\ -# XHTML Doctype 1.0 Frameset\n\ -snippet docxf\n\ - \n\ -# XHTML Doctype 1.0 Strict\n\ -snippet docxs\n\ - \n\ -# XHTML Doctype 1.0 Transitional\n\ -snippet docxt\n\ - \n\ -# XHTML Doctype 1.1\n\ -snippet docx\n\ - \n\ -# Attributes\n\ -snippet attr\n\ - ${1:attribute}=\"${2:property}\"\n\ -snippet attr+\n\ - ${1:attribute}=\"${2:property}\" attr+${3}\n\ -snippet .\n\ - class=\"${1}\"${2}\n\ -snippet #\n\ - id=\"${1}\"${2}\n\ -snippet alt\n\ - alt=\"${1}\"${2}\n\ -snippet charset\n\ - charset=\"${1:utf-8}\"${2}\n\ -snippet data\n\ - data-${1}=\"${2:$1}\"${3}\n\ -snippet for\n\ - for=\"${1}\"${2}\n\ -snippet height\n\ - height=\"${1}\"${2}\n\ -snippet href\n\ - href=\"${1:#}\"${2}\n\ -snippet lang\n\ - lang=\"${1:en}\"${2}\n\ -snippet media\n\ - media=\"${1}\"${2}\n\ -snippet name\n\ - name=\"${1}\"${2}\n\ -snippet rel\n\ - rel=\"${1}\"${2}\n\ -snippet scope\n\ - scope=\"${1:row}\"${2}\n\ -snippet src\n\ - src=\"${1}\"${2}\n\ -snippet title=\n\ - title=\"${1}\"${2}\n\ -snippet type\n\ - type=\"${1}\"${2}\n\ -snippet value\n\ - value=\"${1}\"${2}\n\ -snippet width\n\ - width=\"${1}\"${2}\n\ -# Elements\n\ -snippet a\n\ - ${2:$1}\n\ -snippet a.\n\ - ${3:$1}\n\ -snippet a#\n\ - ${3:$1}\n\ -snippet a:ext\n\ - ${2:$1}\n\ -snippet a:mail\n\ - ${3:email me}\n\ -snippet abbr\n\ - ${2}\n\ -snippet address\n\ -
\n\ - ${1}\n\ -
\n\ -snippet area\n\ - \"${4}\"\n\ -snippet area+\n\ - \"${4}\"\n\ - area+${5}\n\ -snippet area:c\n\ - \"${3}\"\n\ -snippet area:d\n\ - \"${3}\"\n\ -snippet area:p\n\ - \"${3}\"\n\ -snippet area:r\n\ - \"${3}\"\n\ -snippet article\n\ -
\n\ - ${1}\n\ -
\n\ -snippet article.\n\ -
\n\ - ${2}\n\ -
\n\ -snippet article#\n\ -
\n\ - ${2}\n\ -
\n\ -snippet aside\n\ - \n\ -snippet aside.\n\ - \n\ -snippet aside#\n\ - \n\ -snippet audio\n\ - \n\ -snippet b\n\ - ${1}\n\ -snippet base\n\ - \n\ -snippet bdi\n\ - ${1}\n\ -snippet bdo\n\ - ${2}\n\ -snippet bdo:l\n\ - ${1}\n\ -snippet bdo:r\n\ - ${1}\n\ -snippet blockquote\n\ -
\n\ - ${1}\n\ -
\n\ -snippet body\n\ - \n\ - ${1}\n\ - \n\ -snippet br\n\ -
${1}\n\ -snippet button\n\ - \n\ -snippet button.\n\ - \n\ -snippet button#\n\ - \n\ -snippet button:s\n\ - \n\ -snippet button:r\n\ - \n\ -snippet canvas\n\ - \n\ - ${1}\n\ - \n\ -snippet caption\n\ - ${1}\n\ -snippet cite\n\ - ${1}\n\ -snippet code\n\ - ${1}\n\ -snippet col\n\ - ${1}\n\ -snippet col+\n\ - \n\ - col+${1}\n\ -snippet colgroup\n\ - \n\ - ${1}\n\ - \n\ -snippet colgroup+\n\ - \n\ - \n\ - col+${1}\n\ - \n\ -snippet command\n\ - \n\ -snippet command:c\n\ - \n\ -snippet command:r\n\ - \n\ -snippet datagrid\n\ - \n\ - ${1}\n\ - \n\ -snippet datalist\n\ - \n\ - ${1}\n\ - \n\ -snippet datatemplate\n\ - \n\ - ${1}\n\ - \n\ -snippet dd\n\ -
${1}
\n\ -snippet dd.\n\ -
${2}
\n\ -snippet dd#\n\ -
${2}
\n\ -snippet del\n\ - ${1}\n\ -snippet details\n\ -
${1}
\n\ -snippet dfn\n\ - ${1}\n\ -snippet dialog\n\ - \n\ - ${1}\n\ - \n\ -snippet div\n\ -
\n\ - ${1}\n\ -
\n\ -snippet div.\n\ -
\n\ - ${2}\n\ -
\n\ -snippet div#\n\ -
\n\ - ${2}\n\ -
\n\ -snippet dl\n\ -
\n\ - ${1}\n\ -
\n\ -snippet dl.\n\ -
\n\ - ${2}\n\ -
\n\ -snippet dl#\n\ -
\n\ - ${2}\n\ -
\n\ -snippet dl+\n\ -
\n\ -
${1}
\n\ -
${2}
\n\ - dt+${3}\n\ -
\n\ -snippet dt\n\ -
${1}
\n\ -snippet dt.\n\ -
${2}
\n\ -snippet dt#\n\ -
${2}
\n\ -snippet dt+\n\ -
${1}
\n\ -
${2}
\n\ - dt+${3}\n\ -snippet em\n\ - ${1}\n\ -snippet embed\n\ - \n\ -snippet fieldset\n\ -
\n\ - ${1}\n\ -
\n\ -snippet fieldset.\n\ -
\n\ - ${2}\n\ -
\n\ -snippet fieldset#\n\ -
\n\ - ${2}\n\ -
\n\ -snippet fieldset+\n\ -
\n\ - ${1}\n\ - ${2}\n\ -
\n\ - fieldset+${3}\n\ -snippet figcaption\n\ -
${1}
\n\ -snippet figure\n\ -
${1}
\n\ -snippet footer\n\ -
\n\ - ${1}\n\ -
\n\ -snippet footer.\n\ -
\n\ - ${2}\n\ -
\n\ -snippet footer#\n\ -
\n\ - ${2}\n\ -
\n\ -snippet form\n\ -
\n\ - ${3}\n\ -
\n\ -snippet form.\n\ -
\n\ - ${4}\n\ -
\n\ -snippet form#\n\ -
\n\ - ${4}\n\ -
\n\ -snippet h1\n\ -

${1}

\n\ -snippet h1.\n\ -

${2}

\n\ -snippet h1#\n\ -

${2}

\n\ -snippet h2\n\ -

${1}

\n\ -snippet h2.\n\ -

${2}

\n\ -snippet h2#\n\ -

${2}

\n\ -snippet h3\n\ -

${1}

\n\ -snippet h3.\n\ -

${2}

\n\ -snippet h3#\n\ -

${2}

\n\ -snippet h4\n\ -

${1}

\n\ -snippet h4.\n\ -

${2}

\n\ -snippet h4#\n\ -

${2}

\n\ -snippet h5\n\ -
${1}
\n\ -snippet h5.\n\ -
${2}
\n\ -snippet h5#\n\ -
${2}
\n\ -snippet h6\n\ -
${1}
\n\ -snippet h6.\n\ -
${2}
\n\ -snippet h6#\n\ -
${2}
\n\ -snippet head\n\ - \n\ - \n\ -\n\ - ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ - ${2}\n\ - \n\ -snippet header\n\ -
\n\ - ${1}\n\ -
\n\ -snippet header.\n\ -
\n\ - ${2}\n\ -
\n\ -snippet header#\n\ -
\n\ - ${2}\n\ -
\n\ -snippet hgroup\n\ -
\n\ - ${1}\n\ -
\n\ -snippet hgroup.\n\ -
\n\ - ${2}\n\ -
\n\ -snippet hr\n\ -
${1}\n\ -snippet html\n\ - \n\ - ${1}\n\ - \n\ -snippet xhtml\n\ - \n\ - ${1}\n\ - \n\ -snippet html5\n\ - \n\ - \n\ - \n\ - \n\ - ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ - ${2:meta}\n\ - \n\ - \n\ - ${3:body}\n\ - \n\ - \n\ -snippet i\n\ - ${1}\n\ -snippet iframe\n\ - ${2}\n\ -snippet iframe.\n\ - ${3}\n\ -snippet iframe#\n\ - ${3}\n\ -snippet img\n\ - \"${2}\"${3}\n\ -snippet img.\n\ - \"${3}\"${4}\n\ -snippet img#\n\ - \"${3}\"${4}\n\ -snippet input\n\ - ${5}\n\ -snippet input.\n\ - ${6}\n\ -snippet input:text\n\ - ${4}\n\ -snippet input:submit\n\ - ${4}\n\ -snippet input:hidden\n\ - ${4}\n\ -snippet input:button\n\ - ${4}\n\ -snippet input:image\n\ - ${5}\n\ -snippet input:checkbox\n\ - ${3}\n\ -snippet input:radio\n\ - ${3}\n\ -snippet input:color\n\ - ${4}\n\ -snippet input:date\n\ - ${4}\n\ -snippet input:datetime\n\ - ${4}\n\ -snippet input:datetime-local\n\ - ${4}\n\ -snippet input:email\n\ - ${4}\n\ -snippet input:file\n\ - ${4}\n\ -snippet input:month\n\ - ${4}\n\ -snippet input:number\n\ - ${4}\n\ -snippet input:password\n\ - ${4}\n\ -snippet input:range\n\ - ${4}\n\ -snippet input:reset\n\ - ${4}\n\ -snippet input:search\n\ - ${4}\n\ -snippet input:time\n\ - ${4}\n\ -snippet input:url\n\ - ${4}\n\ -snippet input:week\n\ - ${4}\n\ -snippet ins\n\ - ${1}\n\ -snippet kbd\n\ - ${1}\n\ -snippet keygen\n\ - ${1}\n\ -snippet label\n\ - \n\ -snippet label:i\n\ - \n\ - ${7}\n\ -snippet label:s\n\ - \n\ - \n\ -snippet legend\n\ - ${1}\n\ -snippet legend+\n\ - ${1}\n\ -snippet li\n\ -
  • ${1}
  • \n\ -snippet li.\n\ -
  • ${2}
  • \n\ -snippet li+\n\ -
  • ${1}
  • \n\ - li+${2}\n\ -snippet lia\n\ -
  • ${1}
  • \n\ -snippet lia+\n\ -
  • ${1}
  • \n\ - lia+${3}\n\ -snippet link\n\ - ${5}\n\ -snippet link:atom\n\ - ${2}\n\ -snippet link:css\n\ - ${4}\n\ -snippet link:favicon\n\ - ${2}\n\ -snippet link:rss\n\ - ${2}\n\ -snippet link:touch\n\ - ${2}\n\ -snippet map\n\ - \n\ - ${2}\n\ - \n\ -snippet map.\n\ - \n\ - ${3}\n\ - \n\ -snippet map#\n\ - \n\ - ${3}\n\ - \n\ -snippet map+\n\ - \n\ - \"${5}\"${6}\n\ - ${7}\n\ -snippet mark\n\ - ${1}\n\ -snippet menu\n\ - \n\ - ${1}\n\ - \n\ -snippet menu:c\n\ - \n\ - ${1}\n\ - \n\ -snippet menu:t\n\ - \n\ - ${1}\n\ - \n\ -snippet meta\n\ - ${3}\n\ -snippet meta:compat\n\ - ${3}\n\ -snippet meta:refresh\n\ - ${3}\n\ -snippet meta:utf\n\ - ${3}\n\ -snippet meter\n\ - ${1}\n\ -snippet nav\n\ - \n\ -snippet nav.\n\ - \n\ -snippet nav#\n\ - \n\ -snippet noscript\n\ - \n\ -snippet object\n\ - \n\ - ${3}\n\ - ${4}\n\ -# Embed QT Movie\n\ -snippet movie\n\ - \n\ - \n\ - \n\ - \n\ - \n\ - ${6}\n\ -snippet ol\n\ -
      \n\ - ${1}\n\ -
    \n\ -snippet ol.\n\ -
      \n\ - ${2}\n\ -
    \n\ -snippet ol#\n\ -
      \n\ - ${2}\n\ -
    \n\ -snippet ol+\n\ -
      \n\ -
    1. ${1}
    2. \n\ - li+${2}\n\ -
    \n\ -snippet opt\n\ - \n\ -snippet opt+\n\ - \n\ - opt+${3}\n\ -snippet optt\n\ - \n\ -snippet optgroup\n\ - \n\ - \n\ - opt+${3}\n\ - \n\ -snippet output\n\ - ${1}\n\ -snippet p\n\ -

    ${1}

    \n\ -snippet param\n\ - ${3}\n\ -snippet pre\n\ -
    \n\
    -		${1}\n\
    -	
    \n\ -snippet progress\n\ - ${1}\n\ -snippet q\n\ - ${1}\n\ -snippet rp\n\ - ${1}\n\ -snippet rt\n\ - ${1}\n\ -snippet ruby\n\ - \n\ - ${1}\n\ - \n\ -snippet s\n\ - ${1}\n\ -snippet samp\n\ - \n\ - ${1}\n\ - \n\ -snippet script\n\ - \n\ -snippet scriptsrc\n\ - \n\ -snippet section\n\ -
    \n\ - ${1}\n\ -
    \n\ -snippet section.\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet section#\n\ -
    \n\ - ${2}\n\ -
    \n\ -snippet select\n\ - \n\ -snippet select.\n\ - \n\ -snippet select+\n\ - \n\ -snippet small\n\ - ${1}\n\ -snippet source\n\ - \n\ -snippet span\n\ - ${1}\n\ -snippet strong\n\ - ${1}\n\ -snippet style\n\ - \n\ -snippet sub\n\ - ${1}\n\ -snippet summary\n\ - \n\ - ${1}\n\ - \n\ -snippet sup\n\ - ${1}\n\ -snippet table\n\ - \n\ - ${2}\n\ -
    \n\ -snippet table.\n\ - \n\ - ${3}\n\ -
    \n\ -snippet table#\n\ - \n\ - ${3}\n\ -
    \n\ -snippet tbody\n\ - \n\ - ${1}\n\ - \n\ -snippet td\n\ - ${1}\n\ -snippet td.\n\ - ${2}\n\ -snippet td#\n\ - ${2}\n\ -snippet td+\n\ - ${1}\n\ - td+${2}\n\ -snippet textarea\n\ - ${6}\n\ -snippet tfoot\n\ - \n\ - ${1}\n\ - \n\ -snippet th\n\ - ${1}\n\ -snippet th.\n\ - ${2}\n\ -snippet th#\n\ - ${2}\n\ -snippet th+\n\ - ${1}\n\ - th+${2}\n\ -snippet thead\n\ - \n\ - ${1}\n\ - \n\ -snippet time\n\ - \n\ -snippet title\n\ - ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ -snippet tr\n\ - \n\ - ${1}\n\ - \n\ -snippet tr+\n\ - \n\ - ${1}\n\ - td+${2}\n\ - \n\ -snippet track\n\ - ${5}${6}\n\ -snippet ul\n\ -
      \n\ - ${1}\n\ -
    \n\ -snippet ul.\n\ -
      \n\ - ${2}\n\ -
    \n\ -snippet ul#\n\ -
      \n\ - ${2}\n\ -
    \n\ -snippet ul+\n\ -
      \n\ -
    • ${1}
    • \n\ - li+${2}\n\ -
    \n\ -snippet var\n\ - ${1}\n\ -snippet video\n\ - ${8}\n\ -snippet wbr\n\ - ${1}\n\ -"; -exports.scope = "html"; - -}); +define("ace/snippets/html",["require","exports","module"],function(t,n,e){"use strict";n.snippetText='# Some useful Unicode entities\n# Non-Breaking Space\nsnippet nbs\n\t \n# ←\nsnippet left\n\t←\n# →\nsnippet right\n\t→\n# ↑\nsnippet up\n\t↑\n# ↓\nsnippet down\n\t↓\n# ↩\nsnippet return\n\t↩\n# ⇤\nsnippet backtab\n\t⇤\n# ⇥\nsnippet tab\n\t⇥\n# ⇧\nsnippet shift\n\t⇧\n# ⌃\nsnippet ctrl\n\t⌃\n# ⌅\nsnippet enter\n\t⌅\n# ⌘\nsnippet cmd\n\t⌘\n# ⌥\nsnippet option\n\t⌥\n# ⌦\nsnippet delete\n\t⌦\n# ⌫\nsnippet backspace\n\t⌫\n# ⎋\nsnippet esc\n\t⎋\n# Generic Doctype\nsnippet doctype HTML 4.01 Strict\n\t\nsnippet doctype HTML 4.01 Transitional\n\t\nsnippet doctype HTML 5\n\t\nsnippet doctype XHTML 1.0 Frameset\n\t\nsnippet doctype XHTML 1.0 Strict\n\t\nsnippet doctype XHTML 1.0 Transitional\n\t\nsnippet doctype XHTML 1.1\n\t\n# HTML Doctype 4.01 Strict\nsnippet docts\n\t\n# HTML Doctype 4.01 Transitional\nsnippet doct\n\t\n# HTML Doctype 5\nsnippet doct5\n\t\n# XHTML Doctype 1.0 Frameset\nsnippet docxf\n\t\n# XHTML Doctype 1.0 Strict\nsnippet docxs\n\t\n# XHTML Doctype 1.0 Transitional\nsnippet docxt\n\t\n# XHTML Doctype 1.1\nsnippet docx\n\t\n# Attributes\nsnippet attr\n\t${1:attribute}="${2:property}"\nsnippet attr+\n\t${1:attribute}="${2:property}" attr+${3}\nsnippet .\n\tclass="${1}"${2}\nsnippet #\n\tid="${1}"${2}\nsnippet alt\n\talt="${1}"${2}\nsnippet charset\n\tcharset="${1:utf-8}"${2}\nsnippet data\n\tdata-${1}="${2:$1}"${3}\nsnippet for\n\tfor="${1}"${2}\nsnippet height\n\theight="${1}"${2}\nsnippet href\n\thref="${1:#}"${2}\nsnippet lang\n\tlang="${1:en}"${2}\nsnippet media\n\tmedia="${1}"${2}\nsnippet name\n\tname="${1}"${2}\nsnippet rel\n\trel="${1}"${2}\nsnippet scope\n\tscope="${1:row}"${2}\nsnippet src\n\tsrc="${1}"${2}\nsnippet title=\n\ttitle="${1}"${2}\nsnippet type\n\ttype="${1}"${2}\nsnippet value\n\tvalue="${1}"${2}\nsnippet width\n\twidth="${1}"${2}\n# Elements\nsnippet a\n\t${2:$1}\nsnippet a.\n\t${3:$1}\nsnippet a#\n\t${3:$1}\nsnippet a:ext\n\t${2:$1}\nsnippet a:mail\n\t${3:email me}\nsnippet abbr\n\t${2}\nsnippet address\n\t
    \n\t\t${1}\n\t
    \nsnippet area\n\t${4}\nsnippet area+\n\t${4}\n\tarea+${5}\nsnippet area:c\n\t${3}\nsnippet area:d\n\t${3}\nsnippet area:p\n\t${3}\nsnippet area:r\n\t${3}\nsnippet article\n\t
    \n\t\t${1}\n\t
    \nsnippet article.\n\t
    \n\t\t${2}\n\t
    \nsnippet article#\n\t
    \n\t\t${2}\n\t
    \nsnippet aside\n\t\nsnippet aside.\n\t\nsnippet aside#\n\t\nsnippet audio\n\t